{"_id":"@aircall/exception-zod","_rev":"9-f883ae2ab6c41d1e2c32d6c8d6165ab0","name":"@aircall/exception-zod","dist-tags":{"alpha":"0.1.6-alpha.1","latest":"0.3.0"},"versions":{"1.0.0":{"name":"@aircall/exception-zod","version":"1.0.0","_id":"@aircall/exception-zod@1.0.0","maintainers":[{"name":"xdurand","email":"xavier@xdurand.com"},{"name":"aircall-ci","email":"dev@aircall.io"},{"name":"kamalbennani","email":"kamal.bennani@aircall.io"}],"dist":{"shasum":"b6e7c9358b06561d576c8b34c7d41ea1bebceeb7","tarball":"https://registry.npmjs.org/@aircall/exception-zod/-/exception-zod-1.0.0.tgz","fileCount":6,"integrity":"sha512-gVkke9FagkiGoNo9gTd8NAhVJSW/R2OVKXz5gnvRA15JIq+EdYzTAdCvmtPetbgFfjZ+dk1aSBXdl2XK6Ejfmw==","signatures":[{"sig":"MEQCIA05ekb0kxhftulsQZ7CR16AMwRRat2KPMlq3NFcBtrmAiBz7ZWM2vqpedoH1DA8gGMyQH38dT1clk5r7vpq+9HfaA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10834},"main":"dist/index.js","_from":"file:aircall-exception-zod-1.0.0.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"915d3a6d256027e23e66cf6c87b5bc68b137aa03","scripts":{"dev":"pnpm build --watch","size":"size-limit","test":"jest --passWithNoTests","build":"tsup --config ../../tsup.config.ts","clean":"rm -rf .turbo && rm -rf node_modules && rm -rf dist","test:ci":"pnpm run test --testSequencer @aircall/test-sequencer/parallel-ci-sequencer.js --passWithNoTests","posttest":"pnpm run size"},"_npmUser":{"name":"aircall-ci","email":"dev@aircall.io"},"_resolved":"/tmp/6700fd8572b7221f4efebb53a66b52f5/aircall-exception-zod-1.0.0.tgz","_integrity":"sha512-gVkke9FagkiGoNo9gTd8NAhVJSW/R2OVKXz5gnvRA15JIq+EdYzTAdCvmtPetbgFfjZ+dk1aSBXdl2XK6Ejfmw==","size-limit":[{"path":"dist/index.js","limit":"1 KB"},{"path":"dist/index.mjs","limit":"1 KB"}],"_npmVersion":"10.2.3","description":"This package provides a simple way to handle exceptions in your application. It is based on the [Zod](https://zod.dev/) library, which is a TypeScript-first schema declaration and validation library.","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"3.22.4","jest":"29.5.0","tsup":"7.1.0","tslib":"2.4.0","ts-jest":"29.1.0","size-limit":"8.1.0","@types/jest":"29.5.2","@aircall/tsconfig":"1.4.0","@aircall/exception":"0.1.0","@aircall/exception-gql":"1.0.0","@aircall/exception-rest":"1.0.0","@aircall/test-sequencer":"1.0.0","@size-limit/preset-small-lib":"8.1.0"},"peerDependencies":{"zod":"^3.x","@aircall/exception":"^0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/exception-zod_1.0.0_1713306105129_0.7949412915100735","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"@aircall/exception-zod","version":"0.1.1","_id":"@aircall/exception-zod@0.1.1","maintainers":[{"name":"xdurand","email":"xavier@xdurand.com"},{"name":"aircall-ci","email":"dev@aircall.io"},{"name":"kamalbennani","email":"kamal.bennani@aircall.io"}],"dist":{"shasum":"b571063afc581326efe5ec32735cb029e683c87f","tarball":"https://registry.npmjs.org/@aircall/exception-zod/-/exception-zod-0.1.1.tgz","fileCount":6,"integrity":"sha512-NQezCvx2c9dwbUiPNOOInDzeHXExdx3U3r1uz0MQHRVox1RcvH69N4rocS+NaK/dV4Q3jFpnkzKhCLcb9jYODg==","signatures":[{"sig":"MEQCID02uCAgRCpp6K7Usze5XUFG76P9O9R17j8gTDpXvG4xAiBvxl5gTiLKEtx2BuE6F5XqoEcHctgrBqmQNH6nx6Fs0A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10899},"main":"dist/index.js","_from":"file:aircall-exception-zod-0.1.1.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"78f731ffa85b8813b57dab080c4ac9b82c5f4165","scripts":{"dev":"pnpm build --watch","size":"size-limit","test":"jest --passWithNoTests","build":"tsup --config ../../tsup.config.ts","clean":"rm -rf .turbo && rm -rf node_modules && rm -rf dist","test:ci":"pnpm run test --testSequencer @aircall/test-sequencer/parallel-ci-sequencer.js --passWithNoTests","posttest":"pnpm run size"},"_npmUser":{"name":"aircall-ci","email":"dev@aircall.io"},"_resolved":"/tmp/46cd900b707cc9bce4ddcea1b0c6b97e/aircall-exception-zod-0.1.1.tgz","_integrity":"sha512-NQezCvx2c9dwbUiPNOOInDzeHXExdx3U3r1uz0MQHRVox1RcvH69N4rocS+NaK/dV4Q3jFpnkzKhCLcb9jYODg==","size-limit":[{"path":"dist/index.js","limit":"1 KB"},{"path":"dist/index.mjs","limit":"1 KB"}],"_npmVersion":"10.2.3","description":"This package provides a simple way to handle exceptions in your application. It is based on the [Zod](https://zod.dev/) library, which is a TypeScript-first schema declaration and validation library.","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"3.22.4","jest":"29.5.0","tsup":"7.1.0","tslib":"2.4.0","ts-jest":"29.1.0","size-limit":"8.1.0","@types/jest":"29.5.2","@aircall/tsconfig":"1.4.0","@aircall/exception":"0.1.0","@aircall/exception-gql":"0.1.1","@aircall/exception-rest":"0.1.1","@aircall/test-sequencer":"1.0.0","@size-limit/preset-small-lib":"8.1.0"},"peerDependencies":{"zod":"^3.x","@aircall/exception":"0.x"},"_npmOperationalInternal":{"tmp":"tmp/exception-zod_0.1.1_1713362174122_0.862330214149956","host":"s3://npm-registry-packages"}},"0.1.2":{"name":"@aircall/exception-zod","version":"0.1.2","_id":"@aircall/exception-zod@0.1.2","maintainers":[{"name":"xdurand","email":"xavier@xdurand.com"},{"name":"aircall-ci","email":"dev@aircall.io"},{"name":"kamalbennani","email":"kamal.bennani@aircall.io"}],"dist":{"shasum":"032ac7364df7845ea33635b5e4858cee164fa978","tarball":"https://registry.npmjs.org/@aircall/exception-zod/-/exception-zod-0.1.2.tgz","fileCount":6,"integrity":"sha512-xeYjL5/quH65psTCddWOo6S+TM+LFaufDMGa2jvljhckE6/KHtdJdTyAwtiaXAHq8y3LDTFijU4zr6KdGqsKPw==","signatures":[{"sig":"MEUCIQC3e4YMkQbfL3bVg9yBBC0QKLt3dEgwwZKUc9KFCkt+GgIgQVnbxM+ttwgtXnnvZrxffH0q4hNa50hTED0IC8HIt2g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12216},"main":"dist/index.js","_from":"file:aircall-exception-zod-0.1.2.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"eceee9427ff1ea167e361ee23cb2b7613690a531","scripts":{"dev":"pnpm build --watch","size":"size-limit","test":"jest --passWithNoTests","build":"tsup --config ../../tsup.config.ts","clean":"rm -rf .turbo && rm -rf node_modules && rm -rf dist","test:ci":"pnpm run test --testSequencer @aircall/test-sequencer/parallel-ci-sequencer.js --passWithNoTests","posttest":"pnpm run size"},"_npmUser":{"name":"aircall-ci","email":"dev@aircall.io"},"_resolved":"/tmp/d97fff88296d30f673f3f6cdfd32b8db/aircall-exception-zod-0.1.2.tgz","_integrity":"sha512-xeYjL5/quH65psTCddWOo6S+TM+LFaufDMGa2jvljhckE6/KHtdJdTyAwtiaXAHq8y3LDTFijU4zr6KdGqsKPw==","size-limit":[{"path":"dist/index.js","limit":"1 KB"},{"path":"dist/index.mjs","limit":"1 KB"}],"_npmVersion":"10.5.0","description":"This package provides a simple way to handle exceptions in your application. It is based on the [Zod](https://zod.dev/) library, which is a TypeScript-first schema declaration and validation library.","directories":{},"sideEffects":false,"_nodeVersion":"18.20.2","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"3.22.4","jest":"29.5.0","tsup":"7.1.0","tslib":"2.4.0","ts-jest":"29.1.0","size-limit":"8.1.0","@types/jest":"29.5.2","@aircall/tsconfig":"1.4.0","@aircall/exception":"0.1.1","@aircall/exception-gql":"0.1.1","@aircall/exception-rest":"0.1.1","@aircall/test-sequencer":"1.0.0","@size-limit/preset-small-lib":"8.1.0"},"peerDependencies":{"zod":"^3.x","@aircall/exception":"0.x"},"_npmOperationalInternal":{"tmp":"tmp/exception-zod_0.1.2_1716295701533_0.22725327190440137","host":"s3://npm-registry-packages"}},"0.1.5":{"name":"@aircall/exception-zod","version":"0.1.5","_id":"@aircall/exception-zod@0.1.5","maintainers":[{"name":"xdurand","email":"xavier@xdurand.com"},{"name":"aircall-ci","email":"dev@aircall.io"},{"name":"kamalbennani","email":"kamal.bennani@aircall.io"}],"dist":{"shasum":"e90dd85c1a7d4645bea74ecbebac8344ddc11ccf","tarball":"https://registry.npmjs.org/@aircall/exception-zod/-/exception-zod-0.1.5.tgz","fileCount":6,"integrity":"sha512-6L2vJLThM+Xi8smCdhLIoKANP/6SU3sfYCkT6lwxPiOX343lB3u9bBCwU/sfeTNfsKkAN+qwvxTL4g1UYdPt7g==","signatures":[{"sig":"MEYCIQCJZcB6Q4ZTrBQ+qBnPLuL7Abxr0Qsq+cyh5V6YVWITEgIhAK9m0UaHOpTjjq99iDN34eGXtUQr9t22694xF+pTH2us","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12264},"main":"dist/index.js","_from":"file:aircall-exception-zod-0.1.5.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"77b47dd33ab01e9a1565a92cc33965280e6c41e6","scripts":{"dev":"pnpm build --watch","size":"size-limit","test":"jest --passWithNoTests","build":"tsup --config ../../tsup.config.ts","clean":"rm -rf .turbo && rm -rf node_modules && rm -rf dist","test:ci":"pnpm run test --shard ${CI_NODE_INDEX}/${CI_NODE_TOTAL} --passWithNoTests --silent"},"_npmUser":{"name":"aircall-ci","email":"dev@aircall.io"},"_resolved":"/tmp/d05aee60d979a1c98f5c69132d6a7282/aircall-exception-zod-0.1.5.tgz","_integrity":"sha512-6L2vJLThM+Xi8smCdhLIoKANP/6SU3sfYCkT6lwxPiOX343lB3u9bBCwU/sfeTNfsKkAN+qwvxTL4g1UYdPt7g==","size-limit":[{"path":"dist/index.js","limit":"1 KB"},{"path":"dist/index.mjs","limit":"1 KB"}],"_npmVersion":"10.8.2","description":"This package provides a simple way to handle exceptions in your application. It is based on the [Zod](https://zod.dev/) library, which is a TypeScript-first schema declaration and validation library.","directories":{},"sideEffects":false,"_nodeVersion":"20.17.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"3.22.4","jest":"29.5.0","tsup":"7.1.0","tslib":"2.4.0","ts-jest":"29.1.0","size-limit":"8.1.0","@types/jest":"29.5.2","@aircall/tsconfig":"1.4.2","@aircall/exception":"0.1.4","@aircall/exception-gql":"0.2.3","@aircall/exception-rest":"0.1.4","@aircall/test-sequencer":"1.0.2","@size-limit/preset-small-lib":"8.1.0"},"peerDependencies":{"zod":"^3.x","@aircall/exception":"0.x"},"_npmOperationalInternal":{"tmp":"tmp/exception-zod_0.1.5_1727248874309_0.16423200853282105","host":"s3://npm-registry-packages"}},"0.1.6":{"name":"@aircall/exception-zod","version":"0.1.6","_id":"@aircall/exception-zod@0.1.6","maintainers":[{"name":"xdurand","email":"xavier@xdurand.com"},{"name":"aircall-ci","email":"dev@aircall.io"},{"name":"kamalbennani","email":"kamal.bennani@aircall.io"}],"dist":{"shasum":"2109a925925d78eb8e5ebe438438cb737ef390a3","tarball":"https://registry.npmjs.org/@aircall/exception-zod/-/exception-zod-0.1.6.tgz","fileCount":6,"integrity":"sha512-xdK1sVL2zQ3cXJA3ul8GPcQJ44q+Urq/5oE5eTWC/jHcpGRC3Bo0NSo4m9MLWHzI1x7R5PVCIFYrXXRj5Ed2gA==","signatures":[{"sig":"MEUCIGY7WG8kmAQnxrrCQHAfFxXt1I5CfwL0aIvUnlJGMFHlAiEAsIIJxHp+rq046+QLJWUaqaKadUpxy0txa2/XKRLEJQo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12451},"main":"dist/index.js","_from":"file:aircall-exception-zod-0.1.6.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"b4705e2c8e78ff9eaa170bc63b2734e5b09b6ce7","scripts":{"dev":"pnpm build --watch","size":"size-limit","test":"jest --passWithNoTests","build":"tsup --config ../../tsup.config.ts","clean":"rm -rf .turbo && rm -rf node_modules && rm -rf dist","test:ci":"pnpm run test --shard ${CI_NODE_INDEX}/${CI_NODE_TOTAL} --passWithNoTests --silent"},"_npmUser":{"name":"aircall-ci","email":"dev@aircall.io"},"_resolved":"/tmp/d413c92f61f0e6afbba3c0b029cec40f/aircall-exception-zod-0.1.6.tgz","_integrity":"sha512-xdK1sVL2zQ3cXJA3ul8GPcQJ44q+Urq/5oE5eTWC/jHcpGRC3Bo0NSo4m9MLWHzI1x7R5PVCIFYrXXRj5Ed2gA==","size-limit":[{"path":"dist/index.js","limit":"1 KB"},{"path":"dist/index.mjs","limit":"1 KB"}],"_npmVersion":"10.8.2","description":"This package provides a simple way to handle exceptions in your application. It is based on the [Zod](https://zod.dev/) library, which is a TypeScript-first schema declaration and validation library.","directories":{},"sideEffects":false,"_nodeVersion":"20.17.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"3.23.8","jest":"29.5.0","tsup":"7.1.0","tslib":"2.4.0","ts-jest":"29.1.0","size-limit":"8.1.0","@types/jest":"29.5.2","@aircall/tsconfig":"1.4.2","@aircall/exception":"0.1.5","@aircall/exception-gql":"0.2.4","@aircall/exception-rest":"0.1.5","@aircall/test-sequencer":"1.0.2","@size-limit/preset-small-lib":"8.1.0"},"peerDependencies":{"zod":"^3.x","@aircall/exception":"0.x"},"_npmOperationalInternal":{"tmp":"tmp/exception-zod_0.1.6_1727352604330_0.7736026914768468","host":"s3://npm-registry-packages"}},"0.1.6-alpha.1":{"name":"@aircall/exception-zod","version":"0.1.6-alpha.1","_id":"@aircall/exception-zod@0.1.6-alpha.1","maintainers":[{"name":"xdurand","email":"xavier@xdurand.com"},{"name":"aircall-ci","email":"dev@aircall.io"},{"name":"kamalbennani","email":"kamal.bennani@aircall.io"},{"name":"danielmarcano","email":"danielmarcanodev@gmail.com"}],"dist":{"shasum":"2a0df6f5f9dd41c745ebc8eff37d1f1ba1e47809","tarball":"https://registry.npmjs.org/@aircall/exception-zod/-/exception-zod-0.1.6-alpha.1.tgz","fileCount":6,"integrity":"sha512-ihYDkspn0ZaGZqPGhlNKN7pF+/G3PTEvOaLURcc/3WkSOXGgA6Yh0J2C3bEl7vM36YJ5a+gp5hBxUQ4wyor2zQ==","signatures":[{"sig":"MEUCIQDD/3F9uSEygLcXtt3v4ugHfIfy4l0G4W8DB+gMKGxUMAIgMGwHgXnCa052gN++5xt+27+MKpcZTyNwUQfVqU1av7k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12416},"main":"./dist/index.cjs","type":"module","_from":"file:aircall-exception-zod-0.1.6-alpha.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./package.json":"./package.json"},"scripts":{"test":"jest --passWithNoTests","clean":"rm -rf .turbo && rm -rf node_modules && rm -rf dist","test:ci":"pnpm run test --shard ${CI_NODE_INDEX}/${CI_NODE_TOTAL} --passWithNoTests --silent","build:package":"tsup --config ../../tsup.config.ts"},"_npmUser":{"name":"aircall-ci","email":"dev@aircall.io"},"_resolved":"/private/var/folders/6m/ztl4ftdd6dz_dbc1wft17z440000gn/T/44c55f3ffe9a640a3a7caa92cd1dfe9a/aircall-exception-zod-0.1.6-alpha.1.tgz","_integrity":"sha512-ihYDkspn0ZaGZqPGhlNKN7pF+/G3PTEvOaLURcc/3WkSOXGgA6Yh0J2C3bEl7vM36YJ5a+gp5hBxUQ4wyor2zQ==","size-limit":[{"path":"./dist/index.js","limit":"1 KB"},{"path":"./dist/index.cjs","limit":"1 KB"}],"_npmVersion":"10.8.2","description":"This package provides a simple way to handle exceptions in your application. It is based on the [Zod](https://zod.dev/) library, which is a TypeScript-first schema declaration and validation library.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.3","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"zod":"3.23.8","jest":"29.5.0","tsup":"7.1.0","tslib":"2.4.0","ts-jest":"29.1.0","size-limit":"8.1.0","@types/jest":"29.5.2","@aircall/tsconfig":"1.4.2","@aircall/exception":"0.2.0","@aircall/exception-gql":"0.3.0","@aircall/exception-rest":"0.1.5","@aircall/test-sequencer":"1.0.2","@size-limit/preset-small-lib":"8.1.0"},"peerDependencies":{"zod":"^3.x","@aircall/exception":"0.x"},"_npmOperationalInternal":{"tmp":"tmp/exception-zod_0.1.6-alpha.1_1752264150804_0.5881641508470525","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@aircall/exception-zod","version":"0.3.0","_id":"@aircall/exception-zod@0.3.0","maintainers":[{"name":"xdurand","email":"xavier@xdurand.com"},{"name":"aircall-ci","email":"dev@aircall.io"},{"name":"kamalbennani","email":"kamal.bennani@aircall.io"},{"name":"danielmarcano","email":"danielmarcanodev@gmail.com"}],"dist":{"shasum":"5f671b3f56c23d17683cf973f7ae1f4ecfc0ebfd","tarball":"https://registry.npmjs.org/@aircall/exception-zod/-/exception-zod-0.3.0.tgz","fileCount":6,"integrity":"sha512-kyOejcmtPZMN3gKw6e4lx/Af+uRbQGc7QzYYNbs9Rvlo4fst9+67qKP1KMMsC/HKxOpWRAVFOY0M3ptsopRj1A==","signatures":[{"sig":"MEUCIQC/voJXxoBll9jku3dUgAOm38s81z5E1bi2Fw9TbX8nsAIgbOONxCJQYFMNFKWYDsqDWHhMiiLt2OuuFyGTlf3FY18=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12818},"main":"./dist/index.cjs","type":"module","_from":"file:aircall-exception-zod-0.3.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./package.json":"./package.json"},"gitHead":"bd28794d0cdab5ec06d7f3800c463aeb8943f34d","scripts":{"test":"jest --passWithNoTests","clean":"rm -rf .turbo && rm -rf node_modules && rm -rf dist","test:ci":"pnpm run test --shard ${CI_NODE_INDEX}/${CI_NODE_TOTAL} --passWithNoTests --silent","build:package":"tsup --config ../../tsup.config.ts"},"_npmUser":{"name":"aircall-ci","email":"dev@aircall.io"},"_resolved":"/tmp/6a10152bedd553f6f2f6e8078dd6c496/aircall-exception-zod-0.3.0.tgz","_integrity":"sha512-kyOejcmtPZMN3gKw6e4lx/Af+uRbQGc7QzYYNbs9Rvlo4fst9+67qKP1KMMsC/HKxOpWRAVFOY0M3ptsopRj1A==","size-limit":[{"path":"./dist/index.js","limit":"1 KB"},{"path":"./dist/index.cjs","limit":"1 KB"}],"_npmVersion":"10.8.2","description":"This package provides a simple way to handle exceptions in your application. It is based on the [Zod](https://zod.dev/) library, which is a TypeScript-first schema declaration and validation library.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.3","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"3.23.8","jest":"29.5.0","tsup":"7.1.0","tslib":"2.4.0","ts-jest":"29.1.0","size-limit":"8.1.0","@types/jest":"29.5.2","@aircall/tsconfig":"1.4.3","@aircall/exception":"0.3.0","@aircall/exception-gql":"0.4.0","@aircall/exception-rest":"0.2.0","@aircall/test-sequencer":"1.0.2","@size-limit/preset-small-lib":"8.1.0"},"peerDependencies":{"zod":"^3.x","@aircall/exception":"0.x"},"_npmOperationalInternal":{"tmp":"tmp/exception-zod_0.3.0_1756970949943_0.7343736458353542","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2024-04-16T22:21:44.965Z","modified":"2025-11-25T15:18:27.908Z","1.0.0":"2024-04-16T22:21:45.279Z","0.1.1":"2024-04-17T13:56:14.267Z","0.1.2":"2024-05-21T12:48:21.708Z","0.1.5":"2024-09-25T07:21:14.503Z","0.1.6":"2024-09-26T12:10:04.556Z","0.1.6-alpha.1":"2025-07-11T20:02:30.980Z","0.3.0":"2025-09-04T07:29:10.120Z"},"description":"This package provides a simple way to handle exceptions in your application. It is based on the [Zod](https://zod.dev/) library, which is a TypeScript-first schema declaration and validation library.","maintainers":[{"email":"dev@aircall.io","name":"aircall-ci"}],"readme":"# Introduction\n\nThis package provides a simple way to handle exceptions in your application. It is based on the [Zod](https://zod.dev/) library, which is a TypeScript-first schema declaration and validation library.\n\n# Installation\n\n```bash\nyarn add @aircall/exception-zod\n```\n\n# How to use\n\n```typescript\nimport { Exception } from '@aircall/exception';\nimport { zodMiddleware } from '@aircall/exception-zod';\n\n// Let's say you have a function which creates a user\n// First you define a schema to validate the body of the request\nconst schema = z.object({\n  name: z.string().min(1),\n  email: z.string().email(),\n  age: z.number().int().positive()\n});\n\n// Let's say you have a lambda handler\nexport const handler = zodMiddleware(async (event: any) => {\n  // You can use the `parse` method to validate the body of the request\n  const body = schema.parse(event.body);\n\n  // You can then use the `body` object to create a user\n  const user = await createUser(body);\n\n  return {\n    statusCode: 200,\n    body: JSON.stringify(user)\n  };\n});\n\n// If the body of the request is invalid, the middleware will throw an exception\n// You can catch the exception and return a proper response\ntry {\n  const response = await handler(event);\n} catch (error) {\n  if (error instanceof Exception) {\n    // Manage the exception however you want here\n  }\n\n  return {\n    statusCode: 400,\n    body: JSON.stringify({\n      message: error.message\n    })\n  };\n}\n```\n\n## REST Integration\n\nYou can use the `zodMiddleware` also side `restMiddleware` which would automatically parse the body of the request and validate it against a schema. If the body is invalid, the middleware will throw an already formatted REST error using Aircall conventions.\n\n```typescript\nimport { restMiddleware } from '@aircall/exception-rest';\nimport { zodMiddleware } from '@aircall/exception-zod';\n\nconst schema = z.object({\n  name: z.string().min(1),\n  email: z.string().email(),\n  age: z.number().int().positive()\n});\n\nexport const handler = restMiddleware(\n  zodMiddleware(async (event: any) => {\n    // You can use the `parse` method to validate the body of the request\n    // If the body is invalid, the zod will throw an exception\n    // That will be caught by zodMiddleware to convert them to Aircall errors\n    // And then by the restMiddleware to convert them to REST responses\n    const body = schema.parse(event.body);\n\n    const user = await createUser(body);\n\n    return {\n      statusCode: 200,\n      body: JSON.stringify(user)\n    };\n  })\n);\n\n// Example of a request\nconst event = {\n  body: JSON.stringify({\n    name: 'J',\n    email: 'abc',\n    age: 1.2\n  })\n};\n\nconst response = await handler(event);\n\n// response\n{\n  statusCode: 400,\n  body: JSON.stringify({\n    name: 'UserInputException',\n    message: 'Invalid user input',\n    code: '0100',\n    issues: [\n      {\n        code: '0103',\n        message: 'Input in \"name\" is too small, minimum is \"1\" \"string\"',\n        minimum: 1,\n        name: 'TooSmallException',\n        path: 'name',\n        type: 'string'\n      },\n      {\n        name: 'InvalidStringException',\n        message: 'Input in \"email\" has failed the \"email\" validation',\n        code: '0102',\n        path: 'email',\n        validation: 'email'\n      },\n      {\n        name: 'InvalidTypeException',\n        code: '0101',\n        expected: 'integer',\n        message: 'Input in \"age\" expected to be \"integer\" but received \"float\"',\n        path: 'age',\n        received: 'float'\n      }\n    ]\n  })\n}\n```\n\n## GraphQL Integration\n\nYou can use the `zodMiddleware` also side `graphqlMiddleware` which would automatically parse the body of the request and validate it against a schema. If the body is invalid, the middleware will throw an already formatted GraphQL error using Aircall conventions.\n\n```typescript\n\nimport { graphqlMiddleware } from '@aircall/exception-graphql';\nimport { zodMiddleware } from '@aircall/exception-zod';\n\nconst schema = z.object({\n  name: z.string().min(1),\n  email: z.string().email(),\n  age: z.number().int().positive()\n});\n\nexport const handler = graphqlMiddleware(\n  zodMiddleware(async (event: any) => {\n    // You can use the `parse` method to validate the body of the request\n    // If the body is invalid, the zod will throw an exception\n    // That will be caught by zodMiddleware to convert them to Aircall errors\n    // And then by the graphqlMiddleware to convert them to GraphQL errors\n    const body = schema.parse(event.body);\n\n    const user = await createUser(body);\n\n    return {\n      user,\n      __typename: 'User'\n    };\n  })\n);\n\n// Example of a request\n\nconst event = {\n  body: JSON.stringify({\n    query: `\n      mutation {\n        createUser(input: { name: \"J\", email: \"abc\", age: 1.2 }) {\n          __typename\n\n          ... on User {\n            id\n            name\n            email\n            age\n          }\n\n          ... on UserInputException {\n            message\n\n            issues {\n              __typename\n              message\n              code\n              path\n\n              ... on TooSmallException {\n                minimum\n                type\n              }\n\n              ... on InvalidStringException {\n                validation\n              }\n\n              ... on InvalidTypeException {\n                received\n                expected\n              }\n            }\n          }\n        }\n      }\n    `\n  })\n};\n\nconst response = await handler(event);\n\n// response\n{\n  data: {\n    __typename: 'UserInputException',\n    message: 'Invalid user input',\n    extensions: {\n      code: '0100',\n      issues: [\n        {\n          __typename: 'TooSmallException',\n          code: '0103',\n          message: 'Input in \"name\" is too small, minimum is \"1\" \"string\"',\n          minimum: 1,\n          path: 'name',\n          type: 'string'\n        },\n        {\n          __typename: 'InvalidStringException',\n          code: '0102',\n          message: 'Input in \"email\" has failed the \"email\" validation',\n          path: 'email',\n          validation: 'email'\n        },\n        {\n          __typename: 'InvalidTypeException',\n          code: '0101',\n          message: 'Input in \"age\" expected to be \"integer\" but received \"float\"',\n          path: 'age',\n          expected: 'integer',\n          received: 'float'\n        }\n      ]\n    }\n  }\n}\n```\n","readmeFilename":"README.md"}