permdock 0.16.0 → 0.17.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-Ci0xiJ3T.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-4KxMRdJC.js +189 -0
- package/dist/approval-policies-9VagPixq.d.ts +138 -0
- package/dist/{approval-prompt-3BqWczTt.d.ts → approval-prompt-BSh-yxbH.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-DdFcTncq.js} +3 -3
- package/dist/{approvers-B4r0N_Uz.js → approvers-CNtl4Vc5.js} +22 -1
- package/dist/{arazzo-CHoYnQXO.js → arazzo-7kbeh1yi.js} +2 -2
- package/dist/{arazzo-ClYz2Z0W.js → arazzo-_zUmT8ZT.js} +4 -4
- 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-jRO819i3.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-DCWuVKtd.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 +273 -38
- package/dist/better-supabase/index.js +493 -102
- package/dist/{better-supabase-Dirf_8Ec.js → better-supabase-BJtQ-kNf.js} +26 -10
- package/dist/{bind-BNQA9JK9.js → bind-BJFeLX1V.js} +6 -6
- package/dist/{bind-YYjvfpB9.d.ts → bind-DjFNX0Pq.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-lye7oEqf.js} +3 -2
- package/dist/{capability-Di9tiUvi.d.ts → capability-BzjWdKmP.d.ts} +1 -1
- package/dist/{capability-BqX94r07.js → capability-zN6T9fxe.js} +2 -3
- package/dist/{casbin-C9EvElBb.js → casbin-C3O_O9nu.js} +2 -2
- package/dist/{casbin-D_rVQ31U.js → casbin-DFzk_so3.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 +6 -6
- package/dist/catalog-BpnjesqX.js +1 -0
- package/dist/{catalog-CGlSwU6j.js → catalog-DGDd_ww1.js} +5 -5
- package/dist/{catalog-amPDr0JQ.js → catalog-DJJIkR9P.js} +3 -3
- package/dist/{catalog-doc-DjMKzJp9.js → catalog-doc-C4DGfJCO.js} +3 -3
- package/dist/{catalog-operations-DeHTrJSV.js → catalog-operations-DVI5QO5R.js} +3 -3
- package/dist/{challenge-DImNcR7B.js → challenge-M_ghKJnT.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/cloud/index.d.ts +8 -8
- package/dist/cloud/index.js +1 -1
- package/dist/{cloud-DdaJ7ILM.js → cloud-DYqzmh5i.js} +4 -4
- package/dist/{codemod-ammy6wv4.js → codemod-DNGMGqBS.js} +395 -8
- package/dist/{codemod-B1USJS7a.js → codemod-DqB9klYI.js} +3 -3
- package/dist/{collect-DnXL4B8c.js → collect-C44RrKCI.js} +4 -4
- package/dist/collect-CAibhmCi.js +1 -0
- package/dist/{collect-WCl8cJQV.js → collect-HfJXl8Tr.js} +4 -4
- 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-BxiwRotu.d.ts} +2 -2
- package/dist/{completion--Y4YItFZ.js → completion-pwVjJlek.js} +3 -3
- package/dist/{config-CcLlvEYW.js → config-COHmivz9.js} +4 -4
- package/dist/{config-BQ77xMZk.js → config-DnfH6_eT.js} +2 -2
- package/dist/{config-report-DVMOLJ7F.js → config-report-C1jl7Na-.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-CFepFiDP.d.ts → core-0iYZ5HUx.d.ts} +2 -2
- package/dist/{core-lxoANyai.js → core-W5f4Rjt0.js} +7 -7
- package/dist/{create-DBvUsgzK.d.ts → create-DNN3OtsO.d.ts} +4 -4
- package/dist/{create-CDd9c22W.d.ts → create-DrHUmKvG.d.ts} +6 -6
- package/dist/{create-BPUopdfL.d.ts → create-bzQlBzG4.d.ts} +7 -7
- package/dist/{create-Coq5fIrq.js → create-gqtDb1nU.js} +5 -5
- package/dist/{create-BLPKnJKa.js → create-jCPwPWXf.js} +6 -5
- 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-DyzWwxEB.d.ts} +1 -1
- package/dist/{describe-Bb4hGK5d.js → describe-CogP1loh.js} +2 -1
- package/dist/{describe-BbFPBSms.d.ts → describe-nalX_HHE.d.ts} +1 -1
- package/dist/{diff-DfmYaIhB.js → diff-BTsLiW59.js} +7 -7
- package/dist/{diff-CxtbOi2l.js → diff-CcxYooMu.js} +2 -2
- package/dist/{doctor-CwYc2lJb.js → doctor-BNRhJegR.js} +3 -3
- package/dist/{doctor-D1Xnmy6u.js → doctor-DS-9ApID.js} +195 -30
- 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-Dc9FdamT.d.ts} +1 -1
- package/dist/{evaluate-BAmf_AQd.js → evaluate-CsjXeLRo.js} +18 -15
- package/dist/{evaluations-DOWuBpWv.d.ts → evaluations-BasA9zXp.d.ts} +3 -3
- package/dist/{evaluations-IBceAeKT.js → evaluations-DG40eSJa.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-BgqpOOpd.d.ts} +2 -2
- package/dist/{fetch-adapter-dPTgJVHd.js → fetch-adapter-UZOW0PRC.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-0VTW5oNq.js} +2 -2
- 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-CNCzG4sB.js} +2 -2
- package/dist/{gen-DuAhghDw.js → gen-DnpZwQPo.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-DNnZffrI.js} +76 -12
- package/dist/hono/index.d.ts +4 -4
- package/dist/hono/index.js +3 -3
- package/dist/{hosted-DVxlLZMe.d.ts → hosted-DxRLLiFU.d.ts} +1 -1
- package/dist/{hosted-D0IzESu_.js → hosted-tPZnyjQS.js} +12 -10
- package/dist/{http-DOL33cO0.js → http-DhMWeB_h.js} +1 -1
- package/dist/{import-Dfe2unKO.js → import-BYVbSKx0.js} +3 -3
- package/dist/{import-CNBF96hB.js → import-C1XXpG_m.js} +4 -4
- package/dist/{index-Cay5-Kvx.d.ts → index-Bt-UoBWu.d.ts} +11 -10
- package/dist/{index-DJwEgYzA.d.ts → index-CXXUFWtG.d.ts} +17 -11
- package/dist/{index-Dj2qF9VC.d.ts → index-CZ5mixHO.d.ts} +1 -1
- package/dist/{index-ymept53A.d.ts → index-DFwUOkvt.d.ts} +4 -4
- package/dist/{index-CV-7DWeD.d.ts → index-DtGtDzjb.d.ts} +4 -4
- package/dist/{index-BinlXeU-.d.ts → index-z44pfWar.d.ts} +2 -2
- package/dist/index.d.ts +18 -16
- package/dist/index.js +20 -18
- package/dist/{init-C6cWP3xW.js → init-Dr1qAStu.js} +5 -5
- package/dist/{init-BUo2G-FI.js → init-YSDySeMy.js} +5 -5
- package/dist/{instance-options-CoHn-0e8.d.ts → instance-options-BOCRxEFb.d.ts} +2 -2
- package/dist/{instance-snapshot-DuWf1cT3.js → instance-snapshot-BgOGtyCy.js} +15 -12
- package/dist/jwt/index.d.ts +4 -4
- package/dist/jwt/index.js +3 -3
- package/dist/{kernel-BD8QuMnv.js → kernel-CDDU93dI.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-CXgEKLaW.js} +4 -4
- package/dist/{login-DCKE5pVy.js → login-DEVXDTX8.js} +4 -4
- package/dist/{manifest-Cft51TLK.js → manifest-Dij1U0hx.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-B_f3C5cs.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 +32 -13
- package/dist/next/index.js +43 -25
- 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-D3wkvOoU.js} +4 -4
- package/dist/{openapi-DSzQN7Zu.js → openapi-GM-kTdkq.js} +5 -5
- 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-DhTpe8v1.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-moSRhxl_.js} +6 -6
- package/dist/{parse-1_ZheTW5.js → parse-UTC-sDrt.js} +2 -2
- package/dist/{parse-local-manifest-CCmbhnxP.d.ts → parse-local-manifest-BgTYdR3q.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-CprAPN3w.d.ts → permdock-DUWZEOLR.d.ts} +88 -131
- package/dist/{permdock-BvjivVb9.js → permdock-DdzMv5-F.js} +195 -102
- package/dist/{permissions-CYcHj_w7.js → permissions-CvpPtz5O.js} +1 -1
- package/dist/{pg-DQTqRrou.js → pg-Ddxsd5ZB.js} +2 -2
- package/dist/{policy-BycVKnXv.d.ts → policy-CTNl7pvN.d.ts} +1 -1
- package/dist/{policy-CLQ8__GF.js → policy-DxQyHKPB.js} +5 -4
- package/dist/{policy-from-catalog-CU3An8uP.js → policy-from-catalog-DVa1faOr.js} +8 -7
- package/dist/{policy-types-DGIO_gxq.d.ts → policy-types-IRJVABmm.d.ts} +63 -19
- package/dist/{postgrest-D5nUGm-c.d.ts → postgrest-B_cEDd4e.d.ts} +12 -7
- package/dist/{postgrest-DAxFltvO.js → postgrest-BrjrckDG.js} +74 -19
- package/dist/{powersync-DAfo0EL5.js → powersync-BZxw_v-A.js} +3 -3
- package/dist/{powersync-CBhTBhG2.js → powersync-C0nsyULQ.js} +15 -15
- package/dist/powersync-Cqzx25dI.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-DUYqb-Ma.js → protected-action-B6n6w7Rl.js} +1 -1
- package/dist/{protected-action-D8x73IGm.d.ts → protected-action-D3S9U4nc.d.ts} +14 -7
- package/dist/{protected-action-QEA8arRB.js → protected-action-qowj6nxN.js} +15 -5
- package/dist/{provider-C55OGXJ7.js → provider-CY4TSSJo.js} +2 -2
- package/dist/{provider-DfLeek9O.d.ts → provider-CjAu39fJ.d.ts} +1 -1
- package/dist/{provider-store-CaTv00tr.js → provider-store-BQP_pp8s.js} +2 -2
- package/dist/pull-CUVdB04v.js +1 -0
- package/dist/{pull-CQCGy1gv.js → pull-DVoZ0V9_.js} +6 -6
- package/dist/{push-Dq_ca4-j.js → push-eJl1Tvqm.js} +7 -7
- package/dist/{pushed-policy-CryQheKq.d.ts → pushed-policy-CUQuvlS3.d.ts} +1 -1
- package/dist/{pushed-policy-CDuOL2de.js → pushed-policy-DMXAOmEW.js} +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 +10 -10
- package/dist/react-native/index.js +9 -9
- package/dist/refresh-on-L9UOwATg.d.ts +49 -0
- package/dist/{replay-Bs9Df2fQ.d.ts → replay-Dc3d8LhG.d.ts} +1 -1
- package/dist/{request-context-Duzdf0cd.js → request-context-Ch052blg.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-1nCei24V.js} +6 -6
- package/dist/{rls-C5ZGzR_B.js → rls-BVzoZCn3.js} +4 -4
- package/dist/{rls-tHu7N_Pe.js → rls-ClJRblnR.js} +19 -19
- package/dist/{role-builder-BK2-T6oD.js → role-builder-BrmOcXch.js} +3 -157
- package/dist/{rpc-vHIwyXCp.js → rpc-BOu3FD6X.js} +2 -2
- package/dist/{run-DUq1xU4K.js → run-CnCaTjWX.js} +8 -40
- package/dist/run-D9N6V5WQ.js +1 -0
- package/dist/{run-ticket-ylovhyFQ.d.ts → run-ticket-C6lXvHM_.d.ts} +2 -2
- package/dist/{run-ticket-DfnZCh-u.js → run-ticket-CjvXr6wj.js} +1 -1
- package/dist/{runtime-BGnrOkVH.js → runtime-CBXkOcg9.js} +1 -1
- package/dist/{saas-DK4V-3Is.js → saas-BqM9mJkk.js} +13 -10
- package/dist/{scan-C3HRH9Fs.js → scan-CepUXrFt.js} +1 -1
- package/dist/{schema-DvXvxPhQ.js → schema-9_NDz8fx.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-Bw-lWqzR.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-DUzt0e4B.d.ts} +2 -2
- package/dist/{skills-Celu2W6v.js → skills-BUuH-QFt.js} +2 -2
- package/dist/{skills-B2qTbaQa.js → skills-a4N6Y2Xm.js} +2 -2
- package/dist/{snapshot-CXlzi69u.js → snapshot-DN_8J27z.js} +6 -2
- package/dist/{snapshot-cache-Bx_4xC_6.js → snapshot-cache-B66h7FBK.js} +25 -8
- package/dist/{snapshot-cache-BjAWkchD.d.ts → snapshot-cache-Dbk-Gnij.d.ts} +20 -6
- 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-CXY05xtB.d.ts} +1 -1
- package/dist/{src-C_pi2Rnh.js → src-nYNBfmgq.js} +187 -39
- package/dist/ssf/index.d.ts +3 -3
- package/dist/ssf/index.js +1 -1
- package/dist/{standard-webhooks-DOYEuOLx.d.ts → standard-webhooks-BFeEpjxy.d.ts} +2 -2
- package/dist/{store-RNFvaJJv.js → store-XgBMbfDy.js} +13 -7
- package/dist/{types-tQB2CEnY.d.ts → store-g5ctUrOI.d.ts} +114 -113
- package/dist/{store-options-Dil3lraY.js → store-options--zWn48PK.js} +76 -7
- package/dist/{stores-DxZWDXCs.js → stores-53_kOwPi.js} +3 -3
- package/dist/{stores-DZJvxFIZ.d.ts → stores-BtdN3eDO.d.ts} +5 -6
- package/dist/{stream-9y9qw51m.d.ts → stream-BMJg56jU.d.ts} +1 -1
- package/dist/{subject-BGoM5o8B.js → subject-C7RddW0G.js} +8 -1
- package/dist/supabase/client.d.ts +31 -0
- package/dist/supabase/client.js +21 -0
- package/dist/supabase/index.d.ts +37 -6
- package/dist/supabase/index.js +5 -4
- package/dist/supabase/middleware.d.ts +8 -7
- package/dist/supabase/middleware.js +6 -6
- package/dist/{supabase-DYWnT800.js → supabase-C6FyUeSh.js} +3 -3
- package/dist/{supabase-CDHMsDD0.js → supabase-C8cNzp4i.js} +31 -8
- package/dist/supabase-hook-CPBX4dy5.js +1 -0
- package/dist/{supabase-hook-HPgwYb9V.js → supabase-hook-Cj85nccs.js} +167 -21
- package/dist/{supautils-SwE642N1.js → supautils-BP_5WAIc.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-BsGE6HBR.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 +1 -1
- package/dist/testing/index.d.ts +29 -22
- package/dist/testing/index.js +118 -46
- 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-C1UlhU0V.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-C_OnZW8c.d.ts} +1 -1
- package/dist/{types-B2efzoSX.d.ts → types-AOP5HQku.d.ts} +1 -1
- package/dist/{types-DlelvQk4.d.ts → types-B3BOcI0J.d.ts} +2 -2
- package/dist/{types-DLvhVm1r.d.ts → types-BvBbkAu1.d.ts} +16 -7
- package/dist/{types-BB-zWDcR.d.ts → types-CA-A33Q5.d.ts} +5 -5
- package/dist/{types-Cklw5hJo.d.ts → types-CAAN7evk.d.ts} +24 -1
- package/dist/{types-DsHGPtkR.d.ts → types-CJC1aaoJ.d.ts} +2 -2
- package/dist/{types-CWBsAwqn.d.ts → types-D29K5ZNP.d.ts} +4 -4
- package/dist/{types-CEinc15V.d.ts → types-DVZNTkU0.d.ts} +3 -4
- package/dist/{types-ZzRGoViD.d.ts → types-NYoj8JBm.d.ts} +2 -2
- package/dist/{types-B6ExllNo.d.ts → types-Sj1U8HMm.d.ts} +2 -2
- package/dist/{types-CN0LsqbK.d.ts → types-UfpcY575.d.ts} +3 -3
- package/dist/{types-rCRV4Ge-.d.ts → types-e82uzrTn.d.ts} +4 -4
- package/dist/unplugin/index.d.ts +1 -1
- package/dist/unplugin/index.js +2 -2
- package/dist/{usage-CPXeuAdT.js → usage-COsGLht5.js} +6 -6
- package/dist/{usage-CfZCQd0F.js → usage-CqcMeQgX.js} +2 -2
- package/dist/usage-D1cpHO7p.js +1 -0
- package/dist/{validation-error-uvp-kyfO.d.ts → validation-error-DpvsBwZJ.d.ts} +1 -1
- package/dist/{verify-DfT0QYNh.js → verify-C8G8D5mk.js} +19 -19
- package/dist/{version-cache-Df11C2Qp.d.ts → version-cache-9Vq5QVFC.d.ts} +9 -3
- package/dist/{views-CD8wuL4Z.js → views-TrZYlDnM.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-C2cXXLFZ.d.ts} +2 -2
- package/dist/{watch-DAkjm75Y.js → watch-DXRDBSCu.js} +3 -3
- package/dist/watch-DnymTAfe.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-BY5d3HPw.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-B2wziJI_.js → wrap-C5PWzgkq.js} +1 -1
- package/dist/{wrap-DxXB54Wu.d.ts → wrap-DpZAbxuD.d.ts} +2 -2
- 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/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/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/ssf/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as SsfSubject, C as SsfEventName, D as SsfReceiver, E as SsfPermDockOptions, M as SsfTransmitterConfiguration, N as SsfVerification, O as SsfStreamConfiguration, S as SsfEventListener, T as SsfPermDock, _ as SetSubject, a as PollHandle, b as SsfEventHandler, c as PushSetOptions, d as SetDelivery, f as SetDeliveryFailureCause, g as SetQueue, h as SetPollHandlerOptions, i as CaepReason, j as SsfSubjectResolver, k as SsfStreamStatus, l as ReplayStore, m as SetEvent, n as CaepEventName, o as PollOptions, p as SetError, r as CaepInitiatingEntity, s as PollResult, t as CaepCommon, u as RiscEventName, v as SignSetOptions, w as SsfOnEvent, x as SsfEventInput, y as SsfAuditEvent } from "../types-
|
|
2
|
-
import { t as memoryReplayStore } from "../replay-
|
|
3
|
-
import { A as createPermDock, C as memorySsfStreamStore, D as PollSetsResult, E as PollSetsOptions, O as PolledSet, S as SsfStreamStore, T as setPollHandler, _ as SsfFanOut, a as CaepTokenClaimsChange, b as ssfTransmitter, c as RiscEvents, d as caepEvents, f as pushSet, g as FanOutSetOptions, h as streamVerificationEvent, i as CaepEvents, k as pollSets, l as SSF_POLL_DELIVERY, m as signSet, n as CaepCredentialChange, o as RiscAccountDisabled, p as riscEvents, r as CaepDeviceComplianceChange, s as RiscCredentialCompromise, t as CaepAssuranceLevelChange, u as SSF_PUSH_DELIVERY, v as SsfTransmitterOptions, w as memorySetQueue, x as SsfStream, y as fanOutSet } from "../index-
|
|
1
|
+
import { A as SsfSubject, C as SsfEventName, D as SsfReceiver, E as SsfPermDockOptions, M as SsfTransmitterConfiguration, N as SsfVerification, O as SsfStreamConfiguration, S as SsfEventListener, T as SsfPermDock, _ as SetSubject, a as PollHandle, b as SsfEventHandler, c as PushSetOptions, d as SetDelivery, f as SetDeliveryFailureCause, g as SetQueue, h as SetPollHandlerOptions, i as CaepReason, j as SsfSubjectResolver, k as SsfStreamStatus, l as ReplayStore, m as SetEvent, n as CaepEventName, o as PollOptions, p as SetError, r as CaepInitiatingEntity, s as PollResult, t as CaepCommon, u as RiscEventName, v as SignSetOptions, w as SsfOnEvent, x as SsfEventInput, y as SsfAuditEvent } from "../types-CJC1aaoJ.js";
|
|
2
|
+
import { t as memoryReplayStore } from "../replay-Dc3d8LhG.js";
|
|
3
|
+
import { A as createPermDock, C as memorySsfStreamStore, D as PollSetsResult, E as PollSetsOptions, O as PolledSet, S as SsfStreamStore, T as setPollHandler, _ as SsfFanOut, a as CaepTokenClaimsChange, b as ssfTransmitter, c as RiscEvents, d as caepEvents, f as pushSet, g as FanOutSetOptions, h as streamVerificationEvent, i as CaepEvents, k as pollSets, l as SSF_POLL_DELIVERY, m as signSet, n as CaepCredentialChange, o as RiscAccountDisabled, p as riscEvents, r as CaepDeviceComplianceChange, s as RiscCredentialCompromise, t as CaepAssuranceLevelChange, u as SSF_PUSH_DELIVERY, v as SsfTransmitterOptions, w as memorySetQueue, x as SsfStream, y as fanOutSet } from "../index-z44pfWar.js";
|
|
4
4
|
export { type CaepAssuranceLevelChange, type CaepCommon, type CaepCredentialChange, type CaepDeviceComplianceChange, type CaepEventName, type CaepEvents, type CaepInitiatingEntity, type CaepReason, type CaepTokenClaimsChange, type FanOutSetOptions, type PollHandle, type PollOptions, type PollResult, type PollSetsOptions, type PollSetsResult, type PolledSet, type PushSetOptions, type ReplayStore, type RiscAccountDisabled, type RiscCredentialCompromise, type RiscEventName, type RiscEvents, SSF_POLL_DELIVERY, SSF_PUSH_DELIVERY, type SetDelivery, type SetDeliveryFailureCause, type SetError, type SetEvent, type SetPollHandlerOptions, type SetQueue, type SetSubject, type SignSetOptions, type SsfAuditEvent, type SsfEventHandler, type SsfEventInput, type SsfEventListener, type SsfEventName, type SsfFanOut, type SsfOnEvent, type SsfPermDock, type SsfPermDockOptions, type SsfReceiver, type SsfStream, type SsfStreamConfiguration, type SsfStreamStatus, type SsfStreamStore, type SsfSubject, type SsfSubjectResolver, type SsfTransmitterConfiguration, type SsfTransmitterOptions, type SsfVerification, caepEvents, createPermDock, fanOutSet, memoryReplayStore, memorySetQueue, memorySsfStreamStore, pollSets, pushSet, riscEvents, setPollHandler, signSet, ssfTransmitter, streamVerificationEvent };
|
package/dist/ssf/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { o as statusProblem } from "../problem-details-CLDgX1KV.js";
|
|
|
3
3
|
import { o as epochSeconds } from "../time-nR1JesoH.js";
|
|
4
4
|
import { n as readBodyText } from "../body-text-DQhcmqdY.js";
|
|
5
5
|
import { f as validationProblem, l as problemResponse, o as methodNotAllowed, s as notFoundProblem } from "../problem-BVLHFK33.js";
|
|
6
|
-
import { t as cancelApprovals } from "../helpers-
|
|
6
|
+
import { t as cancelApprovals } from "../helpers-DNnZffrI.js";
|
|
7
7
|
import { i as issuerFromDiscovery, t as joseTokenVerifier } from "../verifier-DUV6pLqZ.js";
|
|
8
8
|
import { t as memoryReplayStore } from "../replay-BU09ad4L.js";
|
|
9
9
|
import { t as timeoutSignal } from "../timeout-D51niuQP.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { l as ReplayStore } from "./types-
|
|
1
|
+
import { Kt as Instant, hr as JsonWebKeyLike } from "./policy-types-IRJVABmm.js";
|
|
2
|
+
import { l as ReplayStore } from "./types-CJC1aaoJ.js";
|
|
3
3
|
//#region src/server/standard-webhooks.d.ts
|
|
4
4
|
/** The three Standard Webhooks headers a delivery carries. */
|
|
5
5
|
type WebhookHeaders = {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { t as compact } from "./compact-CAf557ZB.js";
|
|
2
2
|
import { n as freezeDeep } from "./freeze-jjan0lCv.js";
|
|
3
|
-
import {
|
|
3
|
+
import { a as flattenApprovers, i as approverManagerKey } from "./approvers-CNtl4Vc5.js";
|
|
4
4
|
import { a as durationOf, i as dateAt } from "./time-nR1JesoH.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { o as readWireApproval } from "./approval-normalize-4KxMRdJC.js";
|
|
6
|
+
import { i as rootMembershipId } from "./subject-C7RddW0G.js";
|
|
7
|
+
import { n as matchGrantee } from "./grantee-match-BP-k4vRJ.js";
|
|
7
8
|
import { a as escalationOpenAt, i as approverRelationKey, o as stageEscalationOpenAt, r as approvalQuorum, s as ApprovalError } from "./types-CcUXciSj.js";
|
|
8
9
|
//#region src/approvals/page.ts
|
|
9
10
|
const DEFAULT_PAGE_SIZE = 50;
|
|
@@ -133,6 +134,10 @@ function matchesApprovers(by, subject, tenant, now, facts) {
|
|
|
133
134
|
if (subject.principal?.id !== item.id) return false;
|
|
134
135
|
continue;
|
|
135
136
|
}
|
|
137
|
+
if (item.kind === "manager") {
|
|
138
|
+
if (!facts.relations.has(approverManagerKey(item))) return false;
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
136
141
|
if (item.kind === "relation") {
|
|
137
142
|
if (!facts.relations.has(approverRelationKey(item))) return false;
|
|
138
143
|
continue;
|
|
@@ -168,7 +173,8 @@ function assertSeparateApprover(request, by, requireDistinctApprover) {
|
|
|
168
173
|
if (principal.kind === "link" || principal.kind === "feed" || principal.kind === "contact") throw new ApprovalError("approver-not-eligible", "a link, a feed or a contact cannot approve");
|
|
169
174
|
if (by.actor?.kind === "support") throw new ApprovalError("approver-not-eligible", "a support session cannot approve");
|
|
170
175
|
if (request.subject.actor !== void 0 && principal.id === request.subject.actor.id) throw new ApprovalError("approver-is-actor", "approver is the actor of this request");
|
|
171
|
-
if ((requireDistinctApprover || request.approvers?.
|
|
176
|
+
if ((requireDistinctApprover || readWireApproval(request.approvers)?.mode !== "confirm") && request.subject.principal !== null && principal.id === request.subject.principal.id) throw new ApprovalError("approver-is-principal", "approver is the principal of this request");
|
|
177
|
+
if (by.actor !== void 0 && !isSystemSubject(by) || by.delegation !== void 0 || principal.kind === "service" || principal.kind === "workload") throw new ApprovalError("approver-not-eligible", "an approver must be a person acting for themselves, not an agent, a delegated token or a service");
|
|
172
178
|
return principal;
|
|
173
179
|
}
|
|
174
180
|
function assertNotRepeated(request, id) {
|
|
@@ -193,7 +199,7 @@ function assertApprover(request, by, requireDistinctApprover, at, relations = []
|
|
|
193
199
|
const tenant = request.subject.principal?.tenant;
|
|
194
200
|
if (tenant !== void 0 && !belongsToTenant(by, tenant)) throw new ApprovalError("approver-not-eligible", "approver does not belong to the request tenant");
|
|
195
201
|
assertNotRepeated(request, principal.id);
|
|
196
|
-
const approvers = request.approvers;
|
|
202
|
+
const approvers = readWireApproval(request.approvers);
|
|
197
203
|
if (approvers === void 0) return;
|
|
198
204
|
const facts = {
|
|
199
205
|
relations: new Set(relations),
|
|
@@ -214,12 +220,12 @@ function assertApprover(request, by, requireDistinctApprover, at, relations = []
|
|
|
214
220
|
}
|
|
215
221
|
const counts = stageCounts(request.approvals, stages);
|
|
216
222
|
const open = stages.flatMap((stage, index) => (counts[index] ?? 0) < (stage.quorum ?? 1) ? [index] : []);
|
|
217
|
-
const candidates = approvers.
|
|
223
|
+
const candidates = approvers.combine === "sequential" ? open.slice(0, 1) : open;
|
|
218
224
|
for (const index of candidates) {
|
|
219
225
|
const stage = stages[index];
|
|
220
226
|
if (stage !== void 0 && (escalated || eligible(stage.by) || stageEscalated(stage))) return index;
|
|
221
227
|
}
|
|
222
|
-
throw new ApprovalError("approver-not-eligible", approvers.
|
|
228
|
+
throw new ApprovalError("approver-not-eligible", approvers.combine === "sequential" ? "approver is not eligible for the current stage" : "approver is not eligible for an open stage");
|
|
223
229
|
}
|
|
224
230
|
function isSystemSubject(by) {
|
|
225
231
|
return by.actor?.kind === "system";
|
|
@@ -1,123 +1,29 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $t as Snapshot, M as PolicyVocabulary, _r as Principal, _t as TokenVerifier, pr as Delegation, qn as Decision, sr as Actor } from "./policy-types-IRJVABmm.js";
|
|
2
2
|
import { u as Permission } from "./permission-types-CAY-GU7e.js";
|
|
3
|
-
import { a as PermDock } from "./permdock-
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* CloudEvent `type` values that refresh; a trailing `*` matches a prefix.
|
|
16
|
-
* Defaults to `com.permdock.membership.*` and `com.permdock.catalog.*`.
|
|
17
|
-
*/
|
|
18
|
-
readonly types?: readonly string[];
|
|
19
|
-
readonly withCredentials?: boolean;
|
|
3
|
+
import { a as PermDock } from "./permdock-DUWZEOLR.js";
|
|
4
|
+
import { a as ProblemDetails } from "./errors-Dc9FdamT.js";
|
|
5
|
+
import { n as DescribeMessages, t as DecisionDescription } from "./describe-nalX_HHE.js";
|
|
6
|
+
import { r as RefreshTrigger } from "./refresh-on-L9UOwATg.js";
|
|
7
|
+
//#region src/core/action-result.d.ts
|
|
8
|
+
/** What a `protectAction` action resolves to; both members cross to the client. */
|
|
9
|
+
type ActionResult<T> = {
|
|
10
|
+
readonly ok: true;
|
|
11
|
+
readonly value: T;
|
|
12
|
+
} | {
|
|
13
|
+
readonly ok: false;
|
|
14
|
+
readonly problem: ProblemDetails;
|
|
20
15
|
};
|
|
21
16
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* a global `EventSource` it never fires.
|
|
17
|
+
* The server action: `approval` is the token of a granted approval request,
|
|
18
|
+
* which resumes an `approval-required` decision.
|
|
25
19
|
*/
|
|
26
|
-
|
|
20
|
+
type ProtectedAction<T> = (input: unknown, options?: {
|
|
21
|
+
readonly approval?: string;
|
|
22
|
+
}) => Promise<ActionResult<T>>;
|
|
27
23
|
//#endregion
|
|
28
24
|
//#region src/client/request.d.ts
|
|
29
25
|
type StoreHeaders = Readonly<Record<string, string>>;
|
|
30
26
|
//#endregion
|
|
31
|
-
//#region src/client/store.d.ts
|
|
32
|
-
type ClientStoreOptions = {
|
|
33
|
-
readonly snapshot: Snapshot | string;
|
|
34
|
-
readonly endpoint?: string;
|
|
35
|
-
readonly snapshotUrl?: string;
|
|
36
|
-
readonly approvals?: string;
|
|
37
|
-
readonly tenant?: string;
|
|
38
|
-
readonly fetch?: typeof fetch;
|
|
39
|
-
/**
|
|
40
|
-
* Request headers, or a getter read on every request so a rotated token needs
|
|
41
|
-
* no new store.
|
|
42
|
-
*/
|
|
43
|
-
readonly headers?: StoreHeaders | (() => StoreHeaders | undefined);
|
|
44
|
-
readonly maxAge?: number;
|
|
45
|
-
readonly verifier?: TokenVerifier;
|
|
46
|
-
/**
|
|
47
|
-
* `raw` is the compact JWS the snapshot was verified from, so a signed
|
|
48
|
-
* snapshot can be persisted signed.
|
|
49
|
-
*/
|
|
50
|
-
readonly onSnapshot?: (snapshot: Snapshot, tenant: string | undefined, raw: string | undefined) => void;
|
|
51
|
-
readonly onClear?: () => void;
|
|
52
|
-
/**
|
|
53
|
-
* Called once per key the snapshot cannot answer when there is no `endpoint`
|
|
54
|
-
* to ask.
|
|
55
|
-
*/
|
|
56
|
-
readonly onServerOnly?: (permission: Permission) => void;
|
|
57
|
-
/**
|
|
58
|
-
* `true` while rendering on the server: endpoint checks answer `pending`
|
|
59
|
-
* without a request. Defaults to `typeof window === 'undefined'`.
|
|
60
|
-
*/
|
|
61
|
-
readonly server?: boolean;
|
|
62
|
-
/** Milliseconds between approval status polls. Defaults to 2000. */
|
|
63
|
-
readonly approvalInterval?: number;
|
|
64
|
-
/** Start `pending`: the snapshot arrives later through `track()`. */
|
|
65
|
-
readonly awaiting?: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* The first snapshot that hydrates with a principal is a persisted copy:
|
|
68
|
-
* `stale` until a refresh or a `replace()` lands.
|
|
69
|
-
*/
|
|
70
|
-
readonly stale?: boolean;
|
|
71
|
-
/**
|
|
72
|
-
* Reuse decisions for the same row object until the next microtask. Only for
|
|
73
|
-
* renderers that do not track the fields a check reads (React): Vue, Svelte
|
|
74
|
-
* and Solid would stop re-running when a reactive row changes in place.
|
|
75
|
-
*/
|
|
76
|
-
readonly passCache?: boolean;
|
|
77
|
-
/**
|
|
78
|
-
* Triggers that refresh the snapshot, started while something subscribes and
|
|
79
|
-
* never during a server render. Calls within 250 ms fold into one refresh.
|
|
80
|
-
*/
|
|
81
|
-
readonly refreshOn?: readonly RefreshTrigger[];
|
|
82
|
-
};
|
|
83
|
-
type ClientStore = {
|
|
84
|
-
get: () => ClientPermDock;
|
|
85
|
-
subscribe: (listener: () => void) => () => void;
|
|
86
|
-
permissionState: (permission: Permission, data?: unknown) => PermissionState;
|
|
87
|
-
requestApproval: (decision: Decision, note?: string) => Promise<void>;
|
|
88
|
-
/** Hydrate from a pushed snapshot; a compact JWS goes through the verifier. */
|
|
89
|
-
replace: (value: unknown) => void;
|
|
90
|
-
/**
|
|
91
|
-
* Stay `pending` until `value` settles, then hydrate; a rejection fails
|
|
92
|
-
* closed.
|
|
93
|
-
*/
|
|
94
|
-
follow: (value: PromiseLike<Snapshot | string>) => void;
|
|
95
|
-
/**
|
|
96
|
-
* `follow()` once per `value`, without suspending. A thenable React already
|
|
97
|
-
* settled (`status: 'fulfilled'`) hydrates at once.
|
|
98
|
-
*/
|
|
99
|
-
track: (value: PromiseLike<Snapshot | string>) => void;
|
|
100
|
-
/**
|
|
101
|
-
* The approval state for a decision. While something subscribes, an
|
|
102
|
-
* `approval-required` decision is polled at `<approvals>/<token>`.
|
|
103
|
-
*/
|
|
104
|
-
approvalState: (decision: Decision) => ApprovalState;
|
|
105
|
-
/**
|
|
106
|
-
* Hydrate from a resolved `snapshotPromise` during render. Idempotent per
|
|
107
|
-
* `source`; subscribers are notified in a microtask, never synchronously
|
|
108
|
-
* inside render.
|
|
109
|
-
*/
|
|
110
|
-
adopt: (value: Snapshot | string, source: object) => void;
|
|
111
|
-
snapshot: () => Snapshot;
|
|
112
|
-
/** The tenant the store currently answers for. */
|
|
113
|
-
tenant: () => string | undefined;
|
|
114
|
-
/**
|
|
115
|
-
* Stops polls, drops in-flight results and persistence; the store keeps
|
|
116
|
-
* answering from its last snapshot.
|
|
117
|
-
*/
|
|
118
|
-
dispose: () => void;
|
|
119
|
-
};
|
|
120
|
-
//#endregion
|
|
121
27
|
//#region src/client/protected-action.d.ts
|
|
122
28
|
type ProtectedActionState<T> = {
|
|
123
29
|
/** The last call's answer; `undefined` before the first call. */
|
|
@@ -259,4 +165,99 @@ type GateView = {
|
|
|
259
165
|
readonly decision: Decision;
|
|
260
166
|
};
|
|
261
167
|
//#endregion
|
|
262
|
-
|
|
168
|
+
//#region src/client/store.d.ts
|
|
169
|
+
type ClientStoreOptions = {
|
|
170
|
+
readonly snapshot: Snapshot | string;
|
|
171
|
+
readonly endpoint?: string;
|
|
172
|
+
readonly snapshotUrl?: string;
|
|
173
|
+
readonly approvals?: string;
|
|
174
|
+
readonly tenant?: string;
|
|
175
|
+
readonly fetch?: typeof fetch;
|
|
176
|
+
/**
|
|
177
|
+
* Request headers, or a getter read on every request so a rotated token needs
|
|
178
|
+
* no new store.
|
|
179
|
+
*/
|
|
180
|
+
readonly headers?: StoreHeaders | (() => StoreHeaders | undefined);
|
|
181
|
+
readonly maxAge?: number;
|
|
182
|
+
readonly verifier?: TokenVerifier;
|
|
183
|
+
/**
|
|
184
|
+
* `raw` is the compact JWS the snapshot was verified from, so a signed
|
|
185
|
+
* snapshot can be persisted signed.
|
|
186
|
+
*/
|
|
187
|
+
readonly onSnapshot?: (snapshot: Snapshot, tenant: string | undefined, raw: string | undefined) => void;
|
|
188
|
+
readonly onClear?: () => void;
|
|
189
|
+
/**
|
|
190
|
+
* Called once per key the snapshot cannot answer when there is no `endpoint`
|
|
191
|
+
* to ask.
|
|
192
|
+
*/
|
|
193
|
+
readonly onServerOnly?: (permission: Permission) => void;
|
|
194
|
+
/**
|
|
195
|
+
* `true` while rendering on the server: endpoint checks answer `pending`
|
|
196
|
+
* without a request. Defaults to `typeof window === 'undefined'`.
|
|
197
|
+
*/
|
|
198
|
+
readonly server?: boolean;
|
|
199
|
+
/** Milliseconds between approval status polls. Defaults to 2000. */
|
|
200
|
+
readonly approvalInterval?: number;
|
|
201
|
+
/** Start `pending`: the snapshot arrives later through `track()`. */
|
|
202
|
+
readonly awaiting?: boolean;
|
|
203
|
+
/**
|
|
204
|
+
* The first snapshot that hydrates with a principal is a persisted copy:
|
|
205
|
+
* `stale` until a refresh or a `replace()` lands.
|
|
206
|
+
*/
|
|
207
|
+
readonly stale?: boolean;
|
|
208
|
+
/**
|
|
209
|
+
* Reuse decisions for the same row object until the next microtask. Only for
|
|
210
|
+
* renderers that do not track the fields a check reads (React): Vue, Svelte
|
|
211
|
+
* and Solid would stop re-running when a reactive row changes in place.
|
|
212
|
+
*/
|
|
213
|
+
readonly passCache?: boolean;
|
|
214
|
+
/**
|
|
215
|
+
* Triggers that refresh the snapshot, started while something subscribes and
|
|
216
|
+
* never during a server render. Calls within 250 ms fold into one refresh.
|
|
217
|
+
*/
|
|
218
|
+
readonly refreshOn?: readonly RefreshTrigger[];
|
|
219
|
+
};
|
|
220
|
+
type ClientStore = {
|
|
221
|
+
get: () => ClientPermDock;
|
|
222
|
+
subscribe: (listener: () => void) => () => void;
|
|
223
|
+
permissionState: (permission: Permission, data?: unknown) => PermissionState;
|
|
224
|
+
requestApproval: (decision: Decision, note?: string) => Promise<void>;
|
|
225
|
+
/** Hydrate from a pushed snapshot; a compact JWS goes through the verifier. */
|
|
226
|
+
replace: (value: unknown) => void;
|
|
227
|
+
/**
|
|
228
|
+
* Stay `pending` until `value` settles, then hydrate; a rejection fails
|
|
229
|
+
* closed.
|
|
230
|
+
*/
|
|
231
|
+
follow: (value: PromiseLike<Snapshot | string>) => void;
|
|
232
|
+
/**
|
|
233
|
+
* `follow()` once per `value`, without suspending. A thenable React already
|
|
234
|
+
* settled (`status: 'fulfilled'`) hydrates at once.
|
|
235
|
+
*/
|
|
236
|
+
track: (value: PromiseLike<Snapshot | string>) => void;
|
|
237
|
+
/**
|
|
238
|
+
* The approval state for a decision. While something subscribes, an
|
|
239
|
+
* `approval-required` decision is polled at `<approvals>/<token>`.
|
|
240
|
+
*/
|
|
241
|
+
approvalState: (decision: Decision) => ApprovalState;
|
|
242
|
+
/**
|
|
243
|
+
* Hydrate from a resolved `snapshotPromise` during render. Idempotent per
|
|
244
|
+
* `source`; subscribers are notified in a microtask, never synchronously
|
|
245
|
+
* inside render.
|
|
246
|
+
*/
|
|
247
|
+
adopt: (value: Snapshot | string, source: object) => void;
|
|
248
|
+
snapshot: () => Snapshot;
|
|
249
|
+
/** The tenant the store currently answers for. */
|
|
250
|
+
tenant: () => string | undefined;
|
|
251
|
+
/**
|
|
252
|
+
* Runs more refresh triggers until the returned stop is called, folded and
|
|
253
|
+
* skipped like `refreshOn`.
|
|
254
|
+
*/
|
|
255
|
+
refreshOn: (triggers: readonly RefreshTrigger[]) => () => void;
|
|
256
|
+
/**
|
|
257
|
+
* Stops polls, drops in-flight results and persistence; the store keeps
|
|
258
|
+
* answering from its last snapshot.
|
|
259
|
+
*/
|
|
260
|
+
dispose: () => void;
|
|
261
|
+
};
|
|
262
|
+
//#endregion
|
|
263
|
+
export { TenantView as _, ClientPermDock as a, GateMode as c, PermissionState as d, ProtectedActionHandle as f, SubjectView as g, RolesOptions as h, ApprovalState as i, GateView as l, ProviderOptionsBase as m, ClientStoreOptions as n, ClientStatus as o, ProtectedActionView as p, ApprovalHandle as r, FilterResult as s, ClientStore as t, PermissionSet as u, ActionResult as v, ProtectedAction as y };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as compact } from "./compact-CAf557ZB.js";
|
|
2
2
|
import { g as secondsOf } from "./time-nR1JesoH.js";
|
|
3
|
-
import { c as rowIdOf } from "./delegation-
|
|
4
|
-
import { c as nowSeconds } from "./tenancy-
|
|
5
|
-
import {
|
|
6
|
-
import { n as parseSnapshot } from "./snapshot-
|
|
7
|
-
import { c as snapshotClaim } from "./where-scope-
|
|
8
|
-
import { n as fromSnapshot, t as emptySnapshot } from "./from-snapshot-
|
|
3
|
+
import { c as rowIdOf } from "./delegation-aK4T_5WU.js";
|
|
4
|
+
import { c as nowSeconds } from "./tenancy-DvOHHk3-.js";
|
|
5
|
+
import { r as payloadDigest } from "./token-DaMnIU9O.js";
|
|
6
|
+
import { n as parseSnapshot } from "./snapshot-DN_8J27z.js";
|
|
7
|
+
import { c as snapshotClaim } from "./where-scope-BKrqUDVk.js";
|
|
8
|
+
import { n as fromSnapshot, t as emptySnapshot } from "./from-snapshot-DMlSSo9b.js";
|
|
9
9
|
import { t as timeoutSignal } from "./timeout-D51niuQP.js";
|
|
10
10
|
//#region src/client/source.ts
|
|
11
11
|
/** A compact JWS: three non-empty dot-separated parts. */
|
|
@@ -270,6 +270,67 @@ function eventSourceRefresh(url, options = {}) {
|
|
|
270
270
|
};
|
|
271
271
|
};
|
|
272
272
|
}
|
|
273
|
+
function isListenerTarget(value) {
|
|
274
|
+
return typeof value === "object" && value !== null && typeof Reflect.get(value, "addEventListener") === "function" && typeof Reflect.get(value, "removeEventListener") === "function";
|
|
275
|
+
}
|
|
276
|
+
function listen(target, type, listener) {
|
|
277
|
+
if (!isListenerTarget(target)) return () => void 0;
|
|
278
|
+
target.addEventListener(type, listener);
|
|
279
|
+
return () => {
|
|
280
|
+
target.removeEventListener(type, listener);
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
/** A `refreshOn` trigger on window `focus`. Without a window it never fires. */
|
|
284
|
+
function focusRefresh() {
|
|
285
|
+
return (refresh) => listen(Reflect.get(globalThis, "window"), "focus", refresh);
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* A `refreshOn` trigger on `visibilitychange` to visible, when a background tab
|
|
289
|
+
* comes back. Without a `document` it never fires.
|
|
290
|
+
*/
|
|
291
|
+
function visibilityRefresh() {
|
|
292
|
+
return (refresh) => {
|
|
293
|
+
const doc = Reflect.get(globalThis, "document");
|
|
294
|
+
return listen(doc, "visibilitychange", () => {
|
|
295
|
+
if (typeof doc === "object" && doc !== null && Reflect.get(doc, "visibilityState") === "visible") refresh();
|
|
296
|
+
});
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* A `refreshOn` trigger on every message to the `BroadcastChannel` `name`, so
|
|
301
|
+
* one tab that learns of a change refreshes the others. Without a global
|
|
302
|
+
* `BroadcastChannel` it never fires.
|
|
303
|
+
*/
|
|
304
|
+
function broadcastChannelRefresh(name) {
|
|
305
|
+
return (refresh) => {
|
|
306
|
+
if (typeof globalThis.BroadcastChannel !== "function") return () => void 0;
|
|
307
|
+
const channel = new globalThis.BroadcastChannel(name);
|
|
308
|
+
channel.addEventListener("message", refresh);
|
|
309
|
+
return () => {
|
|
310
|
+
channel.close();
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* A `refreshOn` trigger that fires on `notify()`. better-supabase's
|
|
316
|
+
* `SessionProvider` already listens on the user's `authz:<uid>` topic and
|
|
317
|
+
* shares changes across tabs, so `onAuthzChange={notify}` refreshes the
|
|
318
|
+
* snapshot without a second Realtime channel.
|
|
319
|
+
*/
|
|
320
|
+
function authzChangeRefresh() {
|
|
321
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
322
|
+
return Object.freeze({
|
|
323
|
+
trigger: (refresh) => {
|
|
324
|
+
listeners.add(refresh);
|
|
325
|
+
return () => {
|
|
326
|
+
listeners.delete(refresh);
|
|
327
|
+
};
|
|
328
|
+
},
|
|
329
|
+
notify: () => {
|
|
330
|
+
for (const listener of listeners) listener();
|
|
331
|
+
}
|
|
332
|
+
});
|
|
333
|
+
}
|
|
273
334
|
/**
|
|
274
335
|
* Runs `triggers` while `start()` holds, folding calls within 250 ms into one
|
|
275
336
|
* `refresh`. `skip()` answering `true` drops a call: after `clear()` or
|
|
@@ -759,6 +820,14 @@ function createClientStore(options) {
|
|
|
759
820
|
tenant() {
|
|
760
821
|
return tenant;
|
|
761
822
|
},
|
|
823
|
+
refreshOn(extra) {
|
|
824
|
+
if (server) return () => void 0;
|
|
825
|
+
const run = refreshTriggers(extra, () => {
|
|
826
|
+
cached.refresh().catch(() => void 0);
|
|
827
|
+
}, () => disposed || cleared);
|
|
828
|
+
run.start();
|
|
829
|
+
return run.stop;
|
|
830
|
+
},
|
|
762
831
|
dispose() {
|
|
763
832
|
disposed = true;
|
|
764
833
|
generation += 1;
|
|
@@ -817,4 +886,4 @@ function adapterStore(options, snapshot, native) {
|
|
|
817
886
|
}));
|
|
818
887
|
}
|
|
819
888
|
//#endregion
|
|
820
|
-
export {
|
|
889
|
+
export { eventSourceRefresh as a, isJws as c, broadcastChannelRefresh as i, isPromiseLike as l, storeOf as n, focusRefresh as o, authzChangeRefresh as r, visibilityRefresh as s, adapterStore as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as actionRunner, t as actionApproval } from "./protected-action-
|
|
2
|
-
import { a as livePermDock, c as rolesView, d as subjectView, f as tenantView, i as gateView, n as describeWith, o as permissionSet, r as filterResult, t as approvalHandle } from "./views-
|
|
3
|
-
import { n as getUi, r as providePermDock, t as getStore } from "./context-
|
|
1
|
+
import { n as actionRunner, t as actionApproval } from "./protected-action-B6n6w7Rl.js";
|
|
2
|
+
import { a as livePermDock, c as rolesView, d as subjectView, f as tenantView, i as gateView, n as describeWith, o as permissionSet, r as filterResult, t as approvalHandle } from "./views-TrZYlDnM.js";
|
|
3
|
+
import { n as getUi, r as providePermDock, t as getStore } from "./context-DeammvFl.js";
|
|
4
4
|
import { derived, readable, toStore, writable } from "svelte/store";
|
|
5
5
|
//#region src/svelte/stores.ts
|
|
6
6
|
function fromStore(store, compute) {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { M as PolicyVocabulary, gr as Membership, qn as Decision } from "./policy-types-IRJVABmm.js";
|
|
2
2
|
import { u as Permission } from "./permission-types-CAY-GU7e.js";
|
|
3
3
|
import { r as Role } from "./vocabulary-DEJ5j4mR.js";
|
|
4
|
-
import { d as UncheckedData, s as RowData } from "./permdock-
|
|
5
|
-
import { r as DescribeOptions, t as DecisionDescription } from "./describe-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { n as ProtectedActionReadable, r as SveltePermDockOptions } from "./types-CEinc15V.js";
|
|
4
|
+
import { d as UncheckedData, s as RowData } from "./permdock-DUWZEOLR.js";
|
|
5
|
+
import { r as DescribeOptions, t as DecisionDescription } from "./describe-nalX_HHE.js";
|
|
6
|
+
import { _ as TenantView, a as ClientPermDock, c as GateMode, d as PermissionState, g as SubjectView, h as RolesOptions, l as GateView, r as ApprovalHandle, s as FilterResult, u as PermissionSet, y as ProtectedAction } from "./store-g5ctUrOI.js";
|
|
7
|
+
import { n as ProtectedActionReadable, r as SveltePermDockOptions } from "./types-DVZNTkU0.js";
|
|
9
8
|
import { Readable } from "svelte/store";
|
|
10
9
|
//#region src/svelte/stores.d.ts
|
|
11
10
|
declare function setPermDock(options: SveltePermDockOptions): ClientPermDock;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { u as Permission } from "./permission-types-CAY-GU7e.js";
|
|
2
|
-
import { o as ProtectOptions } from "./server-types-
|
|
2
|
+
import { o as ProtectOptions } from "./server-types-Bw-lWqzR.js";
|
|
3
3
|
//#region src/server/stream.d.ts
|
|
4
4
|
type StreamProtectOptions = ProtectOptions & {
|
|
5
5
|
/**
|
|
@@ -7,6 +7,13 @@ function isActor(value) {
|
|
|
7
7
|
const record = value;
|
|
8
8
|
return typeof record.id === "string" && typeof record.kind === "string";
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* A membership of the first scope itself (the only scope without a parent): its
|
|
12
|
+
* id is a tenant. Needs no scope list, for code that holds only a subject.
|
|
13
|
+
*/
|
|
14
|
+
function rootMembershipId(membership) {
|
|
15
|
+
return membership.scope !== void 0 && membership.within === void 0 ? membership.id : void 0;
|
|
16
|
+
}
|
|
10
17
|
function anonymousSubject(context = {}) {
|
|
11
18
|
return Object.freeze({
|
|
12
19
|
principal: null,
|
|
@@ -14,4 +21,4 @@ function anonymousSubject(context = {}) {
|
|
|
14
21
|
});
|
|
15
22
|
}
|
|
16
23
|
//#endregion
|
|
17
|
-
export { isActor as n, isSubject as r, anonymousSubject as t };
|
|
24
|
+
export { rootMembershipId as i, isActor as n, isSubject as r, anonymousSubject as t };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { r as RefreshTrigger } from "../refresh-on-L9UOwATg.js";
|
|
2
|
+
//#region src/supabase/client.d.ts
|
|
3
|
+
/** The part of a supabase-js `RealtimeChannel` the trigger uses. */
|
|
4
|
+
export type RealtimeRefreshChannel = {
|
|
5
|
+
readonly on: (type: "broadcast", filter: {
|
|
6
|
+
readonly event: string;
|
|
7
|
+
}, callback: (message: unknown) => void) => unknown;
|
|
8
|
+
readonly subscribe: () => unknown;
|
|
9
|
+
};
|
|
10
|
+
/** The part of a browser supabase-js client the trigger uses. */
|
|
11
|
+
export type RealtimeRefreshClient<C extends RealtimeRefreshChannel = RealtimeRefreshChannel> = {
|
|
12
|
+
readonly channel: (topic: string, options: {
|
|
13
|
+
readonly config: {
|
|
14
|
+
readonly private: boolean;
|
|
15
|
+
};
|
|
16
|
+
}) => C;
|
|
17
|
+
readonly removeChannel: (channel: C) => unknown;
|
|
18
|
+
};
|
|
19
|
+
export type SupabaseRealtimeRefreshOptions = {
|
|
20
|
+
/** The signed-in user's id, the `sub` of their token. */
|
|
21
|
+
readonly userId: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* A `refreshOn` trigger on the user's private `authz:<uid>` Realtime topic,
|
|
25
|
+
* where the generated version trigger sends each bump, for apps without
|
|
26
|
+
* better-supabase. The `realtime.messages` receive policy from
|
|
27
|
+
* `supabase.hook.broadcast` lets each user join only their own topic. With
|
|
28
|
+
* better-supabase, use `authzChangeRefresh` on `SessionProvider` instead.
|
|
29
|
+
*/
|
|
30
|
+
export declare function supabaseRealtimeRefresh<C extends RealtimeRefreshChannel>(client: RealtimeRefreshClient<C>, options: SupabaseRealtimeRefreshOptions): RefreshTrigger;
|
|
31
|
+
//#endregion
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { r as authzUserTopic, t as AUTHZ_EVENT } from "../authz-topic-Dbc-HDOS.js";
|
|
2
|
+
//#region src/supabase/client.ts
|
|
3
|
+
/**
|
|
4
|
+
* A `refreshOn` trigger on the user's private `authz:<uid>` Realtime topic,
|
|
5
|
+
* where the generated version trigger sends each bump, for apps without
|
|
6
|
+
* better-supabase. The `realtime.messages` receive policy from
|
|
7
|
+
* `supabase.hook.broadcast` lets each user join only their own topic. With
|
|
8
|
+
* better-supabase, use `authzChangeRefresh` on `SessionProvider` instead.
|
|
9
|
+
*/
|
|
10
|
+
function supabaseRealtimeRefresh(client, options) {
|
|
11
|
+
return (refresh) => {
|
|
12
|
+
const channel = client.channel(authzUserTopic(options.userId), { config: { private: true } });
|
|
13
|
+
channel.on("broadcast", { event: AUTHZ_EVENT }, refresh);
|
|
14
|
+
channel.subscribe();
|
|
15
|
+
return () => {
|
|
16
|
+
client.removeChannel(channel);
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { supabaseRealtimeRefresh };
|
package/dist/supabase/index.d.ts
CHANGED
|
@@ -1,10 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { a as
|
|
4
|
-
import {
|
|
1
|
+
import { Kt as Instant, yr as Subject } from "../policy-types-IRJVABmm.js";
|
|
2
|
+
import { i as ApprovalPolicySource } from "../approval-policies-9VagPixq.js";
|
|
3
|
+
import { a as ApprovalDelegationSource, m as ApprovalStore, u as ApprovalRequest } from "../types-BvBbkAu1.js";
|
|
4
|
+
import { a as SupabaseRpcClient, c as readSubjectRecord, i as SupabaseRpcCaller, n as PostgrestSourcesOptions, o as SupabaseRpcResult, r as SubjectRecord, s as postgrestSources, t as PostgrestSources } from "../postgrest-B_cEDd4e.js";
|
|
5
|
+
import { A as SupabaseSubjectOptions, B as supabaseClaims, C as SupabasePrincipal, D as SupabaseRlsOptions, E as SupabaseRlsMembershipTable, F as SupabaseClaims, I as SupabaseClaimsOptions, L as SupabaseClaimsSchema, M as SupabaseSuspendedScope, N as SupabaseSuspension, O as SupabaseSessionLike, P as SupabaseActClaim, R as SupabaseMembershipClaim, S as SupabasePermissionRef, T as SupabaseRlsConfig, _ as SupabaseActor, a as MembershipStream, b as SupabaseInclude, c as SupabasePostgres, d as supabasePostgresQuery, f as tableMembershipSource, g as SupabaseActiveRow, h as RoleThrough, i as MembershipSql, j as SupabaseSuspendedMembership, k as SupabaseStorage, l as authzVersion, n as MembershipHolders, o as MembershipTableOptions, p as AuthorizeSqlOptions, r as MembershipJunctionOptions, s as SqlMembershipSource, t as AUTHZ_VERSION_TABLE, u as junctionMembershipSource, v as SupabaseActorResult, w as SupabaseRealtime, x as SupabaseMembershipTable, y as SupabaseDelegation, z as SupabasePermDockClaims } from "../sources-CXY05xtB.js";
|
|
5
6
|
import { _ as hasTokenHook, a as SupabaseManifestActiveRow, c as SupabaseManifestMembership, d as SupabaseManifestResourceNames, f as SupabaseManifestRls, g as SupabaseManifestValue, h as SupabaseManifestThrough, i as SupabaseManifest, l as SupabaseManifestNames, m as SupabaseManifestScopeNames, n as SupabaseHookClaim, o as SupabaseManifestColumn, p as SupabaseManifestRole, r as SupabaseHookManifest, s as SupabaseManifestHelper, t as SupabaseDatabaseManifest, u as SupabaseManifestRequires, v as parseSupabaseManifest } from "../manifest-B5yF3CIq.js";
|
|
6
7
|
import { t as SqlQuery } from "../sql-B80DFdpG.js";
|
|
7
|
-
import { n as supabaseTenantClaim, t as supabaseMembershipsBudget } from "../budget-
|
|
8
|
+
import { n as supabaseTenantClaim, t as supabaseMembershipsBudget } from "../budget-CNLsV2SL.js";
|
|
9
|
+
//#region src/supabase/authz-topic.d.ts
|
|
10
|
+
/**
|
|
11
|
+
* The server topic the generated version trigger broadcasts on without
|
|
12
|
+
* better-supabase; no user may join it. With better-supabase it is
|
|
13
|
+
* `better_supabase:authz`.
|
|
14
|
+
*/
|
|
15
|
+
export declare const AUTHZ_TOPIC = "permdock:authz";
|
|
16
|
+
/** The broadcast event of a version bump, as better-supabase names it. */
|
|
17
|
+
export declare const AUTHZ_EVENT = "changed";
|
|
18
|
+
/** The private topic one user receives their own version bumps on. */
|
|
19
|
+
export declare function authzUserTopic(userId: string): string;
|
|
20
|
+
//#endregion
|
|
8
21
|
//#region src/supabase/capability.d.ts
|
|
9
22
|
type ExchangeCapabilityOptions = {
|
|
10
23
|
/**
|
|
@@ -66,6 +79,24 @@ type SupabaseApprovalStoreOptions = {
|
|
|
66
79
|
*/
|
|
67
80
|
export declare function supabaseApprovalStore(client: SupabaseRpcCaller, options?: SupabaseApprovalStoreOptions): ApprovalStore;
|
|
68
81
|
//#endregion
|
|
82
|
+
//#region src/supabase/approval-policies.d.ts
|
|
83
|
+
type TableApprovalPolicySourceOptions = {
|
|
84
|
+
readonly query: SqlQuery;
|
|
85
|
+
/**
|
|
86
|
+
* The schema holding `permdock_approval_policies_for`. Defaults to
|
|
87
|
+
* `permdock`, where `rls.approvals.tenantPolicies` writes it.
|
|
88
|
+
*/
|
|
89
|
+
readonly schema?: string;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Approval policies from the table `rls.approvals.tenantPolicies` generates:
|
|
93
|
+
* the subject's tenants' enabled rows and every platform floor. A row whose
|
|
94
|
+
* body is not an object throws, and the evaluator checks every entry with
|
|
95
|
+
* `validateApprovalPolicy`, so a bad row denies every call an allow would grant
|
|
96
|
+
* until it is fixed.
|
|
97
|
+
*/
|
|
98
|
+
export declare function tableApprovalPolicySource(options: TableApprovalPolicySourceOptions): ApprovalPolicySource;
|
|
99
|
+
//#endregion
|
|
69
100
|
//#region src/supabase/approval-delegations.d.ts
|
|
70
101
|
type TableApprovalDelegationSourceOptions = {
|
|
71
102
|
readonly query: SqlQuery;
|
|
@@ -126,4 +157,4 @@ export declare function subjectFromSupabase(claims: unknown, options?: SupabaseS
|
|
|
126
157
|
*/
|
|
127
158
|
export declare function subjectFromSupabaseSession(session: SupabaseSessionLike | null | undefined, options?: SupabaseSubjectOptions): Subject<SupabasePrincipal>;
|
|
128
159
|
//#endregion
|
|
129
|
-
export { AUTHZ_VERSION_TABLE, type AuthorizeSqlOptions, type ExchangeCapabilityOptions, type MembershipHolders, type MembershipJunctionOptions, type MembershipSql, type MembershipStream, type MembershipTableOptions, type PostgrestSources, type PostgrestSourcesOptions, type RoleThrough, type SqlMembershipSource, type SqlQuery, type SubjectRecord, type SupabaseActClaim, type SupabaseActiveRow, type SupabaseActor, type SupabaseActorResult, type SupabaseApprovalStoreOptions, type SupabaseClaims, type SupabaseClaimsOptions, type SupabaseClaimsSchema, type SupabaseDatabaseManifest, type SupabaseDelegation, type SupabaseHookClaim, type SupabaseHookManifest, type SupabaseInclude, type SupabaseManifest, type SupabaseManifestActiveRow, type SupabaseManifestColumn, type SupabaseManifestHelper, type SupabaseManifestMembership, type SupabaseManifestNames, type SupabaseManifestRequires, type SupabaseManifestResourceNames, type SupabaseManifestRls, type SupabaseManifestRole, type SupabaseManifestScopeNames, type SupabaseManifestThrough, type SupabaseManifestValue, type SupabaseMembershipClaim, type SupabaseMembershipTable, type SupabasePermDockClaims, type SupabasePermissionRef, type SupabasePostgres, type SupabasePrincipal, type SupabaseRealtime, type SupabaseRlsConfig, type SupabaseRlsMembershipTable, type SupabaseRlsOptions, type SupabaseRpcCaller, type SupabaseRpcClient, type SupabaseRpcResult, type SupabaseSessionLike, type SupabaseStorage, type SupabaseSubjectOptions, type SupabaseSuspendedMembership, type SupabaseSuspendedScope, type SupabaseSuspension, type TableApprovalDelegationSourceOptions, authzVersion, hasTokenHook, junctionMembershipSource, parseSupabaseManifest, postgrestSources, readSubjectRecord, supabaseClaims, supabaseMembershipsBudget, supabasePostgresQuery, supabaseTenantClaim, tableMembershipSource };
|
|
160
|
+
export { AUTHZ_VERSION_TABLE, type AuthorizeSqlOptions, type ExchangeCapabilityOptions, type MembershipHolders, type MembershipJunctionOptions, type MembershipSql, type MembershipStream, type MembershipTableOptions, type PostgrestSources, type PostgrestSourcesOptions, type RoleThrough, type SqlMembershipSource, type SqlQuery, type SubjectRecord, type SupabaseActClaim, type SupabaseActiveRow, type SupabaseActor, type SupabaseActorResult, type SupabaseApprovalStoreOptions, type SupabaseClaims, type SupabaseClaimsOptions, type SupabaseClaimsSchema, type SupabaseDatabaseManifest, type SupabaseDelegation, type SupabaseHookClaim, type SupabaseHookManifest, type SupabaseInclude, type SupabaseManifest, type SupabaseManifestActiveRow, type SupabaseManifestColumn, type SupabaseManifestHelper, type SupabaseManifestMembership, type SupabaseManifestNames, type SupabaseManifestRequires, type SupabaseManifestResourceNames, type SupabaseManifestRls, type SupabaseManifestRole, type SupabaseManifestScopeNames, type SupabaseManifestThrough, type SupabaseManifestValue, type SupabaseMembershipClaim, type SupabaseMembershipTable, type SupabasePermDockClaims, type SupabasePermissionRef, type SupabasePostgres, type SupabasePrincipal, type SupabaseRealtime, type SupabaseRlsConfig, type SupabaseRlsMembershipTable, type SupabaseRlsOptions, type SupabaseRpcCaller, type SupabaseRpcClient, type SupabaseRpcResult, type SupabaseSessionLike, type SupabaseStorage, type SupabaseSubjectOptions, type SupabaseSuspendedMembership, type SupabaseSuspendedScope, type SupabaseSuspension, type TableApprovalDelegationSourceOptions, type TableApprovalPolicySourceOptions, authzVersion, hasTokenHook, junctionMembershipSource, parseSupabaseManifest, postgrestSources, readSubjectRecord, supabaseClaims, supabaseMembershipsBudget, supabasePostgresQuery, supabaseTenantClaim, tableMembershipSource };
|