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
package/dist/testing/index.js
CHANGED
|
@@ -1,44 +1,45 @@
|
|
|
1
1
|
import { r as isRecord } from "../compact-CAf557ZB.js";
|
|
2
2
|
import { n as freezeDeep } from "../freeze-jjan0lCv.js";
|
|
3
3
|
import { i as principal } from "../refs-C8BKxc_e.js";
|
|
4
|
-
import { n as role, r as allow } from "../role-builder-
|
|
5
|
-
import {
|
|
4
|
+
import { n as role, r as allow } from "../role-builder-CMW4wWzn.js";
|
|
5
|
+
import { A as memoryCustomRoleSource, C as limits, D as approvalPoliciesFor, d as snapshotFor, w as memoryLimitStore } from "../src-Brzq_0in.js";
|
|
6
6
|
import { t as memoryRevocationFeed } from "../revocations-Bhr0aMIC.js";
|
|
7
7
|
import { n as loadPrincipalByIdentity, t as loadPrincipal } from "../principal-source-C6N60GtM.js";
|
|
8
8
|
import { v as resource } from "../permission-registry-B8tYxPIt.js";
|
|
9
9
|
import { d as isoNow, f as nowMillis, p as nowSeconds, u as isoAt } from "../time-nR1JesoH.js";
|
|
10
10
|
import { r as parseAutomation } from "../automation-x3KEUusw.js";
|
|
11
|
-
import {
|
|
12
|
-
import { u as evaluateCondition } from "../delegation-
|
|
11
|
+
import { d as scopeList, o as normalizeMemberships } from "../scopes-BSdYaGHs.js";
|
|
12
|
+
import { u as evaluateCondition } from "../delegation-aK4T_5WU.js";
|
|
13
13
|
import { a as authenticated } from "../grantee-Dke-9rd1.js";
|
|
14
14
|
import { t as byCodePoint } from "../compare-DTfyUunF.js";
|
|
15
|
-
import { r as definePolicy } from "../policy-
|
|
16
|
-
import { c as mergeHostedGrants, l as parsePolicyDocument } from "../hosted-
|
|
17
|
-
import {
|
|
18
|
-
import { T as validateCustomRole } from "../evaluate-
|
|
19
|
-
import { n as parseSnapshot } from "../snapshot-
|
|
20
|
-
import { n as fromSnapshot } from "../from-snapshot-
|
|
21
|
-
import { t as getPermDock } from "../permdock-
|
|
15
|
+
import { r as definePolicy } from "../policy-cV_wwPb8.js";
|
|
16
|
+
import { c as mergeHostedGrants, l as parsePolicyDocument } from "../hosted-waouw2V-.js";
|
|
17
|
+
import { i as rootMembershipId } from "../subject-C7RddW0G.js";
|
|
18
|
+
import { T as validateCustomRole } from "../evaluate-Czbj7thS.js";
|
|
19
|
+
import { n as parseSnapshot } from "../snapshot-DN_8J27z.js";
|
|
20
|
+
import { n as fromSnapshot } from "../from-snapshot-DMlSSo9b.js";
|
|
21
|
+
import { t as getPermDock } from "../permdock-D-_WrdKu.js";
|
|
22
22
|
import { t as APPROVAL_HEADER } from "../types-CcUXciSj.js";
|
|
23
|
-
import { i as memoryApprovalStore } from "../store-
|
|
23
|
+
import { i as memoryApprovalStore } from "../store-DmVqy74I.js";
|
|
24
|
+
import { t as definePermissions } from "../permissions-BaoLxy66.js";
|
|
24
25
|
import { t as catalogFingerprint } from "../catalog-fingerprint-e6aCWosn.js";
|
|
25
|
-
import { s as parseCredential } from "../credential-
|
|
26
|
+
import { s as parseCredential } from "../credential-B3Hj4puZ.js";
|
|
26
27
|
import { c as problemFromDecision } from "../problem-BVLHFK33.js";
|
|
27
|
-
import { o as resolveApproval } from "../helpers-
|
|
28
|
-
import { t as APPROVAL_REQUEST_SCHEMA } from "../request-schema-
|
|
29
|
-
import { t as catalogSchema } from "../schema-
|
|
30
|
-
import { t as supabaseMembershipsBudget } from "../budget-
|
|
31
|
-
import { c as parseApiKey } from "../server-
|
|
28
|
+
import { o as resolveApproval } from "../helpers-DmqGy63f.js";
|
|
29
|
+
import { t as APPROVAL_REQUEST_SCHEMA } from "../request-schema-CMP8Cmxd.js";
|
|
30
|
+
import { t as catalogSchema } from "../schema-CuX70xgH.js";
|
|
31
|
+
import { t as supabaseMembershipsBudget } from "../budget-BBCPDOGP.js";
|
|
32
|
+
import { c as parseApiKey } from "../server-D0PW6ZCw.js";
|
|
32
33
|
import { n as discoverAuthorizationServer } from "../device-BwbJNmb2.js";
|
|
33
34
|
import { t as CONNECTOR_SCHEMA } from "../connector-schema-CYLQNMYq.js";
|
|
34
|
-
import { l as sha256Hex, n as scimHandler, t as directoryMembershipSource } from "../scim-
|
|
35
|
+
import { l as sha256Hex, n as scimHandler, t as directoryMembershipSource } from "../scim-C30QBBoF.js";
|
|
35
36
|
import { c as quoteSqlTable, o as quoteSqlIdent } from "../sql-0WjxIp9g.js";
|
|
36
|
-
import { i as cloudEndpoints, n as cloud, s as approverHeaders, t as bearerChallenge } from "../challenge-
|
|
37
|
-
import { t as supabaseManifestSchema } from "../manifest-schema-
|
|
38
|
-
import { t as PUSHED_POLICY_SCHEMA } from "../pushed-policy-
|
|
39
|
-
import { i as policyMatrixLayout, n as testRlsParity, r as policyMatrix, t as testOrmParity } from "../core-
|
|
40
|
-
import { i as saasPermissions } from "../permissions-
|
|
41
|
-
import { C as saasOrg, E as saasSeed, S as saasMemberships, a as saasProject, g as verifySaasSession, h as signSaasToken, k as saasPolicy, t as saasDoc, w as saasPrincipal, x as saasCustomRoles } from "../saas-
|
|
37
|
+
import { i as cloudEndpoints, n as cloud, s as approverHeaders, t as bearerChallenge } from "../challenge-B2O2OLEk.js";
|
|
38
|
+
import { t as supabaseManifestSchema } from "../manifest-schema-CsFsYLF-.js";
|
|
39
|
+
import { t as PUSHED_POLICY_SCHEMA } from "../pushed-policy-BecMsTtM.js";
|
|
40
|
+
import { i as policyMatrixLayout, n as testRlsParity, r as policyMatrix, t as testOrmParity } from "../core-B8sLve3z.js";
|
|
41
|
+
import { i as saasPermissions } from "../permissions-B3ggI88M.js";
|
|
42
|
+
import { C as saasOrg, E as saasSeed, S as saasMemberships, a as saasProject, g as verifySaasSession, h as signSaasToken, k as saasPolicy, t as saasDoc, w as saasPrincipal, x as saasCustomRoles } from "../saas-B8H1MsQ3.js";
|
|
42
43
|
import { t as POLICY_NOT_PUBLISHED } from "../problem-types-DSsRfONQ.js";
|
|
43
44
|
import { t as require__2020 } from "../2020-CJbO8Bvz.js";
|
|
44
45
|
import { afterAll, assert, beforeAll, describe, expect, expectTypeOf, it, vi } from "vitest";
|
|
@@ -135,12 +136,14 @@ function leadSnapshot() {
|
|
|
135
136
|
memberships: [
|
|
136
137
|
...saasMemberships("gina"),
|
|
137
138
|
{
|
|
138
|
-
|
|
139
|
+
scope: "tenant",
|
|
140
|
+
id: "globex",
|
|
139
141
|
roles: ["viewer"]
|
|
140
142
|
},
|
|
141
143
|
{
|
|
142
|
-
tenant: "globex",
|
|
143
|
-
|
|
144
|
+
within: { tenant: "globex" },
|
|
145
|
+
scope: "team",
|
|
146
|
+
id: "team-a",
|
|
144
147
|
roles: ["lead"]
|
|
145
148
|
}
|
|
146
149
|
]
|
|
@@ -573,7 +576,10 @@ function createDomain$2() {
|
|
|
573
576
|
const principal = saasPrincipal(sub, orgOf(path));
|
|
574
577
|
return {
|
|
575
578
|
...principal,
|
|
576
|
-
memberships: (principal.memberships ?? []).filter((membership) =>
|
|
579
|
+
memberships: (principal.memberships ?? []).filter((membership) => {
|
|
580
|
+
const tenant = membership.within?.["tenant"] ?? rootMembershipId(membership);
|
|
581
|
+
return tenant === void 0 || !demoted.has(demotionKey(sub, tenant));
|
|
582
|
+
})
|
|
577
583
|
};
|
|
578
584
|
};
|
|
579
585
|
return {
|
|
@@ -1874,7 +1880,8 @@ function tenantApprover(tenant) {
|
|
|
1874
1880
|
id: "u_9",
|
|
1875
1881
|
roles: [],
|
|
1876
1882
|
memberships: [{
|
|
1877
|
-
tenant,
|
|
1883
|
+
scope: "tenant",
|
|
1884
|
+
id: tenant,
|
|
1878
1885
|
roles: ["admin"]
|
|
1879
1886
|
}]
|
|
1880
1887
|
},
|
|
@@ -2013,7 +2020,7 @@ function testApprovalStore(store, options = {}) {
|
|
|
2013
2020
|
by: member
|
|
2014
2021
|
}))).rejects.toThrow(/eligible|not pending|not found/u);
|
|
2015
2022
|
});
|
|
2016
|
-
it("refuses the principal as approver unless the grant sets
|
|
2023
|
+
it("refuses the principal as approver unless the grant sets mode: confirm", async () => {
|
|
2017
2024
|
const principal = {
|
|
2018
2025
|
principal: {
|
|
2019
2026
|
id: "u_1",
|
|
@@ -2024,9 +2031,9 @@ function testApprovalStore(store, options = {}) {
|
|
|
2024
2031
|
const shapes = [
|
|
2025
2032
|
["self-human", void 0],
|
|
2026
2033
|
["self-by", { by: admin$2 }],
|
|
2027
|
-
["self-
|
|
2034
|
+
["self-authorize", {
|
|
2028
2035
|
by: admin$2,
|
|
2029
|
-
|
|
2036
|
+
mode: "authorize"
|
|
2030
2037
|
}]
|
|
2031
2038
|
];
|
|
2032
2039
|
for (const [token, approvers] of shapes) {
|
|
@@ -2044,7 +2051,7 @@ function testApprovalStore(store, options = {}) {
|
|
|
2044
2051
|
...sampleApproval("self-optout"),
|
|
2045
2052
|
approvers: {
|
|
2046
2053
|
by: admin$2,
|
|
2047
|
-
|
|
2054
|
+
mode: "confirm"
|
|
2048
2055
|
}
|
|
2049
2056
|
});
|
|
2050
2057
|
const resolved = await store.resolve("self-optout", {
|
|
@@ -2183,7 +2190,7 @@ function testApprovalStore(store, options = {}) {
|
|
|
2183
2190
|
await store.create({
|
|
2184
2191
|
...sampleApproval("stages-token"),
|
|
2185
2192
|
approvers: {
|
|
2186
|
-
|
|
2193
|
+
combine: "sequential",
|
|
2187
2194
|
stages: [{ by: {
|
|
2188
2195
|
kind: "user",
|
|
2189
2196
|
id: "u_10"
|
|
@@ -2499,6 +2506,16 @@ function testVersionCache(cache) {
|
|
|
2499
2506
|
expect(await cache.current(principal, read, { live: false })).toBe(1);
|
|
2500
2507
|
expect(calls.count).toBe(1);
|
|
2501
2508
|
});
|
|
2509
|
+
it("answers a read from a seed and never lowers a seeded version", async () => {
|
|
2510
|
+
const { calls, read } = counted(1);
|
|
2511
|
+
const principal = { id: "u-version-seed" };
|
|
2512
|
+
cache.seed(principal.id, 6);
|
|
2513
|
+
cache.seed(principal.id, 5);
|
|
2514
|
+
if (cache.maxStaleMs > 0) {
|
|
2515
|
+
expect(await cache.current(principal, read, { live: false })).toBe(6);
|
|
2516
|
+
expect(calls.count).toBe(0);
|
|
2517
|
+
}
|
|
2518
|
+
});
|
|
2502
2519
|
it("reads again after evict", async () => {
|
|
2503
2520
|
const { calls, read } = counted(3);
|
|
2504
2521
|
const principal = { id: "u-version-evict" };
|
|
@@ -2509,6 +2526,60 @@ function testVersionCache(cache) {
|
|
|
2509
2526
|
expect(cache.stats().reads).toBeGreaterThanOrEqual(2);
|
|
2510
2527
|
});
|
|
2511
2528
|
}
|
|
2529
|
+
/**
|
|
2530
|
+
* The `InstanceCache` contract: one build per key while it lives, a shared
|
|
2531
|
+
* build in flight, no stored rejection, and `evict` dropping a principal's
|
|
2532
|
+
* entries.
|
|
2533
|
+
*/
|
|
2534
|
+
function testInstanceCache(cache) {
|
|
2535
|
+
const key = (principal, version = 1) => ({
|
|
2536
|
+
principal,
|
|
2537
|
+
version,
|
|
2538
|
+
intent: "read",
|
|
2539
|
+
parts: {}
|
|
2540
|
+
});
|
|
2541
|
+
const counted = () => {
|
|
2542
|
+
const calls = { count: 0 };
|
|
2543
|
+
const build = async () => {
|
|
2544
|
+
calls.count += 1;
|
|
2545
|
+
return { n: calls.count };
|
|
2546
|
+
};
|
|
2547
|
+
return {
|
|
2548
|
+
calls,
|
|
2549
|
+
build
|
|
2550
|
+
};
|
|
2551
|
+
};
|
|
2552
|
+
it("builds once per key and keys versions apart", async () => {
|
|
2553
|
+
const { calls, build } = counted();
|
|
2554
|
+
const first = await cache.instance(key("u-instance-key"), [], build);
|
|
2555
|
+
const again = await cache.instance(key("u-instance-key"), [], build);
|
|
2556
|
+
const next = await cache.instance(key("u-instance-key", 2), [], build);
|
|
2557
|
+
if (cache.maxAgeMs > 0) {
|
|
2558
|
+
expect(again).toBe(first);
|
|
2559
|
+
expect(calls.count).toBe(2);
|
|
2560
|
+
}
|
|
2561
|
+
expect(next).not.toBe(first);
|
|
2562
|
+
});
|
|
2563
|
+
it("shares one build between concurrent calls", async () => {
|
|
2564
|
+
const { calls, build } = counted();
|
|
2565
|
+
const built = await Promise.all(Array.from({ length: 5 }, async () => cache.instance(key("u-instance-shared"), [], build)));
|
|
2566
|
+
expect(new Set(built).size).toBe(1);
|
|
2567
|
+
expect(calls.count).toBe(1);
|
|
2568
|
+
});
|
|
2569
|
+
it("stores no rejected build", async () => {
|
|
2570
|
+
await expect(cache.instance(key("u-instance-failed"), [], () => Promise.reject(/* @__PURE__ */ new Error("down")))).rejects.toThrow("down");
|
|
2571
|
+
const { calls, build } = counted();
|
|
2572
|
+
await cache.instance(key("u-instance-failed"), [], build);
|
|
2573
|
+
expect(calls.count).toBe(1);
|
|
2574
|
+
});
|
|
2575
|
+
it("builds again after evict", async () => {
|
|
2576
|
+
const { calls, build } = counted();
|
|
2577
|
+
await cache.instance(key("u-instance-evict"), [], build);
|
|
2578
|
+
cache.evict("u-instance-evict");
|
|
2579
|
+
await cache.instance(key("u-instance-evict"), [], build);
|
|
2580
|
+
expect(calls.count).toBe(2);
|
|
2581
|
+
});
|
|
2582
|
+
}
|
|
2512
2583
|
//#endregion
|
|
2513
2584
|
//#region src/testing/cloud-api/platform.ts
|
|
2514
2585
|
const CATALOG = "https://permdock.com/schemas/catalog-v1.json";
|
|
@@ -5657,12 +5728,7 @@ function testMembershipSource(source, options) {
|
|
|
5657
5728
|
memberships = [];
|
|
5658
5729
|
}
|
|
5659
5730
|
for (const membership of memberships) {
|
|
5660
|
-
|
|
5661
|
-
membership.scope !== void 0,
|
|
5662
|
-
membership.tenant !== void 0 || membership.team !== void 0,
|
|
5663
|
-
membership.on !== void 0
|
|
5664
|
-
].filter(Boolean);
|
|
5665
|
-
expect(shapes.length).toBe(1);
|
|
5731
|
+
expect(membership.scope === void 0 !== (membership.on === void 0)).toBe(true);
|
|
5666
5732
|
expect(Array.isArray(membership.roles)).toBe(true);
|
|
5667
5733
|
if (options.policy !== void 0) expect(normalizeMemberships([membership], scopeList(options.policy.scopes))).toHaveLength(1);
|
|
5668
5734
|
}
|
|
@@ -5781,7 +5847,8 @@ function testDirectoryStore(store, options) {
|
|
|
5781
5847
|
value: true
|
|
5782
5848
|
}]);
|
|
5783
5849
|
expect(await source.membershipsFor({ id: "00u1" }, { tenant: home })).toStrictEqual([{
|
|
5784
|
-
|
|
5850
|
+
scope: "tenant",
|
|
5851
|
+
id: home,
|
|
5785
5852
|
roles: ["editor"],
|
|
5786
5853
|
via: `group:${group.id}`,
|
|
5787
5854
|
managedBy: "idp"
|
|
@@ -6001,7 +6068,8 @@ const supabaseClaimFixtures = {
|
|
|
6001
6068
|
user_metadata: {
|
|
6002
6069
|
user_role: "admin",
|
|
6003
6070
|
memberships: [{
|
|
6004
|
-
|
|
6071
|
+
scope: "tenant",
|
|
6072
|
+
id: "acme",
|
|
6005
6073
|
roles: ["owner"]
|
|
6006
6074
|
}]
|
|
6007
6075
|
}
|
|
@@ -6017,10 +6085,12 @@ const supabaseClaimFixtures = {
|
|
|
6017
6085
|
...base,
|
|
6018
6086
|
tenant_id: "acme",
|
|
6019
6087
|
memberships: [{
|
|
6020
|
-
|
|
6088
|
+
scope: "tenant",
|
|
6089
|
+
id: "acme",
|
|
6021
6090
|
roles: ["admin"]
|
|
6022
6091
|
}, {
|
|
6023
|
-
|
|
6092
|
+
scope: "tenant",
|
|
6093
|
+
id: "globex",
|
|
6024
6094
|
roles: ["viewer"]
|
|
6025
6095
|
}]
|
|
6026
6096
|
},
|
|
@@ -6029,10 +6099,12 @@ const supabaseClaimFixtures = {
|
|
|
6029
6099
|
roles: [],
|
|
6030
6100
|
tenant: "acme",
|
|
6031
6101
|
memberships: [{
|
|
6032
|
-
|
|
6102
|
+
scope: "tenant",
|
|
6103
|
+
id: "acme",
|
|
6033
6104
|
roles: ["admin"]
|
|
6034
6105
|
}, {
|
|
6035
|
-
|
|
6106
|
+
scope: "tenant",
|
|
6107
|
+
id: "globex",
|
|
6036
6108
|
roles: ["viewer"]
|
|
6037
6109
|
}]
|
|
6038
6110
|
}
|
|
@@ -6586,4 +6658,4 @@ const PROBLEM_EXAMPLES = Object.freeze({
|
|
|
6586
6658
|
}
|
|
6587
6659
|
});
|
|
6588
6660
|
//#endregion
|
|
6589
|
-
export { AGENT_THROWING_ROW, AGENT_THROWING_USER, PROBLEM_EXAMPLES, authzenTodoData, authzenTodoPermissions, authzenTodoPolicy, authzenTodoUsers, authzenTodoVectors, describePolicy, expectTypeOf, jwtFixtureAudience, jwtFixtureIssuer, jwtFixtureJwks, jwtFixtureTokens, policyMatrix, seedRows, snapshotFixture, supabaseClaimFixtures, supabaseClaimVectors, supabaseHookManifestFixture, supabaseMembershipsBudget, testAccessReviewStore, testAgentAdapter, testAgentRuntime, testApprovalDelegationSource, testApprovalPolicySource, testApprovalStore, testApprovalWaiter, testAuthzen, testAutomationSource, testClientParity, testClientStore, testCloudApi, testCredentialVerifier, testCustomRoleSource, testDecisionProvider, testDecisionSink, testDeliveryTransport, testDirectoryStore, testEntitlementSource, testHttpAdapter, testIdempotencyStore, testLegacyParity, testLimitStore, testMembershipSource, testOrmParity, testPolicySource, testPrincipalSource, testRelationSource, testReplayStore, testRevocationFeed, testRlsParity, testSetQueue, testSettingsSource, testSnapshotSource, testSnapshotStorage, testSsfStreamStore, testSubjectResolver, testSupportSessionSource, testTokenSigner, testTokenVerifier, testVersionCache, testWhereCompiler };
|
|
6661
|
+
export { AGENT_THROWING_ROW, AGENT_THROWING_USER, PROBLEM_EXAMPLES, authzenTodoData, authzenTodoPermissions, authzenTodoPolicy, authzenTodoUsers, authzenTodoVectors, describePolicy, expectTypeOf, jwtFixtureAudience, jwtFixtureIssuer, jwtFixtureJwks, jwtFixtureTokens, policyMatrix, seedRows, snapshotFixture, supabaseClaimFixtures, supabaseClaimVectors, supabaseHookManifestFixture, supabaseMembershipsBudget, testAccessReviewStore, testAgentAdapter, testAgentRuntime, testApprovalDelegationSource, testApprovalPolicySource, testApprovalStore, testApprovalWaiter, testAuthzen, testAutomationSource, testClientParity, testClientStore, testCloudApi, testCredentialVerifier, testCustomRoleSource, testDecisionProvider, testDecisionSink, testDeliveryTransport, testDirectoryStore, testEntitlementSource, testHttpAdapter, testIdempotencyStore, testInstanceCache, testLegacyParity, testLimitStore, testMembershipSource, testOrmParity, testPolicySource, testPrincipalSource, testRelationSource, testReplayStore, testRevocationFeed, testRlsParity, testSetQueue, testSettingsSource, testSnapshotSource, testSnapshotStorage, testSsfStreamStore, testSubjectResolver, testSupportSessionSource, testTokenSigner, testTokenVerifier, testVersionCache, testWhereCompiler };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Kt as Instant, _r as Principal, dr as CustomRole, gr as Membership, pr as Delegation, sr as Actor, st as RelationSource, tt as LimitStore, yr as Subject } from "../../policy-types-D-GwfQTc.js";
|
|
2
2
|
import { u as Permission } from "../../permission-types-CAY-GU7e.js";
|
|
3
|
-
import { o as PermDockOptions } from "../../permdock-
|
|
3
|
+
import { o as PermDockOptions } from "../../permdock-ffY4CMd9.js";
|
|
4
4
|
import { a as SaasProject, c as saasPlans, i as SaasFolderSchema, l as saasRoles, n as SaasDocSchema, o as SaasProjectSchema, r as SaasFolder, s as saasPermissions, t as SaasDoc, u as saasTenantRoleNames } from "../../permissions-Bx6UI8n1.js";
|
|
5
|
-
import { n as saasPolicy, t as SAAS_API_KEY_LIMIT } from "../../policy-
|
|
5
|
+
import { n as saasPolicy, t as SAAS_API_KEY_LIMIT } from "../../policy-BtKSApSt.js";
|
|
6
6
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
7
7
|
//#region src/testing/saas/schema.d.ts
|
|
8
8
|
type FieldKind = "string" | "boolean" | "nullable-string";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as saasPlans, c as rowSchema, i as saasPermissions, n as SaasFolderSchema, o as saasRoles, r as SaasProjectSchema, s as saasTenantRoleNames, t as SaasDocSchema } from "../../permissions-
|
|
2
|
-
import { C as saasOrg, D as saasUsers, E as saasSeed, O as SAAS_API_KEY_LIMIT, S as saasMemberships, T as saasRelations, _ as verifySaasToken, a as saasProject, b as SAAS_EXPIRED_AT, c as saasUser, d as saasIssuer, f as saasJwks, g as verifySaasSession, h as signSaasToken, i as saasLimitStore, k as saasPolicy, l as SAAS_TOKEN_TTL_SECONDS, m as saasPublicJwk, n as saasFolder, o as saasScenarioOptions, p as saasPrivateJwk, r as saasFolderScenarios, s as saasScenarios, t as saasDoc, u as saasAudience, v as saasSchemaSql, w as saasPrincipal, x as saasCustomRoles, y as saasSeedSql } from "../../saas-
|
|
1
|
+
import { a as saasPlans, c as rowSchema, i as saasPermissions, n as SaasFolderSchema, o as saasRoles, r as SaasProjectSchema, s as saasTenantRoleNames, t as SaasDocSchema } from "../../permissions-B3ggI88M.js";
|
|
2
|
+
import { C as saasOrg, D as saasUsers, E as saasSeed, O as SAAS_API_KEY_LIMIT, S as saasMemberships, T as saasRelations, _ as verifySaasToken, a as saasProject, b as SAAS_EXPIRED_AT, c as saasUser, d as saasIssuer, f as saasJwks, g as verifySaasSession, h as signSaasToken, i as saasLimitStore, k as saasPolicy, l as SAAS_TOKEN_TTL_SECONDS, m as saasPublicJwk, n as saasFolder, o as saasScenarioOptions, p as saasPrivateJwk, r as saasFolderScenarios, s as saasScenarios, t as saasDoc, u as saasAudience, v as saasSchemaSql, w as saasPrincipal, x as saasCustomRoles, y as saasSeedSql } from "../../saas-B8H1MsQ3.js";
|
|
3
3
|
export { SAAS_API_KEY_LIMIT, SAAS_EXPIRED_AT, SAAS_TOKEN_TTL_SECONDS, SaasDocSchema, SaasFolderSchema, SaasProjectSchema, rowSchema, saasAudience, saasCustomRoles, saasDoc, saasFolder, saasFolderScenarios, saasIssuer, saasJwks, saasLimitStore, saasMemberships, saasOrg, saasPermissions, saasPlans, saasPolicy, saasPrincipal, saasPrivateJwk, saasProject, saasPublicJwk, saasRelations, saasRoles, saasScenarioOptions, saasScenarios, saasSchemaSql, saasSeed, saasSeedSql, saasTenantRoleNames, saasUser, saasUsers, signSaasToken, verifySaasSession, verifySaasToken };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as SaasDocSchema, n as SaasFolderSchema, r as SaasProjectSchema, i as saasPermissions, a as saasPlans, o as saasRoles, s as saasTenantRoleNames } from "../../permissions-
|
|
1
|
+
export { t as SaasDocSchema, n as SaasFolderSchema, r as SaasProjectSchema, i as saasPermissions, a as saasPlans, o as saasRoles, s as saasTenantRoleNames } from "../../permissions-B3ggI88M.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/core/token.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* The hex SHA-256 of `value` as sorted-key JSON: the same string
|
|
4
|
+
* better-supabase's `approvalFingerprint` resolves to, returned synchronously.
|
|
5
|
+
* Pass the exact operation an approval covers (the subject, the action and its
|
|
6
|
+
* arguments) as `fingerprint` so an approval for one change cannot run
|
|
7
|
+
* another.
|
|
8
|
+
*/
|
|
9
|
+
declare function approvalFingerprint(value: unknown): string;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { approvalFingerprint as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as canonicalJson } from "./canonical-json-DwilZ1iB.js";
|
|
2
|
-
import { r as sha256Digest } from "./sha256-C-4WXKIu.js";
|
|
2
|
+
import { n as sha256, r as sha256Digest } from "./sha256-C-4WXKIu.js";
|
|
3
3
|
//#region src/core/token.ts
|
|
4
4
|
/**
|
|
5
5
|
* Only stable identity goes into the token, so refreshing a session (new roles,
|
|
@@ -23,6 +23,18 @@ function versionOf(row, field) {
|
|
|
23
23
|
if (value instanceof Date) return Number.isNaN(value.getTime()) ? null : value.toISOString();
|
|
24
24
|
return typeof value === "string" || typeof value === "number" || typeof value === "bigint" || typeof value === "boolean" ? String(value) : null;
|
|
25
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* The hex SHA-256 of `value` as sorted-key JSON: the same string
|
|
28
|
+
* better-supabase's `approvalFingerprint` resolves to, returned synchronously.
|
|
29
|
+
* Pass the exact operation an approval covers (the subject, the action and its
|
|
30
|
+
* arguments) as `fingerprint` so an approval for one change cannot run
|
|
31
|
+
* another.
|
|
32
|
+
*/
|
|
33
|
+
function approvalFingerprint(value) {
|
|
34
|
+
let hex = "";
|
|
35
|
+
for (const byte of sha256(canonicalJson(value))) hex += byte.toString(16).padStart(2, "0");
|
|
36
|
+
return hex;
|
|
37
|
+
}
|
|
26
38
|
/** The digest that binds a token to the call's data when no row id does. */
|
|
27
39
|
function payloadDigest(data) {
|
|
28
40
|
return sha256Digest(canonicalJson(data));
|
|
@@ -37,10 +49,13 @@ function tokenPayload(resourceId, data, args) {
|
|
|
37
49
|
return resourceId === "*" && data !== void 0 ? payloadDigest(data) : void 0;
|
|
38
50
|
}
|
|
39
51
|
/**
|
|
40
|
-
* `
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
52
|
+
* `source` names what decided: the policy fingerprint, `snapshot:<issuedAt>` or
|
|
53
|
+
* the PDP provider. `version` is set only for an approval that goes stale on a
|
|
54
|
+
* resource change; without it the payload, and so every other token, is
|
|
55
|
+
* unchanged. `payload` is set when `resourceId` is `*` (a collection action or
|
|
56
|
+
* a row without an id), so an approval covers the arguments it was given and no
|
|
57
|
+
* others. `fingerprint` is the caller's `approvalFingerprint` of the exact
|
|
58
|
+
* operation, bound only when given.
|
|
44
59
|
*/
|
|
45
60
|
function decisionToken(input) {
|
|
46
61
|
const payload = canonicalJson({
|
|
@@ -51,11 +66,12 @@ function decisionToken(input) {
|
|
|
51
66
|
id: input.actor.id,
|
|
52
67
|
kind: input.actor.kind
|
|
53
68
|
},
|
|
54
|
-
|
|
69
|
+
source: input.source,
|
|
55
70
|
...input.version === void 0 ? {} : { version: input.version },
|
|
56
|
-
...input.payload === void 0 ? {} : { payload: input.payload }
|
|
71
|
+
...input.payload === void 0 ? {} : { payload: input.payload },
|
|
72
|
+
...input.fingerprint === void 0 ? {} : { fingerprint: input.fingerprint }
|
|
57
73
|
});
|
|
58
74
|
return sha256Digest(payload);
|
|
59
75
|
}
|
|
60
76
|
//#endregion
|
|
61
|
-
export { versionOf as i,
|
|
77
|
+
export { versionOf as a, tokenPayload as i, decisionToken as n, payloadDigest as r, approvalFingerprint as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as wireDenials } from "./wire-denial-C7PaVYEM.js";
|
|
2
|
-
import { n as describe } from "./describe-
|
|
2
|
+
import { n as describe } from "./describe-BZAlPHxT.js";
|
|
3
3
|
//#region src/core/tool-refusal.ts
|
|
4
4
|
function deniedToolRefusal(decision, permission, resource) {
|
|
5
5
|
const alternatives = decision.alternatives.map((leaf) => leaf.key);
|
package/dist/trpc/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { E as Policy, _r as Principal } from "../policy-types-D-GwfQTc.js";
|
|
2
2
|
import { u as Permission } from "../permission-types-CAY-GU7e.js";
|
|
3
|
-
import { a as PermDock } from "../permdock-
|
|
3
|
+
import { a as PermDock } from "../permdock-ffY4CMd9.js";
|
|
4
4
|
import { n as RevocationFeed } from "../revocations-BaUXHM1N.js";
|
|
5
|
-
import { D as ConnectionOptions, T as Connection, i as OpenApiHooks } from "../server-types-
|
|
6
|
-
import { t as ServerAdapterOptions } from "../bind-
|
|
7
|
-
import { t as StreamProtectOptions } from "../stream-
|
|
5
|
+
import { D as ConnectionOptions, T as Connection, i as OpenApiHooks } from "../server-types-3OnXjZ2D.js";
|
|
6
|
+
import { t as ServerAdapterOptions } from "../bind-DR6ku3A9.js";
|
|
7
|
+
import { t as StreamProtectOptions } from "../stream-W2RuUYly.js";
|
|
8
8
|
import { AnyTRPCMiddlewareFunction } from "@trpc/server";
|
|
9
9
|
//#region src/trpc/create.d.ts
|
|
10
10
|
type TrpcMiddlewareOpts<TCtx = object, TInput = unknown> = {
|
package/dist/trpc/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { o as problemMessage } from "../http-DKLXrFGk.js";
|
|
2
|
-
import { t as problemFromError } from "../map-error-
|
|
3
|
-
import { n as attached } from "../bind-
|
|
2
|
+
import { t as problemFromError } from "../map-error-BH16Ah8P.js";
|
|
3
|
+
import { n as attached } from "../bind-B4pMH9bm.js";
|
|
4
4
|
import { i as isAsyncIterable, o as reloadAfter } from "../stream-CDvF0sJm.js";
|
|
5
|
-
import { i as rpcCode, n as guardStream, r as problemBody, t as bindRpcKernel } from "../rpc-
|
|
5
|
+
import { i as rpcCode, n as guardStream, r as problemBody, t as bindRpcKernel } from "../rpc-KwX_Jcxz.js";
|
|
6
6
|
import { TRPCError, isTrackedEnvelope } from "@trpc/server";
|
|
7
7
|
//#region src/trpc/create.ts
|
|
8
8
|
const PROBLEM = Symbol.for("permdock.problem");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { M as PolicyVocabulary, Sn as ScopeNames } from "./policy-types-D-GwfQTc.js";
|
|
2
2
|
import { k as POLICY_SCOPES, u as Permission } from "./permission-types-CAY-GU7e.js";
|
|
3
3
|
import { n as PlanTree } from "./vocabulary-DEJ5j4mR.js";
|
|
4
4
|
import { o as OperationMap } from "./operations-Ci_rT6Uo.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as RoleThrough, m as RoleMap, s as SqlMembershipSource } from "./sources-
|
|
1
|
+
import { h as RoleThrough, m as RoleMap, s as SqlMembershipSource } from "./sources-xdQShLDU.js";
|
|
2
2
|
//#region src/cli/core/errors.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* 0 success, 1 failure, 2 usage, 3 action required, 130 interrupted (SIGINT or
|
|
@@ -435,6 +435,15 @@ type RlsConfig = {
|
|
|
435
435
|
*/
|
|
436
436
|
readonly shims?: boolean | RlsShimsConfig;
|
|
437
437
|
};
|
|
438
|
+
/** `rls.approvals.managers`: one row per user and manager. */
|
|
439
|
+
type RlsApprovalManagers = {
|
|
440
|
+
/** `table` or `schema.table`. */
|
|
441
|
+
readonly table: string;
|
|
442
|
+
/** The column holding the user's id. */
|
|
443
|
+
readonly user: string;
|
|
444
|
+
/** The column holding the id of that user's manager. */
|
|
445
|
+
readonly manager: string;
|
|
446
|
+
};
|
|
438
447
|
/**
|
|
439
448
|
* `rls.approvals` on a table the app already has: the store functions keep each
|
|
440
449
|
* request's body in `body` and its token in `token` (both added when missing)
|
|
@@ -442,6 +451,7 @@ type RlsConfig = {
|
|
|
442
451
|
* app's own columns on each write, converted to their types.
|
|
443
452
|
*/
|
|
444
453
|
type RlsApprovalsAdopt = {
|
|
454
|
+
readonly store?: boolean;
|
|
445
455
|
/**
|
|
446
456
|
* `table` or `schema.table`. Without it the store is the generated
|
|
447
457
|
* `approval_requests`.
|
|
@@ -454,6 +464,22 @@ type RlsApprovalsAdopt = {
|
|
|
454
464
|
* same rows for `approvalsHandler`. Off by default.
|
|
455
465
|
*/
|
|
456
466
|
readonly delegations?: boolean;
|
|
467
|
+
/**
|
|
468
|
+
* Add `approval_policies`, the approval requirements a tenant keeps as data,
|
|
469
|
+
* and `permdock_approval_policies_for`, which `tableApprovalPolicySource`
|
|
470
|
+
* reads. A holder of the `manage` permission key in a tenant writes that
|
|
471
|
+
* tenant's rows; rows with `tenant` null are platform floors, written only by
|
|
472
|
+
* the table owner. Off by default.
|
|
473
|
+
*/
|
|
474
|
+
readonly tenantPolicies?: {
|
|
475
|
+
readonly manage: string;
|
|
476
|
+
};
|
|
477
|
+
/**
|
|
478
|
+
* The app's table that names each user's manager, so `manager()` approvers
|
|
479
|
+
* match in SQL: `permdock_manages` walks it and the four-argument
|
|
480
|
+
* `permdock_is_approver` calls it. Off by default.
|
|
481
|
+
*/
|
|
482
|
+
readonly managers?: RlsApprovalManagers;
|
|
457
483
|
/** A text column unique per request. Default `token`. */
|
|
458
484
|
readonly token?: string;
|
|
459
485
|
/** A jsonb column holding the `ApprovalRequest`. Default `body`. */
|
|
@@ -811,6 +837,19 @@ type SupabaseHookConfig = {
|
|
|
811
837
|
* `true`.
|
|
812
838
|
*/
|
|
813
839
|
readonly version?: boolean;
|
|
840
|
+
/**
|
|
841
|
+
* Broadcast every version bump as `{ user_id, version }` with event `changed`
|
|
842
|
+
* on `topic`, which no user may join, and on the user's own `authz:<uid>`.
|
|
843
|
+
* `topic` defaults to `better_supabase:authz` in a better-supabase project,
|
|
844
|
+
* else `permdock:authz`. `receivePolicy` writes the `realtime.messages`
|
|
845
|
+
* policy that lets a user receive `authz:<uid>`; it defaults to `true`, and
|
|
846
|
+
* to `false` when better-supabase's `sessions.authzVersions` writes the same
|
|
847
|
+
* policy. `false` sends nothing.
|
|
848
|
+
*/
|
|
849
|
+
readonly broadcast?: false | {
|
|
850
|
+
readonly topic?: string;
|
|
851
|
+
readonly receivePolicy?: boolean;
|
|
852
|
+
};
|
|
814
853
|
/**
|
|
815
854
|
* Write PostgREST wrappers for `subject_for`, `members_of` and
|
|
816
855
|
* `authz_version_for` into `schema` (default `public`), named
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { E as Policy, M as PolicyVocabulary, Qn as ExplainedDecision, _r as Principal, gr as Membership, qn as Decision, 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 {
|
|
3
|
+
import { a as PermDock, f as WhereResult, k as PermissionCheck, l as SimulateOptions, n as DecideOptions, o as PermDockOptions, r as DeriveOptions } from "./permdock-ffY4CMd9.js";
|
|
4
4
|
//#region src/pdp/types.d.ts
|
|
5
5
|
type RemotePdpAuth = {
|
|
6
6
|
readonly bearer: string | (() => string | Promise<string>);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { s as CloudEvent } from "./sink-
|
|
3
|
-
import { t as ApprovalPrompt } from "./approval-prompt-
|
|
1
|
+
import { $n as GrantedDecision, dn as DeliveryFailureCause, ln as DeliveryChannel, pn as EmailCategory, un as DeliveryEvent } from "./policy-types-D-GwfQTc.js";
|
|
2
|
+
import { s as CloudEvent } from "./sink-ogbVkyeo.js";
|
|
3
|
+
import { t as ApprovalPrompt } from "./approval-prompt-Bg7gDSqd.js";
|
|
4
4
|
//#region src/delivery/types.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Who a delivery goes to. `{ principal }` names an app principal and the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { wn as Approver } from "./policy-types-D-GwfQTc.js";
|
|
2
2
|
//#region src/approvals/access-reviews/types.d.ts
|
|
3
3
|
type AccessReviewStatus = "open" | "closed";
|
|
4
4
|
type AccessReviewItemStatus = "pending" | "kept" | "revoked";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { m as ApprovalStore } from "./types-
|
|
1
|
+
import { Q as JwtClaims, _r as Principal, _t as TokenVerifier, an as AuthEvent, ht as TokenFailureCause, rt as MembershipSource, sr as Actor, yr as Subject } from "./policy-types-D-GwfQTc.js";
|
|
2
|
+
import { m as ApprovalStore } from "./types-CqcsNCaN.js";
|
|
3
3
|
import { n as RevocationFeed } from "./revocations-BaUXHM1N.js";
|
|
4
4
|
import { t as ClaimsMap } from "./claims-map-D1Pb5oRq.js";
|
|
5
5
|
import { t as ClientNames } from "./clients-C_NOET3z.js";
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Kt as Instant, Ln as RelationGrantee, Sr as AdapterId, gr as Membership, i as ApprovalMode, n as ApprovalCombine, s as ApprovalStage, vn as WireDelegation, wn as Approver, yr as Subject } from "./policy-types-D-GwfQTc.js";
|
|
2
2
|
import { M as AppData } from "./permission-types-CAY-GU7e.js";
|
|
3
3
|
//#region src/approvals/types.d.ts
|
|
4
4
|
type ApprovalStatus = "pending" | "approved" | "rejected" | "expired";
|
|
5
5
|
type ApprovalApprovers = {
|
|
6
|
-
/** Under `
|
|
6
|
+
/** Under `combine: 'any'` (the default). */
|
|
7
7
|
readonly by?: Approver | readonly Approver[];
|
|
8
|
-
readonly
|
|
9
|
-
/** Under `
|
|
8
|
+
readonly combine?: ApprovalCombine;
|
|
9
|
+
/** Under `combine: 'all'` or `'sequential'`. */
|
|
10
10
|
readonly stages?: readonly ApprovalStage[];
|
|
11
|
-
/**
|
|
12
|
-
|
|
11
|
+
/**
|
|
12
|
+
* `'confirm'` lets the request's principal approve it; absent means
|
|
13
|
+
* `'authorize'`.
|
|
14
|
+
*/
|
|
15
|
+
readonly mode?: ApprovalMode;
|
|
13
16
|
/** Set when the approval no longer applies once the row's `version` changes. */
|
|
14
17
|
readonly staleOn?: "resource-change";
|
|
15
18
|
/**
|
|
@@ -123,6 +126,12 @@ type ApprovalRequest = {
|
|
|
123
126
|
readonly vouched?: string;
|
|
124
127
|
readonly note?: string;
|
|
125
128
|
readonly consumedAt?: string;
|
|
129
|
+
/**
|
|
130
|
+
* The caller's `approvalFingerprint` of the exact operation, from the
|
|
131
|
+
* decision's `fingerprint`. Consuming or resuming under another one fails
|
|
132
|
+
* with `approval-fingerprint-mismatch`.
|
|
133
|
+
*/
|
|
134
|
+
readonly fingerprint?: string;
|
|
126
135
|
/**
|
|
127
136
|
* The application's own data, set when the request opens; plain JSON, never
|
|
128
137
|
* read by a decision.
|
|
@@ -213,7 +222,7 @@ type ApprovalStore = {
|
|
|
213
222
|
consume: (token: string, now?: Instant) => Promise<ApprovalRequest | null> | ApprovalRequest | null;
|
|
214
223
|
cancel?: (filter: ApprovalListFilter, meta: ApprovalCancelMeta) => Promise<number> | number;
|
|
215
224
|
};
|
|
216
|
-
type ApprovalResumeFailureCause = "approval-not-found" | "approval-pending" | "approval-rejected" | "approval-expired" | "approval-consumed";
|
|
225
|
+
type ApprovalResumeFailureCause = "approval-not-found" | "approval-pending" | "approval-rejected" | "approval-expired" | "approval-consumed" | "approval-fingerprint-mismatch";
|
|
217
226
|
type ApprovalInspectResult = {
|
|
218
227
|
readonly ok: true;
|
|
219
228
|
readonly request: ApprovalRequest;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { s as PolicySource } from "./hosted-
|
|
3
|
-
import { m as ApprovalStore, u as ApprovalRequest } from "./types-
|
|
4
|
-
import { a as CatalogDocument } from "./types-
|
|
5
|
-
import { a as CatalogFinding } from "./sink-
|
|
1
|
+
import { Y as DecisionSink, _t as TokenVerifier, gt as TokenSigner, lt as SnapshotSource, yr as Subject } from "./policy-types-D-GwfQTc.js";
|
|
2
|
+
import { s as PolicySource } from "./hosted-BFNXwcjd.js";
|
|
3
|
+
import { m as ApprovalStore, u as ApprovalRequest } from "./types-CqcsNCaN.js";
|
|
4
|
+
import { a as CatalogDocument } from "./types-NYoj8JBm.js";
|
|
5
|
+
import { a as CatalogFinding } from "./sink-ogbVkyeo.js";
|
|
6
6
|
//#region src/cloud/types.d.ts
|
|
7
7
|
type CloudEndpointOptions = {
|
|
8
8
|
readonly url?: string;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $n as GrantedDecision, $t as Snapshot, Kn as ApprovalRequiredDecision, _t as TokenVerifier, qn as Decision } from "./policy-types-D-GwfQTc.js";
|
|
2
2
|
import { u as Permission } from "./permission-types-CAY-GU7e.js";
|
|
3
|
-
import { a as PermDock } from "./permdock-
|
|
3
|
+
import { a as PermDock } from "./permdock-ffY4CMd9.js";
|
|
4
4
|
import { t as PermissionBoundaryState } from "./boundary-C9ck-3uK.js";
|
|
5
|
-
import { t as ActionResult } from "./
|
|
6
|
-
import { d as ProtectedActionView, f as ProviderOptionsBase, g as ClientStore, l as PermissionState } from "./types-tQB2CEnY.js";
|
|
5
|
+
import { d as PermissionState, m as ProviderOptionsBase, p as ProtectedActionView, t as ClientStore, v as ActionResult } from "./store-DYeB-_U3.js";
|
|
7
6
|
import { Snippet } from "svelte";
|
|
8
7
|
import { Readable } from "svelte/store";
|
|
9
8
|
//#region src/client/views.d.ts
|