{"_id":"@dudousxd/nestjs-authz-prisma","_rev":"6-46bc5521b32c48fbff2155033c174178","name":"@dudousxd/nestjs-authz-prisma","dist-tags":{"latest":"0.5.0"},"versions":{"0.2.0":{"name":"@dudousxd/nestjs-authz-prisma","version":"0.2.0","keywords":["nestjs","authorization","authz","rbac","roles","permissions","prisma"],"author":{"name":"Davi Carvalho","email":"davi@goflip.ai"},"license":"MIT","_id":"@dudousxd/nestjs-authz-prisma@0.2.0","maintainers":[{"name":"dudousxd","email":"davi_carvalho96@hotmail.com"}],"homepage":"https://github.com/DavideCarvalho/nestjs-authz#readme","bugs":{"url":"https://github.com/DavideCarvalho/nestjs-authz/issues"},"dist":{"shasum":"8ff575c3e0199a039ab398c1d5ece0404422f7c8","tarball":"https://registry.npmjs.org/@dudousxd/nestjs-authz-prisma/-/nestjs-authz-prisma-0.2.0.tgz","fileCount":24,"integrity":"sha512-SxR57tyGav1EjwegZlTUTR+W+z1LM5tSfjOs5JPpu5fEZpgpyVsP5JzbhSvsUSLpCg3ysq9GPYDAzwitJfdRFg==","signatures":[{"sig":"MEYCIQC2fzbtQtJmWg/khHcM2QwdbJVcYud/rq2WOmv3iwZf2wIhAJhq63sPCA7ae+ejKs6E2rYK/rrgmCZQlUnk5eRlw4Z8","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dudousxd%2fnestjs-authz-prisma@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":48149},"main":"./dist/index.js","type":"module","_from":"file:dudousxd-nestjs-authz-prisma-0.2.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"test":"vitest run --passWithNoTests","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest"},"_npmUser":{"name":"dudousxd","email":"davi_carvalho96@hotmail.com"},"_resolved":"/tmp/292a782507703b41410e92dcf1a6dc89/dudousxd-nestjs-authz-prisma-0.2.0.tgz","_integrity":"sha512-SxR57tyGav1EjwegZlTUTR+W+z1LM5tSfjOs5JPpu5fEZpgpyVsP5JzbhSvsUSLpCg3ysq9GPYDAzwitJfdRFg==","repository":{"url":"git+https://github.com/DavideCarvalho/nestjs-authz.git","type":"git","directory":"packages/prisma"},"_npmVersion":"10.8.2","description":"Prisma RBAC persistence for @dudousxd/nestjs-authz — roles, permissions, and a Gate seam (zero connection ownership, structural client).","directories":{},"_nodeVersion":"20.20.2","_hasShrinkwrap":false,"devDependencies":{"rxjs":"^7.8.1","vitest":"^3.0.0","typescript":"^5.4.0","@types/node":"^20.0.0","@nestjs/core":"^11.0.0","@nestjs/common":"^11.0.0","@nestjs/testing":"^11.0.0","reflect-metadata":"^0.2.2","@dudousxd/nestjs-authz":"^0.4.0"},"peerDependencies":{"@nestjs/core":">=10.0.0","@nestjs/common":">=10.0.0","reflect-metadata":">=0.1.13","@dudousxd/nestjs-authz":">=0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/nestjs-authz-prisma_0.2.0_1781707208763_0.46171478891022755","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@dudousxd/nestjs-authz-prisma","version":"0.3.0","keywords":["nestjs","authorization","authz","rbac","roles","permissions","prisma"],"author":{"name":"Davi Carvalho","email":"davi@goflip.ai"},"license":"MIT","_id":"@dudousxd/nestjs-authz-prisma@0.3.0","maintainers":[{"name":"dudousxd","email":"davi_carvalho96@hotmail.com"}],"homepage":"https://github.com/DavideCarvalho/nestjs-authz#readme","bugs":{"url":"https://github.com/DavideCarvalho/nestjs-authz/issues"},"dist":{"shasum":"42b5c6112571d08f4de6db2296d18b3b77d35abd","tarball":"https://registry.npmjs.org/@dudousxd/nestjs-authz-prisma/-/nestjs-authz-prisma-0.3.0.tgz","fileCount":28,"integrity":"sha512-4j9wdAsj11fsw9zgrIbLhDFMKpLZeplSsILyr/nQsr4eyWZiH4fhgNYrxNh4iOCXL6bVrjL/ytxS+IY104He2A==","signatures":[{"sig":"MEYCIQCNHaLhyCLN+WFuC8R2hjguT05oIFrDVsUUwdYQiKwSkQIhAM/jPo6HLtknwG3oTBh4KV55lBUvDzrlafiCHxPAuELd","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dudousxd%2fnestjs-authz-prisma@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":70568},"main":"./dist/index.js","type":"module","_from":"file:dudousxd-nestjs-authz-prisma-0.3.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"test":"vitest run --passWithNoTests","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","test:db:pg":"AUTHZ_TEST_DIALECT=postgres vitest run --config vitest.db.config.ts","test:watch":"vitest"},"_npmUser":{"name":"dudousxd","email":"davi_carvalho96@hotmail.com"},"_resolved":"/tmp/bcbd7f1414125f17778680681c396df8/dudousxd-nestjs-authz-prisma-0.3.0.tgz","_integrity":"sha512-4j9wdAsj11fsw9zgrIbLhDFMKpLZeplSsILyr/nQsr4eyWZiH4fhgNYrxNh4iOCXL6bVrjL/ytxS+IY104He2A==","repository":{"url":"git+https://github.com/DavideCarvalho/nestjs-authz.git","type":"git","directory":"packages/prisma"},"_npmVersion":"10.8.2","description":"Prisma RBAC persistence for @dudousxd/nestjs-authz — roles, permissions, and a Gate seam (zero connection ownership, structural client).","directories":{},"_nodeVersion":"20.20.2","_hasShrinkwrap":false,"devDependencies":{"pg":"^8.21.0","rxjs":"^7.8.1","vitest":"^3.0.0","@types/pg":"^8.11.0","typescript":"^5.4.0","@types/node":"^20.0.0","@nestjs/core":"^11.0.0","@nestjs/common":"^11.0.0","@nestjs/testing":"^11.0.0","reflect-metadata":"^0.2.2","@dudousxd/nestjs-authz":"^0.6.0","@testcontainers/postgresql":"^12.0.3"},"peerDependencies":{"@nestjs/core":">=10.0.0","@nestjs/common":">=10.0.0","reflect-metadata":">=0.1.13","@dudousxd/nestjs-authz":">=0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/nestjs-authz-prisma_0.3.0_1781797246693_0.15389954948261497","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@dudousxd/nestjs-authz-prisma","version":"0.3.1","keywords":["nestjs","authorization","authz","rbac","roles","permissions","prisma"],"author":{"name":"Davi Carvalho","email":"davi@goflip.ai"},"license":"MIT","_id":"@dudousxd/nestjs-authz-prisma@0.3.1","maintainers":[{"name":"dudousxd","email":"davi_carvalho96@hotmail.com"}],"homepage":"https://github.com/DavideCarvalho/nestjs-authz#readme","bugs":{"url":"https://github.com/DavideCarvalho/nestjs-authz/issues"},"dist":{"shasum":"284fd5de4376e76645f347d3120dffa278388ed8","tarball":"https://registry.npmjs.org/@dudousxd/nestjs-authz-prisma/-/nestjs-authz-prisma-0.3.1.tgz","fileCount":24,"integrity":"sha512-O42hJjk6dqbPHeHiyDgDchmbe67YScVaFIgivvMQE7r9rjqmq1i5NbzPCXTJl+8yXcUG15pAWszZRcfXWHC/vg==","signatures":[{"sig":"MEQCIGoaq7WAN0c3vzTc/bkgNKMMiMaYuXLL3TaU7eJBDo7EAiA1WmXGf6y8f2RlH+GjP8WJvCMAvOucIxje6dotfHmQ6w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dudousxd%2fnestjs-authz-prisma@0.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":68698},"main":"./dist/index.js","type":"module","_from":"file:dudousxd-nestjs-authz-prisma-0.3.1.tgz","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"test":"vitest run --passWithNoTests","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","test:db:pg":"AUTHZ_TEST_DIALECT=postgres vitest run --config vitest.db.config.ts","test:watch":"vitest"},"_npmUser":{"name":"dudousxd","email":"davi_carvalho96@hotmail.com"},"_resolved":"/tmp/79f157ffc123e4af589fc13fea945e06/dudousxd-nestjs-authz-prisma-0.3.1.tgz","_integrity":"sha512-O42hJjk6dqbPHeHiyDgDchmbe67YScVaFIgivvMQE7r9rjqmq1i5NbzPCXTJl+8yXcUG15pAWszZRcfXWHC/vg==","repository":{"url":"git+https://github.com/DavideCarvalho/nestjs-authz.git","type":"git","directory":"packages/prisma"},"_npmVersion":"10.8.2","description":"Prisma RBAC persistence for @dudousxd/nestjs-authz — roles, permissions, and a Gate seam (zero connection ownership, structural client).","directories":{},"_nodeVersion":"20.20.2","_hasShrinkwrap":false,"devDependencies":{"pg":"^8.21.0","rxjs":"^7.8.1","vitest":"^3.0.0","@types/pg":"^8.11.0","typescript":"^5.4.0","@types/node":"^20.0.0","@nestjs/core":"^11.0.0","@nestjs/common":"^11.0.0","@nestjs/testing":"^11.0.0","reflect-metadata":"^0.2.2","@dudousxd/nestjs-authz":"^0.6.1","@testcontainers/postgresql":"^12.0.3"},"peerDependencies":{"@nestjs/core":">=10.0.0","@nestjs/common":">=10.0.0","reflect-metadata":">=0.1.13","@dudousxd/nestjs-authz":">=0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/nestjs-authz-prisma_0.3.1_1781898516956_0.5871719742527266","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"@dudousxd/nestjs-authz-prisma","version":"0.3.2","keywords":["nestjs","authorization","authz","rbac","roles","permissions","prisma"],"author":{"name":"Davi Carvalho","email":"davi@goflip.ai"},"license":"MIT","_id":"@dudousxd/nestjs-authz-prisma@0.3.2","maintainers":[{"name":"dudousxd","email":"davi_carvalho96@hotmail.com"}],"homepage":"https://github.com/DavideCarvalho/nestjs-authz#readme","bugs":{"url":"https://github.com/DavideCarvalho/nestjs-authz/issues"},"dist":{"shasum":"3b7822212313e19a96270091aaa2d0a198f93db9","tarball":"https://registry.npmjs.org/@dudousxd/nestjs-authz-prisma/-/nestjs-authz-prisma-0.3.2.tgz","fileCount":24,"integrity":"sha512-XtTZOqI3OfXGApks+eLSZkeRDJb+LmU4FTwOzGunlaU1i2Ez0MecEtMFFl1vKrkis1+L8KDpGfItoeEdpgUvEQ==","signatures":[{"sig":"MEUCIQCMphPD26cd0DUnkaPym+DcsgMQaOmTmCerekLjNHPzvQIgMn+XOAf2H2xLL0lqDo5qsa0OsBKUJZfyhHPeJdqp3UQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dudousxd%2fnestjs-authz-prisma@0.3.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":69163},"main":"./dist/index.js","type":"module","_from":"file:dudousxd-nestjs-authz-prisma-0.3.2.tgz","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"test":"vitest run --passWithNoTests","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","test:db:pg":"AUTHZ_TEST_DIALECT=postgres vitest run --config vitest.db.config.ts","test:watch":"vitest"},"_npmUser":{"name":"dudousxd","email":"davi_carvalho96@hotmail.com"},"_resolved":"/tmp/5edb36e77f1148dcb46fb1fdaf029008/dudousxd-nestjs-authz-prisma-0.3.2.tgz","_integrity":"sha512-XtTZOqI3OfXGApks+eLSZkeRDJb+LmU4FTwOzGunlaU1i2Ez0MecEtMFFl1vKrkis1+L8KDpGfItoeEdpgUvEQ==","repository":{"url":"git+https://github.com/DavideCarvalho/nestjs-authz.git","type":"git","directory":"packages/prisma"},"_npmVersion":"10.8.2","description":"Prisma RBAC persistence for @dudousxd/nestjs-authz — roles, permissions, and a Gate seam (zero connection ownership, structural client).","directories":{},"_nodeVersion":"20.20.2","_hasShrinkwrap":false,"devDependencies":{"pg":"^8.21.0","rxjs":"^7.8.1","vitest":"^3.0.0","@types/pg":"^8.11.0","typescript":"^5.4.0","@types/node":"^20.0.0","@nestjs/core":"^12.0.1","@nestjs/common":"^12.0.1","@nestjs/testing":"^12.0.1","reflect-metadata":"^0.2.2","@dudousxd/nestjs-authz":"^0.6.5","@testcontainers/postgresql":"^12.0.3"},"peerDependencies":{"@nestjs/core":">=10.0.0","@nestjs/common":">=10.0.0","reflect-metadata":">=0.1.13","@dudousxd/nestjs-authz":">=0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/nestjs-authz-prisma_0.3.2_1788017600144_0.943098999137864","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@dudousxd/nestjs-authz-prisma","version":"0.4.0","keywords":["nestjs","authorization","authz","rbac","roles","permissions","prisma"],"author":{"name":"Davi Carvalho","email":"davi@goflip.ai"},"license":"MIT","_id":"@dudousxd/nestjs-authz-prisma@0.4.0","maintainers":[{"name":"dudousxd","email":"davi_carvalho96@hotmail.com"}],"homepage":"https://davidecarvalho.github.io/aviary/docs/authz","bugs":{"url":"https://github.com/DavideCarvalho/nestjs-authz/issues"},"dist":{"shasum":"7bd7a1bd9d57fc7266835878e139f63112b0bbd0","tarball":"https://registry.npmjs.org/@dudousxd/nestjs-authz-prisma/-/nestjs-authz-prisma-0.4.0.tgz","fileCount":24,"integrity":"sha512-dUXDDOh3mFXtl2GjweFgFryQ7PqCYnXftzl+9bQox82TiKm7hn2CDKucVnahwckzPBr4xg+Hxtp7rjBUo5bMGg==","signatures":[{"sig":"MEQCIGx1IWJcvzSyE+P/vElKQMvEpq24XMf/tx6631bEqf5AAiAmL+wtykGWAteZjD6z9P76OxZ4g1W3NgaZCxMREY70ZA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIBrlYJRIe8oMK941zhV6hhfYcyAIx6//AtpffNgPF3q7AiACzQtx24byzdSlr55DztOJVh+s0pdlr57A7LAa3ufS0Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dudousxd%2fnestjs-authz-prisma@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":84462},"main":"./dist/index.js","type":"module","_from":"file:dudousxd-nestjs-authz-prisma-0.4.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"test":"vitest run --passWithNoTests","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","test:db:pg":"AUTHZ_TEST_DIALECT=postgres vitest run --config vitest.db.config.ts","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"a6d572cf-bfd2-473b-b4c4-f5a3b77fb121"}},"_resolved":"/tmp/9a5a1b25971bccc73aacfd5872173b60/dudousxd-nestjs-authz-prisma-0.4.0.tgz","_integrity":"sha512-dUXDDOh3mFXtl2GjweFgFryQ7PqCYnXftzl+9bQox82TiKm7hn2CDKucVnahwckzPBr4xg+Hxtp7rjBUo5bMGg==","repository":{"url":"git+https://github.com/DavideCarvalho/nestjs-authz.git","type":"git","directory":"packages/prisma"},"_npmVersion":"11.20.0","description":"Prisma RBAC persistence for @dudousxd/nestjs-authz — roles, permissions, and a Gate seam (zero connection ownership, structural client).","directories":{},"_nodeVersion":"20.20.2","_hasShrinkwrap":false,"devDependencies":{"pg":"8.23.0","rxjs":"7.8.2","vitest":"3.2.7","@types/pg":"8.23.1","typescript":"5.9.3","@types/node":"20.19.43","@nestjs/core":"12.0.1","@nestjs/common":"12.0.1","@nestjs/testing":"12.0.1","reflect-metadata":"0.2.2","@dudousxd/nestjs-authz":"^0.7.0","@testcontainers/postgresql":"12.1.0"},"peerDependencies":{"@nestjs/core":">=10.0.0","@nestjs/common":">=10.0.0","reflect-metadata":">=0.1.13","@dudousxd/nestjs-authz":">=0.7.0"},"_npmOperationalInternal":{"tmp":"tmp/nestjs-authz-prisma_0.4.0_1790649339928_0.48890726812476504","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"_id":"@dudousxd/nestjs-authz-prisma@0.5.0","bugs":{"url":"https://github.com/DavideCarvalho/nestjs-authz/issues"},"dist":{"shasum":"caf14744d85f2e7fd56213e2030a1dab6314486b","tarball":"https://registry.npmjs.org/@dudousxd/nestjs-authz-prisma/-/nestjs-authz-prisma-0.5.0.tgz","fileCount":24,"integrity":"sha512-A1zdvrG7aq7hfUPYmcBXhctQDw2+6feUIyzwxKlg1FAcq8fTvOh72Z0CJ+ISorVstBdS79E9hXWWjfRk4RWKIw==","signatures":[{"sig":"MEUCIExXFP+TdWli56e7AQzFPbfA+cbvzqwGf35kPkipB45ZAiEAnAf6PFVJwj3QLqPwj6Gsxf1lqGJi9nkNn/tErWDjdJI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIG8Dq3DR/RJmNHfYlmmn+9mUM+T6i6YnT/5zahXAVvLeAiEA25b9nb+8yxUqiEdjPTlqT4RVtP/N0pltf5qbqJ07ei8="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dudousxd%2fnestjs-authz-prisma@0.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":102423},"main":"./dist/index.js","name":"@dudousxd/nestjs-authz-prisma","type":"module","_from":"file:dudousxd-nestjs-authz-prisma-0.5.0.tgz","types":"./dist/index.d.ts","author":{"name":"Davi Carvalho","email":"davi@goflip.ai"},"engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"license":"MIT","scripts":{"test":"vitest run --passWithNoTests","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","test:db:pg":"AUTHZ_TEST_DIALECT=postgres vitest run --config vitest.db.config.ts","test:watch":"vitest"},"version":"0.5.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"a6d572cf-bfd2-473b-b4c4-f5a3b77fb121"}},"homepage":"https://davidecarvalho.github.io/aviary/docs/authz","keywords":["nestjs","authorization","authz","rbac","roles","permissions","prisma"],"_resolved":"/tmp/198418dd07269f7edacc40298ec827d5/dudousxd-nestjs-authz-prisma-0.5.0.tgz","_integrity":"sha512-A1zdvrG7aq7hfUPYmcBXhctQDw2+6feUIyzwxKlg1FAcq8fTvOh72Z0CJ+ISorVstBdS79E9hXWWjfRk4RWKIw==","repository":{"url":"git+https://github.com/DavideCarvalho/nestjs-authz.git","type":"git","directory":"packages/prisma"},"_npmVersion":"11.20.0","description":"Prisma RBAC persistence for @dudousxd/nestjs-authz — roles, permissions, and a Gate seam (zero connection ownership, structural client).","directories":{},"maintainers":[{"name":"dudousxd","email":"davi_carvalho96@hotmail.com"}],"_nodeVersion":"20.20.2","_hasShrinkwrap":false,"devDependencies":{"pg":"8.23.0","rxjs":"7.8.2","vitest":"3.2.7","@types/pg":"8.23.1","typescript":"5.9.3","@types/node":"20.19.43","@nestjs/core":"12.0.1","@nestjs/common":"12.0.1","@nestjs/testing":"12.0.1","reflect-metadata":"0.2.2","@dudousxd/nestjs-authz":"^0.8.0","@testcontainers/postgresql":"12.1.0"},"peerDependencies":{"@nestjs/core":">=10.0.0","@nestjs/common":">=10.0.0","reflect-metadata":">=0.1.13","@dudousxd/nestjs-authz":">=0.8.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nestjs-authz-prisma_0.5.0_1790683059551_0.9048144540848264"}}},"time":{"created":"2026-06-17T14:40:08.536Z","modified":"2026-09-29T11:57:39.965Z","0.2.0":"2026-06-17T14:40:08.924Z","0.3.0":"2026-06-18T15:40:46.874Z","0.3.1":"2026-06-19T19:48:37.166Z","0.3.2":"2026-08-29T15:33:20.289Z","0.4.0":"2026-09-29T02:35:40.025Z","0.5.0":"2026-09-29T11:57:39.629Z"},"bugs":{"url":"https://github.com/DavideCarvalho/nestjs-authz/issues"},"author":{"name":"Davi Carvalho","email":"davi@goflip.ai"},"license":"MIT","homepage":"https://davidecarvalho.github.io/aviary/docs/authz","keywords":["nestjs","authorization","authz","rbac","roles","permissions","prisma"],"repository":{"url":"git+https://github.com/DavideCarvalho/nestjs-authz.git","type":"git","directory":"packages/prisma"},"description":"Prisma RBAC persistence for @dudousxd/nestjs-authz — roles, permissions, and a Gate seam (zero connection ownership, structural client).","maintainers":[{"name":"dudousxd","email":"davi_carvalho96@hotmail.com"}],"readme":"# @dudousxd/nestjs-authz-prisma\n\nPrisma RBAC persistence for [`@dudousxd/nestjs-authz`](https://github.com/DavideCarvalho/nestjs-authz) —\nroles, permissions, and a Gate seam, with **zero connection ownership** (your app owns the\n`PrismaClient`; this package never opens a connection and never imports `@prisma/client`).\n\nThis is the Prisma sibling of `@dudousxd/nestjs-authz-typeorm`: identical store surface and\n`AuthzRbacModule`, consuming a **structural** Prisma client interface.\n\n## Install\n\n```bash\npnpm add @dudousxd/nestjs-authz-prisma @dudousxd/nestjs-authz\n```\n\nNo `@prisma/client` is required by this package — it depends only on the structural\n`PrismaAuthzClientLike` interface, which a real `PrismaClient` satisfies. There is **no\n`prisma generate` step** introduced by this adapter.\n\n## Schema (consumer-managed)\n\nPrisma is schema-first: add the four RBAC models to your `schema.prisma` and apply them with\n`prisma migrate` / `prisma db push`. The user is referenced **by id only** — this package\nnever owns a users table.\n\n```prisma\nmodel Role {\n  id        String   @id\n  name      String   @unique\n  guard     String?\n  createdAt DateTime @default(now())\n\n  @@map(\"authz_roles\")\n}\n\nmodel Permission {\n  id        String   @id\n  name      String   @unique\n  guard     String?\n  createdAt DateTime @default(now())\n\n  @@map(\"authz_permissions\")\n}\n\nmodel RolePermission {\n  roleId       String\n  permissionId String\n\n  @@id([roleId, permissionId])\n  @@map(\"authz_role_permission\")\n}\n\nmodel UserRole {\n  userType String\n  userId   String\n  roleId   String\n\n  @@id([userType, userId, roleId])\n  @@index([userType, userId])\n  @@map(\"authz_user_role\")\n}\n```\n\n> Unlike the TypeORM/MikroORM adapters there is **no auto-create** — `store.ensureSchema()`\n> is a no-op. Manage the schema with Prisma migrations.\n\n## Usage\n\n```ts\nimport { AuthzRbacModule } from '@dudousxd/nestjs-authz-prisma';\nimport { PrismaClient } from '@prisma/client';\n\nconst prisma = new PrismaClient();\n\n@Module({\n  imports: [\n    // Pass the client directly — the module builds the store. (Or pass a pre-built `store`.)\n    AuthzRbacModule.forRoot({ client: prisma }),\n  ],\n})\nexport class AppModule {}\n```\n\nOr build the store yourself and inject the client via the `PRISMA_CLIENT` token:\n\n```ts\nimport { PRISMA_CLIENT, PrismaAuthzStore } from '@dudousxd/nestjs-authz-prisma';\n\nAuthzRbacModule.forRootAsync({\n  inject: [PRISMA_CLIENT],\n  useFactory: (client) => ({ store: new PrismaAuthzStore(client) }),\n});\n```\n\nOnce wired, the Gate consults persisted RBAC:\n\n```ts\nawait store.givePermissionToRole('editor', 'posts.publish');\nawait store.assignRole({ type: 'user', id: 7 }, 'editor');\n\ngate.forUser(user).allows('posts.publish'); // true (PERMISSION_PROVIDER seam)\ngate.forUser(user).hasRole('editor');       // true (ROLE_PROVIDER seam)\n```\n\n## Role sources (manual vs SSO/SCIM)\n\nEvery role assignment records a `source`. It defaults to `'manual'`, so existing calls and existing\nrows keep their meaning. Needs `roleSources: true`, as described below. A sync replaces only its own source:\n\n```ts\n// On each SSO login: exactly these roles come from SSO. Manual grants are untouched.\nawait store.setUserRoles(user, rolesFromIdpGroups, { source: 'sso' });\n\nawait store.assignRole(user, 'editor');                      // source 'manual'\nawait store.assignRole(user, 'editor', { source: 'scim' });  // a second assignment of the same role\nawait store.removeRole(user, 'editor', { source: 'scim' });  // still an editor (manual)\nawait store.removeRole(user, 'editor');                      // no source: removed from every source\nawait store.getRoleAssignments(user); // [{ role, source, tenantId }]\n```\n\n`getRolesForUser` and the Gate seams see the distinct role names from all sources.\n\n### Enabling it (schema change)\n\nPrisma is schema-first, so per-source assignments are **opt-in**. With the default\n`roleSources: false`, the store never sends a `source` field and your current schema keeps\nworking. `setUserRoles` then replaces *all* of the user's roles, and a non-default `source`\nthrows. To enable per-source assignments:\n\n```prisma\nmodel UserRole {\n  userType String\n  userId   String\n  roleId   String\n  source   String @default(\"manual\")\n\n  @@id([userType, userId, roleId, source])\n  @@index([userType, userId])\n  @@map(\"authz_user_role\")\n}\n```\n\nThen run `prisma migrate dev`. Existing rows get `source = 'manual'`. Finally, build the store\nwith the option: `new PrismaAuthzStore(prisma, { roleSources: true })`, or\n`AuthzRbacModule.forRoot({ client: prisma, roleSources: true })`. `setUserRoles` uses\n`prisma.$transaction` when it's available.\n\n## Admin management\n\nOperations for an admin UI (role editor, member list, account deletion):\n\n```ts\n// Replace a role's permissions with exactly this set (spatie's syncPermissions). Creates missing\n// roles/permissions by name; the link swap is atomic when the client has `$transaction` (a real `PrismaClient` does).\nawait store.syncRolePermissions('editor', ['posts.view', 'posts.edit']);\n\n// Each role's permission names in three queries, whatever the number of roles. Existing roles are keys (even with no permissions);\n// roles that don't exist are absent.\nawait store.getRolePermissions(['editor', 'viewer']); // { editor: ['posts.edit', 'posts.view'], viewer: [] }\n\n// Delete a role, its permission links and every assignment of it (all sources). Returns false\n// when the role didn't exist. Permissions are kept.\nawait store.deleteRole('editor');\n\n// Raw assignment rows: { userType, userId, role, source, tenantId }[],\n// ordered by (userType, userId, role, source).\nawait store.listRoleAssignments({ role: ['admin', 'owner'], source: 'sso' });\nawait store.listRoleAssignments({ user: { type: 'user', id: 7 } });\n\n// Account deleted: drop every role assignment of the user (all sources).\nawait store.removeUser({ type: 'user', id: 7 });\n```\n\nThis adapter has no tenant-scoped assignments, so every row has `tenantId: null`:\n`listRoleAssignments({ tenantId: null })` lists everything and a tenant id string matches\nnothing. Without `roleSources: true` every row is `'manual'`, so filtering by another\n`source` matches nothing.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}