{"_id":"@typeschema/zod","_rev":"4-745498e6aae1865f16528c8b91ed5b80","name":"@typeschema/zod","dist-tags":{"latest":"0.14.0"},"versions":{"0.13.0":{"name":"@typeschema/zod","version":"0.13.0","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"license":"MIT","_id":"@typeschema/zod@0.13.0","maintainers":[{"name":"decs","email":"andrefonsecacosta@gmail.com"}],"homepage":"https://typeschema.com","bugs":{"url":"https://github.com/decs/typeschema/issues"},"//":"This file is partially generated. Only some fields can be modified manually!","dist":{"shasum":"037b711562fcd402ef7bb19e43d8f9e7125c8f40","tarball":"https://registry.npmjs.org/@typeschema/zod/-/zod-0.13.0.tgz","fileCount":7,"integrity":"sha512-T+GrlzCPeYa7Agqe+1meD/+YU2S9xZso/I7a3DRPiWnEzr1iryoDurlHjgtOwEH1qGTmEJlMrTh/AL2DiU7ptg==","signatures":[{"sig":"MEUCIHJkOeuaX3RiwTneCZmynltQMb6M8fWHKdDdL5uo8FcvAiEAhQpTe5hJHop4Nfc2u2KVvhAHuigP+eHlP0I8k5u4ESA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11052},"main":"dist/index.js","_from":"file:typeschema-zod-0.13.0.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"scripts":{"lint":"eslint src --fix","test":"vitest --config ../../vitest.config.ts","build":"tsup --config ../../tsup.config.ts","lint:package":"publint && attw --pack"},"_npmUser":{"name":"decs","email":"andrefonsecacosta@gmail.com"},"//version":"This field is manually maintained.","_resolved":"/private/var/folders/dq/77g3z6095pj93wyfv7wj52rm0000gn/T/b23682cb130cd256ba7a1085fc2ce1c9/typeschema-zod-0.13.0.tgz","_integrity":"sha512-T+GrlzCPeYa7Agqe+1meD/+YU2S9xZso/I7a3DRPiWnEzr1iryoDurlHjgtOwEH1qGTmEJlMrTh/AL2DiU7ptg==","repository":{"url":"git+https://github.com/decs/typeschema.git","type":"git"},"_npmVersion":"10.2.4","description":"Reusable adapter for Zod schemas","directories":{},"sideEffects":false,"_nodeVersion":"20.11.0","dependencies":{"@typeschema/core":"0.13.0"},"//description":"This field is manually maintained.","_hasShrinkwrap":false,"devDependencies":{"zod":"^3.22.4","zod-to-json-schema":"^3.22.4"},"peerDependencies":{"zod":"^3.22.4","zod-to-json-schema":"^3.22.4"},"//devDependencies":"This field is manually maintained.","//peerDependencies":"This field is manually maintained.","peerDependenciesMeta":{"zod":{"optional":true},"zod-to-json-schema":{"optional":true}},"//peerDependenciesMeta":"This field is manually maintained.","_npmOperationalInternal":{"tmp":"tmp/zod_0.13.0_1708584830210_0.2564383786161921","host":"s3://npm-registry-packages"}},"0.13.1":{"name":"@typeschema/zod","version":"0.13.1","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"license":"MIT","_id":"@typeschema/zod@0.13.1","maintainers":[{"name":"decs","email":"andrefonsecacosta@gmail.com"}],"homepage":"https://typeschema.com","bugs":{"url":"https://github.com/decs/typeschema/issues"},"//":"This file is partially generated. Only some fields can be modified manually!","dist":{"shasum":"d983f26277012dc507a72cf1f21199610c4eaf97","tarball":"https://registry.npmjs.org/@typeschema/zod/-/zod-0.13.1.tgz","fileCount":7,"integrity":"sha512-b8xUjmqKStB3PSMd1pQoikMLqVjcgTgQ8f2DEenXfSkgMM9AqyjLGUtQF8VOFaap07WGHHN04Nh63ObAz8EoKw==","signatures":[{"sig":"MEUCIQDzt7Zl2o7kAdmtOw7QOcZnYpbLggosSWWJR8eZLbZlbAIgS4EinVh1pANzzelhejSHX8LyLRz+v96lsq7bLxphUtQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11232},"main":"dist/index.js","_from":"file:typeschema-zod-0.13.1.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"scripts":{"lint":"eslint src --fix","test":"vitest --config ../../vitest.config.ts","build":"tsup --config ../../tsup.config.ts","lint:package":"publint && attw --pack"},"_npmUser":{"name":"decs","email":"andrefonsecacosta@gmail.com"},"//version":"This field is manually maintained.","_resolved":"/private/var/folders/dq/77g3z6095pj93wyfv7wj52rm0000gn/T/0140d625549a84382ee334a37b3ba222/typeschema-zod-0.13.1.tgz","_integrity":"sha512-b8xUjmqKStB3PSMd1pQoikMLqVjcgTgQ8f2DEenXfSkgMM9AqyjLGUtQF8VOFaap07WGHHN04Nh63ObAz8EoKw==","repository":{"url":"git+https://github.com/decs/typeschema.git","type":"git"},"_npmVersion":"10.2.4","description":"Reusable adapter for Zod schemas","directories":{},"sideEffects":false,"_nodeVersion":"20.11.0","dependencies":{"@typeschema/core":"0.13.1"},"//description":"This field is manually maintained.","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^3.22.4","zod-to-json-schema":"^3.22.4"},"peerDependencies":{"zod":"^3.22.4","zod-to-json-schema":"^3.22.4"},"//devDependencies":"This field is manually maintained.","//peerDependencies":"This field is manually maintained.","peerDependenciesMeta":{"zod":{"optional":true},"zod-to-json-schema":{"optional":true}},"//peerDependenciesMeta":"This field is manually maintained.","_npmOperationalInternal":{"tmp":"tmp/zod_0.13.1_1708712694544_0.5923894011742834","host":"s3://npm-registry-packages"}},"0.13.2":{"name":"@typeschema/zod","version":"0.13.2","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"license":"MIT","_id":"@typeschema/zod@0.13.2","maintainers":[{"name":"decs","email":"andrefonsecacosta@gmail.com"}],"homepage":"https://typeschema.com","bugs":{"url":"https://github.com/decs/typeschema/issues"},"//":"This file is partially generated. Only some fields can be modified manually!","dist":{"shasum":"ad8b282a6c354c139383a4387c97aae453b5787d","tarball":"https://registry.npmjs.org/@typeschema/zod/-/zod-0.13.2.tgz","fileCount":7,"integrity":"sha512-PAgkP2uALMC7/v6OeXL2OTDPCM7EjkMTEiw6RJVaZ5PtFxWIS7OiTnBoeED6ih3HXKPiHZ8+8N6kyJ8ULNxaJg==","signatures":[{"sig":"MEUCIQChR4yY3etfOxkKi9HAuBn90BugXWNevZVHtjeHOOeu0gIgfXI0GfHdskSBJkE7/NOjLB2guHmZIT0RbBASAFkb9Ng=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11290},"main":"dist/index.js","_from":"file:typeschema-zod-0.13.2.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"scripts":{"lint":"eslint src --fix","test":"vitest --config ../../vitest.config.ts","build":"tsup --config ../../tsup.config.ts","lint:package":"publint && attw --pack"},"_npmUser":{"name":"decs","email":"andrefonsecacosta@gmail.com"},"//version":"This field is manually maintained.","_resolved":"/tmp/fea05f31392bd508d8fc1ffe3f7006db/typeschema-zod-0.13.2.tgz","_integrity":"sha512-PAgkP2uALMC7/v6OeXL2OTDPCM7EjkMTEiw6RJVaZ5PtFxWIS7OiTnBoeED6ih3HXKPiHZ8+8N6kyJ8ULNxaJg==","repository":{"url":"git+https://github.com/decs/typeschema.git","type":"git"},"_npmVersion":"10.2.4","description":"Reusable adapter for Zod schemas","directories":{},"sideEffects":false,"_nodeVersion":"20.11.1","dependencies":{"@typeschema/core":"0.13.2"},"//description":"This field is manually maintained.","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^3.22.4","zod-to-json-schema":"^3.22.4"},"peerDependencies":{"zod":"^3.22.4","zod-to-json-schema":"^3.22.4"},"//devDependencies":"This field is manually maintained.","//peerDependencies":"This field is manually maintained.","peerDependenciesMeta":{"zod":{"optional":true},"zod-to-json-schema":{"optional":true}},"//peerDependenciesMeta":"This field is manually maintained.","_npmOperationalInternal":{"tmp":"tmp/zod_0.13.2_1709024744785_0.6636562006564599","host":"s3://npm-registry-packages"}},"0.13.3":{"name":"@typeschema/zod","version":"0.13.3","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"license":"MIT","_id":"@typeschema/zod@0.13.3","maintainers":[{"name":"decs","email":"andrefonsecacosta@gmail.com"}],"homepage":"https://typeschema.com","bugs":{"url":"https://github.com/decs/typeschema/issues"},"//":"This file is partially generated. Only some fields can be modified manually!","dist":{"shasum":"6dc975074a246188e07a630bded95d7f765cd042","tarball":"https://registry.npmjs.org/@typeschema/zod/-/zod-0.13.3.tgz","fileCount":7,"integrity":"sha512-p5Hs22WIKkM/vZTAvw5QOLSA0EJ6QBUsQMGUrXlYnTAE2LSR/F5MLsDUb18O6S5VxGjrzU7x3VIznD5qOafJRw==","signatures":[{"sig":"MEUCIQCOIO1vIsxHZXrqgqrFrvu1riHKasdpJi0CKvmu2E4lUAIgc+JSV/aHsyr9DpaRCnjNZupiSg6Sq2HsThAqxTWuLOs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12169},"main":"dist/index.js","_from":"file:typeschema-zod-0.13.3.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"scripts":{"lint":"eslint src --fix","test":"vitest --config ../../vitest.config.ts","build":"tsup --config ../../tsup.config.ts","lint:package":"publint && attw --pack"},"_npmUser":{"name":"decs","email":"andrefonsecacosta@gmail.com"},"//version":"This field is manually maintained.","_resolved":"/tmp/52984bbb24be671213503ed399ab5a8f/typeschema-zod-0.13.3.tgz","_integrity":"sha512-p5Hs22WIKkM/vZTAvw5QOLSA0EJ6QBUsQMGUrXlYnTAE2LSR/F5MLsDUb18O6S5VxGjrzU7x3VIznD5qOafJRw==","repository":{"url":"git+https://github.com/decs/typeschema.git","type":"git"},"_npmVersion":"10.2.4","description":"Reusable adapter for Zod schemas","directories":{},"sideEffects":false,"_nodeVersion":"20.11.1","dependencies":{"@typeschema/core":"0.13.2"},"//description":"This field is manually maintained.","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^3.22.4","zod-to-json-schema":"^3.22.4"},"peerDependencies":{"zod":"^3.22.4","zod-to-json-schema":"^3.22.4"},"//devDependencies":"This field is manually maintained.","//peerDependencies":{"//":"This field is manually maintained.","zod":"Required for inference and validation","zod-to-json-schema":"Required for serialization"},"peerDependenciesMeta":{"zod":{"optional":true},"zod-to-json-schema":{"optional":true}},"//peerDependenciesMeta":"This field is manually maintained.","_npmOperationalInternal":{"tmp":"tmp/zod_0.13.3_1709278975648_0.5425197002835831","host":"s3://npm-registry-packages"}},"0.14.0":{"//":"This file is partially generated. Only some fields can be modified manually!","name":"@typeschema/zod","//version":"This field is manually maintained.","version":"0.14.0","//description":"This field is manually maintained.","description":"Reusable adapter for Zod schemas","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"homepage":"https://typeschema.com","license":"MIT","author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"sideEffects":false,"repository":{"type":"git","url":"git+https://github.com/decs/typeschema.git"},"dependencies":{"@typeschema/core":"0.14.0"},"//devDependencies":"This field is manually maintained.","devDependencies":{"zod":"^3.23.8","zod-to-json-schema":"^3.23.2"},"//peerDependencies":{"//":"This field is manually maintained.","zod":"Required for inference and validation","zod-to-json-schema":"Required for serialization"},"peerDependencies":{"zod":"^3.23.8","zod-to-json-schema":"^3.23.2"},"//peerDependenciesMeta":"This field is manually maintained.","peerDependenciesMeta":{"zod":{"optional":true},"zod-to-json-schema":{"optional":true}},"scripts":{"build":"tsup --config ../../tsup.config.ts","lint":"eslint src --fix","lint:package":"publint && attw --pack","test":"vitest --config ../../vitest.config.ts","upgrade:deps":"ncu -u --dep=dev,peer --reject ow"},"_id":"@typeschema/zod@0.14.0","bugs":{"url":"https://github.com/decs/typeschema/issues"},"_integrity":"sha512-oEX3lQFVKyGCmAV3KtVS290WpFukg/ZBXMOYpLFH/POlCaU8ojCJu5ehYvNDPZNK/f1KK9Vqlo28f7YX2g3O5w==","_resolved":"/tmp/6831d46069bd0e707106510d48eb44d6/typeschema-zod-0.14.0.tgz","_from":"file:typeschema-zod-0.14.0.tgz","_nodeVersion":"20.16.0","_npmVersion":"10.8.1","dist":{"integrity":"sha512-oEX3lQFVKyGCmAV3KtVS290WpFukg/ZBXMOYpLFH/POlCaU8ojCJu5ehYvNDPZNK/f1KK9Vqlo28f7YX2g3O5w==","shasum":"760b4ebd75bfbe646c36914768ff4beb8b9fa779","tarball":"https://registry.npmjs.org/@typeschema/zod/-/zod-0.14.0.tgz","fileCount":7,"unpackedSize":12394,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDFXV3gwHKZfoum11el9LT8x1Sd5H6wxhlALrVx3WxGrwIgY2OlQpbyfxneDaXOuvcRAvOsA9Bbb0T/+XdlqJ4XN/o="}]},"_npmUser":{"name":"decs","email":"andrefonsecacosta@gmail.com"},"directories":{},"maintainers":[{"name":"decs","email":"andrefonsecacosta@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zod_0.14.0_1724625242676_0.3091940806897384"},"_hasShrinkwrap":false}},"time":{"created":"2024-02-22T06:53:50.116Z","modified":"2024-08-25T22:34:03.078Z","0.13.0":"2024-02-22T06:53:50.393Z","0.13.1":"2024-02-23T18:24:54.679Z","0.13.2":"2024-02-27T09:05:44.948Z","0.13.3":"2024-03-01T07:42:55.772Z","0.14.0":"2024-08-25T22:34:02.847Z"},"bugs":{"url":"https://github.com/decs/typeschema/issues"},"author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"license":"MIT","homepage":"https://typeschema.com","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"repository":{"type":"git","url":"git+https://github.com/decs/typeschema.git"},"description":"Reusable adapter for Zod schemas","maintainers":[{"name":"decs","email":"andrefonsecacosta@gmail.com"}],"readme":"<!-- This file is generated. Do not modify it manually! -->\n\n<img src=\"https://typeschema.com/assets/logo.png\" width=\"64px\" alt=\"TypeSchema\" />\n<h1>@typeschema/zod</h1>\n<p>\n  <a href=\"https://opensource.org/licenses/MIT\" rel=\"nofollow\"><img src=\"https://img.shields.io/github/license/decs/typeschema\" alt=\"License\"></a>\n  <a href=\"https://bundlephobia.com/package/@typeschema/zod\" rel=\"nofollow\"><img src=\"https://img.shields.io/bundlephobia/minzip/%40typeschema%2Fzod\" alt=\"Bundle size\"></a>\n  <a href=\"https://www.npmjs.com/package/@typeschema/zod\" rel=\"nofollow\"><img src=\"https://img.shields.io/npm/dw/@typeschema/zod.svg\" alt=\"npm downloads\"></a>\n  <a href=\"https://github.com/decs/typeschema/stargazers\" rel=\"nofollow\"><img src=\"https://img.shields.io/github/stars/decs/typeschema\" alt=\"GitHub stars\"></a>\n</p>\n<p>\n  Reusable adapter for Zod schemas\n  <br />\n  <a href=\"https://typeschema.com\">https://typeschema.com</a> ✨\n</p>\n\n```ts\nimport {initTRPC} from '@trpc/server';\nimport {z} from 'zod';\n\nimport {wrap} from '@typeschema/zod';\n\nconst schema = z.object({name: z.string()});\n\nconst t = initTRPC.create();\nconst appRouter = t.router({\n  hello: t.procedure\n    .input(wrap(schema))\n    .query(({input}) => `Hello, ${input.name}!`),\n  //         ^? {name: string}\n});\n\n```\n\nUse it directly or through [`@typeschema/main`](https://github.com/decs/typeschema/tree/main/packages/main)\n\n## Dependencies\n- [`zod`](https://www.npmjs.com/package/zod): Required for inference and validation (`^3.23.8`)\n- [`zod-to-json-schema`](https://www.npmjs.com/package/zod-to-json-schema): Required for serialization (`^3.23.2`)\n\n## API\n\n### Inference\n- `Infer<TSchema>`: Extracts the output type of a schema\n- `InferIn<TSchema>`: Extracts the input type of a schema\n\n### Validation\n- `wrap(schema)`: Returns the wrapped schema with access to its operations\n- `validate(schema, data)`: Returns the validated data or a list of validation issues\n- `assert(schema, data)`: Returns the validated data or throws an `AggregateError`\n\n### Serialization\n- `toJSONSchema(schema)`: Converts the schema into the equivalent JSON schema\n","readmeFilename":"README.md"}