{"_id":"@callsy/http-kit","_rev":"9-7c775e9f18bf7eaac731b3e0e57388b8","name":"@callsy/http-kit","dist-tags":{"latest":"1.5.0"},"versions":{"1.0.0":{"name":"@callsy/http-kit","version":"1.0.0","author":{"name":"Laimonas Sutkus"},"license":"ISC","_id":"@callsy/http-kit@1.0.0","maintainers":[{"name":"laimonassutkus","email":"laimonas@callsy.ai"}],"homepage":"https://github.com/CallsyAI/http-kit#readme","bugs":{"url":"https://github.com/CallsyAI/http-kit/issues"},"dist":{"shasum":"e428f5350182c68f34b98d2df185eb78d19b0435","tarball":"https://registry.npmjs.org/@callsy/http-kit/-/http-kit-1.0.0.tgz","fileCount":215,"integrity":"sha512-mhMoQbtIXLfsudFUCRA2Pr0MU5XpbC+hAe6YnV2GmfnAt9+cMmtFhZ0KeuGebcISRdcDO9B2tLcX4V77omu4oQ==","signatures":[{"sig":"MEUCIDxACLzYL5SHw6nusyN/450qre2zj+eBfJCN+zCXzI6vAiEAyIjCmr/37yg7meqED5SR8sbQEGdqD66naGxrgp2c/m0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":254623},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"330fd443db33e6e09f2083bffff8258402e6b905","scripts":{"test":"vitest run","build":"tsc","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"laimonassutkus","email":"laimonas@callsy.ai"},"repository":{"url":"git+ssh://git@github.com/CallsyAI/http-kit.git","type":"git"},"_npmVersion":"11.5.1","description":"HTTP client utilities and custom error handling.","directories":{},"_nodeVersion":"24.7.0","dependencies":{"axios":"^1.10.0","dot-prop":"^9.0.0","axios-retry":"^4.5.0","axios-cache-interceptor":"^1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.7.0","vitest":"^2.1.8","@vitest/ui":"^2.1.8","typescript":"^5.7.2","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/http-kit_1.0.0_1768853238658_0.13362920099373699","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@callsy/http-kit","version":"1.0.1","author":{"name":"Laimonas Sutkus"},"license":"ISC","_id":"@callsy/http-kit@1.0.1","maintainers":[{"name":"laimonassutkus","email":"laimonas@callsy.ai"}],"homepage":"https://github.com/CallsyAI/http-kit#readme","bugs":{"url":"https://github.com/CallsyAI/http-kit/issues"},"dist":{"shasum":"e34301ee5b1ae4a30993d9c9c16319790192fafb","tarball":"https://registry.npmjs.org/@callsy/http-kit/-/http-kit-1.0.1.tgz","fileCount":215,"integrity":"sha512-Uhop0GeTpJxbIUT3xOPTV8CdY6WCggMRgbwI7IXYg1YcdhYvHei7b6kMORi3+oviAZuwBqJbfiCgKo1DiPsqAw==","signatures":[{"sig":"MEYCIQDnzZ5mv1HCvourpzk8+hsCg0POA2vBRjv9OsXKi8WVOgIhAKm0tDDL0W+Sr1KHexYZtC4Zo4Dbc/RgXqXc2bQbVwSJ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":256388},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"64e90ff82f011b2d55feb2c0f55ba96ee54be074","scripts":{"test":"vitest run","build":"tsc","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"laimonassutkus","email":"laimonas@callsy.ai"},"repository":{"url":"git+ssh://git@github.com/CallsyAI/http-kit.git","type":"git"},"_npmVersion":"11.5.1","description":"HTTP client utilities and custom error handling.","directories":{},"_nodeVersion":"24.7.0","dependencies":{"axios":"^1.10.0","dot-prop":"^9.0.0","axios-retry":"^4.5.0","axios-cache-interceptor":"^1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.7.0","vitest":"^2.1.8","@vitest/ui":"^2.1.8","typescript":"^5.7.2","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/http-kit_1.0.1_1768856445358_0.499673645367106","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@callsy/http-kit","version":"1.1.0","author":{"name":"Laimonas Sutkus"},"license":"ISC","_id":"@callsy/http-kit@1.1.0","maintainers":[{"name":"laimonassutkus","email":"laimonas@callsy.ai"}],"homepage":"https://github.com/CallsyAI/http-kit#readme","bugs":{"url":"https://github.com/CallsyAI/http-kit/issues"},"dist":{"shasum":"25f9b4f4ac420285aa22e0bd0e97bcb60388b07e","tarball":"https://registry.npmjs.org/@callsy/http-kit/-/http-kit-1.1.0.tgz","fileCount":215,"integrity":"sha512-0z2Y0BjeJja+Z1rhPjcDnPNEJGfntQByww7Xfv6U1bQsZeh9K8H6jKXSTzQ1iXvpFU1RCWELdKTv7Rgf+J7C5g==","signatures":[{"sig":"MEQCIBu7oAUyJJYTZ2hYcrJ9Zohu6lSf0wQ8jrQEMGboUELBAiByzj1/5LVqFqpieIz1AH/iudXPaM21xtLVT1/510H7jg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":267424},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"31bc03ddad23619bf9d0c2e78d83f7fe9bcde221","scripts":{"test":"vitest run","build":"tsc","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"laimonassutkus","email":"laimonas@callsy.ai"},"repository":{"url":"git+ssh://git@github.com/CallsyAI/http-kit.git","type":"git"},"_npmVersion":"11.5.1","description":"HTTP client utilities and custom error handling.","directories":{},"_nodeVersion":"24.7.0","dependencies":{"axios":"^1.10.0","dot-prop":"^9.0.0","axios-retry":"^4.5.0","axios-cache-interceptor":"^1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.7.0","vitest":"^2.1.8","@vitest/ui":"^2.1.8","typescript":"^5.7.2","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/http-kit_1.1.0_1768901320967_0.3175074944028482","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@callsy/http-kit","version":"1.2.0","author":{"name":"Laimonas Sutkus"},"license":"ISC","_id":"@callsy/http-kit@1.2.0","maintainers":[{"name":"laimonassutkus","email":"laimonas@callsy.ai"}],"homepage":"https://github.com/CallsyAI/http-kit#readme","bugs":{"url":"https://github.com/CallsyAI/http-kit/issues"},"dist":{"shasum":"5e4649e5d27c18f1f1215559434ae518ee892359","tarball":"https://registry.npmjs.org/@callsy/http-kit/-/http-kit-1.2.0.tgz","fileCount":215,"integrity":"sha512-iIXWFus942T/HogARg2Tyu5zLB1amW/Bohmt2LOAitR5Sj6aBVfp+0QFonKAc/H9pLvw0qP8IRM0XhNLc4L/MQ==","signatures":[{"sig":"MEQCIALpwiujXcuqfLNO36wgpJvoFI7MsGDobEkzRBCixb5YAiB6EX0r74GkGZbXlUEEL1d32r+Mx36NKb3AxR33yQLaSA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":246754},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"31bc03ddad23619bf9d0c2e78d83f7fe9bcde221","scripts":{"test":"vitest run","build":"tsc","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"laimonassutkus","email":"laimonas@callsy.ai"},"repository":{"url":"git+ssh://git@github.com/CallsyAI/http-kit.git","type":"git"},"_npmVersion":"11.5.1","description":"HTTP client utilities and custom error handling.","directories":{},"_nodeVersion":"24.7.0","dependencies":{"axios":"^1.10.0","dot-prop":"^9.0.0","axios-retry":"^4.5.0","axios-cache-interceptor":"^1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.7.0","vitest":"^2.1.8","@vitest/ui":"^2.1.8","typescript":"^5.7.2","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/http-kit_1.2.0_1768906435522_0.6964804270145395","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@callsy/http-kit","version":"1.3.0","author":{"name":"Laimonas Sutkus"},"license":"ISC","_id":"@callsy/http-kit@1.3.0","maintainers":[{"name":"laimonassutkus","email":"laimonas@callsy.ai"}],"homepage":"https://github.com/CallsyAI/http-kit#readme","bugs":{"url":"https://github.com/CallsyAI/http-kit/issues"},"dist":{"shasum":"81c0e2eada268560c2be6522c39601e7ce855ea7","tarball":"https://registry.npmjs.org/@callsy/http-kit/-/http-kit-1.3.0.tgz","fileCount":215,"integrity":"sha512-KOG39AHG0Hapi/qho5emMKS4R3OH90V2oamz4CnAx6oCWzMx94nPO4wNjgENPQZlG9Hw6IffWYjBJzOfr1Dmfg==","signatures":[{"sig":"MEYCIQDYllui8BKC2up6/F6hT/Th25qDLoE9sZy6zB2JTQf8eAIhAPtpxBP3wr0MYSwmz0QZxjcYZ5qtW9xNTUW555MERFmo","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":247419},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"6647ef89def417c67d6c8988b3b04fa396897154","scripts":{"test":"vitest run","build":"tsc","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"laimonassutkus","email":"laimonas@callsy.ai"},"repository":{"url":"git+ssh://git@github.com/CallsyAI/http-kit.git","type":"git"},"_npmVersion":"11.5.1","description":"HTTP client utilities and custom error handling.","directories":{},"_nodeVersion":"24.7.0","dependencies":{"axios":"^1.10.0","dot-prop":"^9.0.0","axios-retry":"^4.5.0","axios-cache-interceptor":"^1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.7.0","vitest":"^2.1.8","@vitest/ui":"^2.1.8","typescript":"^5.7.2","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/http-kit_1.3.0_1768907429883_0.5353672349356247","host":"s3://npm-registry-packages-npm-production"}},"1.3.1":{"name":"@callsy/http-kit","version":"1.3.1","author":{"name":"Laimonas Sutkus"},"license":"ISC","_id":"@callsy/http-kit@1.3.1","maintainers":[{"name":"laimonassutkus","email":"laimonas@callsy.ai"}],"homepage":"https://github.com/CallsyAI/http-kit#readme","bugs":{"url":"https://github.com/CallsyAI/http-kit/issues"},"dist":{"shasum":"35e00ba8fc5020425611e7f4a3f5c8e23be05b14","tarball":"https://registry.npmjs.org/@callsy/http-kit/-/http-kit-1.3.1.tgz","fileCount":219,"integrity":"sha512-9GrMBeT2hKRbwjBGX/c23TJrHaLMtPV6ediI7I+OnUJBYQDI2hoMZTvi0lYlCRn438sgFBkH5n5ZEqWGJ3Vucw==","signatures":[{"sig":"MEQCICRw2QwhdA9rIl2/gfmiCPkV4yR4Dyflz7tKzNoG75xdAiAm+dEHZWGR8p5o/t476jreEw9RFiLgxqhPTfycGdVlLw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":255013},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"d1bd5ec2bb74d881fc2ae510a1a4dd7bc8e4ac78","scripts":{"test":"vitest run","build":"tsc","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"laimonassutkus","email":"laimonas@callsy.ai"},"repository":{"url":"git+ssh://git@github.com/CallsyAI/http-kit.git","type":"git"},"_npmVersion":"11.5.1","description":"HTTP client utilities and custom error handling.","directories":{},"_nodeVersion":"24.7.0","dependencies":{"axios":"^1.10.0","dot-prop":"^9.0.0","axios-retry":"^4.5.0","axios-cache-interceptor":"^1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.7.0","vitest":"^2.1.8","@vitest/ui":"^2.1.8","typescript":"^5.7.2","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/http-kit_1.3.1_1770379595709_0.6851646354554568","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"name":"@callsy/http-kit","version":"1.4.0","author":{"name":"Laimonas Sutkus"},"license":"ISC","_id":"@callsy/http-kit@1.4.0","maintainers":[{"name":"laimonassutkus","email":"laimonas@callsy.ai"}],"homepage":"https://github.com/CallsyAI/http-kit#readme","bugs":{"url":"https://github.com/CallsyAI/http-kit/issues"},"dist":{"shasum":"47a1ff0ff2d95ad8db147c153fbb76f3779971fb","tarball":"https://registry.npmjs.org/@callsy/http-kit/-/http-kit-1.4.0.tgz","fileCount":219,"integrity":"sha512-5EWU3G3gtNhMK4+NcWLI30DCReZHTZ8FLEKLp1FA66XphFrm/JQJQ/pdw+aV/9gKQcmY3VPuD1f2zsL8tN4iog==","signatures":[{"sig":"MEUCIEiJlxz29/PcvzxcApwKjQVuXv/pL67i/WW+ks17HiN9AiEAtVqvHQUriacfuukV/18gATzkyKYTM4G2F79urfFjAxY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":276949},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"339dfe1c1915bb02b619c990727c06b9d73467a7","scripts":{"test":"vitest run","build":"tsc","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"laimonassutkus","email":"laimonas@callsy.ai"},"repository":{"url":"git+ssh://git@github.com/CallsyAI/http-kit.git","type":"git"},"_npmVersion":"11.5.1","description":"HTTP client utilities and custom error handling.","directories":{},"_nodeVersion":"24.7.0","dependencies":{"axios":"^1.10.0","dot-prop":"^9.0.0","axios-retry":"^4.5.0","axios-cache-interceptor":"^1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.7.0","vitest":"^2.1.8","@vitest/ui":"^2.1.8","typescript":"^5.7.2","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/http-kit_1.4.0_1772530279873_0.34133950248552614","host":"s3://npm-registry-packages-npm-production"}},"1.4.1":{"name":"@callsy/http-kit","version":"1.4.1","author":{"name":"Laimonas Sutkus"},"license":"ISC","_id":"@callsy/http-kit@1.4.1","maintainers":[{"name":"laimonassutkus","email":"laimonas@callsy.ai"}],"homepage":"https://github.com/CallsyAI/http-kit#readme","bugs":{"url":"https://github.com/CallsyAI/http-kit/issues"},"dist":{"shasum":"9374a4272b9ae3e2e381ca4753761e196e937533","tarball":"https://registry.npmjs.org/@callsy/http-kit/-/http-kit-1.4.1.tgz","fileCount":219,"integrity":"sha512-ib7XXZMtOfGy2cOFdfkXVMVvsfTL2kjTZ2zE0tZovDCPy2fSz+alIA1OjFItk8OGHUwR1PcRtPuH/f5okxkxww==","signatures":[{"sig":"MEUCIQC7A8pwKdOB7PKBHmzm5IN9fShUf5MSPaq8qUhWKxYdYwIgFgc5idIFRQehYKnSP7hewrdmGOikoTwe8iXrUFSqK2A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":276951},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"339dfe1c1915bb02b619c990727c06b9d73467a7","scripts":{"test":"vitest run","build":"tsc","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"laimonassutkus","email":"laimonas@callsy.ai"},"repository":{"url":"git+ssh://git@github.com/CallsyAI/http-kit.git","type":"git"},"_npmVersion":"11.5.1","description":"HTTP client utilities and custom error handling.","directories":{},"_nodeVersion":"24.7.0","dependencies":{"axios":"^1.10.0","dot-prop":"^9.0.0","axios-retry":"^4.5.0","axios-cache-interceptor":"^1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.7.0","vitest":"^2.1.8","@vitest/ui":"^2.1.8","typescript":"^5.7.2","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/http-kit_1.4.1_1779085162850_0.2219318346305288","host":"s3://npm-registry-packages-npm-production"}},"1.5.0":{"_id":"@callsy/http-kit@1.5.0","bugs":{"url":"https://github.com/CallsyAI/http-kit/issues"},"dist":{"shasum":"adbd670cc84a0f6af80ae43fb631bf1a001cd1f4","tarball":"https://registry.npmjs.org/@callsy/http-kit/-/http-kit-1.5.0.tgz","fileCount":219,"integrity":"sha512-0r/8g5EY8oV/kYWWuwQo8uj+do9H6p5//iqa6YX88qv+KFxDpr2BBTIr5gJ+BCOZ3CRb6K311KcK16bjYHGXuw==","signatures":[{"sig":"MEUCIQC8MCaQt/jl5v1hB7JweoDGkIKLEdU2WbCvO8VmQm28vAIgBnoeiaqEyfl7Ai0Lof1IvKrz2XiR3XqmusW7wLc5wJw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCUJVh55OO8/QbQhDfUSfEV7z14ebo/ahvlr/UX4GKG2wIhAOzuGhR1JIPzuBFG/MX/G+dyRnFZYD3ouUYpa/jtaNdh"}],"unpackedSize":278365},"main":"dist/index.js","name":"@callsy/http-kit","type":"module","types":"dist/index.d.ts","author":{"name":"Laimonas Sutkus"},"engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"ad781901c4e5c99dc40241e3106e8ec8f8de2faf","license":"ISC","scripts":{"test":"vitest run","build":"tsc","test:watch":"vitest","prepublishOnly":"npm run build"},"version":"1.5.0","_npmUser":{"name":"laimonassutkus","email":"laimonas@callsy.ai"},"homepage":"https://github.com/CallsyAI/http-kit#readme","repository":{"url":"git+ssh://git@github.com/CallsyAI/http-kit.git","type":"git"},"_npmVersion":"11.5.1","description":"HTTP client utilities and custom error handling.","directories":{},"maintainers":[{"name":"laimonassutkus","email":"laimonas@callsy.ai"}],"_nodeVersion":"24.7.0","dependencies":{"axios":"^1.10.0","dot-prop":"^9.0.0","axios-retry":"^4.5.0","axios-cache-interceptor":"^1.11.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.7.0","vitest":"^2.1.8","@vitest/ui":"^2.1.8","typescript":"^5.7.2","@types/node":"^20.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/http-kit_1.5.0_1789763442604_0.5874997004452425"}}},"time":{"created":"2026-01-19T20:07:18.567Z","modified":"2026-09-18T20:30:42.958Z","1.0.0":"2026-01-19T20:07:18.832Z","1.0.1":"2026-01-19T21:00:45.500Z","1.1.0":"2026-01-20T09:28:41.145Z","1.2.0":"2026-01-20T10:53:55.670Z","1.3.0":"2026-01-20T11:10:30.027Z","1.3.1":"2026-02-06T12:06:35.924Z","1.4.0":"2026-03-03T09:31:20.024Z","1.4.1":"2026-05-18T06:19:23.020Z","1.5.0":"2026-09-18T20:30:42.700Z"},"bugs":{"url":"https://github.com/CallsyAI/http-kit/issues"},"author":{"name":"Laimonas Sutkus"},"license":"ISC","homepage":"https://github.com/CallsyAI/http-kit#readme","repository":{"url":"git+ssh://git@github.com/CallsyAI/http-kit.git","type":"git"},"description":"HTTP client utilities and custom error handling.","maintainers":[{"name":"laimonassutkus","email":"laimonas@callsy.ai"}],"readme":"# @callsy/http-kit\n\nA powerful and fluent HTTP client toolkit for Node.js, built on top of Axios. It simplifies creating robust and resilient HTTP clients with built-in caching, automatic retries, and intelligent error handling.\n\n## Features\n\n- **Fluent Builder**: A clean, chainable API for constructing `axios` instances.\n- **Smart Error Handling**: Automatically map HTTP error responses to custom, serializable error classes.\n- **Automatic Retries**: Built-in, configurable retry mechanism for transient network and server errors.\n- **Request Caching**: Out-of-the-box caching for `GET` requests to improve performance.\n- **TypeScript Ready**: Fully typed for a great developer experience.\n\n## Installation\n\n```bash\nnpm install @callsy/http-kit\n```\n\n## Quick Start\n\nCreate a configured client, make a request, and automatically catch a typed, custom error.\n\n```typescript\nimport {\n  Builder,\n  ErrorMap,\n  ExternalApiError,\n  InvalidInputError,\n  CustomError\n} from '@callsy/http-kit';\n\n// 1. Define how errors should be mapped\nconst errorMap = new ErrorMap()\n  .withError(InvalidInputError, [400]) // Map 400 status to InvalidInputError\n  .withDefault(ExternalApiError); // Use ExternalApiError for all other errors\n\n// 2. Build a new HTTP client instance\nconst httpClient = new Builder()\n  .withDefaults({ baseURL: 'https://api.example.com' })\n  .withRetry(3) // Retry failed requests up to 3 times\n  .withCache(60) // Cache GET requests for 60 seconds\n  .withErrorMapping(errorMap)\n  .build();\n\n// 3. Use the client and handle errors\nasync function getUser(id: string) {\n  try {\n    const response = await httpClient.get(`/users/${id}`);\n    return response.data;\n  } catch (error) {\n    if (CustomError.isError(error)) {\n      // 'error' is now a typed CustomError instance (e.g., InvalidInputError)\n      console.error(error.getTitle()); // \"Bad Request\"\n      console.error(error.getMessage()); // \"The server cannot process the request...\"\n      // You can now handle the specific error type\n    } else {\n      // Handle non-custom errors (e.g., network issues)\n      console.error('An unknown error occurred', error);\n    }\n  }\n}\n```\n\n## Core Concepts\n\n### The Fluent Builder\n\nThe `Builder` provides a clean, chainable API to construct your `axios` client.\n\n- `.withDefaults({ ... })`: Sets default `axios` request configuration (e.g., `baseURL`, `headers`, `timeout`).\n- `.withRetry(retries, delay)`: Enables automatic retries for failed requests. Retries on network errors, 5xx status codes, 408 (Request Timeout), and 429 (Too Many Requests).\n- `.withCache(ttlSeconds)`: Enables in-memory caching for `GET` requests with a specified Time-To-Live.\n- `.withErrorMapping(errorMap)`: Attaches an `ErrorMap` to translate HTTP errors into custom error classes.\n\n### Advanced Error Handling with ErrorMap\n\n- The `ErrorMap` gives you fine-grained control over how errors are translated.\n- When an HTTP response body contains a serialized custom error, `ErrorMap` automatically deserializes it to the correct error type before applying any trigger-based mappings.\n\n```typescript\nimport { ErrorMap, RateLimitError, UnauthorizedError, ExternalApiError, GenericError } from '@callsy/http-kit';\n\nconst errorMap = new ErrorMap()\n  // Map by HTTP status code\n  .withError(UnauthorizedError, [401, 403])\n\n  // Map by a substring in the response body\n  .withError(RateLimitError, ['rate limit', 'too many requests'])\n\n  // Extract a specific error message from a nested path in the JSON response\n  .withCustomErrorPath('errors[0].detail')\n\n  // Set a default fallback error for any unhandled cases\n  .withDefault(ExternalApiError);\n```\n\n### Error Serialization & Deserialization\n\nA key feature of `@callsy/http-kit` is the ability to serialize custom errors to plain objects and deserialize them back into class instances. This is incredibly useful for passing errors between services or from your backend to your frontend.\n\n**Serializing an Error to an Object:**\n\n```typescript\nimport { ResourceDoesNotExistError } from '@callsy/http-kit';\n\nconst error = new ResourceDoesNotExistError({ message: 'User not found' });\n\n// The .toObject() method converts the error into a plain object.\nconst errorObject = error.toObject();\n/*\n{\n  isCustomError: true,\n  name: 'ResourceDoesNotExistError',\n  message: 'User not found',\n  title: 'Resource does not exist',\n  description: 'The requested resource could not be found.',\n  httpCode: 404,\n  isCritical: false\n}\n*/\n```\n\n**Deserializing an Object back into an Error:**\n\nUse the static `fromObject` method to reconstruct the error.\n\n```typescript\nimport { CustomError } from '@callsy/http-kit';\n\n// Assume 'errorObject' is from an API response\nconst errorInstance = CustomError.fromObject(errorObject);\n\nif (errorInstance) {\n  // errorInstance is now a fully-functional ResourceDoesNotExistError instance\n  console.log(errorInstance instanceof ResourceDoesNotExistError); // true\n  throw errorInstance;\n}\n```\n\nYou can also safely check and throw the error in one go:\n\n```typescript\n// Throws a fully reconstructed (deserialised) error if the object is a custom error\nCustomError.throwIfError(apiResponse);\n```\n\n### Available Error Classes\n\nThe library includes a set of pre-defined, semantic error classes for common HTTP scenarios:\n\n- `BadRequestError` (400)\n- `UnauthorizedError` (401)\n- `PaymentRequiredError` (402)\n- `ForbiddenError` (403)\n- `ResourceDoesNotExistError` (404)\n- `MethodNotAllowedError` (405)\n- `NotAcceptableError` (406)\n- `RequestTimeoutError` (408)\n- `ConflictError` (409)\n- `GoneError` (410)\n- `RateLimitError` (429)\n- `UnprocessableEntityError` (422)\n- `ExternalApiError` (424)\n- `GenericError` (500)\n- `NotImplementedError` (501)\n- `BadGatewayError` (502)\n- `GatewayTimeoutError` (504)\n- `MaintenanceModeError` (503)\n\nAnd utility errors:\n- `CustomError` (Base class)\n- `InvalidInputError`\n- `RequiredValueError`\n- `MisconfiguredError`\n- `NotAllowedError`\n\n### Custom Error Classes\n\n- You can create your own custom errors that extend `CustomError`.\n- Make sure your custom error contains `public static readonly NAME = 'YourCustomErrorName'`.\n- Make sure your custom error is registered `CustomError.register(YourCustomError)`.\n\nExample:\n\n```typescript\nimport { CustomError, CustomErrorProps } from '@callsy/http-kit'\n\nclass MyAppError extends CustomError {\n  public static readonly NAME = 'MyAppError'\n\n  constructor(props?: CustomErrorProps) {\n    super({\n      name: MyAppError.NAME,\n      message: 'Something app-specific went wrong.',\n      httpCode: 422,\n      ...props\n    })\n  }\n}\n\nCustomError.register(MyAppError)\n```\n\n## License\n\nISC\n","readmeFilename":"README.md"}