permdock 0.7.0 → 0.9.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/README.md +1 -3
- package/dist/a2a/index.d.ts +7 -7
- package/dist/a2a/index.js +8 -8
- package/dist/action-result-BcudBQOF.d.ts +19 -0
- package/dist/{adapter-context-CRhqyzCk.js → adapter-context-CIQpQxbE.js} +8 -2
- package/dist/{adoption-scan-D-feE7BE.js → adoption-scan-Ch07MdxN.js} +5 -5
- package/dist/agent/index.d.ts +2 -2
- package/dist/agent/index.js +1 -1
- package/dist/ai-sdk/index.d.ts +19 -13
- package/dist/ai-sdk/index.js +6 -6
- package/dist/{app-data-MuyzVqX8.js → app-data-UNNm07jV.js} +10 -7
- package/dist/{approval-header-CJACtHkv.js → approval-header-8QV6MU4H.js} +6 -3
- package/dist/{approval-prompt-K0faOLFp.d.ts → approval-prompt-3BqWczTt.d.ts} +13 -11
- package/dist/{approval-prompt-Dg5LeAcT.js → approval-prompt-B8hQY69x.js} +5 -6
- package/dist/approvals/index.d.ts +4 -4
- package/dist/approvals/index.js +6 -6
- package/dist/{approvals-CMRfsbBh.js → approvals-DnIBTuXE.js} +66 -42
- package/dist/{approvers-CqPOLD-o.js → approvers-B4r0N_Uz.js} +8 -2
- package/dist/{arazzo-ClrF3PVb.js → arazzo-BpS7LnV0.js} +2 -2
- package/dist/{arazzo-rdeJ8n1J.js → arazzo-CmQaGPkM.js} +6 -6
- package/dist/{args-CC3OwyHW.js → args-0FrVs5EH.js} +14 -7
- package/dist/astro/index.d.ts +30 -12
- package/dist/astro/index.js +2 -2
- package/dist/{audience-BrMs8c4o.js → audience-DTjR8xet.js} +8 -8
- package/dist/{auth-CscUX8Sy.js → auth--yPyZNgr.js} +19 -7
- package/dist/authzen/index.d.ts +34 -28
- package/dist/authzen/index.js +23 -20
- package/dist/{automation-DOtAFWdy.d.ts → automation-C6Jg75xq.d.ts} +42 -32
- package/dist/{automation-ySsxp_Yp.js → automation-x3KEUusw.js} +22 -21
- package/dist/better-auth/index.d.ts +2 -2
- package/dist/better-auth/index.js +13 -7
- package/dist/better-supabase/index.d.ts +357 -227
- package/dist/better-supabase/index.js +219 -140
- package/dist/{bind-D1nO6fiC.js → bind-BNQA9JK9.js} +26 -10
- package/dist/{bind-JDuvxjuW.d.ts → bind-YYjvfpB9.d.ts} +32 -12
- package/dist/{body-CH5of8Ne.js → body-CJQwYVa8.js} +3 -3
- package/dist/{body-text-QcXok_SI.js → body-text-DQhcmqdY.js} +8 -4
- package/dist/{boundary-BM8a_P6E.js → boundary-BV3O1eud.js} +8 -2
- package/dist/{boundary-BmHxVH1J.d.ts → boundary-C9ck-3uK.d.ts} +13 -4
- package/dist/{budget-NbEtbJC_.js → budget-BELja5A9.js} +6 -3
- package/dist/{budget-JqcRqyhK.d.ts → budget-hYsPz_yE.d.ts} +6 -3
- package/dist/{build-instance-DxE7czo9.js → build-instance-BWXqwQYU.js} +3 -3
- package/dist/{capability-L7NnfhiE.js → capability-BqX94r07.js} +31 -25
- package/dist/{capability-D4UC9TTW.d.ts → capability-Di9tiUvi.d.ts} +41 -29
- package/dist/{casbin-BHijLuHY.js → casbin-B7_yS-oo.js} +2 -2
- package/dist/{casbin-BW9pS47J.js → casbin-bHyIxTNQ.js} +16 -8
- package/dist/{casl-CmJlgziS.js → casl-C4OINZHI.js} +2 -2
- package/dist/{casl-UbI8v-Wq.js → casl-CHHoCldP.js} +19 -10
- package/dist/catalog/index.d.ts +51 -30
- package/dist/catalog/index.js +18 -15
- package/dist/{catalog-D69WhFii.js → catalog-CGlSwU6j.js} +20 -19
- package/dist/catalog-D3oS2GH3.js +1 -0
- package/dist/{catalog-BaMQfQ6Y.js → catalog-amPDr0JQ.js} +3 -3
- package/dist/{catalog-doc-CV9s6B1S.js → catalog-doc-DjMKzJp9.js} +28 -14
- package/dist/{catalog-fingerprint-C144oW4M.js → catalog-fingerprint-e6aCWosn.js} +18 -14
- package/dist/catalog-operations-DeHTrJSV.js +60 -0
- package/dist/{challenge-nGWma08S.js → challenge-DImNcR7B.js} +48 -27
- package/dist/chat/index.d.ts +1 -1
- package/dist/chat/index.js +13 -10
- package/dist/chat-sdk/index.d.ts +44 -26
- package/dist/chat-sdk/index.js +17 -17
- package/dist/{checks-BC_0mPIq.js → checks-CGkP3Z7A.js} +4 -1
- package/dist/{claims-map-7oQ3ue4X.js → claims-map-CKkoAAYF.js} +5 -2
- package/dist/{claims-map-Ca-QX8C6.d.ts → claims-map-D1Pb5oRq.d.ts} +8 -5
- package/dist/claude-agent/index.d.ts +6 -6
- package/dist/claude-agent/index.js +6 -3
- package/dist/clerk/index.d.ts +11 -7
- package/dist/clerk/index.js +6 -6
- package/dist/cli/bin.js +4 -4
- package/dist/cli/index.d.ts +82 -7
- package/dist/cli/index.js +6 -6
- package/dist/{clients-C7zLFuWT.d.ts → clients-C_NOET3z.d.ts} +5 -5
- package/dist/{clients-DjU5ABMy.js → clients-DYr3U86j.js} +3 -3
- package/dist/cloud/index.d.ts +84 -52
- package/dist/cloud/index.js +53 -39
- package/dist/{cloud-CO8pYtwr.js → cloud-3kWfjnYy.js} +4 -5
- package/dist/{codemod-BP6n8N9L.js → codemod-Bv5i-Mzo.js} +523 -201
- package/dist/{codemod-i4N2BhDc.js → codemod-D9Aiii1r.js} +3 -4
- package/dist/{collect-DNm3oKOk.js → collect-B80GYEot.js} +4 -5
- package/dist/collect-D-eroIfV.js +1 -0
- package/dist/{collect-BaWeMjwV.js → collect-WCl8cJQV.js} +26 -63
- package/dist/{compare-pfyVnBjE.js → compare-DTfyUunF.js} +2 -2
- package/dist/compile/index.d.ts +2 -2
- package/dist/compile/index.js +1 -1
- package/dist/{compile-COM2VKuN.d.ts → compile-BEklRUYo.d.ts} +36 -12
- package/dist/{compile-BAEO5bOk.js → compile-EzEMB-7v.js} +77 -33
- package/dist/{completion-BNdVf7X2.js → completion-_bc0OUQ-.js} +17 -8
- package/dist/config-BwPBfN0t.js +108 -0
- package/dist/{config-DGZzMV1B.js → config-D5XrLWpk.js} +2 -2
- package/dist/{config-report-Cm7UITNA.js → config-report-BmWIskD7.js} +9 -6
- package/dist/config-shape-ykV0Vm2n.js +134 -0
- package/dist/{connection-DjhIJSs2.js → connection-B72dg5Q2.js} +23 -22
- package/dist/{connector-schema-_VCSsdtD.js → connector-schema-CYLQNMYq.js} +3 -2
- package/dist/{context--uM9V3Ui.js → context-BnIzxTNE.js} +4 -3
- package/dist/convex/index.d.ts +13 -7
- package/dist/convex/index.js +9 -6
- package/dist/{core-CQkE8Esr.d.ts → core-CFepFiDP.d.ts} +49 -22
- package/dist/{core-B5-w6Kw9.js → core-DzVINFbU.js} +26 -20
- package/dist/{create-Cb86Z8Im.js → create-6EwRQlig.js} +10 -7
- package/dist/{create-DJrlhEp9.js → create-BLPKnJKa.js} +35 -25
- package/dist/{create-UTnUVETj.d.ts → create-BPUopdfL.d.ts} +70 -37
- package/dist/{create-QHuuPw3q.d.ts → create-BamXmeob.d.ts} +37 -29
- package/dist/{create-B2-CQqCI.d.ts → create-DBvUsgzK.d.ts} +49 -28
- package/dist/{credential-CIM7wHwA.js → credential-CyyyvCsL.js} +41 -38
- package/dist/{credentials-BpuTwd7a.js → credentials-CdDxp7jN.js} +6 -6
- package/dist/{deciding-columns-DRo2QM6E.js → deciding-columns-NB4wcyBf.js} +2 -2
- package/dist/{delegation-C5rOdTp5.js → delegation-CDB6_keF.js} +31 -22
- package/dist/delivery/index.d.ts +4 -4
- package/dist/delivery/index.js +5 -5
- package/dist/{delivery-rwOKLWRm.js → delivery-BupfvJIV.js} +34 -22
- package/dist/{delivery-event-xX4obB8F.js → delivery-event-JioK5YbS.js} +6 -6
- package/dist/denied-text-DHldhVUv.d.ts +22 -0
- package/dist/{describe-DZlnEtLy.js → describe-Bb4hGK5d.js} +5 -5
- package/dist/{describe-O0SwYIK8.d.ts → describe-BbFPBSms.d.ts} +5 -5
- package/dist/{device-BARQ8eYG.js → device-BwbJNmb2.js} +11 -8
- package/dist/{diff-Btr1c1Ow.js → diff-BwR1JdP2.js} +2 -2
- package/dist/{diff-DzT-xD13.js → diff-CQegtBAo.js} +22 -13
- package/dist/{digest-B3kc_PgQ.d.ts → digest-8Yx2CchM.d.ts} +3 -3
- package/dist/{doctor-BU1szn63.js → doctor-ClRVAtXQ.js} +287 -135
- package/dist/{doctor-BoK_y0KO.js → doctor-LPMYjSqO.js} +4 -4
- package/dist/drizzle/index.d.ts +33 -19
- package/dist/drizzle/index.js +17 -9
- package/dist/elysia/index.d.ts +17 -11
- package/dist/elysia/index.js +5 -5
- package/dist/{errors-BKy0EfhN.js → errors-B6R_lg2a.js} +13 -4
- package/dist/{errors-B_Qg9D3e.d.ts → errors-BIM4MFsJ.d.ts} +22 -6
- package/dist/{errors-BWXBMaKK.d.ts → errors-CHwoRRpB.d.ts} +4 -1
- package/dist/{errors-DpP_U6Bf.js → errors-Vpu6rKHl.js} +13 -10
- package/dist/{evaluate-B_oqFbWC.js → evaluate-BAmf_AQd.js} +153 -82
- package/dist/{evaluations-BCddEOfO.d.ts → evaluations-DOWuBpWv.d.ts} +11 -5
- package/dist/{evaluations-DReoiVBw.js → evaluations-IBceAeKT.js} +40 -19
- package/dist/eve/index.d.ts +9 -6
- package/dist/eve/index.js +4 -4
- package/dist/{event-time-CsegxXxB.js → event-time-BGy48400.js} +8 -4
- package/dist/{expiry-D4_YKRKD.js → expiry-6XByK0dm.js} +8 -5
- package/dist/express/index.d.ts +9 -6
- package/dist/express/index.js +9 -6
- package/dist/fastify/index.d.ts +16 -10
- package/dist/fastify/index.js +8 -5
- package/dist/{fetch-adapter-CuhyYwC1.d.ts → fetch-adapter-BIbBAtPZ.d.ts} +9 -6
- package/dist/{fetch-adapter-De-u6vhJ.js → fetch-adapter-dPTgJVHd.js} +14 -11
- package/dist/fields-D0vUI6dq.js +498 -0
- package/dist/{files-acUbNwWt.js → files-B3AA05f1.js} +8 -5
- package/dist/{files-D_JIzUrP.js → files-BSjrtIHw.js} +11 -4
- package/dist/{fixtures-BTMW6zgU.js → fixtures-A1_sp_tR.js} +15 -6
- package/dist/{flags-aaeRAdiD.js → flags-DXjoTVbS.js} +2 -2
- package/dist/{freeze-CrU8nQeX.js → freeze-jjan0lCv.js} +4 -1
- package/dist/{from-snapshot-Bz469dIh.js → from-snapshot-DCakWRsr.js} +18 -15
- package/dist/gen-BFfzZSLH.js +58 -0
- package/dist/gen-BtfFWGbz.js +827 -0
- package/dist/{generate-3FNO5P5Q.js → generate-CRVV5V7l.js} +14 -8
- package/dist/generate-CezbCaTI.js +275 -0
- package/dist/{grantee-BrRANrpT.js → grantee-Dke-9rd1.js} +4 -4
- package/dist/{grantee-conditions-C6P1Tvol.js → grantee-conditions-BrYPe-w0.js} +12 -12
- package/dist/{grantee-match-0RtHWQDx.js → grantee-match-7RZZvoT_.js} +12 -6
- package/dist/{graph-sql-B-dsAT6j.d.ts → graph-sql-BwFC4Qjs.d.ts} +3 -3
- package/dist/h3/index.d.ts +10 -7
- package/dist/h3/index.js +3 -3
- package/dist/headers-B9jQxjtW.d.ts +10 -0
- package/dist/{helpers-DY3vXuGs.js → helpers-DJicaG6f.js} +40 -28
- package/dist/hono/index.d.ts +16 -10
- package/dist/hono/index.js +5 -5
- package/dist/{hosted-XBgU6RGT.js → hosted-D0IzESu_.js} +42 -21
- package/dist/{hosted-BmjzxQhp.d.ts → hosted-DVxlLZMe.d.ts} +33 -21
- package/dist/{http-ujKm0JXE.js → http-DH94eh6f.js} +4 -4
- package/dist/{http-BBoKefeS.js → http-DKLXrFGk.js} +13 -7
- package/dist/{http-Ca3Sr5x1.js → http-DOL33cO0.js} +11 -8
- package/dist/{import-DB2EG_iy.js → import-ACkOrv6g.js} +6 -6
- package/dist/{import-Bz0GefWg.js → import-CST57XLp.js} +64 -51
- package/dist/{index-CMiPH2Tv.d.ts → index-BinlXeU-.d.ts} +64 -37
- package/dist/{index-BSfRl0hZ.d.ts → index-CV-7DWeD.d.ts} +64 -52
- package/dist/{index-BE8y3moU.d.ts → index-DJwEgYzA.d.ts} +127 -82
- package/dist/{index-DH9DUDEM.d.ts → index-Dj2qF9VC.d.ts} +54 -30
- package/dist/{index-BTkwrK7v.d.ts → index-vYjMrXyK.d.ts} +336 -173
- package/dist/{index-DLwcuCN_.d.ts → index-ymept53A.d.ts} +51 -30
- package/dist/index.d.ts +22 -22
- package/dist/index.js +34 -34
- package/dist/{init-B-4t1NzC.js → init-BjuFDYT1.js} +10 -10
- package/dist/{init-5TXNji88.js → init-txYTuW9u.js} +5 -5
- package/dist/{instance-options-CU0YQCLH.d.ts → instance-options-CoHn-0e8.d.ts} +4 -4
- package/dist/{instance-snapshot-CjcwnEiV.js → instance-snapshot-DuWf1cT3.js} +86 -61
- package/dist/{instant-BluqDvyS.js → instant-DK3Iz83e.js} +2 -2
- package/dist/{internals-Dk8A8fX3.js → internals-B3IgHrvo.js} +6 -3
- package/dist/{json-schema-B-vAwlde.js → json-schema-BPGa-RjQ.js} +9 -3
- package/dist/{json-schema-CN_iLFH2.d.ts → json-schema-BfXgnRNT.d.ts} +4 -4
- package/dist/jwt/index.d.ts +57 -27
- package/dist/jwt/index.js +24 -21
- package/dist/{kernel-DVExUwkp.js → kernel-qv4cr9w8.js} +32 -23
- package/dist/kysely/index.d.ts +49 -33
- package/dist/kysely/index.js +9 -7
- package/dist/{live-options-BaAFCIiu.js → live-options-BBIT68le.js} +2 -2
- package/dist/{load-DxroEzH1.js → load-DjSU5KXO.js} +6 -6
- package/dist/load-Dm0pSYH3.js +1 -0
- package/dist/{login-ClSJh5t5.js → login-CfImTJGb.js} +4 -4
- package/dist/{login-WC9HPJpU.js → login-CgfCTO3F.js} +16 -9
- package/dist/{manifest-Dv6q4i5s.js → manifest-B2QPh19C.js} +49 -38
- package/dist/{manifest-BVhExYhw.d.ts → manifest-CzzWtnAb.d.ts} +126 -31
- package/dist/{manifest-schema-Cv492Qev.js → manifest-schema-2r37XRhD.js} +44 -3
- package/dist/{manifest-B79YuF2T.js → manifest-wg8WkkpD.js} +6 -6
- package/dist/{map-claims-etGIS_Dv.js → map-claims-C-nv08_n.js} +16 -9
- package/dist/{map-error-BQGyDm_M.js → map-error-pasIGqMT.js} +7 -7
- package/dist/{markers-C6joDI3o.js → markers-BeHZ4x9Q.js} +20 -5
- package/dist/mcp/index.d.ts +114 -61
- package/dist/mcp/index.js +70 -40
- package/dist/{migrate-Dodel0IJ.js → migrate-B7oP_sQU.js} +35 -17
- package/dist/module-values-BJTBdo6y.js +107 -0
- package/dist/nest/index.d.ts +23 -13
- package/dist/nest/index.js +18 -11
- package/dist/next/client.d.ts +5 -2
- package/dist/next/client.js +1 -1
- package/dist/next/index.d.ts +79 -26
- package/dist/next/index.js +121 -10
- package/dist/next/plugin.d.ts +1 -1
- package/dist/next/plugin.js +4 -3
- package/dist/node/index.d.ts +5 -5
- package/dist/node/index.js +3 -3
- package/dist/{ocsf-BFp-PZZA.js → ocsf-TcjRBgIs.js} +15 -5
- package/dist/openai/index.d.ts +13 -7
- package/dist/openai/index.js +3 -3
- package/dist/openapi/index.d.ts +51 -30
- package/dist/openapi/index.js +2 -2
- package/dist/{openapi-ztVaux6j.js → openapi-BGeuunWC.js} +23 -14
- package/dist/{openapi-DMocl1bh.js → openapi-BIpw3Mb7.js} +4 -5
- package/dist/{openapi-Ddb4628T.js → openapi-BOsx0xn9.js} +33 -18
- package/dist/{operation-findings-kRcEp8lE.js → operation-findings-CXtFzlKJ.js} +3 -3
- package/dist/{operations-BNLes61x.d.ts → operations-Ci_rT6Uo.d.ts} +10 -7
- package/dist/orpc/index.d.ts +68 -14
- package/dist/orpc/index.js +62 -13
- package/dist/otel/index.d.ts +7 -4
- package/dist/otel/index.js +8 -5
- package/dist/{output-DgSDLrta.js → output-DV5dwOTs.js} +9 -5
- package/dist/output-files-BHOIlrfD.js +1 -0
- package/dist/{output-files-CCMdcFWb.js → output-files-BIQ_9pIs.js} +29 -17
- package/dist/ownership-DA5YdYTm.js +1059 -0
- package/dist/{parse-Ddhz2xf4.js → parse-1_ZheTW5.js} +16 -13
- package/dist/parse-local-manifest-CCmbhnxP.d.ts +10 -0
- package/dist/{parse-local-manifest-T1Q8X3A2.js → parse-local-manifest-DEiCF4ah.js} +19 -7
- package/dist/{parse-request-D_tUXG6M.js → parse-request-CwCZpyjV.js} +7 -8
- package/dist/{paths-DXSHAMIa.js → paths-CUvURzHp.js} +4 -1
- package/dist/pdp/index.d.ts +9 -6
- package/dist/pdp/index.js +20 -13
- package/dist/{peer-DOzzMfZL.js → peer-C9LvBCcb.js} +1 -1
- package/dist/{peer-12Q5I_RH.js → peer-Q0fuZ6hx.js} +9 -3
- package/dist/{permdock-BfWEeMqk.js → permdock-BvjivVb9.js} +200 -140
- package/dist/{permdock-Dco6dyCK.d.ts → permdock-CprAPN3w.d.ts} +260 -129
- package/dist/{permission-registry-DpPtSKNZ.js → permission-registry-B8tYxPIt.js} +23 -10
- package/dist/{permission-types-DhNEmoRG.d.ts → permission-types-CAY-GU7e.d.ts} +127 -41
- package/dist/{permissions-CoqCOfJ3.d.ts → permissions-Bx6UI8n1.d.ts} +6 -3
- package/dist/{permissions-CyH2MV_B.js → permissions-CVXmRILq.js} +3 -3
- package/dist/{permissions-DArULThq.js → permissions-CYcHj_w7.js} +8 -5
- package/dist/pg-DQTqRrou.js +60 -0
- package/dist/{pins-8ILTftC9.js → pins-nqarl3oE.js} +4 -1
- package/dist/{pkce-5h8NgMQJ.js → pkce-CnmmYqUZ.js} +1 -1
- package/dist/{policy-B7dg_yzu.d.ts → policy-BycVKnXv.d.ts} +5 -5
- package/dist/{policy-DaJy4nK4.js → policy-CLQ8__GF.js} +43 -23
- package/dist/{policy-from-catalog-DFWYkNdu.js → policy-from-catalog-CU3An8uP.js} +28 -25
- package/dist/{policy-module-CTlwMvLI.js → policy-module-xym9fnSq.js} +12 -6
- package/dist/{policy-types-B-F-qAZk.d.ts → policy-types-DGIO_gxq.d.ts} +782 -357
- package/dist/{postgres-store-BL9M_CA1.js → postgres-store-DcyrPS-r.js} +43 -16
- package/dist/{postgrest-r5faDIzD.js → postgrest-5Dr3W64L.js} +84 -86
- package/dist/{postgrest-CYacM_u7.d.ts → postgrest-D5nUGm-c.d.ts} +55 -35
- package/dist/powersync-B701tvhE.js +1 -0
- package/dist/{powersync-13odBwiM.js → powersync-Bg8u-JcR.js} +3 -3
- package/dist/{powersync-53ryOZip.js → powersync-CJrT1DSc.js} +127 -69
- package/dist/preset/index.d.ts +38 -28
- package/dist/preset/index.js +1 -1
- package/dist/{preset-CHTbd-DQ.js → preset-BjLzeFpp.js} +56 -32
- package/dist/{principal-source-pHneukrx.js → principal-source-C6N60GtM.js} +10 -10
- package/dist/prisma/index.d.ts +69 -41
- package/dist/prisma/index.js +21 -17
- package/dist/{problem-CTviyH5L.js → problem-BVLHFK33.js} +41 -21
- package/dist/{problem-details-cn5X30gZ.js → problem-details-CLDgX1KV.js} +13 -4
- package/dist/{problem-types-CJ2325SZ.js → problem-types-DSsRfONQ.js} +4 -1
- package/dist/{prompt-DwtVemER.js → prompt-BYc6drYW.js} +4 -1
- package/dist/protected-action-D8x73IGm.d.ts +58 -0
- package/dist/protected-action-DUYqb-Ma.js +80 -0
- package/dist/{protected-DXE3cQYg.js → protected-action-QEA8arRB.js} +48 -14
- package/dist/{provider-BQsTYYy0.js → provider-C55OGXJ7.js} +5 -4
- package/dist/{provider-Csk-THAn.d.ts → provider-DfLeek9O.d.ts} +1 -1
- package/dist/{provider-store-IgqQipCO.js → provider-store-CaTv00tr.js} +13 -9
- package/dist/{pull-CN5OLxrF.js → pull-2nJr0qg_.js} +12 -11
- package/dist/pull-C3EEGzSw.js +1 -0
- package/dist/{push-tVdG8dUL.js → push-Bn-lMEmI.js} +19 -13
- package/dist/{pushed-policy-CmYeSQqq.js → pushed-policy-CDuOL2de.js} +10 -7
- package/dist/{pushed-policy-BbcY9r_4.d.ts → pushed-policy-CryQheKq.d.ts} +12 -6
- package/dist/react/index.d.ts +9 -8
- package/dist/react/index.js +7 -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 +94 -55
- package/dist/react-native/index.js +200 -61
- package/dist/{refs-CNJBiTFo.js → refs-C8BKxc_e.js} +2 -2
- package/dist/{relation-walk-3OyDBF0S.js → relation-walk-DK_gkgL7.js} +12 -9
- package/dist/{relations-BnCWnJGI.js → relations-BxvRvDHK.js} +3 -3
- package/dist/{replay-Du1tJjG7.js → replay-BU09ad4L.js} +1 -1
- package/dist/{replay-DCDD_ZfL.d.ts → replay-Bs9Df2fQ.d.ts} +1 -1
- package/dist/{request-context-BykKLmyE.js → request-context-Duzdf0cd.js} +8 -8
- package/dist/{request-schema-CMreVuFM.js → request-schema-DhX7UbfQ.js} +4 -1
- package/dist/resend/index.d.ts +34 -28
- package/dist/resend/index.js +29 -29
- package/dist/resolve-names-ConCSj1y.js +201 -0
- package/dist/{resource-relations-D_jw0BFx.js → resource-relations-8-pCScBO.js} +18 -9
- package/dist/{retire-Wj6dkyDE.js → retire-B2xffQgY.js} +15 -6
- package/dist/{revocations-R07lFBnX.d.ts → revocations-BaUXHM1N.d.ts} +6 -3
- package/dist/{rls-Ck_PocSp.js → rls-Ba9wN0SP.js} +13 -6
- package/dist/{rls-CxBZb4rZ.js → rls-Cx0dtsB7.js} +310 -128
- package/dist/{role-builder-C1VJzvcr.js → role-builder-BK2-T6oD.js} +41 -20
- package/dist/{row-conditions-h2HythXQ.js → row-conditions-BAGHOmVq.js} +4 -3
- package/dist/{rpc-Bk1bE-ch.js → rpc-vHIwyXCp.js} +8 -5
- package/dist/run-Ck22anC2.js +1 -0
- package/dist/{run-uLD2aWuO.js → run-PbRlXTfh.js} +26 -23
- package/dist/{run-ticket-BpNi7BCi.d.ts → run-ticket-B2o2Kxz8.d.ts} +29 -14
- package/dist/{run-ticket-B5d_63Ma.js → run-ticket-Dv7aF7Dk.js} +9 -9
- package/dist/{runtime-Vif3_-zf.js → runtime-BGnrOkVH.js} +5 -2
- package/dist/{saas-Az_Kz-4D.js → saas-DK4V-3Is.js} +42 -29
- package/dist/{scan-DSljDE1Y.js → scan-CRTj6fke.js} +1 -1
- package/dist/{schema-B4v0Qrac.js → schema-BOJjqlWL.js} +3 -2
- package/dist/{schema-gIcCx7zM.js → schema-BTsE1WRT.js} +8 -4
- package/dist/scim/index.d.ts +2 -2
- package/dist/scim/index.js +2 -2
- package/dist/{scim-C7JYhySg.js → scim-D8YupzX1.js} +2 -2
- package/dist/{scim-YNieBO1U.js → scim-jJBJ7g1Z.js} +33 -15
- package/dist/{scopes-BHsc-wp-.js → scopes-0Up_UA2t.js} +41 -23
- package/dist/server/index.d.ts +11 -11
- package/dist/server/index.js +12 -12
- package/dist/{server-Bnga6I50.js → server-3cVlTLde.js} +31 -31
- package/dist/{server-types-C4gZUEZy.d.ts → server-types-CyRN0-Cd.d.ts} +88 -46
- package/dist/{sha256-D9ihqmvd.js → sha256-C-4WXKIu.js} +4 -3
- package/dist/{shared-fMKOv8hP.js → shared-Afctg7B0.js} +65 -32
- package/dist/{shared-C8LjUdVU.js → shared-l0oGGetg.js} +9 -6
- package/dist/{signals-D3NcTKUS.js → signals-B1vHR3fN.js} +2 -2
- package/dist/{sink-Cp_Eot9W.d.ts → sink-B5zoUW_O.d.ts} +44 -20
- package/dist/{sink-BEZSlMS_.js → sink-D9_vh372.js} +32 -21
- package/dist/{skills-g_3BS9NC.js → skills-C9uKfSF5.js} +3 -3
- package/dist/{skills-Dcjw9_1C.js → skills-CQQcuGBi.js} +12 -8
- package/dist/{snapshot-CbGmYiJx.js → snapshot-CXlzi69u.js} +21 -18
- package/dist/{snapshot-cache-Pahd3IYJ.d.ts → snapshot-cache-BjAWkchD.d.ts} +21 -12
- package/dist/{snapshot-cache-DT2Kx1F8.js → snapshot-cache-Bx_4xC_6.js} +14 -11
- package/dist/solid/index.d.ts +55 -16
- package/dist/solid/index.js +46 -12
- package/dist/solid-start/index.d.ts +30 -12
- package/dist/solid-start/index.js +3 -3
- package/dist/{sources-B-zYB4GS.js → sources-CMAM-2A3.js} +46 -27
- package/dist/{sources-DEEuGb8S.d.ts → sources-CWG32C0G.d.ts} +126 -53
- package/dist/{sql-B96movIM.js → sql-0WjxIp9g.js} +28 -7
- package/dist/{sql-CDEPCA0g.d.ts → sql-B80DFdpG.d.ts} +2 -2
- package/dist/{src-DLFrtrrC.js → src-C_pi2Rnh.js} +292 -101
- package/dist/ssf/index.d.ts +3 -3
- package/dist/ssf/index.js +47 -35
- package/dist/{standard-webhooks-DgFFD-Ga.js → standard-webhooks-D67a3nzk.js} +5 -5
- package/dist/{standard-webhooks-B_qRg0ws.d.ts → standard-webhooks-DOYEuOLx.d.ts} +7 -7
- package/dist/{store-DSP9oGvh.js → store-RNFvaJJv.js} +32 -26
- package/dist/{store-options-B_poyYvg.js → store-options-Dil3lraY.js} +105 -15
- package/dist/stores-DZJvxFIZ.d.ts +59 -0
- package/dist/{stores-BqEuHC05.js → stores-DxZWDXCs.js} +42 -5
- package/dist/{stream-2Vwhl7Er.d.ts → stream-9y9qw51m.d.ts} +4 -3
- package/dist/{stream-CvdUS9V1.js → stream-CDvF0sJm.js} +5 -5
- package/dist/{style-Ds1gNm77.js → style-DblOtSga.js} +1 -1
- package/dist/{style-Cqo7-73x.js → style-Ds11Hmk4.js} +2 -1
- package/dist/{subject-settings-CkEwrw3W.js → subject-settings-8sH5HlII.js} +8 -4
- package/dist/{row-check-Dt35czLy.d.ts → subject-settings-vNW8qmUH.d.ts} +30 -18
- package/dist/supabase/index.d.ts +48 -38
- package/dist/supabase/index.js +5 -5
- package/dist/supabase/middleware.d.ts +19 -13
- package/dist/supabase/middleware.js +7 -7
- package/dist/{supabase--0aJdLEd.js → supabase-DnMMg5Fn.js} +79 -35
- package/dist/{supabase-Bqp7iIY2.js → supabase-SBs3MYUE.js} +3 -3
- package/dist/supabase-hook-C0FyEACZ.js +1 -0
- package/dist/{supabase-hook-Dg0SrQWR.js → supabase-hook-CrgU06WH.js} +175 -196
- package/dist/{supautils-MESd81bF.js → supautils-ByezN3b8.js} +385 -219
- package/dist/{support-session-Cna49-3f.js → support-session-BsmPCbz8.js} +21 -21
- package/dist/svelte/PermissionBoundary.svelte +2 -6
- package/dist/svelte/Protected.svelte +2 -8
- package/dist/svelte/index.d.ts +9 -8
- package/dist/svelte/index.js +10 -9
- package/dist/svelte/runtime.d.ts +4 -4
- package/dist/svelte/runtime.js +4 -4
- package/dist/svelte/source.d.ts +9 -8
- package/dist/svelte/source.js +6 -5
- package/dist/sveltekit/index.d.ts +30 -12
- package/dist/sveltekit/index.js +2 -2
- package/dist/{ownership-Z2LpxsGa.js → tables-BqrxBCir.js} +641 -1104
- package/dist/tanstack-start/index.d.ts +22 -10
- package/dist/tanstack-start/index.js +2 -2
- package/dist/{target-Bw37TFNA.js → target-qdEAnnhU.js} +6 -6
- package/dist/{tenancy-CmeBQ6Nv.js → tenancy-5d1zVBvK.js} +25 -19
- package/dist/terminal/index.d.ts +23 -14
- package/dist/terminal/index.js +17 -20
- package/dist/testing/core.d.ts +1 -1
- package/dist/testing/core.js +1 -1
- package/dist/testing/fixtures/index.d.ts +8 -5
- package/dist/testing/fixtures/index.js +78 -17
- package/dist/testing/index.d.ts +225 -141
- package/dist/testing/index.js +352 -234
- package/dist/testing/saas/index.d.ts +43 -27
- package/dist/testing/saas/index.js +2 -2
- package/dist/testing/saas/permissions.d.ts +1 -1
- package/dist/testing/saas/permissions.js +1 -1
- package/dist/{text-diff-DhITNCnD.js → text-diff-BtfSmdUo.js} +2 -2
- package/dist/{thenable-yD7SabqG.js → thenable-BNSM1U2R.js} +12 -3
- package/dist/{time-DkWjdL98.js → time-nR1JesoH.js} +32 -8
- package/dist/{token-2qYDvXz2.js → token-DC9EQiet.js} +14 -12
- package/dist/{tool-refusal-reAhIzdl.js → tool-refusal-Qpjs_W6M.js} +5 -2
- package/dist/trpc/index.d.ts +11 -8
- package/dist/trpc/index.js +15 -9
- package/dist/type-helpers-c7Xo_2Cu.d.ts +50 -0
- package/dist/{types-CfiKC5aN.d.ts → types-B2efzoSX.d.ts} +14 -11
- package/dist/{types-CIeZcG8v.d.ts → types-B6ExllNo.d.ts} +2 -2
- package/dist/{types-DBHftjgS.d.ts → types-BB-zWDcR.d.ts} +45 -33
- package/dist/{types-BfVmNJO5.d.ts → types-BMVDHvI0.d.ts} +128 -50
- package/dist/{types-DXmwu78Z.d.ts → types-CEinc15V.d.ts} +31 -14
- package/dist/{types-g7Oy6Zg4.d.ts → types-CN0LsqbK.d.ts} +47 -24
- package/dist/{types-CeIscIKp.d.ts → types-CWBsAwqn.d.ts} +23 -12
- package/dist/{types-DqzsnlSA.js → types-CcUXciSj.js} +17 -5
- package/dist/{types-BWZybqs9.d.ts → types-CzOeVvcC.d.ts} +384 -203
- package/dist/{types-DC44-hqb.d.ts → types-DLvhVm1r.d.ts} +59 -32
- package/dist/{types-D3A19w4A.d.ts → types-DlelvQk4.d.ts} +22 -13
- package/dist/{types-cTos-H7p.d.ts → types-DsHGPtkR.d.ts} +68 -32
- package/dist/{types-BXMYB7BY.d.ts → types-ZzRGoViD.d.ts} +77 -24
- package/dist/{types-CQVEQawv.d.ts → types-rCRV4Ge-.d.ts} +24 -14
- package/dist/types-tQB2CEnY.d.ts +262 -0
- package/dist/unplugin/index.d.ts +1 -1
- package/dist/unplugin/index.js +2 -2
- package/dist/usage-0hjZPIRX.js +1 -0
- package/dist/{usage-Bybmck7f.js → usage-B9EtHWLa.js} +50 -26
- package/dist/{usage-CDaLXCfL.js → usage-CBzgwfIs.js} +2 -2
- package/dist/{validation-error-ZfUHbKvf.js → validation-error-CYg2kJEw.js} +4 -1
- package/dist/{validation-error-CQpoquwj.d.ts → validation-error-uvp-kyfO.d.ts} +5 -2
- package/dist/{validity-CZ7-y0Cj.js → validity-Buc7w8E9.js} +13 -10
- package/dist/{verifier-DHuh-okk.js → verifier-DUV6pLqZ.js} +10 -4
- package/dist/{verify-pe8rL_Qw.js → verify-DlUcTDBz.js} +148 -487
- package/dist/version-DMQ0dnN5.js +48 -0
- package/dist/version-DizhmD72.js +1 -0
- package/dist/{views-BB8E9dTP.js → views-CD8wuL4Z.js} +19 -6
- package/dist/{vocabulary-Bg3eeT2H.d.ts → vocabulary-DEJ5j4mR.d.ts} +7 -4
- package/dist/vue/index.d.ts +71 -22
- package/dist/vue/index.js +50 -13
- package/dist/{waiter-DwEyouan.d.ts → waiter-CqUKX6CY.d.ts} +13 -10
- package/dist/{waiter-BGUtGYoU.js → waiter-aBLM63_f.js} +1 -1
- package/dist/{watch-C-4VmFlL.js → watch-BFDKqmUa.js} +8 -8
- package/dist/watch-ClLuO2TL.js +1 -0
- package/dist/webmcp/index.d.ts +11 -11
- package/dist/webmcp/index.js +8 -5
- package/dist/{where-scope-wq2coopv.js → where-scope-DlCdCM_8.js} +24 -18
- package/dist/{who-can-BwNsI_Js.js → who-can-BoDJm0Nc.js} +23 -20
- package/dist/workflow/index.d.ts +3 -3
- package/dist/workflow/index.js +13 -13
- package/dist/workflow-sdk/index.d.ts +19 -13
- package/dist/workflow-sdk/index.js +6 -6
- package/dist/{wrap-CiSc_KCq.js → wrap-B2wziJI_.js} +4 -4
- package/dist/{wrap-B6R0cMRL.d.ts → wrap-DxXB54Wu.d.ts} +8 -5
- package/package.json +8 -8
- package/schemas/catalog-v1.json +3 -0
- package/schemas/supabase-manifest-v1.json +33 -1
- package/skills/permdock-credentials/references/tokens-keys-links.md +8 -6
- package/skills/permdock-data/references/queries-and-rls.md +2 -1
- package/skills/permdock-tenancy/references/ownership-and-custom-roles.md +2 -2
- package/skills/permdock-wire/references/adapters.md +16 -23
- package/dist/catalog-BCCjSAdH.js +0 -1
- package/dist/collect-k_Dulxr5.js +0 -1
- package/dist/config-CoQHDrDi.js +0 -166
- package/dist/denied-text-D4qkEtFz.d.ts +0 -19
- package/dist/fields-ClcQLrVc.js +0 -238
- package/dist/generate-CNU1pIOo.js +0 -171
- package/dist/headers-BIjfMaoC.js +0 -8
- package/dist/headers-CIbDTUTK.d.ts +0 -7
- package/dist/load-DrMHXzgN.js +0 -1
- package/dist/output-files-DPAY7-GX.js +0 -1
- package/dist/package-root-Dk_ETdkp.js +0 -31
- package/dist/parse-local-manifest-e4mdwAKd.d.ts +0 -10
- package/dist/policies-B2lZIurj.js +0 -295
- package/dist/powersync-CExtTLyA.js +0 -1
- package/dist/problem-details-Tcfmj3bV.d.ts +0 -7
- package/dist/protected-BwZYL1X_.d.ts +0 -39
- package/dist/pull-Cty6Ovyu.js +0 -1
- package/dist/run-Bz7DXGEv.js +0 -1
- package/dist/stores-BAZwSYZA.d.ts +0 -31
- package/dist/supabase-hook-DJxC4PoP.js +0 -1
- package/dist/types-CKV71kKh.d.ts +0 -172
- package/dist/usage-y-kBNdqs.js +0 -1
- package/dist/version-CEbQ5UeM.js +0 -18
- package/dist/version-DXkYUISx.js +0 -1
- package/dist/watch-Bd9mx3rd.js +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { E as ResourceXTree, S as ResourceParent, T as ResourceRestricted, b as ResourceNode, d as PermissionKind, f as PermissionTree, g as ResourceInit, m as PermissionsOptions, n as ActionMeta, p as PermissionsOf, t as ActionList, u as Permission, w as ResourceRelationInput, x as ResourceOptions, y as ResourceMeta } from "./permission-types-
|
|
3
|
-
import { a as RoleTree, r as Role } from "./vocabulary-
|
|
4
|
-
import { a as PermDock, o as PermDockOptions } from "./permdock-
|
|
5
|
-
import { o as PolicyDocument } from "./hosted-
|
|
6
|
-
import { m as ApprovalStore } from "./types-
|
|
7
|
-
import { t as InstanceOptions } from "./instance-options-
|
|
8
|
-
import { n as PermDockWrap } from "./wrap-
|
|
9
|
-
import { t as JsonSchemaNode } from "./json-schema-
|
|
10
|
-
import { i as CatalogEventData, s as CloudEvent } from "./sink-
|
|
1
|
+
import { Ar as SqlFunctionCondition, C as MembershipFixture, D as PolicyDelegation, G as CustomRoleSource, I as SeparationConflict, Kn as DenialReason, N as RoleBinding, P as RoleOptions, R as SupportAccessOptions, T as Policy, Tr as OpaqueCondition, Un as Decision, Ut as InstanceHandle, V as VocabularyFromInput, Wn as Denial, Wt as Instant, Y as EntitlementSource, Yt as LocalSnapshotManifest, Z as JwtClaims, Zt as Snapshot, _n as PolicyScopesInput, c as BreakGlassOptions, cn as DeliveryEvent, ct as SnapshotSource, fr as Membership, ft as TenantSettings, g as GrantCondition, h as Grant, hr as Subject, i as ApprovalOption, it as RelationGroup, j as PolicyVocabulary, k as PolicyOptions, kr as SqlFunctionArg, lr as Delegation, mt as TokenSigner, nn as AccessEvent, nt as MembershipSource, on as DecisionEvent, ot as RelationSource, pn as SinkEvent, pr as Principal, s as AssuranceRequirement, sr as CustomRole, st as SettingsSource, vn as Scope, xr as ConditionRef, yt as VersionQuery } from "./policy-types-DGIO_gxq.js";
|
|
2
|
+
import { E as ResourceXTree, S as ResourceParent, T as ResourceRestricted, b as ResourceNode, d as PermissionKind, f as PermissionTree, g as ResourceInit, m as PermissionsOptions, n as ActionMeta, p as PermissionsOf, t as ActionList, u as Permission, w as ResourceRelationInput, x as ResourceOptions, y as ResourceMeta } from "./permission-types-CAY-GU7e.js";
|
|
3
|
+
import { a as RoleTree, r as Role } from "./vocabulary-DEJ5j4mR.js";
|
|
4
|
+
import { a as PermDock, o as PermDockOptions } from "./permdock-CprAPN3w.js";
|
|
5
|
+
import { o as PolicyDocument } from "./hosted-DVxlLZMe.js";
|
|
6
|
+
import { m as ApprovalStore } from "./types-DLvhVm1r.js";
|
|
7
|
+
import { t as InstanceOptions } from "./instance-options-CoHn-0e8.js";
|
|
8
|
+
import { n as PermDockWrap } from "./wrap-DxXB54Wu.js";
|
|
9
|
+
import { t as JsonSchemaNode } from "./json-schema-BfXgnRNT.js";
|
|
10
|
+
import { i as CatalogEventData, s as CloudEvent } from "./sink-B5zoUW_O.js";
|
|
11
11
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
12
12
|
//#region src/conditions/refs.d.ts
|
|
13
13
|
type KnownRefField = "id" | "issuer" | "kind" | "tenant" | "team" | "roles" | "plans" | "memberships" | "assurance" | "binding" | "session" | "claims";
|
|
@@ -25,7 +25,10 @@ declare function claim(path: string): SubjectRef;
|
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region src/core/custom-roles.d.ts
|
|
27
27
|
type CustomRoleDropReason = "unknown-permission" | "outside-ceiling" | "condition-not-allowed" | "unknown-level";
|
|
28
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Why part of a custom role was left out: a permission, or an undeclared
|
|
30
|
+
* include.
|
|
31
|
+
*/
|
|
29
32
|
type CustomRoleDrop = {
|
|
30
33
|
readonly permission: string;
|
|
31
34
|
readonly reason: CustomRoleDropReason;
|
|
@@ -44,10 +47,16 @@ type CustomRoleRename = {
|
|
|
44
47
|
readonly to: string;
|
|
45
48
|
};
|
|
46
49
|
type ResolvedCustomRole = {
|
|
47
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* Declared grants re-targeted to the custom role; conditions and approvals
|
|
52
|
+
* kept.
|
|
53
|
+
*/
|
|
48
54
|
readonly grants: readonly Grant[];
|
|
49
55
|
readonly dropped: readonly CustomRoleDrop[];
|
|
50
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* Grants stored under a former key (`definePermissions` `renamed`), resolved
|
|
58
|
+
* to the current one.
|
|
59
|
+
*/
|
|
51
60
|
readonly renamed: readonly CustomRoleRename[];
|
|
52
61
|
};
|
|
53
62
|
type CustomRoleValidation = {
|
|
@@ -68,7 +77,10 @@ type CustomRoleValidation = {
|
|
|
68
77
|
*/
|
|
69
78
|
declare function resolveCustomRole(policy: Policy, role: CustomRole): ResolvedCustomRole;
|
|
70
79
|
type ValidateCustomRoleOptions = {
|
|
71
|
-
/**
|
|
80
|
+
/**
|
|
81
|
+
* The shared custom roles: a tenant role with one of their names is dropped
|
|
82
|
+
* as `name-taken`.
|
|
83
|
+
*/
|
|
72
84
|
readonly shared?: readonly CustomRole[];
|
|
73
85
|
};
|
|
74
86
|
declare function validateCustomRole(policy: Policy, role: CustomRole, options?: ValidateCustomRoleOptions): CustomRoleValidation;
|
|
@@ -91,10 +103,10 @@ declare function parseCustomRoleEntry(policy: Policy, entry: string, options?: {
|
|
|
91
103
|
readonly scope?: string;
|
|
92
104
|
}): CustomRoleEntry;
|
|
93
105
|
/**
|
|
94
|
-
* The compact JWT form of custom roles for the `memberships[].grants` claim
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
106
|
+
* The compact JWT form of custom roles for the `memberships[].grants` claim RLS
|
|
107
|
+
* reads in `jwt` mode: role name to entries, where `key` allows, `-key` denies
|
|
108
|
+
* and `@role` includes. Put a team custom role on its team membership. Pass
|
|
109
|
+
* `policy` to write keys stored under a former name as the current key.
|
|
98
110
|
*/
|
|
99
111
|
declare function customRoleClaim(roles: readonly CustomRole[], policy?: Policy): Readonly<Record<string, readonly string[]>>;
|
|
100
112
|
//#endregion
|
|
@@ -112,18 +124,21 @@ declare function emptySnapshot(): Snapshot;
|
|
|
112
124
|
declare function requiresApproval(approval: Grant["approval"] | undefined): boolean;
|
|
113
125
|
//#endregion
|
|
114
126
|
//#region src/core/policy.d.ts
|
|
115
|
-
declare function definePolicy<TUser, TPrincipal extends Principal, const Input extends PermissionTree | PolicyVocabulary, const S extends PolicyScopesInput = PolicyScopesInput>(permissions: Input, options: PolicyOptions<TUser, TPrincipal, S>): Policy<TUser, TPrincipal, VocabularyFromInput<Input
|
|
116
|
-
/**
|
|
127
|
+
declare function definePolicy<TUser, TPrincipal extends Principal, const Input extends PermissionTree | PolicyVocabulary, const S extends PolicyScopesInput = PolicyScopesInput>(permissions: Input, options: PolicyOptions<TUser, TPrincipal, S>): Policy<TUser, TPrincipal, VocabularyFromInput<Input>, S>;
|
|
128
|
+
/**
|
|
129
|
+
* The role names a policy declares: the keys of its `defineRoles` vocabulary,
|
|
130
|
+
* else `string`.
|
|
131
|
+
*/
|
|
117
132
|
type RoleNameOf<P> = P extends {
|
|
118
133
|
readonly vocabulary: infer V;
|
|
119
134
|
} ? V extends {
|
|
120
135
|
readonly roles: infer R extends RoleTree;
|
|
121
136
|
} ? R[keyof R]["key"] : string : string;
|
|
122
137
|
/**
|
|
123
|
-
* Whether `value` names a role the policy declares, for a role read as a
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
138
|
+
* Whether `value` names a role the policy declares, for a role read as a string
|
|
139
|
+
* from a database or a token. A name it rejects is an unknown role, which
|
|
140
|
+
* grants nothing (`unknown-role`). A tenant's custom roles are not declared;
|
|
141
|
+
* `CustomRoleSource` resolves them.
|
|
127
142
|
*/
|
|
128
143
|
declare function isRoleName<P extends Policy<never>>(policy: P, value: unknown): value is RoleNameOf<P>;
|
|
129
144
|
declare function separationConflicts(policy: Policy, memberships: readonly MembershipFixture[]): readonly SeparationConflict[];
|
|
@@ -158,18 +173,73 @@ declare function sqlFunction(name: string, options: {
|
|
|
158
173
|
//#region src/core/memory-sources.d.ts
|
|
159
174
|
declare function memoryEntitlementSource(entries: Readonly<Record<string, readonly string[]>>): EntitlementSource;
|
|
160
175
|
declare function memorySettingsSource(settings: Readonly<Record<string, TenantSettings>>): SettingsSource;
|
|
161
|
-
/**
|
|
176
|
+
/**
|
|
177
|
+
* Memberships keyed by principal id; `tenant` is not a filter, as for a
|
|
178
|
+
* database source.
|
|
179
|
+
*/
|
|
162
180
|
declare function memoryMembershipSource(entries: Readonly<Record<string, readonly Membership[]>>): MembershipSource;
|
|
163
181
|
/** A snapshot held in memory; `set` replaces it and notifies every subscriber. */
|
|
164
182
|
declare function memorySnapshotSource(initial: Snapshot | string): SnapshotSource & {
|
|
165
|
-
set(snapshot: Snapshot | string)
|
|
183
|
+
set: (snapshot: Snapshot | string) => void;
|
|
166
184
|
};
|
|
167
185
|
declare function memoryCustomRoleSource(customRoles: readonly CustomRole[]): CustomRoleSource;
|
|
168
186
|
//#endregion
|
|
169
187
|
//#region src/core/approval-state.d.ts
|
|
170
|
-
/**
|
|
188
|
+
/**
|
|
189
|
+
* The denial detail when an `ApprovalPolicySource` threw or returned an invalid
|
|
190
|
+
* entry.
|
|
191
|
+
*/
|
|
171
192
|
declare const APPROVAL_POLICY_UNAVAILABLE = "approval-policy-unavailable";
|
|
172
193
|
//#endregion
|
|
194
|
+
//#region src/core/version-cache.d.ts
|
|
195
|
+
type VersionCacheStats = {
|
|
196
|
+
/** Version reads the cache started. */
|
|
197
|
+
readonly reads: number;
|
|
198
|
+
/** Calls answered by a read already in flight. */
|
|
199
|
+
readonly shared: number;
|
|
200
|
+
/** Calls answered from an entry or a token claim, with no read. */
|
|
201
|
+
readonly hits: number;
|
|
202
|
+
readonly evictions: number;
|
|
203
|
+
readonly size: number;
|
|
204
|
+
};
|
|
205
|
+
/**
|
|
206
|
+
* Current authorization versions shared by every instance in a process:
|
|
207
|
+
* `claimsFirst(source, { versions })` reads through it.
|
|
208
|
+
*/
|
|
209
|
+
type VersionCache = {
|
|
210
|
+
readonly name?: string;
|
|
211
|
+
/** How old an entry may be when an instance with intent `read` uses it. */
|
|
212
|
+
readonly maxStaleMs: number;
|
|
213
|
+
/**
|
|
214
|
+
* The current version of `principal`. With `live: false`, an entry at most
|
|
215
|
+
* `maxStaleMs` old answers, a read in flight is shared, and a token claim
|
|
216
|
+
* newer than the entry raises it; with `live: true`, `read` runs.
|
|
217
|
+
*/
|
|
218
|
+
current: (principal: VersionQuery, read: () => number | undefined | Promise<number | undefined>, options: {
|
|
219
|
+
readonly live: boolean;
|
|
220
|
+
}) => number | undefined | Promise<number | undefined>;
|
|
221
|
+
/** Drops `principal`'s entry, so the next instance reads the version. */
|
|
222
|
+
evict: (principal: string) => void;
|
|
223
|
+
stats: () => VersionCacheStats;
|
|
224
|
+
};
|
|
225
|
+
type MemoryVersionCacheOptions = {
|
|
226
|
+
/**
|
|
227
|
+
* How stale a read may be, in milliseconds: the entry lifetime and the
|
|
228
|
+
* longest a removed member keeps read access. Clamped to 0 to 60,000.
|
|
229
|
+
*/
|
|
230
|
+
readonly maxStaleMs: number;
|
|
231
|
+
/** Principals kept; the least recently used goes first. Default 10,000. */
|
|
232
|
+
readonly maxEntries?: number;
|
|
233
|
+
/** The clock, read only when an instance asks for a version. */
|
|
234
|
+
readonly now?: () => Instant;
|
|
235
|
+
};
|
|
236
|
+
/**
|
|
237
|
+
* An in-process `VersionCache`: a bounded LRU keyed by principal id that keeps
|
|
238
|
+
* resolved versions and shares reads in flight. Create it once at module
|
|
239
|
+
* scope.
|
|
240
|
+
*/
|
|
241
|
+
declare function memoryVersionCache(options: MemoryVersionCacheOptions): VersionCache;
|
|
242
|
+
//#endregion
|
|
173
243
|
//#region src/core/memberships.d.ts
|
|
174
244
|
/**
|
|
175
245
|
* One `MembershipSource` over several: memberships are merged and
|
|
@@ -179,23 +249,30 @@ declare const APPROVAL_POLICY_UNAVAILABLE = "approval-policy-unavailable";
|
|
|
179
249
|
*/
|
|
180
250
|
declare function composeMemberships(sources: readonly MembershipSource[]): MembershipSource;
|
|
181
251
|
/**
|
|
182
|
-
* Trust the memberships the verified token carries, and read `source` only
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
*
|
|
252
|
+
* Trust the memberships the verified token carries, and read `source` only when
|
|
253
|
+
* the token marks them truncated. With `version`, a token minted before the
|
|
254
|
+
* latest membership change is stale for the policy's `fresh` permissions, or
|
|
255
|
+
* with `onStale: 'reread'` has its memberships read from `source` instead. With
|
|
256
|
+
* `versions`, an instance with intent `read` takes the version from that
|
|
257
|
+
* process-wide cache, so concurrent instances share one read and a token issued
|
|
258
|
+
* within its `maxStaleMs` needs none; intent `write` always reads.
|
|
186
259
|
*/
|
|
187
260
|
declare function claimsFirst(source: MembershipSource | readonly MembershipSource[], options?: {
|
|
188
261
|
readonly version?: MembershipSource["version"];
|
|
189
262
|
readonly onStale?: "deny" | "reread";
|
|
263
|
+
readonly versions?: VersionCache;
|
|
190
264
|
}): MembershipSource;
|
|
191
|
-
/**
|
|
265
|
+
/**
|
|
266
|
+
* Whether the identity provider owns `membership`: the application must not
|
|
267
|
+
* add, change or remove it.
|
|
268
|
+
*/
|
|
192
269
|
declare function isExternallyManaged(membership: Membership): boolean;
|
|
193
270
|
/**
|
|
194
|
-
* How many principals hold `role` in one scope instance now, from the
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
271
|
+
* How many principals hold `role` in one scope instance now, from the source's
|
|
272
|
+
* member list (`MembershipSource.list`): live memberships of exactly that scope
|
|
273
|
+
* and instance, each principal counted once. The `holders` a `decideRoleChange`
|
|
274
|
+
* with `min`, `max` or `transferOnly` needs. `undefined` when the source cannot
|
|
275
|
+
* list or the read fails, which that check denies.
|
|
199
276
|
*/
|
|
200
277
|
declare function countHolders(source: MembershipSource | readonly MembershipSource[], query: {
|
|
201
278
|
readonly scope: string;
|
|
@@ -206,15 +283,18 @@ declare function countHolders(source: MembershipSource | readonly MembershipSour
|
|
|
206
283
|
}): Promise<number | undefined>;
|
|
207
284
|
//#endregion
|
|
208
285
|
//#region src/core/stripe-entitlements.d.ts
|
|
209
|
-
/**
|
|
286
|
+
/**
|
|
287
|
+
* The part of the Stripe Node SDK this source calls:
|
|
288
|
+
* `stripe.entitlements.activeEntitlements.list`.
|
|
289
|
+
*/
|
|
210
290
|
type StripeEntitlementsClient = {
|
|
211
291
|
readonly entitlements: {
|
|
212
292
|
readonly activeEntitlements: {
|
|
213
|
-
list(params: {
|
|
293
|
+
list: (params: {
|
|
214
294
|
readonly customer: string;
|
|
215
295
|
readonly limit?: number;
|
|
216
296
|
readonly starting_after?: string;
|
|
217
|
-
})
|
|
297
|
+
}) => PromiseLike<{
|
|
218
298
|
readonly data: readonly {
|
|
219
299
|
readonly id: string;
|
|
220
300
|
readonly lookup_key: string;
|
|
@@ -246,14 +326,17 @@ type MemoryEdge = {
|
|
|
246
326
|
readonly expiresAt?: number;
|
|
247
327
|
};
|
|
248
328
|
type MemoryRelationSourceData = {
|
|
249
|
-
/**
|
|
329
|
+
/**
|
|
330
|
+
* Rows per resource: parent pointers, links, restricted flags and relation
|
|
331
|
+
* columns are read from them.
|
|
332
|
+
*/
|
|
250
333
|
readonly rows?: Readonly<Record<string, readonly Readonly<Record<string, unknown>>[]>>;
|
|
251
334
|
/** Edge-table rows per resource and relation. */
|
|
252
335
|
readonly edges?: Readonly<Record<string, Readonly<Record<string, readonly MemoryEdge[]>>>>;
|
|
253
336
|
/**
|
|
254
|
-
* Edge tables as the database holds them, keyed by `edge` name: each row
|
|
255
|
-
*
|
|
256
|
-
*
|
|
337
|
+
* Edge tables as the database holds them, keyed by `edge` name: each row is
|
|
338
|
+
* read through the relation's `object`, `subject`, `expiresAt`, `match` and
|
|
339
|
+
* `groups` columns. A relation whose table is here ignores `edges`.
|
|
257
340
|
*/
|
|
258
341
|
readonly tables?: Readonly<Record<string, readonly Readonly<Record<string, unknown>>[]>>;
|
|
259
342
|
};
|
|
@@ -273,7 +356,10 @@ type HoldingVia = {
|
|
|
273
356
|
readonly kind: "relation";
|
|
274
357
|
readonly resource: string;
|
|
275
358
|
readonly relation: string;
|
|
276
|
-
/**
|
|
359
|
+
/**
|
|
360
|
+
* The instance the relation is held on: the object or one of its
|
|
361
|
+
* ancestors.
|
|
362
|
+
*/
|
|
277
363
|
readonly id: string;
|
|
278
364
|
} | {
|
|
279
365
|
readonly kind: "share";
|
|
@@ -281,7 +367,10 @@ type HoldingVia = {
|
|
|
281
367
|
readonly relation: string;
|
|
282
368
|
readonly id: string;
|
|
283
369
|
readonly expiresAt?: number;
|
|
284
|
-
/**
|
|
370
|
+
/**
|
|
371
|
+
* The group the share names, when the principal holds it as one of its
|
|
372
|
+
* members.
|
|
373
|
+
*/
|
|
285
374
|
readonly group?: RelationGroup;
|
|
286
375
|
};
|
|
287
376
|
type Holder = {
|
|
@@ -291,10 +380,10 @@ type Holder = {
|
|
|
291
380
|
readonly via: readonly HoldingVia[];
|
|
292
381
|
};
|
|
293
382
|
/**
|
|
294
|
-
* Who holds a permission on one object, for share dialogs and access
|
|
295
|
-
*
|
|
296
|
-
*
|
|
297
|
-
*
|
|
383
|
+
* Who holds a permission on one object, for share dialogs and access reviews.
|
|
384
|
+
* It lists and never grants. `complete: false` means some grantee could not be
|
|
385
|
+
* enumerated (a global role, a plan, a source without `list`, an unavailable
|
|
386
|
+
* relation): holders may be missing, so check with `decide`.
|
|
298
387
|
*/
|
|
299
388
|
type WhoCan = {
|
|
300
389
|
readonly permission: string;
|
|
@@ -302,11 +391,11 @@ type WhoCan = {
|
|
|
302
391
|
readonly complete: boolean;
|
|
303
392
|
};
|
|
304
393
|
/**
|
|
305
|
-
* Who holds `permission` on `resource` for the instance's policy and how
|
|
306
|
-
*
|
|
307
|
-
* `RelationSource.related`. It lists and never grants; `complete: false`
|
|
308
|
-
*
|
|
309
|
-
*
|
|
394
|
+
* Who holds `permission` on `resource` for the instance's policy and how (role,
|
|
395
|
+
* relation or share), from `MembershipSource.list` and
|
|
396
|
+
* `RelationSource.related`. It lists and never grants; `complete: false` means
|
|
397
|
+
* some holders could not be listed. An instance built from a snapshot answers
|
|
398
|
+
* an empty, incomplete list.
|
|
310
399
|
*/
|
|
311
400
|
declare function whoCan(permdock: InstanceHandle, permission: Permission<string, unknown, "instance">, resource: unknown): Promise<WhoCan>;
|
|
312
401
|
//#endregion
|
|
@@ -314,7 +403,10 @@ declare function whoCan(permdock: InstanceHandle, permission: Permission<string,
|
|
|
314
403
|
type SignPolicyDocumentOptions = {
|
|
315
404
|
/** `aud`: the environment URL `cloud().policies` checks it against. */
|
|
316
405
|
readonly audience: string | readonly string[];
|
|
317
|
-
/**
|
|
406
|
+
/**
|
|
407
|
+
* `exp`, a NumericDate; the signer's default (one hour after `iat`) when
|
|
408
|
+
* absent.
|
|
409
|
+
*/
|
|
318
410
|
readonly expiresAt?: number;
|
|
319
411
|
};
|
|
320
412
|
/**
|
|
@@ -329,14 +421,20 @@ type SignSnapshotOptions = {
|
|
|
329
421
|
/** `aud`; a signer with no default audience refuses to sign without one. */
|
|
330
422
|
readonly audience?: string | readonly string[];
|
|
331
423
|
};
|
|
332
|
-
/**
|
|
424
|
+
/**
|
|
425
|
+
* The claims of a `vnd.permdock.snapshot+jwt` apart from `iss`, `aud` and
|
|
426
|
+
* `jti`.
|
|
427
|
+
*/
|
|
333
428
|
type SnapshotClaims = {
|
|
334
429
|
readonly snapshot: Omit<Snapshot, "issuedAt" | "expiresAt">;
|
|
335
430
|
/** The principal's id; absent for an anonymous snapshot. */
|
|
336
431
|
readonly sub?: string;
|
|
337
432
|
/** `issuedAt` in NumericDate seconds; absent when it is not after the epoch. */
|
|
338
433
|
readonly iat?: number;
|
|
339
|
-
/**
|
|
434
|
+
/**
|
|
435
|
+
* `expiresAt` in NumericDate seconds; absent when the snapshot has none, and
|
|
436
|
+
* the signer then sets its default.
|
|
437
|
+
*/
|
|
340
438
|
readonly exp?: number;
|
|
341
439
|
};
|
|
342
440
|
/**
|
|
@@ -345,7 +443,10 @@ type SnapshotClaims = {
|
|
|
345
443
|
* claims are the only times a verifier reads.
|
|
346
444
|
*/
|
|
347
445
|
declare function snapshotClaims(snapshot: Snapshot): SnapshotClaims;
|
|
348
|
-
/**
|
|
446
|
+
/**
|
|
447
|
+
* Signs `snapshot` as a `vnd.permdock.snapshot+jwt` with the claims
|
|
448
|
+
* `snapshotClaims` answers.
|
|
449
|
+
*/
|
|
349
450
|
declare function signSnapshot(snapshot: Snapshot, signer: TokenSigner, options?: SignSnapshotOptions): Promise<string>;
|
|
350
451
|
/**
|
|
351
452
|
* The snapshot a verified `vnd.permdock.snapshot+jwt` carries, parsed as
|
|
@@ -390,10 +491,9 @@ type ArazzoFinding = {
|
|
|
390
491
|
};
|
|
391
492
|
declare function arazzoFindings(input: ArazzoSimulateInput, tree: PermissionTree | undefined): readonly ArazzoFinding[];
|
|
392
493
|
/**
|
|
393
|
-
* Walks an Arazzo workflow against `permdock`: each step's operation is
|
|
394
|
-
*
|
|
395
|
-
*
|
|
396
|
-
* snapshot too.
|
|
494
|
+
* Walks an Arazzo workflow against `permdock`: each step's operation is decided
|
|
495
|
+
* as `permdock.simulate` would, and a server instance emits one simulate event
|
|
496
|
+
* for the whole plan. Works on an instance built from a snapshot too.
|
|
397
497
|
*/
|
|
398
498
|
declare function simulateArazzo(permdock: PermDock, input: ArazzoSimulateInput): ArazzoPlan;
|
|
399
499
|
//#endregion
|
|
@@ -407,16 +507,17 @@ declare function localSnapshotManifest(policy: Policy): LocalSnapshotManifest;
|
|
|
407
507
|
//#endregion
|
|
408
508
|
//#region src/core/app.d.ts
|
|
409
509
|
/**
|
|
410
|
-
* How strict `defineApp` is about the services the policy needs. `dev`
|
|
411
|
-
*
|
|
412
|
-
*
|
|
413
|
-
* service the app does not configure, instead of denying at run
|
|
510
|
+
* How strict `defineApp` is about the services the policy needs. `dev` fills in
|
|
511
|
+
* in-process defaults (a memory approval store and a memory limit store) so a
|
|
512
|
+
* new app runs before any infrastructure exists. `prod` throws at startup when
|
|
513
|
+
* a grant needs a service the app does not configure, instead of denying at run
|
|
514
|
+
* time.
|
|
414
515
|
*/
|
|
415
516
|
type AppProfile = "dev" | "prod";
|
|
416
517
|
/**
|
|
417
|
-
* Everything an app wires once and every adapter reads: the data sources,
|
|
418
|
-
*
|
|
419
|
-
*
|
|
518
|
+
* Everything an app wires once and every adapter reads: the data sources, the
|
|
519
|
+
* opt-in features and the services. An adapter's own options win over these,
|
|
520
|
+
* key by key.
|
|
420
521
|
*/
|
|
421
522
|
type AppOptions = InstanceOptions & Pick<PermDockOptions, "settings"> & {
|
|
422
523
|
/** Where approval requests open and resume, for every adapter. */
|
|
@@ -426,10 +527,10 @@ type AppOptions = InstanceOptions & Pick<PermDockOptions, "settings"> & {
|
|
|
426
527
|
//#endregion
|
|
427
528
|
//#region src/app/define-app.d.ts
|
|
428
529
|
/**
|
|
429
|
-
* Binds the app's sources, features and services to `policy`. The result
|
|
430
|
-
*
|
|
431
|
-
*
|
|
432
|
-
*
|
|
530
|
+
* Binds the app's sources, features and services to `policy`. The result is a
|
|
531
|
+
* policy: pass it wherever a policy goes (`createPermDock`, every adapter, the
|
|
532
|
+
* CLI) and each picks up the app definition, with its own options taking
|
|
533
|
+
* precedence. The profile defaults to `prod`.
|
|
433
534
|
*/
|
|
434
535
|
declare function defineApp<TUser, TPrincipal extends Principal, V extends PolicyVocabulary>(policy: Policy<TUser, TPrincipal, V>, options?: AppOptions): Policy<TUser, TPrincipal, V>;
|
|
435
536
|
//#endregion
|
|
@@ -453,20 +554,20 @@ type ShadowMismatch = {
|
|
|
453
554
|
type ShadowOptions = {
|
|
454
555
|
readonly legacy: LegacyCheck;
|
|
455
556
|
/**
|
|
456
|
-
* Permissions PermDock decides; every other check returns the legacy
|
|
457
|
-
*
|
|
557
|
+
* Permissions PermDock decides; every other check returns the legacy answer.
|
|
558
|
+
* `"all"` once every mismatch is resolved; default none.
|
|
458
559
|
*/
|
|
459
560
|
readonly enforce?: readonly Permission[] | "all";
|
|
460
561
|
/** Called for each disagreement; a throw here is ignored. */
|
|
461
562
|
readonly onMismatch?: (mismatch: ShadowMismatch) => void;
|
|
462
563
|
};
|
|
463
564
|
/**
|
|
464
|
-
* Runs PermDock beside the application's existing checks while adopting
|
|
465
|
-
*
|
|
466
|
-
*
|
|
467
|
-
*
|
|
468
|
-
*
|
|
469
|
-
*
|
|
565
|
+
* Runs PermDock beside the application's existing checks while adopting it.
|
|
566
|
+
* Each `can`, `decide`, `decideEach`, `filter` and `assert` asks both; the
|
|
567
|
+
* legacy answer is returned unless the permission is in `enforce`, and every
|
|
568
|
+
* disagreement reaches `onMismatch`. Promote permissions one by one as their
|
|
569
|
+
* mismatches are resolved, then remove the wrap. Pass it as an adapter's `wrap`
|
|
570
|
+
* option, or call it on a core instance.
|
|
470
571
|
*/
|
|
471
572
|
declare function shadowMode(options: ShadowOptions): PermDockWrap;
|
|
472
573
|
//#endregion
|
|
@@ -483,28 +584,41 @@ declare function mayAccess(policy: Policy, user: unknown, permission: Permission
|
|
|
483
584
|
}): boolean;
|
|
484
585
|
//#endregion
|
|
485
586
|
//#region src/core/custom-role-source.d.ts
|
|
486
|
-
/**
|
|
587
|
+
/**
|
|
588
|
+
* Reads custom roles from the application's store, as `customRoleSource` takes
|
|
589
|
+
* them.
|
|
590
|
+
*/
|
|
487
591
|
type CustomRoleReader = {
|
|
488
|
-
/**
|
|
489
|
-
|
|
490
|
-
|
|
592
|
+
/**
|
|
593
|
+
* Every custom role of `tenant`, whether or not anyone in the request holds
|
|
594
|
+
* it.
|
|
595
|
+
*/
|
|
596
|
+
rolesFor: (tenant: string) => CustomRole[] | Promise<CustomRole[]>;
|
|
597
|
+
assignable?: (tenant: string) => string[] | Promise<string[]>;
|
|
491
598
|
/** Platform custom roles (`scope: 'global'`). */
|
|
492
|
-
globalRoles
|
|
599
|
+
globalRoles?: () => CustomRole[] | Promise<CustomRole[]>;
|
|
493
600
|
/** Shared custom roles (`shared: true`), the same for every tenant. */
|
|
494
|
-
sharedRoles
|
|
601
|
+
sharedRoles?: () => CustomRole[] | Promise<CustomRole[]>;
|
|
495
602
|
};
|
|
496
603
|
type CustomRoleSourceOptions = {
|
|
497
|
-
/**
|
|
604
|
+
/**
|
|
605
|
+
* `'all'` (default): read every custom role of each tenant, so
|
|
606
|
+
* `assignableRoles` and `decideRoleChange` see them all.
|
|
607
|
+
*/
|
|
498
608
|
readonly read?: "all";
|
|
499
609
|
} | {
|
|
500
|
-
/**
|
|
610
|
+
/**
|
|
611
|
+
* `'held'`: skip a tenant's read, and the platform read, when every role
|
|
612
|
+
* the subject holds there is declared in `policy`. For requests that
|
|
613
|
+
* never manage roles.
|
|
614
|
+
*/
|
|
501
615
|
readonly read: "held";
|
|
502
616
|
readonly policy: Policy;
|
|
503
617
|
};
|
|
504
618
|
/**
|
|
505
|
-
* A `CustomRoleSource` over a reader that returns every custom role of a
|
|
506
|
-
* It keeps only the roles of the requested tenant. With `read: 'held'`
|
|
507
|
-
* skips a tenant's read, and `globalRoles` and `sharedRoles`, when the
|
|
619
|
+
* A `CustomRoleSource` over a reader that returns every custom role of a
|
|
620
|
+
* tenant. It keeps only the roles of the requested tenant. With `read: 'held'`
|
|
621
|
+
* it skips a tenant's read, and `globalRoles` and `sharedRoles`, when the
|
|
508
622
|
* subject holds only declared roles there.
|
|
509
623
|
*/
|
|
510
624
|
declare function customRoleSource(reader: CustomRoleReader, options?: CustomRoleSourceOptions): CustomRoleSource;
|
|
@@ -522,7 +636,10 @@ type SnapshotForOptions = {
|
|
|
522
636
|
readonly memberships?: readonly Membership[];
|
|
523
637
|
/** The tenant's custom roles, typically from a shared, tagged cache. */
|
|
524
638
|
readonly customRoles?: readonly CustomRole[];
|
|
525
|
-
/**
|
|
639
|
+
/**
|
|
640
|
+
* Per tenant, the role names `CustomRoleSource.assignable` returns; narrows
|
|
641
|
+
* `assignable`.
|
|
642
|
+
*/
|
|
526
643
|
readonly assignable?: Readonly<Record<string, readonly string[]>>;
|
|
527
644
|
/** Plans of the active tenant; replaces `principal.plans`. */
|
|
528
645
|
readonly plans?: readonly string[];
|
|
@@ -532,10 +649,10 @@ type SnapshotForOptions = {
|
|
|
532
649
|
readonly now?: Instant;
|
|
533
650
|
};
|
|
534
651
|
/**
|
|
535
|
-
* Builds the serializable access snapshot for a subject without a request,
|
|
536
|
-
*
|
|
537
|
-
*
|
|
538
|
-
*
|
|
652
|
+
* Builds the serializable access snapshot for a subject without a request, a
|
|
653
|
+
* network call or a cache directive: call it inside the app's own `'use cache:
|
|
654
|
+
* private'` function. Synchronous; the policy's `subject` and `context` mappers
|
|
655
|
+
* must be synchronous too.
|
|
539
656
|
*/
|
|
540
657
|
declare function snapshotFor<TUser, TPrincipal extends Principal = Principal, V extends PolicyVocabulary = PolicyVocabulary>(policy: Policy<TUser, TPrincipal, V>, user: TUser | Subject | null, options?: SnapshotForOptions): Snapshot;
|
|
541
658
|
//#endregion
|
|
@@ -548,8 +665,12 @@ declare function definePermissions<const Input, PX = never, RX = never>(input: I
|
|
|
548
665
|
* renames and for one that crossed a serialisation boundary.
|
|
549
666
|
*/
|
|
550
667
|
declare function formerKeys(permission: object): readonly string[];
|
|
551
|
-
declare function resource<T, const A extends ActionList = readonly [], const C extends ActionList = readonly []>(schema: StandardSchemaV1<unknown, T>, options?: ResourceOptions<A, C>
|
|
552
|
-
|
|
668
|
+
declare function resource<T, const A extends ActionList = readonly [], const C extends ActionList = readonly [], const N extends string = never>(schema: StandardSchemaV1<unknown, T>, options?: ResourceOptions<A, C> & {
|
|
669
|
+
readonly name?: N;
|
|
670
|
+
}): ResourceInit<T, A, C, N>;
|
|
671
|
+
declare function resource<const A extends ActionList = readonly [], const C extends ActionList = readonly [], const N extends string = never>(options: ResourceOptions<A, C> & {
|
|
672
|
+
readonly name?: N;
|
|
673
|
+
}): ResourceInit<unknown, A, C, N>;
|
|
553
674
|
//#endregion
|
|
554
675
|
//#region src/core/presets.d.ts
|
|
555
676
|
type ReadOnlyMeta = {
|
|
@@ -612,7 +733,10 @@ declare function writable<const A extends ActionList | undefined = undefined, co
|
|
|
612
733
|
//#endregion
|
|
613
734
|
//#region src/core/role-builder.d.ts
|
|
614
735
|
type RoleGrants = readonly (Omit<Grant, "role" | "scope"> | readonly Omit<Grant, "role" | "scope">[])[];
|
|
615
|
-
/**
|
|
736
|
+
/**
|
|
737
|
+
* A role held at a named scope: `on` is checked against `definePolicy({ scopes
|
|
738
|
+
* })`.
|
|
739
|
+
*/
|
|
616
740
|
declare function role<const S extends string>(name: string | Role, grants: RoleGrants, options: RoleOptions<S> & {
|
|
617
741
|
readonly on: S;
|
|
618
742
|
}): RoleBinding<S>;
|
|
@@ -625,13 +749,16 @@ declare function normalizeAssurance(input: AssuranceRequirement | undefined): As
|
|
|
625
749
|
//#region src/core/grant-builders.d.ts
|
|
626
750
|
declare function allow<T, K extends PermissionKind = PermissionKind>(permission: Permission<string, T, K> | readonly Permission<string, T, K>[], condition?: GrantCondition<T, K>): Omit<Grant, "role" | "scope"> | Omit<Grant, "role" | "scope">[];
|
|
627
751
|
/**
|
|
628
|
-
* Every action of a resource (`permissions.post`), of several, or of the
|
|
629
|
-
*
|
|
630
|
-
*
|
|
752
|
+
* Every action of a resource (`permissions.post`), of several, or of the whole
|
|
753
|
+
* tree, unconditionally. Each grant is listed in the policy as if written out,
|
|
754
|
+
* and an action added to the resource later is granted too.
|
|
631
755
|
*/
|
|
632
756
|
declare function allow(permissions: PermissionTree | readonly (Permission | PermissionTree)[]): Omit<Grant, "role" | "scope"> | Omit<Grant, "role" | "scope">[];
|
|
633
757
|
declare function deny<T, K extends PermissionKind = PermissionKind>(permission: Permission<string, T, K> | readonly Permission<string, T, K>[], condition?: GrantCondition<T, K>): Omit<Grant, "role" | "scope"> | Omit<Grant, "role" | "scope">[];
|
|
634
|
-
/**
|
|
758
|
+
/**
|
|
759
|
+
* Every action of a resource, of several, or of the whole tree,
|
|
760
|
+
* unconditionally.
|
|
761
|
+
*/
|
|
635
762
|
declare function deny(permissions: PermissionTree | readonly (Permission | PermissionTree)[]): Omit<Grant, "role" | "scope"> | Omit<Grant, "role" | "scope">[];
|
|
636
763
|
//#endregion
|
|
637
764
|
//#region src/core/approval-normalize.d.ts
|
|
@@ -657,7 +784,10 @@ declare function supportAccess<const S extends string>(options: SupportAccessOpt
|
|
|
657
784
|
declare function supportAccess(options: SupportAccessOptions<never>): RoleBinding<"tenant">;
|
|
658
785
|
type ActivateInput = {
|
|
659
786
|
readonly role: string | Role;
|
|
660
|
-
/**
|
|
787
|
+
/**
|
|
788
|
+
* The scope the activation applies in (a declared name or the `tenant` /
|
|
789
|
+
* `team` alias).
|
|
790
|
+
*/
|
|
661
791
|
readonly scope: string;
|
|
662
792
|
readonly id: string;
|
|
663
793
|
/** Ancestor scope ids, keyed by scope name, for a nested-scope activation. */
|
|
@@ -667,30 +797,32 @@ type ActivateInput = {
|
|
|
667
797
|
readonly reason?: string;
|
|
668
798
|
};
|
|
669
799
|
/**
|
|
670
|
-
* Requests a just-in-time role activation. It never writes: a granted
|
|
671
|
-
*
|
|
672
|
-
*
|
|
673
|
-
*
|
|
674
|
-
*
|
|
800
|
+
* Requests a just-in-time role activation. It never writes: a granted decision
|
|
801
|
+
* carries the elevated membership under `elevation` for the app to write.
|
|
802
|
+
* `approval-required` comes back first when the role's `activation` sets
|
|
803
|
+
* `approval`. Fail-closed: an unknown role, an ineligible subject, a missing
|
|
804
|
+
* justification or stale authentication all deny.
|
|
675
805
|
*/
|
|
676
806
|
/**
|
|
677
807
|
* Requests a just-in-time activation of an eligible role for the subject of
|
|
678
808
|
* `permdock`. It never writes: a granted decision carries the elevated
|
|
679
|
-
* membership under `elevation` for the app to write, and
|
|
680
|
-
*
|
|
681
|
-
*
|
|
809
|
+
* membership under `elevation` for the app to write, and `approval-required`
|
|
810
|
+
* comes back first when the role's `activation` sets `approval`. An instance
|
|
811
|
+
* built from a snapshot denies with `unsupported`.
|
|
682
812
|
*/
|
|
683
813
|
declare function activate(permdock: InstanceHandle, input: ActivateInput): Decision;
|
|
684
814
|
//#endregion
|
|
685
815
|
//#region src/core/scope-helpers.d.ts
|
|
686
816
|
/**
|
|
687
|
-
* The canonical form PermDock evaluates one membership in, or `undefined`
|
|
688
|
-
*
|
|
689
|
-
*
|
|
690
|
-
* `team` pair.
|
|
817
|
+
* The canonical form PermDock evaluates one membership in, or `undefined` when
|
|
818
|
+
* it is malformed and grants nothing. `scopes` is the policy's or the catalog's
|
|
819
|
+
* scope list; absent or empty means the implicit `tenant` and `team` pair.
|
|
691
820
|
*/
|
|
692
821
|
declare function normalizeMembership(input: unknown, scopes?: readonly Scope[]): Membership | undefined;
|
|
693
|
-
/**
|
|
822
|
+
/**
|
|
823
|
+
* Every well-formed membership of `input` in canonical form; malformed entries
|
|
824
|
+
* are dropped.
|
|
825
|
+
*/
|
|
694
826
|
declare function normalizeMemberships(input: unknown, scopes?: readonly Scope[]): readonly Membership[];
|
|
695
827
|
/**
|
|
696
828
|
* The declared scope `name` stands for: the name itself, or the scope the
|
|
@@ -699,14 +831,23 @@ declare function normalizeMemberships(input: unknown, scopes?: readonly Scope[])
|
|
|
699
831
|
declare function resolveScope(scopes: readonly Scope[] | undefined, name: unknown): string | undefined;
|
|
700
832
|
//#endregion
|
|
701
833
|
//#region src/core/ownership.d.ts
|
|
702
|
-
/**
|
|
834
|
+
/**
|
|
835
|
+
* Who a role change is about: their principal id and their membership in the
|
|
836
|
+
* scope instance.
|
|
837
|
+
*/
|
|
703
838
|
type RoleChangeTarget = {
|
|
704
839
|
readonly id: string;
|
|
705
|
-
/**
|
|
840
|
+
/**
|
|
841
|
+
* The kind of the target's membership in the instance (`staff`, `contact`,
|
|
842
|
+
* ...).
|
|
843
|
+
*/
|
|
706
844
|
readonly via?: string;
|
|
707
845
|
/** The roles the target holds in the instance now. */
|
|
708
846
|
readonly roles?: readonly string[];
|
|
709
|
-
/**
|
|
847
|
+
/**
|
|
848
|
+
* `idp` when the identity provider owns the target's membership: the
|
|
849
|
+
* application cannot change it.
|
|
850
|
+
*/
|
|
710
851
|
readonly managedBy?: "idp";
|
|
711
852
|
};
|
|
712
853
|
type RoleChangeBase = {
|
|
@@ -716,16 +857,15 @@ type RoleChangeBase = {
|
|
|
716
857
|
readonly within?: Readonly<Record<string, string>>;
|
|
717
858
|
readonly target: RoleChangeTarget;
|
|
718
859
|
/**
|
|
719
|
-
* How many principals hold `role` in the instance now, from the
|
|
720
|
-
*
|
|
721
|
-
* `transferOnly` is denied.
|
|
860
|
+
* How many principals hold `role` in the instance now, from the application's
|
|
861
|
+
* store. Without it a role with `min`, `max` or `transferOnly` is denied.
|
|
722
862
|
*/
|
|
723
863
|
readonly holders?: number;
|
|
724
864
|
};
|
|
725
865
|
/**
|
|
726
866
|
* A role held at a named scope instance (`scope` is a declared name or alias
|
|
727
|
-
* and `id` the instance), or a global role: `scope: 'global'` with no `id`.
|
|
728
|
-
*
|
|
867
|
+
* and `id` the instance), or a global role: `scope: 'global'` with no `id`. A
|
|
868
|
+
* global change has no tenant, so `within` and `holders` do not apply to it.
|
|
729
869
|
*/
|
|
730
870
|
type RoleChange = RoleChangeBase & ({
|
|
731
871
|
/** The scope the role is held at (a declared name or alias). */
|
|
@@ -750,7 +890,10 @@ type RoleChangeDecision = {
|
|
|
750
890
|
readonly change: RoleChange;
|
|
751
891
|
readonly denials: readonly Denial[];
|
|
752
892
|
};
|
|
753
|
-
/**
|
|
893
|
+
/**
|
|
894
|
+
* The holder-count, membership-kind, exclusivity and `assigns` rules of one
|
|
895
|
+
* role, as the catalog lists them (`CatalogRole`).
|
|
896
|
+
*/
|
|
754
897
|
type RoleRules = {
|
|
755
898
|
readonly key: string;
|
|
756
899
|
readonly min?: number;
|
|
@@ -765,14 +908,26 @@ type RoleChangeCheckInput = {
|
|
|
765
908
|
readonly kind: "assign" | "revoke" | "transfer";
|
|
766
909
|
readonly target: Pick<RoleChangeTarget, "via" | "roles">;
|
|
767
910
|
};
|
|
768
|
-
/**
|
|
911
|
+
/**
|
|
912
|
+
* How many principals hold the role in the instance now; without it a role
|
|
913
|
+
* with `min`, `max` or `transferOnly` is denied.
|
|
914
|
+
*/
|
|
769
915
|
readonly holders?: number;
|
|
770
|
-
/**
|
|
916
|
+
/**
|
|
917
|
+
* Every declared role: adds the `exclusiveWith` other roles declare against
|
|
918
|
+
* this one, and with `actorRoles` the `assigns` rule.
|
|
919
|
+
*/
|
|
771
920
|
readonly roles?: readonly RoleRules[];
|
|
772
|
-
/**
|
|
921
|
+
/**
|
|
922
|
+
* The roles the actor holds at the instance, highest rank first. With `roles`
|
|
923
|
+
* naming any `assigns`, one of them must assign this role.
|
|
924
|
+
*/
|
|
773
925
|
readonly actorRoles?: readonly string[];
|
|
774
926
|
};
|
|
775
|
-
/**
|
|
927
|
+
/**
|
|
928
|
+
* `by` names the actor role whose `assigns` allowed the change, `null` when the
|
|
929
|
+
* rule did not apply.
|
|
930
|
+
*/
|
|
776
931
|
type RoleChangeCheck = {
|
|
777
932
|
readonly ok: true;
|
|
778
933
|
readonly by: string | null;
|
|
@@ -782,18 +937,18 @@ type RoleChangeCheck = {
|
|
|
782
937
|
};
|
|
783
938
|
/**
|
|
784
939
|
* The rules of a role change that need no subject: `assigns`, `for`,
|
|
785
|
-
* `exclusiveWith`, `min`, `max` and `transferOnly`, from holder counts and
|
|
786
|
-
*
|
|
787
|
-
*
|
|
788
|
-
*
|
|
940
|
+
* `exclusiveWith`, `min`, `max` and `transferOnly`, from holder counts and the
|
|
941
|
+
* target's roles alone. `decideRoleChange` runs the same function after its
|
|
942
|
+
* actor, tenant and ceiling checks; a service that holds only the catalog calls
|
|
943
|
+
* it with the `CatalogRole` entries.
|
|
789
944
|
*/
|
|
790
945
|
declare function checkRoleChange(role: RoleRules, input: RoleChangeCheckInput): RoleChangeCheck;
|
|
791
946
|
type RoleChangeOptions = {
|
|
792
947
|
/**
|
|
793
|
-
* `true` when the application loaded `change.within` from its own store
|
|
794
|
-
*
|
|
795
|
-
*
|
|
796
|
-
*
|
|
948
|
+
* `true` when the application loaded `change.within` from its own store (the
|
|
949
|
+
* instance's stored parent), not from the request. Without it, a nested
|
|
950
|
+
* instance's tenant comes only from a live membership the actor holds on that
|
|
951
|
+
* instance or under it.
|
|
797
952
|
*/
|
|
798
953
|
readonly trusted?: boolean;
|
|
799
954
|
};
|
|
@@ -802,12 +957,12 @@ type RoleChangeOptions = {
|
|
|
802
957
|
* the instance's own principal; nothing in `change` can stand in for it.
|
|
803
958
|
*/
|
|
804
959
|
/**
|
|
805
|
-
* Whether the subject of `permdock` may assign, revoke or transfer a role
|
|
806
|
-
*
|
|
807
|
-
* `
|
|
808
|
-
*
|
|
809
|
-
* instance's tenant comes from a live membership the subject holds on it,
|
|
810
|
-
*
|
|
960
|
+
* Whether the subject of `permdock` may assign, revoke or transfer a role in
|
|
961
|
+
* one scope instance: `assigns`, the ceiling, `for`, `exclusiveWith`, `min`,
|
|
962
|
+
* `max` and `transferOnly`. It never writes; the application does, and
|
|
963
|
+
* generated RLS triggers re-check the holder counts at commit. A nested
|
|
964
|
+
* instance's tenant comes from a live membership the subject holds on it, or
|
|
965
|
+
* from `change.within` only with `{ trusted: true }`; otherwise
|
|
811
966
|
* `no-membership`. An instance built from a snapshot denies with
|
|
812
967
|
* `unsupported`.
|
|
813
968
|
*/
|
|
@@ -815,17 +970,20 @@ declare function decideRoleChange(permdock: InstanceHandle, change: RoleChange,
|
|
|
815
970
|
//#endregion
|
|
816
971
|
//#region src/core/parse-sink-events.d.ts
|
|
817
972
|
/**
|
|
818
|
-
* Validates one untrusted sink event against its family's schema and returns
|
|
819
|
-
*
|
|
973
|
+
* Validates one untrusted sink event against its family's schema and returns a
|
|
974
|
+
* frozen copy, or `null` for anything else. Never throws.
|
|
820
975
|
*/
|
|
821
976
|
declare function parseSinkEvent(value: unknown): SinkEvent | null;
|
|
822
977
|
/**
|
|
823
978
|
* Validates an untrusted list of sink events, such as a request body a sink
|
|
824
|
-
* receiver read. Each event that fails its schema is dropped, and a value
|
|
825
|
-
*
|
|
979
|
+
* receiver read. Each event that fails its schema is dropped, and a value that
|
|
980
|
+
* is not an array yields no events. Never throws.
|
|
826
981
|
*/
|
|
827
982
|
declare function parseSinkEvents(value: unknown): readonly SinkEvent[];
|
|
828
|
-
/**
|
|
983
|
+
/**
|
|
984
|
+
* Validates the data of a `com.permdock.catalog.*` CloudEvent; `null` when it
|
|
985
|
+
* does not match.
|
|
986
|
+
*/
|
|
829
987
|
declare function parseCatalogEventData(value: unknown): CatalogEventData | null;
|
|
830
988
|
/**
|
|
831
989
|
* Validates one CloudEvent against the closed type list, its `dataschema` and
|
|
@@ -840,7 +998,10 @@ declare function parseCloudEvent(value: unknown): CloudEvent | null;
|
|
|
840
998
|
declare function parseCloudEventBatch(value: unknown): readonly CloudEvent[] | null;
|
|
841
999
|
//#endregion
|
|
842
1000
|
//#region src/core/event-schemas.d.ts
|
|
843
|
-
/**
|
|
1001
|
+
/**
|
|
1002
|
+
* The URL each event family's schema is published at, and its CloudEvents
|
|
1003
|
+
* `dataschema`.
|
|
1004
|
+
*/
|
|
844
1005
|
declare const EVENT_SCHEMA_IDS: {
|
|
845
1006
|
readonly decision: "https://permdock.com/schemas/decision-event-v1.json";
|
|
846
1007
|
readonly directory: "https://permdock.com/schemas/directory-event-v1.json";
|
|
@@ -874,9 +1035,9 @@ declare const SINK_EVENT_SCHEMAS: {
|
|
|
874
1035
|
/** The OCSF schema version `toOcsf` emits. */
|
|
875
1036
|
declare const OCSF_VERSION = "1.9.0";
|
|
876
1037
|
/**
|
|
877
|
-
* An OCSF Authorize Session (class 3003, category Identity and Access
|
|
878
|
-
* API Activity (6003) would fit a per-request decision, but
|
|
879
|
-
* `src_endpoint`, which a decision event does not carry.
|
|
1038
|
+
* An OCSF Authorize Session (class 3003, category Identity and Access
|
|
1039
|
+
* Management) event. API Activity (6003) would fit a per-request decision, but
|
|
1040
|
+
* it requires `api` and `src_endpoint`, which a decision event does not carry.
|
|
880
1041
|
*/
|
|
881
1042
|
type OcsfAuthorizeSession = {
|
|
882
1043
|
readonly class_uid: 3003;
|
|
@@ -934,15 +1095,16 @@ type OcsfAuthorizeSession = {
|
|
|
934
1095
|
};
|
|
935
1096
|
};
|
|
936
1097
|
/**
|
|
937
|
-
* Projects a decision or approval event onto OCSF Authorize Session; the event
|
|
938
|
-
* An event whose `at` does not parse has no OCSF `time`
|
|
1098
|
+
* Projects a decision or approval event onto OCSF Authorize Session; the event
|
|
1099
|
+
* itself is unchanged. An event whose `at` does not parse has no OCSF `time`
|
|
1100
|
+
* and projects to `undefined`.
|
|
939
1101
|
*/
|
|
940
1102
|
declare function toOcsf(event: DecisionEvent): OcsfAuthorizeSession | undefined;
|
|
941
1103
|
/**
|
|
942
1104
|
* An OCSF User Management (class 3007) event for a support-access lifecycle
|
|
943
1105
|
* event: `started` enables the session, `ended` and `revoked` disable it.
|
|
944
|
-
* Support access is high severity, so a SIEM can alert on vendor access.
|
|
945
|
-
*
|
|
1106
|
+
* Support access is high severity, so a SIEM can alert on vendor access. OCSF
|
|
1107
|
+
* 1.9.0 deprecates Account Change (3001) in favour of this class.
|
|
946
1108
|
*/
|
|
947
1109
|
type OcsfUserManagement = {
|
|
948
1110
|
readonly class_uid: 3007;
|
|
@@ -987,16 +1149,17 @@ declare function accessToOcsf(event: AccessEvent): OcsfUserManagement | undefine
|
|
|
987
1149
|
/** The CSV export columns, in order; the header row of every CSV file. */
|
|
988
1150
|
declare const CSV_COLUMNS: readonly ["time", "principal", "actor", "tenant", "permission", "outcome", "matched.role", "via", "denials.reason", "token"];
|
|
989
1151
|
/**
|
|
990
|
-
* One RFC 4180 row for a decision or approval event, without a line
|
|
991
|
-
*
|
|
1152
|
+
* One RFC 4180 row for a decision or approval event, without a line terminator;
|
|
1153
|
+
* join rows with CRLF under a `CSV_COLUMNS` header.
|
|
992
1154
|
*/
|
|
993
1155
|
declare function toCsvRow(event: DecisionEvent): string;
|
|
994
1156
|
//#endregion
|
|
995
1157
|
//#region src/core/catalog-fingerprint.d.ts
|
|
996
1158
|
/**
|
|
997
|
-
* The catalog v1 fingerprint: the `sha-256:` digest of its RFC 8785 JSON
|
|
998
|
-
*
|
|
999
|
-
* call sites
|
|
1159
|
+
* The catalog v1 fingerprint: the `sha-256:` digest of its RFC 8785 JSON
|
|
1160
|
+
* without `generatedAt`, `generator`, `fingerprint` and every
|
|
1161
|
+
* `permissions[].usages`, so neither the CLI version, the clock nor call sites
|
|
1162
|
+
* change it.
|
|
1000
1163
|
*/
|
|
1001
1164
|
declare function catalogFingerprint(catalog: unknown): string;
|
|
1002
1165
|
//#endregion
|
|
@@ -1012,8 +1175,8 @@ declare function canonicalJson(value: unknown): string;
|
|
|
1012
1175
|
//#endregion
|
|
1013
1176
|
//#region src/core/sha256.d.ts
|
|
1014
1177
|
/**
|
|
1015
|
-
* The one digest notation: `sha-256:` plus the unpadded base64url SHA-256
|
|
1016
|
-
*
|
|
1178
|
+
* The one digest notation: `sha-256:` plus the unpadded base64url SHA-256 of
|
|
1179
|
+
* `text`. An RFC 9651 sf-token, so it fits a structured header as is.
|
|
1017
1180
|
*/
|
|
1018
1181
|
declare function sha256Digest(text: string): string;
|
|
1019
1182
|
//#endregion
|
|
@@ -1021,18 +1184,18 @@ declare function sha256Digest(text: string): string;
|
|
|
1021
1184
|
type DelegatedPermission = Pick<Permission, "scope" | "resource" | "action">;
|
|
1022
1185
|
/**
|
|
1023
1186
|
* Whether a delegated caller may use a permission its principal holds, through
|
|
1024
|
-
* OAuth `scopes`, RFC 9396 `authorizationDetails` or GNAP `access`.
|
|
1025
|
-
*
|
|
1187
|
+
* OAuth `scopes`, RFC 9396 `authorizationDetails` or GNAP `access`. `undefined`
|
|
1188
|
+
* means covered; otherwise the denial reason `decide` would add.
|
|
1026
1189
|
*/
|
|
1027
1190
|
declare function coveredByDelegation(permission: DelegatedPermission, delegation: Delegation | undefined, resourceId?: string, hasActor?: boolean): DenialReason | undefined;
|
|
1028
1191
|
/**
|
|
1029
1192
|
* The permission keys the policy's delegations let `subject.actor` use for
|
|
1030
1193
|
* `subject.principal` right now: the union over every active delegation whose
|
|
1031
|
-
* `to` matches the actor and whose `from` the principal holds. `undefined`
|
|
1032
|
-
*
|
|
1033
|
-
*
|
|
1034
|
-
*
|
|
1194
|
+
* `to` matches the actor and whose `from` the principal holds. `undefined` when
|
|
1195
|
+
* none applies, so the call falls back to the token delegation alone. An actor
|
|
1196
|
+
* with `readOnly: true` gets only each delegation's read-only keys. Attenuation
|
|
1197
|
+
* only: a key here still needs a matching allow and no deny.
|
|
1035
1198
|
*/
|
|
1036
1199
|
declare function delegatedPermissions(delegations: readonly PolicyDelegation[] | undefined, subject: Subject, heldRoles: ReadonlySet<string>, now: number): ReadonlySet<string> | undefined;
|
|
1037
1200
|
//#endregion
|
|
1038
|
-
export { resource as $,
|
|
1201
|
+
export { resource as $, opaque as $t, RoleChangeCheckInput as A, HoldingVia as At, ActivateInput as B, countHolders as Bt, parseCatalogEventData as C, validateCustomRole as Cn, SnapshotClaims as Ct, parseSinkEvents as D, SignPolicyDocumentOptions as Dt, parseSinkEvent as E, principal as En, snapshotFromClaims as Et, checkRoleChange as F, memoryRelationSource as Ft, allow as G, memoryVersionCache as Gt, breakGlass as H, MemoryVersionCacheOptions as Ht, decideRoleChange as I, StripeEntitlementsClient as It, role as J, memoryEntitlementSource as Jt, deny as K, APPROVAL_POLICY_UNAVAILABLE as Kt, normalizeMembership as L, stripeEntitlementSource as Lt, RoleChangeOptions as M, whoCan as Mt, RoleChangeTarget as N, MemoryEdge as Nt, RoleChange as O, signPolicyDocument as Ot, RoleRules as P, MemoryRelationSourceData as Pt, formerKeys as Q, sqlFunction as Qt, normalizeMemberships as R, claimsFirst as Rt, SINK_EVENT_SCHEMAS as S, resolveCustomRole as Sn, SignSnapshotOptions as St, parseCloudEventBatch as T, context as Tn, snapshotClaims as Tt, supportAccess as U, VersionCache as Ut, activate as V, isExternallyManaged as Vt, normalizeApproval as W, VersionCacheStats as Wt, readable as X, memorySettingsSource as Xt, crud as Y, memoryMembershipSource as Yt, writable as Z, memorySnapshotSource as Zt, DECISION_EVENT_SCHEMA as _, CustomRoleValidation as _n, ArazzoSimulateInput as _t, catalogFingerprint as a, RoleNameOf as an, customRoleSource as at, EVENT_SCHEMA_IDS as b, customRoleClaim as bn, simulateArazzo as bt, OCSF_VERSION as c, separationConflicts as cn, ShadowMismatch as ct, accessToOcsf as d, fromSnapshot as dn, defineApp as dt, findPermission as en, definePermissions as et, toOcsf as f, parseSnapshot as fn, AppOptions as ft, CREDENTIAL_EVENT_SCHEMA as g, CustomRoleRename as gn, ArazzoPlan as gt, CATALOG_EVENT_SCHEMA as h, CustomRoleEntry as hn, ArazzoFinding as ht, canonicalJson as i, mergePermissions as in, CustomRoleSourceOptions as it, RoleChangeDecision as j, WhoCan as jt, RoleChangeCheck as k, Holder as kt, OcsfAuthorizeSession as l, requiresApproval as ln, ShadowOptions as lt, AUTOMATION_EVENT_SCHEMA as m, CustomRoleDropReason as mn, localSnapshotManifest as mt, delegatedPermissions as n, isPermission as nn, snapshotFor as nt, CSV_COLUMNS as o, definePolicy as on, mayAccess as ot, ACCESS_EVENT_SCHEMA as p, CustomRoleDrop as pn, AppProfile as pt, normalizeAssurance as q, memoryCustomRoleSource as qt, sha256Digest as r, listPermissions as rn, CustomRoleReader as rt, toCsvRow as s, isRoleName as sn, LegacyCheck as st, coveredByDelegation as t, getResource as tn, SnapshotForOptions as tt, OcsfUserManagement as u, emptySnapshot as un, shadowMode as ut, DELIVERY_EVENT_SCHEMA as v, ResolvedCustomRole as vn, ArazzoStepResult as vt, parseCloudEvent as w, claim as wn, signSnapshot as wt, MEMBERSHIP_EVENT_SCHEMA as x, parseCustomRoleEntry as xn, deliveryEvent as xt, DIRECTORY_EVENT_SCHEMA as y, ValidateCustomRoleOptions as yn, arazzoFindings as yt, resolveScope as z, composeMemberships as zt };
|