permdock 0.2.0 → 0.3.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 +2 -2
- package/dist/ai-sdk/index.d.ts +3 -3
- package/dist/ai-sdk/index.js +1 -1
- package/dist/approvals/index.d.ts +2 -2
- package/dist/{arazzo-cmvX2jDe.js → arazzo-CKwwqFWz.js} +1 -1
- package/dist/authzen/index.d.ts +3 -3
- package/dist/authzen/index.js +1 -1
- package/dist/better-auth/index.d.ts +1 -1
- package/dist/better-supabase/index.d.ts +27 -10
- package/dist/better-supabase/index.js +44 -16
- package/dist/{bind-CVy3Espv.d.ts → bind-C_ob3LKa.d.ts} +5 -5
- package/dist/{bind-VnYn2HKq.js → bind-CuzGytRf.js} +1 -1
- package/dist/{capability-Dq43tT1u.d.ts → capability-2kYTMWDv.d.ts} +1 -1
- package/dist/catalog-CRW5Mx_B.js +2 -0
- package/dist/{catalog-z8q6bi_r.js → catalog-DWF5cYqB.js} +2 -2
- package/dist/{catalog-h2tlKFkq.js → catalog-dFZdWCGN.js} +2 -2
- package/dist/{catalog-doc-Dsc9y7sd.js → catalog-doc-DdGm82XT.js} +3 -26
- package/dist/claude-agent/index.d.ts +3 -3
- package/dist/claude-agent/index.js +1 -1
- package/dist/clerk/index.d.ts +2 -2
- package/dist/cli/bin.js +1 -1
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cloud/index.d.ts +4 -4
- package/dist/{cloud-BGhHS-lY.js → cloud-CB_ELYuX.js} +2 -2
- package/dist/{cloud-Bo3e9Ak3.js → cloud-DWLXO2af.js} +3 -3
- package/dist/{collect-DLlujdHC.js → collect-DClJsheJ.js} +3 -3
- package/dist/{collect-DDDv_ESs.js → collect-DSTE3ml9.js} +1 -1
- package/dist/collect-DSWOk19R.js +2 -0
- package/dist/{commands-DWOrSQic.js → commands-DSxCqG9A.js} +13 -13
- package/dist/compile/index.d.ts +1 -1
- package/dist/{compile-CNnl6uIt.d.ts → compile-BkRyBDBw.d.ts} +1 -1
- package/dist/{config-Bn00Z3ks.js → config-Dnszbv-6.js} +2 -2
- package/dist/{config-report-Dw_JcUqT.js → config-report-DMvWKUxL.js} +4 -4
- package/dist/{context-Ttp0ekMT.js → context-Bcy85rGi.js} +2 -2
- package/dist/convex/index.d.ts +3 -3
- package/dist/convex/index.js +1 -1
- package/dist/{create-BWyx3jua.d.ts → create-B1d519XK.d.ts} +5 -5
- package/dist/{create-CPhDL6qx.js → create-CMwIl-w2.js} +1 -1
- package/dist/{describe-PdoqESvg.d.ts → describe-DMYiCjJV.d.ts} +1 -1
- package/dist/{diff-B8Tunc3o.js → diff-2VaeChzX.js} +3 -3
- package/dist/{diff-CzqLxZ77.js → diff-DBIhz_f2.js} +2 -2
- package/dist/{doctor-rOr-4ZfS.js → doctor-BwCAMLx_.js} +2 -2
- package/dist/{doctor-collect-ByfYlNv1.js → doctor-collect-CHk6XWOA.js} +10 -9
- package/dist/{doctor-WpvG6p4k.js → doctor-igIiM_Hl.js} +10 -10
- package/dist/drizzle/index.d.ts +2 -2
- package/dist/elysia/index.d.ts +3 -3
- package/dist/elysia/index.js +1 -1
- package/dist/{errors-DAqevpNk.d.ts → errors-DPdqI50v.d.ts} +2 -2
- package/dist/eve/index.d.ts +3 -3
- package/dist/eve/index.js +1 -1
- package/dist/express/index.d.ts +3 -3
- package/dist/express/index.js +1 -1
- package/dist/fastify/index.d.ts +3 -3
- package/dist/fastify/index.js +1 -1
- package/dist/{from-snapshot-C3sHpZNS.js → from-snapshot-CTLijvdm.js} +1 -0
- package/dist/hono/index.d.ts +3 -3
- package/dist/hono/index.js +1 -1
- package/dist/{index-CtE07CBF.d.ts → index-0nNqHspG.d.ts} +2 -2
- package/dist/{index-D3vbkoSI.d.ts → index-BNc7Wer_.d.ts} +1 -1
- package/dist/{index-D6_cSa1z.d.ts → index-C7Tw7MaW.d.ts} +2 -2
- package/dist/{index-A0YNL8jZ.d.ts → index-C8z4RjQV.d.ts} +1 -1
- package/dist/index.d.ts +10 -10
- package/dist/index.js +3 -3
- package/dist/{instance-options-BK_rNOSC.d.ts → instance-options-jARdwfPN.d.ts} +1 -1
- package/dist/jwt/index.d.ts +4 -4
- package/dist/{kernel-GSQnMz3O.js → kernel-_RRHmnMY.js} +1 -1
- package/dist/kysely/index.d.ts +2 -2
- package/dist/mcp/index.d.ts +6 -6
- package/dist/mcp/index.js +2 -2
- package/dist/nest/index.d.ts +3 -3
- package/dist/nest/index.js +1 -1
- package/dist/next/index.d.ts +5 -5
- package/dist/next/index.js +1 -1
- package/dist/next/plugin.d.ts +1 -1
- package/dist/next/plugin.js +1 -1
- package/dist/node/index.d.ts +3 -3
- package/dist/node/index.js +1 -1
- package/dist/openai/index.d.ts +3 -3
- package/dist/openai/index.js +1 -1
- package/dist/openapi/index.d.ts +2 -2
- package/dist/{openapi-Bbg4wGVL.js → openapi-l0xYHkcv.js} +1 -1
- package/dist/orpc/index.d.ts +4 -4
- package/dist/orpc/index.js +2 -2
- package/dist/otel/index.d.ts +2 -2
- package/dist/{parse-local-manifest-BkGQNzAh.d.ts → parse-local-manifest-JLnaBH0S.d.ts} +1 -1
- package/dist/pdp/index.d.ts +2 -2
- package/dist/pdp/index.js +1 -1
- package/dist/{permdock-CzqXjCpU.js → permdock-CbgvLnuo.js} +35 -27
- package/dist/{permissions-CpZrivYv.js → permissions-RJrovw98.js} +1 -1
- package/dist/{policy-D8UFyERw.d.ts → policy-D2W7uv19.d.ts} +1 -1
- package/dist/{policy-CFZAr_Al.d.ts → policy-IB6yxpC3.d.ts} +21 -5
- package/dist/{powersync-C7kLglqX.js → powersync-BylawD_U.js} +7 -7
- package/dist/{powersync-yW1UUFzp.js → powersync-DliZK_-y.js} +2 -2
- package/dist/powersync-e_AZrKbg.js +2 -0
- package/dist/prisma/index.d.ts +1 -1
- package/dist/{problem-details-CkL50EEf.d.ts → problem-details-DX075l9V.d.ts} +1 -1
- package/dist/{protected-CNsMzrVd.d.ts → protected-BdnIEFkY.d.ts} +3 -3
- package/dist/{protected-Cs6kTaHo.js → protected-utU-SLuy.js} +1 -1
- package/dist/{protected-bZs6rbT1.d.ts → protected-xAr24FEC.d.ts} +3 -3
- package/dist/{provider-DLzpb2Xz.js → provider-CSQd7m92.js} +2 -2
- package/dist/{provider-Cjr62YMV.d.ts → provider-DZY281jO.d.ts} +1 -1
- package/dist/{provider-store-DNyC1y48.js → provider-store-Cfbvo4DE.js} +2 -2
- package/dist/react/index.d.ts +6 -6
- package/dist/react/index.js +2 -2
- package/dist/react/provider-client.d.ts +1 -1
- package/dist/react/provider-client.js +1 -1
- package/dist/react-native/index.d.ts +8 -8
- package/dist/react-native/index.js +3 -3
- package/dist/{replay-sqBGMnNs.d.ts → replay-CYyiLiwO.d.ts} +1 -1
- package/dist/{rls-CEvs64Kj.js → rls-B4ur8nKQ.js} +2 -2
- package/dist/{rls-BMNydpHk.js → rls-DQtdgTHB.js} +12 -12
- package/dist/{rls-fields-BMasREhR.js → rls-fields-74oZPXWL.js} +84 -4
- package/dist/{rls-graph-pc9fuXYm.js → rls-graph-CHwx0V8q.js} +2 -2
- package/dist/{rls-import-D8F7j35Q.js → rls-import-BTFVk3jH.js} +2 -2
- package/dist/{rls-migrate-7wikfrVI.js → rls-migrate-CN4TlJTO.js} +2 -2
- package/dist/{rls-ownership-B5Lkq62W.js → rls-ownership-RuFqaqGz.js} +3 -3
- package/dist/{rls-shared-aOQ4hGTO.js → rls-shared-Cewd_-zI.js} +4 -2
- package/dist/{rls-verify-D8B7dOTh.js → rls-verify-CVQTHTh5.js} +8 -7
- package/dist/row-conditions-h2HythXQ.js +27 -0
- package/dist/{rpc-DOK54_CS.js → rpc-DL9Sqvb1.js} +1 -1
- package/dist/{run-YXCJDNYk.js → run-DKDbM4Du.js} +1 -1
- package/dist/{saas-Bj_FFkjN.js → saas-DhpJjnBA.js} +2 -2
- package/dist/scim/index.d.ts +1 -1
- package/dist/server/index.d.ts +6 -6
- package/dist/server/index.js +1 -1
- package/dist/{sink-Gs6TTVa-.d.ts → sink-B1fZzIMf.d.ts} +1 -1
- package/dist/{skills-JaymNCdK.js → skills-Bx-U0irG.js} +1 -1
- package/dist/{snapshot-cache-DwQH8ufx.d.ts → snapshot-cache-B-LxUahj.d.ts} +1 -1
- package/dist/solid/index.d.ts +4 -4
- package/dist/solid/index.js +2 -2
- package/dist/{sources-B0UvrJ21.js → sources-4p0-4xQm.js} +12 -1
- package/dist/{sources-BcJgw0lt.d.ts → sources-BdOYLw9j.d.ts} +2 -2
- package/dist/{src-CSbUiozF.js → src-BDwEZWrZ.js} +1 -1
- package/dist/ssf/index.d.ts +3 -3
- package/dist/{store-D_pjn91-.d.ts → store-jOBYpiXC.d.ts} +2 -2
- package/dist/{store-options-yO0V6gRn.js → store-options-ByhZq1jV.js} +1 -1
- package/dist/{stores-4_sqiOA1.js → stores-BT2pSCub.js} +1 -1
- package/dist/{stores-DVR5NHLE.d.ts → stores-C0IMQrGI.d.ts} +2 -2
- package/dist/{stream-DlvG2hs-.d.ts → stream-D1RXubw2.d.ts} +1 -1
- package/dist/supabase/index.d.ts +15 -4
- package/dist/supabase/index.js +2 -2
- package/dist/supabase/middleware.d.ts +4 -4
- package/dist/supabase/middleware.js +2 -2
- package/dist/{supabase-CwafwxxF.js → supabase-Boqb9a_Y.js} +2 -2
- package/dist/{supabase-DTBaC20O.js → supabase-C0qESOa-.js} +7 -5
- package/dist/{supabase-config-Bs44dare.js → supabase-config-BpPXt3x1.js} +1 -1
- package/dist/supabase-hook-6sYLXg_u.js +2 -0
- package/dist/{supabase-hook-BuxLQLpU.js → supabase-hook-CSLQ4zJ3.js} +55 -9
- package/dist/{supautils-DYZnzRWV.js → supautils-Cn4R4cJ4.js} +1 -1
- package/dist/svelte/index.d.ts +5 -5
- package/dist/svelte/index.js +2 -2
- package/dist/svelte/runtime.d.ts +2 -2
- package/dist/svelte/runtime.js +1 -1
- package/dist/svelte/source.d.ts +5 -5
- package/dist/svelte/source.js +1 -1
- package/dist/terminal/index.d.ts +4 -4
- package/dist/terminal/index.js +1 -1
- package/dist/testing/index.d.ts +5 -5
- package/dist/testing/index.js +5 -5
- package/dist/testing/saas/index.d.ts +2 -2
- package/dist/testing/saas/index.js +2 -2
- package/dist/testing/saas/permissions.js +1 -1
- package/dist/trpc/index.d.ts +4 -4
- package/dist/trpc/index.js +2 -2
- package/dist/{types-C3s9xVJG.d.ts → types-BnIEz1sU.d.ts} +1 -1
- package/dist/{types-yF5LmQVD.d.ts → types-C97IskBw.d.ts} +1 -1
- package/dist/{types-kxznc7cn.d.ts → types-CKNSyIf_.d.ts} +1 -1
- package/dist/{types-9AWO9EGt.d.ts → types-Cq_H8N_X.d.ts} +2 -2
- package/dist/{types-BPxgszlT.d.ts → types-DbjRN55U.d.ts} +15 -2
- package/dist/{types-BVyImy5I.d.ts → types-DxiCGmmd.d.ts} +1 -1
- package/dist/{types-vNSDF7Dq.d.ts → types-QCuYJh4q.d.ts} +1 -1
- package/dist/{types-vKyAMtcX.d.ts → types-aqOHTHcp.d.ts} +1 -1
- package/dist/unplugin/index.d.ts +1 -1
- package/dist/unplugin/index.js +1 -1
- package/dist/usage-DorAJiU_.js +2 -0
- package/dist/{usage-D07N9QJ3.js → usage-GTixvDDU.js} +2 -2
- package/dist/{usage-DG1oeCca.js → usage-ItS7nLcl.js} +2 -2
- package/dist/{validation-error-CtF23SrC.d.ts → validation-error-Ba264OaJ.d.ts} +1 -1
- package/dist/vue/index.d.ts +4 -4
- package/dist/vue/index.js +2 -2
- package/dist/watch-BwxLTYMZ.js +2 -0
- package/dist/{watch-UihESpsJ.js → watch-DVBJ9cBq.js} +1 -1
- package/dist/webmcp/index.d.ts +1 -1
- package/package.json +3 -3
- package/dist/catalog-BjZSovXQ.js +0 -2
- package/dist/collect-rG2IQ3t0.js +0 -2
- package/dist/powersync-A8x_Yyvh.js +0 -2
- package/dist/supabase-hook-D5qVd_D8.js +0 -2
- package/dist/usage-D82l1CwK.js +0 -2
- package/dist/watch-Etoa_Mvr.js +0 -2
|
@@ -4,21 +4,21 @@ import { d as scopeList, o as resolveScope } from "./scopes-CVdPrWN-.js";
|
|
|
4
4
|
import { E as listRoles, s as flattenGrantee } from "./grantee-Cv5Sogfv.js";
|
|
5
5
|
import { h as scopeField } from "./validity-uOp8UpYn.js";
|
|
6
6
|
import { i as describeError, o as usageResult } from "./errors-CWfoNg9N.js";
|
|
7
|
-
import {
|
|
7
|
+
import { t as policyRowConditionKeys } from "./row-conditions-h2HythXQ.js";
|
|
8
8
|
import { a as loadModule, n as asPolicy, o as pickNamed } from "./load-DhWEB9P1.js";
|
|
9
9
|
import "./budget-NbEtbJC_.js";
|
|
10
10
|
import { n as escapeSqlIdent } from "./sql-xdg5f4Fi.js";
|
|
11
|
-
import "./sources-
|
|
11
|
+
import "./sources-4p0-4xQm.js";
|
|
12
12
|
import { i as SEEDS_MARKER, r as INDEXES_MARKER, t as GRANTS_MARKER } from "./markers-B0hYLvMD.js";
|
|
13
13
|
import { n as requirePeer } from "./peer-BOr_kJE1.js";
|
|
14
|
-
import { f as splitUndiffed, n as supabaseConfig } from "./supabase-config-
|
|
15
|
-
import {
|
|
16
|
-
import { A as helpersSql, B as breakGlassHolder, C as readTableIndexFacts, E as accessSql, F as seedSql, H as collectGrants, S as pruneIndexTargets, T as connectPgPool, U as roleNames, V as breakGlassKey, a as fieldViewsSql, b as indexTargets, c as assemblePolicies, d as readOnlyActorPolicies, f as branchClauses, g as permissionHelpersSql, h as tableFor, i as fieldViews, l as orSql, m as compileGrants, n as columnGrantSql, o as rowBranches, q as apiKeysPlan, r as columnRevokeSql, u as readOnlyActorKinds, v as permittedByPermissionHelper, x as indexesSql, y as COLUMNS_SQL } from "./rls-fields-
|
|
17
|
-
import { c as helperCallKeys, i as HELPER_TABLES, n as graphPlan, r as graphSql, s as callsHelper, t as closureDepths } from "./rls-graph-
|
|
18
|
-
import { a as ownershipRules, o as ownershipSql, r as assignmentSql } from "./rls-ownership-
|
|
19
|
-
import { _ as seedsMigration, d as resolveAuthorize, f as driftOf, g as pgDeltaPath, h as partPath, l as parseRbacAuthorize, m as parseSplit, o as supabaseHookSql, p as isSeedsDirectory, t as grantsLabel, u as rbacScaffold, v as writeSqlFiles } from "./supabase-hook-
|
|
20
|
-
import { n as runRlsVerify } from "./rls-verify-
|
|
21
|
-
import { t as supautilsRejections } from "./supautils-
|
|
14
|
+
import { f as splitUndiffed, n as supabaseConfig } from "./supabase-config-BpPXt3x1.js";
|
|
15
|
+
import { $ as sessionLiveHelperSql, G as quoteIdent$1, K as quoteLiteral, Q as scopeTypeOf, R as memberIdsHelper, T as graphSqlName, U as permittedIdsHelper, V as parseMembershipsFlag, W as qualifiedTable$1, X as scopeSources, Z as scopeTable, f as SESSION_LIVE_HELPER, o as qualified$1, q as quoteTable, r as HELPERS, rt as subjectIdSql, tt as subjectClaimJsonSql, w as graphHelper, y as checkSuspension } from "./rls-shared-Cewd_-zI.js";
|
|
16
|
+
import { A as helpersSql, B as breakGlassHolder, C as readTableIndexFacts, E as accessSql, F as seedSql, H as collectGrants, S as pruneIndexTargets, T as connectPgPool, U as roleNames, V as breakGlassKey, a as fieldViewsSql, b as indexTargets, c as assemblePolicies, d as readOnlyActorPolicies, f as branchClauses, g as permissionHelpersSql, h as tableFor, i as fieldViews, l as orSql, m as compileGrants, n as columnGrantSql, o as rowBranches, q as apiKeysPlan, r as columnRevokeSql, u as readOnlyActorKinds, v as permittedByPermissionHelper, x as indexesSql, y as COLUMNS_SQL } from "./rls-fields-74oZPXWL.js";
|
|
17
|
+
import { c as helperCallKeys, i as HELPER_TABLES, n as graphPlan, r as graphSql, s as callsHelper, t as closureDepths } from "./rls-graph-CHwx0V8q.js";
|
|
18
|
+
import { a as ownershipRules, o as ownershipSql, r as assignmentSql } from "./rls-ownership-RuFqaqGz.js";
|
|
19
|
+
import { _ as seedsMigration, d as resolveAuthorize, f as driftOf, g as pgDeltaPath, h as partPath, l as parseRbacAuthorize, m as parseSplit, o as supabaseHookSql, p as isSeedsDirectory, t as grantsLabel, u as rbacScaffold, v as writeSqlFiles } from "./supabase-hook-CSLQ4zJ3.js";
|
|
20
|
+
import { n as runRlsVerify } from "./rls-verify-CVQTHTh5.js";
|
|
21
|
+
import { t as supautilsRejections } from "./supautils-Cn4R4cJ4.js";
|
|
22
22
|
import { basename, delimiter, join, resolve } from "node:path";
|
|
23
23
|
import { spawnSync } from "node:child_process";
|
|
24
24
|
//#region src/cli/rls-advisors.ts
|
|
@@ -2363,7 +2363,7 @@ async function migrate(input) {
|
|
|
2363
2363
|
output: generated.output
|
|
2364
2364
|
};
|
|
2365
2365
|
await requirePeer(() => import("pgsql-parser"), "pgsql-parser", "permdock rls migrate", input.cwd);
|
|
2366
|
-
const { migrateTarget, runRlsMigrate } = await import("./rls-migrate-
|
|
2366
|
+
const { migrateTarget, runRlsMigrate } = await import("./rls-migrate-CN4TlJTO.js");
|
|
2367
2367
|
return runRlsMigrate({
|
|
2368
2368
|
cwd: input.cwd,
|
|
2369
2369
|
sql: input.sql,
|
|
@@ -2471,7 +2471,7 @@ async function runRls(input) {
|
|
|
2471
2471
|
}
|
|
2472
2472
|
case "import": {
|
|
2473
2473
|
await requirePeer(() => import("pgsql-parser"), "pgsql-parser", "permdock rls import", input.cwd);
|
|
2474
|
-
const { runRlsImport } = await import("./rls-import-
|
|
2474
|
+
const { runRlsImport } = await import("./rls-import-BTFVk3jH.js");
|
|
2475
2475
|
return runRlsImport({
|
|
2476
2476
|
cwd: input.cwd,
|
|
2477
2477
|
config: input.config,
|
|
@@ -7,15 +7,15 @@ import { E as listRoles, l as inheritCondition, m as relationCondition } from ".
|
|
|
7
7
|
import { t as canonicalJson } from "./canonical-json-DemiK4Vp.js";
|
|
8
8
|
import { d as partitionsOf, h as scopeField } from "./validity-uOp8UpYn.js";
|
|
9
9
|
import { t as requiresApproval } from "./approval-required-TzNB9oQA.js";
|
|
10
|
-
import { _ as leveled, p as andWhere } from "./permdock-
|
|
10
|
+
import { _ as leveled, p as andWhere } from "./permdock-CbgvLnuo.js";
|
|
11
11
|
import { i as requiresStandIn } from "./delegation-D8pUEuce.js";
|
|
12
12
|
import { t as CliError } from "./errors-CWfoNg9N.js";
|
|
13
|
-
import { o as jsonSchemaOf } from "./catalog-doc-
|
|
13
|
+
import { o as jsonSchemaOf } from "./catalog-doc-DdGm82XT.js";
|
|
14
14
|
import { i as scopeMembershipTable, o as relatedSql, r as scopeColumn } from "./compile-Ba4blROR.js";
|
|
15
15
|
import { t as SQL_IDENT } from "./sql-xdg5f4Fi.js";
|
|
16
|
-
import {
|
|
16
|
+
import { l as roleColumn, u as roleManifest } from "./sources-4p0-4xQm.js";
|
|
17
17
|
import { n as requirePeer } from "./peer-BOr_kJE1.js";
|
|
18
|
-
import {
|
|
18
|
+
import { A as keptRowSql, B as memberVia, C as grantPermissionSql, D as hasMemberFor, E as graphSqlText, F as memberForHelper, G as quoteIdent, H as permittedForHelper, I as memberForSources, J as restrictedHelper, K as quoteLiteral, M as kindFilterSql, N as linkHelper, O as inheritedRowsHelper, P as liveSessionSql, Q as scopeTypeOf, R as memberIdsHelper, S as globalKindFilterSql, U as permittedIdsHelper, W as qualifiedTable, X as scopeSources, Y as roleKindSql, Z as scopeTable, _ as activeUserSql, a as helperSchema, at as tenantTypeOf, b as columnTypesOf, c as signedIn, d as CLOSURE, et as sqlType, h as activeMembershipSql, i as allowEntry, it as tenantClaimSql, j as keyTenantSql, k as isRecord, l as textArray, m as activeInstancesSql, n as GLOBAL_ROLES, nt as subjectClaimSql, o as qualified$1, ot as userIdHelperSql, q as quoteTable, r as HELPERS, rt as subjectIdSql, s as rootName, t as CUSTOM_ROLES, tt as subjectClaimJsonSql, u as CLAIM, v as arrayColumnsOf, w as graphHelper, x as disabledKeep, z as memberRoleOf } from "./rls-shared-Cewd_-zI.js";
|
|
19
19
|
import { createHash } from "node:crypto";
|
|
20
20
|
//#region src/cli/rls-api-keys.ts
|
|
21
21
|
const API_KEY_ALLOWS = "permdock_api_key_allows";
|
|
@@ -1472,6 +1472,84 @@ create trigger "permdock_custom_role_cascade"
|
|
|
1472
1472
|
`;
|
|
1473
1473
|
}
|
|
1474
1474
|
//#endregion
|
|
1475
|
+
//#region src/cli/rls-global-roles.ts
|
|
1476
|
+
function qualifiedName(name) {
|
|
1477
|
+
return name.includes(".") ? name : `public.${name}`;
|
|
1478
|
+
}
|
|
1479
|
+
/**
|
|
1480
|
+
* `permdock_replace_global_roles(p_user, p_roles)`: sets the global roles of
|
|
1481
|
+
* one user in `rls.roles` in one statement pair. It runs as the invoker, so
|
|
1482
|
+
* the table's policies and the `rls.assignments` trigger judge every row it
|
|
1483
|
+
* deletes or inserts.
|
|
1484
|
+
*/
|
|
1485
|
+
function globalRolesSql(ctx) {
|
|
1486
|
+
if (ctx.roles === void 0) return "";
|
|
1487
|
+
const source = globalRoleSource(ctx.roles, "public", "t");
|
|
1488
|
+
const table = quoteTable(qualifiedName(ctx.roles.table));
|
|
1489
|
+
const user = quoteIdent(source.user);
|
|
1490
|
+
const fn = qualified$1(ctx, GLOBAL_ROLES.replace);
|
|
1491
|
+
const type = ctx.dialect === "supabase" ? "uuid" : "text";
|
|
1492
|
+
const wanted = `select distinct r from unnest(coalesce(p_roles, '{}'::text[])) r where r is not null`;
|
|
1493
|
+
const through = source.through;
|
|
1494
|
+
let body;
|
|
1495
|
+
if (through === void 0) {
|
|
1496
|
+
const role = typeof ctx.roles.role === "string" ? ctx.roles.role : "role";
|
|
1497
|
+
const column = quoteIdent(role);
|
|
1498
|
+
body = ` delete from ${table} t
|
|
1499
|
+
where t.${user} = p_user
|
|
1500
|
+
and t.${column}::text <> all(coalesce(p_roles, '{}'::text[]));
|
|
1501
|
+
insert into ${table} (${user}, ${column})
|
|
1502
|
+
select p_user, w.r
|
|
1503
|
+
from (${wanted}) w(r)
|
|
1504
|
+
where not exists (
|
|
1505
|
+
select 1 from ${table} t where t.${user} = p_user and t.${column}::text = w.r
|
|
1506
|
+
);`;
|
|
1507
|
+
} else {
|
|
1508
|
+
const keys = quoteTable(through.table);
|
|
1509
|
+
const id = quoteIdent(through.id);
|
|
1510
|
+
const key = quoteIdent(through.key);
|
|
1511
|
+
const ref = quoteIdent(through.ref);
|
|
1512
|
+
body = ` select string_agg(w.r, ', ' order by w.r) into v_unknown
|
|
1513
|
+
from (${wanted}) w(r)
|
|
1514
|
+
where not exists (select 1 from ${keys} k where k.${key}::text = w.r);
|
|
1515
|
+
if v_unknown is not null then
|
|
1516
|
+
raise exception using
|
|
1517
|
+
errcode = '22023',
|
|
1518
|
+
message = 'permdock: ' || v_unknown || ' is not a role',
|
|
1519
|
+
hint = 'unknown-role';
|
|
1520
|
+
end if;
|
|
1521
|
+
delete from ${table} t
|
|
1522
|
+
where t.${user} = p_user
|
|
1523
|
+
and not exists (
|
|
1524
|
+
select 1 from ${keys} k
|
|
1525
|
+
where k.${id} = t.${ref}
|
|
1526
|
+
and k.${key}::text = any(coalesce(p_roles, '{}'::text[]))
|
|
1527
|
+
);
|
|
1528
|
+
insert into ${table} (${user}, ${ref})
|
|
1529
|
+
select p_user, k.${id}
|
|
1530
|
+
from ${keys} k
|
|
1531
|
+
where k.${key}::text in (${wanted})
|
|
1532
|
+
and not exists (
|
|
1533
|
+
select 1 from ${table} t where t.${user} = p_user and t.${ref} = k.${id}
|
|
1534
|
+
);`;
|
|
1535
|
+
}
|
|
1536
|
+
const declare = through === void 0 ? "" : "declare\n v_unknown text;\n";
|
|
1537
|
+
const args = `${type}, text[]`;
|
|
1538
|
+
return `-- set the global roles of a user: delete the others and insert the missing ones, as the caller, so the table's policies and the assignment trigger still apply
|
|
1539
|
+
create or replace function ${fn}(p_user ${type}, p_roles text[])
|
|
1540
|
+
returns void
|
|
1541
|
+
language plpgsql
|
|
1542
|
+
volatile
|
|
1543
|
+
set search_path = ''
|
|
1544
|
+
as $$
|
|
1545
|
+
${declare}begin
|
|
1546
|
+
${body}
|
|
1547
|
+
end;
|
|
1548
|
+
$$;
|
|
1549
|
+
revoke execute on function ${fn}(${args}) from public, anon;
|
|
1550
|
+
grant execute on function ${fn}(${args}) to authenticated;`;
|
|
1551
|
+
}
|
|
1552
|
+
//#endregion
|
|
1475
1553
|
//#region src/cli/rls-helpers.ts
|
|
1476
1554
|
/** The helper `--capabilities` adds: ids of one resource a link capability claim reaches. Part of the SQL contract. */
|
|
1477
1555
|
const CAPABILITIES = { ids: "permdock_capability_ids" };
|
|
@@ -2183,6 +2261,8 @@ revoke all on table ${ur} from anon, authenticated, public;`);
|
|
|
2183
2261
|
const cascade = customRoleCascadeSql(ctx);
|
|
2184
2262
|
if (cascade !== "") chunks.push(cascade);
|
|
2185
2263
|
}
|
|
2264
|
+
const globalRoles = globalRolesSql(ctx);
|
|
2265
|
+
if (globalRoles !== "") chunks.push(globalRoles);
|
|
2186
2266
|
const readers = roleReadersSql(ctx, options.permissions, options.trustedReaders);
|
|
2187
2267
|
if (readers !== "") chunks.push(readers);
|
|
2188
2268
|
return `${chunks.join("\n\n")}\n`;
|
|
@@ -2,8 +2,8 @@ import { S as restrictedFor, d as isEdgeRelation, f as isFieldRelation, g as isS
|
|
|
2
2
|
import { d as scopeList } from "./scopes-CVdPrWN-.js";
|
|
3
3
|
import { l as inheritCondition, m as relationCondition, s as flattenGrantee } from "./grantee-Cv5Sogfv.js";
|
|
4
4
|
import { c as relationArmSql, u as restrictedRowsSql } from "./compile-Ba4blROR.js";
|
|
5
|
-
import "./sources-
|
|
6
|
-
import {
|
|
5
|
+
import "./sources-4p0-4xQm.js";
|
|
6
|
+
import { E as graphSqlText, G as quoteIdent, J as restrictedHelper, K as quoteLiteral, N as linkHelper, T as graphSqlName, W as qualifiedTable, _ as activeUserSql, d as CLOSURE, q as quoteTable, r as HELPERS, w as graphHelper } from "./rls-shared-Cewd_-zI.js";
|
|
7
7
|
//#region src/cli/helper-calls.ts
|
|
8
8
|
/**
|
|
9
9
|
* Tables whose policies other packages write by calling the SQL helpers
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { o as usageResult } from "./errors-CWfoNg9N.js";
|
|
2
2
|
import { i as quoteSqlLiteral, n as escapeSqlIdent } from "./sql-xdg5f4Fi.js";
|
|
3
|
-
import {
|
|
4
|
-
import { t as FIELD_VIEWS, w as connectPg } from "./rls-fields-
|
|
3
|
+
import { V as parseMembershipsFlag, r as HELPERS } from "./rls-shared-Cewd_-zI.js";
|
|
4
|
+
import { t as FIELD_VIEWS, w as connectPg } from "./rls-fields-74oZPXWL.js";
|
|
5
5
|
import { n as emptySchema, r as isSchemaKind, t as emitPermissionsModule } from "./generate-CH7ThJ14.js";
|
|
6
6
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
7
7
|
import { dirname, resolve } from "node:path";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as describeError } from "./errors-CWfoNg9N.js";
|
|
2
2
|
import { a as sqlFiles } from "./files-DWUN9PzI.js";
|
|
3
3
|
import { i as quoteSqlLiteral, n as escapeSqlIdent } from "./sql-xdg5f4Fi.js";
|
|
4
|
-
import "./sources-
|
|
5
|
-
import {
|
|
4
|
+
import "./sources-4p0-4xQm.js";
|
|
5
|
+
import { r as HELPERS } from "./rls-shared-Cewd_-zI.js";
|
|
6
6
|
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
7
7
|
import { relative, resolve } from "node:path";
|
|
8
8
|
import { parse } from "pgsql-parser";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { l as scopeChain, o as resolveScope } from "./scopes-CVdPrWN-.js";
|
|
2
2
|
import { S as findRole } from "./grantee-Cv5Sogfv.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { D as claimKeptLines, I as sourceFilters, L as sourcesKeep, M as membershipRows, N as membershipTable, O as disabledColumn, P as roleRows, R as hasCustomRoleChecksFor, j as memberColumn, k as globalRoleRows } from "./rls-fields-
|
|
3
|
+
import { l as roleColumn } from "./sources-4p0-4xQm.js";
|
|
4
|
+
import { B as memberVia, G as quoteIdent, I as memberForSources, K as quoteLiteral, L as memberForTable, M as kindFilterSql, S as globalKindFilterSql, W as qualifiedTable, X as scopeSources, Y as roleKindSql, Z as scopeTable, at as tenantTypeOf, c as signedIn, o as qualified, q as quoteTable, rt as subjectIdSql, t as CUSTOM_ROLES, z as memberRoleOf } from "./rls-shared-Cewd_-zI.js";
|
|
5
|
+
import { D as claimKeptLines, I as sourceFilters, L as sourcesKeep, M as membershipRows, N as membershipTable, O as disabledColumn, P as roleRows, R as hasCustomRoleChecksFor, j as memberColumn, k as globalRoleRows } from "./rls-fields-74oZPXWL.js";
|
|
6
6
|
//#region src/cli/rls-ownership.ts
|
|
7
7
|
/** Objects the ownership rules add next to the helpers. Names are part of the SQL contract. */
|
|
8
8
|
const OWNERSHIP = {
|
|
@@ -3,7 +3,7 @@ import { c as rootScope, l as scopeChain, o as resolveScope } from "./scopes-CVd
|
|
|
3
3
|
import { t as byCodePoint } from "./compare-pfyVnBjE.js";
|
|
4
4
|
import { i as scopeMembershipTable, r as scopeColumn } from "./compile-Ba4blROR.js";
|
|
5
5
|
import { a as quoteSqlTable, i as quoteSqlLiteral, r as quoteSqlIdent, t as SQL_IDENT } from "./sql-xdg5f4Fi.js";
|
|
6
|
-
import {
|
|
6
|
+
import { d as keptKeys, l as roleColumn } from "./sources-4p0-4xQm.js";
|
|
7
7
|
//#region src/cli/rls-sql.ts
|
|
8
8
|
const CLI = "PermDock CLI";
|
|
9
9
|
const CLAIM = SQL_IDENT;
|
|
@@ -469,6 +469,8 @@ const CUSTOM_ROLES = {
|
|
|
469
469
|
trustedRemove: "permdock_trusted_delete_custom_role_grants",
|
|
470
470
|
cascade: "permdock_cascade_custom_role"
|
|
471
471
|
};
|
|
472
|
+
/** The function `rls.roles` adds. The name is part of the SQL contract. */
|
|
473
|
+
const GLOBAL_ROLES = { replace: "permdock_replace_global_roles" };
|
|
472
474
|
function helperSchema(ctx) {
|
|
473
475
|
return ctx.schema ?? "permdock";
|
|
474
476
|
}
|
|
@@ -490,4 +492,4 @@ function textArray(values) {
|
|
|
490
492
|
return values.length === 0 ? `'{}'::text[]` : `array[${values.map(quoteLiteral).join(", ")}]::text[]`;
|
|
491
493
|
}
|
|
492
494
|
//#endregion
|
|
493
|
-
export {
|
|
495
|
+
export { sessionLiveHelperSql as $, keptRowSql as A, memberVia as B, grantPermissionSql as C, hasMemberFor as D, graphSqlText as E, memberForHelper as F, quoteIdent as G, permittedForHelper as H, memberForSources as I, restrictedHelper as J, quoteLiteral as K, memberForTable as L, kindFilterSql as M, linkHelper as N, inheritedRowsHelper as O, liveSessionSql as P, scopeTypeOf as Q, memberIdsHelper as R, globalKindFilterSql as S, graphSqlName as T, permittedIdsHelper as U, parseMembershipsFlag as V, qualifiedTable as W, scopeSources as X, roleKindSql as Y, scopeTable as Z, activeUserSql as _, helperSchema as a, tenantTypeOf as at, columnTypesOf as b, signedIn as c, CLOSURE as d, sqlType as et, SESSION_LIVE_HELPER as f, activeRowSql as g, activeMembershipSql as h, allowEntry as i, tenantClaimSql as it, keyTenantSql as j, isRecord as k, textArray as l, activeInstancesSql as m, GLOBAL_ROLES as n, subjectClaimSql as nt, qualified as o, userIdHelperSql as ot, USER_ID_HELPER as p, quoteTable as q, HELPERS as r, subjectIdSql as rt, rootName as s, CUSTOM_ROLES as t, subjectClaimJsonSql as tt, CLAIM as u, arrayColumnsOf as v, graphHelper as w, disabledKeep as x, checkSuspension as y, memberRoleOf as z };
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { _ as listPermissions, d as isEdgeRelation, f as isFieldRelation, i as findPermission, m as isPrincipalRelation } from "./permissions-DVoF6dMt.js";
|
|
2
2
|
import { a as hasConditionOp } from "./refs-KYb4ntaz.js";
|
|
3
|
-
import { _ as memoryRoleSource } from "./src-
|
|
3
|
+
import { _ as memoryRoleSource } from "./src-BDwEZWrZ.js";
|
|
4
4
|
import { d as scopeList } from "./scopes-CVdPrWN-.js";
|
|
5
|
-
import { g as customRoleScope, t as createPermDock, v as membershipsClaim } from "./permdock-
|
|
5
|
+
import { g as customRoleScope, t as createPermDock, v as membershipsClaim } from "./permdock-CbgvLnuo.js";
|
|
6
6
|
import { t as memoryRelations } from "./relations-cjOL01hZ.js";
|
|
7
7
|
import { i as describeError, o as usageResult } from "./errors-CWfoNg9N.js";
|
|
8
|
-
import {
|
|
8
|
+
import { t as policyRowConditionKeys } from "./row-conditions-h2HythXQ.js";
|
|
9
|
+
import { o as jsonSchemaOf } from "./catalog-doc-DdGm82XT.js";
|
|
9
10
|
import { a as loadModule, n as asPolicy, o as pickNamed } from "./load-DhWEB9P1.js";
|
|
10
11
|
import "./budget-NbEtbJC_.js";
|
|
11
|
-
import "./sources-
|
|
12
|
-
import { G as
|
|
13
|
-
import { p as commandFor, s as viewName, t as FIELD_VIEWS, w as connectPg } from "./rls-fields-
|
|
14
|
-
import { a as HELPER_TABLE_POLICIES_SQL, d as rowConditionMessage, n as graphPlan, u as helperTablePoliciesFromRows } from "./rls-graph-
|
|
12
|
+
import "./sources-4p0-4xQm.js";
|
|
13
|
+
import { G as quoteIdent, K as quoteLiteral, b as columnTypesOf, q as quoteTable } from "./rls-shared-Cewd_-zI.js";
|
|
14
|
+
import { p as commandFor, s as viewName, t as FIELD_VIEWS, w as connectPg } from "./rls-fields-74oZPXWL.js";
|
|
15
|
+
import { a as HELPER_TABLE_POLICIES_SQL, d as rowConditionMessage, n as graphPlan, u as helperTablePoliciesFromRows } from "./rls-graph-CHwx0V8q.js";
|
|
15
16
|
import { n as fixtureSubject, r as loadFixtures, t as fixtureRow } from "./fixtures-ht28Cplr.js";
|
|
16
17
|
import { resolve } from "node:path";
|
|
17
18
|
import { randomUUID } from "node:crypto";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region src/core/row-conditions.ts
|
|
2
|
+
const ROW_GRANTEES = /* @__PURE__ */ new Set([
|
|
3
|
+
"relation",
|
|
4
|
+
"plan",
|
|
5
|
+
"actor",
|
|
6
|
+
"assurance",
|
|
7
|
+
"inherit"
|
|
8
|
+
]);
|
|
9
|
+
/**
|
|
10
|
+
* Whether a grant depends on more than the role and the scope: a row or body
|
|
11
|
+
* condition, a closure, a field list, a purpose, a break-glass override, a
|
|
12
|
+
* validity window, a `requires`, or a relation, plan, actor or assurance grantee. The SQL helpers
|
|
13
|
+
* (`permdock_has`, `permitted_<scope>_ids`) check only role and scope, so a
|
|
14
|
+
* policy that calls them for such a permission would widen access.
|
|
15
|
+
*/
|
|
16
|
+
function grantHasRowConditions(grant) {
|
|
17
|
+
const grantees = Array.isArray(grant.to) ? grant.to : [grant.to];
|
|
18
|
+
return grant.where !== void 0 || grant.check !== void 0 || grant.closure !== void 0 || !grant.portable || grant.fields !== void 0 || grant.purpose !== void 0 || grant.breakGlass !== void 0 || grant.validity !== void 0 || grant.requires !== void 0 || grantees.some((grantee) => ROW_GRANTEES.has(grantee.kind));
|
|
19
|
+
}
|
|
20
|
+
/** Per permission key, whether any code grant for it has row conditions. */
|
|
21
|
+
function policyRowConditionKeys(policy) {
|
|
22
|
+
const keys = /* @__PURE__ */ new Set();
|
|
23
|
+
for (const grant of [...policy.grants, ...policy.roles.flatMap((binding) => binding.grants)]) if (grant.hosted === void 0 && grantHasRowConditions(grant)) keys.add(grant.permission.key);
|
|
24
|
+
return keys;
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { policyRowConditionKeys as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as compact } from "./compact-y6vfu2_f.js";
|
|
2
2
|
import { o as requestFromContext } from "./http-SO7qGttf.js";
|
|
3
3
|
import { n as tenantScope } from "./adapter-context-mlWsVGGg.js";
|
|
4
|
-
import { t as adapterKernel } from "./bind-
|
|
4
|
+
import { t as adapterKernel } from "./bind-CuzGytRf.js";
|
|
5
5
|
import { n as guardIterable } from "./stream-DDpvynSB.js";
|
|
6
6
|
//#region src/server/rpc.ts
|
|
7
7
|
/** The tRPC and oRPC error code for a Problem Details status. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as exitCodeOf, i as describeError, n as cliErrorKind, r as cliProblem } from "./errors-CWfoNg9N.js";
|
|
2
2
|
import { o as cliVersion } from "./version-BvacVTZR.js";
|
|
3
3
|
import { a as resolveCwd, i as readConfig } from "./config-BJiM-xAm.js";
|
|
4
|
-
import { i as globalArgs, n as commands, o as resolveArgs, r as isCommand, s as stringArg, t as COMMAND_DESCRIPTIONS } from "./commands-
|
|
4
|
+
import { i as globalArgs, n as commands, o as resolveArgs, r as isCommand, s as stringArg, t as COMMAND_DESCRIPTIONS } from "./commands-DSxCqG9A.js";
|
|
5
5
|
import { stripVTControlCharacters } from "node:util";
|
|
6
6
|
import { defineCommand, parseArgs, renderUsage, runCommand } from "citty";
|
|
7
7
|
//#region src/cli/run.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as principal } from "./refs-KYb4ntaz.js";
|
|
2
2
|
import { _ as memoryLimitStore, a as definePolicy, m as role, o as deny, t as allow } from "./policy-xyWg7QdR.js";
|
|
3
|
-
import { _ as memoryRoleSource } from "./src-
|
|
3
|
+
import { _ as memoryRoleSource } from "./src-BDwEZWrZ.js";
|
|
4
4
|
import { n as anyone, p as relation } from "./grantee-Cv5Sogfv.js";
|
|
5
5
|
import { t as memoryRelations } from "./relations-cjOL01hZ.js";
|
|
6
6
|
import { i as quoteSqlLiteral } from "./sql-xdg5f4Fi.js";
|
|
7
|
-
import { a as saasPlans, i as saasPermissions, o as saasRoles } from "./permissions-
|
|
7
|
+
import { a as saasPlans, i as saasPermissions, o as saasRoles } from "./permissions-RJrovw98.js";
|
|
8
8
|
//#region src/testing/saas/policy.ts
|
|
9
9
|
function isSubject(user) {
|
|
10
10
|
return user !== null && "context" in user && "principal" in user;
|
package/dist/scim/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as ScimPageResult, C as LIST_SCHEMA, D as ScimFilter, E as SCIM_CONTENT_TYPE, M as ScimTokenOptions, N as USER_SCHEMA, O as ScimHandlerOptions, S as GROUP_SCHEMA, T as ROLES_EXTENSION, _ as DirectoryNotFoundError, a as scimHandler, b as DirectoryUser, c as parseScimFilter, d as serviceProviderConfig, f as authenticateScim, g as DirectoryMembershipSourceOptions, h as DirectoryGroup, i as tenantFromPath, j as ScimPatchOp, k as ScimPage, l as resourceTypes, m as DirectoryChange, n as directoryMembershipSource, o as filterSupported, p as sha256Hex, r as normalizePatchOps, s as matchFilter, t as memoryDirectoryStore, u as schemas, v as DirectoryStore, w as PATCH_SCHEMA, x as ERROR_SCHEMA, y as DirectoryUniquenessError } from "../index-
|
|
1
|
+
import { A as ScimPageResult, C as LIST_SCHEMA, D as ScimFilter, E as SCIM_CONTENT_TYPE, M as ScimTokenOptions, N as USER_SCHEMA, O as ScimHandlerOptions, S as GROUP_SCHEMA, T as ROLES_EXTENSION, _ as DirectoryNotFoundError, a as scimHandler, b as DirectoryUser, c as parseScimFilter, d as serviceProviderConfig, f as authenticateScim, g as DirectoryMembershipSourceOptions, h as DirectoryGroup, i as tenantFromPath, j as ScimPatchOp, k as ScimPage, l as resourceTypes, m as DirectoryChange, n as directoryMembershipSource, o as filterSupported, p as sha256Hex, r as normalizePatchOps, s as matchFilter, t as memoryDirectoryStore, u as schemas, v as DirectoryStore, w as PATCH_SCHEMA, x as ERROR_SCHEMA, y as DirectoryUniquenessError } from "../index-C8z4RjQV.js";
|
|
2
2
|
export { type DirectoryChange, type DirectoryGroup, type DirectoryMembershipSourceOptions, DirectoryNotFoundError, type DirectoryStore, DirectoryUniquenessError, type DirectoryUser, ERROR_SCHEMA, GROUP_SCHEMA, LIST_SCHEMA, PATCH_SCHEMA, ROLES_EXTENSION, SCIM_CONTENT_TYPE, type ScimFilter, type ScimHandlerOptions, type ScimPage, type ScimPageResult, type ScimPatchOp, type ScimTokenOptions, USER_SCHEMA, authenticateScim, directoryMembershipSource, filterSupported, matchFilter, memoryDirectoryStore, normalizePatchOps, parseScimFilter, resourceTypes, schemas, scimHandler, serviceProviderConfig, sha256Hex, tenantFromPath };
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { $t as CredentialPrincipal, Ct as SettingsSource, Kt as Credential, Nr as Principal, Pr as Subject, Yn as Decision, at as DecisionSink, et as AuthEvent, jt as SubjectResolver, nt as CredentialVerifier } from "../policy-
|
|
1
|
+
import { $t as CredentialPrincipal, Ct as SettingsSource, Kt as Credential, Nr as Principal, Pr as Subject, Yn as Decision, at as DecisionSink, et as AuthEvent, jt as SubjectResolver, nt as CredentialVerifier } from "../policy-IB6yxpC3.js";
|
|
2
2
|
import { f as Permission, m as PermissionTree } from "../permissions-DttnqqxC.js";
|
|
3
|
-
import { n as PermDockValidationError, t as PROBLEM_BASE } from "../validation-error-
|
|
4
|
-
import { t as Disclosure } from "../problem-details-
|
|
5
|
-
import { a as ProblemDetails, i as PermDockRevokedError, n as PermDockApprovalRequiredError, r as PermDockDeniedError, t as ApprovalHint } from "../errors-
|
|
3
|
+
import { n as PermDockValidationError, t as PROBLEM_BASE } from "../validation-error-Ba264OaJ.js";
|
|
4
|
+
import { t as Disclosure } from "../problem-details-DX075l9V.js";
|
|
5
|
+
import { a as ProblemDetails, i as PermDockRevokedError, n as PermDockApprovalRequiredError, r as PermDockDeniedError, t as ApprovalHint } from "../errors-DPdqI50v.js";
|
|
6
6
|
import { i as memoryRevocationFeed, n as RevocationFeed, t as RevocationEvent } from "../revocations-Cy06JNx2.js";
|
|
7
|
-
import { A as ConnectionOptions, C as invalidSignatureResponse, D as tenantScope, E as TenantScope, O as Connection, S as invalidSignatureProblem, T as TenantOption, _ as WebBotAuthKeyLookup, a as ScopeGuard, b as WebBotAuthVerifier, c as ServerPermDock, d as createPermDock, f as createServerKernel, g as WebBotAuthJwk, h as InvalidSignatureError, i as ProtectOptions, k as ConnectionData, l as ServerPermDockOptions, m as DiscoverViaSignatureAgentOptions, n as OpenApiHooks, o as ServerKernel, p as createEvaluationsHandler, r as OperationScopes, s as ServerKernelOptions, t as Guard, u as SnapshotQuery, v as WebBotAuthKeys, w as verifyWebBotAuth, x as discoverViaSignatureAgent, y as WebBotAuthOptions } from "../create-
|
|
8
|
-
import { a as snapshotHeaders, i as cacheLifeFor, n as SnapshotHeaders, o as snapshotTag, r as SnapshotHeadersOptions, t as CacheLifeForOptions } from "../snapshot-cache-
|
|
7
|
+
import { A as ConnectionOptions, C as invalidSignatureResponse, D as tenantScope, E as TenantScope, O as Connection, S as invalidSignatureProblem, T as TenantOption, _ as WebBotAuthKeyLookup, a as ScopeGuard, b as WebBotAuthVerifier, c as ServerPermDock, d as createPermDock, f as createServerKernel, g as WebBotAuthJwk, h as InvalidSignatureError, i as ProtectOptions, k as ConnectionData, l as ServerPermDockOptions, m as DiscoverViaSignatureAgentOptions, n as OpenApiHooks, o as ServerKernel, p as createEvaluationsHandler, r as OperationScopes, s as ServerKernelOptions, t as Guard, u as SnapshotQuery, v as WebBotAuthKeys, w as verifyWebBotAuth, x as discoverViaSignatureAgent, y as WebBotAuthOptions } from "../create-B1d519XK.js";
|
|
8
|
+
import { a as snapshotHeaders, i as cacheLifeFor, n as SnapshotHeaders, o as snapshotTag, r as SnapshotHeadersOptions, t as CacheLifeForOptions } from "../snapshot-cache-B-LxUahj.js";
|
|
9
9
|
//#region src/server/credentials.d.ts
|
|
10
10
|
/** `on('auth')` causes for an API key that resolves to the anonymous subject. */
|
|
11
11
|
type ApiKeyFailureCause = "malformed" | "unknown-credential" | "invalid-claims" | "expired" | "credential-policy" | "credential-revoked" | "owner-unavailable";
|
package/dist/server/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { d as wwwAuthenticate, o as problemFromDecision, s as problemResponse, u
|
|
|
5
5
|
import { n as snapshotHeaders, r as snapshotTag, t as cacheLifeFor } from "../snapshot-cache-D6jLelln.js";
|
|
6
6
|
import { a as invalidSignatureProblem, i as discoverViaSignatureAgent, n as createEvaluationsHandler, o as invalidSignatureResponse, r as InvalidSignatureError, s as verifyWebBotAuth } from "../evaluations-tz6D9A2G.js";
|
|
7
7
|
import { n as tenantScope } from "../adapter-context-mlWsVGGg.js";
|
|
8
|
-
import { n as createServerKernel, t as createPermDock } from "../create-
|
|
8
|
+
import { n as createServerKernel, t as createPermDock } from "../create-CMwIl-w2.js";
|
|
9
9
|
import { a as parseApiKey, i as memoryCredentials, n as generateApiKey, o as subjectFromApiKey, r as hashApiKey, t as apiKeyVerifier } from "../server-DlZ28Oz5.js";
|
|
10
10
|
import { t as problemFromError } from "../map-error-pgUWNNtG.js";
|
|
11
11
|
export { InvalidSignatureError, PROBLEM_BASE, PermDockApprovalRequiredError, PermDockDeniedError, PermDockRevokedError, PermDockValidationError, apiKeyVerifier, cacheLifeFor, createEvaluationsHandler, createPermDock, createServerKernel, discoverViaSignatureAgent, generateApiKey, hashApiKey, invalidSignatureProblem, invalidSignatureResponse, memoryCredentials, memoryRevocationFeed, parseApiKey, problemFromDecision, problemFromError, problemResponse, snapshotHeaders, snapshotTag, subjectFromApiKey, tenantScope, validationProblem, verifyWebBotAuth, wwwAuthenticate };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as AccessEvent, Kt as Credential, Pt as TokenSigner, at as DecisionSink, ht as MembershipEvent, tt as CredentialEvent, wt as SinkEvent } from "./policy-
|
|
1
|
+
import { $ as AccessEvent, Kt as Credential, Pt as TokenSigner, at as DecisionSink, ht as MembershipEvent, tt as CredentialEvent, wt as SinkEvent } from "./policy-IB6yxpC3.js";
|
|
2
2
|
//#region src/core/sink.d.ts
|
|
3
3
|
/** The closed list of CloudEvents `type` values PermDock emits. */
|
|
4
4
|
declare const CLOUD_EVENT_TYPES: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as listArg, i as globalArgs, t as COMMAND_DESCRIPTIONS } from "./commands-
|
|
1
|
+
import { a as listArg, i as globalArgs, t as COMMAND_DESCRIPTIONS } from "./commands-DSxCqG9A.js";
|
|
2
2
|
import { r as pick, t as CANCELLED } from "./prompt-CXYhLfsS.js";
|
|
3
3
|
import { n as detectedAgents, r as runSkills, t as SKILL_AGENTS } from "./skills-Biq5uup3.js";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Tt as Snapshot } from "./policy-
|
|
1
|
+
import { Tt as Snapshot } from "./policy-IB6yxpC3.js";
|
|
2
2
|
//#region src/core/snapshot-cache.d.ts
|
|
3
3
|
type CacheLifeForOptions = {
|
|
4
4
|
/** Lower bound in seconds. Next.js includes a private entry in per-link prefetches from 30. */
|
package/dist/solid/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Ft as TokenVerifier, Mr as Membership, Tt as Snapshot, Yn as Decision } from "../policy-
|
|
1
|
+
import { Ft as TokenVerifier, Mr as Membership, Tt as Snapshot, Yn as Decision } from "../policy-IB6yxpC3.js";
|
|
2
2
|
import { f as Permission } from "../permissions-DttnqqxC.js";
|
|
3
3
|
import { r as Role } from "../vocabulary-DA8a8zif.js";
|
|
4
|
-
import { n as requiredPlans } from "../problem-details-
|
|
5
|
-
import { i as describe } from "../describe-
|
|
4
|
+
import { n as requiredPlans } from "../problem-details-DX075l9V.js";
|
|
5
|
+
import { i as describe } from "../describe-DMYiCjJV.js";
|
|
6
6
|
import { t as PermissionBoundaryState } from "../boundary-BmHxVH1J.js";
|
|
7
7
|
import { t as approvalHeaders } from "../headers-Cf-zWvsO.js";
|
|
8
|
-
import { a as FilterResult, c as SubjectView, i as ClientStatus, l as TenantView, n as ApprovalState, o as PermissionSet, r as ClientPermDock, s as PermissionState, t as ApprovalHandle, u as UseRolesOptions } from "../types-
|
|
8
|
+
import { a as FilterResult, c as SubjectView, i as ClientStatus, l as TenantView, n as ApprovalState, o as PermissionSet, r as ClientPermDock, s as PermissionState, t as ApprovalHandle, u as UseRolesOptions } from "../types-CKNSyIf_.js";
|
|
9
9
|
import { Accessor, Accessor as Accessor$1, JSX } from "solid-js";
|
|
10
10
|
//#region src/solid/types.d.ts
|
|
11
11
|
/** Structural `JSX.Element`: text, a DOM node or a list of children. */
|
package/dist/solid/index.js
CHANGED
|
@@ -2,10 +2,10 @@ import { t as compact } from "../compact-y6vfu2_f.js";
|
|
|
2
2
|
import { r as requiredPlans } from "../problem-details-_AMOYz-w.js";
|
|
3
3
|
import { t as describe } from "../describe-B_gVZEVi.js";
|
|
4
4
|
import { t as approvalHeaders } from "../headers-BZSDieNT.js";
|
|
5
|
-
import { i as isPromiseLike } from "../store-options-
|
|
5
|
+
import { i as isPromiseLike } from "../store-options-ByhZq1jV.js";
|
|
6
6
|
import { a as protectedView, c as subjectView, i as permissionSet, l as tenantView, n as filterResult, o as rolesView, r as livePermDock, s as scopedTenant, t as approvalHandle } from "../views-Soe7bGSC.js";
|
|
7
7
|
import { n as boundaryFallback, t as boundaryDigest } from "../boundary-BM8a_P6E.js";
|
|
8
|
-
import { n as switchTenant, t as providerStore } from "../provider-store-
|
|
8
|
+
import { n as switchTenant, t as providerStore } from "../provider-store-Cfbvo4DE.js";
|
|
9
9
|
import { ErrorBoundary, createComponent, createComputed, createContext, createMemo, createSignal, getOwner, on, onCleanup, useContext } from "solid-js";
|
|
10
10
|
//#region src/solid/context.ts
|
|
11
11
|
const PermDockContext = createContext(void 0);
|
|
@@ -518,6 +518,17 @@ const AUTHZ_VERSION_TABLE = "permdock_authz_version";
|
|
|
518
518
|
* API's exposed schemas, so the `security definer` functions are not RPCs.
|
|
519
519
|
*/
|
|
520
520
|
const PERMDOCK_SCHEMA = "permdock";
|
|
521
|
+
/** Where `supabase.hook.api` puts the PostgREST wrappers, and the prefix of their names. */
|
|
522
|
+
const HOOK_API_SCHEMA = "public";
|
|
523
|
+
const HOOK_API_PREFIX = "permdock_";
|
|
524
|
+
/** The wrapper function names of `supabase.hook.api` for `prefix`. */
|
|
525
|
+
function hookApiNames(prefix = HOOK_API_PREFIX) {
|
|
526
|
+
return {
|
|
527
|
+
subjectFor: `${prefix}subject_for`,
|
|
528
|
+
membersOf: `${prefix}members_of`,
|
|
529
|
+
authzVersionFor: `${prefix}authz_version_for`
|
|
530
|
+
};
|
|
531
|
+
}
|
|
521
532
|
/**
|
|
522
533
|
* Reads the authorization version `permdock supabase hook generate` keeps in
|
|
523
534
|
* `<schema>.permdock_authz_version`: pass it to `claimsFirst(sources, { version })`.
|
|
@@ -531,4 +542,4 @@ function authzVersion(options) {
|
|
|
531
542
|
};
|
|
532
543
|
}
|
|
533
544
|
//#endregion
|
|
534
|
-
export {
|
|
545
|
+
export { fromJunction as a, hookApiNames as c, keptKeys as d, authzVersion as i, roleColumn as l, HOOK_API_SCHEMA as n, fromSupabasePostgres as o, PERMDOCK_SCHEMA as r, fromTable as s, AUTHZ_VERSION_TABLE as t, roleManifest as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { gt as MembershipSource } from "./policy-
|
|
2
|
-
import { n as RoleThrough, y as SupabaseSuspension } from "./types-
|
|
1
|
+
import { gt as MembershipSource } from "./policy-IB6yxpC3.js";
|
|
2
|
+
import { n as RoleThrough, y as SupabaseSuspension } from "./types-C97IskBw.js";
|
|
3
3
|
import { o as SupabaseManifestMembership } from "./manifest-uDS9y5de.js";
|
|
4
4
|
//#region src/supabase/roles.d.ts
|
|
5
5
|
/** A roles table a role column references, by `schema.table`. */
|
|
@@ -9,7 +9,7 @@ import { t as canonicalJson } from "./canonical-json-DemiK4Vp.js";
|
|
|
9
9
|
import { n as sha256, t as bytesToBase64Url } from "./sha256-BO0swRXL.js";
|
|
10
10
|
import { g as tenantsOf } from "./validity-uOp8UpYn.js";
|
|
11
11
|
import { n as isThenable } from "./thenable-okc2xDsj.js";
|
|
12
|
-
import { a as collectSnapshotGrants, c as rankRoles, l as usesAssigns, m as ceilingGrants, n as resolveSubject, o as snapshotOf, s as snapshotScopes, u as declaredRoleNames$1, y as resolveCustomRole } from "./permdock-
|
|
12
|
+
import { a as collectSnapshotGrants, c as rankRoles, l as usesAssigns, m as ceilingGrants, n as resolveSubject, o as snapshotOf, s as snapshotScopes, u as declaredRoleNames$1, y as resolveCustomRole } from "./permdock-CbgvLnuo.js";
|
|
13
13
|
import { n as LOCAL_CUSTOM_ROLE } from "./parse-local-manifest-BrMozJCo.js";
|
|
14
14
|
//#region src/conditions/sql-function.ts
|
|
15
15
|
function sqlFunction(name, options) {
|
package/dist/ssf/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as SsfPermDock, D as SsfSubjectMapper, E as SsfSubject, S as SsfOnEvent, T as SsfReceiver, _ as SetSubject, b as SsfEventInput, f as CaepEventName, g as ReplayStore, h as PollResult, m as PollOptions, p as PollHandle, v as SsfAuditEvent, w as SsfPermDockOptions, x as SsfEventListener, y as SsfEventHandler } from "../types-
|
|
2
|
-
import { t as memoryReplayStore } from "../replay-
|
|
3
|
-
import { t as createPermDock } from "../index-
|
|
1
|
+
import { C as SsfPermDock, D as SsfSubjectMapper, E as SsfSubject, S as SsfOnEvent, T as SsfReceiver, _ as SetSubject, b as SsfEventInput, f as CaepEventName, g as ReplayStore, h as PollResult, m as PollOptions, p as PollHandle, v as SsfAuditEvent, w as SsfPermDockOptions, x as SsfEventListener, y as SsfEventHandler } from "../types-Cq_H8N_X.js";
|
|
2
|
+
import { t as memoryReplayStore } from "../replay-CYyiLiwO.js";
|
|
3
|
+
import { t as createPermDock } from "../index-0nNqHspG.js";
|
|
4
4
|
export { type CaepEventName, type PollHandle, type PollOptions, type PollResult, type ReplayStore, type SetSubject, type SsfAuditEvent, type SsfEventHandler, type SsfEventInput, type SsfEventListener, type SsfOnEvent, type SsfPermDock, type SsfPermDockOptions, type SsfReceiver, type SsfSubject, type SsfSubjectMapper, createPermDock, memoryReplayStore };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Tt as Snapshot, Yn as Decision } from "./policy-
|
|
1
|
+
import { Tt as Snapshot, Yn as Decision } from "./policy-IB6yxpC3.js";
|
|
2
2
|
import { f as Permission } from "./permissions-DttnqqxC.js";
|
|
3
|
-
import { n as ApprovalState, r as ClientPermDock, s as PermissionState } from "./types-
|
|
3
|
+
import { n as ApprovalState, r as ClientPermDock, s as PermissionState } from "./types-CKNSyIf_.js";
|
|
4
4
|
//#region src/client/store.d.ts
|
|
5
5
|
type ClientStore = {
|
|
6
6
|
get(): ClientPermDock;
|
|
@@ -2,7 +2,7 @@ import { t as compact } from "./compact-y6vfu2_f.js";
|
|
|
2
2
|
import { c as rowIdOf, n as parseSnapshot } from "./snapshot-Enxd0n-s.js";
|
|
3
3
|
import { u as nowSeconds } from "./validity-uOp8UpYn.js";
|
|
4
4
|
import { n as payloadDigest } from "./token-CIWxJOCh.js";
|
|
5
|
-
import { n as fromSnapshot, t as emptySnapshot } from "./from-snapshot-
|
|
5
|
+
import { n as fromSnapshot, t as emptySnapshot } from "./from-snapshot-CTLijvdm.js";
|
|
6
6
|
import { t as timeoutSignal } from "./timeout-D51niuQP.js";
|
|
7
7
|
//#region src/client/approvals.ts
|
|
8
8
|
/** Ceiling for the approval poll backoff after a failed status request. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as subjectView, i as permissionSet, l as tenantView, n as filterResult, o as rolesView, r as livePermDock, t as approvalHandle } from "./views-Soe7bGSC.js";
|
|
2
|
-
import { n as providePermDock, t as getStore } from "./context-
|
|
2
|
+
import { n as providePermDock, t as getStore } from "./context-Bcy85rGi.js";
|
|
3
3
|
import { readable, toStore } from "svelte/store";
|
|
4
4
|
//#region src/svelte/stores.ts
|
|
5
5
|
function fromStore(store, compute) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Ft as TokenVerifier, Mr as Membership, Tt as Snapshot, Yn as Decision } from "./policy-
|
|
1
|
+
import { Ft as TokenVerifier, Mr as Membership, Tt as Snapshot, Yn as Decision } from "./policy-IB6yxpC3.js";
|
|
2
2
|
import { f as Permission } from "./permissions-DttnqqxC.js";
|
|
3
3
|
import { r as Role } from "./vocabulary-DA8a8zif.js";
|
|
4
|
-
import { a as FilterResult, c as SubjectView, l as TenantView, o as PermissionSet, r as ClientPermDock, s as PermissionState, t as ApprovalHandle, u as UseRolesOptions } from "./types-
|
|
4
|
+
import { a as FilterResult, c as SubjectView, l as TenantView, o as PermissionSet, r as ClientPermDock, s as PermissionState, t as ApprovalHandle, u as UseRolesOptions } from "./types-CKNSyIf_.js";
|
|
5
5
|
import { Readable } from "svelte/store";
|
|
6
6
|
//#region src/svelte/types.d.ts
|
|
7
7
|
type PermDockSvelteOptions = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as Permission } from "./permissions-DttnqqxC.js";
|
|
2
|
-
import { i as ProtectOptions } from "./create-
|
|
2
|
+
import { i as ProtectOptions } from "./create-B1d519XK.js";
|
|
3
3
|
//#region src/server/stream.d.ts
|
|
4
4
|
type StreamProtectOptions = ProtectOptions & {
|
|
5
5
|
/**
|
package/dist/supabase/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as Policy, Dr as CustomRole, Mr as Membership, Pr as Subject, gt as MembershipSource, mt as MemberEntry, xt as RoleSource } from "../policy-
|
|
2
|
-
import { c as ApprovalRequest, f as ApprovalStore } from "../types-
|
|
3
|
-
import { C as SupabaseClaimsSchema, E as supabaseClaims, S as SupabaseClaimsOptions, T as SupabasePermDockClaims, _ as SupabaseSuspendedMembership, a as SupabaseActorResult, b as SupabaseActClaim, c as SupabaseMembershipTable, d as SupabaseRealtime, f as SupabaseRlsConfig, g as SupabaseSubjectOptions, h as SupabaseStorage, i as SupabaseActor, l as SupabasePermissionRef, m as SupabaseSessionLike, n as RoleThrough, o as SupabaseDelegation, p as SupabaseRlsOptions, r as SupabaseActiveRow, s as SupabaseInclude, t as AuthorizeSqlOptions, u as SupabasePrincipal, v as SupabaseSuspendedScope, w as SupabaseMembershipClaim, x as SupabaseClaims, y as SupabaseSuspension } from "../types-
|
|
1
|
+
import { C as Policy, Dr as CustomRole, Mr as Membership, Pr as Subject, gt as MembershipSource, mt as MemberEntry, xt as RoleSource } from "../policy-IB6yxpC3.js";
|
|
2
|
+
import { c as ApprovalRequest, f as ApprovalStore } from "../types-aqOHTHcp.js";
|
|
3
|
+
import { C as SupabaseClaimsSchema, E as supabaseClaims, S as SupabaseClaimsOptions, T as SupabasePermDockClaims, _ as SupabaseSuspendedMembership, a as SupabaseActorResult, b as SupabaseActClaim, c as SupabaseMembershipTable, d as SupabaseRealtime, f as SupabaseRlsConfig, g as SupabaseSubjectOptions, h as SupabaseStorage, i as SupabaseActor, l as SupabasePermissionRef, m as SupabaseSessionLike, n as RoleThrough, o as SupabaseDelegation, p as SupabaseRlsOptions, r as SupabaseActiveRow, s as SupabaseInclude, t as AuthorizeSqlOptions, u as SupabasePrincipal, v as SupabaseSuspendedScope, w as SupabaseMembershipClaim, x as SupabaseClaims, y as SupabaseSuspension } from "../types-C97IskBw.js";
|
|
4
4
|
import { a as SupabaseManifestHelper, c as SupabaseManifestRls, d as SupabaseManifestValue, f as parseSupabaseManifest, i as SupabaseManifestColumn, l as SupabaseManifestRole, n as SupabaseHookManifest, o as SupabaseManifestMembership, r as SupabaseManifestActiveRow, s as SupabaseManifestRequires, t as SupabaseHookClaim, u as SupabaseManifestThrough } from "../manifest-uDS9y5de.js";
|
|
5
|
-
import { a as MembershipTableOptions, c as SupabasePostgres, d as fromSupabasePostgres, f as fromTable, i as MembershipSql, l as authzVersion, n as MembershipHolders, o as SqlMembershipSource, r as MembershipJunctionOptions, s as SqlQuery, t as AUTHZ_VERSION_TABLE, u as fromJunction } from "../sources-
|
|
5
|
+
import { a as MembershipTableOptions, c as SupabasePostgres, d as fromSupabasePostgres, f as fromTable, i as MembershipSql, l as authzVersion, n as MembershipHolders, o as SqlMembershipSource, r as MembershipJunctionOptions, s as SqlQuery, t as AUTHZ_VERSION_TABLE, u as fromJunction } from "../sources-BdOYLw9j.js";
|
|
6
6
|
import { n as supabaseTenantClaim, t as supabaseMembershipsBudget } from "../budget-JqcRqyhK.js";
|
|
7
7
|
//#region src/supabase/capability.d.ts
|
|
8
8
|
type ExchangeCapabilityOptions = {
|
|
@@ -54,6 +54,17 @@ type SupabaseRpcCaller = {
|
|
|
54
54
|
};
|
|
55
55
|
};
|
|
56
56
|
type PostgrestSourcesOptions = {
|
|
57
|
+
/**
|
|
58
|
+
* The `supabase.hook.api` setting the hook file was generated with: the
|
|
59
|
+
* wrappers live in `schema` (default `public`) as `<prefix>subject_for`,
|
|
60
|
+
* `<prefix>members_of` and `<prefix>authz_version_for` (default prefix
|
|
61
|
+
* `permdock_`). It sets the defaults of `schema`, `fn`, `membersFn` and
|
|
62
|
+
* `versionFn`, which still override it.
|
|
63
|
+
*/
|
|
64
|
+
readonly api?: {
|
|
65
|
+
readonly schema?: string;
|
|
66
|
+
readonly prefix?: string;
|
|
67
|
+
};
|
|
57
68
|
/** Schema of the functions. Default `permdock`, where the hook generates `subject_for` and `members_of`. */
|
|
58
69
|
readonly schema?: string;
|
|
59
70
|
/** Function name, for a wrapper in an exposed schema. Default `subject_for`. */
|
package/dist/supabase/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as readSubjectRecord, i as postgrestSources, n as supabaseRls, o as supabaseClaims, r as supabaseApprovalStore, s as exchangeCapability, t as authorizeSql } from "../supabase-
|
|
1
|
+
import { a as readSubjectRecord, i as postgrestSources, n as supabaseRls, o as supabaseClaims, r as supabaseApprovalStore, s as exchangeCapability, t as authorizeSql } from "../supabase-C0qESOa-.js";
|
|
2
2
|
import { n as supabaseTenantClaim, t as supabaseMembershipsBudget } from "../budget-NbEtbJC_.js";
|
|
3
|
-
import { a as
|
|
3
|
+
import { a as fromJunction, i as authzVersion, o as fromSupabasePostgres, s as fromTable, t as AUTHZ_VERSION_TABLE } from "../sources-4p0-4xQm.js";
|
|
4
4
|
import { a as subjectFromSupabase, n as actorOf, o as subjectFromSupabaseSession, r as delegationOf, t as parseSupabaseManifest } from "../manifest-iaoBXHKc.js";
|
|
5
5
|
export { AUTHZ_VERSION_TABLE, actorOf, authorizeSql, authzVersion, delegationOf, exchangeCapability, fromJunction, fromSupabasePostgres, fromTable, parseSupabaseManifest, postgrestSources, readSubjectRecord, subjectFromSupabase, subjectFromSupabaseSession, supabaseApprovalStore, supabaseClaims, supabaseMembershipsBudget, supabaseRls, supabaseTenantClaim };
|