permdock 0.16.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/a2a/index.d.ts +4 -4
- package/dist/a2a/index.js +3 -3
- package/dist/{adapter-context-CIQpQxbE.js → adapter-context-OHikyRqV.js} +1 -1
- package/dist/{adoption-scan-C2BCiUEG.js → adoption-scan-CxExBYSJ.js} +1 -1
- package/dist/agent/index.d.ts +2 -2
- package/dist/agent/index.js +1 -1
- package/dist/ai-sdk/index.d.ts +3 -3
- package/dist/ai-sdk/index.js +3 -3
- package/dist/approval-normalize-CUjgSsOl.js +189 -0
- package/dist/approval-policies-oNnckT12.d.ts +138 -0
- package/dist/{approval-prompt-3BqWczTt.d.ts → approval-prompt-Bg7gDSqd.d.ts} +1 -1
- package/dist/approvals/index.d.ts +5 -4
- package/dist/approvals/index.js +7 -6
- package/dist/{approvals-DnIBTuXE.js → approvals-DGId_hgJ.js} +3 -3
- package/dist/{approvers-B4r0N_Uz.js → approvers-BaNwKYgd.js} +20 -1
- package/dist/{arazzo-ClYz2Z0W.js → arazzo--riLuGY0.js} +4 -4
- package/dist/{arazzo-CHoYnQXO.js → arazzo-CEDbb-uM.js} +2 -2
- package/dist/{args-0FrVs5EH.js → args-iafbHiXn.js} +2 -5
- package/dist/astro/index.d.ts +4 -4
- package/dist/astro/index.js +2 -2
- package/dist/{audience-DTjR8xet.js → audience-B4YR9UpV.js} +1 -1
- package/dist/{auth--yPyZNgr.js → auth-j3Eu-j4h.js} +1 -1
- package/dist/authz-topic-Dbc-HDOS.js +15 -0
- package/dist/authzen/index.d.ts +5 -5
- package/dist/authzen/index.js +2 -2
- package/dist/{automation-C6Jg75xq.d.ts → automation-Bfa_wD1h.d.ts} +1 -1
- package/dist/better-auth/index.d.ts +1 -1
- package/dist/better-auth/index.js +10 -8
- package/dist/better-supabase/index.d.ts +335 -38
- package/dist/better-supabase/index.js +778 -117
- package/dist/{better-supabase-Dirf_8Ec.js → better-supabase-BJtQ-kNf.js} +26 -10
- package/dist/{bind-BNQA9JK9.js → bind-B4pMH9bm.js} +6 -6
- package/dist/{bind-YYjvfpB9.d.ts → bind-DR6ku3A9.d.ts} +7 -7
- package/dist/{budget-BELja5A9.js → budget-BBCPDOGP.js} +1 -1
- package/dist/{budget-hYsPz_yE.d.ts → budget-CNLsV2SL.d.ts} +1 -1
- package/dist/{build-instance-BWXqwQYU.js → build-instance-BFMFQdE_.js} +3 -2
- package/dist/{capability-Di9tiUvi.d.ts → capability-BZ_veK9o.d.ts} +1 -1
- package/dist/{capability-BqX94r07.js → capability-zN6T9fxe.js} +2 -3
- package/dist/{casbin-D_rVQ31U.js → casbin-DCQHkkyj.js} +2 -2
- package/dist/{casbin-C9EvElBb.js → casbin-bKC1FpEx.js} +2 -2
- package/dist/{casl-C4OINZHI.js → casl-CjBVJj8R.js} +2 -2
- package/dist/{casl-CHHoCldP.js → casl-CkBssiB1.js} +1 -1
- package/dist/catalog/index.d.ts +5 -5
- package/dist/catalog/index.js +7 -7
- package/dist/catalog-Caqhbdix.js +1 -0
- package/dist/{catalog-CGlSwU6j.js → catalog-D1fw8qif.js} +5 -5
- package/dist/{catalog-doc-DjMKzJp9.js → catalog-doc-C4DGfJCO.js} +3 -3
- package/dist/{catalog-operations-DeHTrJSV.js → catalog-operations-BD22drQf.js} +4 -4
- package/dist/{catalog-amPDr0JQ.js → catalog-zzNuR3sY.js} +3 -3
- package/dist/{challenge-DImNcR7B.js → challenge-B2O2OLEk.js} +2 -2
- package/dist/chat/index.d.ts +1 -1
- package/dist/chat/index.js +2 -2
- package/dist/chat-sdk/index.d.ts +3 -3
- package/dist/{checks-CGkP3Z7A.js → checks-fyDOhcz0.js} +33 -1
- package/dist/claude-agent/index.d.ts +3 -3
- package/dist/claude-agent/index.js +2 -2
- package/dist/clerk/index.d.ts +2 -2
- package/dist/clerk/index.js +10 -7
- package/dist/cli/bin.js +1 -1
- package/dist/cli/index.d.ts +5 -5
- package/dist/cli/index.js +3 -3
- package/dist/client-CH7vzSAY.d.ts +32 -0
- package/dist/cloud/index.d.ts +8 -8
- package/dist/cloud/index.js +1 -1
- package/dist/{cloud-DdaJ7ILM.js → cloud-C0vXBmLG.js} +4 -4
- package/dist/{codemod-B1USJS7a.js → codemod-C-L0w-u7.js} +3 -3
- package/dist/{codemod-ammy6wv4.js → codemod-eYI1FbeJ.js} +395 -8
- package/dist/{collect-DnXL4B8c.js → collect-CU85z6Ta.js} +4 -4
- package/dist/{collect-WCl8cJQV.js → collect-D878zLDP.js} +4 -4
- package/dist/collect-KCtOigxx.js +1 -0
- package/dist/compile/index.d.ts +1 -1
- package/dist/compile/index.js +1 -1
- package/dist/{compile-EzEMB-7v.js → compile-B_oJqmIg.js} +4 -4
- package/dist/{compile-BEklRUYo.d.ts → compile-DBm0ub4p.d.ts} +2 -2
- package/dist/{completion--Y4YItFZ.js → completion-Dauc6pVT.js} +3 -3
- package/dist/{config-CcLlvEYW.js → config-COHmivz9.js} +4 -4
- package/dist/{config-BQ77xMZk.js → config-DWp2PucY.js} +2 -2
- package/dist/{config-report-DVMOLJ7F.js → config-report-DKpFm5ID.js} +2 -2
- package/dist/{context-BnIzxTNE.js → context-DeammvFl.js} +2 -2
- package/dist/convex/index.d.ts +4 -4
- package/dist/convex/index.js +3 -3
- package/dist/{core-lxoANyai.js → core-B8sLve3z.js} +7 -7
- package/dist/{core-CFepFiDP.d.ts → core-D87h2kpR.d.ts} +2 -2
- package/dist/{create-BLPKnJKa.js → create-3A7J9KRR.js} +6 -5
- package/dist/{create-CDd9c22W.d.ts → create-BrQXL-Wt.d.ts} +6 -6
- package/dist/{create-BPUopdfL.d.ts → create-BzwjZuRS.d.ts} +7 -7
- package/dist/{create-Coq5fIrq.js → create-C-tm3KIF.js} +5 -5
- package/dist/{create-DBvUsgzK.d.ts → create-CtoT1lIQ.d.ts} +4 -4
- package/dist/{credential-CyyyvCsL.js → credential-B3Hj4puZ.js} +4 -3
- package/dist/{credentials-CdDxp7jN.js → credentials-dkycUsY3.js} +1 -1
- package/dist/decision-CaG5_eNJ.js +21 -0
- package/dist/{delegation-CDB6_keF.js → delegation-aK4T_5WU.js} +3 -3
- package/dist/delivery/index.d.ts +4 -4
- package/dist/delivery/index.js +1 -1
- package/dist/{denied-text-DHldhVUv.d.ts → denied-text-DlIxt8fh.d.ts} +1 -1
- package/dist/{describe-BbFPBSms.d.ts → describe-BKtC_8PG.d.ts} +1 -1
- package/dist/{describe-Bb4hGK5d.js → describe-BZAlPHxT.js} +2 -1
- package/dist/{diff-DfmYaIhB.js → diff-BnNHqtHj.js} +8 -8
- package/dist/{diff-CxtbOi2l.js → diff-CBCzOTWM.js} +2 -2
- package/dist/{doctor-D1Xnmy6u.js → doctor-CkYKCuX7.js} +233 -30
- package/dist/{doctor-CwYc2lJb.js → doctor-xUpR5rXg.js} +3 -3
- package/dist/drizzle/index.d.ts +3 -3
- package/dist/drizzle/index.js +1 -1
- package/dist/elysia/index.d.ts +4 -4
- package/dist/elysia/index.js +3 -3
- package/dist/{errors-Vpu6rKHl.js → errors-BhRkoNS7.js} +0 -2
- package/dist/{errors-BIM4MFsJ.d.ts → errors-TpzkEKgJ.d.ts} +1 -1
- package/dist/{evaluate-BAmf_AQd.js → evaluate-Czbj7thS.js} +18 -15
- package/dist/{evaluations-DOWuBpWv.d.ts → evaluations-CisTTURl.d.ts} +3 -3
- package/dist/{evaluations-IBceAeKT.js → evaluations-h3KoJAPa.js} +3 -22
- package/dist/eve/index.d.ts +4 -4
- package/dist/eve/index.js +3 -3
- package/dist/express/index.d.ts +4 -4
- package/dist/express/index.js +3 -3
- package/dist/fastify/index.d.ts +4 -4
- package/dist/fastify/index.js +3 -3
- package/dist/{fetch-adapter-BIbBAtPZ.d.ts → fetch-adapter-BdmfnbJM.d.ts} +2 -2
- package/dist/{fetch-adapter-dPTgJVHd.js → fetch-adapter-DH-NJPbL.js} +2 -2
- package/dist/{fields-DI8s3cPl.js → fields-CrjL6A49.js} +3 -3
- package/dist/{files-B3AA05f1.js → files-CfiRtQ-m.js} +1 -1
- package/dist/{fixtures-Bm4_K1ke.js → fixtures-Cemqurt8.js} +10 -4
- package/dist/{flags-DXjoTVbS.js → flags-BlmpmXoY.js} +2 -2
- package/dist/{from-snapshot-DCakWRsr.js → from-snapshot-DMlSSo9b.js} +14 -12
- package/dist/{gen-DwgCSC6V.js → gen-BEIN-DRM.js} +2 -2
- package/dist/{gen-DuAhghDw.js → gen-mf-MRwVr.js} +9 -9
- package/dist/{generate-CRVV5V7l.js → generate-BqkZq8Dr.js} +2 -2
- package/dist/{grantee-conditions-BrYPe-w0.js → grantee-conditions-DX4K_gGI.js} +1 -1
- package/dist/{grantee-match-7RZZvoT_.js → grantee-match-BP-k4vRJ.js} +2 -2
- package/dist/h3/index.d.ts +4 -4
- package/dist/h3/index.js +3 -3
- package/dist/{helpers-DJicaG6f.js → helpers-DmqGy63f.js} +85 -13
- package/dist/hono/index.d.ts +4 -4
- package/dist/hono/index.js +3 -3
- package/dist/{hosted-DVxlLZMe.d.ts → hosted-BFNXwcjd.d.ts} +1 -1
- package/dist/{hosted-D0IzESu_.js → hosted-waouw2V-.js} +12 -10
- package/dist/{http-DOL33cO0.js → http-DhMWeB_h.js} +1 -1
- package/dist/{import-CNBF96hB.js → import-C1XXpG_m.js} +4 -4
- package/dist/{import-Dfe2unKO.js → import-DObwEota.js} +3 -3
- package/dist/{index-BinlXeU-.d.ts → index-BhnOOnp9.d.ts} +2 -2
- package/dist/{index-ymept53A.d.ts → index-CVGio3cH.d.ts} +4 -4
- package/dist/{index-DJwEgYzA.d.ts → index-CdMOd-GY.d.ts} +17 -11
- package/dist/{index-Cay5-Kvx.d.ts → index-CdUTE6qd.d.ts} +11 -10
- package/dist/{index-Dj2qF9VC.d.ts → index-Dfv9Toct.d.ts} +1 -1
- package/dist/{index-CV-7DWeD.d.ts → index-rFp6X_QP.d.ts} +4 -4
- package/dist/index.d.ts +18 -16
- package/dist/index.js +24 -20
- package/dist/{init-BUo2G-FI.js → init-CNJ8lLjo.js} +5 -5
- package/dist/{init-C6cWP3xW.js → init-DS3PEsCG.js} +5 -5
- package/dist/{instance-options-CoHn-0e8.d.ts → instance-options-2sFGSdsf.d.ts} +2 -2
- package/dist/{instance-snapshot-DuWf1cT3.js → instance-snapshot-BWa71my8.js} +15 -12
- package/dist/jwt/index.d.ts +4 -4
- package/dist/jwt/index.js +3 -3
- package/dist/{kernel-BD8QuMnv.js → kernel-30Z2zM_d.js} +10 -10
- package/dist/kysely/index.d.ts +3 -3
- package/dist/kysely/index.js +1 -1
- package/dist/{load-DjSU5KXO.js → load-BaEamml-.js} +1 -1
- package/dist/load-CjnlPxpL.js +1 -0
- package/dist/{login-D1MHOomI.js → login-BgK5Jloo.js} +4 -4
- package/dist/{login-DCKE5pVy.js → login-DUVzBLh7.js} +4 -4
- package/dist/{manifest-BXTbHNIV.js → manifest-BdzBobNK.js} +1 -1
- package/dist/{manifest-schema-DQkBK2Mr.js → manifest-schema-CsFsYLF-.js} +1 -1
- package/dist/{manifest-Cft51TLK.js → manifest-wclLWBVH.js} +37 -37
- package/dist/{map-claims-C-nv08_n.js → map-claims-PQwHynxV.js} +25 -11
- package/dist/{map-error-pasIGqMT.js → map-error-BH16Ah8P.js} +1 -1
- package/dist/mcp/index.d.ts +8 -8
- package/dist/mcp/index.js +9 -9
- package/dist/{migrate-BJHxQqT5.js → migrate-BbY5-Khy.js} +4 -4
- package/dist/{module-values-B1EVTkHP.js → module-values-B8tNIxdd.js} +2 -2
- package/dist/nest/index.d.ts +4 -4
- package/dist/nest/index.js +3 -3
- package/dist/next/index.d.ts +45 -13
- package/dist/next/index.js +68 -30
- package/dist/next/plugin.d.ts +1 -1
- package/dist/next/plugin.js +2 -2
- package/dist/node/index.d.ts +4 -4
- package/dist/node/index.js +2 -2
- package/dist/openai/index.d.ts +4 -4
- package/dist/openai/index.js +3 -3
- package/dist/openapi/index.d.ts +2 -2
- package/dist/{openapi-BwWkHxvW.js → openapi-C4gFqeRz.js} +4 -4
- package/dist/{openapi-DSzQN7Zu.js → openapi-zMEB9qxn.js} +5 -5
- package/dist/{operation-findings-CXtFzlKJ.js → operation-findings-CVwJHEu_.js} +1 -1
- package/dist/operation-risks-BKOcTv8J.js +13 -0
- package/dist/operations-Bm9HFecz.js +89 -0
- package/dist/orpc/index.d.ts +5 -5
- package/dist/orpc/index.js +3 -3
- package/dist/otel/index.d.ts +3 -3
- package/dist/otel/index.js +1 -1
- package/dist/{output-DlICTjBh.js → output-BFWLER4r.js} +1 -1
- package/dist/output-files-BYscrQl-.js +1 -0
- package/dist/{output-files-BIQ_9pIs.js → output-files-CM0BnH05.js} +1 -1
- package/dist/{ownership-qqBuGJXr.js → ownership-D-mIt-w0.js} +6 -6
- package/dist/{parse-1_ZheTW5.js → parse-UTC-sDrt.js} +2 -2
- package/dist/{parse-local-manifest-DEiCF4ah.js → parse-local-manifest-CxcSMQgl.js} +2 -2
- package/dist/{parse-local-manifest-CCmbhnxP.d.ts → parse-local-manifest-DvjTQNuO.d.ts} +1 -1
- package/dist/{parse-request-CwCZpyjV.js → parse-request-DOBVaeiQ.js} +1 -1
- package/dist/pdp/index.d.ts +3 -3
- package/dist/pdp/index.js +3 -3
- package/dist/{peer-Q0fuZ6hx.js → peer-BuK9F53f.js} +1 -1
- package/dist/{peer-C9LvBCcb.js → peer-n-swIV4H.js} +1 -1
- package/dist/{permdock-BvjivVb9.js → permdock-D-_WrdKu.js} +205 -102
- package/dist/{permdock-CprAPN3w.d.ts → permdock-ffY4CMd9.d.ts} +101 -131
- package/dist/{permissions-CYcHj_w7.js → permissions-B3ggI88M.js} +2 -2
- package/dist/{permissions-CVXmRILq.js → permissions-BaoLxy66.js} +1 -13
- package/dist/{pg-DQTqRrou.js → pg-Ddxsd5ZB.js} +2 -2
- package/dist/{policy-BycVKnXv.d.ts → policy-BtKSApSt.d.ts} +1 -1
- package/dist/{policy-CLQ8__GF.js → policy-cV_wwPb8.js} +5 -4
- package/dist/{policy-from-catalog-CU3An8uP.js → policy-from-catalog-B68hGC0S.js} +9 -8
- package/dist/{policy-types-DGIO_gxq.d.ts → policy-types-D-GwfQTc.d.ts} +72 -19
- package/dist/{postgrest-DAxFltvO.js → postgrest-BrjrckDG.js} +74 -19
- package/dist/{postgrest-D5nUGm-c.d.ts → postgrest-D84p5dbA.d.ts} +12 -7
- package/dist/{powersync-CBhTBhG2.js → powersync-9PYOE1wt.js} +158 -21
- package/dist/{powersync-DAfo0EL5.js → powersync-DStC_g0B.js} +3 -3
- package/dist/powersync-xNRlC4jN.js +1 -0
- package/dist/preset/index.js +1 -1
- package/dist/{preset-BjLzeFpp.js → preset-pPrVyGU5.js} +74 -7
- package/dist/prisma/index.d.ts +2 -2
- package/dist/prisma/index.js +1 -1
- package/dist/{protected-action-QEA8arRB.js → protected-action-B40tU3yP.js} +15 -5
- package/dist/{protected-action-D8x73IGm.d.ts → protected-action-Ds_EUY8B.d.ts} +14 -7
- package/dist/{protected-action-DUYqb-Ma.js → protected-action-OpOxtTsN.js} +1 -1
- package/dist/{provider-C55OGXJ7.js → provider-CY4TSSJo.js} +2 -2
- package/dist/{provider-DfLeek9O.d.ts → provider-OtnIiFWm.d.ts} +1 -1
- package/dist/{provider-store-CaTv00tr.js → provider-store-BQP_pp8s.js} +2 -2
- package/dist/{pull-CQCGy1gv.js → pull-DLP4I1Kl.js} +7 -7
- package/dist/pull-UBjDnf4b.js +1 -0
- package/dist/{push-Dq_ca4-j.js → push-BSb8j1EW.js} +8 -8
- package/dist/{pushed-policy-CDuOL2de.js → pushed-policy-BecMsTtM.js} +1 -1
- package/dist/{pushed-policy-CryQheKq.d.ts → pushed-policy-Ck3FZcoy.d.ts} +1 -1
- package/dist/react/index.d.ts +8 -8
- package/dist/react/index.js +6 -6
- package/dist/react/provider-client.d.ts +1 -1
- package/dist/react/provider-client.js +1 -1
- package/dist/react-native/index.d.ts +104 -39
- package/dist/react-native/index.js +199 -40
- package/dist/refresh-on-L9UOwATg.d.ts +49 -0
- package/dist/{replay-Bs9Df2fQ.d.ts → replay-E5X9E1lC.d.ts} +1 -1
- package/dist/{request-context-Duzdf0cd.js → request-context-DM6_jY1n.js} +2 -2
- package/dist/{request-schema-DhX7UbfQ.js → request-schema-CMP8Cmxd.js} +5 -0
- package/dist/resend/index.d.ts +4 -4
- package/dist/{resolve-names-Y1Cb22cp.js → resolve-names-CBl4r4_r.js} +6 -6
- package/dist/{rls-tHu7N_Pe.js → rls-DGBL-jDY.js} +20 -20
- package/dist/{rls-C5ZGzR_B.js → rls-pAHGYgTb.js} +4 -4
- package/dist/{role-builder-BK2-T6oD.js → role-builder-CMW4wWzn.js} +3 -157
- package/dist/{rpc-vHIwyXCp.js → rpc-KwX_Jcxz.js} +2 -2
- package/dist/{run-DUq1xU4K.js → run-B7lv3NuK.js} +8 -40
- package/dist/run-UPbacxPg.js +1 -0
- package/dist/{run-ticket-DfnZCh-u.js → run-ticket-CjvXr6wj.js} +1 -1
- package/dist/{run-ticket-ylovhyFQ.d.ts → run-ticket-DPaD27_r.d.ts} +2 -2
- package/dist/{runtime-BGnrOkVH.js → runtime-rf0ZuyF3.js} +1 -1
- package/dist/{saas-DK4V-3Is.js → saas-B8H1MsQ3.js} +13 -10
- package/dist/{scan-C3HRH9Fs.js → scan-0r3OZqqK.js} +1 -1
- package/dist/{schema-DvXvxPhQ.js → schema-B_9tXrbG.js} +1 -1
- package/dist/{schema-BOJjqlWL.js → schema-CuX70xgH.js} +15 -2
- package/dist/scim/index.d.ts +1 -1
- package/dist/scim/index.js +1 -1
- package/dist/{scim-jJBJ7g1Z.js → scim-C30QBBoF.js} +2 -1
- package/dist/{scim-D8YupzX1.js → scim-CovliQUg.js} +2 -2
- package/dist/{scopes-0Up_UA2t.js → scopes-BSdYaGHs.js} +9 -40
- package/dist/server/index.d.ts +11 -11
- package/dist/server/index.js +8 -8
- package/dist/{server-3cVlTLde.js → server-D0PW6ZCw.js} +2 -2
- package/dist/{server-types-CyRN0-Cd.d.ts → server-types-3OnXjZ2D.d.ts} +8 -8
- package/dist/{shared-l0oGGetg.js → shared-BRmCJxDK.js} +2 -2
- package/dist/{shared-DrGLwM3s.js → shared-DyYVEjKC.js} +2 -2
- package/dist/{sink-B5zoUW_O.d.ts → sink-ogbVkyeo.d.ts} +2 -2
- package/dist/{skills-Celu2W6v.js → skills-B4MPRxQd.js} +2 -2
- package/dist/{skills-B2qTbaQa.js → skills-C9sTD70r.js} +2 -2
- package/dist/{snapshot-CXlzi69u.js → snapshot-DN_8J27z.js} +6 -2
- package/dist/{snapshot-cache-BjAWkchD.d.ts → snapshot-cache-B4YvlGG_.d.ts} +20 -6
- package/dist/{snapshot-cache-Bx_4xC_6.js → snapshot-cache-B66h7FBK.js} +25 -8
- package/dist/solid/index.d.ts +7 -7
- package/dist/solid/index.js +6 -6
- package/dist/solid-start/index.d.ts +4 -4
- package/dist/solid-start/index.js +3 -3
- package/dist/{sources-oB1Hg1Fm.d.ts → sources-xdQShLDU.d.ts} +1 -1
- package/dist/{src-C_pi2Rnh.js → src-Brzq_0in.js} +193 -128
- package/dist/ssf/index.d.ts +3 -3
- package/dist/ssf/index.js +1 -1
- package/dist/{standard-webhooks-DOYEuOLx.d.ts → standard-webhooks-BfPaZ6T1.d.ts} +2 -2
- package/dist/{types-tQB2CEnY.d.ts → store-DYeB-_U3.d.ts} +114 -113
- package/dist/{store-RNFvaJJv.js → store-DmVqy74I.js} +13 -7
- package/dist/{store-options-Dil3lraY.js → store-options--zWn48PK.js} +76 -7
- package/dist/{stores-DxZWDXCs.js → stores-BYFopOm1.js} +3 -3
- package/dist/{stores-DZJvxFIZ.d.ts → stores-EPul_8MN.d.ts} +5 -6
- package/dist/{stream-9y9qw51m.d.ts → stream-W2RuUYly.d.ts} +1 -1
- package/dist/{subject-BGoM5o8B.js → subject-C7RddW0G.js} +8 -1
- package/dist/supabase/client.d.ts +2 -0
- package/dist/supabase/client.js +21 -0
- package/dist/supabase/index.d.ts +37 -6
- package/dist/supabase/index.js +6 -5
- package/dist/supabase/middleware.d.ts +8 -7
- package/dist/supabase/middleware.js +6 -6
- package/dist/{supabase-CDHMsDD0.js → supabase-BiViJpQ4.js} +31 -8
- package/dist/{supabase-DYWnT800.js → supabase-CogTyJH2.js} +3 -3
- package/dist/supabase-hook-BN46IrVI.js +1 -0
- package/dist/{supabase-hook-HPgwYb9V.js → supabase-hook-DX38Hj8h.js} +393 -32
- package/dist/{supautils-SwE642N1.js → supautils-BGf6zRvM.js} +12 -12
- package/dist/svelte/index.d.ts +7 -7
- package/dist/svelte/index.js +8 -8
- package/dist/svelte/runtime.d.ts +3 -3
- package/dist/svelte/runtime.js +3 -3
- package/dist/svelte/source.d.ts +7 -7
- package/dist/svelte/source.js +5 -5
- package/dist/sveltekit/index.d.ts +4 -4
- package/dist/sveltekit/index.js +2 -2
- package/dist/{tables-DimBcVWY.js → tables-BfOk0ymL.js} +7 -7
- package/dist/tanstack-start/index.d.ts +4 -4
- package/dist/tanstack-start/index.js +2 -2
- package/dist/{tenancy-5d1zVBvK.js → tenancy-DvOHHk3-.js} +1 -1
- package/dist/terminal/index.d.ts +5 -5
- package/dist/terminal/index.js +6 -6
- package/dist/testing/core.d.ts +1 -1
- package/dist/testing/core.js +1 -1
- package/dist/testing/fixtures/index.d.ts +1 -1
- package/dist/testing/fixtures/index.js +2 -2
- package/dist/testing/index.d.ts +29 -22
- package/dist/testing/index.js +120 -48
- package/dist/testing/saas/index.d.ts +3 -3
- package/dist/testing/saas/index.js +2 -2
- package/dist/testing/saas/permissions.js +1 -1
- package/dist/token-D6pWn8Uj.d.ts +11 -0
- package/dist/{token-DC9EQiet.js → token-DaMnIU9O.js} +24 -8
- package/dist/{tool-refusal-Qpjs_W6M.js → tool-refusal-D4spOJ7I.js} +1 -1
- package/dist/trpc/index.d.ts +5 -5
- package/dist/trpc/index.js +3 -3
- package/dist/{type-helpers-c7Xo_2Cu.d.ts → type-helpers-i1EJ3Eb1.d.ts} +1 -1
- package/dist/{types-Cklw5hJo.d.ts → types-3Y8UpFkF.d.ts} +40 -1
- package/dist/{types-DlelvQk4.d.ts → types-B8qUkGja.d.ts} +2 -2
- package/dist/{types-CN0LsqbK.d.ts → types-CCEeSCMB.d.ts} +3 -3
- package/dist/{types-B2efzoSX.d.ts → types-CDVXR6YD.d.ts} +1 -1
- package/dist/{types-DsHGPtkR.d.ts → types-Ck1KOfug.d.ts} +2 -2
- package/dist/{types-DLvhVm1r.d.ts → types-CqcsNCaN.d.ts} +16 -7
- package/dist/{types-BB-zWDcR.d.ts → types-D-JO7lh8.d.ts} +5 -5
- package/dist/{types-CEinc15V.d.ts → types-D19MK4t-.d.ts} +3 -4
- package/dist/{types-B6ExllNo.d.ts → types-DGf_cpKF.d.ts} +2 -2
- package/dist/{types-rCRV4Ge-.d.ts → types-DmbfLu2p.d.ts} +4 -4
- package/dist/{types-ZzRGoViD.d.ts → types-NYoj8JBm.d.ts} +2 -2
- package/dist/{types-CWBsAwqn.d.ts → types-o1vu6Ks3.d.ts} +4 -4
- package/dist/unplugin/index.d.ts +1 -1
- package/dist/unplugin/index.js +2 -2
- package/dist/usage-Cl5eb-e1.js +1 -0
- package/dist/{usage-CPXeuAdT.js → usage-DC0UKe6C.js} +6 -6
- package/dist/{usage-CfZCQd0F.js → usage-DYtRVkcN.js} +2 -2
- package/dist/{validation-error-uvp-kyfO.d.ts → validation-error-Dx8PipbO.d.ts} +1 -1
- package/dist/{verify-DfT0QYNh.js → verify-Bpj0hauG.js} +19 -19
- package/dist/{version-cache-Df11C2Qp.d.ts → version-cache-DzNKWiI6.d.ts} +9 -3
- package/dist/{views-CD8wuL4Z.js → views-MWmJ6Y4P.js} +1 -1
- package/dist/vue/index.d.ts +7 -7
- package/dist/vue/index.js +6 -6
- package/dist/{waiter-CqUKX6CY.d.ts → waiter-NK_UuZbb.d.ts} +2 -2
- package/dist/{watch-DAkjm75Y.js → watch-CBHADqBH.js} +3 -3
- package/dist/watch-OYwAPCzx.js +1 -0
- package/dist/webmcp/index.d.ts +1 -1
- package/dist/webmcp/index.js +1 -1
- package/dist/{where-scope-DlCdCM_8.js → where-scope-BKrqUDVk.js} +5 -5
- package/dist/{who-can-BoDJm0Nc.js → who-can-KhVWMxtf.js} +4 -4
- package/dist/workflow/index.d.ts +3 -3
- package/dist/workflow/index.js +5 -4
- package/dist/workflow-sdk/index.d.ts +4 -4
- package/dist/{wrap-DxXB54Wu.d.ts → wrap-BHGA-SMM.d.ts} +2 -2
- package/dist/{wrap-B2wziJI_.js → wrap-C5PWzgkq.js} +1 -1
- package/package.json +8 -5
- package/schemas/approval-request-v1.json +5 -0
- package/schemas/catalog-v1.json +18 -2
- package/schemas/cli-result-v1.json +0 -2
- package/schemas/snapshot-v1.json +9 -0
- package/schemas/supabase-manifest-v1.json +1 -1
- package/skills/permdock-approvals/SKILL.md +8 -8
- package/skills/permdock-approvals/references/stores-and-resume.md +7 -3
- package/skills/permdock-audit/SKILL.md +1 -1
- package/skills/permdock-wire/references/adapters.md +3 -1
- package/dist/action-result-BcudBQOF.d.ts +0 -19
- package/dist/catalog-D3oS2GH3.js +0 -1
- package/dist/collect-D-eroIfV.js +0 -1
- package/dist/load-Dm0pSYH3.js +0 -1
- package/dist/output-files-BHOIlrfD.js +0 -1
- package/dist/powersync-0QVP_DuR.js +0 -1
- package/dist/pull-CCAChKuy.js +0 -1
- package/dist/renames-CGj7YwcQ.js +0 -175
- package/dist/run-C5P3x1EI.js +0 -1
- package/dist/supabase-hook-qsewAVZY.js +0 -1
- package/dist/usage-DmmO_xjJ.js +0 -1
- package/dist/watch-CuPz0D2M.js +0 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/supabase/authz-topic.ts
|
|
2
|
+
/**
|
|
3
|
+
* The server topic the generated version trigger broadcasts on without
|
|
4
|
+
* better-supabase; no user may join it. With better-supabase it is
|
|
5
|
+
* `better_supabase:authz`.
|
|
6
|
+
*/
|
|
7
|
+
const AUTHZ_TOPIC = "permdock:authz";
|
|
8
|
+
/** The broadcast event of a version bump, as better-supabase names it. */
|
|
9
|
+
const AUTHZ_EVENT = "changed";
|
|
10
|
+
/** The private topic one user receives their own version bumps on. */
|
|
11
|
+
function authzUserTopic(userId) {
|
|
12
|
+
return `authz:${userId}`;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { AUTHZ_TOPIC as n, authzUserTopic as r, AUTHZ_EVENT as t };
|
package/dist/authzen/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { m as ApprovalStore } from "../types-
|
|
3
|
-
import { a as ProblemDetails } from "../errors-
|
|
4
|
-
import { t as InstanceOptions } from "../instance-options-
|
|
5
|
-
import { a as evaluationsSemantic, n as EvaluationsSemantic, r as evaluateBatch, t as EVALUATIONS_SEMANTICS } from "../evaluations-
|
|
1
|
+
import { E as Policy, _r as Principal, pr as Delegation, sr as Actor } from "../policy-types-D-GwfQTc.js";
|
|
2
|
+
import { m as ApprovalStore } from "../types-CqcsNCaN.js";
|
|
3
|
+
import { a as ProblemDetails } from "../errors-TpzkEKgJ.js";
|
|
4
|
+
import { t as InstanceOptions } from "../instance-options-2sFGSdsf.js";
|
|
5
|
+
import { a as evaluationsSemantic, n as EvaluationsSemantic, r as evaluateBatch, t as EVALUATIONS_SEMANTICS } from "../evaluations-CisTTURl.js";
|
|
6
6
|
//#region src/authzen/map.d.ts
|
|
7
7
|
type AuthzenEntity = {
|
|
8
8
|
readonly type?: unknown;
|
package/dist/authzen/index.js
CHANGED
|
@@ -7,8 +7,8 @@ import { n as resourceRef } from "../resource-ref-CaS9yVPi.js";
|
|
|
7
7
|
import { n as readBodyText, t as MAX_BODY_BYTES } from "../body-text-DQhcmqdY.js";
|
|
8
8
|
import { r as hasCredentials } from "../http-DKLXrFGk.js";
|
|
9
9
|
import { d as unauthenticatedProblem, l as problemResponse, o as methodNotAllowed } from "../problem-BVLHFK33.js";
|
|
10
|
-
import { n as resolveOrNull, t as buildInstance } from "../build-instance-
|
|
11
|
-
import { a as evaluationReasons, c as withRequestId, g as wireResourceId, h as permissionLookup, i as evaluateBatch, m as itemResourceData, n as applyApprovalResume, r as authzenMetadata, s as evaluationsSemantic, t as EVALUATIONS_SEMANTICS } from "../evaluations-
|
|
10
|
+
import { n as resolveOrNull, t as buildInstance } from "../build-instance-BFMFQdE_.js";
|
|
11
|
+
import { a as evaluationReasons, c as withRequestId, g as wireResourceId, h as permissionLookup, i as evaluateBatch, m as itemResourceData, n as applyApprovalResume, r as authzenMetadata, s as evaluationsSemantic, t as EVALUATIONS_SEMANTICS } from "../evaluations-h3KoJAPa.js";
|
|
12
12
|
//#region src/authzen/map.ts
|
|
13
13
|
const UNKNOWN = {
|
|
14
14
|
outcome: "denied",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Gt as InstanceHandle, Jn as Denial, Kt as Instant } from "./policy-types-D-GwfQTc.js";
|
|
2
2
|
import { u as Permission } from "./permission-types-CAY-GU7e.js";
|
|
3
3
|
import { t as Operation } from "./operations-Ci_rT6Uo.js";
|
|
4
4
|
//#region src/core/automation.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { K as CustomRoleSource, P as RoleBinding, Y as DecisionSink, _r as Principal, yr as Subject } from "../policy-types-D-GwfQTc.js";
|
|
2
2
|
import { f as PermissionTree } from "../permission-types-CAY-GU7e.js";
|
|
3
3
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
4
4
|
//#region src/better-auth/types.d.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as isReadonlyArray, r as isRecord, t as compact } from "../compact-CAf557ZB.js";
|
|
2
2
|
import { n as freezeDeep } from "../freeze-jjan0lCv.js";
|
|
3
|
-
import { n as role, r as allow } from "../role-builder-
|
|
3
|
+
import { n as role, r as allow } from "../role-builder-CMW4wWzn.js";
|
|
4
4
|
import { c as listPermissions } from "../permission-registry-B8tYxPIt.js";
|
|
5
5
|
import { r as validateRecord } from "../thenable-BNSM1U2R.js";
|
|
6
|
-
import { t as anonymousSubject } from "../subject-
|
|
6
|
+
import { i as rootMembershipId, t as anonymousSubject } from "../subject-C7RddW0G.js";
|
|
7
7
|
import { d as membershipEvent } from "../sink-D9_vh372.js";
|
|
8
8
|
//#region src/better-auth/parse.ts
|
|
9
9
|
function asRoles(value) {
|
|
@@ -62,7 +62,8 @@ function parseMemberRows(value, userId, requireUserId = true) {
|
|
|
62
62
|
const roles = asRoles(item["role"] ?? item["roles"]);
|
|
63
63
|
if (tenant === void 0 || roles.length === 0) continue;
|
|
64
64
|
out.push(compact({
|
|
65
|
-
tenant,
|
|
65
|
+
scope: "tenant",
|
|
66
|
+
id: tenant,
|
|
66
67
|
roles
|
|
67
68
|
}));
|
|
68
69
|
}
|
|
@@ -79,8 +80,9 @@ function parseTeamRows(value, userId) {
|
|
|
79
80
|
const roles = asRoles(item["role"] ?? item["roles"]);
|
|
80
81
|
if (team === void 0 || roles.length === 0) continue;
|
|
81
82
|
out.push(compact({
|
|
82
|
-
tenant,
|
|
83
|
-
team,
|
|
83
|
+
within: tenant === void 0 ? void 0 : { tenant },
|
|
84
|
+
scope: "team",
|
|
85
|
+
id: team,
|
|
84
86
|
roles,
|
|
85
87
|
via: `team:${team}`
|
|
86
88
|
}));
|
|
@@ -279,7 +281,7 @@ function memberIn(auth, userId, organizationId, tenant, headers) {
|
|
|
279
281
|
filterValue: userId
|
|
280
282
|
},
|
|
281
283
|
headers
|
|
282
|
-
}), userId).filter((item) => item
|
|
284
|
+
}), userId).filter((item) => rootMembershipId(item) === organizationId), []);
|
|
283
285
|
}
|
|
284
286
|
async function loadMemberships(auth, session, user, userId, tenant, options) {
|
|
285
287
|
let members = parseMemberRows(session["members"] ?? session["member"] ?? user["members"], userId, false);
|
|
@@ -295,8 +297,8 @@ async function loadMemberships(auth, session, user, userId, tenant, options) {
|
|
|
295
297
|
const listUserTeams = auth.api?.listUserTeams;
|
|
296
298
|
if (teams.length === 0 && listUserTeams !== void 0) teams = await settle(async () => parseTeamRows(await listUserTeams({ headers }), userId), []);
|
|
297
299
|
if (options.memberships === "active" && tenant !== void 0) {
|
|
298
|
-
members = members.filter((item) => item
|
|
299
|
-
teams = teams.filter((item) => item.tenant === tenant);
|
|
300
|
+
members = members.filter((item) => rootMembershipId(item) === tenant);
|
|
301
|
+
teams = teams.filter((item) => item.within?.["tenant"] === tenant);
|
|
300
302
|
}
|
|
301
303
|
return [...members, ...teams];
|
|
302
304
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { At as ApiKeyPrincipal, E as Policy, Kt as Instant, Tn as ApproverInput, W as CredentialVerifier, Z as Intent, Zn as DeniedDecision, _r as Principal, an as AuthEvent, rt as MembershipSource, wt as SupportSession, yr as Subject } from "../policy-types-D-GwfQTc.js";
|
|
2
2
|
import { f as PermissionTree, u as Permission } from "../permission-types-CAY-GU7e.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { i as OperationEffect } from "../operations-Ci_rT6Uo.js";
|
|
4
|
+
import { i as ApprovalPolicySource } from "../approval-policies-oNnckT12.js";
|
|
5
|
+
import { A as PermissionState, _ as PrincipalSource, a as PermDock, h as PrincipalIdentity, k as PermissionCheck, o as PermDockOptions, w as InstanceCache } from "../permdock-ffY4CMd9.js";
|
|
6
|
+
import { m as ApprovalStore } from "../types-CqcsNCaN.js";
|
|
7
|
+
import { t as InstanceOptions } from "../instance-options-2sFGSdsf.js";
|
|
8
|
+
import { c as AccessReviewStore } from "../types-CDVXR6YD.js";
|
|
9
|
+
import { i as SupabaseRpcCaller } from "../postgrest-D84p5dbA.js";
|
|
10
|
+
import { a as CatalogDocument } from "../types-NYoj8JBm.js";
|
|
11
|
+
import { n as VersionCache } from "../version-cache-DzNKWiI6.js";
|
|
12
|
+
import { A as SupabaseSubjectOptions, C as SupabasePrincipal, N as SupabaseSuspension, O as SupabaseSessionLike, s as SqlMembershipSource } from "../sources-xdQShLDU.js";
|
|
9
13
|
import { t as SqlQuery } from "../sql-B80DFdpG.js";
|
|
10
|
-
import { c as LinkPolicy, o as CapabilityPrincipal, t as Capability } from "../capability-
|
|
11
|
-
import { AuthorizationProvider } from "better-supabase/
|
|
12
|
-
import { AuthSession, AuthorizationHooks, AuthorizationRequest, Authorizer, SupportAuthorize, SupportAuthorizeInput } from "better-supabase/server";
|
|
14
|
+
import { c as LinkPolicy, o as CapabilityPrincipal, t as Capability } from "../capability-BZ_veK9o.js";
|
|
15
|
+
import { AccessBucketPolicy, AccessTopicPolicy, AuthorizationHooks, AuthorizationProvider, AuthorizationRequest, Authorizer, BlockTables, CredentialProvider, SupportAuthorize, SupportAuthorizeInput, ToolDecision, ToolRef } from "better-supabase/contract";
|
|
13
16
|
import { EntitlementClaimOptions } from "better-supabase/blocks/entitlements";
|
|
17
|
+
import { AuthSession } from "better-supabase/server";
|
|
14
18
|
import { ApiKey, ApiKeyClaimsOptions, ApiKeys } from "better-supabase/blocks/api-keys";
|
|
15
|
-
import { AccessTopicPolicy } from "better-supabase/realtime";
|
|
16
|
-
import { AccessBucketPolicy } from "better-supabase/storage";
|
|
17
|
-
import { CredentialProvider } from "better-supabase/credentials";
|
|
18
|
-
import { ToolDecision, ToolRef } from "better-supabase/mcp";
|
|
19
19
|
import { AuthorizeHookOptions, ProtectWebHandlerOptions } from "better-supabase/workflow-sdk";
|
|
20
20
|
//#region src/better-supabase/access-reviews.d.ts
|
|
21
21
|
type AccessReviewApplierOptions = {
|
|
@@ -82,6 +82,140 @@ type AccessReviewApplyResult = {
|
|
|
82
82
|
*/
|
|
83
83
|
export declare function accessReviewApplier(options: AccessReviewApplierOptions): (reviewId: string) => Promise<AccessReviewApplyResult>;
|
|
84
84
|
//#endregion
|
|
85
|
+
//#region src/better-supabase/approvals-block.d.ts
|
|
86
|
+
/** better-supabase's `AsyncResult`: awaiting it gives `{ ok, data, error }`. */
|
|
87
|
+
type BlockResult<T> = PromiseLike<{
|
|
88
|
+
readonly ok: true;
|
|
89
|
+
readonly data: T;
|
|
90
|
+
} | {
|
|
91
|
+
readonly ok: false;
|
|
92
|
+
readonly error: unknown;
|
|
93
|
+
}>;
|
|
94
|
+
/** A `Temporal.Instant`, as far as the bridge reads it. */
|
|
95
|
+
type BlockInstant = {
|
|
96
|
+
readonly toJSON: () => string;
|
|
97
|
+
};
|
|
98
|
+
type BlockStatus = "pending" | "approved" | "rejected" | "cancelled" | "expired";
|
|
99
|
+
/** The approvals block's request; instants are `Temporal.Instant`. */
|
|
100
|
+
type BlockApprovalRecord<I extends BlockInstant> = {
|
|
101
|
+
readonly id: string;
|
|
102
|
+
readonly status: BlockStatus;
|
|
103
|
+
readonly payload: Readonly<Record<string, unknown>>;
|
|
104
|
+
readonly fingerprint?: string;
|
|
105
|
+
readonly expiresAt?: I;
|
|
106
|
+
readonly decidedAt?: I;
|
|
107
|
+
readonly consumedAt?: I;
|
|
108
|
+
readonly createdAt: I;
|
|
109
|
+
};
|
|
110
|
+
type BlockApprovalApprovers = {
|
|
111
|
+
readonly permission?: string;
|
|
112
|
+
readonly role?: string;
|
|
113
|
+
readonly team?: string;
|
|
114
|
+
readonly users?: readonly string[];
|
|
115
|
+
readonly manager?: boolean;
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* The approvals block's tenant or platform policy (`options.tenantPolicies`,
|
|
119
|
+
* `options.platformPolicies`). `organizationId` is `null` on a platform policy;
|
|
120
|
+
* `subjectType` and `action` may be `*`.
|
|
121
|
+
*/
|
|
122
|
+
type BlockApprovalTenantPolicy = {
|
|
123
|
+
readonly organizationId: string | null;
|
|
124
|
+
readonly subjectType: string;
|
|
125
|
+
readonly action: string;
|
|
126
|
+
readonly effect?: string;
|
|
127
|
+
readonly conditions?: unknown;
|
|
128
|
+
readonly mode: "confirm" | "authorize";
|
|
129
|
+
readonly steps: readonly {
|
|
130
|
+
readonly approvers: BlockApprovalApprovers;
|
|
131
|
+
readonly required: number | "all";
|
|
132
|
+
}[];
|
|
133
|
+
readonly selfApproval: boolean;
|
|
134
|
+
readonly expiresIn?: string;
|
|
135
|
+
readonly enabled: boolean;
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* The calls `blockApprovalStore` makes on `createApprovals(...)` from
|
|
139
|
+
* `better-supabase/blocks/approvals`.
|
|
140
|
+
*/
|
|
141
|
+
type BlockApprovalsClient<I extends BlockInstant> = {
|
|
142
|
+
readonly request: (subject: {
|
|
143
|
+
readonly type: string;
|
|
144
|
+
readonly id: string;
|
|
145
|
+
}, input: {
|
|
146
|
+
readonly action: string;
|
|
147
|
+
readonly reason?: string;
|
|
148
|
+
readonly payload?: Readonly<Record<string, unknown>>;
|
|
149
|
+
readonly fingerprint?: string;
|
|
150
|
+
readonly tenantless?: boolean;
|
|
151
|
+
}) => BlockResult<BlockApprovalRecord<I>>;
|
|
152
|
+
readonly list: (options?: {
|
|
153
|
+
readonly status?: BlockStatus | null;
|
|
154
|
+
readonly pageSize?: number;
|
|
155
|
+
readonly before?: I;
|
|
156
|
+
readonly tenantless?: boolean;
|
|
157
|
+
}) => BlockResult<readonly BlockApprovalRecord<I>[]>;
|
|
158
|
+
readonly consume: (id: string, fingerprint?: string) => BlockResult<BlockApprovalRecord<I>>;
|
|
159
|
+
readonly approve?: BlockDecide<I>;
|
|
160
|
+
readonly reject?: BlockDecide<I>;
|
|
161
|
+
};
|
|
162
|
+
type BlockDecide<I extends BlockInstant> = (id: string, comment?: string, options?: {
|
|
163
|
+
readonly decidedBy?: string;
|
|
164
|
+
}) => BlockResult<BlockApprovalRecord<I>>;
|
|
165
|
+
/** The call `blockApprovalPolicySource` makes on the approvals block. */
|
|
166
|
+
type BlockApprovalPoliciesClient = {
|
|
167
|
+
readonly listPolicies: (options?: {
|
|
168
|
+
readonly subjectType?: string;
|
|
169
|
+
readonly pageSize?: number;
|
|
170
|
+
readonly platform?: boolean;
|
|
171
|
+
}) => BlockResult<readonly BlockApprovalTenantPolicy[]>;
|
|
172
|
+
};
|
|
173
|
+
type BlockApprovalStoreOptions = {
|
|
174
|
+
readonly tenantless?: boolean;
|
|
175
|
+
};
|
|
176
|
+
/**
|
|
177
|
+
* An `ApprovalStore` over better-supabase's approvals block, so a PermDock
|
|
178
|
+
* `approval-required` decision files a block request and is decided in the
|
|
179
|
+
* block's own approve and reject flow. `create` files the request on the
|
|
180
|
+
* resource under the permission's action, with the PermDock request in
|
|
181
|
+
* `payload.permdock` and its `fingerprint`. `get`, `getById` and `list` read
|
|
182
|
+
* the block's latest 2,000 requests in the block's tenant, and with
|
|
183
|
+
* `tenantless` the latest 2,000 without one. `consume` calls the block's
|
|
184
|
+
* `consume`, which refuses a second use and another fingerprint. `resolve`
|
|
185
|
+
* checks the verdict against the PermDock request, then calls the block's
|
|
186
|
+
* `approve` or `reject` with `decidedBy` set to the approver, so a service-role
|
|
187
|
+
* client records the user who decided; without `approve` and `reject` on the
|
|
188
|
+
* client it throws. `expire` answers 0, since the block expires requests
|
|
189
|
+
* itself.
|
|
190
|
+
*/
|
|
191
|
+
export declare function blockApprovalStore<I extends BlockInstant>(approvals: BlockApprovalsClient<I>, options?: BlockApprovalStoreOptions): ApprovalStore;
|
|
192
|
+
type BlockApprovalPolicySourceOptions = {
|
|
193
|
+
/** The scope a step's `role` is held in. Default `tenant`. */
|
|
194
|
+
readonly roleScope?: string;
|
|
195
|
+
readonly platform?: boolean;
|
|
196
|
+
readonly permissions?: PermissionTree;
|
|
197
|
+
readonly effects?: Readonly<Record<string, readonly OperationEffect[]>>;
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* An `ApprovalPolicySource` over the approvals block's tenant policies, and
|
|
201
|
+
* with `platform` its platform policies, so a PermDock decision asks for
|
|
202
|
+
* approval wherever the block would. A policy keys the permission
|
|
203
|
+
* `<subjectType>.<action>`; a platform policy has no tenant. Its steps become
|
|
204
|
+
* sequential stages whose approvers are any of the step's permission, role,
|
|
205
|
+
* users and manager; `required: "all"` over users needs each of them. `confirm`
|
|
206
|
+
* with `selfApproval` lets the principal approve; `expiresIn` caps the
|
|
207
|
+
* request's `ttl`. `conditions` become a `check` over the call's input, or the
|
|
208
|
+
* row without one; a tree PermDock cannot express is dropped, so the policy
|
|
209
|
+
* applies to every call: stricter, never looser. A `*` subject type or action
|
|
210
|
+
* with an effect PermDock knows matches every operation with that effect, and
|
|
211
|
+
* without one expands over `permissions`. A concrete policy's `effect` is
|
|
212
|
+
* ignored, so it applies to every call of its permission. A step with only a
|
|
213
|
+
* `team` approver, `required: "all"` over anything but users, an interval it
|
|
214
|
+
* cannot read or a failed read makes the source fail, and every call an allow
|
|
215
|
+
* would grant denies.
|
|
216
|
+
*/
|
|
217
|
+
export declare function blockApprovalPolicySource(approvals: BlockApprovalPoliciesClient, options?: BlockApprovalPolicySourceOptions): ApprovalPolicySource;
|
|
218
|
+
//#endregion
|
|
85
219
|
//#region src/better-supabase/approvers.d.ts
|
|
86
220
|
/**
|
|
87
221
|
* Who may approve each better-supabase request kind: `'ai-tool'` (a tool call),
|
|
@@ -163,9 +297,9 @@ type ApiKeySessionOptions = {
|
|
|
163
297
|
};
|
|
164
298
|
/**
|
|
165
299
|
* The fields of better-supabase's `SessionSnapshot` a subject reads: one
|
|
166
|
-
* verified token, from `bsb.
|
|
167
|
-
* scopes share
|
|
168
|
-
* `authz_ver` claims.
|
|
300
|
+
* verified token, from `bsb.getClaims()` in Next.js, where `'use cache:
|
|
301
|
+
* private'` scopes share it, or from `server.snapshot(request)` elsewhere. Its
|
|
302
|
+
* `issuedAt` and `authzVersion` come from the `iat` and `authz_ver` claims.
|
|
169
303
|
*/
|
|
170
304
|
type SessionSnapshotLike = {
|
|
171
305
|
readonly accessToken: string;
|
|
@@ -204,6 +338,81 @@ type BetterSupabaseSubjectOptions = Omit<SupabaseSubjectOptions, "claims"> & {
|
|
|
204
338
|
*/
|
|
205
339
|
export declare function subjectFromBetterSupabase(session: SupabaseSessionLike | ApiKeySession | SessionSnapshotLike | null | undefined, options?: BetterSupabaseSubjectOptions): Subject<SupabasePrincipal> | Subject<ApiKeyPrincipal> | Subject;
|
|
206
340
|
//#endregion
|
|
341
|
+
//#region src/better-supabase/permdock-for.d.ts
|
|
342
|
+
/**
|
|
343
|
+
* What `bsb.bootstrap()` and `bsb.getAccess()` return: a session with the
|
|
344
|
+
* tenant and the authorization version read in the same request.
|
|
345
|
+
*/
|
|
346
|
+
type PermDockForResult = {
|
|
347
|
+
readonly session: SupabaseSessionLike | ApiKeySession | null;
|
|
348
|
+
readonly tenant: string | null;
|
|
349
|
+
readonly authzVersion: number | null;
|
|
350
|
+
/** `bsb.bootstrap()`'s `session_active()`; `false` is signed out. */
|
|
351
|
+
readonly sessionActive?: boolean;
|
|
352
|
+
};
|
|
353
|
+
/** Who an instance is for. */
|
|
354
|
+
type PermDockForInput = SupabaseSessionLike | ApiKeySession | SessionSnapshotLike | PermDockForResult | Subject | null | undefined;
|
|
355
|
+
type PermDockForQuery = {
|
|
356
|
+
/** Default the source's tenant (`bootstrap`, `getAccess`). */
|
|
357
|
+
readonly tenant?: string | null;
|
|
358
|
+
/** Default `read`. */
|
|
359
|
+
readonly intent?: Intent;
|
|
360
|
+
};
|
|
361
|
+
/**
|
|
362
|
+
* The instance for a session, a `bsb.bootstrap()` result, a `bsb.getAccess()`
|
|
363
|
+
* result or a subject. The second argument is a query or a tenant, so it also
|
|
364
|
+
* serves as an approvals handler's or access-review handler's `permdockFor`.
|
|
365
|
+
* The third is the version cache better-supabase passes at runtime, which
|
|
366
|
+
* replaces the `versions` option.
|
|
367
|
+
*/
|
|
368
|
+
type PermDockFor = {
|
|
369
|
+
(source: PermDockForInput, query?: PermDockForQuery | string | null, versions?: VersionCache): Promise<PermDock>;
|
|
370
|
+
/**
|
|
371
|
+
* The instance options every instance of `versions` (default the `versions`
|
|
372
|
+
* option) is built with: the same object on every call, so an adapter that
|
|
373
|
+
* spreads it into its own options, such as oRPC's or MCP's `createPermDock`,
|
|
374
|
+
* shares the `claimsFirst` memberships and the `instances` entries.
|
|
375
|
+
*/
|
|
376
|
+
readonly sources: (versions?: VersionCache) => InstanceOptions;
|
|
377
|
+
};
|
|
378
|
+
type PermDockForOptions = {
|
|
379
|
+
readonly policy: Policy;
|
|
380
|
+
/** How the verified claims map to a subject. */
|
|
381
|
+
readonly subject?: BetterSupabaseSubjectOptions;
|
|
382
|
+
/**
|
|
383
|
+
* The membership source a stale token is re-read from, wrapped in
|
|
384
|
+
* `claimsFirst(source, { onStale: 'reread', versions })`.
|
|
385
|
+
*/
|
|
386
|
+
readonly memberships?: MembershipSource | readonly MembershipSource[];
|
|
387
|
+
/** The version `claimsFirst` compares with `authz_ver`; default the source's. */
|
|
388
|
+
readonly version?: MembershipSource["version"];
|
|
389
|
+
/** The process-wide version cache (`createNext({ versions })`). */
|
|
390
|
+
readonly versions?: VersionCache;
|
|
391
|
+
/** The process-wide instance cache, shared with the app's other adapters. */
|
|
392
|
+
readonly instances?: InstanceCache;
|
|
393
|
+
/** Sources and sinks for each instance. */
|
|
394
|
+
readonly options?: Omit<PermDockOptions, "tenant" | "intent" | "version">;
|
|
395
|
+
};
|
|
396
|
+
/**
|
|
397
|
+
* One resolver for every instance of the app: `permdockFor(await
|
|
398
|
+
* bsb.claims())`, `permdockFor(await bsb.bootstrap(...))` or `permdockFor(await
|
|
399
|
+
* bsb.getAccess(...))`. A bootstrap or access result passes its `authzVersion`
|
|
400
|
+
* as `version.known`, so the instance reads no version, and a `sessionActive:
|
|
401
|
+
* false` bootstrap is anonymous. With `instances`, a subject at an unchanged
|
|
402
|
+
* version reuses its instance across requests. Pass the same resolver to
|
|
403
|
+
* `authorizer({ permdockFor })`, `authorizationHooks({ permdockFor })` and,
|
|
404
|
+
* through `permdockFor.sources()`, to every other adapter's options, so they
|
|
405
|
+
* share one instance per subject and version.
|
|
406
|
+
*/
|
|
407
|
+
export declare function permdockFor(options: PermDockForOptions): PermDockFor;
|
|
408
|
+
/**
|
|
409
|
+
* One `{ allowed, outcome, reason? }` per named check for `input`, from one
|
|
410
|
+
* `permdockFor` instance: frozen plain JSON an island returns from `'use cache:
|
|
411
|
+
* private'`. A check that throws denies its entry; an instance that cannot be
|
|
412
|
+
* built denies them all.
|
|
413
|
+
*/
|
|
414
|
+
export declare function getPermissions<K extends string>(resolve: (source: PermDockForInput, query?: PermDockForQuery | string | null) => Promise<PermDock>, input: PermDockForInput, checks: Readonly<Record<K, PermissionCheck>>, query?: PermDockForQuery | string | null): Promise<Readonly<Record<K, PermissionState>>>;
|
|
415
|
+
//#endregion
|
|
207
416
|
//#region src/better-supabase/subscribers.d.ts
|
|
208
417
|
/** The fields of better-supabase's `OutboxEvent` the policy reads. */
|
|
209
418
|
type SubscriberPolicyEvent = {
|
|
@@ -234,6 +443,11 @@ type SubscriberPolicyOptions<E extends SubscriberPolicyEvent = SubscriberPolicyE
|
|
|
234
443
|
readonly sender?: (event: E) => string | null | undefined;
|
|
235
444
|
/** Sources for the sender's and subscribers' instances. */
|
|
236
445
|
readonly options?: Omit<PermDockOptions, "tenant" | "actor" | "delegation" | "session" | "expiresAt" | "principals">;
|
|
446
|
+
/**
|
|
447
|
+
* The process-wide instance cache: an instance is reused while the subject's
|
|
448
|
+
* authorization version is unchanged.
|
|
449
|
+
*/
|
|
450
|
+
readonly instances?: InstanceCache;
|
|
237
451
|
};
|
|
238
452
|
/**
|
|
239
453
|
* The per-subscriber check for better-supabase's webhooks-out, outbox and
|
|
@@ -267,6 +481,11 @@ type SupportPolicyOptions = {
|
|
|
267
481
|
* tenant's `supportSessions` rules.
|
|
268
482
|
*/
|
|
269
483
|
readonly options?: Omit<PermDockOptions, "tenant" | "actor" | "delegation" | "session" | "expiresAt">;
|
|
484
|
+
/**
|
|
485
|
+
* The process-wide instance cache: an instance is reused while the subject's
|
|
486
|
+
* authorization version is unchanged.
|
|
487
|
+
*/
|
|
488
|
+
readonly instances?: InstanceCache;
|
|
270
489
|
/**
|
|
271
490
|
* The session's permissions when a start asks for `readOnly: false`. Without
|
|
272
491
|
* it such a start is refused; a read-only start gets every `readOnlyHint`
|
|
@@ -304,6 +523,13 @@ type Maybe$1<T> = T | null | undefined | Promise<T | null | undefined>;
|
|
|
304
523
|
type Claims = Readonly<Record<string, unknown>>;
|
|
305
524
|
type AuthorizationHooksOptions = {
|
|
306
525
|
readonly policy: Policy;
|
|
526
|
+
/**
|
|
527
|
+
* The app's `permdockFor` resolver, shared with `authorizer({ permdockFor })`
|
|
528
|
+
* so a hook reuses the instances the checks built. It holds `subject`,
|
|
529
|
+
* `memberships`, `version`, `versions`, `instances` and `options`; passing
|
|
530
|
+
* one of those as well throws a `TypeError`.
|
|
531
|
+
*/
|
|
532
|
+
readonly permdockFor?: PermDockFor;
|
|
307
533
|
/**
|
|
308
534
|
* The claims better-supabase mints for `userId` now, or `null` for a user
|
|
309
535
|
* deleted, suspended or unknown: the same loader `principalSource` takes.
|
|
@@ -316,6 +542,11 @@ type AuthorizationHooksOptions = {
|
|
|
316
542
|
* `subjectFromBetterSupabase`.
|
|
317
543
|
*/
|
|
318
544
|
readonly subject?: Omit<BetterSupabaseSubjectOptions, "apiKeys">;
|
|
545
|
+
/**
|
|
546
|
+
* The process-wide instance cache: an instance is reused while the subject's
|
|
547
|
+
* authorization version is unchanged.
|
|
548
|
+
*/
|
|
549
|
+
readonly instances?: InstanceCache;
|
|
319
550
|
/** Sources for every instance the hooks build. */
|
|
320
551
|
readonly options?: Omit<PermDockOptions, "tenant" | "actor" | "delegation" | "session" | "expiresAt">;
|
|
321
552
|
/**
|
|
@@ -358,11 +589,12 @@ type AuthorizationHooksOptions = {
|
|
|
358
589
|
* authorization })`), decided by `policy`. Every hook builds the principal's
|
|
359
590
|
* instance from the claims `claims` loads now, never from the request, and
|
|
360
591
|
* fails closed: a throw, an unknown key and `approval-required` refuse.
|
|
361
|
-
* `automation` and `
|
|
362
|
-
* `
|
|
363
|
-
* `
|
|
364
|
-
*
|
|
365
|
-
* `
|
|
592
|
+
* `automation`, `delegation` and `sessionTags` (`snapshotTag(userId)`, so
|
|
593
|
+
* `evictSession` and sign-out clear PermDock snapshots) are always set;
|
|
594
|
+
* `identities`, `delivery`, `approverOf`, `support` and `tickets` only with the
|
|
595
|
+
* options they read. `delegation.permissions` maps each scope to the keys whose
|
|
596
|
+
* `.scope` it is, was renamed from, or that a policy `oauthScopes` entry
|
|
597
|
+
* covers, and reads no `authorization_details`.
|
|
366
598
|
*/
|
|
367
599
|
export declare function authorizationHooks(options: AuthorizationHooksOptions): AuthorizationHooks;
|
|
368
600
|
//#endregion
|
|
@@ -407,6 +639,7 @@ type AuthorizationProviderOptions = {
|
|
|
407
639
|
* `permdock_is_approver` from `rls.approvals`.
|
|
408
640
|
*/
|
|
409
641
|
readonly approvers?: ProviderApprovers;
|
|
642
|
+
readonly requestApprovers?: boolean;
|
|
410
643
|
/**
|
|
411
644
|
* better-supabase's `blocks.permissions.activeTenant`. When the token hook
|
|
412
645
|
* reads the active tenant from another place than better-supabase writes it,
|
|
@@ -462,6 +695,15 @@ type BetterSupabaseOnError = (error: unknown, context: BetterSupabaseErrorContex
|
|
|
462
695
|
type AuthorizerOperation = "list" | "get" | "create" | "update" | "delete";
|
|
463
696
|
type AuthorizerOptions = {
|
|
464
697
|
readonly policy: Policy;
|
|
698
|
+
/**
|
|
699
|
+
* The app's `permdockFor` resolver: `bsb.action`, `protectAction` and every
|
|
700
|
+
* adapter that spreads `permdockFor.sources()` then share one instance per
|
|
701
|
+
* subject and version. Each check calls it with better-supabase's runtime
|
|
702
|
+
* `versions`. It holds `subject`, `memberships`, `version`, `versions`,
|
|
703
|
+
* `instances` and `options`; passing one of those as well throws a
|
|
704
|
+
* `TypeError`.
|
|
705
|
+
*/
|
|
706
|
+
readonly permdockFor?: PermDockFor;
|
|
465
707
|
/**
|
|
466
708
|
* How the verified claims map to a subject; the defaults of
|
|
467
709
|
* `subjectFromBetterSupabase`.
|
|
@@ -494,12 +736,25 @@ type AuthorizerOptions = {
|
|
|
494
736
|
*/
|
|
495
737
|
readonly versions?: VersionCache;
|
|
496
738
|
/**
|
|
497
|
-
* The intent of one check. By default
|
|
498
|
-
*
|
|
499
|
-
* `
|
|
500
|
-
* `write` and reads the version
|
|
739
|
+
* The intent of one check. By default better-supabase's `context.intent`;
|
|
740
|
+
* without it a batch (`evaluations`, list and row filtering) and an action
|
|
741
|
+
* named `read`, `list` or `view` are `read`, so `claimsFirst` may answer from
|
|
742
|
+
* the version cache, and every other check is `write` and reads the version
|
|
743
|
+
* live.
|
|
501
744
|
*/
|
|
502
745
|
readonly intent?: (request: AuthorizationRequest<Permission>) => Intent;
|
|
746
|
+
/**
|
|
747
|
+
* The approval store an `approval-required` decision files its request in and
|
|
748
|
+
* resumes from. The approval id the client sends (better-supabase's
|
|
749
|
+
* `approval: { header }`) resumes one `evaluate` call; `evaluations` never
|
|
750
|
+
* consumes it. Without a store, `approval-required` is returned as is.
|
|
751
|
+
*/
|
|
752
|
+
readonly store?: ApprovalStore;
|
|
753
|
+
/**
|
|
754
|
+
* Shares instances across requests while the caller's authorization version
|
|
755
|
+
* is unchanged: the `instanceCache()` the app's other adapters use.
|
|
756
|
+
*/
|
|
757
|
+
readonly instances?: InstanceCache;
|
|
503
758
|
/** Receives every error a check threw; the check still denies. */
|
|
504
759
|
readonly onError?: BetterSupabaseOnError;
|
|
505
760
|
/**
|
|
@@ -517,7 +772,7 @@ type AuthorizerOptions = {
|
|
|
517
772
|
* throw denies. With better-supabase's runtime `memo`, the checks of one
|
|
518
773
|
* request scope share an instance per claims, tenant and intent.
|
|
519
774
|
*/
|
|
520
|
-
export declare function authorizer(options: AuthorizerOptions): Authorizer<Permission>;
|
|
775
|
+
export declare function authorizer(options: AuthorizerOptions): Authorizer<Permission, VersionCache>;
|
|
521
776
|
//#endregion
|
|
522
777
|
//#region src/better-supabase/block-memberships.d.ts
|
|
523
778
|
/**
|
|
@@ -545,14 +800,23 @@ type BlockRoleJunction = {
|
|
|
545
800
|
readonly id?: string;
|
|
546
801
|
};
|
|
547
802
|
type BlockMembershipSourceOptions = {
|
|
548
|
-
/**
|
|
803
|
+
/**
|
|
804
|
+
* `blockTables(config)` from `better-supabase/sql`: the memberships and
|
|
805
|
+
* `membership_roles` tables with the app's `blocks.memberships.tables` and
|
|
806
|
+
* `columns` renames. `table` and `columns` win over it.
|
|
807
|
+
*/
|
|
808
|
+
readonly tables?: BlockTables;
|
|
809
|
+
/**
|
|
810
|
+
* The memberships block's table. Default the `tables` entry, else
|
|
811
|
+
* `better_supabase.memberships`.
|
|
812
|
+
*/
|
|
549
813
|
readonly table?: string;
|
|
550
814
|
/** The declared scope a row is a membership of. Default `organization`. */
|
|
551
815
|
readonly scope?: string;
|
|
552
816
|
/**
|
|
553
817
|
* Physical column names, keyed like better-supabase's
|
|
554
|
-
* `blocks.memberships.columns.memberships`. Defaults `
|
|
555
|
-
* `user_id`, `role` and `disabled_at`.
|
|
818
|
+
* `blocks.memberships.columns.memberships`. Defaults the `tables` entry's
|
|
819
|
+
* columns, else `organization_id`, `user_id`, `role` and `disabled_at`.
|
|
556
820
|
*/
|
|
557
821
|
readonly columns?: {
|
|
558
822
|
readonly tenant?: string;
|
|
@@ -566,10 +830,10 @@ type BlockMembershipSourceOptions = {
|
|
|
566
830
|
*/
|
|
567
831
|
readonly roleThrough?: BlockRoleThrough;
|
|
568
832
|
/**
|
|
569
|
-
* A role junction read instead of the role column. `"many"` reads
|
|
570
|
-
* `
|
|
571
|
-
* `blocks.memberships.options.roles.many` keeps,
|
|
572
|
-
* columns.
|
|
833
|
+
* A role junction read instead of the role column. `"many"` reads the
|
|
834
|
+
* `tables` entry for `membership_roles`, else `membership_roles` in the
|
|
835
|
+
* table's schema: the role set `blocks.memberships.options.roles.many` keeps,
|
|
836
|
+
* keyed by the tenant and user columns.
|
|
573
837
|
*/
|
|
574
838
|
readonly roles?: BlockRoleJunction | "many";
|
|
575
839
|
readonly query?: SqlQuery;
|
|
@@ -703,9 +967,10 @@ type ToolPolicy<C> = {
|
|
|
703
967
|
* The `authorize` and `visible` hooks of better-supabase's `createMcp`, for
|
|
704
968
|
* tools whose `meta` is a PermDock permission. A tool without a permission is
|
|
705
969
|
* hidden and refused. `authorize` grants only a `granted` decision: an
|
|
706
|
-
* approval-required call is refused, because `
|
|
707
|
-
* A
|
|
708
|
-
*
|
|
970
|
+
* approval-required call is refused, because `authorize` has no approval
|
|
971
|
+
* outcome. A tool whose `permission` goes through `authorizer` with a `store`
|
|
972
|
+
* returns the approval id and resumes it instead. A denial's text names the
|
|
973
|
+
* first denial reason. A throw anywhere refuses and reaches `onError`.
|
|
709
974
|
*/
|
|
710
975
|
export declare function toolPolicy<C>(options: ToolPolicyOptions<C>): ToolPolicy<C>;
|
|
711
976
|
//#endregion
|
|
@@ -915,4 +1180,36 @@ export declare function hookCan(permdock: PermDock, options?: HookCanOptions): N
|
|
|
915
1180
|
*/
|
|
916
1181
|
export declare function handlerCan(source: HandlerPermDockSource, options?: HandlerCanOptions): ProtectWebHandlerOptions["can"];
|
|
917
1182
|
//#endregion
|
|
918
|
-
|
|
1183
|
+
//#region src/better-supabase/workflow-resource.d.ts
|
|
1184
|
+
/**
|
|
1185
|
+
* better-supabase's `RecordRef`: the record a workflow run belongs to, a
|
|
1186
|
+
* subject type from `config.subjects` and its id. Structural, so the
|
|
1187
|
+
* better-supabase type satisfies it without an import.
|
|
1188
|
+
*/
|
|
1189
|
+
type WorkflowRecordRef = {
|
|
1190
|
+
readonly type: string;
|
|
1191
|
+
readonly id: string;
|
|
1192
|
+
};
|
|
1193
|
+
/** A subject type from `config.subjects` to the PermDock resource name it is. */
|
|
1194
|
+
type WorkflowSubjectTypes = Readonly<Record<string, string>>;
|
|
1195
|
+
type WorkflowResourceResult = {
|
|
1196
|
+
readonly ok: true;
|
|
1197
|
+
readonly resource: {
|
|
1198
|
+
readonly type: string;
|
|
1199
|
+
readonly id: string;
|
|
1200
|
+
};
|
|
1201
|
+
} | {
|
|
1202
|
+
readonly ok: false;
|
|
1203
|
+
readonly cause: "validation";
|
|
1204
|
+
readonly decision: DeniedDecision;
|
|
1205
|
+
};
|
|
1206
|
+
/**
|
|
1207
|
+
* The resource a `workflow.start` check decides on for a run started on
|
|
1208
|
+
* `subject`: `{ type, id }`, with the type `types` maps the subject type to. A
|
|
1209
|
+
* subject type `types` does not name, a missing or empty id, or an id over 256
|
|
1210
|
+
* characters is `{ ok: false, cause: 'validation' }` with the denial to
|
|
1211
|
+
* return.
|
|
1212
|
+
*/
|
|
1213
|
+
export declare function workflowResource(subject: unknown, types: WorkflowSubjectTypes): WorkflowResourceResult;
|
|
1214
|
+
//#endregion
|
|
1215
|
+
export type { AccessPolicyOptions, AccessReviewApplierOptions, AccessReviewApplyFailure, AccessReviewApplyResult, ApiKeySession, ApiKeySessionOptions, ApiKeyVerifierOptions, AuthorizationHooksOptions, AuthorizationProviderOptions, AuthorizerOperation, AuthorizerOptions, BetterSupabaseActiveTenant, BetterSupabaseErrorContext, BetterSupabaseIdentityLink, BetterSupabaseMembershipRow, BetterSupabaseOnError, BetterSupabaseSubjectOptions, BlockApprovalApprovers, BlockApprovalPoliciesClient, BlockApprovalPolicySourceOptions, BlockApprovalRecord, BlockApprovalStoreOptions, BlockApprovalTenantPolicy, BlockApprovalsClient, BlockDecide, BlockInstant, BlockMembershipSourceOptions, BlockRoleJunction, BlockRoleThrough, BucketAccess, CredentialGuardOptions, HandlerCanOptions, HandlerPermDockSource, HookCanOptions, McpToolDecision, McpToolRef, PendingSupportSession, PermDockFor, PermDockForInput, PermDockForOptions, PermDockForQuery, PermDockForResult, PrincipalFromMembershipsOptions, PrincipalSourceOptions, ProviderApprovers, RoleOrderOptions, ServiceRoles, SessionSnapshotLike, ShareLinkResolver, ShareLinkRow, ShareLinkSubjectOptions, ShareLinkTarget, SubscriberPolicyEvent, SubscriberPolicyOptions, SupabasePrincipal, SupportPolicyOptions, ToolPolicy, ToolPolicyOptions, TopicAccess, WorkflowRecordRef, WorkflowResourceResult, WorkflowSubjectTypes };
|