{"_id":"@camcima/nestjs-deprecation","_rev":"6-03fea6389ac7c507c4c4ad3c1650a602","name":"@camcima/nestjs-deprecation","dist-tags":{"latest":"1.2.1"},"versions":{"0.1.0":{"name":"@camcima/nestjs-deprecation","version":"0.1.0","keywords":["nestjs","deprecation","sunset","rfc9745","rfc8594","http-headers","api-governance","api-lifecycle"],"author":{"name":"Carlos Cima"},"license":"MIT","_id":"@camcima/nestjs-deprecation@0.1.0","maintainers":[{"name":"camcima","email":"camcima@hotmail.com"}],"homepage":"https://github.com/camcima/nestjs-deprecation#readme","bugs":{"url":"https://github.com/camcima/nestjs-deprecation/issues"},"dist":{"shasum":"d4025369c90b219c1113427d986f2aa7123c405b","tarball":"https://registry.npmjs.org/@camcima/nestjs-deprecation/-/nestjs-deprecation-0.1.0.tgz","fileCount":39,"integrity":"sha512-2K73E17MJNpO93vitqFJRU4/GOKIrd0AfUkV+dq96zn2mFRJZWjsrGYIeeDgsyoSQ8HdPruFy0lKwwILhhgTpA==","signatures":[{"sig":"MEUCIFchcN6v0swTBZXC5S3J28mbxYZks4kxRRSWUJ7PHkUqAiEAiOgxPPppUh+EYF2ey6RvaFwsDt0WywFGWKd3CJmt5Ko=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":59191},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./otel":{"types":"./dist/otel/index.d.ts","default":"./dist/otel/index.js"},"./swagger":{"types":"./dist/swagger/index.d.ts","default":"./dist/swagger/index.js"}},"gitHead":"4d1e229459a52696e6a87c2c7356b9e1e24c9bbe","scripts":{"lint":"eslint \"{src,test}/**/*.ts\"","test":"vitest run","build":"rm -rf dist tsconfig.build.tsbuildinfo && tsc -p tsconfig.build.json","format":"prettier --check 'src/**/*.ts' 'test/**/*.ts'","release":"release-it","test:cov":"vitest run --coverage","test:e2e":"vitest run test/e2e","test:unit":"vitest run test/unit","audit:deps":"pnpm audit --prod","format:fix":"prettier --write 'src/**/*.ts' 'test/**/*.ts'","audit:secrets":"gitleaks git --no-banner --redact -v","prepublishOnly":"pnpm build"},"_npmUser":{"name":"camcima","email":"camcima@hotmail.com"},"repository":{"url":"git+https://github.com/camcima/nestjs-deprecation.git","type":"git"},"_npmVersion":"10.9.7","description":"NestJS library for RFC 9745 (Deprecation) and RFC 8594 (Sunset) HTTP response headers, with Swagger and OpenTelemetry integration","directories":{},"_nodeVersion":"22.22.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rxjs":"^7.8.2","eslint":"^10.5.0","vitest":"^4.1.9","globals":"^17.7.0","lefthook":"^2.1.9","prettier":"^3.8.4","@swc/core":"^1.15.43","supertest":"^7.2.2","release-it":"^20.2.0","typescript":"^6.0.3","@types/node":"^26.0.0","@nestjs/core":"^11.1.27","unplugin-swc":"^1.5.9","@nestjs/common":"^11.1.27","@commitlint/cli":"^21.0.2","@nestjs/swagger":"^11.4.4","@nestjs/testing":"^11.1.27","@types/supertest":"^7.2.0","reflect-metadata":"^0.2.2","typescript-eslint":"^8.62.0","@opentelemetry/api":"^1.9.0","@vitest/coverage-v8":"^4.1.9","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.6","@nestjs/platform-express":"^11.1.27","@nestjs/platform-fastify":"^11.1.27","@opentelemetry/sdk-metrics":"^2.0.0","@commitlint/config-conventional":"^21.0.2"},"peerDependencies":{"@nestjs/core":"^10.0.0 || ^11.0.0","@nestjs/common":"^10.0.0 || ^11.0.0","@nestjs/swagger":"^7.0.0 || ^8.0.0 || ^11.0.0","reflect-metadata":"^0.1.13 || ^0.2.0","@opentelemetry/api":">=1.8.0"},"peerDependenciesMeta":{"@nestjs/swagger":{"optional":true},"@opentelemetry/api":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/nestjs-deprecation_0.1.0_1783596621351_0.33488988549415244","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@camcima/nestjs-deprecation","version":"0.2.0","keywords":["nestjs","deprecation","sunset","rfc9745","rfc8594","http-headers","api-governance","api-lifecycle"],"author":{"name":"Carlos Cima"},"license":"MIT","_id":"@camcima/nestjs-deprecation@0.2.0","maintainers":[{"name":"camcima","email":"camcima@hotmail.com"}],"homepage":"https://github.com/camcima/nestjs-deprecation#readme","bugs":{"url":"https://github.com/camcima/nestjs-deprecation/issues"},"dist":{"shasum":"732925b3357c0450b1d19f8914272065b9ac1159","tarball":"https://registry.npmjs.org/@camcima/nestjs-deprecation/-/nestjs-deprecation-0.2.0.tgz","fileCount":39,"integrity":"sha512-e8tYaQAl2CuneS1pqNfr+naKj+/BGV38OXW8xKnjQC9CHECL6xsugNwVO6LF+sRFPEEmMlkRg472pzbrVL6quA==","signatures":[{"sig":"MEQCIFC50Z9umrbirUJzj+Qwo1IfmLOg8lnsAsda1oUWspjLAiBtOKOZmUdFH5TsT52260cqha/cllR0xE9MdaxheIcqjQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69895},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./otel":{"types":"./dist/otel/index.d.ts","default":"./dist/otel/index.js"},"./swagger":{"types":"./dist/swagger/index.d.ts","default":"./dist/swagger/index.js"}},"gitHead":"8cf4393d1a46ba5d5d55033b2d621a7b80626f03","scripts":{"lint":"eslint \"{src,test}/**/*.ts\"","test":"vitest run","build":"rm -rf dist tsconfig.build.tsbuildinfo && tsc -p tsconfig.build.json","format":"prettier --check 'src/**/*.ts' 'test/**/*.ts'","release":"release-it","test:cov":"vitest run --coverage","test:e2e":"vitest run test/e2e","test:pack":"bash scripts/pack-smoke.sh","test:unit":"vitest run test/unit","audit:deps":"pnpm audit --prod","format:fix":"prettier --write 'src/**/*.ts' 'test/**/*.ts'","audit:secrets":"gitleaks git --no-banner --redact -v","prepublishOnly":"pnpm build"},"_npmUser":{"name":"camcima","email":"camcima@hotmail.com"},"repository":{"url":"git+https://github.com/camcima/nestjs-deprecation.git","type":"git"},"_npmVersion":"10.9.7","description":"NestJS library for RFC 9745 (Deprecation) and RFC 8594 (Sunset) HTTP response headers, with Swagger and OpenTelemetry integration","directories":{},"_nodeVersion":"22.22.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rxjs":"^7.8.2","eslint":"^10.5.0","vitest":"^4.1.9","globals":"^17.7.0","lefthook":"^2.1.9","prettier":"^3.8.4","@swc/core":"^1.15.43","supertest":"^7.2.2","release-it":"^20.2.0","typescript":"^6.0.3","@types/node":"^26.0.0","@nestjs/core":"^11.1.27","unplugin-swc":"^1.5.9","@nestjs/common":"^11.1.27","@commitlint/cli":"^21.0.2","@nestjs/swagger":"^11.4.4","@nestjs/testing":"^11.1.27","@types/supertest":"^7.2.0","reflect-metadata":"^0.2.2","typescript-eslint":"^8.62.0","@opentelemetry/api":"^1.9.0","@vitest/coverage-v8":"^4.1.9","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.6","@nestjs/platform-express":"^11.1.27","@nestjs/platform-fastify":"^11.1.27","@opentelemetry/sdk-metrics":"^2.0.0","@commitlint/config-conventional":"^21.0.2"},"peerDependencies":{"@nestjs/core":"^10.0.0 || ^11.0.0","@nestjs/common":"^10.0.0 || ^11.0.0","@nestjs/swagger":"^7.0.0 || ^8.0.0 || ^11.0.0","reflect-metadata":"^0.1.13 || ^0.2.0","@opentelemetry/api":">=1.8.0"},"peerDependenciesMeta":{"@nestjs/swagger":{"optional":true},"@opentelemetry/api":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/nestjs-deprecation_0.2.0_1783646113022_0.898984063367734","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@camcima/nestjs-deprecation","version":"1.0.0","keywords":["nestjs","deprecation","sunset","rfc9745","rfc8594","http-headers","api-governance","api-lifecycle"],"author":{"name":"Carlos Cima"},"license":"MIT","_id":"@camcima/nestjs-deprecation@1.0.0","maintainers":[{"name":"camcima","email":"camcima@hotmail.com"}],"homepage":"https://github.com/camcima/nestjs-deprecation#readme","bugs":{"url":"https://github.com/camcima/nestjs-deprecation/issues"},"dist":{"shasum":"80e5500ad025c390853ff8d319af14df8ff24913","tarball":"https://registry.npmjs.org/@camcima/nestjs-deprecation/-/nestjs-deprecation-1.0.0.tgz","fileCount":63,"integrity":"sha512-JCnf3KCIMa5h70RbWGm0ZN+kxAMCrOZFUYn8dghSawRA28+3UKuPavZ3WLEzet3rFlMDcl4ie6IU5vfqSObsjQ==","signatures":[{"sig":"MEUCIANOEgdXsUTXADDFjFVrAeMhewnU4oIY/wEGcOKVLavYAiEA+ZMUOyugTE/IKaS/yU6/HVGuSfuxIRbbgGhM54rP1Mw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":132780},"main":"dist/index.js","pnpm":{"overrides":{"find-my-way":"^9.7.0","postcss>nanoid":"^3.3.18","@nestjs/swagger>js-yaml":"^5.2.2"}},"types":"dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./otel":{"types":"./dist/otel/index.d.ts","default":"./dist/otel/index.js"},"./swagger":{"types":"./dist/swagger/index.d.ts","default":"./dist/swagger/index.js"}},"gitHead":"318f672f0e0bd4f584b68f4dd85c9eb0ee5bbadb","scripts":{"lint":"eslint \"{src,test}/**/*.ts\"","test":"vitest run","build":"rm -rf dist tsconfig.build.tsbuildinfo && tsc -p tsconfig.build.json","format":"prettier --check 'src/**/*.ts' 'test/**/*.ts'","release":"release-it","test:cov":"vitest run --coverage","test:e2e":"vitest run test/e2e","test:pack":"bash scripts/pack-smoke.sh","test:unit":"vitest run test/unit","audit:deps":"pnpm audit --prod","format:fix":"prettier --write 'src/**/*.ts' 'test/**/*.ts'","audit:secrets":"gitleaks git --no-banner --redact -v","prepublishOnly":"pnpm build"},"_npmUser":{"name":"camcima","email":"camcima@hotmail.com"},"repository":{"url":"git+https://github.com/camcima/nestjs-deprecation.git","type":"git"},"_npmVersion":"10.9.7","description":"NestJS library for RFC 9745 (Deprecation) and RFC 8594 (Sunset) HTTP response headers, with Swagger and OpenTelemetry integration","directories":{},"sideEffects":false,"_nodeVersion":"22.22.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rxjs":"^7.8.2","eslint":"^10.8.0","vitest":"^4.1.9","globals":"^17.8.0","lefthook":"^2.1.9","prettier":"^3.9.6","@swc/core":"^1.15.47","supertest":"^7.2.2","release-it":"^21.0.0","typescript":"^6.0.3","@types/node":"^26.1.2","@nestjs/core":"^11.1.27","unplugin-swc":"^1.5.9","@nestjs/common":"^11.1.27","@commitlint/cli":"^21.0.2","@nestjs/swagger":"^11.4.6","@nestjs/testing":"^11.1.27","@types/supertest":"^7.2.1","reflect-metadata":"^0.2.2","typescript-eslint":"^8.65.0","@opentelemetry/api":"^1.9.0","@vitest/coverage-v8":"^4.1.9","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.6","@nestjs/platform-express":"^11.1.27","@nestjs/platform-fastify":"^11.1.27","@opentelemetry/sdk-metrics":"^2.10.0","@commitlint/config-conventional":"^21.0.2"},"peerDependencies":{"@nestjs/core":"^10.0.0 || ^11.0.0","@nestjs/common":"^10.0.0 || ^11.0.0","@nestjs/swagger":"^7.0.0 || ^8.0.0 || ^11.0.0","reflect-metadata":"^0.1.13 || ^0.2.0","@opentelemetry/api":">=1.8.0"},"peerDependenciesMeta":{"@nestjs/swagger":{"optional":true},"@opentelemetry/api":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/nestjs-deprecation_1.0.0_1787136197682_0.816947635662701","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@camcima/nestjs-deprecation","version":"1.1.0","keywords":["nestjs","deprecation","sunset","rfc9745","rfc8594","http-headers","api-governance","api-lifecycle"],"author":{"name":"Carlos Cima"},"license":"MIT","_id":"@camcima/nestjs-deprecation@1.1.0","maintainers":[{"name":"camcima","email":"camcima@hotmail.com"}],"homepage":"https://github.com/camcima/nestjs-deprecation#readme","bugs":{"url":"https://github.com/camcima/nestjs-deprecation/issues"},"dist":{"shasum":"6633c866e8e1b6f269244b2a910484309cf64266","tarball":"https://registry.npmjs.org/@camcima/nestjs-deprecation/-/nestjs-deprecation-1.1.0.tgz","fileCount":64,"integrity":"sha512-AcRZCqRQlVXdnABkvZKj3hS0mUx4OCLhJIRhfSPuU3KvHMZbm02k8ahRdBzcx5PtuRCyHAdkSJej/Mm1kVzOKQ==","signatures":[{"sig":"MEYCIQC7V/xQbezlqdchcXErAl5kKemnDXr1yM6aLQbb7+fcjAIhALs9sy4VQTjM8vnVQf+OkJ7abc3aAzsxHXXFbJjcPznG","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":138440},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./otel":{"types":"./dist/otel/index.d.ts","default":"./dist/otel/index.js"},"./swagger":{"types":"./dist/swagger/index.d.ts","default":"./dist/swagger/index.js"}},"gitHead":"a5a461a0da1c73eb7cd554e710311d6aa0e5c0f2","scripts":{"lint":"eslint \"{src,test}/**/*.ts\"","test":"vitest run","build":"rm -rf dist tsconfig.build.tsbuildinfo && tsc -p tsconfig.build.json","format":"prettier --check 'src/**/*.ts' 'test/**/*.ts'","release":"release-it","test:cov":"vitest run --coverage","test:e2e":"vitest run test/e2e","test:pack":"bash scripts/pack-smoke.sh","test:unit":"vitest run test/unit","audit:deps":"pnpm audit --prod","format:fix":"prettier --write 'src/**/*.ts' 'test/**/*.ts'","audit:secrets":"gitleaks git --no-banner --redact -v","prepublishOnly":"pnpm build"},"_npmUser":{"name":"camcima","email":"camcima@hotmail.com"},"repository":{"url":"git+https://github.com/camcima/nestjs-deprecation.git","type":"git"},"_npmVersion":"10.9.7","description":"NestJS library for RFC 9745 (Deprecation) and RFC 8594 (Sunset) HTTP response headers, with Swagger and OpenTelemetry integration","directories":{},"sideEffects":false,"_nodeVersion":"22.22.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.34.5","devDependencies":{"rxjs":"^7.8.2","eslint":"^10.8.0","vitest":"^4.1.9","globals":"^17.8.0","lefthook":"^2.1.9","prettier":"^3.9.6","@swc/core":"^1.15.47","supertest":"^7.2.2","release-it":"^21.0.0","typescript":"^6.0.3","@types/node":"^26.1.2","@nestjs/core":"^11.1.27","unplugin-swc":"^1.5.9","@nestjs/common":"^11.1.27","@commitlint/cli":"^21.0.2","@nestjs/swagger":"^11.4.6","@nestjs/testing":"^11.1.27","@types/supertest":"^7.2.1","reflect-metadata":"^0.2.2","typescript-eslint":"^8.65.0","@opentelemetry/api":"^1.9.0","@vitest/coverage-v8":"^4.1.9","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.6","@nestjs/platform-express":"^11.1.27","@nestjs/platform-fastify":"^11.1.27","@opentelemetry/sdk-metrics":"^2.10.0","@commitlint/config-conventional":"^21.0.2","@release-it/conventional-changelog":"^12.0.0"},"peerDependencies":{"@nestjs/core":"^10.0.0 || ^11.0.0","@nestjs/common":"^10.0.0 || ^11.0.0","@nestjs/swagger":"^7.0.0 || ^8.0.0 || ^11.0.0","reflect-metadata":"^0.1.13 || ^0.2.0","@opentelemetry/api":">=1.8.0"},"peerDependenciesMeta":{"@nestjs/swagger":{"optional":true},"@opentelemetry/api":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/nestjs-deprecation_1.1.0_1787948611141_0.8337009441722072","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@camcima/nestjs-deprecation","version":"1.2.0","keywords":["nestjs","deprecation","sunset","rfc9745","rfc8594","http-headers","api-governance","api-lifecycle"],"author":{"name":"Carlos Cima"},"license":"MIT","_id":"@camcima/nestjs-deprecation@1.2.0","maintainers":[{"name":"camcima","email":"camcima@hotmail.com"}],"homepage":"https://github.com/camcima/nestjs-deprecation#readme","bugs":{"url":"https://github.com/camcima/nestjs-deprecation/issues"},"dist":{"shasum":"6481069045234f69d80e6204605c9561c1b13365","tarball":"https://registry.npmjs.org/@camcima/nestjs-deprecation/-/nestjs-deprecation-1.2.0.tgz","fileCount":64,"integrity":"sha512-liOUGWCUW3T9PS7YrZDo6TLX7rvBl4uojxXWUtOOeUl9uBff8qeicjXuahp80ANM4TL20L8lkTwgdb4QSgy1Zg==","signatures":[{"sig":"MEYCIQCFr66NgCdV7u1vR4IVAIO0WXseR6GZOpZ5OyLjzDplIgIhAN8YbLQRykyp4Z2nfK30Fj1jG3MlN9sc23TYnSdkBeon","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCEXblKhFW72vypjZ81yQEzeARZ+fe5h61qYtbiozGBKwIgLWeI9ByOgkkqQp3xDhwMaPr0Q9FxewTzCHR3zlso2Sc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":139523},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./otel":{"types":"./dist/otel/index.d.ts","default":"./dist/otel/index.js"},"./swagger":{"types":"./dist/swagger/index.d.ts","default":"./dist/swagger/index.js"}},"gitHead":"93062477d08cd803feb1c790850a5533bf49f565","scripts":{"lint":"eslint \"{src,test}/**/*.ts\"","test":"vitest run","build":"rm -rf dist tsconfig.build.tsbuildinfo && tsc -p tsconfig.build.json","format":"prettier --check 'src/**/*.ts' 'test/**/*.ts'","release":"release-it","test:cov":"vitest run --coverage","test:e2e":"vitest run test/e2e","test:pack":"bash scripts/pack-smoke.sh","test:unit":"vitest run test/unit","audit:deps":"pnpm audit --prod","format:fix":"prettier --write 'src/**/*.ts' 'test/**/*.ts'","audit:secrets":"gitleaks git --no-banner --redact -v","prepublishOnly":"pnpm build"},"_npmUser":{"name":"camcima","email":"camcima@hotmail.com"},"repository":{"url":"git+https://github.com/camcima/nestjs-deprecation.git","type":"git"},"_npmVersion":"10.9.7","description":"NestJS library for RFC 9745 (Deprecation) and RFC 8594 (Sunset) HTTP response headers, with Swagger and OpenTelemetry integration","directories":{},"sideEffects":false,"_nodeVersion":"22.22.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.34.5","devDependencies":{"rxjs":"^7.8.2","eslint":"^10.8.0","vitest":"^4.1.11","globals":"^17.8.0","lefthook":"^2.1.9","prettier":"^3.9.6","@swc/core":"^1.15.47","supertest":"^7.2.2","release-it":"^21.0.0","typescript":"^6.0.3","@types/node":"^26.1.2","@nestjs/core":"^12.0.3","unplugin-swc":"^1.5.9","@nestjs/common":"^12.0.3","@commitlint/cli":"^21.0.2","@nestjs/swagger":"^12.0.1","@nestjs/testing":"^12.0.3","@types/supertest":"^7.2.1","reflect-metadata":"^0.2.2","typescript-eslint":"^8.65.0","@opentelemetry/api":"^1.9.0","@vitest/coverage-v8":"^4.1.11","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.6","@nestjs/platform-express":"^12.0.3","@nestjs/platform-fastify":"^12.0.3","@opentelemetry/sdk-metrics":"^2.10.0","@commitlint/config-conventional":"^21.0.2","@release-it/conventional-changelog":"^12.0.0"},"peerDependencies":{"@nestjs/core":"^10.0.0 || ^11.0.0 || ^12.0.0","@nestjs/common":"^10.0.0 || ^11.0.0 || ^12.0.0","@nestjs/swagger":"^7.0.0 || ^8.0.0 || ^11.0.0 || ^12.0.0","reflect-metadata":"^0.1.13 || ^0.2.0","@opentelemetry/api":">=1.8.0"},"peerDependenciesMeta":{"@nestjs/swagger":{"optional":true},"@opentelemetry/api":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/nestjs-deprecation_1.2.0_1789761487673_0.8363426946682277","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"_id":"@camcima/nestjs-deprecation@1.2.1","bugs":{"url":"https://github.com/camcima/nestjs-deprecation/issues"},"dist":{"shasum":"c419ee09535f5a37e8c49b4d91135b26d032d478","tarball":"https://registry.npmjs.org/@camcima/nestjs-deprecation/-/nestjs-deprecation-1.2.1.tgz","fileCount":64,"integrity":"sha512-CwzHsuP0vQrTeVCXVBu2NfQaWy1rsSvfZr0c38vdvNIq4VbJjDT4fSqtC3k9N2Mi8dwDn384jjxUINdHZgXP3A==","signatures":[{"sig":"MEUCIGKQ7j1vqq5HeshmA4kTxdkcVRRksqOyzFSpLWN1U5PkAiEAytSYKyT1wJF4UrfhE1iBbIGqxfw7cMoG6MM5ot9Kvko=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBvQ8ya1f9ew6AlECbk6Yg5p+ocNg3NdNPpTRPy7jl2LAiAnCbd/ceYAdSjXuc1T+ID43vKYrhCQJtewKKzjQ4Ys2g=="}],"unpackedSize":151080},"main":"dist/index.js","name":"@camcima/nestjs-deprecation","types":"dist/index.d.ts","author":{"name":"Carlos Cima"},"engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./otel":{"types":"./dist/otel/index.d.ts","default":"./dist/otel/index.js"},"./swagger":{"types":"./dist/swagger/index.d.ts","default":"./dist/swagger/index.js"}},"gitHead":"41a1ac9dc42be71915e6de92134bd3c820793b0a","license":"MIT","scripts":{"lint":"eslint \"{src,test}/**/*.ts\"","test":"vitest run","build":"rm -rf dist tsconfig.build.tsbuildinfo && tsc -p tsconfig.build.json","format":"prettier --check 'src/**/*.ts' 'test/**/*.ts'","release":"release-it","test:cov":"vitest run --coverage","test:e2e":"vitest run test/e2e","test:pack":"bash scripts/pack-smoke.sh","test:unit":"vitest run test/unit","audit:deps":"pnpm audit --prod","format:fix":"prettier --write 'src/**/*.ts' 'test/**/*.ts'","audit:secrets":"gitleaks git --no-banner --redact -v","prepublishOnly":"pnpm build"},"version":"1.2.1","_npmUser":{"name":"camcima","email":"camcima@hotmail.com"},"homepage":"https://github.com/camcima/nestjs-deprecation#readme","keywords":["nestjs","deprecation","sunset","rfc9745","rfc8594","http-headers","api-governance","api-lifecycle"],"repository":{"url":"git+https://github.com/camcima/nestjs-deprecation.git","type":"git"},"_npmVersion":"10.9.7","description":"NestJS library for RFC 9745 (Deprecation) and RFC 8594 (Sunset) HTTP response headers, with Swagger and OpenTelemetry integration","directories":{},"maintainers":[{"name":"camcima","email":"camcima@hotmail.com"}],"sideEffects":false,"_nodeVersion":"22.22.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.34.5","devDependencies":{"rxjs":"^7.8.2","eslint":"^10.8.0","vitest":"^4.1.11","globals":"^17.8.0","lefthook":"^2.1.9","prettier":"^3.9.6","@swc/core":"^1.15.47","supertest":"^7.2.2","release-it":"^21.0.0","typescript":"^6.0.3","@types/node":"^26.1.2","@nestjs/core":"^12.0.3","unplugin-swc":"^1.5.9","@nestjs/common":"^12.0.3","@commitlint/cli":"^21.0.2","@nestjs/swagger":"^12.0.1","@nestjs/testing":"^12.0.3","@types/supertest":"^7.2.1","reflect-metadata":"^0.2.2","typescript-eslint":"^8.65.0","@opentelemetry/api":"^1.9.0","@vitest/coverage-v8":"^4.1.11","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.6","@nestjs/platform-express":"^12.0.3","@nestjs/platform-fastify":"^12.0.3","@opentelemetry/sdk-metrics":"^2.10.0","@commitlint/config-conventional":"^21.0.2","@release-it/conventional-changelog":"^12.0.0"},"peerDependencies":{"@nestjs/core":"^10.0.0 || ^11.0.0 || ^12.0.0","@nestjs/common":"^10.0.0 || ^11.0.0 || ^12.0.0","@nestjs/swagger":"^7.0.0 || ^8.0.0 || ^11.0.0 || ^12.0.0","reflect-metadata":"^0.1.13 || ^0.2.0","@opentelemetry/api":">=1.8.0"},"peerDependenciesMeta":{"@nestjs/swagger":{"optional":true},"@opentelemetry/api":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nestjs-deprecation_1.2.1_1790509976116_0.5995475316972951"}}},"time":{"created":"2026-07-09T11:30:21.204Z","modified":"2026-09-27T11:52:56.354Z","0.1.0":"2026-07-09T11:30:21.668Z","0.2.0":"2026-07-10T01:15:13.167Z","1.0.0":"2026-08-19T10:43:17.831Z","1.1.0":"2026-08-28T20:23:31.314Z","1.2.0":"2026-09-18T19:58:07.778Z","1.2.1":"2026-09-27T11:52:56.203Z"},"bugs":{"url":"https://github.com/camcima/nestjs-deprecation/issues"},"author":{"name":"Carlos Cima"},"license":"MIT","homepage":"https://github.com/camcima/nestjs-deprecation#readme","keywords":["nestjs","deprecation","sunset","rfc9745","rfc8594","http-headers","api-governance","api-lifecycle"],"repository":{"url":"git+https://github.com/camcima/nestjs-deprecation.git","type":"git"},"description":"NestJS library for RFC 9745 (Deprecation) and RFC 8594 (Sunset) HTTP response headers, with Swagger and OpenTelemetry integration","maintainers":[{"name":"camcima","email":"camcima@hotmail.com"}],"readme":"<div align=\"center\">\n\n<picture>\n  <img alt=\"nestjs-deprecation\" src=\"assets/logo.svg\" width=\"600\">\n</picture>\n\n<br>\n\n[![CI](https://github.com/camcima/nestjs-deprecation/actions/workflows/ci.yml/badge.svg)](https://github.com/camcima/nestjs-deprecation/actions/workflows/ci.yml)\n[![CodeQL](https://github.com/camcima/nestjs-deprecation/actions/workflows/codeql.yml/badge.svg)](https://github.com/camcima/nestjs-deprecation/actions/workflows/codeql.yml)\n[![codecov](https://codecov.io/gh/camcima/nestjs-deprecation/graph/badge.svg)](https://codecov.io/gh/camcima/nestjs-deprecation)\n[![npm version](https://img.shields.io/npm/v/@camcima/nestjs-deprecation)](https://www.npmjs.com/package/@camcima/nestjs-deprecation)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![TypeScript](https://img.shields.io/badge/TypeScript-6-blue.svg)](https://www.typescriptlang.org/)\n[![Node.js](https://img.shields.io/badge/Node.js-20%20%7C%2022%20%7C%2024-green.svg)](https://nodejs.org/)\n\n</div>\n\nNestJS library for RFC 9745 (`Deprecation`) and RFC 8594 (`Sunset`) HTTP response headers — decorator-driven API deprecation with Swagger and OpenTelemetry integration.\n\n## TL;DR\n\nAnnounce that an API endpoint is deprecated — and when it will be switched off — in a standard, machine-readable way, with a single decorator. Consumers learn about it from the response itself instead of a changelog or an email. You also get opt-in Swagger docs and an optional OpenTelemetry metric that answers \"who is _still_ calling this?\" — two extra lines of setup each, see below.\n\n```bash\nnpm install @camcima/nestjs-deprecation\n```\n\n```typescript\nimport { Module, Controller, Get } from '@nestjs/common';\nimport { DeprecationModule, Deprecated } from '@camcima/nestjs-deprecation';\n\n// 1. Register once in your root module.\n@Module({ imports: [DeprecationModule.forRoot()] })\nexport class AppModule {}\n\n// 2. Decorate the endpoint (or the whole controller).\n@Controller('orders')\nexport class OrdersController {\n  @Deprecated({ deprecatedAt: '2026-07-01', sunsetAt: '2027-01-01', successor: '/v2/orders' })\n  @Get()\n  list() {\n    /* ... */\n  }\n}\n```\n\nEvery response from the decorated endpoint now carries:\n\n```\nDeprecation: @1782864000\nSunset: Fri, 01 Jan 2027 00:00:00 GMT\nLink: </v2/orders>; rel=\"successor-version\"\n```\n\nThe library is **strictly informational** — it only adds headers (and optionally fires a telemetry hook); it never changes or blocks endpoint behavior. See [Quick Start](#quick-start) for the full walkthrough.\n\n## Table of Contents\n\n- [What are RFC 9745 / RFC 8594?](#what-are-rfc-9745--rfc-8594)\n- [Installation](#installation)\n- [Quick Start](#quick-start)\n- [Swagger integration](#swagger-integration)\n- [Telemetry](#telemetry)\n- [Strictly informational](#strictly-informational)\n- [Known limitations](#known-limitations)\n- [API Reference](#api-reference)\n- [License](#license)\n\n## What are RFC 9745 / RFC 8594?\n\n[RFC 9745](https://www.rfc-editor.org/rfc/rfc9745) (published 2025) defines the `Deprecation` HTTP response header: a machine-readable signal that a resource has been, or will be, deprecated as of a given date. [RFC 8594](https://www.rfc-editor.org/rfc/rfc8594) defines the companion `Sunset` header: the date after which the resource is expected to stop responding. Together with an RFC 8288 `Link` header pointing clients at deprecation docs and/or a successor endpoint, they give API consumers a standard way to detect and react to deprecations without out-of-band communication (changelogs, emails, Slack messages).\n\nTo our knowledge, `@camcima/nestjs-deprecation` is the first NestJS implementation of RFC 9745.\n\nA deprecated endpoint's response looks like this:\n\n```\nHTTP/1.1 200 OK\nDeprecation: @1782864000\nSunset: Fri, 01 Jan 2027 00:00:00 GMT\nLink: <https://docs.example.com/deprecations/orders-v1>; rel=\"deprecation\", </v2/orders>; rel=\"successor-version\"\n```\n\n- `Deprecation` carries an RFC 9651 structured-field date: `@` followed by a Unix timestamp in seconds.\n- `Sunset` carries an HTTP-date (IMF-fixdate) and is only sent when a sunset date is configured.\n- `Link` carries `rel=\"deprecation\"` (RFC 9745, pointing at documentation) and `rel=\"successor-version\"` (RFC 5829, pointing at the replacement), plus any other relations you add.\n\n## Installation\n\n```bash\nnpm install @camcima/nestjs-deprecation\n```\n\n```bash\npnpm add @camcima/nestjs-deprecation\n```\n\n### Peer dependencies\n\n| Package              | Version                                        | Required                                   |\n| -------------------- | ---------------------------------------------- | ------------------------------------------ |\n| `@nestjs/common`     | `^10.0.0 \\|\\| ^11.0.0 \\|\\| ^12.0.0`            | Yes                                        |\n| `@nestjs/core`       | `^10.0.0 \\|\\| ^11.0.0 \\|\\| ^12.0.0`            | Yes                                        |\n| `reflect-metadata`   | `^0.1.13 \\|\\| ^0.2.0`                          | Yes                                        |\n| `@nestjs/swagger`    | `^7.0.0 \\|\\| ^8.0.0 \\|\\| ^11.0.0 \\|\\| ^12.0.0` | No (optional, for the `./swagger` subpath) |\n| `@opentelemetry/api` | `>=1.8.0`                                      | No (optional, for the `./otel` subpath)    |\n\n### NestJS 12\n\nNestJS 12 ships its packages as ESM only. This library stays CommonJS, so a single build supports NestJS 10, 11 and 12, and it works unchanged in both CommonJS and ESM applications. It adds no requirements beyond those of NestJS 12 itself:\n\n- **Node.js 20.19+ or 22.12+.** CommonJS code, this library included, loads NestJS 12 through `require(esm)`, which Node.js enables by default only from those releases.\n- **AWS Lambda:** set `NODE_OPTIONS=--experimental-require-module`, because Lambda's Node.js runtimes disable `require(esm)` by default.\n\nSee the [NestJS 11 → 12 migration guide](https://docs.nestjs.com/migration-guide) for details.\n\n## Quick Start\n\nRegister `DeprecationModule.forRoot()` once in your root `AppModule`. It registers a global `APP_INTERCEPTOR` that writes deprecation headers on any handler or controller decorated with `@Deprecated()`. Accidentally importing it twice is tolerated — the first interceptor instance to see a request wins and later ones skip it, so headers and telemetry are never duplicated — but register it once, in the root module: which registration runs first follows module resolution order, so with two registrations it is the winner's options (and its `onDeprecatedCall`) that take effect.\n\n```typescript\n// app.module.ts\nimport { Module } from '@nestjs/common';\nimport { DeprecationModule } from '@camcima/nestjs-deprecation';\n\n@Module({\n  imports: [DeprecationModule.forRoot()],\n})\nexport class AppModule {}\n```\n\nDecorate a handler (or an entire controller class) with `@Deprecated()`:\n\n```typescript\nimport { Controller, Get } from '@nestjs/common';\nimport { Deprecated } from '@camcima/nestjs-deprecation';\n\n@Controller('orders')\nexport class OrdersController {\n  @Deprecated({\n    deprecatedAt: '2026-07-01T00:00:00Z',\n    sunsetAt: '2027-01-01T00:00:00Z',\n    link: 'https://docs.example.com/deprecations/orders-v1',\n    successor: '/v2/orders',\n    links: [{ rel: 'latest-version', href: '/v3/orders', type: 'application/json' }],\n    note: 'Use POST /v2/orders',\n  })\n  @Get()\n  list() {\n    /* ... */\n  }\n}\n```\n\nThat produces exactly the response headers shown above:\n\n```\nDeprecation: @1782864000\nSunset: Fri, 01 Jan 2027 00:00:00 GMT\nLink: <https://docs.example.com/deprecations/orders-v1>; rel=\"deprecation\", </v2/orders>; rel=\"successor-version\"\n```\n\n(The `links` escape hatch above adds a third, custom `rel=\"latest-version\"` link into the same header; it is omitted from the example response for brevity. `note` is never sent on the wire — it only surfaces in Swagger docs and in the telemetry event.)\n\n### `@Deprecated()` options\n\n| Option         | Type             | Required | Description                                                                              |\n| -------------- | ---------------- | -------- | ---------------------------------------------------------------------------------------- |\n| `deprecatedAt` | `Date \\| string` | Yes      | When the endpoint is (or will be) deprecated. May be in the future.                      |\n| `sunsetAt`     | `Date \\| string` | No       | When the endpoint stops working. Must not be earlier than `deprecatedAt`.                |\n| `link`         | `string`         | No       | Deprecation documentation URL — emitted as `Link; rel=\"deprecation\"` (RFC 9745).         |\n| `successor`    | `string`         | No       | Replacement endpoint — emitted as `Link; rel=\"successor-version\"` (RFC 5829).            |\n| `links`        | `LinkRelation[]` | No       | Escape hatch for arbitrary RFC 8288 relations, appended after `link`/`successor`.        |\n| `note`         | `string`         | No       | Human note; never sent on the wire. Surfaces in Swagger docs and in the telemetry event. |\n\nBoth dates accept a `Date` or an ISO 8601 string. A string carrying a time **must** include a timezone designator (`2026-07-01T00:00:00Z` or `...+02:00`); without one it would be read in the server's local timezone, making the emitted header depend on where the app runs. Date-only strings (`2026-07-01`) are unambiguous UTC and always fine. Other string forms (`2026-07-01 00:00:00`, `July 1, 2026`, HTTP-dates) and impossible calendar dates (`2026-02-30`) are rejected rather than handed to JavaScript's lenient date parser.\n\nURLs and paths in `link`, `successor` and `links[].href` must be ASCII: percent-encode anything else (`/docs/%E8%BF%81%E7%A7%BB`, not `/docs/迁移`). Node refuses non-ASCII header values, so accepting them would drop the `Link` header on Express and turn the response into a 500 on Fastify. The same applies to `links[].rel` and `links[].type`.\n\nInvalid options — unparseable or untyped dates (including a unix timestamp passed as a number), a `sunsetAt` before `deprecatedAt`, a malformed URL/path, a `links` entry repeating the `link`/`successor` relation — throw **at decoration time**, i.e. when your application boots, rather than on the first matching request, so misconfiguration fails loudly and early. `@Deprecated()` can decorate a single handler method or an entire controller class; a method-level decorator overrides a class-level one on that method. Applying it to anything else (a getter, a property, a static method) throws too, rather than silently doing nothing.\n\n### Async configuration\n\n```typescript\nDeprecationModule.forRootAsync({\n  imports: [ConfigModule],\n  inject: [ConfigService],\n  useFactory: (config: ConfigService) => ({\n    enabled: config.get<boolean>('DEPRECATION_HEADERS_ENABLED', true),\n  }),\n});\n```\n\n`forRootAsync` also accepts `useClass` or `useExisting`, pointing at a class that implements `DeprecationOptionsFactory`:\n\n```typescript\nimport { DeprecationModuleOptions, DeprecationOptionsFactory } from '@camcima/nestjs-deprecation';\n\n@Injectable()\nexport class DeprecationConfig implements DeprecationOptionsFactory {\n  constructor(private readonly config: ConfigService) {}\n\n  createDeprecationOptions(): DeprecationModuleOptions {\n    return { enabled: this.config.get<boolean>('DEPRECATION_HEADERS_ENABLED', true) };\n  }\n}\n\nDeprecationModule.forRootAsync({ imports: [ConfigModule], useClass: DeprecationConfig });\n```\n\n`DeprecationModuleOptions` accepts:\n\n| Option             | Type                               | Default | Description                                                                                                                                                                                                                                                            |\n| ------------------ | ---------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `enabled`          | `boolean`                          | `true`  | Kill switch. `forRoot({ enabled: false })` does not register the interceptor at all, so it costs nothing per request; `forRootAsync` resolves the flag at runtime and short-circuits instead.                                                                          |\n| `onDeprecatedCall` | `(event) => void \\| Promise<void>` | —       | Invoked on every request to a deprecated endpoint, inline before the handler runs. See [Telemetry](#telemetry). Errors — thrown synchronously or via a rejected promise — are caught and logged; they never affect the response. Defer slow work off the request path. |\n\n## Swagger integration\n\nThe `./swagger` subpath is optional and requires `@nestjs/swagger` (already a common dependency in NestJS apps). It discovers every `@Deprecated()`-decorated controller/handler via `DiscoveryService` and:\n\n1. Sets `deprecated: true` on the OpenAPI operation.\n2. Appends a generated Markdown block to the operation description (deprecation date, sunset date, `note`, links) — merged with, not clobbering, any `@ApiOperation()` you already applied.\n3. Documents the `Deprecation` / `Sunset` / `Link` response headers with example values on every response of the operation.\n4. Stamps the `x-sunset` extension on the operation when `sunsetAt` is set, so diff tools can enforce the deprecation window (see [Breaking-change detection](#breaking-change-detection-x-sunset)).\n\nAdd `DiscoveryModule` (from `@nestjs/core`) to your application module, create the OpenAPI document, and pass it through `applyDeprecationDocs(document, app)`. The transform mutates and returns the given document instance only — it never touches decorator metadata, so you can build multiple differently-filtered documents in any order and each one is independent.\n\n```typescript\n// app.module.ts\nimport { Module } from '@nestjs/common';\nimport { DiscoveryModule } from '@nestjs/core';\nimport { DeprecationModule } from '@camcima/nestjs-deprecation';\n\n@Module({\n  imports: [DiscoveryModule, DeprecationModule.forRoot()],\n})\nexport class AppModule {}\n```\n\n```typescript\n// main.ts\nimport { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';\nimport { applyDeprecationDocs } from '@camcima/nestjs-deprecation/swagger';\n\nconst config = new DocumentBuilder().setTitle('My API').build();\nconst document = SwaggerModule.createDocument(app, config);\n\nSwaggerModule.setup('/api', app, applyDeprecationDocs(document, app));\n```\n\n`applyDeprecationDocs(document, app, options?)` accepts an optional `filter` callback to skip specific controllers per document (and `xSunset`, below):\n\n```typescript\nconst publicDocument = applyDeprecationDocs(SwaggerModule.createDocument(app, config), app, {\n  filter: (controller) => controller.name !== 'InternalController',\n});\n```\n\nIf `DiscoveryModule` is not imported, `applyDeprecationDocs` throws a clear setup error naming the fix, rather than failing silently.\n\nRoutes are matched by recomputing each handler's route path the way Nest's router builds it. An application-wide `setGlobalPrefix()`, URI versioning (`enableVersioning({ type: VersioningType.URI })`, including custom prefixes, `defaultVersion`, handler-level `@Version()`, multiple versions and `VERSION_NEUTRAL`) and `RouterModule` paths are all read from the application and applied exactly, so a deprecated `/v1/orders` never marks a version-neutral `/orders` instead. Handlers inherited from a base controller class are documented like any other. Paths using route parameters, named wildcards (`*splat`), or optional-parameter groups (`{/:id}`) are translated to their OpenAPI form, and request methods beyond the OpenAPI eight (such as `SEARCH`) are covered. Handlers whose document path still cannot be resolved (e.g. custom versioning) fall back to an unambiguous suffix match, and are skipped with a logged warning rather than mis-annotated. One caveat: for documents built with the `include` option, a deprecated route excluded from the document can suffix-match a similarly named route from another module — prefer filtering with the `filter` callback (which skips the controller entirely) over relying on `include` alone.\n\n### Breaking-change detection (`x-sunset`)\n\nDeprecating an operation is not a breaking change; **removing** it is. [oasdiff](https://github.com/oasdiff/oasdiff) — and other tools that diff two OpenAPI documents in CI — resolve that by reading an `x-sunset` extension alongside `deprecated: true`, and treating removal before that date as breaking:\n\n```yaml\n/orders:\n  get:\n    deprecated: true\n    x-sunset: '2027-01-01'\n```\n\n`applyDeprecationDocs` emits it for you from the `sunsetAt` you already passed to `@Deprecated()` — there is nothing extra to declare, and the extension cannot drift from the `Sunset` header or the description block, because all three derive from the same frozen value. The value is an RFC 3339 full-date (`YYYY-MM-DD`), the form oasdiff documents.\n\nIt is on by default: `x-sunset` is an inert OpenAPI extension, ignored by tooling that does not recognize it, and nothing about it reaches the wire. Opt out with `xSunset: false`, and note that an `x-sunset` you authored yourself (e.g. via `@ApiExtension()`) is left untouched:\n\n```typescript\napplyDeprecationDocs(document, app, { xSunset: false });\n```\n\nTwo caveats. Operations deprecated **without** a `sunsetAt` get no `x-sunset` — which is correct, but under oasdiff's `--deprecation-days-stable` / `--deprecation-days-beta` grace-period enforcement the extension is _mandatory_, so those endpoints will fail that check until you give them a sunset date. And oasdiff currently reads `x-sunset` [only at the operation level](https://github.com/oasdiff/oasdiff/discussions/642); a class-level `@Deprecated()` is fine, since it is stamped onto each of that controller's operations.\n\n`applyDeprecationDocs` is independent of the `enabled` kill switch: it decorates the OpenAPI document at build time regardless of the runtime `enabled` setting, so if you disable the interceptor at runtime, stop calling `applyDeprecationDocs` too, to keep docs and runtime behavior in sync.\n\n## Telemetry\n\n`DeprecationModuleOptions.onDeprecatedCall` fires once per request to a deprecated endpoint, after the response headers are written:\n\n```typescript\ninterface DeprecatedCallEvent {\n  method: string;\n  route: string; // route PATTERN, e.g. \"/orders/:id\" — not the concrete URL, to keep metric cardinality low\n  controllerName: string;\n  handlerName: string;\n  metadata: DeprecationMetadata; // the frozen, precomputed decorator options\n  isPastSunset: boolean;\n}\n```\n\nUse it for logging, custom metrics, or any sink you like:\n\n```typescript\nDeprecationModule.forRoot({\n  onDeprecatedCall: (event) => {\n    myMetrics.increment('deprecated_requests', { route: event.route });\n  },\n});\n```\n\n### `./otel` — ready-made OpenTelemetry listener\n\nThe `./otel` subpath is optional and requires `@opentelemetry/api`. It calls only the OTel API (never creates or configures a `MeterProvider`) and defaults to the global meter registry:\n\n```typescript\nimport { DeprecationModule } from '@camcima/nestjs-deprecation';\nimport { createOtelDeprecationListener } from '@camcima/nestjs-deprecation/otel';\n\nDeprecationModule.forRoot({\n  onDeprecatedCall: createOtelDeprecationListener(),\n});\n```\n\nPass an explicit `meterProvider` if you don't want the global one:\n\n```typescript\ncreateOtelDeprecationListener({ meterProvider });\n```\n\nThis registers a counter named `http.server.deprecated_requests` with attributes:\n\n| Attribute                 | Type      | Notes                                                                                                                      |\n| ------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------- |\n| `http.request.method`     | `string`  | e.g. `\"GET\"`                                                                                                               |\n| `http.route`              | `string`  | route pattern, e.g. `\"/orders/:id\"`                                                                                        |\n| `deprecation.past_sunset` | `boolean` | whether the current time is past the configured sunset date                                                                |\n| `deprecation.sunset_date` | `string`  | ISO 8601 sunset date; **omitted** when no `sunsetAt` is set (keeps cardinality low — one value per route, not per request) |\n\n## Strictly informational\n\n`@camcima/nestjs-deprecation` never changes endpoint behavior — not before the deprecation date, not after the sunset date. This is the purest reading of RFC 9745: \"the act of deprecation does not change any behavior of the resource.\" There is no 410-enforcement mode, no brownout/probabilistic-failure mode, and no request blocking of any kind; the library only ever adds response headers and (optionally) fires a telemetry callback.\n\nEnforcement behaviors like returning `410 Gone` past sunset, or scheduled brownouts, were deliberately considered and left out of scope. If you need enforcement, build it on top of the `onDeprecatedCall`/`isPastSunset` hook rather than expecting this library to do it for you.\n\n## Known limitations\n\n- **Guards run before interceptors.** A request rejected by a guard (401/403 from auth, 429 from throttling) never reaches the interceptor, so it carries no `Deprecation`/`Sunset`/`Link` headers and fires no `onDeprecatedCall` event. Clients whose credentials have expired — often the stalest integrations, and the ones most likely to be on a deprecated endpoint — will not see the signal, and migration dashboards undercount deprecated traffic by the guard-rejected share.\n- **Decorator composition.** The metadata is stored on the handler function itself. A third-party decorator that _replaces_ `descriptor.value` with a wrapper (rather than mutating it in place, as Nest's own decorators do) and is applied after `@Deprecated()` will drop the metadata, silently un-deprecating the endpoint. If you compose with wrapping decorators, keep `@Deprecated()` above them.\n- **Header write ordering.** The interceptor writes the `Deprecation`/`Sunset`/`Link` headers _before_ calling the route handler (`next.handle()`), so that they still land on thrown exceptions and streaming responses. A consequence: anything that sets a `Link` header _after_ that point — e.g. inside the handler body itself, or in an interceptor registered to run closer to the handler — will overwrite rather than merge with the deprecation `Link` value. Middleware or an interceptor registered _before_ `DeprecationModule`'s (so it runs first) is appended to correctly instead of overwritten.\n\n## API Reference\n\n| Export                          | Kind             | Description                                                                                       |\n| ------------------------------- | ---------------- | ------------------------------------------------------------------------------------------------- |\n| `Deprecated`                    | Decorator        | Method or class decorator; emits `DeprecatedOptions` as metadata                                  |\n| `DeprecationModule`             | Class            | Dynamic module. Use `forRoot(options?)` or `forRootAsync(options)`                                |\n| `DeprecationInterceptor`        | Injectable class | Global interceptor registered by `DeprecationModule`; writes headers and fires `onDeprecatedCall` |\n| `DeprecatedOptions`             | Interface        | Options accepted by `@Deprecated()`                                                               |\n| `DeprecationMetadata`           | Interface        | Precomputed, frozen wire values stored as Reflect metadata                                        |\n| `DeprecatedCallEvent`           | Interface        | Shape of the event passed to `onDeprecatedCall`                                                   |\n| `DeprecatedCallListener`        | Type             | `` `(event: DeprecatedCallEvent) => void \\| Promise<void>` ``                                     |\n| `DeprecationModuleOptions`      | Interface        | Options accepted by `forRoot()`                                                                   |\n| `DeprecationModuleAsyncOptions` | Interface        | Options accepted by `forRootAsync()` (`useFactory`, `useClass`, or `useExisting`)                 |\n| `DeprecationOptionsFactory`     | Interface        | Implemented by the class given to `forRootAsync({ useClass })` / `({ useExisting })`              |\n| `LinkRelation`                  | Interface        | `{ rel: string; href: string; type?: string }` — one entry in `links`                             |\n| `DEPRECATION_METADATA_KEY`      | Constant         | Reflect metadata key under which `@Deprecated()` stores `DeprecationMetadata`                     |\n| `DEPRECATION_MODULE_OPTIONS`    | Symbol           | DI token for the module options                                                                   |\n\n**Swagger subpath** (`@camcima/nestjs-deprecation/swagger`):\n\n| Export                        | Kind      | Description                                                                                                                                                                                                 |\n| ----------------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `applyDeprecationDocs`        | Function  | Transforms the given OpenAPI document: marks `@Deprecated()` operations deprecated and documents their response headers. Signature: `applyDeprecationDocs(document, app, options?)` → returns the document. |\n| `DeprecationDocumentLike`     | Interface | Minimal structural view of the OpenAPI document accepted by `applyDeprecationDocs`                                                                                                                          |\n| `ApplyDeprecationDocsOptions` | Interface | Options for `applyDeprecationDocs` (`filter`)                                                                                                                                                               |\n| `DiscoveredController`        | Interface | Structural controller view passed to the `filter` option                                                                                                                                                    |\n\n**OTel subpath** (`@camcima/nestjs-deprecation/otel`):\n\n| Export                           | Kind      | Description                                                            |\n| -------------------------------- | --------- | ---------------------------------------------------------------------- |\n| `createOtelDeprecationListener`  | Function  | Returns an `onDeprecatedCall` listener that increments an OTel counter |\n| `OtelDeprecationListenerOptions` | Interface | Options for `createOtelDeprecationListener` (`meterProvider`)          |\n| `DEPRECATED_REQUESTS_METRIC`     | Constant  | `'http.server.deprecated_requests'`                                    |\n\n## License\n\n[MIT](./LICENSE)\n","readmeFilename":"README.md"}