{"_id":"@briansleonel/cs-permissions-sdk","_rev":"22-96585dd15f16c31fc6f45907d1fa3f9f","name":"@briansleonel/cs-permissions-sdk","dist-tags":{"latest":"2.0.3"},"versions":{"1.0.0":{"name":"@briansleonel/cs-permissions-sdk","version":"1.0.0","_id":"@briansleonel/cs-permissions-sdk@1.0.0","maintainers":[{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"}],"dist":{"shasum":"e71306671eb059d0ebfbc0361a74dd548cdca392","tarball":"https://registry.npmjs.org/@briansleonel/cs-permissions-sdk/-/cs-permissions-sdk-1.0.0.tgz","fileCount":93,"integrity":"sha512-QaRF5kW4TWrcBCjD/XPkChFYrYg8jEHsvNcbR3DeBo0mwI+OdA394YnP/0r1b8JLnmyHrUSkFK+pxMrv22Wajw==","signatures":[{"sig":"MEUCIDDhXFPJhtrJ2Mft5DwkD7rP2+tP9rsse9p7eqHyhADUAiEAvR0ZiThauKJOu0sJtqKUjOtaIQfhFc9aaC4tRjv7ec4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":35991},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc -p tsconfig.build.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"},"_npmVersion":"9.8.1","description":"Guards, decorators and interfaces for NestJS role-based permissions","directories":{},"_nodeVersion":"22.1.0","dependencies":{"lodash":"^4.17.21"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@nestjs/jwt":"^10.2.0","@types/node":"^20.19.37","@nestjs/core":"^10.4.22","@types/lodash":"^4.17.0","@nestjs/common":"^10.4.22","@types/express":"^5.0.6"},"peerDependencies":{"@nestjs/jwt":"^10.0.0","@nestjs/core":"^10.0.0","@nestjs/common":"^10.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cs-permissions-sdk_1.0.0_1775193284034_0.372570472443585","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@briansleonel/cs-permissions-sdk","version":"1.0.1","_id":"@briansleonel/cs-permissions-sdk@1.0.1","maintainers":[{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"}],"dist":{"shasum":"d9b6ec8775277120e71d6a4d9524f7a805d8299f","tarball":"https://registry.npmjs.org/@briansleonel/cs-permissions-sdk/-/cs-permissions-sdk-1.0.1.tgz","fileCount":93,"integrity":"sha512-cHobDXT5D6tE2vIq36616/K4xwwAIWs/RgTYiHB0KTXcf2b3mkEKWZsFMVgvW1M5sSFW0CuuGOo1TfFPVT+Jug==","signatures":[{"sig":"MEQCIDd5hUp3sDlU+kRmUnhhNdXxoL1uV9kxmJruwKnylkdeAiBjGWcYNSIgq+qhAhQFG9JQvJWk5vVQeT4x6vcHMHyzGA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":37874},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc -p tsconfig.build.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"},"_npmVersion":"9.8.1","description":"Guards, decorators and interfaces for NestJS role-based permissions","directories":{},"_nodeVersion":"22.1.0","dependencies":{"lodash":"^4.17.21"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@nestjs/jwt":"^10.2.0","@types/node":"^20.19.37","@nestjs/core":"^10.4.22","@types/lodash":"^4.17.0","@nestjs/common":"^10.4.22","@types/express":"^5.0.6"},"peerDependencies":{"@nestjs/jwt":"^10.0.0","@nestjs/core":"^10.0.0","@nestjs/common":"^10.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cs-permissions-sdk_1.0.1_1775193738123_0.9854505114942607","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@briansleonel/cs-permissions-sdk","version":"1.0.2","_id":"@briansleonel/cs-permissions-sdk@1.0.2","maintainers":[{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"}],"dist":{"shasum":"b67d27c978c8dd064cde2ce40e52ba9e66cce536","tarball":"https://registry.npmjs.org/@briansleonel/cs-permissions-sdk/-/cs-permissions-sdk-1.0.2.tgz","fileCount":93,"integrity":"sha512-cEmvd/JaWUx8C+yeG6puL+JkWj7FKJtH1LITxSOFqRHf41JLdoGOqUeSF7D/vjM/uASZMvMnseCNM6LdpT8Vfw==","signatures":[{"sig":"MEYCIQDzkdf3/1mgYnfHzei8dfEUXTGJwPP6Ep8/K5qjxiSNnQIhAMoqDPrFQ2mhEAKs+AP/IFHW3KGGIpk+JjtvnU9U33yP","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":37870},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc -p tsconfig.build.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"},"_npmVersion":"9.8.1","description":"Guards, decorators and interfaces for NestJS role-based permissions","directories":{},"_nodeVersion":"22.1.0","dependencies":{"lodash":"^4.17.21"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@nestjs/jwt":"^10.2.0","@types/node":"^20.19.37","@nestjs/core":"^10.4.22","@types/lodash":"^4.17.0","@nestjs/common":"^10.4.22","@types/express":"^5.0.6"},"peerDependencies":{"@nestjs/jwt":"^10.0.0","@nestjs/core":"^10.0.0","@nestjs/common":"^10.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cs-permissions-sdk_1.0.2_1775194115273_0.5304384043768409","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@briansleonel/cs-permissions-sdk","version":"1.0.3","_id":"@briansleonel/cs-permissions-sdk@1.0.3","maintainers":[{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"}],"dist":{"shasum":"7e010bc4f21a24004ec36fc5373ba0ee2bc28426","tarball":"https://registry.npmjs.org/@briansleonel/cs-permissions-sdk/-/cs-permissions-sdk-1.0.3.tgz","fileCount":93,"integrity":"sha512-8f6COVpJA5IFtlhYxpCGBPgNUWVD5g65AD/z/iP2IYx9xyDeS5Or0uruK6j/e8+aa3bpOPJsDy8MSr2Nbfbhkw==","signatures":[{"sig":"MEUCIQCqHXVNRoTv5bFHMtSoRkhULN2172gMOTJV/KZTkGIINwIgXr5T/jLmMsMqD7ERD0QVBEEkh5kZGVfVp7Y1YlK1hpA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":37920},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc -p tsconfig.build.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"},"_npmVersion":"9.8.1","description":"Guards, decorators and interfaces for NestJS role-based permissions","directories":{},"_nodeVersion":"22.1.0","dependencies":{"lodash":"^4.17.21"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@nestjs/jwt":"^10.2.0","@types/node":"^20.19.37","@nestjs/core":"^10.4.22","@types/lodash":"^4.17.0","@nestjs/common":"^10.4.22","@types/express":"^5.0.6"},"peerDependencies":{"@nestjs/jwt":"^10.0.0","@nestjs/core":"^10.0.0","@nestjs/common":"^10.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cs-permissions-sdk_1.0.3_1775194899283_0.5471872415516421","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@briansleonel/cs-permissions-sdk","version":"1.0.4","_id":"@briansleonel/cs-permissions-sdk@1.0.4","maintainers":[{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"}],"dist":{"shasum":"c9792e19d81a78506b1b66ef18d50279c9fd493b","tarball":"https://registry.npmjs.org/@briansleonel/cs-permissions-sdk/-/cs-permissions-sdk-1.0.4.tgz","fileCount":93,"integrity":"sha512-ZYt5p2uZxS9dsH+Su71VecuNJnqllkyepinVPy/P9CmYoVV1AziEzZfjq+68Qadhqky2fd7RLHV7fjNW34RPMA==","signatures":[{"sig":"MEYCIQCgMORHTuMbgO29WmVGxgHhVh1AVahhCdzdUcmLNSkR5AIhALK9/v2AKiKjELcXql37/vRopLiNhWkYOJ78x/ofm0Jc","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38100},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc -p tsconfig.build.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"},"_npmVersion":"9.8.1","description":"Guards, decorators and interfaces for NestJS role-based permissions","directories":{},"_nodeVersion":"22.1.0","dependencies":{"lodash":"^4.17.21"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@nestjs/jwt":"^10.2.0","@types/node":"^20.19.37","@nestjs/core":"^10.4.22","@types/lodash":"^4.17.0","@nestjs/common":"^10.4.22","@types/express":"^5.0.6"},"peerDependencies":{"@nestjs/jwt":"^10.0.0","@nestjs/core":"^10.0.0","@nestjs/common":"^10.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cs-permissions-sdk_1.0.4_1775195141084_0.9197648013840272","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@briansleonel/cs-permissions-sdk","version":"1.0.5","_id":"@briansleonel/cs-permissions-sdk@1.0.5","maintainers":[{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"}],"dist":{"shasum":"45c69dca3fd92777f63714e4a578918d57ce120e","tarball":"https://registry.npmjs.org/@briansleonel/cs-permissions-sdk/-/cs-permissions-sdk-1.0.5.tgz","fileCount":93,"integrity":"sha512-mFxpd2BdB1I1TUtCvfwGmXGXka/RKXNEEe9i484qJl/Keu4JR+HmAOZ6qbuZ9nRv0mlcsiPoTFXX3mdBUcS3lQ==","signatures":[{"sig":"MEYCIQDhxd3dRQIMkuPA1p8lrm3wM8Q+xHLiUTcoEwY6F/sLVAIhALwza516HPofErn6aZuTUycIMViR+tzbfQZVndifJPrm","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38131},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc -p tsconfig.build.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"},"_npmVersion":"9.8.1","description":"Guards, decorators and interfaces for NestJS role-based permissions","directories":{},"_nodeVersion":"22.1.0","dependencies":{"lodash":"^4.17.21"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@nestjs/jwt":"^11.0.0","@types/node":"^20.19.37","@nestjs/core":"^11.0.0","@types/lodash":"^4.17.0","@nestjs/common":"^11.0.0","@types/express":"^5.0.6"},"peerDependencies":{"@nestjs/jwt":"^10.0.0 || ^11.0.0","@nestjs/core":"^10.0.0 || ^11.0.0","@nestjs/common":"^10.0.0 || ^11.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cs-permissions-sdk_1.0.5_1775196376884_0.4126237729739568","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"@briansleonel/cs-permissions-sdk","version":"1.0.6","_id":"@briansleonel/cs-permissions-sdk@1.0.6","maintainers":[{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"}],"dist":{"shasum":"ff300449e92c3cbba43339df42e55c8fbb78e156","tarball":"https://registry.npmjs.org/@briansleonel/cs-permissions-sdk/-/cs-permissions-sdk-1.0.6.tgz","fileCount":94,"integrity":"sha512-XOhskTmVXaxCOYZaJjYmzbiO8PqQTga92bBy5CUG5bGwujIQk8b0N/1E4FSRfP3lXTkNL/bIioLdJkK2ldqM0w==","signatures":[{"sig":"MEUCIDKh3ne/JrNPEYX5W+ywKm+lSCbvdsevZknGmh0h7kdqAiEAv4gXzwsQ+qc7UEiLzXYKHB/z1prZaU83iSBaN8qY9ls=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":46135},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc -p tsconfig.build.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"},"_npmVersion":"9.8.1","description":"Guards, decorators and interfaces for NestJS role-based permissions","directories":{},"_nodeVersion":"22.1.0","dependencies":{"lodash":"^4.17.21"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@nestjs/jwt":"^11.0.0","@types/node":"^20.19.37","@nestjs/core":"^11.0.0","@types/lodash":"^4.17.0","@nestjs/common":"^11.0.0","@types/express":"^5.0.6"},"peerDependencies":{"@nestjs/jwt":"^10.0.0 || ^11.0.0","@nestjs/core":"^10.0.0 || ^11.0.0","@nestjs/common":"^10.0.0 || ^11.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cs-permissions-sdk_1.0.6_1776301289895_0.9157483814171918","host":"s3://npm-registry-packages-npm-production"}},"1.0.7":{"name":"@briansleonel/cs-permissions-sdk","version":"1.0.7","_id":"@briansleonel/cs-permissions-sdk@1.0.7","maintainers":[{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"}],"dist":{"shasum":"a69d600bdbf31adf667fc1ed197a2e56fb47bc2d","tarball":"https://registry.npmjs.org/@briansleonel/cs-permissions-sdk/-/cs-permissions-sdk-1.0.7.tgz","fileCount":94,"integrity":"sha512-abVbtm7TwQegiPsRoe+zD/GibhhQSyFLHPUkfOESTJ/y5A0CWzMeaeWya/w85YHs0R0T20EUX0qnUnAW1Y+9Lw==","signatures":[{"sig":"MEUCIQDYaaB5TyAk0SMjPoCJ/O+5NQ1IZpmsnLSnSnSI8ZYTVwIgGCk2o9vaA6Dpt42lYXr1rzMEW1KnhAgj17su/ricmss=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":46156},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc -p tsconfig.build.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"},"_npmVersion":"9.8.1","description":"Guards, decorators and interfaces for NestJS role-based permissions","directories":{},"_nodeVersion":"22.1.0","dependencies":{"lodash":"^4.17.21"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@nestjs/jwt":"^11.0.0","@types/node":"^20.19.37","@nestjs/core":"^11.0.0","@types/lodash":"^4.17.0","@nestjs/common":"^11.0.0","@types/express":"^5.0.6"},"peerDependencies":{"@nestjs/jwt":"^10.0.0 || ^11.0.0","@nestjs/core":"^10.0.0 || ^11.0.0","@nestjs/common":"^10.0.0 || ^11.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cs-permissions-sdk_1.0.7_1776301711415_0.8022137985471964","host":"s3://npm-registry-packages-npm-production"}},"1.0.8":{"name":"@briansleonel/cs-permissions-sdk","version":"1.0.8","_id":"@briansleonel/cs-permissions-sdk@1.0.8","maintainers":[{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"}],"dist":{"shasum":"a9bb3c03a32fb0840e6f21b56a91a78740228d69","tarball":"https://registry.npmjs.org/@briansleonel/cs-permissions-sdk/-/cs-permissions-sdk-1.0.8.tgz","fileCount":94,"integrity":"sha512-449DNE68OMWRIXt+5ZORmal4pYnl/RD+8POFLwEOkgztqNcIUXt5RGhwNHV3Qd4B+dBHZIWwAWB5DAh2fdWKeA==","signatures":[{"sig":"MEUCIQD3Zyz9tZrWsamQxcgtpxS7KNTos+uDJGN0NbcnNOXLsAIgUxJxabSdIkrL4Fxccqo+Sf9k3Labk5nnVSCc85OmisE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":46669},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc -p tsconfig.build.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"},"_npmVersion":"9.8.1","description":"Guards, decorators and interfaces for NestJS role-based permissions","directories":{},"_nodeVersion":"22.1.0","dependencies":{"lodash":"^4.17.21"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@nestjs/jwt":"^11.0.0","@types/node":"^20.19.37","@nestjs/core":"^11.0.0","@types/lodash":"^4.17.0","@nestjs/common":"^11.0.0","@types/express":"^5.0.6"},"peerDependencies":{"@nestjs/jwt":"^10.0.0 || ^11.0.0","@nestjs/core":"^10.0.0 || ^11.0.0","@nestjs/common":"^10.0.0 || ^11.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cs-permissions-sdk_1.0.8_1776356994313_0.6781708773178305","host":"s3://npm-registry-packages-npm-production"}},"1.0.9":{"name":"@briansleonel/cs-permissions-sdk","version":"1.0.9","_id":"@briansleonel/cs-permissions-sdk@1.0.9","maintainers":[{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"}],"dist":{"shasum":"5c9490521fb83144ebd887d6ac3495d6fbcf952d","tarball":"https://registry.npmjs.org/@briansleonel/cs-permissions-sdk/-/cs-permissions-sdk-1.0.9.tgz","fileCount":94,"integrity":"sha512-EpEt17eIkPGH6N+eIy0PtxrTQRregIbUWdgA1XjTQ06HrDWCpCUICLEKdfOfNKPM+jwuIDscGBH7yNAt9+jHuQ==","signatures":[{"sig":"MEQCIGqhkbCYxOnZMgVVTZ9iMpoHA4ihkrQu0ehWT5Hkak5AAiBe7neTAFHPYaYVs7vWTRUjJ5Dl6pohYNIgimLmvk2EMA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47262},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"c3ff927afbc0089118869e6ea48bd0950c75f140","scripts":{"build":"tsc -p tsconfig.build.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"},"_npmVersion":"9.8.1","description":"Guards, decorators and interfaces for NestJS role-based permissions","directories":{},"_nodeVersion":"22.1.0","dependencies":{"lodash":"^4.17.21"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@nestjs/jwt":"^11.0.0","@types/node":"^20.19.37","@nestjs/core":"^11.0.0","@types/lodash":"^4.17.0","@nestjs/common":"^11.0.0","@types/express":"^5.0.6"},"peerDependencies":{"@nestjs/jwt":"^10.0.0 || ^11.0.0","@nestjs/core":"^10.0.0 || ^11.0.0","@nestjs/common":"^10.0.0 || ^11.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cs-permissions-sdk_1.0.9_1777045456975_0.6333608028730038","host":"s3://npm-registry-packages-npm-production"}},"1.0.10":{"name":"@briansleonel/cs-permissions-sdk","version":"1.0.10","_id":"@briansleonel/cs-permissions-sdk@1.0.10","maintainers":[{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"}],"dist":{"shasum":"55d2259367f37455d8e7f9e56f42a06250655413","tarball":"https://registry.npmjs.org/@briansleonel/cs-permissions-sdk/-/cs-permissions-sdk-1.0.10.tgz","fileCount":94,"integrity":"sha512-pIlt6oWlxxf2wHSb6shn7j7pKsGXZFAfh0vHeSXKhZ2Q4PC/eTc7jAIwt9N5sSjGFLm9lEF2Rb4gHEqPermlzw==","signatures":[{"sig":"MEQCIE5opiowEcNYNrUoQrIPlUbh+XdD/o93mvAMT0zAcw26AiB23EY9FjTh1fCp59U3P+wGoyXycGtJ9I2oUaoW0kkC0g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47259},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"bbbc0436770248214e1108bff287cdf8f831291a","scripts":{"build":"tsc -p tsconfig.build.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"},"_npmVersion":"9.8.1","description":"Guards, decorators and interfaces for NestJS role-based permissions","directories":{},"_nodeVersion":"22.1.0","dependencies":{"lodash":"^4.17.21"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@nestjs/jwt":"^11.0.0","@types/node":"^20.19.37","@nestjs/core":"^11.0.0","@types/lodash":"^4.17.0","@nestjs/common":"^11.0.0","@types/express":"^5.0.6"},"peerDependencies":{"@nestjs/jwt":"^10.0.0 || ^11.0.0","@nestjs/core":"^10.0.0 || ^11.0.0","@nestjs/common":"^10.0.0 || ^11.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cs-permissions-sdk_1.0.10_1777048048497_0.12596414693833258","host":"s3://npm-registry-packages-npm-production"}},"1.0.11":{"name":"@briansleonel/cs-permissions-sdk","version":"1.0.11","_id":"@briansleonel/cs-permissions-sdk@1.0.11","maintainers":[{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"}],"dist":{"shasum":"340f22612ab04555241ce1cd2542651fa00144ed","tarball":"https://registry.npmjs.org/@briansleonel/cs-permissions-sdk/-/cs-permissions-sdk-1.0.11.tgz","fileCount":94,"integrity":"sha512-0EfETu4YzGDrSDw6ho5fCjmrbnsWgTFpxgurxpCpluWOocGv93PSKVG+vt1Y53AyLQQlnE97QnHLvF7eJoZgeQ==","signatures":[{"sig":"MEUCIQDqokfET13yZQociBvxtxZkFJ9ElP2rnM82+bEMM0HpNQIgFHAzcPhRrXNksW4gs1wtsVNs8d7SByj6+Gwpky1k8jU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47330},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"a05ac48fca5e57bb672374c573322801116d027f","scripts":{"build":"tsc -p tsconfig.build.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"},"_npmVersion":"9.8.1","description":"Guards, decorators and interfaces for NestJS role-based permissions","directories":{},"_nodeVersion":"22.1.0","dependencies":{"lodash":"^4.17.21"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@nestjs/jwt":"^11.0.0","@types/node":"^20.19.37","@nestjs/core":"^11.0.0","@types/lodash":"^4.17.0","@nestjs/common":"^11.0.0","@types/express":"^5.0.6"},"peerDependencies":{"@nestjs/jwt":"^10.0.0 || ^11.0.0","@nestjs/core":"^10.0.0 || ^11.0.0","@nestjs/common":"^10.0.0 || ^11.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cs-permissions-sdk_1.0.11_1777050780029_0.7020390236165921","host":"s3://npm-registry-packages-npm-production"}},"1.0.12":{"name":"@briansleonel/cs-permissions-sdk","version":"1.0.12","_id":"@briansleonel/cs-permissions-sdk@1.0.12","maintainers":[{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"}],"dist":{"shasum":"42d4513c31d8e1757e5a562911997a1697edd6db","tarball":"https://registry.npmjs.org/@briansleonel/cs-permissions-sdk/-/cs-permissions-sdk-1.0.12.tgz","fileCount":110,"integrity":"sha512-2FZfYxZzJxk4McHKtQI8STUJ+8ioozDpv/9NNER7wGVjTffU7BTKSxHn0i+44yGh57EaQXNnYNVmSAnMhASvlw==","signatures":[{"sig":"MEQCIHdqWo/JC+gR6G5hVQjRqzBp7WZYhYnL+G60rDABHSTLAiA0GK3UNu/DiE+wdv+mRmNNIbytwQCxIH+mCtI+MC0JYA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":76668},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"6fa6a208ba0c3a13e2ea735c0256bef5ebd4b065","scripts":{"build":"tsc -p tsconfig.build.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"},"_npmVersion":"9.8.1","description":"Guards, decorators and interfaces for NestJS role-based permissions","directories":{},"_nodeVersion":"22.1.0","dependencies":{"lodash":"^4.17.21"},"_hasShrinkwrap":false,"devDependencies":{"rxjs":"^7.8.1","axios":"^1.7.0","ioredis":"^5.4.0","typescript":"^5.9.3","@nestjs/jwt":"^11.0.0","@types/node":"^20.19.37","@nestjs/core":"^11.0.0","@nestjs/axios":"^4.0.0","@types/lodash":"^4.17.0","@nestjs/common":"^11.0.0","@types/express":"^5.0.6","@nestjs-modules/ioredis":"^2.0.2"},"peerDependencies":{"rxjs":"^7.8.0","axios":"^1.6.0","ioredis":"^5.3.0","@nestjs/jwt":"^10.0.0 || ^11.0.0","@nestjs/core":"^10.0.0 || ^11.0.0","@nestjs/axios":"^3.0.0 || ^4.0.0","@nestjs/common":"^10.0.0 || ^11.0.0","@nestjs-modules/ioredis":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cs-permissions-sdk_1.0.12_1777320654723_0.7178989271574296","host":"s3://npm-registry-packages-npm-production"}},"1.0.13":{"name":"@briansleonel/cs-permissions-sdk","version":"1.0.13","_id":"@briansleonel/cs-permissions-sdk@1.0.13","maintainers":[{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"}],"dist":{"shasum":"28decc2382d54cafcedb5687baf6068eefb55bdf","tarball":"https://registry.npmjs.org/@briansleonel/cs-permissions-sdk/-/cs-permissions-sdk-1.0.13.tgz","fileCount":110,"integrity":"sha512-hHRQ+rgGcGTETy2wNQdvqqqjjBtwuoakseTkEaF7xHMslXnDpcpnzq2gY+UT/+XKlyint+BK90u2Yd8jShX8qQ==","signatures":[{"sig":"MEUCIB/Ih1DLnD+eachJNN2I/cCFa/GncfoPwh3D+YgTRwvtAiEAlJ3IqGJ1T9p3Qhhn7mnVKuNL6ne8i9D3oKgsJJzKPFk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":76587},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"674373b9762e3ab127f209a04d53734f1f13f21f","scripts":{"build":"tsc -p tsconfig.build.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"},"_npmVersion":"9.8.1","description":"Guards, decorators and interfaces for NestJS role-based permissions","directories":{},"_nodeVersion":"22.1.0","dependencies":{"lodash":"^4.17.21"},"_hasShrinkwrap":false,"devDependencies":{"rxjs":"^7.8.1","axios":"^1.7.0","ioredis":"^5.4.0","typescript":"^5.9.3","@nestjs/jwt":"^11.0.0","@types/node":"^20.19.37","@nestjs/core":"^11.0.0","@nestjs/axios":"^4.0.0","@types/lodash":"^4.17.0","@nestjs/common":"^11.0.0","@types/express":"^5.0.6","@nestjs-modules/ioredis":"^2.0.2"},"peerDependencies":{"rxjs":"^7.8.0","axios":"^1.6.0","ioredis":"^5.3.0","@nestjs/jwt":"^10.0.0 || ^11.0.0","@nestjs/core":"^10.0.0 || ^11.0.0","@nestjs/axios":"^3.0.0 || ^4.0.0","@nestjs/common":"^10.0.0 || ^11.0.0","@nestjs-modules/ioredis":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cs-permissions-sdk_1.0.13_1777321275383_0.013076989570211417","host":"s3://npm-registry-packages-npm-production"}},"1.0.14":{"name":"@briansleonel/cs-permissions-sdk","version":"1.0.14","_id":"@briansleonel/cs-permissions-sdk@1.0.14","maintainers":[{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"}],"dist":{"shasum":"ce8c7bc45f4f26374e8e535695a3ee2540ec8498","tarball":"https://registry.npmjs.org/@briansleonel/cs-permissions-sdk/-/cs-permissions-sdk-1.0.14.tgz","fileCount":110,"integrity":"sha512-vr8wWGijUGLvTuuD3FEHdQpSA/WkG2ssSub/t3PL+IIMek9oc6VgHQFwMFelepCOMffuBk/JJsrMsu8S3Ata4Q==","signatures":[{"sig":"MEQCIBFpM1Vg2pPOSi+0zMOVBRg6lLXcV+ZO2ovNUC4hc0rvAiBwZM4TW0UlHBrT16ZvyuAxWr/7c9isVtJNXHE3TKSj0g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":76596},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"11e42c236a25da7d5d060819cd1d603e41db2d8c","scripts":{"build":"tsc -p tsconfig.build.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"},"_npmVersion":"9.8.1","description":"Guards, decorators and interfaces for NestJS role-based permissions","directories":{},"_nodeVersion":"22.1.0","dependencies":{"lodash":"^4.17.21"},"_hasShrinkwrap":false,"devDependencies":{"rxjs":"^7.8.1","axios":"^1.7.0","ioredis":"^5.4.0","typescript":"^5.9.3","@nestjs/jwt":"^11.0.0","@types/node":"^20.19.37","@nestjs/core":"^11.0.0","@nestjs/axios":"^4.0.0","@types/lodash":"^4.17.0","@nestjs/common":"^11.0.0","@types/express":"^5.0.6","@nestjs-modules/ioredis":"^2.0.2"},"peerDependencies":{"rxjs":"^7.8.0","axios":"^1.6.0","ioredis":"^5.3.0","@nestjs/jwt":"^10.0.0 || ^11.0.0","@nestjs/core":"^10.0.0 || ^11.0.0","@nestjs/axios":"^3.0.0 || ^4.0.0","@nestjs/common":"^10.0.0 || ^11.0.0","@nestjs-modules/ioredis":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cs-permissions-sdk_1.0.14_1777322698799_0.18698594256148326","host":"s3://npm-registry-packages-npm-production"}},"1.0.15":{"name":"@briansleonel/cs-permissions-sdk","version":"1.0.15","_id":"@briansleonel/cs-permissions-sdk@1.0.15","maintainers":[{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"}],"dist":{"shasum":"690586dcaba946f8c74e44cf614c47bc148151af","tarball":"https://registry.npmjs.org/@briansleonel/cs-permissions-sdk/-/cs-permissions-sdk-1.0.15.tgz","fileCount":110,"integrity":"sha512-JVdIo1fwCbnkZJYuS12oB3jXucwxI9LgAmOC/DVr3qakyYMPzn55iiJxBNOjdjx6irFnL4JH3SqUr+kQvKMnAA==","signatures":[{"sig":"MEQCIH96rMih3rAWlCR8chLdCXMq4lZwSeHSGjnaQvRfEV3YAiBjuEzpjmCzAg2p1WB9ZvFyxkhQv1YwJah/lXyARbSR6Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":77299},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"396dfac434d44592acac3b25125eacbada4c9fc5","scripts":{"build":"tsc -p tsconfig.build.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"},"_npmVersion":"9.8.1","description":"Guards, decorators and interfaces for NestJS role-based permissions","directories":{},"_nodeVersion":"22.1.0","dependencies":{"lodash":"^4.17.21"},"_hasShrinkwrap":false,"devDependencies":{"rxjs":"^7.8.1","axios":"^1.7.0","ioredis":"^5.4.0","typescript":"^5.9.3","@nestjs/jwt":"^11.0.0","@types/node":"^20.19.37","@nestjs/core":"^11.0.0","@nestjs/axios":"^4.0.0","@types/lodash":"^4.17.0","@nestjs/common":"^11.0.0","@types/express":"^5.0.6","@nestjs-modules/ioredis":"^2.0.2"},"peerDependencies":{"rxjs":"^7.8.0","axios":"^1.6.0","ioredis":"^5.3.0","@nestjs/jwt":"^10.0.0 || ^11.0.0","@nestjs/core":"^10.0.0 || ^11.0.0","@nestjs/axios":"^3.0.0 || ^4.0.0","@nestjs/common":"^10.0.0 || ^11.0.0","@nestjs-modules/ioredis":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cs-permissions-sdk_1.0.15_1777323158388_0.9258601636406136","host":"s3://npm-registry-packages-npm-production"}},"1.0.16":{"name":"@briansleonel/cs-permissions-sdk","version":"1.0.16","_id":"@briansleonel/cs-permissions-sdk@1.0.16","maintainers":[{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"}],"dist":{"shasum":"301c8650226d5ea61e70db725eb06c8c6dade72f","tarball":"https://registry.npmjs.org/@briansleonel/cs-permissions-sdk/-/cs-permissions-sdk-1.0.16.tgz","fileCount":110,"integrity":"sha512-oGCI3/mePE9UFtUMW4Lm5rK6iKcmCbbm/GXeerU2zq9XkeMcXhM7wuZh5fr3KPjwvZ07NLcDllP4wLRYaqBcfA==","signatures":[{"sig":"MEQCIEr9kfGZ9CKr1YBYrO3xMkotLQoJ5j/P1zPRhs7f7G/1AiAYPdXCSmrBhDnl6sxWLUaTrPpvbExOhM1PvTKCbH2qtA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":77397},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"923e2fe0eaecf3129fb0e512bfba726ead565b1c","scripts":{"build":"tsc -p tsconfig.build.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"},"_npmVersion":"9.8.1","description":"Guards, decorators and interfaces for NestJS role-based permissions","directories":{},"_nodeVersion":"22.1.0","dependencies":{"lodash":"^4.17.21"},"_hasShrinkwrap":false,"devDependencies":{"rxjs":"^7.8.1","axios":"^1.7.0","ioredis":"^5.4.0","typescript":"^5.9.3","@nestjs/jwt":"^11.0.0","@types/node":"^20.19.37","@nestjs/core":"^11.0.0","@nestjs/axios":"^4.0.0","@types/lodash":"^4.17.0","@nestjs/common":"^11.0.0","@types/express":"^5.0.6","@nestjs-modules/ioredis":"^2.0.2"},"peerDependencies":{"rxjs":"^7.8.0","axios":"^1.6.0","ioredis":"^5.3.0","@nestjs/jwt":"^10.0.0 || ^11.0.0","@nestjs/core":"^10.0.0 || ^11.0.0","@nestjs/axios":"^3.0.0 || ^4.0.0","@nestjs/common":"^10.0.0 || ^11.0.0","@nestjs-modules/ioredis":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cs-permissions-sdk_1.0.16_1777327263943_0.5905517470494897","host":"s3://npm-registry-packages-npm-production"}},"1.0.17":{"name":"@briansleonel/cs-permissions-sdk","version":"1.0.17","_id":"@briansleonel/cs-permissions-sdk@1.0.17","maintainers":[{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"}],"dist":{"shasum":"f66bae61a78d58922cee1caa65a9a854d6a46c17","tarball":"https://registry.npmjs.org/@briansleonel/cs-permissions-sdk/-/cs-permissions-sdk-1.0.17.tgz","fileCount":110,"integrity":"sha512-2W98Q89+MPbj+1JYzZl+t/M2T0+Gbeyxvz/YF/igJpw7rhRPzHWzJSEW5zQDZW2u7WcgGX6gLml3NI3Odg9WjA==","signatures":[{"sig":"MEUCIQCuyVoaeQY1nYmy2tp5enyUwoMuGuDcuuNKKOYKA32UIQIgGUAfR64FeE9zOZS2xT89oyjoeMIByMiPcCqjvNe3GcI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":77522},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"4491cc382ca6fee6857a95873cba7ac23b53c72f","scripts":{"build":"tsc -p tsconfig.build.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"},"_npmVersion":"9.8.1","description":"Guards, decorators and interfaces for NestJS role-based permissions","directories":{},"_nodeVersion":"22.1.0","dependencies":{"lodash":"^4.17.21"},"_hasShrinkwrap":false,"devDependencies":{"rxjs":"^7.8.1","axios":"^1.7.0","ioredis":"^5.4.0","typescript":"^5.9.3","@nestjs/jwt":"^11.0.0","@types/node":"^20.19.37","@nestjs/core":"^11.0.0","@nestjs/axios":"^4.0.0","@types/lodash":"^4.17.0","@nestjs/common":"^11.0.0","@types/express":"^5.0.6","@nestjs-modules/ioredis":"^2.0.2"},"peerDependencies":{"rxjs":"^7.8.0","axios":"^1.6.0","ioredis":"^5.3.0","@nestjs/jwt":"^10.0.0 || ^11.0.0","@nestjs/core":"^10.0.0 || ^11.0.0","@nestjs/axios":"^3.0.0 || ^4.0.0","@nestjs/common":"^10.0.0 || ^11.0.0","@nestjs-modules/ioredis":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cs-permissions-sdk_1.0.17_1777473401730_0.22314787781745027","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@briansleonel/cs-permissions-sdk","version":"2.0.0","_id":"@briansleonel/cs-permissions-sdk@2.0.0","maintainers":[{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"}],"dist":{"shasum":"e5150d3e8188e6f5769808214f778797ae55c099","tarball":"https://registry.npmjs.org/@briansleonel/cs-permissions-sdk/-/cs-permissions-sdk-2.0.0.tgz","fileCount":118,"integrity":"sha512-8Th84OmP/cMlwLG5QAp67jJ5m/e0IV2OiyhRdiWJEEH8Vu3KRyLRCn2Zi4KhbR/3DjlgfQ9FuVyd4M8/QMu+QQ==","signatures":[{"sig":"MEQCICc7+NJNuJY00ViaCE8MzxvKdNHTkPthaVbn9EKyE7hXAiBGzAivlIecyMUcn7xafzIyW9We4BKUMzUEohmCPAl2XQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":92203},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"61f6676fbd74750262e24d08d879aaff882c1fde","scripts":{"build":"tsc -p tsconfig.build.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"},"_npmVersion":"9.8.1","description":"Guards, decorators and interfaces for NestJS role-based permissions","directories":{},"_nodeVersion":"22.1.0","dependencies":{"lodash":"^4.17.21"},"_hasShrinkwrap":false,"devDependencies":{"rxjs":"^7.8.1","axios":"^1.7.0","ioredis":"^5.4.0","typescript":"^5.9.3","@nestjs/jwt":"^11.0.0","@types/node":"^20.19.37","@nestjs/core":"^11.0.0","@nestjs/axios":"^4.0.0","@types/lodash":"^4.17.0","@nestjs/common":"^11.0.0","@types/express":"^5.0.6","@nestjs-modules/ioredis":"^2.0.2"},"peerDependencies":{"rxjs":"^7.8.0","axios":"^1.6.0","ioredis":"^5.3.0","@nestjs/jwt":"^10.0.0 || ^11.0.0","@nestjs/core":"^10.0.0 || ^11.0.0","@nestjs/axios":"^3.0.0 || ^4.0.0","@nestjs/common":"^10.0.0 || ^11.0.0","@nestjs-modules/ioredis":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cs-permissions-sdk_2.0.0_1777564111746_0.7332534898861971","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"@briansleonel/cs-permissions-sdk","version":"2.0.1","_id":"@briansleonel/cs-permissions-sdk@2.0.1","maintainers":[{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"}],"dist":{"shasum":"bea6d2f16c983dfec9d2b93f04951acbb5a12d4c","tarball":"https://registry.npmjs.org/@briansleonel/cs-permissions-sdk/-/cs-permissions-sdk-2.0.1.tgz","fileCount":118,"integrity":"sha512-5gASjmhbBOO/YhQyV8KiJsav2NqTgir9ktjiCmpVmXVUG+pvgGLMGS0Mx6zqy5mFy99nbmZqDfDuisUUG4im6w==","signatures":[{"sig":"MEUCIGSV8fmrjS7AkJ8pFsCVmsU+jiuuuelNJsvUE3wGq3LIAiEAwkwrm4O73LHgSzdzrvrdz6HEZYWweXLsybjPUL5bLZE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":92237},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"fe700d88df2e69a736c0306deecf290a0b2af6d6","scripts":{"build":"tsc -p tsconfig.build.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"},"_npmVersion":"9.8.1","description":"Guards, decorators and interfaces for NestJS role-based permissions","directories":{},"_nodeVersion":"22.1.0","dependencies":{"lodash":"^4.17.21"},"_hasShrinkwrap":false,"devDependencies":{"rxjs":"^7.8.1","axios":"^1.7.0","ioredis":"^5.4.0","typescript":"^5.9.3","@nestjs/jwt":"^11.0.0","@types/node":"^20.19.37","@nestjs/core":"^11.0.0","@nestjs/axios":"^4.0.0","@types/lodash":"^4.17.0","@nestjs/common":"^11.0.0","@types/express":"^5.0.6","@nestjs-modules/ioredis":"^2.0.2"},"peerDependencies":{"rxjs":"^7.8.0","axios":"^1.6.0","ioredis":"^5.3.0","@nestjs/jwt":"^10.0.0 || ^11.0.0","@nestjs/core":"^10.0.0 || ^11.0.0","@nestjs/axios":"^3.0.0 || ^4.0.0","@nestjs/common":"^10.0.0 || ^11.0.0","@nestjs-modules/ioredis":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cs-permissions-sdk_2.0.1_1777565834943_0.2952721478667053","host":"s3://npm-registry-packages-npm-production"}},"2.0.2":{"name":"@briansleonel/cs-permissions-sdk","version":"2.0.2","_id":"@briansleonel/cs-permissions-sdk@2.0.2","maintainers":[{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"}],"dist":{"shasum":"f40d6672c813b9197630148f7f08995e20617169","tarball":"https://registry.npmjs.org/@briansleonel/cs-permissions-sdk/-/cs-permissions-sdk-2.0.2.tgz","fileCount":126,"integrity":"sha512-cSK+XuDBRIvQ8eLhiZzfYpee3+/osu/ETT/PHWG+X1PuC26FLHMKeqvX73Cem152WXtbyomTM1JUu5ueStpFwg==","signatures":[{"sig":"MEQCIBKTgokZCXOI3xwiO2SaE39DMZl6KlOf2bVe2rpVkSyKAiAEvuxh0brJHe+GT+f4EBgtzwZlUVrHQLtcN0YwNWs4tw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":99136},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"93b49c6f6e12509d713dd8f75a72ef3cf31c4d32","scripts":{"build":"tsc -p tsconfig.build.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"},"_npmVersion":"9.8.1","description":"Guards, decorators and interfaces for NestJS role-based permissions","directories":{},"_nodeVersion":"22.1.0","dependencies":{"lodash":"^4.17.21"},"_hasShrinkwrap":false,"devDependencies":{"rxjs":"^7.8.1","axios":"^1.7.0","ioredis":"^5.4.0","typescript":"^5.9.3","@nestjs/jwt":"^11.0.0","@types/node":"^20.19.37","@nestjs/core":"^11.0.0","@nestjs/axios":"^4.0.0","@types/lodash":"^4.17.0","@nestjs/common":"^11.0.0","@types/express":"^5.0.6","@nestjs-modules/ioredis":"^2.0.2"},"peerDependencies":{"rxjs":"^7.8.0","axios":"^1.6.0","ioredis":"^5.3.0","@nestjs/jwt":"^10.0.0 || ^11.0.0","@nestjs/core":"^10.0.0 || ^11.0.0","@nestjs/axios":"^3.0.0 || ^4.0.0","@nestjs/common":"^10.0.0 || ^11.0.0","@nestjs-modules/ioredis":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cs-permissions-sdk_2.0.2_1780061706467_0.06821359691369944","host":"s3://npm-registry-packages-npm-production"}},"2.0.3":{"name":"@briansleonel/cs-permissions-sdk","version":"2.0.3","description":"Guards, decorators and interfaces for NestJS role-based permissions","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc -p tsconfig.build.json","prepublishOnly":"npm run build"},"peerDependencies":{"@nestjs-modules/ioredis":"^2.0.0","@nestjs/axios":"^3.0.0 || ^4.0.0","@nestjs/common":"^10.0.0 || ^11.0.0","@nestjs/core":"^10.0.0 || ^11.0.0","@nestjs/jwt":"^10.0.0 || ^11.0.0","axios":"^1.6.0","ioredis":"^5.3.0","rxjs":"^7.8.0"},"devDependencies":{"@nestjs-modules/ioredis":"^2.0.2","@nestjs/axios":"^4.0.0","@nestjs/common":"^11.0.0","@nestjs/core":"^11.0.0","@nestjs/jwt":"^11.0.0","@types/express":"^5.0.6","@types/lodash":"^4.17.0","@types/node":"^20.19.37","axios":"^1.7.0","ioredis":"^5.4.0","rxjs":"^7.8.1","typescript":"^5.9.3"},"dependencies":{"lodash":"^4.17.21"},"gitHead":"5bd3a94506623df6486254bee0ad72063f7eb9bb","_id":"@briansleonel/cs-permissions-sdk@2.0.3","_nodeVersion":"24.16.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-mCMSDco2aLx2vnuYl/QtUWg9W/5ohoe9qrvSmlhSskbAPvKZ/l79vuRv9qJNJbBDOeKHOiCZ0DCoFNVwMsUaqA==","shasum":"7981731439e87df52204828719ce02f1b97b8952","tarball":"https://registry.npmjs.org/@briansleonel/cs-permissions-sdk/-/cs-permissions-sdk-2.0.3.tgz","fileCount":126,"unpackedSize":105881,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGKI5nGP4jbIyCLW1DmnawEMsg7pCNO3tibAC6AnLA5wAiB8HwG/4qJGkiqvGh3T95nV5XdZATn6rNdvFvTLF85FqA=="}]},"_npmUser":{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"},"directories":{},"maintainers":[{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cs-permissions-sdk_2.0.3_1781559862205_0.4097610908115543"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-03T05:14:43.948Z","modified":"2026-06-15T21:44:22.460Z","1.0.0":"2026-04-03T05:14:44.200Z","1.0.1":"2026-04-03T05:22:18.288Z","1.0.2":"2026-04-03T05:28:35.414Z","1.0.3":"2026-04-03T05:41:39.435Z","1.0.4":"2026-04-03T05:45:41.223Z","1.0.5":"2026-04-03T06:06:17.050Z","1.0.6":"2026-04-16T01:01:30.050Z","1.0.7":"2026-04-16T01:08:31.563Z","1.0.8":"2026-04-16T16:29:54.447Z","1.0.9":"2026-04-24T15:44:17.107Z","1.0.10":"2026-04-24T16:27:28.633Z","1.0.11":"2026-04-24T17:13:00.183Z","1.0.12":"2026-04-27T20:10:54.878Z","1.0.13":"2026-04-27T20:21:15.531Z","1.0.14":"2026-04-27T20:44:58.944Z","1.0.15":"2026-04-27T20:52:38.541Z","1.0.16":"2026-04-27T22:01:04.120Z","1.0.17":"2026-04-29T14:36:41.930Z","2.0.0":"2026-04-30T15:48:31.885Z","2.0.1":"2026-04-30T16:17:15.080Z","2.0.2":"2026-05-29T13:35:06.672Z","2.0.3":"2026-06-15T21:44:22.338Z"},"description":"Guards, decorators and interfaces for NestJS role-based permissions","maintainers":[{"name":"briansleonel","email":"gonzalezbrianleonel76@gmail.com"}],"readme":"# @briansleonel/cs-permissions-sdk\n\nNestJS SDK that centralizes **organization-scoped role-based access control (RBAC)** for a microservices ecosystem. It transparently handles Redis caching and remote permission resolution against a central gateway, exposing a simple guard + decorator API to the consuming service.\n\nThe consuming service never queries the auth/role database directly. It only:\n1. Sends the `x-organization-id` header.\n2. Declares required permissions with `@RequirePermission(...)`.\n3. Lets the SDK guards do the rest.\n\n---\n\n## Table of contents\n\n- [Architecture](#architecture)\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Required upstream contract](#required-upstream-contract)\n- [Usage in controllers](#usage-in-controllers)\n- [Public API](#public-api)\n- [Internal services](#internal-services)\n- [Caching strategy](#caching-strategy)\n- [Cache invalidation](#cache-invalidation)\n- [Injection tokens](#injection-tokens)\n- [Migration from 1.0.x](#migration-from-10x)\n- [Troubleshooting](#troubleshooting)\n\n---\n\n## Architecture\n\n```\n┌────────────┐  x-organization-id   ┌──────────────────────────────────────────────┐\n│  Frontend  │ ───────────────────► │  Microservice (consumer)                     │\n└────────────┘                      │                                              │\n                                    │  ┌─────────────────────────────────────┐     │\n                                    │  │ UserFromGatewayMiddleware           │     │\n                                    │  └─────────────────────────────────────┘     │\n                                    │                  │                           │\n                                    │                  ▼                           │\n                                    │  ┌─────────────────────────────────────┐     │\n                                    │  │ OrganizationRoleGuard (SDK)         │     │\n                                    │  │  └─► OrganizationPermissionsService │     │\n                                    │  │        │                            │     │\n                                    │  │        ├─► Redis GET                │     │\n                                    │  │        │   org-roles:{org}:user:{u} │     │\n                                    │  │        │   (TTL 1h)                 │     │\n                                    │  │        │   miss → POST gateway      │─────┼──► /api/roles/internal/user-role\n                                    │  │        │                            │     │\n                                    │  │        └─► Redis GET                │     │\n                                    │  │            role:{roleId}:permissions│     │\n                                    │  │            (TTL 24h)                │     │\n                                    │  │            miss → GET gateway       │─────┼──► /api/roles/internal/permissions/:roleId\n                                    │  └─────────────────────────────────────┘     │\n                                    │                  │                           │\n                                    │                  ▼                           │\n                                    │  ┌─────────────────────────────────────┐     │\n                                    │  │ PermissionGuard (SDK)               │     │\n                                    │  │   reads request.org_user_permissions│     │\n                                    │  │   matches @RequirePermission metas  │     │\n                                    │  └─────────────────────────────────────┘     │\n                                    │                  │                           │\n                                    │                  ▼                           │\n                                    │             Controller                       │\n                                    └──────────────────────────────────────────────┘\n```\n\n**Responsibilities**\n\n| Layer | Owns |\n|---|---|\n| Gateway (external) | Database access, role/permission computation, cache invalidation on mutations |\n| SDK | Two-tier Redis cache, header parsing, request enrichment, permission matching |\n| Consumer service | Business logic, controllers, declaring required permissions |\n\nThe SDK **never** touches the auth/roles database. All resolution is delegated to the gateway over HTTP, and results are cached in Redis to avoid hitting the gateway on every request.\n\n> **Why two cache keys instead of a single JWT?** Granular invalidation. When a role's permissions change, the gateway just `DEL`s `role:{roleId}:permissions` and **all users with that role** see the change immediately on their next request — no per-user token reissue, no JWT decode cost on every request.\n\n---\n\n## Installation\n\n```bash\nnpm install @briansleonel/cs-permissions-sdk\n```\n\n### Peer dependencies\n\nThe SDK declares the following peer dependencies — your service must install them:\n\n```bash\nnpm install \\\n  @nestjs/common @nestjs/core \\\n  @nestjs/axios axios rxjs \\\n  @nestjs-modules/ioredis ioredis\n```\n\n| Package | Why |\n|---|---|\n| `@nestjs/common`, `@nestjs/core` | NestJS runtime |\n| `@nestjs/axios`, `axios`, `rxjs` | HTTP client used by `GatewayPermissionsClient` |\n| `@nestjs-modules/ioredis`, `ioredis` | Redis client for the permissions cache |\n| `@nestjs/jwt` | _Optional_ — only needed if your service uses the deprecated `jwtSecret` option, otherwise you can skip it |\n\n---\n\n## Configuration\n\nThe SDK is registered **once** in your `AppModule` via `forRoot` or `forRootAsync`. It is a `@Global()` module, so all other modules in your service can use the guards without re-importing.\n\n### Configuration shape\n\n```typescript\ninterface CsPermissionsSdkOptions {\n  redisUrl: string;    // ioredis connection string, e.g. redis://localhost:6379\n  gatewayUrl: string;  // base URL of the gateway service (no trailing slash needed)\n  jwtSecret?: string;  // @deprecated — kept for backwards compatibility, no longer used\n}\n```\n\n### Async (recommended)\n\n```typescript\nimport { Module } from '@nestjs/common';\nimport { ConfigModule, ConfigService } from '@nestjs/config';\nimport { CsPermissionsSdkModule } from '@briansleonel/cs-permissions-sdk';\n\n@Module({\n  imports: [\n    ConfigModule.forRoot({ isGlobal: true }),\n    CsPermissionsSdkModule.forRootAsync({\n      inject: [ConfigService],\n      useFactory: (config: ConfigService) => ({\n        redisUrl:   config.get<string>('REDIS_URL') ?? '',\n        gatewayUrl: config.get<string>('GATEWAY_URL') ?? '',\n      }),\n    }),\n  ],\n})\nexport class AppModule {}\n```\n\n### Sync\n\n```typescript\nCsPermissionsSdkModule.forRoot({\n  redisUrl:   'redis://localhost:6379',\n  gatewayUrl: 'https://gateway.internal',\n}),\n```\n\n### Required environment variables (suggested)\n\n| Var | Example | Purpose |\n|---|---|---|\n| `REDIS_URL` | `redis://localhost:6379` | Redis instance used for the permissions cache |\n| `GATEWAY_URL` | `https://gateway.internal` | Base URL of the gateway HTTP service |\n\n---\n\n## Required upstream contract\n\nFor the SDK to work, two upstream components must be in place:\n\n### 1. Authentication middleware (in your service)\n\nA middleware running **before** the SDK guards must populate `request.user` with at least:\n\n```typescript\nrequest.user = { id: string, /* ...rest of your user shape */ };\n```\n\nIn the existing ecosystem this is `UserFromGatewayMiddleware`. The SDK uses `request.user.id` to ask the gateway for that user's role inside the requested organization.\n\n### 2. Gateway endpoints (the central service)\n\nThe SDK calls **two** endpoints on the gateway:\n\n#### `POST {gatewayUrl}/api/roles/internal/user-role`\n\nReturns the user's role inside the organization.\n\nRequest body:\n```json\n{\n  \"organization_id\": \"uuid\",\n  \"user_id\": \"uuid\"\n}\n```\n\nResponse body (either shape is supported — the SDK auto-unwraps `{ data: ... }`):\n```json\n{\n  \"user_id\": \"uuid\",\n  \"organization_id\": \"uuid\",\n  \"role_id\": \"uuid\"\n}\n```\n\nOr wrapped:\n```json\n{\n  \"statusCode\": 200,\n  \"data\": {\n    \"user_id\": \"uuid\",\n    \"organization_id\": \"uuid\",\n    \"role_id\": \"uuid\"\n  }\n}\n```\n\n#### `GET {gatewayUrl}/api/roles/internal/permissions/:roleId`\n\nReturns the array of permissions for the given role.\n\nResponse body:\n```json\n[\n  { \"feature\": \"contacts\", \"action\": \"read\",   \"scope\": null },\n  { \"feature\": \"contacts\", \"action\": \"create\", \"scope\": [\"all\"] }\n]\n```\n\nOr wrapped:\n```json\n{\n  \"statusCode\": 200,\n  \"data\": [\n    { \"feature\": \"contacts\", \"action\": \"read\", \"scope\": null }\n  ]\n}\n```\n\nThe shape of each permission must conform to [`IPermissionPayload`](#ipermissionpayload).\n\n---\n\n## Usage in controllers\n\nThe SDK exposes two guards that are designed to run together, in this exact order:\n\n> **⚠️ The guards must be applied with `@UseGuards(...)`.** The `@RequirePermission` decorator alone does **not** enforce anything — it only attaches metadata. The actual enforcement and the population of `request.org_user_permissions` happens inside `OrganizationRoleGuard` + `PermissionGuard`. Forgetting `@UseGuards` is the most common mistake when integrating the SDK: the endpoint will run anyway, `request.org_user_permissions` will be `undefined`, and `@CurrentScope()` will return `[]`. If you want a global setup so you don't have to repeat `@UseGuards` per controller, see [Global guards](#global-guards).\n\n```typescript\nimport {\n  OrganizationRoleGuard,\n  PermissionGuard,\n  RequirePermission,\n  RoleFeatureEnum,\n  RoleActionEnum,\n  ORG_ID_HEADER,\n} from '@briansleonel/cs-permissions-sdk';\n\n@Controller('contacts')\n@UseGuards(OrganizationRoleGuard, PermissionGuard)   // 👈 required — without this nothing is enforced\n@ApiHeader({ name: ORG_ID_HEADER, required: true, description: 'Organization id' })\nexport class ContactController {\n  @Post()\n  @RequirePermission({ feature: RoleFeatureEnum.CONTACTS, action: RoleActionEnum.CREATE })\n  create() { /* ... */ }\n\n  @Get()\n  @RequirePermission({ feature: RoleFeatureEnum.CONTACTS, action: RoleActionEnum.READ })\n  findAll() { /* ... */ }\n}\n```\n\n**Order matters:** `OrganizationRoleGuard` must run before `PermissionGuard`, because the latter depends on `request.org_user_permissions` set by the former.\n\nThe frontend only needs to send the `x-organization-id` header — the SDK does everything else.\n\n### Global guards\n\nIf you want every endpoint in your service protected automatically — without having to add `@UseGuards(OrganizationRoleGuard, PermissionGuard)` on every controller — register them globally in `AppModule`:\n\n```typescript\nimport { APP_GUARD } from '@nestjs/core';\n\n@Module({\n  providers: [\n    { provide: APP_GUARD, useClass: OrganizationRoleGuard },\n    { provide: APP_GUARD, useClass: PermissionGuard },\n  ],\n})\nexport class AppModule {}\n```\n\n**Trade-off:** with global guards, the SDK runs on **every** route — including ones that should stay public (login, health, webhooks, etc.). You'd typically pair this with a `@Public()` skip decorator and a check inside the guards. For most services starting out, `@UseGuards` per controller is more explicit and easier to reason about — switch to global only when the repetition becomes noticeable.\n\n### Bypassing the guards via a request flag\n\nWhen a service has **multiple authentication methods** — typically a user bearer token *plus* an org-level api-key — the api-key path has no user attached and therefore no role/permissions to evaluate. The SDK supports this by short-circuiting both guards when an upstream guard sets `request.skip_permissions_check = true`.\n\nThe contract is intentionally simple: **the SDK does not know about your auth methods**. Your `AuthGuard` decides whether the current request should bypass and sets the flag; the SDK guards read it and return `true` immediately.\n\n```typescript\n// your service: src/guards/auth.guard.ts\nimport { CanActivate, ExecutionContext, Injectable, UnauthorizedException } from '@nestjs/common';\nimport { IRequestWithUser } from '@briansleonel/cs-permissions-sdk';\n\n@Injectable()\nexport class AuthGuard implements CanActivate {\n  async canActivate(context: ExecutionContext): Promise<boolean> {\n    const request = context.switchToHttp().getRequest<IRequestWithUser>();\n    const apiKey  = request.headers['x-api-key'] as string | undefined;\n    const bearer  = this.extractBearer(request.headers.authorization);\n\n    if (apiKey) {\n      const org = await this.validateApiKey(apiKey);\n      if (!org) throw new UnauthorizedException('Invalid API key');\n      request.skip_permissions_check = true;     // 👈 SDK guards will return true\n      request.organization_id = org.id;\n      return true;\n    }\n\n    if (bearer) {\n      const user = await this.validateBearer(bearer);\n      if (!user) throw new UnauthorizedException('Invalid token');\n      request.user = user;                     // SDK guards will resolve permissions\n      return true;\n    }\n\n    throw new UnauthorizedException('No credentials provided');\n  }\n}\n```\n\nChain the guards in this order — your `AuthGuard` first, then the SDK guards:\n\n```typescript\n@UseGuards(AuthGuard, OrganizationRoleGuard, PermissionGuard)\n@RequirePermission({ feature: RoleFeatureEnum.MESSAGES, action: RoleActionEnum.READ })\n@Get(':threadId/timeline')\nasync getTimeline(...) { /* ... */ }\n```\n\n**What happens at runtime**\n\n| Auth method | After `AuthGuard` | Inside `OrganizationRoleGuard` | Inside `PermissionGuard` |\n|---|---|---|---|\n| Bearer (user) | `request.user` set | Resolves role + permissions, populates `request.org_user_permissions` | Matches required permission |\n| Api-key (org) | `request.skip_permissions_check = true` | Returns `true` immediately, no Redis/gateway calls | Returns `true` immediately |\n\n> **Heads-up for the handler.** When the request was authenticated via api-key, `request.org_user_permissions` will be `undefined` inside the controller. If your handler reads `req.org_user_permissions?.permissions`, you need to handle that case explicitly — typically by treating api-key requests as if they had full scope (`scope: [ALL]`) or by returning an org-wide projection. This is intentional: an org-level api-key has no per-user role to derive scope from.\n\n**Why a request flag instead of a config predicate?**\n\nPutting the bypass logic in your `AuthGuard` (where authentication decisions belong) keeps the SDK agnostic of your auth implementation. If you add a new auth method later (`x-service-token`, mTLS, etc.), you only touch the `AuthGuard` — no SDK config change, no controller change.\n\n### Reading the resolved payload from the request\n\nAfter both guards pass, the request is enriched with the resolved permissions:\n\n```typescript\nimport { IRequestWithUser } from '@briansleonel/cs-permissions-sdk';\n\n@Get('me')\nwhoami(@Req() req: IRequestWithUser) {\n  const orgId = req.organization_id;\n  const role  = req.org_user_permissions?.role_id;\n  const perms = req.org_user_permissions?.permissions ?? [];\n  return { orgId, role, perms };\n}\n```\n\n---\n\n## Public API\n\n### Guards\n\n#### `OrganizationRoleGuard`\n\nReads the `x-organization-id` header and the authenticated `request.user.id`, then asks `OrganizationPermissionsService` for the resolved role payload (cached in Redis or fetched from the gateway). On success it sets:\n\n- `request.org_user_permissions` → `IRolePayload`\n- `request.organization_id` → `string`\n\nThrows `UnauthorizedException` if:\n- the header is missing,\n- `request.user` is missing,\n- the gateway is unreachable,\n- the resolved payload doesn't match the request context.\n\n#### `PermissionGuard`\n\nReads the `@RequirePermission(...)` metadata and matches it against `request.org_user_permissions.permissions`. If no decorator is present on the route, the guard allows the request through. Throws `ForbiddenException` if the user lacks the required permission.\n\n### Decorators\n\n#### `@RequirePermission(p: IRequiredPermission)`\n\nAttaches required-permission metadata to a route handler or to an entire controller class.\n\n```typescript\n@RequirePermission({\n  feature: RoleFeatureEnum.USERS,\n  action:  RoleActionEnum.DELETE,\n})\n```\n\n#### `@ActiveUser()`\n\nParam decorator that returns `request.user` directly:\n\n```typescript\n@Get('me')\nme(@ActiveUser() user: IUserWithoutPassword) {\n  return user;\n}\n```\n\n#### `@CurrentScope(opts?)`\n\nParam decorator that returns the `scope[]` array for a specific `(feature, action)` permission of the current user. Pairs with `@RequirePermission` to drive **row-level filtering** at the service layer (e.g. \"admin sees all rows, viewer sees only own\").\n\n> **⚠️ Requires the guards to be applied.** `@CurrentScope()` reads from `request.org_user_permissions`, which is populated by `OrganizationRoleGuard`. You **must** apply `@UseGuards(OrganizationRoleGuard, PermissionGuard)` at the controller or method level (or register them globally — see [Global guards](#global-guards)). Without that, `@CurrentScope()` returns `[]` because `request.org_user_permissions` is `undefined`. The `@RequirePermission` decorator alone is just metadata — it does not enforce anything by itself.\n\n**Auto-inference (recommended):** when called with no arguments, it reads the `feature`/`action` from the `@RequirePermission` decorator on the same handler:\n\n```typescript\n@Controller()\n@UseGuards(OrganizationRoleGuard, PermissionGuard)   // 👈 required\nexport class IntegrationController {\n\n  @Get('/:orgId/integrations')\n  @RequirePermission({ feature: RoleFeatureEnum.INTEGRATIONS, action: RoleActionEnum.READ })\n  async listByOrg(\n    @Param('orgId') orgId: string,\n    @CurrentScope() scope: RoleScopeEnum[],\n    @ActiveUser() user: IUserWithoutPassword,\n  ) {\n    const seesAll = hasFullAccess(scope);\n    return this.integrationService.listByOrg(orgId, {\n      filterByUserId: seesAll ? undefined : user.id,\n      includeCreatedBy: seesAll,\n    });\n  }\n}\n```\n\n**Explicit override:** if you need a scope for a permission that's *not* the one declared in `@RequirePermission` (e.g. checking a secondary permission inline):\n\n```typescript\n@CurrentScope({ feature: RoleFeatureEnum.AGENTS, action: RoleActionEnum.READ })\nagentsScope: RoleScopeEnum[],\n```\n\nReturns `[]` when the user doesn't have the permission, when the guards weren't applied, or when neither auto-inference nor explicit options yield a `(feature, action)` pair. Use it together with the helpers below.\n\n### Scope helpers\n\nPlain functions (not NestJS providers) for reasoning about the scope array. Import and use them directly inside your services or controllers.\n\n```typescript\nimport { hasFullAccess, canAccessOnlyOwn } from '@briansleonel/cs-permissions-sdk';\n\nhasFullAccess(scope);     // true if scope includes RoleScopeEnum.ALL\ncanAccessOnlyOwn(scope);  // true if scope includes OWN but NOT ALL\n```\n\nBoth accept `RoleScopeEnum[] | null | undefined` and return a `boolean`, so they are safe to call on raw `scope` values without nullish-check boilerplate.\n\n### Enums\n\n#### `RoleFeatureEnum`\n\n| Value |\n|---|\n| `MESSAGES` |\n| `AGENTS` |\n| `USERS` |\n| `CAMPAIGNS` |\n| `CONTACTS` |\n| `OUTGOING_NUMBER` |\n| `TEAM_MEMBER` |\n| `WIDGETS` |\n| `CALLS` |\n| `ROLES` |\n\n#### `RoleActionEnum`\n\n| Value |\n|---|\n| `CREATE` |\n| `READ` |\n| `UPDATE` |\n| `DELETE` |\n\n#### `RoleScopeEnum`\n\n| Value | Meaning |\n|---|---|\n| `ALL` | All records |\n| `ASSIGNED` | Records assigned to the user |\n| `UNASSIGNED` | Records not assigned to anyone |\n| `OWN` | Records owned by the user |\n\n### Interfaces\n\n#### `IRolePayload`\n\nThe payload set on `request.org_user_permissions` after `OrganizationRoleGuard` runs.\n\n```typescript\ninterface IRolePayload {\n  user_id: string;\n  organization_id: string;\n  role_id: string;\n  permissions: IPermissionPayload[];\n}\n```\n\n#### `IUserRole`\n\nThe cached membership record (returned by the user-role gateway endpoint).\n\n```typescript\ninterface IUserRole {\n  user_id: string;\n  organization_id: string;\n  role_id: string;\n}\n```\n\n#### `IPermissionPayload`\n\n```typescript\ninterface IPermissionPayload {\n  feature: RoleFeatureEnum;\n  action: RoleActionEnum;\n  scope?: RoleScopeEnum[] | null;\n}\n```\n\n#### `IRequiredPermission`\n\nUsed by `@RequirePermission`.\n\n```typescript\ninterface IRequiredPermission {\n  feature: string;\n  action: string;\n  scope?: string | null;\n}\n```\n\n#### `IRequestWithUser`\n\nExpress `Request` extended with the SDK's contributions:\n\n```typescript\ninterface IRequestWithUser extends Request {\n  user: IUserWithoutPassword;\n  organization_id?: string;\n  org_user_permissions?: IRolePayload;\n}\n```\n\n### Constants\n\n| Constant | Value | Purpose |\n|---|---|---|\n| `ORG_ID_HEADER` | `'x-organization-id'` | Header sent by the frontend identifying the active org |\n| `ORG_TOKEN_HEADER` | `'x-org-permissions'` | Legacy header (kept for backwards-compat with older flows) |\n\n---\n\n## Internal services\n\nThese services are exported in case you need to use them outside the guards (custom middleware, background jobs, scripts). In day-to-day controller code you don't need them.\n\n### `OrganizationPermissionsService`\n\n```typescript\nresolvePermissions(organizationId: string, userId: string): Promise<IRolePayload>\n```\n\nResolves the role payload by combining the two-tier cache:\n\n1. `org-roles:{orgId}:user:{userId}` → fetched once per hour, contains `{ user_id, organization_id, role_id }`.\n2. `role:{roleId}:permissions` → fetched on demand, contains the array of permissions for that role.\n3. Combines both into an `IRolePayload` and returns it.\n\n### `GatewayPermissionsClient`\n\n```typescript\nfetchUserRole(organizationId: string, userId: string): Promise<IUserRole>\nfetchRolePermissions(roleId: string): Promise<IPermissionPayload[]>\n```\n\nPerforms the actual HTTP calls to the gateway. Auto-unwraps `{ statusCode, data }` response shapes. Throws `ServiceUnavailableException` on failure (the underlying URL, status, and response body are logged).\n\n---\n\n## Caching strategy\n\n| Key | Value | TTL | Refreshed when |\n|---|---|---|---|\n| `org-roles:{orgId}:user:{userId}` | `IUserRole` JSON | 1 hour | Cache miss or gateway `DEL` |\n| `role:{roleId}:permissions` | `IPermissionPayload[]` JSON | 24 hours | Cache miss or gateway `DEL` |\n\nProperties of this design:\n\n- **No JWT verification on every request.** The previous design encoded `IRolePayload` as a JWT and re-verified the signature on every call. Now it's plain JSON in Redis — faster, simpler, no shared secret needed at runtime.\n- **Granular invalidation.** When a role's permissions change, the gateway invalidates one key (`role:{roleId}:permissions`) and **every user holding that role** sees the change on their next request.\n- **TTLs are a safety net.** The 1h on `org-roles:...` covers the case where a user's role is reassigned. The 24h on `role:...:permissions` covers the case where an explicit invalidation is missed.\n\n---\n\n## Cache invalidation\n\nThe gateway is the source of truth, so it must `DEL` the affected keys whenever data changes. Recommended hooks:\n\n| Mutation on the gateway | Keys to delete |\n|---|---|\n| Permissions of a role change | `role:{roleId}:permissions` |\n| A role is deleted | `role:{roleId}:permissions` (and force re-fetch of all users using it) |\n| User is reassigned to a different role in an organization | `org-roles:{orgId}:user:{userId}` |\n| User is removed from an organization | `org-roles:{orgId}:user:{userId}` |\n| User is added to a new organization | _(no action needed — first request will populate)_ |\n\n```typescript\n// gateway side, after mutating role permissions\nawait this.redisService.del(`role:${roleId}:permissions`);\n\n// after mutating user-organization membership\nawait this.redisService.del(`org-roles:${organizationId}:user:${userId}`);\n```\n\n---\n\n## Injection tokens\n\nThe SDK exports three injection tokens. **You typically don't need any of these** — they are public so the DI graph is debuggable and so advanced consumers can override providers if needed.\n\n| Token | Resolves to | Notes |\n|---|---|---|\n| `CS_PERMISSIONS_SDK_OPTIONS` | `CsPermissionsSdkOptions` | The full options object as produced by your `useFactory`. Single source of truth. |\n| `PERMISSION_GATEWAY_URL_TOKEN` | `string` | Derived from `options.gatewayUrl`. |\n| `PERMISSION_JWT_SECRET_TOKEN` | `string` | _Deprecated._ Resolves to `options.jwtSecret ?? ''`. Kept for backwards compatibility. |\n\n### Why `CS_PERMISSIONS_SDK_OPTIONS` exists\n\nIf `forRootAsync` registered every derived provider with its own copy of `useFactory`, NestJS would invoke that factory once per provider. Centralizing the result in `CS_PERMISSIONS_SDK_OPTIONS` ensures the factory runs **once**, and the rest of the providers read from that single value.\n\n---\n\n## Migration from 1.0.x\n\nIf you are upgrading from `1.0.x`, the change is a **drop-in upgrade** — no code changes required in your service. The SDK still:\n\n- Accepts `jwtSecret` in the options (it's now ignored).\n- Exports `JwtModule` and `PERMISSION_JWT_SECRET_TOKEN` (kept for back-compat).\n- Sets `request.org_user_permissions` with the same `IRolePayload` shape.\n\nWhat changed under the hood:\n\n- Permissions are now resolved from a **two-tier Redis cache** instead of a JWT cached in Redis.\n- The gateway now needs to expose two new internal endpoints:\n  - `POST /api/roles/internal/user-role`\n  - `GET /api/roles/internal/permissions/:roleId`\n- The previous `/api/auth/internal/permissions-token` endpoint is **no longer called** by the SDK. You can remove it from the gateway once all services are upgraded.\n\nYou can safely drop `jwtSecret` from your `useFactory` whenever convenient:\n\n```typescript\n// before\nuseFactory: (config) => ({\n  jwtSecret:  config.get('JWT_SECRET_API_KEY') ?? '',\n  redisUrl:   config.get('REDIS_URL') ?? '',\n  gatewayUrl: config.get('GATEWAY_URL') ?? '',\n}),\n\n// after\nuseFactory: (config) => ({\n  redisUrl:   config.get('REDIS_URL') ?? '',\n  gatewayUrl: config.get('GATEWAY_URL') ?? '',\n}),\n```\n\n---\n\n## Troubleshooting\n\n| Symptom | Likely cause |\n|---|---|\n| `UnauthorizedException: Missing organization id header` | Frontend didn't send `x-organization-id`. |\n| `UnauthorizedException: Authenticated user is missing` | Your auth/user middleware is not running before the guards, or didn't set `request.user.id`. |\n| `UnauthorizedException: Resolved permissions do not match request context` | Gateway returned a `user_role` that doesn't match the requested `(orgId, userId)`. Likely a bug in the gateway. |\n| `ServiceUnavailableException: Failed to fetch user role from gateway` | Gateway is down, unreachable, returning non-2xx, or the user does not belong to the organization. Check `GATEWAY_URL` and gateway logs (the SDK logs URL, status, and response body). |\n| `ServiceUnavailableException: Failed to fetch role permissions from gateway` | Same as above, but for the permissions endpoint. Check that `roleId` is valid in the gateway. |\n| Endpoint runs but `request.org_user_permissions` is `undefined`, `@CurrentScope()` returns `[]` | Either (a) the guards are not applied — add `@UseGuards(OrganizationRoleGuard, PermissionGuard)` at the controller or method level, or register them globally with `APP_GUARD` (see [Global guards](#global-guards)); or (b) the request was authenticated via api-key and your `AuthGuard` set `request.skip_permissions_check = true` — in that case the absence of `org_user_permissions` is expected (see [Bypassing the guards via a request flag](#bypassing-the-guards-via-a-request-flag)). |\n| Permission changes don't take effect | Cache key was not invalidated. Verify the gateway `DEL`s `role:{roleId}:permissions` after mutations. |\n| Role reassignment doesn't take effect | Verify the gateway `DEL`s `org-roles:{orgId}:user:{userId}` after the change. Otherwise wait up to 1 hour for the TTL to expire. |\n| Redis errors at boot (`ECONNREFUSED`) | Wrong `REDIS_URL`, or Redis is not running. |\n\n### Manual cache invalidation (gateway side)\n\n```typescript\n// invalidate a role's permissions for everyone using it\nawait redis.del(`role:${roleId}:permissions`);\n\n// invalidate a single user's role membership\nawait redis.del(`org-roles:${organizationId}:user:${userId}`);\n```\n\n---\n\n## Versioning\n\nThe SDK follows SemVer. Breaking changes to the public API (guards, decorators, exported interfaces, configuration shape) bump the major version. Internal changes (cache strategy tuning, logger output, new endpoints) ship in minor/patch.\n\n| Version | Notes |\n|---|---|\n| `2.1.x` | `@CurrentScope()` decorator + `hasFullAccess` / `canAccessOnlyOwn` helpers for row-level filtering at the service layer. Added `request.skip_permissions_check` flag for bypassing guards when the request is authenticated via a non-user method (e.g. api-key). |\n| `2.0.x` | Two-tier Redis cache (`org-roles:*` + `role:*:permissions`). Removed `OrganizationTokenService`. `jwtSecret` deprecated. |\n| `1.0.x` | JWT-based cache. Required `jwtSecret`. Single gateway endpoint `/api/auth/internal/permissions-token`. |\n\n---\n\n## License\n\nMIT\n","readmeFilename":"README.md"}