{"_id":"@typeschema/joi","_rev":"4-e48e7f51ce8dec47126b71382339679a","name":"@typeschema/joi","dist-tags":{"latest":"0.14.0"},"versions":{"0.13.0":{"name":"@typeschema/joi","version":"0.13.0","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"license":"MIT","_id":"@typeschema/joi@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":"48f61bce8c9ada8bb5cffaf25f5d0dfe0ad156ed","tarball":"https://registry.npmjs.org/@typeschema/joi/-/joi-0.13.0.tgz","fileCount":7,"integrity":"sha512-G2K3x+nZEWGU1QhUEg8WJCuvOY7c2tomi0hdHP0hytKx8Chi6yToME+qz8gRXmUNeL//dY2QBOxQrc+8/nhz6A==","signatures":[{"sig":"MEQCIA/QgsZvppXPlZLChuCpOP7ypri2lLtywr6VieK4QDTvAiBCfaCiKQIAfKDMNC8iGUOf65QBKfeb+YXF0SXHt6RFLA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8888},"main":"dist/index.js","_from":"file:typeschema-joi-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/f4e076e0d11dd21dbd6e2ec4b871efb0/typeschema-joi-0.13.0.tgz","_integrity":"sha512-G2K3x+nZEWGU1QhUEg8WJCuvOY7c2tomi0hdHP0hytKx8Chi6yToME+qz8gRXmUNeL//dY2QBOxQrc+8/nhz6A==","repository":{"url":"git+https://github.com/decs/typeschema.git","type":"git"},"_npmVersion":"10.2.4","description":"Reusable adapter for Joi schemas","directories":{},"sideEffects":false,"_nodeVersion":"20.11.0","dependencies":{"@typeschema/core":"0.13.0"},"//description":"This field is manually maintained.","_hasShrinkwrap":false,"devDependencies":{"joi":"^17.12.0"},"peerDependencies":{"joi":"^17.12.0"},"//devDependencies":"This field is manually maintained.","//peerDependencies":"This field is manually maintained.","peerDependenciesMeta":{"joi":{"optional":true}},"//peerDependenciesMeta":"This field is manually maintained.","_npmOperationalInternal":{"tmp":"tmp/joi_0.13.0_1708584806322_0.8824377814032776","host":"s3://npm-registry-packages"}},"0.13.1":{"name":"@typeschema/joi","version":"0.13.1","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"license":"MIT","_id":"@typeschema/joi@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":"954647244cd0c5c5c61f194a25cb610a932aff0b","tarball":"https://registry.npmjs.org/@typeschema/joi/-/joi-0.13.1.tgz","fileCount":7,"integrity":"sha512-LvfMmKVpjYjvopqvE39Yrt0vTUIE29CNHz8bOZ+5QZ9q/8AV1ftuRukEf8+zyP4fCCUsyEJBEr4qB+faX5BFAQ==","signatures":[{"sig":"MEUCIHGM6j5DrB3JrWTiJbqFTBq/2w497ZpC6f+ohLS85oP9AiEAxGp5U8vJzcI953lR6EJw6P9vXp2+lV+moHCjA5RqfPI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9068},"main":"dist/index.js","_from":"file:typeschema-joi-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/c74ce69b62276b97b0db098e86740574/typeschema-joi-0.13.1.tgz","_integrity":"sha512-LvfMmKVpjYjvopqvE39Yrt0vTUIE29CNHz8bOZ+5QZ9q/8AV1ftuRukEf8+zyP4fCCUsyEJBEr4qB+faX5BFAQ==","repository":{"url":"git+https://github.com/decs/typeschema.git","type":"git"},"_npmVersion":"10.2.4","description":"Reusable adapter for Joi 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":{"joi":"^17.12.0"},"peerDependencies":{"joi":"^17.12.0"},"//devDependencies":"This field is manually maintained.","//peerDependencies":"This field is manually maintained.","peerDependenciesMeta":{"joi":{"optional":true}},"//peerDependenciesMeta":"This field is manually maintained.","_npmOperationalInternal":{"tmp":"tmp/joi_0.13.1_1708712691096_0.5239579662971376","host":"s3://npm-registry-packages"}},"0.13.2":{"name":"@typeschema/joi","version":"0.13.2","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"license":"MIT","_id":"@typeschema/joi@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":"b1b705a6f3664927e7b311b5affba899f29c4695","tarball":"https://registry.npmjs.org/@typeschema/joi/-/joi-0.13.2.tgz","fileCount":7,"integrity":"sha512-tN3xsSBCJfs+5ucLsdCVQYM/lqcRBilugk9fMYecIr8DlA87HfArUI3Xl154nOI1QhMEmL1OI+PqUlUZQl0Ywg==","signatures":[{"sig":"MEUCIF9uwLsaPL4U0jLyVqtdA5b/mOAaMw9VdHiepfYM1ovDAiEAhPEU0cm2lBsxFP7ckBsoASLASVdtX8F711osnjLOFjw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9126},"main":"dist/index.js","_from":"file:typeschema-joi-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/2d1bc2e7af9ff3cfd8879e4ba91d3d5f/typeschema-joi-0.13.2.tgz","_integrity":"sha512-tN3xsSBCJfs+5ucLsdCVQYM/lqcRBilugk9fMYecIr8DlA87HfArUI3Xl154nOI1QhMEmL1OI+PqUlUZQl0Ywg==","repository":{"url":"git+https://github.com/decs/typeschema.git","type":"git"},"_npmVersion":"10.2.4","description":"Reusable adapter for Joi 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":{"joi":"^17.12.0"},"peerDependencies":{"joi":"^17.12.0"},"//devDependencies":"This field is manually maintained.","//peerDependencies":"This field is manually maintained.","peerDependenciesMeta":{"joi":{"optional":true}},"//peerDependenciesMeta":"This field is manually maintained.","_npmOperationalInternal":{"tmp":"tmp/joi_0.13.2_1709024739414_0.49213687428206465","host":"s3://npm-registry-packages"}},"0.13.3":{"name":"@typeschema/joi","version":"0.13.3","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"license":"MIT","_id":"@typeschema/joi@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":"aa7012d8dd4e54e160623d6efe9393b9c2373658","tarball":"https://registry.npmjs.org/@typeschema/joi/-/joi-0.13.3.tgz","fileCount":7,"integrity":"sha512-8uLPw0qOqwNLm+mm3eVeYSZ6j0Hfs9gpTEa7Af03j4M+XqAPu4Zy9ziHUZordTPCa8+oMZVyi8ENsTcRnmgvdA==","signatures":[{"sig":"MEYCIQD7s2b1DX1P5rAGrpHpCdx01nNQnJoDgKEE1vC04KFqaAIhAL/r8M637ZWlMrD6wJ4Rh9E79sJsvqySGG1hi7uLRMk6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12090},"main":"dist/index.js","_from":"file:typeschema-joi-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","upgrade:deps":"ncu -u --dep=dev,peer --reject ow"},"_npmUser":{"name":"decs","email":"andrefonsecacosta@gmail.com"},"//version":"This field is manually maintained.","_resolved":"/tmp/2b28f03805a21d2ed607c27421d191e6/typeschema-joi-0.13.3.tgz","_integrity":"sha512-8uLPw0qOqwNLm+mm3eVeYSZ6j0Hfs9gpTEa7Af03j4M+XqAPu4Zy9ziHUZordTPCa8+oMZVyi8ENsTcRnmgvdA==","repository":{"url":"git+https://github.com/decs/typeschema.git","type":"git"},"_npmVersion":"10.2.4","description":"Reusable adapter for Joi 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":{"joi":"^17.12.2","joi-to-json":"^4.2.1"},"peerDependencies":{"joi":"^17.12.2","joi-to-json":"^4.2.1"},"//devDependencies":"This field is manually maintained.","//peerDependencies":{"//":"This field is manually maintained.","joi":"Required for validation","joi-to-json":"Required for serialization"},"peerDependenciesMeta":{"joi":{"optional":true},"joi-to-json":{"optional":true}},"//peerDependenciesMeta":"This field is manually maintained.","_npmOperationalInternal":{"tmp":"tmp/joi_0.13.3_1709410648944_0.2894295063181713","host":"s3://npm-registry-packages"}},"0.14.0":{"//":"This file is partially generated. Only some fields can be modified manually!","name":"@typeschema/joi","//version":"This field is manually maintained.","version":"0.14.0","//description":"This field is manually maintained.","description":"Reusable adapter for Joi 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":{"joi":"^17.13.3","joi-to-json":"^4.3.0"},"//peerDependencies":{"//":"This field is manually maintained.","joi":"Required for validation","joi-to-json":"Required for serialization"},"peerDependencies":{"joi":"^17.13.3","joi-to-json":"^4.3.0"},"//peerDependenciesMeta":"This field is manually maintained.","peerDependenciesMeta":{"joi":{"optional":true},"joi-to-json":{"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/joi@0.14.0","bugs":{"url":"https://github.com/decs/typeschema/issues"},"_integrity":"sha512-rnudk6lJ3aZyXlz3/GPKbdmL50O7l2MTHEhDTcynAUowdiU2nVpVpAXUGufxrRlsGLuwu7y0yb4o6pQy8o/FyQ==","_resolved":"/tmp/e82200a1f692036b546b1e008eb74e66/typeschema-joi-0.14.0.tgz","_from":"file:typeschema-joi-0.14.0.tgz","_nodeVersion":"20.16.0","_npmVersion":"10.8.1","dist":{"integrity":"sha512-rnudk6lJ3aZyXlz3/GPKbdmL50O7l2MTHEhDTcynAUowdiU2nVpVpAXUGufxrRlsGLuwu7y0yb4o6pQy8o/FyQ==","shasum":"492f0601b2abbd24d3eef0d498822b99843e811f","tarball":"https://registry.npmjs.org/@typeschema/joi/-/joi-0.14.0.tgz","fileCount":7,"unpackedSize":12091,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCuj/PvVCiTiPUvtCdsKhm30Qqtuog+BJI7VCzSgJ2LzwIgXoPdM3D/qP1wzX0PsGz1FFQQirJ7FWBzsM+M+qnpguo="}]},"_npmUser":{"name":"decs","email":"andrefonsecacosta@gmail.com"},"directories":{},"maintainers":[{"name":"decs","email":"andrefonsecacosta@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/joi_0.14.0_1724625235588_0.07204227907287097"},"_hasShrinkwrap":false}},"time":{"created":"2024-02-22T06:53:26.239Z","modified":"2024-08-25T22:33:55.973Z","0.13.0":"2024-02-22T06:53:26.550Z","0.13.1":"2024-02-23T18:24:51.253Z","0.13.2":"2024-02-27T09:05:39.565Z","0.13.3":"2024-03-02T20:17:29.215Z","0.14.0":"2024-08-25T22:33:55.787Z"},"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 Joi 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/joi</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/joi\" rel=\"nofollow\"><img src=\"https://img.shields.io/bundlephobia/minzip/%40typeschema%2Fjoi\" alt=\"Bundle size\"></a>\n  <a href=\"https://www.npmjs.com/package/@typeschema/joi\" rel=\"nofollow\"><img src=\"https://img.shields.io/npm/dw/@typeschema/joi.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 Joi schemas\n  <br />\n  <a href=\"https://typeschema.com\">https://typeschema.com</a> ✨\n</p>\n\n```ts\nimport {initTRPC} from '@trpc/server';\nimport Joi from 'joi';\n\nimport {wrap} from '@typeschema/joi';\n\nconst schema = Joi.object({name: Joi.string().required()});\n\nconst t = initTRPC.create();\nconst appRouter = t.router({\n  hello: t.procedure\n    .input(wrap(schema))\n    .query(({input}) => `Hello, ${(input as any).name}!`),\n  //         ^? unknown\n});\n\n```\n\nUse it directly or through [`@typeschema/main`](https://github.com/decs/typeschema/tree/main/packages/main)\n\n## Dependencies\n- [`joi`](https://www.npmjs.com/package/joi): Required for validation (`^17.13.3`)\n- [`joi-to-json`](https://www.npmjs.com/package/joi-to-json): Required for serialization (`^4.3.0`)\n\n## API\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"}