{"_id":"@adbros/typegen","_rev":"11-b21a1d23dd1f01b912acd9de2c42d4c5","name":"@adbros/typegen","dist-tags":{"latest":"3.1.1"},"versions":{"1.0.0":{"name":"@adbros/typegen","version":"1.0.0","author":{"name":"Adbros"},"license":"MIT","_id":"@adbros/typegen@1.0.0","maintainers":[{"name":"paveltobias","email":"m@ptx.cz"},{"name":"pivoda","email":"pavel.pivoda@gmail.com"}],"bin":{"typegen":"src/index.js"},"dist":{"shasum":"11a9bbabc05958f2c7a7c800c6bec1434f0493d1","tarball":"https://registry.npmjs.org/@adbros/typegen/-/typegen-1.0.0.tgz","fileCount":9,"integrity":"sha512-UPX12EKlXp4hxkxyKKxCEc7vbX4nKa93tLucN+T7KXy3GUM1I8Myqr6KrDcvmk1MicY9GDKgXdJcsnUhIUeDjg==","signatures":[{"sig":"MEQCIFtsAjHzrl1wUg//CMy9i+YEKi+7YqVT66x2R1vU7ahDAiAt2qLQhcsQrTjS61LOtzhPY580SeijWkxnKMpLAsnDFQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15392},"gitHead":"b821a6e2caca1ee975e2267236b23b492e9c1421","scripts":{"format":"prettier --write \"src/**/*\""},"_npmUser":{"name":"paveltobias","email":"m@ptx.cz"},"_npmVersion":"8.5.0","description":"A simple generator of TypeScript types from OpenAPI docs","directories":{},"_nodeVersion":"16.14.2","dependencies":{"yaml":"^2.3.1","prettier":"^2.8.8"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/typegen_1.0.0_1689208391459_0.6047770484775785","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@adbros/typegen","version":"1.1.0","author":{"name":"Adbros"},"license":"MIT","_id":"@adbros/typegen@1.1.0","maintainers":[{"name":"paveltobias","email":"m@ptx.cz"},{"name":"pivoda","email":"pavel.pivoda@gmail.com"}],"bin":{"typegen":"src/index.js"},"dist":{"shasum":"91e701a112af448ca46fd4d4f2eaf1cf2c6c22cf","tarball":"https://registry.npmjs.org/@adbros/typegen/-/typegen-1.1.0.tgz","fileCount":9,"integrity":"sha512-FPq37t5VVyAdTW5YvkkNQgIoWFNGiZ7gK55T/OKmYJqWZFQb5S5sP/hn0dItdPtUpley7dVtekwZcQV7Yq4fig==","signatures":[{"sig":"MEQCIFk/8EbUASCT2jNhJXAER0oWE3ylZ0lexZaQjqNeakQvAiBmYFqezgF+z8jjfwlgxBn/8tiRcnVQKXBDa0nCX2ux0w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16631},"gitHead":"d4ebd361aed8cd5bfb31c155e0a1817ec97b5875","scripts":{"format":"prettier --write \"src/**/*\""},"_npmUser":{"name":"paveltobias","email":"m@ptx.cz"},"_npmVersion":"8.5.0","description":"A simple generator of TypeScript types from OpenAPI docs","directories":{},"_nodeVersion":"16.14.2","dependencies":{"yaml":"^2.3.1","prettier":"^2.8.8"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/typegen_1.1.0_1689860007047_0.44262269426903433","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@adbros/typegen","version":"1.2.0","author":{"name":"Adbros"},"license":"MIT","_id":"@adbros/typegen@1.2.0","maintainers":[{"name":"paveltobias","email":"m@ptx.cz"},{"name":"pivoda","email":"pavel.pivoda@gmail.com"}],"bin":{"typegen":"src/index.js"},"dist":{"shasum":"1e036b8aa7752dc46e7fc0eea7b1b9e94a4fca04","tarball":"https://registry.npmjs.org/@adbros/typegen/-/typegen-1.2.0.tgz","fileCount":9,"integrity":"sha512-KWqS+knurY6BBdBokkqEiGOHNKEK82YyToRVYiYw/k2c9XCzXWu+9FEBk8T2gjqdokFignsrnd9g9W4JucKSGg==","signatures":[{"sig":"MEQCIAlZXUn5MnV6vFG3GDtORCKaKS/Lv9L4rckWhSBZNKAnAiBzRWCxCk5ymlX59otsVEhJiZKJR+WHbqsE0X3hqFQIBw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17338},"gitHead":"2cdf19adec49909ab841b39bb6668f9a63dd1325","scripts":{"format":"prettier --write \"src/**/*\""},"_npmUser":{"name":"paveltobias","email":"m@ptx.cz"},"_npmVersion":"8.5.0","description":"A simple generator of TypeScript types from OpenAPI docs","directories":{},"_nodeVersion":"16.14.2","dependencies":{"yaml":"^2.3.1","prettier":"^2.8.8"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/typegen_1.2.0_1690294711883_0.49730150138175744","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"@adbros/typegen","version":"1.3.0","author":{"name":"Adbros"},"license":"MIT","_id":"@adbros/typegen@1.3.0","maintainers":[{"name":"paveltobias","email":"m@ptx.cz"},{"name":"pivoda","email":"pavel.pivoda@gmail.com"}],"bin":{"typegen":"src/index.js"},"dist":{"shasum":"a31e5220cf7f724c33a2c581b0d44ea4d57d4c67","tarball":"https://registry.npmjs.org/@adbros/typegen/-/typegen-1.3.0.tgz","fileCount":10,"integrity":"sha512-9Mj13ky4d0B38iNlVtNcmTYDLM96sypKiRW4TpXcrUIKKUQaQIsdSTJEzAzPZ1XOe5IRcMYQw28n816rq4EfOw==","signatures":[{"sig":"MEUCIG8qDsk1KQryVz+yVfOWE3hKhnzOaEFVJOhp666I7hseAiEA7j0oFwpPHIspjGV806Sp/I9mVFMtRQyhsMAnS/BKdvg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19400},"gitHead":"e343eef9afd942b09516a95bd4f3d0b11fe37dde","scripts":{"format":"prettier --write \"src/**/*\""},"_npmUser":{"name":"paveltobias","email":"m@ptx.cz"},"_npmVersion":"8.5.0","description":"A simple generator of TypeScript types from OpenAPI docs","directories":{},"_nodeVersion":"16.14.2","dependencies":{"yaml":"^2.3.1","prettier":"^2.8.8"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/typegen_1.3.0_1694469324446_0.8176885134811485","host":"s3://npm-registry-packages"}},"1.4.0":{"name":"@adbros/typegen","version":"1.4.0","author":{"name":"Adbros"},"license":"MIT","_id":"@adbros/typegen@1.4.0","maintainers":[{"name":"paveltobias","email":"m@ptx.cz"},{"name":"pivoda","email":"pavel.pivoda@gmail.com"}],"homepage":"https://github.com/adbrosaci/typegen#readme","bugs":{"url":"https://github.com/adbrosaci/typegen/issues"},"bin":{"typegen":"src/index.js"},"dist":{"shasum":"99d53338800359b595647f9c9ae8690270a6cc22","tarball":"https://registry.npmjs.org/@adbros/typegen/-/typegen-1.4.0.tgz","fileCount":10,"integrity":"sha512-BkMv5ObA6lyG8xdXl+MpGoBolZoJsRNvcuS5z1XYcPSMYaMvbeKepzeYwF8+ATwuQqbkuR5kZakWQbudJdHEOA==","signatures":[{"sig":"MEYCIQDpMaSSpBW9NYuy4VqJRxJstHvM1yFWCXJKYNzg9CFijAIhAJ7AdIOaIY/e+w48/MgtqufS1THenoRN/GiMMyrXrya8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19569},"gitHead":"35380917952ece87ae912f7920a7f2b3f8576247","scripts":{"format":"prettier --write \"src/**/*\""},"_npmUser":{"name":"paveltobias","email":"m@ptx.cz"},"repository":{"url":"git+https://github.com/adbrosaci/typegen.git","type":"git"},"_npmVersion":"8.5.0","description":"A simple generator of TypeScript types from OpenAPI docs","directories":{},"_nodeVersion":"16.14.2","dependencies":{"yaml":"^2.3.1","prettier":"^2.8.8"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/typegen_1.4.0_1696514766392_0.5278745030293057","host":"s3://npm-registry-packages"}},"1.5.0":{"name":"@adbros/typegen","version":"1.5.0","author":{"name":"Adbros"},"license":"MIT","_id":"@adbros/typegen@1.5.0","maintainers":[{"name":"paveltobias","email":"m@ptx.cz"},{"name":"pivoda","email":"pavel.pivoda@gmail.com"}],"homepage":"https://github.com/adbrosaci/typegen#readme","bugs":{"url":"https://github.com/adbrosaci/typegen/issues"},"bin":{"typegen":"src/index.js"},"dist":{"shasum":"7b579cfaa9308e08391303af88bb280401ea599b","tarball":"https://registry.npmjs.org/@adbros/typegen/-/typegen-1.5.0.tgz","fileCount":10,"integrity":"sha512-ebhOYa3OEOtfnawLOVpLyXJPfPz2ayzVSzx5VM8rkjen1+NuSbv/WuA3D91wgelx4YE7QH7zU0yWYSk2S6/isQ==","signatures":[{"sig":"MEQCIDJxf9RqwuK9McrGl5SQHWT90cHEKY6JVDYf08qhRxvVAiAAvX0GerzNySEQWO3aw658IcQVqeXpZdwxB1sCqVd0qw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19665},"gitHead":"050e1b8add622c19afb635b9f1b58270d4a1bbc6","scripts":{"format":"prettier --write \"src/**/*\""},"_npmUser":{"name":"paveltobias","email":"m@ptx.cz"},"repository":{"url":"git+https://github.com/adbrosaci/typegen.git","type":"git"},"_npmVersion":"10.5.0","description":"A simple generator of TypeScript types from OpenAPI docs","directories":{},"_nodeVersion":"20.12.2","dependencies":{"yaml":"^2.3.1","prettier":"^2.8.8"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/typegen_1.5.0_1717593330002_0.24109771437613903","host":"s3://npm-registry-packages"}},"1.6.0":{"name":"@adbros/typegen","version":"1.6.0","author":{"name":"Adbros"},"license":"MIT","_id":"@adbros/typegen@1.6.0","maintainers":[{"name":"paveltobias","email":"m@ptx.cz"},{"name":"pivoda","email":"pavel.pivoda@gmail.com"}],"homepage":"https://github.com/adbrosaci/typegen#readme","bugs":{"url":"https://github.com/adbrosaci/typegen/issues"},"bin":{"typegen":"src/index.js"},"dist":{"shasum":"0552c3ac6cc0bad98adbb1e2903691e8f46b4852","tarball":"https://registry.npmjs.org/@adbros/typegen/-/typegen-1.6.0.tgz","fileCount":10,"integrity":"sha512-nkPIUDNOJo+BHC7Qo355Ce1EPC81q991/C1vlRlhteQ9e+EZRvD4gsU5BQnNi4g3xmpfvisbLe0+BXb4Ncq2Dw==","signatures":[{"sig":"MEUCIEMVfVWbOEtsNPH+O31WGxje93vP3M5hja0f4/4PDSWoAiEAl9p+U+0VVG+hDSX7mlaMpPf3hzZDoKZQs7hh0HOdwAg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20099},"gitHead":"5825fbf496cee43db568610590eb96fcd3e8f720","scripts":{"format":"prettier --write \"src/**/*\""},"_npmUser":{"name":"paveltobias","email":"m@ptx.cz"},"repository":{"url":"git+https://github.com/adbrosaci/typegen.git","type":"git"},"_npmVersion":"10.5.0","description":"A simple generator of TypeScript types from OpenAPI docs","directories":{},"_nodeVersion":"20.12.2","dependencies":{"yaml":"^2.3.1","prettier":"^2.8.8"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/typegen_1.6.0_1717595967579_0.6374317736258901","host":"s3://npm-registry-packages"}},"1.7.0":{"name":"@adbros/typegen","version":"1.7.0","author":{"name":"Adbros"},"license":"MIT","_id":"@adbros/typegen@1.7.0","maintainers":[{"name":"paveltobias","email":"m@ptx.cz"},{"name":"pivoda","email":"pavel.pivoda@gmail.com"}],"homepage":"https://github.com/adbrosaci/typegen#readme","bugs":{"url":"https://github.com/adbrosaci/typegen/issues"},"bin":{"typegen":"src/index.js"},"dist":{"shasum":"3c02bcfa37324ae99bfd26debf6c1148207d484e","tarball":"https://registry.npmjs.org/@adbros/typegen/-/typegen-1.7.0.tgz","fileCount":10,"integrity":"sha512-+nLnDD1xayT0aIr99rmpJehGvBNq00S31r+U7rV2HkYd5Ms/GOAqqTpu2IGHdB9ys46esmknlZBfoZoIBGBdHA==","signatures":[{"sig":"MEUCIQCSo0Gvog31cNlUhZWE/tRusCLe43gIpN+MnPYUQlcv0wIgEuNiccf7q+T8A+1f4Rrn2IvoY3k9vMdmlWMDPT4qMtI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20174},"gitHead":"118820bcdc7b845bddbe3d3ee67df1d8049430d5","scripts":{"format":"prettier --write \"src/**/*\""},"_npmUser":{"name":"paveltobias","email":"m@ptx.cz"},"repository":{"url":"git+https://github.com/adbrosaci/typegen.git","type":"git"},"_npmVersion":"10.5.0","description":"A simple generator of TypeScript types from OpenAPI docs","directories":{},"_nodeVersion":"20.12.2","dependencies":{"yaml":"^2.3.1","prettier":"^2.8.8"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/typegen_1.7.0_1717596514965_0.17016187078796952","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@adbros/typegen","version":"2.0.0","author":{"name":"Adbros"},"license":"MIT","_id":"@adbros/typegen@2.0.0","homepage":"https://github.com/adbrosaci/typegen#readme","bugs":{"url":"https://github.com/adbrosaci/typegen/issues"},"bin":{"typegen":"src/index.js"},"dist":{"shasum":"182ed8a7d805491b5a823c0bfcb839c125052e25","tarball":"https://registry.npmjs.org/@adbros/typegen/-/typegen-2.0.0.tgz","fileCount":10,"integrity":"sha512-1IY/H/CEZyYuWfEeHuQqNYkvt+q4nhQQoSlBBG4TlRP3RUV7h9wOpveJerDKpp8KG7GO/tsqhFLXAofpZ/qLiw==","signatures":[{"sig":"MEUCIQDjBIKSAdJA0E7sWM+TCza4PtcSP6K3FwplUR1lQP6IJgIgUT+S5ipNUolZ57wMkDop35+q9wfKRXPqGFfp9Ub6Vxo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20180},"gitHead":"9a761bc194238da5e0536ab66b556698af2f5dc6","scripts":{"format":"prettier --write \"src/**/*\""},"_npmUser":{"name":"paveltobias","email":"m@ptx.cz"},"repository":{"url":"git+https://github.com/adbrosaci/typegen.git","type":"git"},"_npmVersion":"10.5.0","description":"A simple generator of TypeScript types from OpenAPI docs","directories":{},"_nodeVersion":"20.12.2","dependencies":{"yaml":"^2.3.1","prettier":"^2.8.8"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/typegen_2.0.0_1719201396553_0.22350675535337539","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"@adbros/typegen","version":"3.0.0","author":{"name":"Adbros"},"license":"MIT","_id":"@adbros/typegen@3.0.0","maintainers":[{"name":"paveltobias","email":"m@ptx.cz"},{"name":"pivoda","email":"pavel.pivoda@gmail.com"}],"homepage":"https://github.com/adbrosaci/typegen#readme","bugs":{"url":"https://github.com/adbrosaci/typegen/issues"},"bin":{"typegen":"bin/typegen.js"},"dist":{"shasum":"547897ee60a0f229b2088d723c4dc8e2f4c0370e","tarball":"https://registry.npmjs.org/@adbros/typegen/-/typegen-3.0.0.tgz","fileCount":12,"integrity":"sha512-yxleh2IUZm2PFKLCYP9jVIr5KNKUff+WUsUeUGpfyQoUtTAaj26OjqFXYlU5l/VAOCxl7B+uZ6M3c5u3To2uLw==","signatures":[{"sig":"MEUCIDYWPg1wgrnefsj7Qlbnb3u5iRooYisAH3Wj4fNflB+uAiEA0nhgSWj5ZHEZ71KMH8DPIDt9Dg+06ugPrsoWi0zptNc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19975},"type":"module","gitHead":"e36499047a8de8e82b8265f0f466515578865798","scripts":{"format":"prettier --write \"src/**/*\""},"_npmUser":{"name":"paveltobias","email":"m@ptx.cz"},"repository":{"url":"git+https://github.com/adbrosaci/typegen.git","type":"git"},"_npmVersion":"10.5.0","description":"A simple generator of TypeScript types from OpenAPI docs","directories":{},"_nodeVersion":"20.12.2","dependencies":{"yaml":"^2.5.0","prettier":"^2.8.8"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/typegen_3.0.0_1724105503385_0.8379485524809227","host":"s3://npm-registry-packages"}},"3.1.0":{"name":"@adbros/typegen","version":"3.1.0","author":{"name":"Adbros"},"license":"MIT","_id":"@adbros/typegen@3.1.0","maintainers":[{"name":"pivoda","email":"pavel.pivoda@gmail.com"},{"name":"paveltobias","email":"m@ptx.cz"}],"homepage":"https://github.com/adbrosaci/typegen#readme","bugs":{"url":"https://github.com/adbrosaci/typegen/issues"},"bin":{"typegen":"bin/typegen.js"},"dist":{"shasum":"9314d657e5fb320b0e394bfe1fe57b4b29121d59","tarball":"https://registry.npmjs.org/@adbros/typegen/-/typegen-3.1.0.tgz","fileCount":12,"integrity":"sha512-C09KG8G17FZF8bwRB4ytyDRE6KIzz5+HUjiuML51SvwiM9lXRmqy5fdHOvg5t3JEbJc6b2dEvkV6+/nKeGPatg==","signatures":[{"sig":"MEUCIGQehjbwy4a6Y98uksG9APcxxw5fucTMhdjTtDZtQraDAiEAvjgiFJlyM3Q2IsH/Jinw8JsmXeHHPmS2+6shsyydOWE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20193},"type":"module","gitHead":"bfdfbe2629b77c0ea234b70b085d648c2d1e6d09","scripts":{"format":"prettier --write \"src/**/*\"","release":"bumpp && npm publish"},"_npmUser":{"name":"pivoda","email":"pavel.pivoda@gmail.com"},"repository":{"url":"git+https://github.com/adbrosaci/typegen.git","type":"git"},"_npmVersion":"10.2.4","description":"A simple generator of TypeScript types from OpenAPI docs","directories":{},"_nodeVersion":"20.11.1","dependencies":{"yaml":"^2.5.0","prettier":"^2.8.8"},"_hasShrinkwrap":false,"devDependencies":{"bumpp":"^9.10.1"},"_npmOperationalInternal":{"tmp":"tmp/typegen_3.1.0_1736946442967_0.9945302128622642","host":"s3://npm-registry-packages-npm-production"}},"3.1.1":{"type":"module","name":"@adbros/typegen","version":"3.1.1","description":"A simple generator of TypeScript types from OpenAPI docs","author":{"name":"Adbros"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/adbrosaci/typegen.git"},"scripts":{"format":"prettier --write \"src/**/*\"","release":"bumpp && npm publish"},"bin":{"typegen":"bin/typegen.js"},"dependencies":{"prettier":"^2.8.8","yaml":"^2.5.0"},"devDependencies":{"bumpp":"^9.10.1"},"_id":"@adbros/typegen@3.1.1","gitHead":"364510923911f579a8378a7731baf02ea946c5bf","bugs":{"url":"https://github.com/adbrosaci/typegen/issues"},"homepage":"https://github.com/adbrosaci/typegen#readme","_nodeVersion":"20.11.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-py+FjzUhZcd19/i7gZGu1DM1uQQRQ8ErSV2gzgPY7GifJpfTOQ6p2wTQuA61+YVeN3Oz3ZpZCbFKA2HGrNHZ5A==","shasum":"2639f4b30cd87f050788c8ce72fd7290d711112b","tarball":"https://registry.npmjs.org/@adbros/typegen/-/typegen-3.1.1.tgz","fileCount":12,"unpackedSize":20193,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCeJ0vItjVCVGbuAFk5i541I9UOT/c4fcPFp7ZOid6odgIgdyhY31/bsaLOvsMaDvwFS0wv2KH4XnaxOGK1ptf3Mpg="}]},"_npmUser":{"name":"pivoda","email":"pavel.pivoda@gmail.com"},"directories":{},"maintainers":[{"name":"pivoda","email":"pavel.pivoda@gmail.com"},{"name":"paveltobias","email":"m@ptx.cz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/typegen_3.1.1_1741053170100_0.9731392480482324"},"_hasShrinkwrap":false}},"time":{"created":"2023-07-13T00:33:11.359Z","modified":"2025-03-04T01:52:50.508Z","1.0.0":"2023-07-13T00:33:11.673Z","1.1.0":"2023-07-20T13:33:27.247Z","1.2.0":"2023-07-25T14:18:32.049Z","1.3.0":"2023-09-11T21:55:24.634Z","1.4.0":"2023-10-05T14:06:06.556Z","1.5.0":"2024-06-05T13:15:30.141Z","1.6.0":"2024-06-05T13:59:27.746Z","1.7.0":"2024-06-05T14:08:35.109Z","2.0.0":"2024-06-24T03:56:37.247Z","3.0.0":"2024-08-19T22:11:43.553Z","3.1.0":"2025-01-15T13:07:23.197Z","3.1.1":"2025-03-04T01:52:50.283Z"},"bugs":{"url":"https://github.com/adbrosaci/typegen/issues"},"author":{"name":"Adbros"},"license":"MIT","homepage":"https://github.com/adbrosaci/typegen#readme","repository":{"type":"git","url":"git+https://github.com/adbrosaci/typegen.git"},"description":"A simple generator of TypeScript types from OpenAPI docs","maintainers":[{"name":"pivoda","email":"pavel.pivoda@gmail.com"},{"name":"paveltobias","email":"m@ptx.cz"}],"readme":"# Typegen\n\nA simple generator of TypeScript types from OpenAPI docs.\n\n## Installation\n\n- Install the NPM package: `npm install --save-dev @adbros/typegen`.\n- Create a `typegen.config.mjs` file and export a valid config object from it. See *Configuration* (below) for details.\n\n## Usage\n\nEach time the OpenAPI doc changes, run `npx typegen` in the directory containing `typegen.config.mjs`.\n\n## Configuration\n\nThe `typegen.config.mjs` file should be present in the current working directory when running the `typegen` utility. (Usually, it makes most sense for it to reside in the project's root directory -- next to `package.json`, `tsconfig.json`, etc.).\n\nThe config object exported from  `typegen.config.mjs` (using ESM default export) should have the following properties:\n\n- `inputDoc` **(required)** -- A string containing the path to the input *OpenAPI 3.0.x* doc.\n- `outputDir` **(required)** -- A string containing the path to the output directory.\n- `hooks` -- An optional child config object containing convenience funtions to be called before/after the type generation itself. Both functions are optional. Both are called with zero arguments. Both may return a promise; the program's execution will be blocked until the promise's resolution. Both may throw or return an eventually rejected promise, in which case the program will be prematurely terminated with a nonzero exit code.\n  - `before` -- Called before the input doc is loaded. Useful e.g. for fetching the doc from an external source, generating the doc from other data, performing custom validation on the doc (and throwing/rejecting on failure to prevent the type generation itself), etc.\n  - `after` -- Called after the type generation is finished and the files written. Useful e.g. for custom post-processing of the generated files.\n- `endpoints` -- An optional child config object containing options related to the rendering of endpoints as arbitrary TypeScript constructs. If not given, `endpoints.ts` is not generated at all. If given, it **must contain**:\n  - `renderEach` -- A function, called for each endpoint (i.e. each path-method pair), that maps available info about the given endpoint to a string containing arbitrary TypeScript code. If a [nullish](https://developer.mozilla.org/en-US/docs/Glossary/Nullish) value is returned from the function instead, the given endpoint is excluded from the output. The function is always called with a single argument -- an object containing the following properties:\n    - `path` (`string`) -- the path as specified in the input doc;\n    - `method` (`string`) -- the name of the HTTP method in lower case, e.g. `post`; \n    - `pathType` (`string`) -- a string literal type or template literal type describing the path including path parameters, e.g. ``` `/customer/${number}/invoices` ```;\n    - `requestType` (`string`) -- the type of the request body, e.g. `Invoice`;\n    - `responseType` (`string`) -- the type of the response body for status code `200`, e.g. `{ invoices: Invoice[]; totalCount: number }`;\n    - `paramsType` (`string`) -- the type describing an object, where each property corresponds to a single query parameter accepted by the endpoint, e.g. `GetInvoicesParams` (defined in `params.ts` as e.g. `{ limit: number; offset: number }`);\n    - `paramsExpected` (`boolean`) -- whether there is at least one query parameter accepted by the endpoint;\n    - `paramsRequired` (`boolean`) -- whether there is at least one query parameter required by the endpoint;\n    - `bodyExpected` (`boolean`) -- whether the endpoint expects a request body;\n    - `bodyReturned` (`boolean`) -- whether the endpoint returns a body within each response with status code `200`.\n  - `renderModule` -- A function which maps the concatenated output of `renderEach` calls to a string containing the final TypeScript module. It takes an object with the sole property `content`.\n\n### Example\n\nThe following config defines the generation of a valid subtype of an [Axios](https://axios-http.com) instance, which only permits calls to existing endpoints using overloaded method signatures. This is useful because:\n\n- calls to nonexistent endpoints are disallowed;\n- correct request bodies/parameters are enforced;\n- the return type -- corresponding to the matching endpoint's response type -- is automatically inferred for each valid call.\n\n```js\nexport default {\n  inputDoc: 'path/to/openapi.yaml',\n  outputDir: 'path/to/output/directory'\n  endpoints: {\n    renderModule: ({ content }) => `export type Api = { ${content} };`,\n    renderEach: ({\n      method,\n      pathType,\n      requestType,\n      responseType,\n      paramsType,\n      paramsExpected,\n      paramsRequired,\n    }) => {\n      switch (method) {\n        case 'get':\n          return paramsExpected\n            ? `${method}(\n              path: ${pathType},\n              config${paramsRequired ? '' : '?'}:\n                { params: ${paramsType} },\n            ): Promise<{ data: ${responseType} }>;`\n            : `${method}(\n              path: ${pathType},\n            ): Promise<{ data: ${responseType} }>;`;\n        case 'post':\n        case 'put':\n          return `${method}(\n            path: ${pathType},\n            body: ${requestType},\n          ): Promise<{ data: ${responseType} }>;`;\n        default:\n          return `${method}(\n            path: ${pathType},\n          ): Promise<{ data: ${responseType} }>;`;\n      }\n    },\n  },\n};\n```\n","readmeFilename":"README.md"}