{"_id":"ts-mongoose","_rev":"32-2dae335270a1aaf51a070d9450d78d4c","name":"ts-mongoose","dist-tags":{"latest":"0.0.24","beta":"0.0.20-beta.3"},"versions":{"0.0.1":{"name":"ts-mongoose","version":"0.0.1","description":"","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"ISC","_id":"ts-mongoose@0.0.1","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"lsentkiewicz","email":"sirmims@gmail.com"},"dist":{"integrity":"sha512-VYj8e8cuY14QcyvxsVDcsxrUM44azKIkM5LN+H7rJ2H1DrDl9x2hTp32JSbyImBhYtD0Pb4INfHaDaUrqGrd0A==","shasum":"b2c3195266a48d2c6405213b09d08269df2ac8f8","tarball":"https://registry.npmjs.org/ts-mongoose/-/ts-mongoose-0.0.1.tgz","fileCount":1,"unpackedSize":207,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCYYyNOpIPTH+Tyl8EYAplXvQJ0WT5xALPczQsJH9l8VAIhANVHlX3I54YszNnc0yLDYqLKMzb5XenS2KNbh0zifXwL"}]},"maintainers":[{"name":"lsentkiewicz","email":"sirmims@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-mongoose_0.0.1_1520011436696_0.9243035446464709"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.2":{"name":"ts-mongoose","version":"0.0.2","description":"Automatically infer TypeScript interfaces from mongoose schemas.","main":"dist/commonjs/index.js","module":"dist/es/index.js","jsnext:main":"dist/es/index.js","types":"dist/es/index.d.ts","scripts":{"jest":"jest","tsc":"tsc","test":"yarn run tsc --noEmit && yarn run jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/BetterCallSky/ts-mongoose.git"},"author":{"name":"Łukasz Sentkiewicz"},"license":"MIT","bugs":{"url":"https://github.com/BetterCallSky/ts-mongoose/issues"},"homepage":"https://github.com/BetterCallSky/ts-mongoose#readme","devDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14","@types/jest":"^23.3.9","jest":"^23.6.0","prettier":"^1.14.3","ts-jest":"^23.10.4","typescript":"^3.1.6"},"dependencies":{},"peerDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14"},"gitHead":"230dca83541dfa411903f110c40b8aa787a2dee7","_id":"ts-mongoose@0.0.2","_npmVersion":"6.4.1","_nodeVersion":"8.10.0","_npmUser":{"name":"lsentkiewicz","email":"sirmims@gmail.com"},"dist":{"integrity":"sha512-IxYVRcJjxij7V3K8eytuTg6nam2pKSW92OrPDNkj5XetnVCieH1KVwHIkx3yESkJHnMHSdMeejR/mrj4j5Trwg==","shasum":"b72c3b2a61705f73c9b080adc1f87c4698c18aa0","tarball":"https://registry.npmjs.org/ts-mongoose/-/ts-mongoose-0.0.2.tgz","fileCount":44,"unpackedSize":181870,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcBX82CRA9TVsSAnZWagAAQ8IQAI1RndBdOTdS/pthR2tO\n+ddt4w3aC2/0l8/kJjrb/0U+U7Drn2FGZfom16V3IbqXrC/VdH31v9aDSfmB\nLkiw+V0iYIU7Ym0o6kDOV5FJJcHQtybZJda6SkQzhodFZtxLK0jQAt9j5cOK\nYMETUqaxKQ/kh/NaS8JYuO70xHuJ8sircj2qJ4fvPxc4F6p+0NMZL4HNRQrS\nuP+7u+5XDoeWI9lnH6xw5lt0cxN6IjN1lADo/9JLi0hzW3Qv1fVxpi2HJfcS\nZ3qdvx7IEduDmzb+QgUSnLfStrwkNjwYqWE8T5pIyc0AgV2emoQSsz2APZoU\nEeR2fCJY59QSo/o2rc96mcAHzYM95adgwJNOcKpKi2k9r0EnZshuY7HKGjED\nd8T5focOPMbV6faTK4JAldRHzaJsnjq5oFqc5l8HlZtD2gBHIR8ynBKAbtY0\nBcnyLHDPVeAkp6UVVzglADxNzVcx396wBN21O2v2Q6lWobykirQcBIwC1ET0\ndTXsZKrzZ7Qk6pnN8FxxedsavlFrsf+xCMsNOPQGQ6URDNxow07b4pmeVnIe\nw3lbICAA4SOLGZBoYUU1qeiOubMyPbKQU8xUGvn9ah2UvD2l1MSkAmcp8zF7\nzocLKe32RhXTmVUj2qXw9uDEezEDu1W1lp/3Qvd0h8XIeLhHdAgPMlOvPvFv\nq0Ze\r\n=lvlO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBaC9RrbXuLGZM/I5VaZ50ZnZ55Tfc81S+JC2YWrzg5HAiEA4dQB4fzTvO8vTT3W8QDBqAJnYLkCSm5UgepoGtyCiug="}]},"maintainers":[{"name":"lsentkiewicz","email":"sirmims@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-mongoose_0.0.2_1543864117875_0.4691139373269986"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.3":{"name":"ts-mongoose","version":"0.0.3","description":"Automatically infer TypeScript interfaces from mongoose schemas.","main":"dist/commonjs/index.js","module":"dist/es/index.js","jsnext:main":"dist/es/index.js","types":"dist/es/index.d.ts","scripts":{"jest":"jest","tsc":"tsc","test":"yarn run tsc --noEmit && yarn run jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/BetterCallSky/ts-mongoose.git"},"author":{"name":"Łukasz Sentkiewicz"},"license":"MIT","bugs":{"url":"https://github.com/BetterCallSky/ts-mongoose/issues"},"homepage":"https://github.com/BetterCallSky/ts-mongoose#readme","devDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14","@types/jest":"^23.3.9","jest":"^23.6.0","prettier":"^1.14.3","ts-jest":"^23.10.4","typescript":"^3.1.6"},"dependencies":{},"peerDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14"},"gitHead":"fbad8637fe0d929ef181a756003d46f3aaa3846f","_id":"ts-mongoose@0.0.3","_npmVersion":"6.4.1","_nodeVersion":"8.10.0","_npmUser":{"name":"lsentkiewicz","email":"sirmims@gmail.com"},"dist":{"integrity":"sha512-jB/A/xLlDtcj4A3qkZ9qCTbLdjR/YJpoPeDdcImL+9Dl2WKiTurfhgtvFFb20Clzfqlb4OSa+u9T7J4Xt0QzmQ==","shasum":"c4f1f7f37d859deb4aa6f819488f82070fb6ffdc","tarball":"https://registry.npmjs.org/ts-mongoose/-/ts-mongoose-0.0.3.tgz","fileCount":44,"unpackedSize":181887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcBYBgCRA9TVsSAnZWagAA1XYP/RxYPfeaMkB498UTrEnR\nywYvplD4ZFqFkHAPy8o3vnDFdORhqnG4m8jZbruS8Yq/5NRfPrx3p1fC18Yy\nwkUXWOMQvl8LXbK95Ey3nmNVEIL/1NsDnbb3p7/46eJT0m799s2iYDVH1Gsg\n7KyRIA7N0nzK1o3hZrxDhbhrJfk88QWo3UYylYUu37utGxyTV8XSTRojJQ7l\nIsMF9i00mzlvCwuuoHD+37LNcY8GiygMx4H1/kndfuN/+JWozt9BwjqXIpZs\nhoD/H8rXXSJUsSoyvYGzvn3TX6zFILl1OixywcgT8eK5O5MTRNZNlsc/3bpb\ne1shUGESBjda+Cx/IlbTxECqj9S13cOtIye9efoeoT9rgag+RmEGEuy5f0t0\nBYt22onSA8hn0pGm7z6QEQ6DkOGLi3Bba6kCngdduWsXF25lCH1uIsKYjY4l\nr0P2B//tLMz6AMuYxUWQ1tFKiiN882n9xZ/aHtPl8nlpW5dRbLUbgHNOVZ8x\nC1s5NUwW3kpg25kgPINLP64fjAmCYZ0ZrUrOzZM9T68ul0jFZldwVZk72Bg4\nFCWSoYx9nwn86Hi6ou2CwpP5GKmdbfxC0jVd/sdBfevfTbgVIHFurbIqcqPq\nw1a2ejIzivRZ3u5vDIFU6JcPjc9WVFBPIMx5QTilsMsxHZAAmeQ2H9u5IwTw\nVnOd\r\n=15lV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChZwubyuDyJU6RfSX+iDZulxwVIYd7r53W8zW4SLXYtgIhAPtyGf2KiUulDBCxB+owWxo/pD6Od58FX89VSaGa+8jS"}]},"maintainers":[{"name":"lsentkiewicz","email":"sirmims@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-mongoose_0.0.3_1543864415664_0.7856843086413667"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.4":{"name":"ts-mongoose","version":"0.0.4","description":"Automatically infer TypeScript interfaces from mongoose schemas.","main":"dist/commonjs/index.js","module":"dist/es/index.js","jsnext:main":"dist/es/index.js","types":"dist/es/index.d.ts","scripts":{"jest":"jest","tsc":"tsc","test":"yarn run tsc --noEmit && yarn run jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/BetterCallSky/ts-mongoose.git"},"author":{"name":"Łukasz Sentkiewicz"},"license":"MIT","bugs":{"url":"https://github.com/BetterCallSky/ts-mongoose/issues"},"homepage":"https://github.com/BetterCallSky/ts-mongoose#readme","devDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14","@types/jest":"^23.3.9","jest":"^23.6.0","prettier":"^1.14.3","ts-jest":"^23.10.4","typescript":"^3.1.6"},"dependencies":{},"peerDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14"},"gitHead":"57a6700841b2a3d634b51eec7a1080d491f7af79","_id":"ts-mongoose@0.0.4","_npmVersion":"6.4.1","_nodeVersion":"8.10.0","_npmUser":{"name":"lsentkiewicz","email":"sirmims@gmail.com"},"dist":{"integrity":"sha512-+CS+Z9McIylkXMpth8tUCsdffltPYEbYZrq22qIHz/uREwwy2uxZE/4NSceegD5hQIcZMJeYwm7gWVWGWy4aJA==","shasum":"0590d1dafb4ef0734966b722b139f86763a907f7","tarball":"https://registry.npmjs.org/ts-mongoose/-/ts-mongoose-0.0.4.tgz","fileCount":79,"unpackedSize":4305449,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcBrvnCRA9TVsSAnZWagAAeWgP+QGZsM64C5qt20FBW5tp\nm/ynBR5td17bj8d9QBMOPioHnAnMv6xYnUIEOefGUjNwzds0hDsx7firxhWI\n1lCzN5QbaFy9d2hLoMlaZ3eNrowXr0R1CgtCurPf+cfIk+fl2d2PG+5xBVdD\nY3kLNRa35hClXjHUlfnzDfv9CKGCUOAz/bGCq2EqTYC81EQfL6UXkLZkkvgD\nk6sMUye4AlzV7+c7R1Z/2vpHvGVYU0EVQxBabpoVUpMqljBbfQel/AY4XIuL\nGWuD/AjwLPpk3gXQ6UgTZvlAKRmkj4k0LLJCd/lf/SxLuloYqvF82YsJqdh0\ne5BslYRuQXksfcB1Y7yaDLb7+31OGtuONx72ODQNi8ovpFKlyHsPblT+xi9P\nyJiRiyMFeaWf+oA8xBRn+k+zeYct1ZEWK9pJ+Icj/nUeErf+i3Ydpt/7ReyC\n5XHbv6BoNYstiy6MhECD+zfxTcTd2YSDcziqididwZIzMDg8BWCutmM2JFlw\nbW4sySPiwMvSN+6wdsoR7h8eTwv2751z8Poh/VzjMolN4r32n7kKDNfteQiv\ncmVt33u9wDlQt2Kftje6GOvqUPYXImLiPECmuKe4AgwCeRzw+3hjZMi1Oxrg\nmWI10PgH11G39rL36rpUU0B0md2XF3UR68mrISk8Y+2BjvcvJaPXeFGbxNtR\nwrNL\r\n=IqAJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGIKmDVAU60tjohPz05VcdYzcS1ktvtuMM/e/lGfE1eAIgI9Dft5bhR7xHKVCZ421h52A9TEGzzuFGGM3nAUm7CfM="}]},"maintainers":[{"name":"lsentkiewicz","email":"sirmims@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-mongoose_0.0.4_1543945190651_0.6256710355866542"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.5":{"name":"ts-mongoose","version":"0.0.5","description":"Automatically infer TypeScript interfaces from mongoose schemas.","main":"dist/commonjs/index.js","module":"dist/es/index.js","jsnext:main":"dist/es/index.js","types":"dist/es/index.d.ts","scripts":{"jest":"jest","tsc":"tsc","test":"yarn run tsc --noEmit && yarn run jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/BetterCallSky/ts-mongoose.git"},"author":{"name":"Łukasz Sentkiewicz"},"license":"MIT","bugs":{"url":"https://github.com/BetterCallSky/ts-mongoose/issues"},"homepage":"https://github.com/BetterCallSky/ts-mongoose#readme","devDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14","@types/jest":"^23.3.9","jest":"^23.6.0","prettier":"^1.14.3","ts-jest":"^23.10.4","typescript":"^3.1.6"},"dependencies":{},"peerDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14"},"gitHead":"5d325da0579a5703607c9748015b9153a31a27cc","_id":"ts-mongoose@0.0.5","_npmVersion":"6.4.1","_nodeVersion":"8.10.0","_npmUser":{"name":"lsentkiewicz","email":"sirmims@gmail.com"},"dist":{"integrity":"sha512-/fdrYKJIAJn3KvRz786RIf9n8DgOP2ST9HghGh15ttnaAJdmVhTt82Qm1aq5ojEyiGGPoakiBoySv/30R6ABhQ==","shasum":"6180efd47fcc19a08323ecdb257635918c618ec6","tarball":"https://registry.npmjs.org/ts-mongoose/-/ts-mongoose-0.0.5.tgz","fileCount":79,"unpackedSize":4305451,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcBrx1CRA9TVsSAnZWagAAl0MP/0SPnxQfDwIJDm7kl2ZY\nbdpgOcmb+sr4+0h3VWDDMbQx0tw57BNYllS5CK/f+JktK5bC0hUMxEat1h/X\n/vXv1HmKGyNFjwofCPKZBZrPviWr480kfHA+zcVGPA174vQD8XNQl6he2i/G\nXAbk+eRaYGFLYLbdluIGuajL3CLeEExx4Kx/Fh/bTb0L7ffyKi/SuZThcz2Z\n/f6XOluU84CB8bniFbCgc1/TmtPDiVwa1NGXSBFjJ0V4QKW3AV7zlo859o7M\nK1axxva29+9a3GQgRpjeCOZ+70EsljV59WIWFz1sV6NGf1hdtx6e0Adl4Ek6\ngRZVhamG1S7TGweooi/2sY19t1ACrjT1rVimhaf79VjKmXcyB05FS7QVBOzQ\nLlajX9jrsBDcsvX1TFFhxrIZX1VrxYMyM0nmUDv7tdQlVAoSRVWuSecfyw5a\nWwoDznRvIS3Y7pYUGWlseqoSPG3aq29aGFmXQrBI2uJgTfAqYNlul53d4RAS\nTesmOyKhUncKQ0IynauYW4rdiw25TPSVXcZs/Du0ebJQRDIs9CAjQk571/3c\nw/8JFW5+N2DZALYsZ26Xf6jpAILHxnYN36/aAbFHkXax1/+00HaCcHIHC9GH\nT8OhkOpOdma8iwvaa+aO0k+TJXekblO2GPnpVxn0YWk6VwZfbQy6I6cPwc6Q\nz21+\r\n=u6Qs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDv8yTzY1ApS4MsMvM5vT2MR2ixsL6On1ilPyWH0/yFngIhALWeI9s0UNuQWL17e6DQnGqt+/qpBsHdK0VR7h70iD4u"}]},"maintainers":[{"name":"lsentkiewicz","email":"sirmims@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-mongoose_0.0.5_1543945332563_0.16555776164461733"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.6":{"name":"ts-mongoose","version":"0.0.6","description":"Automatically infer TypeScript interfaces from mongoose schemas.","main":"dist/commonjs/index.js","module":"dist/es/index.js","jsnext:main":"dist/es/index.js","types":"dist/es/index.d.ts","scripts":{"jest":"jest","tsc":"tsc","test":"yarn run tsc --noEmit && yarn run jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/BetterCallSky/ts-mongoose.git"},"author":{"name":"Łukasz Sentkiewicz"},"license":"MIT","bugs":{"url":"https://github.com/BetterCallSky/ts-mongoose/issues"},"homepage":"https://github.com/BetterCallSky/ts-mongoose#readme","devDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14","@types/jest":"^23.3.9","jest":"^23.6.0","prettier":"^1.14.3","ts-jest":"^23.10.4","typescript":"^3.1.6"},"dependencies":{},"peerDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14"},"gitHead":"bc2d54892e39a12f2ce6d0d5e4f441f9a62df272","_id":"ts-mongoose@0.0.6","_npmVersion":"6.4.1","_nodeVersion":"8.10.0","_npmUser":{"name":"lsentkiewicz","email":"sirmims@gmail.com"},"dist":{"integrity":"sha512-DVtZbKKcNYJwSIWP85cy0EIv2K3Y6fH8SKhkMmglarCL1X3FoaVQoG8nC5/s+tgEo4ruo8WIrg80dMBZTYAOiw==","shasum":"5ac77d50bc794bc0345642b6136591c37d45cb4a","tarball":"https://registry.npmjs.org/ts-mongoose/-/ts-mongoose-0.0.6.tgz","fileCount":55,"unpackedSize":4291190,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcB9OWCRA9TVsSAnZWagAAQ3UQAJRQrvecxZmZpPiQ040f\nMAF1Go5+e6wiMjtAHDsNEbPVUu01C7jUO+yvpKanTiTpfoxdyR5Thn+SlBB+\nUBr2WOneXjD3J+aJHuUF8LDNjesNiZft13TfgqSA9L2p3m6bhRzXCD+NY5PB\n1WJBfqgd4Zd9S8sTfsMiHO5QrV4suuEtRvITLztokqIstj+u8GG9OM+T6gZM\nuTFakrzldfsMJt/QRDj9OQbRz8hi3MQE0GjLWERUuQTJ5hcqFnfG1HoKqOgZ\nJaF72Ap3XvOnABCs1dRiSd8oX5biNZez1y9bWBjJncg8OVsRA7Yi1JC33Tao\n2+Be0vBJW5ev/J/fCxamKLtkudpL9aTLB80EQjtLD5iaYeuXlKuofkKGqXM7\nwD0lEKbcyH3LAt/JrUkdDw3YBYv4m8i8SBVy70X3tyR45ns8LnQZqERlVUjL\nFKeFd3vwD4STr4koGkXtc3ns7MfWAHYFahBylDdh9QxUGo9Q2IInayRi5SvA\nW+AVFvL5Dp9hQ/h3adGc+VBqEZ2u1WBFAhTQ/kCMZoK+6h0S3q4PYp9M7pSh\n6uF3GEw9lEn4nwVY3PFTo0HWGWZhHO9l1w8idVu49hnyP53m3HIE4QY+7ImM\nyXiSTekU6waDa04Ji2QhjYpmBffaBp2Qzm4cwDT2kFv6s20Zo6rkntsNYOkq\nsmwS\r\n=kk3N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG/TNdPwrlQU8lUK3iNw0BGZB2GgGt1Wn5h2E04aHMrLAiBBtGU3Eou/yKasS7RcwHDqKSNqV+dRkW7Hjiow0PJLXQ=="}]},"maintainers":[{"name":"lsentkiewicz","email":"sirmims@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-mongoose_0.0.6_1544016788976_0.4963992946346061"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.7":{"name":"ts-mongoose","version":"0.0.7","description":"Automatically infer TypeScript interfaces from mongoose schemas.","main":"dist/commonjs/index.js","module":"dist/es/index.js","jsnext:main":"dist/es/index.js","types":"dist/es/index.d.ts","scripts":{"jest":"jest","tsc":"tsc","test":"yarn run tsc --noEmit && yarn run jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/BetterCallSky/ts-mongoose.git"},"author":{"name":"Łukasz Sentkiewicz"},"license":"MIT","bugs":{"url":"https://github.com/BetterCallSky/ts-mongoose/issues"},"homepage":"https://github.com/BetterCallSky/ts-mongoose#readme","devDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14","@types/jest":"^23.3.9","jest":"^23.6.0","prettier":"^1.14.3","ts-jest":"^23.10.4","typescript":"^3.1.6"},"dependencies":{},"peerDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14"},"gitHead":"4f3b1e1bd9b35f30121647e8ffa87a5f7da0bc90","_id":"ts-mongoose@0.0.7","_npmVersion":"6.4.1","_nodeVersion":"8.10.0","_npmUser":{"name":"lsentkiewicz","email":"sirmims@gmail.com"},"dist":{"integrity":"sha512-5dG5Vuwx3wG01VeTMedNyiVdoisUSZlcEJxqJ5UrzyIrGx8Tr2VV5C1bbBFu2S6CMHTEODkPOy/vX9UJiMeYeA==","shasum":"4c917c92dc397a46812f94589117fad0ef8c0dd8","tarball":"https://registry.npmjs.org/ts-mongoose/-/ts-mongoose-0.0.7.tgz","fileCount":55,"unpackedSize":4291267,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcC6xWCRA9TVsSAnZWagAAmx8P/R4/JgmLVuMmEyqJPEue\nCA412723Jv25tPxh5gAJKnUhut2t3pR1o16oMtr66/Xbp8mOuYHudT1RRqgH\n4n7jDrMkStHVGv+T0y7mTxNoZfHslB3VvtVVsZSRwFRnjOjEynYWNYyibHlr\nAQEsQy1HPDsGPYYGurE6aVxQkS8lScecnKCaWYghvTUPjpSAlIeLjg3Bl7jM\nsjJy1dUGhcldSC75nmYDnU6uwxmdr98R+TcOvfRwaE6HAdqRYVDeXwaSNKrd\nSq9c88bLFlaTFQ1nof9KKfB/2tcyuVFQYqdzFS2V8EQVxInGxQ7SCLH9wff0\nEinizoy5j0qJOti2s5a9lGJ3A0KyspZKWEtXmp56ypd+rkJI/WgquIY5c2RQ\niM5tdWmk61re8C1WHLPZcukGMy7mvlLbkDyNzI/x3YRvORhYvPbT+szJNswv\nNHqDs9cElfYWSnrROhUZA/5sb9j13dsdPS1KQveq/JaK5qTHLJZe/0aPtZlc\n5/2Rb9aO4cnvDioFMlVg+QPPbcaX8GUaQoXJGUkeh9gjFBsIB5BPE4ACWH9f\ny/PcZKNCJ6zawZ4lFCKt8AnA+xRYYQdsEIZVJphVTqIPO1a0sbNO83lzOSZq\nkieitUxpJptYwEjtJ0Q/qObmIUjOEDlLofLVqzO+RV9FOSTElycVgpzyKrk8\nGSVK\r\n=sxhq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHdKxfQ65Q+STrFbonZd6B1Y9gnwEZVrumem4dpO7lWoAiEAyetoD4zw6bQauxs14Qpi4gt9UuedYXlFHNmCulIQ3pY="}]},"maintainers":[{"name":"lsentkiewicz","email":"sirmims@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-mongoose_0.0.7_1544268886067_0.7774365184030321"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.8":{"name":"ts-mongoose","version":"0.0.8","description":"","main":"index.js","module":"es/index.js","jsnext:main":"es/index.js","types":"index.d.ts","scripts":{"jest":"jest","tsc":"tsc","test":"yarn run tsc --noEmit && yarn run jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/BetterCallSky/ts-mongoose.git"},"author":{"name":"Łukasz Sentkiewicz"},"license":"MIT","bugs":{"url":"https://github.com/BetterCallSky/ts-mongoose/issues"},"homepage":"https://github.com/BetterCallSky/ts-mongoose#readme","devDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14","@types/jest":"^23.3.9","jest":"^23.6.0","prettier":"^1.14.3","ts-jest":"^23.10.4","typescript":"^3.1.6"},"dependencies":{},"peerDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14"},"_id":"ts-mongoose@0.0.8","_npmVersion":"6.4.1","_nodeVersion":"8.10.0","_npmUser":{"name":"lsentkiewicz","email":"sirmims@gmail.com"},"dist":{"integrity":"sha512-xPXKQIe69CCQ7r2YT0rAEZl/KhWR1OWQqfQm2ASpMQieyqivN29XJcZx28K1/soC4cMtDiNZPd5OIvyRG+dtvQ==","shasum":"a66cb60c50a2d6ef8a0b9a6bb5df08fff74fef7d","tarball":"https://registry.npmjs.org/ts-mongoose/-/ts-mongoose-0.0.8.tgz","fileCount":25,"unpackedSize":15447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcD6YkCRA9TVsSAnZWagAAD9MP/2scaxQama6Wgci1QQDF\nxUetchn8WvKViS8H4lL1oe3RuTTpZkalfXkr83rAbzLQdev5oepZ86dM367y\nqFOTsXRsShb9GElCIQ+5LkoCZ9CgrNM6nTs2XBp24gE0/Tcoden0iUWCxKhX\n4fJ5VoeXribzJkh40e5sAm87qgiZ952c9qabqk5rnEZFIDK9i92Y7fT3hHsA\nt55dGqfXKKh7zpnJPWZwNtuRO8gdwGge34RH5SCd746Hs5duizdU8sdRMH02\nhQHmib/1mBihqo30HAXTYQH55Xz8EtQvHBUh0LSw+u6pgtgXSAK3PN0ZJFh9\n59RXNoWy3xqJVylTd1mimXY6lszYLWaLt5KSI2CqKzMh2VATWzN5w89VkhFi\nWyjt7bnjhekQ1YGxK3gd3slLJArujxUxCvk93NBKlucL1DPUJDpyvJmWZCxn\nmlDsr7+gbSsav7m2v0euPD0xMElfzyg4TCc1JTaVkk7W6bFCPBoh8a/bdgx0\nh1Z0NCOMWRrWeiAXWgcKzSfIXI94HE03bo106KzZ37ejqaXgVkGP4CEyU4EF\nLE+H6lrRxbzEpVXG6F3mKxA1Dbi3NK+KeHGbrUO1tR0sgdNdZBaU+8o2pH5G\nPoDlJEvLN9Cm4GH+xhPD9LR7zUGfg6fEQ8axVacc37/Eusw9q25KcpWCXCqs\nFBuH\r\n=CNTu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVBAkKkmEinKkV10JghlSdFd+0on0vhxf9S2pfRSeliwIgXDQHzkBiqXMq0X4Z17sa/5ysvgDVP5n9DiPRzsREmjI="}]},"maintainers":[{"name":"lsentkiewicz","email":"sirmims@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-mongoose_0.0.8_1544529443580_0.48502434701283637"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.9":{"name":"ts-mongoose","version":"0.0.9","description":"Automatically infer TypeScript interfaces from mongoose schemas.","main":"index.js","module":"es/index.js","jsnext:main":"es/index.js","types":"index.d.ts","scripts":{"jest":"jest","tsc":"tsc","test":"yarn run tsc --noEmit && yarn run jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/BetterCallSky/ts-mongoose.git"},"author":{"name":"Łukasz Sentkiewicz"},"license":"MIT","bugs":{"url":"https://github.com/BetterCallSky/ts-mongoose/issues"},"homepage":"https://github.com/BetterCallSky/ts-mongoose#readme","devDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14","@types/jest":"^23.3.9","jest":"^23.6.0","prettier":"^1.14.3","ts-jest":"^23.10.4","typescript":"^3.1.6"},"dependencies":{},"peerDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14"},"_id":"ts-mongoose@0.0.9","_npmVersion":"6.4.1","_nodeVersion":"8.10.0","_npmUser":{"name":"lsentkiewicz","email":"sirmims@gmail.com"},"dist":{"integrity":"sha512-DQIQYc8SwSmsXXv8Wbc0BOzAalR8o4vdtNn5fU5+FTb4ZKWyC8mfzcEIv/bxWoOBDgKTSbjfGIoCcjk0g/o2Lg==","shasum":"6b68796c990caa0927f01b432b4e6dd55bbaa224","tarball":"https://registry.npmjs.org/ts-mongoose/-/ts-mongoose-0.0.9.tgz","fileCount":26,"unpackedSize":20155,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcD6gyCRA9TVsSAnZWagAADcoP/2oQtwJZlj0bhBmk62l8\nGYdXmMfUjpwlOhOQ33vqk2URm3vunYv/JPW5cGDnA4gzIbZRSVEOrFSQtmyT\ny/hIrqjQxxp9Y4jxQ70zB9YAM/PZh5mTvK4b8i77sVdd7rUCdikvU+fwnzak\nhOz2fA7KHSovezEBR92hARmv+FwjZZW860DlBeLxbIqRoZJ/Ai2X1iC9Ty2/\n84gQSoZcWP/SGWfsemr994f3s5KGvoG4va3JbLJdBKWYjIxE79QiyXVdzBsq\ngA8Sg8QFV9eh1TpkHQa4gDemQN7YFwTcKr7tkGttFWEL7k7XPiPITZr0F1cy\ncxk8eg2fCvUqfzf6giSQcHdjN/vmcijn+AX8kntjwMzE+U761t7/6kzfixFv\nqmPy4FvgfWw2lG6otzGsP+fCkO7qkUiXTMUfzrFAgcTAUx2I1WLLnSF9blVt\n2moLBxeC+6q78enQkIxOdgELBWmEAUps1pV9gG+LnUKfWpj8XrUczpUfxYv8\nHhazZhkkZSewavgQsngi+m4dQgtvzn9T0U87FyLOWVPta6pqCvOp2PSmlaff\n/2t+Z6uVEztWU+o44u/Cx9QuffD76yrbljnziVol/wabZhxin4SbfX1HTkwh\nq+jKGHmXAJHQuOhZ5Fb6fOtugD/UUXos4eKDvSFIg8Gv7yMz3uWswZt6cQE9\nKqFh\r\n=/x8v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDGbW32eScqt/0ZFAQjTr8Y8lpeSy8SWUa8c69FhBqCLAiEAoluHj4k1vfudIxrIXmif6Q/3jZQhYypHgTRrIcoI/vA="}]},"maintainers":[{"name":"lsentkiewicz","email":"sirmims@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-mongoose_0.0.9_1544529970347_0.186227737702495"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.10":{"name":"ts-mongoose","version":"0.0.10","description":"Automatically infer TypeScript interfaces from mongoose schemas.","main":"index.js","module":"es/index.js","jsnext:main":"es/index.js","types":"index.d.ts","scripts":{"jest":"jest","tsc":"tsc","test":"yarn run tsc --noEmit && yarn run jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/BetterCallSky/ts-mongoose.git"},"author":{"name":"Łukasz Sentkiewicz"},"license":"MIT","bugs":{"url":"https://github.com/BetterCallSky/ts-mongoose/issues"},"homepage":"https://github.com/BetterCallSky/ts-mongoose#readme","devDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14","@types/jest":"^23.3.9","jest":"^23.6.0","prettier":"^1.14.3","ts-jest":"^23.10.4","typescript":"^3.1.6"},"dependencies":{},"peerDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14"},"_id":"ts-mongoose@0.0.10","_npmVersion":"6.4.1","_nodeVersion":"8.10.0","_npmUser":{"name":"lsentkiewicz","email":"sirmims@gmail.com"},"dist":{"integrity":"sha512-JjCL0eT5IadVahp/9/3HPhMdBRqkMIjYuScweC8vJHDsuNb9IKgmn9ERNtZfJlcEvsG3U4a2yz79KQ5AH0paBQ==","shasum":"45d6b9ecdaa7a2b2c483a74cc2694867534c2628","tarball":"https://registry.npmjs.org/ts-mongoose/-/ts-mongoose-0.0.10.tgz","fileCount":26,"unpackedSize":20091,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcD6zUCRA9TVsSAnZWagAA8rIP/RncbaGbQJ1q+FHPDYSd\nSgT1HUmtawZ/xr59R8N0bttEk2UeP1wHQaC8T4VKKyZ5K/wtxM8WRR021woF\nqrZDXm4K4T2yf/zTGZd9uUztmuGhebld4faCaliHQ0nPVxnjytwipETPuazQ\n111seJRJMHAr6mameyFrbrav3syqptH38oKCD9D+riDpogwVTIQ+WFogNTzs\nrla5HrlWw+BmsYAxOmRxAiNPPIvjdqZvwzgL1xLXauwM7DtetYX1t/nB70F2\nkhvafi2ytBG+qWpbxjm3DgzGXOJyfg/5+v/O0QangsWAWMD1ZOH3nbLALRFO\n/30Z/006DOWCjzUjFcUsy/BlPRZqiovZ1P0Y0mXzR0lTAT3kuikJNjdrRuWd\n6Qf7sa98LwwoYcDrixew6neKB9Cpw6LBWBoLzfM7pKcay9U5pVkOoY9FrBaI\n8OpQgjB02Cu7ns2Krr9V2f8NultuQY/1jftaCVKlau6qlH7kyFN4+4SBN4PR\nkFKaG3yI7kYeUsFTHsGIN5Ym+fV6xc/w7UIENwh1tyUAza/5Jf7dWcTfzbS7\neRAeFN3J4bw7bJloV3+79zMW3HRnO2wifRpOq69EoZ6x5AyKy1+ErMDY2hm4\n4gZBq1V0G2vdB3Femc2VX11TceTfPhBapGiYDOzmnrb5ReGj5OiQpPMLf+H8\nJo/D\r\n=0za7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE9zYcaGEe4A6h4cJyFOG0HNW4YFGnwjBP+h+DY8InoAAiBG1n9svLiVzYxlmngqvKin89mnQEfhaGzX8y25tfSV9w=="}]},"maintainers":[{"name":"lsentkiewicz","email":"sirmims@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-mongoose_0.0.10_1544531155516_0.9413483878518278"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.11":{"name":"ts-mongoose","version":"0.0.11","description":"Automatically infer TypeScript interfaces from mongoose schemas.","main":"index.js","module":"es/index.js","jsnext:main":"es/index.js","types":"index.d.ts","scripts":{"jest":"jest","tsc":"tsc","test":"yarn run tsc --noEmit && yarn run jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/BetterCallSky/ts-mongoose.git"},"author":{"name":"Łukasz Sentkiewicz"},"license":"MIT","bugs":{"url":"https://github.com/BetterCallSky/ts-mongoose/issues"},"homepage":"https://github.com/BetterCallSky/ts-mongoose#readme","devDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14","@types/jest":"^23.3.9","jest":"^23.6.0","prettier":"^1.14.3","ts-jest":"^23.10.4","typescript":"^3.1.6"},"dependencies":{},"peerDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14"},"_id":"ts-mongoose@0.0.11","_shasum":"d6831eb970e92c9e8b3c2781530a2a312e086c1c","_from":".","_npmVersion":"4.6.1","_nodeVersion":"8.10.0","_npmUser":{"name":"lsentkiewicz","email":"sirmims@gmail.com"},"dist":{"shasum":"d6831eb970e92c9e8b3c2781530a2a312e086c1c","tarball":"https://registry.npmjs.org/ts-mongoose/-/ts-mongoose-0.0.11.tgz","integrity":"sha512-MH3b8D4GiUyvQMpNn2seEJpEGdJAPDOU3jfP88iYZdPGbT1RB/vKUf63Baq5TX72ai5EWcH/EPfChyWT08HAzw==","fileCount":26,"unpackedSize":20233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcPbcGCRA9TVsSAnZWagAA2UsP/issyMKK3fhsFEvm3cg9\n0pel5G461z7gbx3WW08dgqcB62GD3Evtoa8SIvBe5dj9tRcaX+xgYcgZja69\nnlVuc9/5XKQYVGZtnPrpMOwEqXsL4detRQjtiDW1CKnSOpW1J2F9lPQXpuhf\nUooIA5eD5CM0JKrJwixprgKRsKSw8wI77nvhY62V6KIrjA43IUCGQQtt5Ewh\ny5EVxKT/StEJmuirZFdZJMWQ6XyWVxnk5vzAb8+pXY4Diok6lp01orbPDJhd\nqxFq1sKJNj99Yzn18a+FRiC48YboKDcwIRrtb6AI8Gmor/UxQZ4kFUrjYgbG\nB4qbEinJeKJu58HWzQdaVPV9nG+Wf1JHLySlcOkJNV4rfeO9Qfvgru4CB78F\nLYgFac1xh61fm5Kwa4etqWwUxfz1FnmpZK+VjuFJGECx5TsFfYd96Y8OMSOQ\n/tN9NfHeN90IdTuzP8cMDbhl3ktHQGybzqZqtgUtD0ydMKWU/VrzrCKfM3AU\nX0YkC3YT8AYzPP5F5VNuibZ3OBlrEgTKLApQzTvbBwLJsl0i6YFV6yVFA7Pd\nnpq0Khnm01CbSwVoovh35LHMmweCmukFTEPMIvflsmTpzF0Le2/AWjGfe7D2\nHuYO+ytgJ9EQKySBrcEpC3WHw7WaAIc8t/YAA7K8zvKYi8Qo0m6QagF1bXSI\nSnzX\r\n=0T95\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGwPUvMk+CR71hnmI3an946qigPijumtxay5YlgyehtrAiAy4SsOHC+EFsdcpXhCzohF6b79p4Zy+4YCzn/NFsWafg=="}]},"maintainers":[{"name":"lsentkiewicz","email":"sirmims@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-mongoose_0.0.11_1547548422060_0.9895534404148318"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.12":{"name":"ts-mongoose","version":"0.0.12","description":"Automatically infer TypeScript interfaces from mongoose schemas.","main":"index.js","module":"es/index.js","jsnext:main":"es/index.js","types":"index.d.ts","scripts":{"jest":"jest","tsc":"tsc","test":"yarn run tsc --noEmit && yarn run jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/BetterCallSky/ts-mongoose.git"},"author":{"name":"Łukasz Sentkiewicz"},"license":"MIT","bugs":{"url":"https://github.com/BetterCallSky/ts-mongoose/issues"},"homepage":"https://github.com/BetterCallSky/ts-mongoose#readme","devDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14","@types/jest":"^23.3.9","jest":"^23.6.0","prettier":"^1.14.3","ts-jest":"^23.10.4","typescript":"^3.1.6"},"dependencies":{},"peerDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14"},"_id":"ts-mongoose@0.0.12","_npmVersion":"6.4.1","_nodeVersion":"8.11.3","_npmUser":{"name":"lsentkiewicz","email":"sirmims@gmail.com"},"dist":{"integrity":"sha512-UJEfoYGxWJyeiK7N3QcDEc8RTs1H5NUvVrw4FOXvdh30D407LCLxCj5WFy/232jrJNMysZvNTeLZZkDsjgfGKQ==","shasum":"141fa20b78e37a9c7b2298d5d5c445d0857d5a17","tarball":"https://registry.npmjs.org/ts-mongoose/-/ts-mongoose-0.0.12.tgz","fileCount":26,"unpackedSize":20923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcrwYwCRA9TVsSAnZWagAAproQAJuvptZ3xw2SMGN+82+Q\nD4fuG5tKGSGeggwtkBtlFZxjA3Ku6EBrSZ9pU7Ebc6eWTVW6BvDf94iNNA9f\nCfQPyLm1qsQedz+1zAi9sSOOTORhrOiH9VBebWfro81y7T2ya8l4O8QUSneA\nLI4zucsCUNAignIY8cw81H0oVb4cXN7PumaKj3Na08hK/66eTQtBB5d0Fr4n\nZ/cQ23MGhzU/lBIIcIqbSyooulsWqgxy6bWwynaIgUeIdXiFq1gXdJJpOkT7\n31xw+VcM0q/nIC2hL6fl4q9QrP2nLzQoipobLrsLyrDKa5tpGn5O73D71mx9\nURP5xmBxYlolFw8tEWucSicBmYtK03JkrxBn3Nll81hKSBEWdPN5hVn6D9IY\nLZY2nAZ2BcgoMm2p+uyr7WQAfAyWnXmZhEsaAVBBz+9DGcg3OV0sGc1TTifF\nOHGZykX2nz853hARA3/XjJERonCdrY2A12FCfluQzLXPiT9F5+lmbU6fcqtH\n+sSIpPQh59lBK/kdlaZ8ZNyUqikAYRp/7Ordd+7O/Pp1WljxLRWwFzP3zVhR\n5bt/3jFmshf5+6CyTzChCiY42iY0QOtbDfGYUwQghDNzuANQrd7S0ciIbO46\nivU4LFw3ynbKNOxikBDkUtSuocYUJWmdLIUTm/1lwemcbh4YFI/QH8DlzTEb\nowBa\r\n=J7zf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9+2/KIFY1g0tdLHiLFMdJgj/o6xWOrVp/uFgOM/pUbwIhANYhtlK3lju6PDukkAmseMwPs46q/yu1EplYW9ZYHNq1"}]},"maintainers":[{"name":"lsentkiewicz","email":"sirmims@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-mongoose_0.0.12_1554974255482_0.12840480968953671"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.13":{"name":"ts-mongoose","version":"0.0.13","description":"Automatically infer TypeScript interfaces from mongoose schemas.","main":"index.js","module":"es/index.js","jsnext:main":"es/index.js","types":"index.d.ts","scripts":{"jest":"jest","tsc":"tsc","test":"yarn run tsc --noEmit && yarn run jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/BetterCallSky/ts-mongoose.git"},"author":{"name":"Łukasz Sentkiewicz"},"license":"MIT","bugs":{"url":"https://github.com/BetterCallSky/ts-mongoose/issues"},"homepage":"https://github.com/BetterCallSky/ts-mongoose#readme","devDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14","@types/jest":"^23.3.9","jest":"^23.6.0","prettier":"^1.14.3","ts-jest":"^23.10.4","typescript":"^3.1.6"},"dependencies":{},"peerDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14"},"_id":"ts-mongoose@0.0.13","_npmVersion":"6.4.1","_nodeVersion":"8.11.3","_npmUser":{"name":"lsentkiewicz","email":"sirmims@gmail.com"},"dist":{"integrity":"sha512-sexaJJAqYHX3n/Q9lswgue4pJLWspRttqSLj8r57xEVvi413FYyqtQ86buHM5n4dsGx2w7wLHPZX6DpVNgzahw==","shasum":"01a3fb03f8f85ec834b87c14aec2af2b1dd1e4df","tarball":"https://registry.npmjs.org/ts-mongoose/-/ts-mongoose-0.0.13.tgz","fileCount":26,"unpackedSize":22930,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcsEZiCRA9TVsSAnZWagAAqbgP/0A9B80UqVV6HMVaGlNr\ncFkP9XC9TsKcR6z4KeGBGKjr+wpH+IRCqef2IUfGuzzN7cQzuhvwnEwsNQVz\nK50AI7OJPQmkv5s0E296UkMHCr7aYk0uD1q5e+f6anG5VxMb8hfkm3w1ioKS\ngnkuu9793IMvN9oXTiK3EAYe2+XQ/uWKlDpxR4juQplpYSeOkzCJs5/Jdz2C\nU+3ut8KfscsLeKZAdMQkQaiA0ExsKFSwQOnqDO4Tp4LZPQbxoICnwmL1hLFZ\nUp4xtDCvMVsYNVB+LLPKI1Y7oUV1I5C4gv19asoqwJhH+7F52Md0REoLAct/\naoTm3R0W2tVkKVt7yluxLA5LLpix5vabxQk4EcqiUpVxnztG7O9uPciLEWjN\noiNOo+waQj+aTESvZnbaeUFs4tPl9eKzuvASaci6elMfDviDga6DERdM/sDp\nRAXwe+tSy6hUaKJnqH4JgUndb49YtaW2UwdtdwBoLd+i2trpzA+ZnkXgA6wc\n99//p1b1l7NIFs0XgEV+2I6rK0/T4gLBi4ZHLI6k7LCoWKSc4R7Svd0JEdM1\nCE15gGeFOnKa1u2NO+/RyB1EDzFbCEioH3TXYBWBYw+Gm6R2377yhlgJrb+z\nkvvXqO1cAm+C/qa2dr0pNKUEFatLtmwSLzpJTIlB5wM3hRsM9wLRKUeZs3O2\ng74I\r\n=F8B9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/Mr6GT4eBy0vTkuYsMiKJpVrhqq3sEP9KSbQ6C8ZU5gIgeRfR0Oi4twY5H1N3gtX7P5dZGvHIYWdslTdGWDAXm+A="}]},"maintainers":[{"name":"lsentkiewicz","email":"sirmims@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-mongoose_0.0.13_1555056226111_0.406996813185051"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.14":{"name":"ts-mongoose","version":"0.0.14","description":"Automatically infer TypeScript interfaces from mongoose schemas.","main":"index.js","module":"es/index.js","jsnext:main":"es/index.js","types":"index.d.ts","scripts":{"jest":"jest","tsc":"tsc","test":"yarn run tsc --noEmit && yarn run jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/BetterCallSky/ts-mongoose.git"},"author":{"name":"Łukasz Sentkiewicz"},"license":"MIT","bugs":{"url":"https://github.com/BetterCallSky/ts-mongoose/issues"},"homepage":"https://github.com/BetterCallSky/ts-mongoose#readme","devDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14","@types/jest":"^23.3.9","jest":"^23.6.0","prettier":"^1.14.3","ts-jest":"^23.10.4","typescript":"^3.1.6"},"dependencies":{},"peerDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14"},"_id":"ts-mongoose@0.0.14","_npmVersion":"6.4.1","_nodeVersion":"8.11.3","_npmUser":{"name":"lsentkiewicz","email":"sirmims@gmail.com"},"dist":{"integrity":"sha512-CoVFdDYVrueUVn2P3rw74P7TomYEGhemnMm7EIiPltaROIyiKM1QyomCuakJMctp2kMaMQV1l9syauWc1ZKpnw==","shasum":"8166f238ef4528dcaef7880af542a2e6cb99a148","tarball":"https://registry.npmjs.org/ts-mongoose/-/ts-mongoose-0.0.14.tgz","fileCount":30,"unpackedSize":24841,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcsFHcCRA9TVsSAnZWagAAWU0P/RctPYd4XbLk+08PRpQA\nAGzwInsTKKuxr5AJ9GFRN8n5xSS+4MRJh1eGCNUSBnDMLAE+xh+bxB7Tz6yC\nQpx1gQuPkYWutALJNxN8OoLm4LsHYgYmMO/mgOBtGUKE7Ix3p6sdRC1FYoiv\n2b7Mhaiytu6Sj77Eb4WRljWVt/IqA6ZCXqxYte8Qg/MBzOofaJIMBzOet+qP\nScftQOT29MgvGL2UXv0naEHTT9d+aSWiw0+BN4WFU1GklaFLw6ewTIHMxTT0\nyzwL9QovnmNdnflrlcALpzBCEzWdLtAE+PqdCrlfQXkJBI1IQnbAnmxdkYvZ\n/TwDiSvbWuASGQ2ZjyBptFZXmktbT3FLMRySVAl6t3TZkHuy+rqH6GqkdoX2\nmTzW9Lh1MJkQCt+tpm2N+E688zuChDiNKpD7wjssrr31Z97bz6cWRfASWK2Y\nl2XnC4v3AOr5+haON/GemiWnLoRLlps4Skqqg51JD9K9aeTKtXXad5iZnFNs\nXF5wKGD+26IHcr+qdd6Smkk+yMM+IrJglCGNZMZ0as+fpDVUmKJcX5yZODdB\nbC247y8LaziW38a0wWuzwfxFMPziDKgR7RIkqXJbXSfuVLpM11+imjsSBCIj\nYIiteI+zl3jpY8FM+BZLVUPmH3Ux5x3Js3oQU4D80NF0YIIyFpm9m2J+FhL2\nL3MW\r\n=lkvQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEhqPl0Lw4HHovQx5vpHWvXB7tHSKadNMyN07+7Jl1eMAiEAm/yPhSCglbxIgc6/4iNewE7uSp2Ty5u/RrBFpxchBtE="}]},"maintainers":[{"name":"lsentkiewicz","email":"sirmims@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-mongoose_0.0.14_1555059163748_0.28575367529582874"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.15":{"name":"ts-mongoose","version":"0.0.15","description":"Automatically infer TypeScript interfaces from mongoose schemas.","main":"index.js","module":"es/index.js","jsnext:main":"es/index.js","types":"index.d.ts","scripts":{"jest":"jest","tsc":"tsc","test":"yarn run tsc --noEmit && yarn run jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/BetterCallSky/ts-mongoose.git"},"author":{"name":"Łukasz Sentkiewicz"},"license":"MIT","bugs":{"url":"https://github.com/BetterCallSky/ts-mongoose/issues"},"homepage":"https://github.com/BetterCallSky/ts-mongoose#readme","devDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14","@types/jest":"^23.3.9","jest":"^23.6.0","prettier":"^1.14.3","ts-jest":"^23.10.4","typescript":"^3.1.6"},"dependencies":{},"peerDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14"},"_id":"ts-mongoose@0.0.15","_npmVersion":"6.4.1","_nodeVersion":"8.11.3","_npmUser":{"name":"lsentkiewicz","email":"sirmims@gmail.com"},"dist":{"integrity":"sha512-iVFgWxg6YoRpcUOYoT7GZx1pOx5z1VX1SGuIuxlAV+BqzmkvtnQocCwdysBPgDovgQf1ZHCW/yfsDo17p69l0Q==","shasum":"c5980b652012cf562c01536b0215d15e3ec76cf7","tarball":"https://registry.npmjs.org/ts-mongoose/-/ts-mongoose-0.0.15.tgz","fileCount":30,"unpackedSize":117130,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc45s6CRA9TVsSAnZWagAAaI4P/0Fz6Qs4GtuEmIqKsNEU\nxnDCYTglk6YWh+Ta/CHRWx/4lvZQsEHv61vUwv/8Ath6w4OI3TamixXJ8ohk\nVS7ugO8LomKC8swrsoeEkG3XFHKDs628iZGCmD6eTOpF1dkH5QA6HmI2uGt4\n5PwmChHeYiygDbGVy85dJ662XDJva3a7LFdVT4pJwXWvl2QEA6Ro2wlgxy6+\nzqN6xZF+yPb4HZfPISp2y0iUKINiBFiI0KbGoekWkxGFbfnF8Zy+ZBkX1am1\nSCsMKxPq0q0FwhA0CsZyyCWU4zUl5f7WCdJwn+ew+yU310oFNnrenIpmKvWK\nN/hVVjnDbEN4XOQ8axSHVZk1K3fYd2JydyLRHHk3cFJ6qTZeeHPI5wbvfYlY\njAQxZSnwtxT6m263J090ZBgmVMqQxhHWAbLUkAhPfNfT0oj6JRqjfkv7f36F\no2BcUNolPTxKfi80uQgtvXNhNbd2+CWlM/Z4CWdwxLzRB9IOZU0eBDMSSY/t\nxL6oFP4rkJMTU1k+BbOe0CsksScNTqYkp5DB5roDk9xmkGrFiAP/EVyxCiLB\nVMHJ+lwDsPK457EoQ+uYC3KRTVv6qqHAsX7SAXb7ZZkHgVlKwyDMI9nviQAs\nYyeHp+3IeKU3HqKryI3RdJwco6lgD33Oop9I8AgmK0QModSZh8zShGfvhXbH\nChVK\r\n=OI+A\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDFTOvac7uhHlcT1gbPwLGvq6xkiRcuOXoYEkCX72lfuAiEArqTESuaRceKyK9JwFI3s3youyOAVY57z0ixZzQkulNM="}]},"maintainers":[{"name":"lsentkiewicz","email":"sirmims@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-mongoose_0.0.15_1558420281546_0.5425312529183393"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.16":{"name":"ts-mongoose","version":"0.0.16","description":"Automatically infer TypeScript interfaces from mongoose schemas.","main":"index.js","module":"es/index.js","jsnext:main":"es/index.js","types":"index.d.ts","scripts":{"jest":"jest","tsc":"tsc","test":"yarn run tsc --noEmit && yarn run jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/BetterCallSky/ts-mongoose.git"},"author":{"name":"Łukasz Sentkiewicz"},"license":"MIT","bugs":{"url":"https://github.com/BetterCallSky/ts-mongoose/issues"},"homepage":"https://github.com/BetterCallSky/ts-mongoose#readme","devDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14","@types/jest":"^23.3.9","jest":"^23.6.0","prettier":"^1.14.3","ts-jest":"^23.10.4","typescript":"^3.1.6"},"dependencies":{},"peerDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14"},"_id":"ts-mongoose@0.0.16","_npmVersion":"6.4.1","_nodeVersion":"8.11.3","_npmUser":{"name":"lsentkiewicz","email":"sirmims@gmail.com"},"dist":{"integrity":"sha512-69XDCT8PT/IU74YhDVTHLI04tIUx66eusrF4BQFPoDvORh71Nw6UAAKLZOVNoWNjhz2hgJ9vsPf2igOj52Ce9Q==","shasum":"126bf9856285ad549534d3c941832f030e9e26ef","tarball":"https://registry.npmjs.org/ts-mongoose/-/ts-mongoose-0.0.16.tgz","fileCount":30,"unpackedSize":117264,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdCkJiCRA9TVsSAnZWagAAFA4P/1NsDjLfVARrqDv3XcG7\nDHyNjD8Zw4gUuYvcLosB2ZorzC4DmOOYwR9nSQfM8UIeiIvjWL1LSzdmxdiU\n5DjmuT2fN+oEfSiaW4k1gGMcyGaXSGNgUH0cJ1KVF/Lt7qkIdSdKsn190UZf\nPrZ7zJtRPDdG/9d4G/+OICSc6C5CrSpKs4whUrVGbTQKkThHjay3CjX5fMYA\nd76J/uscBnR+xYw9zUsnhqY3W/TL6bnN3SCzmCyrghzrg/UcmG/D8Pm1/A7X\nIfvVGg1zbpkiW3ps6fs3rKiFQCF1B2DD0NRKaOmM2rCTR9LEFsUeHWJWkjtr\niIzeyIwc30AbGmZ/Izow7rE69dMwws6pJ7XdIWjpOk/XTW/NpNK8NCtd4z1z\nd98azM2a4XxqXfy3YukoB43WKB+HqvcGhWhyy4mGGK9MQ1ihjAsiR6Kv5s9v\nCSiI9nG1jG15IIJkbSrKJ8Duw+6ykHr9PMyxaC4oozwCNeOksDezYBB6ve6T\nTzgpELkZCdc7j7OPr0q2tMZyN33XwvuP9SKD0svXBnlVNP8fJQjtGxW98lRH\nyeUdd8Bf3GxfmePAfVRAIMuN9L6Gx4dSDjUqoDruDOxiCRJ9HNeFWR3drU6E\n1q5SN5zbKHxsgxGwC6r5bDTquf5rEJhJavXSLZHKx02TqndPfsa4jbRISXF0\nqpVT\r\n=K2c7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC7fxEYPBMVhmkXJn4ewKFZv3YvZzTrOrVFwpQKVDpHDgIhALjuq9XiObprriio3RUnCL+vPNv0fOw9bkQNxAfnPxuT"}]},"maintainers":[{"name":"lsentkiewicz","email":"sirmims@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-mongoose_0.0.16_1560953442161_0.5231398909115303"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.17":{"name":"ts-mongoose","version":"0.0.17","description":"Automatically infer TypeScript interfaces from mongoose schemas.","main":"index.js","module":"es/index.js","jsnext:main":"es/index.js","types":"index.d.ts","scripts":{"jest":"jest","tsc":"tsc","test":"yarn run tsc --noEmit && yarn run jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/BetterCallSky/ts-mongoose.git"},"author":{"name":"Łukasz Sentkiewicz"},"license":"MIT","bugs":{"url":"https://github.com/BetterCallSky/ts-mongoose/issues"},"homepage":"https://github.com/BetterCallSky/ts-mongoose#readme","devDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14","@types/jest":"^23.3.9","jest":"^23.6.0","prettier":"^1.14.3","ts-jest":"^23.10.4","typescript":"^3.1.6"},"dependencies":{},"peerDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14"},"gitHead":"cea73bcbf5cfd6933937741cfe25e18c8c13134a","_id":"ts-mongoose@0.0.17","_nodeVersion":"9.9.0","_npmVersion":"6.8.0","dist":{"integrity":"sha512-tZeDLWeXlCLvxDWLZFPrg0sCrKLJJS8Cl7+z22TKoPkkXbxhUAk/0cmQ/jHKacxDyL/I1jAH0ZAPpevEHAlLww==","shasum":"769b8e97814f75bd7febc187bf1f6d2eebf90dca","tarball":"https://registry.npmjs.org/ts-mongoose/-/ts-mongoose-0.0.17.tgz","fileCount":45,"unpackedSize":4246125,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdEoCaCRA9TVsSAnZWagAARQkP/2ASqf+6J0HMqX7o0wnf\nX3gcC+oOok1Ojtt7dBp7xSRoacVAiqWLMZfMHxhPhALsmnrL+kp5FfVVmLWN\nv2R8rj3dAR8BuiKASCHO/R54+s0I3LZh58I3TXRawxTBgAYUdRNj++yRRD6T\ngTg6qzHqS9AIcGCdNgIitavddOHnLSW1nAc0lHLdYou0895VmpO61h4VD889\nqKbke0ZrQotAmbxDqwsEgUuhiguMJEL5zyBElPIapIhZHSu386FczLpZUohr\nP2hDFOA/tYJWH5qBbvtY4XE9h7o1aPH7w9bqvDJRi8j+NabRW/WYpXTR0gA7\nnAeY+PWOCb+ocTDXZMeExZKU7JGo1dz2gLk5ZiRdGfniEaBD1QK5mqRXpsDF\nba/UuI2qVXmrxxi6QirE1mLkT1/GPq5N9BZ/++4pn/rBLmro+q5BEOMIOV76\nHApowpe8cx8MGJrzySyVtXzFaWBrEKK+KI665drtlhcu/3F85xFVZBVySUMx\nZ8vNTxx15TVFZWQa3D8hoFdUk9yYsJPd8yi5Q+CCRuvVLRRVhX9AWTlrF+s2\nOXUNH9rP5ysu1MOm9Rts5FLUnwm9BbPyknGlwCIU9eTgs7kEMMMNbuypbJmZ\nnuAPVrQIC0ia9jGmN8xQtIkx2p8nElasD9xfX7vTdoVTQzwzzMnXMKfuGOKf\n7aNp\r\n=Q8XL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCNPLdQfnypjDw3kdhKOjHJO4zCAb+EAtXb2Yxr2ejd/gIhAJg3bDFbcsgsis/LuESw4DOK7np7QDvg+YN6KdSfsS7D"}]},"maintainers":[{"email":"sonynakata@gmail.com","name":"lchimaru"},{"email":"sirmims@gmail.com","name":"lsentkiewicz"}],"_npmUser":{"name":"lchimaru","email":"sonynakata@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-mongoose_0.0.17_1561493657717_0.3519927999148287"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.18":{"name":"ts-mongoose","version":"0.0.18","description":"Automatically infer TypeScript interfaces from mongoose schemas.","main":"index.js","module":"es/index.js","jsnext:main":"es/index.js","types":"index.d.ts","scripts":{"jest":"jest","tsc":"tsc","test":"yarn run tsc --noEmit && yarn run jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/BetterCallSky/ts-mongoose.git"},"author":{"name":"Łukasz Sentkiewicz"},"license":"MIT","bugs":{"url":"https://github.com/BetterCallSky/ts-mongoose/issues"},"homepage":"https://github.com/BetterCallSky/ts-mongoose#readme","devDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14","@types/jest":"^23.3.9","jest":"^23.6.0","prettier":"^1.14.3","ts-jest":"^23.10.4","typescript":"^3.1.6"},"dependencies":{},"peerDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14"},"_id":"ts-mongoose@0.0.18","_nodeVersion":"9.9.0","_npmVersion":"6.8.0","dist":{"integrity":"sha512-yWpH66s16Ii4YKi28WRLWKRQVFp20zqx1pRB2Q42xn6AUzQazIk/FUIA7gEGralxVeltk6GF1NNIo6WVTmF3kg==","shasum":"e49649341e4c14b7c9748c70634ccec413f24b87","tarball":"https://registry.npmjs.org/ts-mongoose/-/ts-mongoose-0.0.18.tgz","fileCount":26,"unpackedSize":123512,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdE3G0CRA9TVsSAnZWagAArZMP/2GRg+gREH65QU/vn6h2\nMtuXJorkPUcnrksLQeauK0jd6BLnzmvGEft3Zy/xZP1Jal+ioVn3dpoyP47I\ncFSmzggUicpFZjzdj2DUVPvpewwnAV/6Y9aiuPC7aV/fsEINS9jX7e4ElW3S\niloTelCi+Dv0ODfU4pqFPAkjQZieKsqIeqCipHFGS6MNjla4nV+7JoUAq+Rt\nsGfFiYIUjSLKaMP9Fm83uCbaYTjVI8/uXOuITpbpZBXcEjZWhCxgFiT/+faI\naKvPN1QVbRtWzxhKkCcOUW9RWk4NJC0wfZH3q86X/Fe/fsgtF20mJL6zApUp\n3SJD1egT+FDXBAvhhEn07GTaHlNddl09zsZBNdzeGqAGqn1dE0CxEsYIAsUT\nvu5irlS9AMcm3WFzwyrRGPb8oiZn/9c4IIc5GGmD67YqSHkWCQDEj8KBcg/U\nm1z2RPbBSyfGkW3RISuZshhsO7S2e1hdBbL9x8WvkquBRgzlIQ1n/fkJqsMu\nzQh4XNxwph8AJHVldsfF2pRmIxGVUbIbqaVC4h2WtIuTIC2hYWffOAulvHlM\nKweHRRaQxtCWzd9GKiYOUlQW4CsJwnsL/c3tH1Nt6ZxzOTlLcwERMuKmopY5\n6Zm7l91spekQgPSaYvpqAwqiBz2cSCkOq0DBs24s2bZihO1l3sCaiSxiAPli\nf/tC\r\n=fBbT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDkYR2NPH6tviVG08DDWBtS5UTt+JnMpdlzp+c6dZK98wIgdl3VFDJYIHgawT08G9Bkk+sme767QGjlYjkPJsq7f2M="}]},"maintainers":[{"email":"sonynakata@gmail.com","name":"lchimaru"},{"email":"sirmims@gmail.com","name":"lsentkiewicz"}],"_npmUser":{"name":"lchimaru","email":"sonynakata@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-mongoose_0.0.18_1561555379462_0.7067411503722458"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.19-beta.0":{"name":"ts-mongoose","version":"0.0.19-beta.0","description":"Automatically infer TypeScript interfaces from mongoose schemas.","main":"index.js","module":"es/index.js","jsnext:main":"es/index.js","types":"index.d.ts","scripts":{"jest":"jest","tsc":"tsc","test":"yarn run tsc --noEmit && yarn run jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/BetterCallSky/ts-mongoose.git"},"author":{"name":"Łukasz Sentkiewicz"},"license":"MIT","bugs":{"url":"https://github.com/BetterCallSky/ts-mongoose/issues"},"homepage":"https://github.com/BetterCallSky/ts-mongoose#readme","devDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14","@types/jest":"^23.3.9","jest":"^23.6.0","prettier":"^1.14.3","ts-jest":"^23.10.4","typescript":"^3.1.6"},"dependencies":{},"peerDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14"},"readme":"# ts-mongoose\n\nAutomatically infer TypeScript interfaces from mongoose schemas.\n\n[![Build Status](https://travis-ci.org/BetterCallSky/ts-mongoose.svg?branch=master)](https://travis-ci.org/BetterCallSky/ts-mongoose) [![npm module](https://badge.fury.io/js/ts-mongoose.svg)](https://www.npmjs.org/package/ts-mongoose)\n\n## Installation\n\n```bash\nnpm i ts-mongoose mongoose @types/mongoose\nyarn add ts-mongoose mongoose @types/mongoose\n```\n\n## The Problem\n\nWhen using mongoose and Typescript, you must define schemas and interfaces. Both definitions must be maintained separately and must match each other. It can be error-prone during development and cause overhead.\n\n`ts-mongoose` is a very lightweight library that allows you to create a mongoose schema and a typescript type from a common definition.  \nAll types as created from 1-liner functions and does not depend on decorators❗️.\n\nFor example:  \n`Type.string()` returns `{type: String, required: true}`, which is the same definition required in the original mongoose library.\n\n## Example\n\nBefore:\n\n```ts\nimport { Schema, model, Model, Document } from 'mongoose';\n\nconst AddressSchema = new Schema(\n  {\n    city: { type: String, required: true },\n    country: String,\n    zip: String,\n  },\n  { _id: false, timestamps: true }\n);\n\nconst PhoneSchema = new Schema({\n  phoneNumber: { type: Schema.Types.Number, required: true },\n  name: String,\n});\n\nconst UserSchema = new Schema(\n  {\n    title: { type: String, required: true },\n    author: { type: String, required: true },\n    body: { type: String, required: true },\n    comments: [\n      {\n        body: { type: String, required: true },\n        date: { type: Date, required: true },\n      },\n    ],\n    date: { type: Date, default: Date.now, required: true },\n    hidden: { type: Boolean, required: true },\n    meta: {\n      votes: { type: Schema.Types.Number },\n      favs: { type: Schema.Types.Number },\n    },\n    m: {\n      type: Schema.Types.Mixed,\n      required: true,\n    },\n    gender: {\n      type: Schema.Types.String,\n      required: true,\n      enum: ['male', 'female'],\n    },\n    otherId: {\n      type: Schema.Types.ObjectId,\n      required: true,\n    },\n    address: {\n      type: AddressSchema,\n      required: true,\n    },\n    phones: {\n      type: [PhoneSchema],\n      required: true,\n    },\n  },\n  { timestamps: { createdAt: true } }\n);\n\ninterface UserProps extends Document {\n  title: string;\n  author: string;\n  body: string;\n  // Duplicate all props from the above schema :(\n}\n\nconst User: Model<UserProps> = model('User', UserSchema);\n```\n\n🎉🎉🎉 After:\n\n```ts\nimport { createSchema, Type, typedModel } from 'ts-mongoose';\n\nconst genders = ['male', 'female'] as const;\n\nconst AddressSchema = createSchema({\n  city: Type.string(),\n  country: Type.optionalString(),\n  zip: Type.optionalString(),\n}, { _id: false, timestamps: true });\n\nconst PhoneSchema = createSchema({\n  phoneNumber: Type.number(),\n  name: Type.optionalString(),\n});\n\nconst UserSchema = createSchema({\n  title: Type.string(),\n  author: Type.string(),\n  body: Type.string(),\n  comments: Type.array().of({\n    body: Type.string(),\n    date: Type.date(),\n  }),\n  date: Type.date({ default: Date.now as any }),\n  hidden: Type.boolean(),\n  meta: Type.object().of({\n    votes: Type.number(),\n    favs: Type.number(),\n  }),\n  m: Type.mixed(),\n  gender: Type.string({ enum: genders }),\n  otherId: Type.objectId(),\n  address: Type.schema().of(AddressSchema),\n  phones: Type.array().of(PhoneSchema),\n}, { timestamps: { createdAt: true } });\n\nconst User = typedModel('User', UserSchema);\nUser.findById('123').then(user => {\n  if (user) {\n    user. // autocomplete here\n  }\n});\n```\n\n### API\n\n- Each type has two forms: required and optional\n\n```ts\n{\n  // same as {type: String}\n  firstName: Type.optionalString(),\n  // same as {type: String, required: true}\n  email: Type.string(),\n}\n```\n\n- Each type accepts the same options from mongoose\n\n```ts\n{\n  // same as {type: String, required: true, unique: true, index: true}\n  email: Type.string({ unique: true, index: true });\n}\n```\n\n- Note that enum values need to be readonly array to be treated as literals by typescript\n\n```ts\nconst genders = ['male', 'female'] as const;\n{\n  // same as {type: String, required: true, enum: ['male', 'female']}\n  gender: Type.string({ enum: genders });\n}\n```\n\n- `schema`, `object`, `array` types have a method `of` where you must provide a child type\n\n```ts\n{\n  // same as {type: [String], required: true}\n  tags: Type.array().of(Type.string());\n}\n```\n\n- `schema.of(ExampleSchema)` has typical for Subdocument additional fields and methods. Setting `{ _id: false }` in SchemaOptions won't attach `_id` property in Subdocument\n\n```ts\nconst AddressSchema = createSchema(\n  { city: Type.string() },\n  { _id: false, timestamps: true }\n);\n{\n  // same as {type: AddressSchema}\n  address: Type.schema().of(AddressSchema);\n}\n// address property has city property, other Subdocument methods and properties except '_id'\n```\n\n- `array.of(ExampleSchema)` will return DocumentArray instead of standard array\n\n```ts\nconst PhoneSchema = createSchema(\n  { phoneNumber: Type.number() },\n  { _id: false }\n);\n{\n  // same as {type: [PhoneSchema]}\n  phones: Type.schema().of(PhoneSchema);\n}\n// phones property has such methods as create(), id(), but also those typical for arrays like map(), filter() etc\n```\n\n- `ref` is a special type for creating references\n\n```ts\n{\n  // same as [{type: Schema.Types.ObjectId, ref: 'Comment'}]\n  comments: Type.array().of(\n    Type.ref(Type.objectId()).to('Comment', CommentSchema)\n  ),\n}\n```\n\n- `populateTs(property: string)` use this function to populate a property and adjust the returned type automatically. Under the hood it calls only the native `populate` method.  \n  Method will be available if you import a special plugin.\n\n```ts\n// models.ts\n\nimport 'ts-mongoose/plugin';\n\nUser.find().populateTs('comments');\n```\n\n## Extracting Document type\n\nUse `ExtractDoc` to extract generated document type.  \nUse `ExtractProps` to extract generated base model properties.  \nExample:\n\n```ts\nimport {\n  createSchema,\n  Type,\n  typedModel,\n  ExtractDoc,\n  ExtractProps,\n} from 'ts-mongoose';\n\nexport const UserSchema = createSchema({\n  email: Type.string(),\n  username: Type.string(),\n  isBlocked: Type.optionalBoolean(),\n});\n\nexport const User = typedModel('User', UserSchema);\nexport type UserDoc = ExtractDoc<typeof UserSchema>;\nexport type UserProps = ExtractProps<typeof UserSchema>;\n\n// example function\n\nasync function blockUser(user: UserDoc) {\n  user.isBlocked = true;\n  // access all properties + Document methods and properties\n  await user.save();\n}\n\nfunction randomUser(): UserProps {\n  // must return `email`, `username`\n  // `isBlocked` is optional\n  return {\n    email: 'user1@example.com',\n    username: 'user1',\n  };\n}\n```\n\n## Refs\n\nRefs and populations are supported.  \nCheck code under `example/example4.ts`.\n\n![alt autocomplete](.github/refs.gif)\n\n### Custom Field\n\nIf you need to specify custom fields in the model, you can add a fake annotation.  \nIt's only required if you add virtual fields or custom methods to the model.\n\n```ts\nconst UserSchema = createSchema({\n  title: Type.string(),\n  author: Type.string(),\n  ...({} as {\n    generatedField: string;\n    customFunction: () => number;\n  }),\n});\nconst User = typedModel('User', UserSchema);\n```\n\nAutocomplete popup:  \n![alt autocomplete](.github/custom.png)\n\n### Static methods\n\nIf you need to have static custom methods on Model you can pass them in `statics` property, which is part of schema options. For functions returning instance/s of Model, use `ModelInstanceType` / `ModelInstancesType` interfaces as returning value.\n\n```ts\nconst UserSchema = createSchema(\n  {\n    name: Type.string(),\n    age: Type.number(),\n  },\n  {\n    statics: {\n      findByName: function(name: string): ModelInstancesType {\n        return this.find({ name: name });\n      },\n      findOneByName: function(name: string): ModelInstanceType {\n        return this.findOne({ name: name });\n      },\n      countLetters: function(name: string, bonus?: number): number {\n        return name.length + (bonus ? bonus : 0);\n      },\n    },\n  }\n);\n\nconst User = typedModel('User', UserSchema);\nUser.countLetters('a');\n```\n\n### TODO\n\n- support types: Decimal128, Map\n\nMIT\n","readmeFilename":"README.md","_id":"ts-mongoose@0.0.19-beta.0","_nodeVersion":"9.9.0","_npmVersion":"6.8.0","dist":{"integrity":"sha512-zATCc1fB64YVSoZQ2OYAt4jn6WAp9hjGHYBIS9iHyJuDCG6HlEWiAxYQOnnkqggG8/9bAxOdI71L09i3j4Pcqg==","shasum":"5639320b011bb9acdaf1c7ff758bf42bd0f83918","tarball":"https://registry.npmjs.org/ts-mongoose/-/ts-mongoose-0.0.19-beta.0.tgz","fileCount":26,"unpackedSize":127515,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdHjlZCRA9TVsSAnZWagAA940P/046OYFX6YxhkH7ddcRl\nIAsMQHfb0ZIWlddn53imena/zAjJzuh3/36L9lAVQaHk7nrg8OTEATdmItax\nGxxg4eCvxgtpmEdGGXAhmuvpp8G31zzXcYCyR6GLCV+XXY7D2E4wllmuEEE2\nPeo+fVYJFyf7xZqKLwercat5yrRzDXz/BAbaxNyPveaw4qDdR1UkI/ADRNcO\n4T/5YBxNAM7I56XNKxzywYRLjZ2i22JAziT+g488wNqCwuwEfJkT25NbeTTF\nShlTeC+Qhv8/m2344EU9iU4a4I2ZEH0lFUAvN15FAMcwLFDsgt4R+MtU2PuF\nMHaG6oDmXMSmqiuLHXAuPzfNKflR69A1Bcs/fCoecZNzZWwb1doDO/j3yqv0\ngBnzhs95nH45ciHxHxqmX3eaV4tM0hH67WsBxbzN5S+Wxs8ruUaoqyFHjz9A\ngXlb8P/Og+aZvop37rEnuxXTpd7JCYCRtVR+IyfL+OuMdRuLuHiN1laGqqtp\nMYz9lREy1n2EJ9RsdX3m6mwFaGobqc6cSKZV4lwsOeGGw8uFBVHxP42Tczyt\nyWLAjRqqpzmwbaOmXqsyk2dDQvi/sLocJyaFkwIRGtLznntBFH/E+cjuCFOj\nygGpAkCCY0lRUVfs76n0UwjMaQxapibe7Ke7ImIqfZ3EwPE1+Uj4NARGLuVv\nWF0W\r\n=BMwV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEb48daa8YhBS1dULmf/igM5vUBHFc/ADCGv97kgWt5PAiA8zYbf+01+8ICKyECR/3ycJoYBZe25vJvk+f6Une1R+Q=="}]},"maintainers":[{"email":"sonynakata@gmail.com","name":"lchimaru"},{"email":"sirmims@gmail.com","name":"lsentkiewicz"}],"_npmUser":{"name":"lchimaru","email":"sonynakata@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-mongoose_0.0.19-beta.0_1562261848983_0.8679935273789443"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.19":{"name":"ts-mongoose","version":"0.0.19","description":"Automatically infer TypeScript interfaces from mongoose schemas.","main":"index.js","module":"es/index.js","jsnext:main":"es/index.js","types":"index.d.ts","scripts":{"jest":"jest","tsc":"tsc","test":"yarn run tsc --noEmit && yarn run jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/BetterCallSky/ts-mongoose.git"},"author":{"name":"Łukasz Sentkiewicz"},"license":"MIT","bugs":{"url":"https://github.com/BetterCallSky/ts-mongoose/issues"},"homepage":"https://github.com/BetterCallSky/ts-mongoose#readme","devDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14","@types/jest":"^23.3.9","jest":"^23.6.0","prettier":"^1.14.3","ts-jest":"^23.10.4","typescript":"^3.1.6"},"dependencies":{},"peerDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14"},"_id":"ts-mongoose@0.0.19","_nodeVersion":"9.9.0","_npmVersion":"6.8.0","dist":{"integrity":"sha512-r6b8XsNzvLHZlZ3W+XzSTJq1berLyY7HYU24xDMrZzsKB4TxcvgOmuxsAQ/Cy38kpyAsbInl8P4kJP5ORF3uJg==","shasum":"dad3d4105c128136e67f82010eb50b6e76daf558","tarball":"https://registry.npmjs.org/ts-mongoose/-/ts-mongoose-0.0.19.tgz","fileCount":26,"unpackedSize":127508,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdHlkpCRA9TVsSAnZWagAAU+4P/RFDdv4mcgVP93aougjR\noA0Axg3P9zdlVLllpDsx2jmyCd3YFPn+KVnVoZeZyiXAUj7k3jvln6ufFN/N\n8Si1VkZJbFIoX4uVJlEWQOyPfhxY4JndgpBtlDiG/aT4C3jw6taaykqrMFum\n6W+y/qGMqhQPjs89uGKXlVa8G7veG4US5VibcGpzbMNWZu0jxkjeA0z8iUJW\nzLAaVpV/h9T1wQBCOhSqhb8HIqmyXyk46In22aEJ0A16kdfTmcP8QG05ImCx\nGU3AMlPcmTyUrQe8fubfSJyRz8yvfJH0hff8eT/JXklnwR2g1wLiHH/CjX5e\nYPmOaWG1YedjiLtfxjjx+5EH9qK1DEZF0Y1bSVrYSiSFbDkKiE14/Y+pItcZ\n5Y35aNqxTSKxKXmFr7Q3yxph+8W4F+A5irZ58Ne70HWyzUJzFXopwKjp8NQx\nRLyWFwXrAjLYNUCXyTe9AOPO60N+k00ZRxRJUCs7Mi00/7O/c4C7GtEI40Hj\nOb96B31Mum8lq2cU4imsB5Ok9OEWZw+QpI4qzO236AvYDCBEgBz1OYot6vUk\nntkRozJnDf8nn/5VsCIkDWZDB1Xd2+3GagbQ3pDfNYbsRBv8pXMOA5fnzCNQ\nOKXbHRz8jmRDiOHSuSwiqd7XhQmjHq+e1KQ1qIBTQRc8hbFLz0JF9njE/NYY\nQM+3\r\n=MpMU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQClvEPkJwQr+P+QC7Hq5sglG3BSWuVzBMkXqtoKwBSwdwIgRCasjtafiV65cOrZXDkxtXcohW410H/J3NaNMK3LmxU="}]},"maintainers":[{"email":"sonynakata@gmail.com","name":"lchimaru"},{"email":"sirmims@gmail.com","name":"lsentkiewicz"}],"_npmUser":{"name":"lchimaru","email":"sonynakata@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-mongoose_0.0.19_1562269992699_0.6613777138650792"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.20-beta.0":{"name":"ts-mongoose","version":"0.0.20-beta.0","description":"Automatically infer TypeScript interfaces from mongoose schemas.","main":"index.js","module":"es/index.js","jsnext:main":"es/index.js","types":"index.d.ts","scripts":{"jest":"jest","tsc":"tsc","test":"yarn run tsc --noEmit && yarn run jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/BetterCallSky/ts-mongoose.git"},"author":{"name":"Łukasz Sentkiewicz"},"license":"MIT","bugs":{"url":"https://github.com/BetterCallSky/ts-mongoose/issues"},"homepage":"https://github.com/BetterCallSky/ts-mongoose#readme","devDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14","@types/jest":"^23.3.9","jest":"^23.6.0","prettier":"^1.14.3","ts-jest":"^23.10.4","typescript":"^3.1.6"},"dependencies":{},"peerDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14"},"readme":"# ts-mongoose\n\nAutomatically infer TypeScript interfaces from mongoose schemas.\n\n[![Build Status](https://travis-ci.org/BetterCallSky/ts-mongoose.svg?branch=master)](https://travis-ci.org/BetterCallSky/ts-mongoose) [![npm module](https://badge.fury.io/js/ts-mongoose.svg)](https://www.npmjs.org/package/ts-mongoose)\n\n## Installation\n\n```bash\nnpm i ts-mongoose mongoose @types/mongoose\nyarn add ts-mongoose mongoose @types/mongoose\n```\n\n## The Problem\n\nWhen using mongoose and Typescript, you must define schemas and interfaces. Both definitions must be maintained separately and must match each other. It can be error-prone during development and cause overhead.\n\n`ts-mongoose` is a very lightweight library that allows you to create a mongoose schema and a typescript type from a common definition.  \nAll types as created from 1-liner functions and does not depend on decorators❗️.\n\nFor example:  \n`Type.string()` returns `{type: String, required: true}`, which is the same definition required in the original mongoose library.\n\n## Example\n\nBefore:\n\n```ts\nimport { Schema, model, Model, Document } from 'mongoose';\n\nconst AddressSchema = new Schema(\n  {\n    city: { type: String, required: true },\n    country: String,\n    zip: String,\n  },\n  { _id: false, timestamps: true }\n);\n\nconst PhoneSchema = new Schema({\n  phoneNumber: { type: Schema.Types.Number, required: true },\n  name: String,\n});\n\nconst UserSchema = new Schema(\n  {\n    title: { type: String, required: true },\n    author: { type: String, required: true },\n    body: { type: String, required: true },\n    comments: [\n      {\n        body: { type: String, required: true },\n        date: { type: Date, required: true },\n      },\n    ],\n    date: { type: Date, default: Date.now, required: true },\n    hidden: { type: Boolean, required: true },\n    meta: {\n      votes: { type: Schema.Types.Number },\n      favs: { type: Schema.Types.Number },\n    },\n    m: {\n      type: Schema.Types.Mixed,\n      required: true,\n    },\n    gender: {\n      type: Schema.Types.String,\n      required: true,\n      enum: ['male', 'female'],\n    },\n    otherId: {\n      type: Schema.Types.ObjectId,\n      required: true,\n    },\n    address: {\n      type: AddressSchema,\n      required: true,\n    },\n    phones: {\n      type: [PhoneSchema],\n      required: true,\n    },\n  },\n  { timestamps: { createdAt: true } }\n);\n\ninterface UserProps extends Document {\n  title: string;\n  author: string;\n  body: string;\n  // Duplicate all props from the above schema :(\n}\n\nconst User: Model<UserProps> = model('User', UserSchema);\n```\n\n🎉🎉🎉 After:\n\n```ts\nimport { createSchema, Type, typedModel } from 'ts-mongoose';\n\nconst genders = ['male', 'female'] as const;\n\nconst AddressSchema = createSchema({\n  city: Type.string(),\n  country: Type.optionalString(),\n  zip: Type.optionalString(),\n}, { _id: false, timestamps: true });\n\nconst PhoneSchema = createSchema({\n  phoneNumber: Type.number(),\n  name: Type.optionalString(),\n});\n\nconst UserSchema = createSchema({\n  title: Type.string(),\n  author: Type.string(),\n  body: Type.string(),\n  comments: Type.array().of({\n    body: Type.string(),\n    date: Type.date(),\n  }),\n  date: Type.date({ default: Date.now as any }),\n  hidden: Type.boolean(),\n  meta: Type.object().of({\n    votes: Type.number(),\n    favs: Type.number(),\n  }),\n  m: Type.mixed(),\n  gender: Type.string({ enum: genders }),\n  otherId: Type.objectId(),\n  address: Type.schema().of(AddressSchema),\n  phones: Type.array().of(PhoneSchema),\n}, { timestamps: { createdAt: true } });\n\nconst User = typedModel('User', UserSchema);\nUser.findById('123').then(user => {\n  if (user) {\n    user. // autocomplete here\n  }\n});\n```\n\n### API\n\n- Each type has two forms: required and optional\n\n```ts\n{\n  // same as {type: String}\n  firstName: Type.optionalString(),\n  // same as {type: String, required: true}\n  email: Type.string(),\n}\n```\n\n- Each type accepts the same options from mongoose\n\n```ts\n{\n  // same as {type: String, required: true, unique: true, index: true}\n  email: Type.string({ unique: true, index: true });\n}\n```\n\n- Note that enum values need to be readonly array to be treated as literals by typescript\n\n```ts\nconst genders = ['male', 'female'] as const;\n{\n  // same as {type: String, required: true, enum: ['male', 'female']}\n  gender: Type.string({ enum: genders });\n}\n```\n\n- `schema`, `object`, `array` types have a method `of` where you must provide a child type\n\n```ts\n{\n  // same as {type: [String], required: true}\n  tags: Type.array().of(Type.string());\n}\n```\n\n- `schema.of(ExampleSchema)` has typical for Subdocument additional fields and methods. Setting `{ _id: false }` in SchemaOptions won't attach `_id` property in Subdocument\n\n```ts\nconst AddressSchema = createSchema(\n  { city: Type.string() },\n  { _id: false, timestamps: true }\n);\n{\n  // same as {type: AddressSchema}\n  address: Type.schema().of(AddressSchema);\n}\n// address property has city property, other Subdocument methods and properties except '_id'\n```\n\n- `array.of(ExampleSchema)` will return DocumentArray instead of standard array\n\n```ts\nconst PhoneSchema = createSchema(\n  { phoneNumber: Type.number() },\n  { _id: false }\n);\n{\n  // same as {type: [PhoneSchema]}\n  phones: Type.schema().of(PhoneSchema);\n}\n// phones property has such methods as create(), id(), but also those typical for arrays like map(), filter() etc\n```\n\n- `ref` is a special type for creating references\n\n```ts\n{\n  // same as [{type: Schema.Types.ObjectId, ref: 'Comment'}]\n  comments: Type.array().of(\n    Type.ref(Type.objectId()).to('Comment', CommentSchema)\n  ),\n}\n```\n\n- `populateTs(property: string)` use this function to populate a property and adjust the returned type automatically. Under the hood it calls only the native `populate` method.  \n  Method will be available if you import a special plugin.\n\n```ts\n// models.ts\n\nimport 'ts-mongoose/plugin';\n\nUser.find().populateTs('comments');\n```\n\n## Extracting Document type\n\nUse `ExtractDoc` to extract generated document type.  \nUse `ExtractProps` to extract generated base model properties.  \nExample:\n\n```ts\nimport {\n  createSchema,\n  Type,\n  typedModel,\n  ExtractDoc,\n  ExtractProps,\n} from 'ts-mongoose';\n\nexport const UserSchema = createSchema({\n  email: Type.string(),\n  username: Type.string(),\n  isBlocked: Type.optionalBoolean(),\n});\n\nexport const User = typedModel('User', UserSchema);\nexport type UserDoc = ExtractDoc<typeof UserSchema>;\nexport type UserProps = ExtractProps<typeof UserSchema>;\n\n// example function\n\nasync function blockUser(user: UserDoc) {\n  user.isBlocked = true;\n  // access all properties + Document methods and properties\n  await user.save();\n}\n\nfunction randomUser(): UserProps {\n  // must return `email`, `username`\n  // `isBlocked` is optional\n  return {\n    email: 'user1@example.com',\n    username: 'user1',\n  };\n}\n```\n\n## Refs\n\nRefs and populations are supported.  \nCheck code under `example/example4.ts`.\n\n![alt autocomplete](.github/refs.gif)\n\n### Custom Field\n\nIf you need to specify custom fields in the model, you can add a fake annotation.  \nIt's only required if you add virtual fields or custom methods to the model.\n\n```ts\nconst UserSchema = createSchema({\n  title: Type.string(),\n  author: Type.string(),\n  ...({} as {\n    generatedField: string;\n    customFunction: () => number;\n  }),\n});\nconst User = typedModel('User', UserSchema);\n```\n\nAutocomplete popup:  \n![alt autocomplete](.github/custom.png)\n\n### Static methods\n\nIf you need to have static custom methods on Model you can pass them in `statics` property, which is part of schema options. For functions returning instance/s of Model, use `ModelInstanceType` / `ModelInstancesType` interfaces as returning value.\n\n```ts\nconst UserSchema = createSchema(\n  {\n    name: Type.string(),\n    age: Type.number(),\n  },\n  {\n    statics: {\n      findByName: function(name: string): ModelInstancesType {\n        return this.find({ name: name });\n      },\n      findOneByName: function(name: string): ModelInstanceType {\n        return this.findOne({ name: name });\n      },\n      countLetters: function(name: string, bonus?: number): number {\n        return name.length + (bonus ? bonus : 0);\n      },\n    },\n  }\n);\n\nconst User = typedModel('User', UserSchema);\nUser.countLetters('a');\n```\n\n### TODO\n\n- support types: Decimal128, Map\n\nMIT\n","readmeFilename":"README.md","_id":"ts-mongoose@0.0.20-beta.0","_nodeVersion":"9.9.0","_npmVersion":"6.8.0","dist":{"integrity":"sha512-aYgPVCdM7qZRpnksCyxSyBt4kXxrQhoHE0YdAZ966fJqQR4LgNEAqdKGXBZW647pYh8D43/okqkYKNuPvjH83w==","shasum":"159d7635a84359ca557af9dd7017939f905c78a8","tarball":"https://registry.npmjs.org/ts-mongoose/-/ts-mongoose-0.0.20-beta.0.tgz","fileCount":50,"unpackedSize":38893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLbOdCRA9TVsSAnZWagAAuBcP/jbEaFkJNKuBYl4vifkb\nLDyZu40/kQT+3ZTfLJVrkIpUwL1q8DWgagbWGn8uOSiFkLojwQdWJ4LN4W1a\nmRUq82l6RH6/kaa/XV3/t7eswpF7Uv3sybRelXPgIQxgYXkVoLMGHssXj05T\nYqugttO49s402mL6CCYmOPtqfvF19eaCEbwKoV6zfy2nbA0vCF7Yvxyp48o7\nPF6VK2YxrPDFiOd0i7kLV6hyJ+JSTnwB1YC5UymfPTaofI8hvitjKgola5s0\najUEyQ+EkJKc9RL++nxfikobZUjxS/5cWrJCsyEzoFIYXyMLCYchjqro3NJw\n62zq/73+7ifZI+ZEMV04c5MxCg1jFDms8C9201/c14O9R0fCETn9uYIq8CyM\nqJ05LKV0bHSEXmoSdMK+sIY1Lnrucr2haJj/9eMpIlMBbxiQgpywN8vTzX9Y\n5n3CdRx4xDp05EBq+YlMe+O+ul3tmXCqeAbRxPX4f8Npv70k1JhbioQ9whWM\noZivo6IwKH/v9xwA/pRVkZAQUeI/zV7qC85JwIj6YxThS8bPh0YteKYULw+j\npCtn0un3S0NQu+OTrwF5ywck12LyybzHYi+DLBbc3KPxVWc7WEW/ydtu9bqS\niPjaI7ndeR4D0D1/oQFoTCIGKoWfaMgVJTwM30FThCYSgMIvVXuVq59+p86J\nwt4u\r\n=nDnL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPZvj+8jXoqhgzvZvQfWwFrNOqR9CDl2Gv/DlN0eJ/FwIhALAZ3BEhmsCSyNhHwWfjL7HoyoM9VEQmBrxLjr+UdMjk"}]},"maintainers":[{"email":"sonynakata@gmail.com","name":"lchimaru"},{"email":"sirmims@gmail.com","name":"lsentkiewicz"}],"_npmUser":{"name":"lchimaru","email":"sonynakata@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-mongoose_0.0.20-beta.0_1563276188820_0.20826670682876958"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.20-beta.1":{"name":"ts-mongoose","version":"0.0.20-beta.1","description":"Automatically infer TypeScript interfaces from mongoose schemas.","main":"index.js","module":"es/index.js","jsnext:main":"es/index.js","types":"index.d.ts","scripts":{"jest":"jest","tsc":"tsc","test":"yarn run tsc --noEmit && yarn run jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/BetterCallSky/ts-mongoose.git"},"author":{"name":"Łukasz Sentkiewicz"},"license":"MIT","bugs":{"url":"https://github.com/BetterCallSky/ts-mongoose/issues"},"homepage":"https://github.com/BetterCallSky/ts-mongoose#readme","devDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14","@types/jest":"^23.3.9","jest":"^23.6.0","prettier":"^1.14.3","ts-jest":"^23.10.4","typescript":"^3.6.3"},"dependencies":{},"peerDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14"},"readme":"# ts-mongoose\n\nAutomatically infer TypeScript interfaces from mongoose schemas.\n\n[![Build Status](https://travis-ci.org/BetterCallSky/ts-mongoose.svg?branch=master)](https://travis-ci.org/BetterCallSky/ts-mongoose) [![npm module](https://badge.fury.io/js/ts-mongoose.svg)](https://www.npmjs.org/package/ts-mongoose)\n\n## Installation\n\n```bash\nnpm i ts-mongoose mongoose @types/mongoose\nyarn add ts-mongoose mongoose @types/mongoose\n```\n\n## The Problem\n\nWhen using mongoose and Typescript, you must define schemas and interfaces. Both definitions must be maintained separately and must match each other. It can be error-prone during development and cause overhead.\n\n`ts-mongoose` is a very lightweight library that allows you to create a mongoose schema and a typescript type from a common definition.  \nAll types as created from 1-liner functions and does not depend on decorators❗️.\n\nFor example:  \n`Type.string({ required: true })` returns `{type: String, required: true}`, which is the same definition required in the original mongoose library.\n\n## Example\n\nBefore:\n\n```ts\nimport { Schema, model, Model, Document } from 'mongoose';\n\nconst AddressSchema = new Schema(\n  {\n    city: { type: String, required: true },\n    country: String,\n    zip: String,\n  },\n  { _id: false, timestamps: true }\n);\n\nconst PhoneSchema = new Schema({\n  phoneNumber: { type: Schema.Types.Number, required: true },\n  name: String,\n});\n\nconst UserSchema = new Schema(\n  {\n    title: { type: String, required: true },\n    author: { type: String, required: true },\n    body: { type: String, required: true },\n    comments: [\n      {\n        body: { type: String, required: true },\n        date: { type: Date, required: true },\n      },\n    ],\n    date: { type: Date, default: Date.now, required: true },\n    hidden: { type: Boolean, required: true },\n    meta: {\n      votes: { type: Schema.Types.Number },\n      favs: { type: Schema.Types.Number },\n    },\n    m: {\n      type: Schema.Types.Mixed,\n      required: true,\n    },\n    gender: {\n      type: Schema.Types.String,\n      required: true,\n      enum: ['male', 'female'],\n    },\n    otherId: {\n      type: Schema.Types.ObjectId,\n      required: true,\n    },\n    address: {\n      type: AddressSchema,\n      required: true,\n    },\n    phones: {\n      type: [PhoneSchema],\n      required: true,\n    },\n  },\n  { timestamps: { createdAt: true } }\n);\n\ninterface UserProps extends Document {\n  title: string;\n  author: string;\n  body: string;\n  // Duplicate all props from the above schema :(\n}\n\nconst User: Model<UserProps> = model('User', UserSchema);\n```\n\n🎉🎉🎉 After:\n\n```ts\nimport { createSchema, Type, typedModel } from 'ts-mongoose';\n\nconst genders = ['male', 'female'] as const;\n\nconst AddressSchema = createSchema(\n  {\n    city: Type.string({ required: true }),\n    country: Type.string(),\n    zip: Type.string(),\n  },\n  { _id: false, timestamps: true }\n);\n\nconst PhoneSchema = createSchema({\n  phoneNumber: Type.number({ required: true }),\n  name: Type.string(),\n});\n\nconst UserSchema = createSchema(\n  {\n    title: Type.string({ required: true }),\n    author: Type.string({ required: true }),\n    body: Type.string({ required: true }),\n    comments: Type.array().of({\n      body: Type.string({ required: true }),\n      date: Type.date({ required: true }),\n    }),\n    date: Type.date({ default: Date.now as any }),\n    hidden: Type.boolean({ required: true }),\n    meta: Type.object().of({\n      votes: Type.number({ required: true }),\n      favs: Type.number({ required: true }),\n    }),\n    m: Type.mixed({ required: true }),\n    gender: Type.string({ required: true, enum: genders }),\n    otherId: Type.objectId({ required: true }),\n    address: Type.schema({ required: true }).of(AddressSchema),\n    phones: Type.array({ required: true }).of(PhoneSchema),\n  },\n  { timestamps: { createdAt: true } }\n);\n\nconst User = typedModel('User', UserSchema);\nUser.findById('123').then(user => {\n  if (user) {\n    user. // autocomplete here\n  }\n});\n```\n\n### API\n\n- Each type has two forms: required and optional\n\n```ts\n{\n  // same as {type: String}\n  firstName: Type.string(),\n  // same as {type: String, required: true}\n  email: Type.string({ required: true }),\n}\n```\n\n- Each type accepts the same options from mongoose\n\n```ts\n{\n  // same as {type: String, required: true, unique: true, index: true}\n  email: Type.string({ required: true, unique: true, index: true });\n}\n```\n\n- Note that enum values need to be readonly array to be treated as literals by typescript\n\n```ts\nconst genders = ['male', 'female'] as const;\n{\n  // same as {type: String, enum: ['male', 'female']}\n  gender: Type.string({ enum: genders });\n}\n```\n\n- `schema`, `object`, `array` types have a method `of` where you must provide a child type\n\n```ts\n{\n  // same as {type: [String], required: true}\n  tags: Type.array({ required: true }).of(Type.string({ required: true }));\n}\n```\n\n- `schema.of(ExampleSchema)` has typical for Subdocument additional fields and methods. Setting `{ _id: false }` in SchemaOptions won't attach `_id` property in Subdocument\n\n```ts\nconst AddressSchema = createSchema(\n  { city: Type.string({ required: true }) },\n  { _id: false, timestamps: true }\n);\n{\n  // same as {type: AddressSchema}\n  address: Type.schema().of(AddressSchema);\n}\n// address property has city property, other Subdocument methods and properties except '_id'\n```\n\n- `array.of(ExampleSchema)` will return DocumentArray instead of standard array\n\n```ts\nconst PhoneSchema = createSchema(\n  { phoneNumber: Type.number({ required: true }) },\n  { _id: false }\n);\n{\n  // same as {type: [PhoneSchema]}\n  phones: Type.array().of(PhoneSchema);\n}\n// phones property has such methods as create(), id(), but also those typical for arrays like map(), filter() etc\n```\n\n- `ref` is a special type for creating references\n\n```ts\n{\n  // same as [{type: Schema.Types.ObjectId, ref: 'Comment'}]\n  comments: Type.array().of(\n    Type.ref(Type.objectId()).to('Comment', CommentSchema)\n  ),\n}\n```\n\n- `populateTs(property: string)` use this function to populate a property and adjust the returned type automatically. Under the hood it calls only the native `populate` method.  \n  Method will be available if you import a special plugin.\n\n```ts\n// models.ts\n\nimport 'ts-mongoose/plugin';\n\nUser.find().populateTs('comments');\n```\n\n## Extracting Document type\n\nUse `ExtractDoc` to extract generated document type.  \nUse `ExtractProps` to extract generated base model properties.  \nExample:\n\n```ts\nimport {\n  createSchema,\n  Type,\n  typedModel,\n  ExtractDoc,\n  ExtractProps,\n} from 'ts-mongoose';\n\nexport const UserSchema = createSchema({\n  email: Type.string({ required: true }),\n  username: Type.string({ required: true }),\n  isBlocked: Type.boolean(),\n});\n\nexport const User = typedModel('User', UserSchema);\nexport type UserDoc = ExtractDoc<typeof UserSchema>;\nexport type UserProps = ExtractProps<typeof UserSchema>;\n\n// example function\n\nasync function blockUser(user: UserDoc) {\n  user.isBlocked = true;\n  // access all properties + Document methods and properties\n  await user.save();\n}\n\nfunction randomUser(): UserProps {\n  // must return `email`, `username`\n  // `isBlocked` is optional\n  return {\n    email: 'user1@example.com',\n    username: 'user1',\n  };\n}\n```\n\n## Refs\n\nRefs and populations are supported.  \nCheck code under `example/example4.ts`.\n\n![alt autocomplete](.github/refs.gif)\n\n### Custom Field\n\nIf you need to specify custom fields in the model, you can add a fake annotation.  \nIt's only required if you add virtual fields or custom methods to the model.\n\n```ts\nconst UserSchema = createSchema({\n  title: Type.string({ required: true }),\n  author: Type.string({ required: true }),\n  ...({} as {\n    generatedField: string;\n    customFunction: () => number;\n  }),\n});\nconst User = typedModel('User', UserSchema);\n```\n\nAutocomplete popup:  \n![alt autocomplete](.github/custom.png)\n\n### Static methods\n\nIf you need to have static custom methods on Model you can pass them as 5th parameter of `typedModel` function. It should automatically figured out returning value, but you can declare it too.\n\n```ts\nconst UserSchema = createSchema({\n  name: Type.string({ required: true }),\n  age: Type.number({ required: true }),\n});\n\nconst User = typedModel('User', UserSchema, undefined, undefined, {\n  findByName: function(name: string) {\n    return this.find({ name });\n  },\n  findOneByName: function(name: string) {\n    return this.findOne({ name });\n  },\n  countLetters: function(name: string, bonus?: number) {\n    return name.length + (bonus ? bonus : 0);\n  },\n});\nconst u = await User.findOne({});\nif (u) u.name;\n```\n\n### TODO\n\n- support types: Map\n\nMIT\n","readmeFilename":"README.md","_id":"ts-mongoose@0.0.20-beta.1","_nodeVersion":"9.9.0","_npmVersion":"6.8.0","dist":{"integrity":"sha512-OEzDANMdWob+BzdVGlJwHcfpzTVLIQNlNfbzjQoJpOK+M9oD9JIKboTm+LvjjSfwL/IOUtF85A98GMfMBBBClA==","shasum":"c89525e7b0e2d0259c735c84144a7f30b7c7e03d","tarball":"https://registry.npmjs.org/ts-mongoose/-/ts-mongoose-0.0.20-beta.1.tgz","fileCount":118,"unpackedSize":98461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdn5Z5CRA9TVsSAnZWagAAi7IP+wZ5gPAp3GrX2kXceOyS\nU3GJr2OQobqOL9Nygflh8ZZX/dPERvGblr9q2uVBRRQCmFIDvoZmowtKt5Qv\nxEeCi3L0O8SuLfAL45k6KIXoUXPCpdWjb5kv1VqD624uVkN3ztya9meErCej\nn62mxSUGDoIGF4r08cBCCTfJ/4HgMwW/xr/MifaJOsfFL/sCESHmpLd5OzMW\n7HX5oNqj352SXX5p5rF+TEe3eyJMh/dZCaAwI1y1dKh/UuvCcKUba314sJ3k\nVovAqYTjyyafZZpJ8YST0UA+QhWP2n6yR4Gos5KEAFXzj/fw/Kx9GvFBOlM9\nBAQLY/VSEX0S2fYNEKcZrDiHcXsnIqn/2zN2ms8MVT18NQ1APNgwlW7HVR5J\nchmYk1e+f6H+zsMtzvlDs97AdnKD1CFh6aiJiYpkBNR9vmSIMSpeE2qevo0L\nyp6VupiQHfRq/PVc82mRTVrGekCUFFECmuoMHYpr1Wo0Ly5hY4XinHuXtZcJ\naCJ7J97yPXTOAxxydTlIHVFl89+dDSteKjvfYAWbZ6ZrQF+cznJYdpX2V479\nRHDOIIKgqQ+dYZAhIKnU5dsJm5y4SWRRom24dQUv8MxBXuNw7u2znAKLYcwU\nRLQcphVNyAuyPYczm7fe7gco7aFg2onISeyDwAfYtZ6gwRI/EVGHaCoFzCrf\n1kXX\r\n=wU9B\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCg5BjFCZ7CpCkbgzZIXFXZNG+TQ9EdUoHitktDOnb9HgIgYCHJe8NOaGqFudK+novj+iwy+p2tWrmpIuhN8dBpakw="}]},"maintainers":[{"email":"sonynakata@gmail.com","name":"lchimaru"},{"email":"sirmims@gmail.com","name":"lsentkiewicz"}],"_npmUser":{"name":"lchimaru","email":"sonynakata@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-mongoose_0.0.20-beta.1_1570739832819_0.2727218132934366"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.20-beta.2":{"name":"ts-mongoose","version":"0.0.20-beta.2","description":"Automatically infer TypeScript interfaces from mongoose schemas.","main":"index.js","module":"es/index.js","jsnext:main":"es/index.js","types":"index.d.ts","scripts":{"jest":"jest","tsc":"tsc","test":"yarn run tsc --noEmit && yarn run jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/BetterCallSky/ts-mongoose.git"},"author":{"name":"Łukasz Sentkiewicz"},"license":"MIT","bugs":{"url":"https://github.com/BetterCallSky/ts-mongoose/issues"},"homepage":"https://github.com/BetterCallSky/ts-mongoose#readme","devDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14","@types/jest":"^23.3.9","jest":"^23.6.0","prettier":"^1.14.3","ts-jest":"^23.10.4","typescript":"^3.6.3"},"dependencies":{},"peerDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14"},"readme":"# ts-mongoose\n\nAutomatically infer TypeScript interfaces from mongoose schemas.\n\n[![Build Status](https://travis-ci.org/BetterCallSky/ts-mongoose.svg?branch=master)](https://travis-ci.org/BetterCallSky/ts-mongoose) [![npm module](https://badge.fury.io/js/ts-mongoose.svg)](https://www.npmjs.org/package/ts-mongoose)\n\n## Installation\n\n```bash\nnpm i ts-mongoose mongoose @types/mongoose\nyarn add ts-mongoose mongoose @types/mongoose\n```\n\n## The Problem\n\nWhen using mongoose and Typescript, you must define schemas and interfaces. Both definitions must be maintained separately and must match each other. It can be error-prone during development and cause overhead.\n\n`ts-mongoose` is a very lightweight library that allows you to create a mongoose schema and a typescript type from a common definition.  \nAll types as created from 1-liner functions and does not depend on decorators❗️.\n\nFor example:  \n`Type.string({ required: true })` returns `{type: String, required: true}`, which is the same definition required in the original mongoose library.\n\n## Example\n\nBefore:\n\n```ts\nimport { Schema, model, Model, Document } from 'mongoose';\n\nconst AddressSchema = new Schema(\n  {\n    city: { type: String, required: true },\n    country: String,\n    zip: String,\n  },\n  { _id: false, timestamps: true }\n);\n\nconst PhoneSchema = new Schema({\n  phoneNumber: { type: Schema.Types.Number, required: true },\n  name: String,\n});\n\nconst UserSchema = new Schema(\n  {\n    title: { type: String, required: true },\n    author: { type: String, required: true },\n    body: { type: String, required: true },\n    comments: [\n      {\n        body: { type: String, required: true },\n        date: { type: Date, required: true },\n      },\n    ],\n    date: { type: Date, default: Date.now, required: true },\n    hidden: { type: Boolean, required: true },\n    meta: {\n      votes: { type: Schema.Types.Number },\n      favs: { type: Schema.Types.Number },\n    },\n    m: {\n      type: Schema.Types.Mixed,\n      required: true,\n    },\n    gender: {\n      type: Schema.Types.String,\n      required: true,\n      enum: ['male', 'female'],\n    },\n    otherId: {\n      type: Schema.Types.ObjectId,\n      required: true,\n    },\n    address: {\n      type: AddressSchema,\n      required: true,\n    },\n    phones: {\n      type: [PhoneSchema],\n      required: true,\n    },\n  },\n  { timestamps: { createdAt: true } }\n);\n\ninterface UserProps extends Document {\n  title: string;\n  author: string;\n  body: string;\n  // Duplicate all props from the above schema :(\n}\n\nconst User: Model<UserProps> = model('User', UserSchema);\n```\n\n🎉🎉🎉 After:\n\n```ts\nimport { createSchema, Type, typedModel } from 'ts-mongoose';\n\nconst genders = ['male', 'female'] as const;\n\nconst AddressSchema = createSchema(\n  {\n    city: Type.string({ required: true }),\n    country: Type.string(),\n    zip: Type.string(),\n  },\n  { _id: false, timestamps: true }\n);\n\nconst PhoneSchema = createSchema({\n  phoneNumber: Type.number({ required: true }),\n  name: Type.string(),\n});\n\nconst UserSchema = createSchema(\n  {\n    title: Type.string({ required: true }),\n    author: Type.string({ required: true }),\n    body: Type.string({ required: true }),\n    comments: Type.array().of({\n      body: Type.string({ required: true }),\n      date: Type.date({ required: true }),\n    }),\n    date: Type.date({ default: Date.now as any }),\n    hidden: Type.boolean({ required: true }),\n    meta: Type.object().of({\n      votes: Type.number({ required: true }),\n      favs: Type.number({ required: true }),\n    }),\n    m: Type.mixed({ required: true }),\n    gender: Type.string({ required: true, enum: genders }),\n    otherId: Type.objectId({ required: true }),\n    address: Type.schema({ required: true }).of(AddressSchema),\n    phones: Type.array({ required: true }).of(PhoneSchema),\n  },\n  { timestamps: { createdAt: true } }\n);\n\nconst User = typedModel('User', UserSchema);\nUser.findById('123').then(user => {\n  if (user) {\n    user. // autocomplete here\n  }\n});\n```\n\n### API\n\n- Each type has two forms: required and optional\n\n```ts\n{\n  // same as {type: String}\n  firstName: Type.string(),\n  // same as {type: String, required: true}\n  email: Type.string({ required: true }),\n}\n```\n\n- Each type accepts the same options from mongoose\n\n```ts\n{\n  // same as {type: String, required: true, unique: true, index: true}\n  email: Type.string({ required: true, unique: true, index: true });\n}\n```\n\n- Note that enum values need to be readonly array to be treated as literals by typescript\n\n```ts\nconst genders = ['male', 'female'] as const;\n{\n  // same as {type: String, enum: ['male', 'female']}\n  gender: Type.string({ enum: genders });\n}\n```\n\n- `schema`, `object`, `array` types have a method `of` where you must provide a child type\n\n```ts\n{\n  // same as {type: [String], required: true}\n  tags: Type.array({ required: true }).of(Type.string({ required: true }));\n}\n```\n\n- `schema.of(ExampleSchema)` has typical for Subdocument additional fields and methods. Setting `{ _id: false }` in SchemaOptions won't attach `_id` property in Subdocument\n\n```ts\nconst AddressSchema = createSchema(\n  { city: Type.string({ required: true }) },\n  { _id: false, timestamps: true }\n);\n{\n  // same as {type: AddressSchema}\n  address: Type.schema().of(AddressSchema);\n}\n// address property has city property, other Subdocument methods and properties except '_id'\n```\n\n- `array.of(ExampleSchema)` will return DocumentArray instead of standard array\n\n```ts\nconst PhoneSchema = createSchema(\n  { phoneNumber: Type.number({ required: true }) },\n  { _id: false }\n);\n{\n  // same as {type: [PhoneSchema]}\n  phones: Type.array().of(PhoneSchema);\n}\n// phones property has such methods as create(), id(), but also those typical for arrays like map(), filter() etc\n```\n\n- `ref` is a special type for creating references\n\n```ts\n{\n  // same as [{type: Schema.Types.ObjectId, ref: 'Comment'}]\n  comments: Type.array().of(\n    Type.ref(Type.objectId()).to('Comment', CommentSchema)\n  ),\n}\n```\n\n- `populateTs(property: string)` use this function to populate a property and adjust the returned type automatically. Under the hood it calls only the native `populate` method.  \n  Method will be available if you import a special plugin.\n\n```ts\n// models.ts\n\nimport 'ts-mongoose/plugin';\n\nUser.find().populateTs('comments');\n```\n\n## Extracting Document type\n\nUse `ExtractDoc` to extract generated document type.  \nUse `ExtractProps` to extract generated base model properties.  \nExample:\n\n```ts\nimport {\n  createSchema,\n  Type,\n  typedModel,\n  ExtractDoc,\n  ExtractProps,\n} from 'ts-mongoose';\n\nexport const UserSchema = createSchema({\n  email: Type.string({ required: true }),\n  username: Type.string({ required: true }),\n  isBlocked: Type.boolean(),\n});\n\nexport const User = typedModel('User', UserSchema);\nexport type UserDoc = ExtractDoc<typeof UserSchema>;\nexport type UserProps = ExtractProps<typeof UserSchema>;\n\n// example function\n\nasync function blockUser(user: UserDoc) {\n  user.isBlocked = true;\n  // access all properties + Document methods and properties\n  await user.save();\n}\n\nfunction randomUser(): UserProps {\n  // must return `email`, `username`\n  // `isBlocked` is optional\n  return {\n    email: 'user1@example.com',\n    username: 'user1',\n  };\n}\n```\n\n## Refs\n\nRefs and populations are supported.  \nCheck code under `example/example4.ts`.\n\n![alt autocomplete](.github/refs.gif)\n\n### Custom Field\n\nIf you need to specify custom fields in the model, you can add a fake annotation.  \nIt's only required if you add virtual fields or custom methods to the model.\n\n```ts\nconst UserSchema = createSchema({\n  title: Type.string({ required: true }),\n  author: Type.string({ required: true }),\n  ...({} as {\n    generatedField: string;\n    customFunction: () => number;\n  }),\n});\nconst User = typedModel('User', UserSchema);\n```\n\nAutocomplete popup:  \n![alt autocomplete](.github/custom.png)\n\n### Static methods\n\nIf you need to have static custom methods on Model you can pass them as 5th parameter of `typedModel` function. It should automatically figured out returning value, but you can declare it too.\n\n```ts\nconst UserSchema = createSchema({\n  name: Type.string({ required: true }),\n  age: Type.number({ required: true }),\n});\n\nconst User = typedModel('User', UserSchema, undefined, undefined, {\n  findByName: function(name: string) {\n    return this.find({ name });\n  },\n  findOneByName: function(name: string) {\n    return this.findOne({ name });\n  },\n  countLetters: function(name: string, bonus?: number) {\n    return name.length + (bonus ? bonus : 0);\n  },\n});\nconst u = await User.findOne({});\nif (u) u.name;\n```\n\n### TODO\n\n- support types: Map\n\nMIT\n","readmeFilename":"README.md","_id":"ts-mongoose@0.0.20-beta.2","_nodeVersion":"9.9.0","_npmVersion":"6.8.0","dist":{"integrity":"sha512-FzFwdKpi3J9AutgUbX+ZagmHx2DICD/pC2SvnMnVe5H4CY0ltbMCQcFOF/NPz59YqViy4HSHJUk81MQa+ahtvw==","shasum":"47f4c316129294648345e1ab9258027305f71f4f","tarball":"https://registry.npmjs.org/ts-mongoose/-/ts-mongoose-0.0.20-beta.2.tgz","fileCount":46,"unpackedSize":37597,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdn5uDCRA9TVsSAnZWagAA+wcP/jQ5vU0n1dHJ/aM6283o\nf+LWCRgY6mAnjfOrBZLHQCyd8z63ftodZoUh8JR6LliMmJnXz7gjpCnTe93b\nq98RacI1PoYCw5bWZ8sf4x4iT7auhcX5VXFlPvF0RKQ+0VdBORHzSoFrrDed\nFcmlQo16G+VVY8OWQ+ANbbPnCLATQzZ7DeIdIqjoL+WLoMRnh5HG5TwIHOPF\n6q+YtRFkvaFS3qZriBMrwznyrxiRKntRbXgPejHnRk3o3fAUBS78jedrZwrh\nZH/SmB3JjdqczOnIVL6KEC489H4hkkkATj+d7Pja5HRYykAmkYyUCRcDa3QC\nKpVPMoUcxZBOr6yl8CAT5CqdSc18iuoBnSksz+KARoFGQpmx0hDYvj1tT72X\nqI+L8DTboWaNmW+0i6Eb1pjuWyvfkhHz554+zsp2zWIwuFvQIWuGOp9EKxCB\nHk3uj9HK98S3budykp5V30dGwLwJZYEKydUVWanoJMMm1valCQOz/6Xybzeh\nDeN+6rNlzrEff8Yv1wnPmnG9FGHQxHhLWDBMrNGdR/Q0sNkblvZZJuOiR8Fu\nUqORiTBktpsteaEWk+ZEYqWFPKpWZfOW+bIKDQ6MziuMjG+9P+NvN+buzWcE\nSyGUHj9foNF/CfcVI+DlfHz9trQ0yOCl8PXc8WI0ayO5rzTl8DmEqaEMMVVx\nVJDo\r\n=t8cc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEfPrr5vf/KEkvrF30sLaNyO99nz2dqXV0UvHSlT7wMLAiA7EWw+xkNT/v6Zwi98jfuVoTJ1q5cZ7VuZLnyQwteX1A=="}]},"maintainers":[{"email":"sonynakata@gmail.com","name":"lchimaru"},{"email":"sirmims@gmail.com","name":"lsentkiewicz"}],"_npmUser":{"name":"lchimaru","email":"sonynakata@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-mongoose_0.0.20-beta.2_1570741123350_0.10650172562753135"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.20-beta.3":{"name":"ts-mongoose","version":"0.0.20-beta.3","description":"Automatically infer TypeScript interfaces from mongoose schemas.","main":"index.js","module":"es/index.js","jsnext:main":"es/index.js","types":"index.d.ts","scripts":{"jest":"jest","tsc":"tsc","test":"yarn run tsc --noEmit && yarn run jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/BetterCallSky/ts-mongoose.git"},"author":{"name":"Łukasz Sentkiewicz"},"contributors":[{"name":"Łukasz Gosławski"}],"license":"MIT","bugs":{"url":"https://github.com/BetterCallSky/ts-mongoose/issues"},"homepage":"https://github.com/BetterCallSky/ts-mongoose#readme","devDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14","@types/jest":"^23.3.9","jest":"^23.6.0","prettier":"^1.14.3","ts-jest":"^23.10.4","typescript":"^3.6.3"},"dependencies":{},"peerDependencies":{"@types/mongoose":"^5.3.2","mongoose":"^5.3.14"},"readme":"# ts-mongoose\n\nAutomatically infer TypeScript interfaces from mongoose schemas.\n\n[![Build Status](https://travis-ci.org/BetterCallSky/ts-mongoose.svg?branch=master)](https://travis-ci.org/BetterCallSky/ts-mongoose) [![npm module](https://badge.fury.io/js/ts-mongoose.svg)](https://www.npmjs.org/package/ts-mongoose)\n\n## Installation\n\n```bash\nnpm i ts-mongoose mongoose @types/mongoose\nyarn add ts-mongoose mongoose @types/mongoose\n```\n\n## The Problem\n\nWhen using mongoose and Typescript, you must define schemas and interfaces. Both definitions must be maintained separately and must match each other. It can be error-prone during development and cause overhead.\n\n`ts-mongoose` is a very lightweight library that allows you to create a mongoose schema and a typescript type from a common definition.  \nAll types as created from 1-liner functions and does not depend on decorators❗️.\n\nFor example:  \n`Type.string({ required: true })` returns `{type: String, required: true}`, which is the same definition required in the original mongoose library.\n\n## Example\n\nBefore:\n\n```ts\nimport { Schema, model, Model, Document } from 'mongoose';\n\nconst AddressSchema = new Schema(\n  {\n    city: { type: String, required: true },\n    country: String,\n    zip: String,\n  },\n  { _id: false, timestamps: true }\n);\n\nconst PhoneSchema = new Schema({\n  phoneNumber: { type: Schema.Types.Number, required: true },\n  name: String,\n});\n\nconst UserSchema = new Schema(\n  {\n    title: { type: String, required: true },\n    author: { type: String, required: true },\n    body: { type: String, required: true },\n    comments: [\n      {\n        body: { type: String, required: true },\n        date: { type: Date, required: true },\n      },\n    ],\n    date: { type: Date, default: Date.now, required: true },\n    hidden: { type: Boolean, required: true },\n    meta: {\n      votes: { type: Schema.Types.Number },\n      favs: { type: Schema.Types.Number },\n    },\n    m: {\n      type: Schema.Types.Mixed,\n      required: true,\n    },\n    gender: {\n      type: Schema.Types.String,\n      required: true,\n      enum: ['male', 'female'],\n    },\n    otherId: {\n      type: Schema.Types.ObjectId,\n      required: true,\n    },\n    address: {\n      type: AddressSchema,\n      required: true,\n    },\n    phones: {\n      type: [PhoneSchema],\n      required: true,\n    },\n  },\n  { timestamps: { createdAt: true } }\n);\n\ninterface UserProps extends Document {\n  title: string;\n  author: string;\n  body: string;\n  // Duplicate all props from the above schema :(\n}\n\nconst User: Model<UserProps> = model('User', UserSchema);\n```\n\n🎉🎉🎉 After:\n\n```ts\nimport { createSchema, Type, typedModel } from 'ts-mongoose';\n\nconst genders = ['male', 'female'] as const;\n\nconst AddressSchema = createSchema(\n  {\n    city: Type.string({ required: true }),\n    country: Type.string(),\n    zip: Type.string(),\n  },\n  { _id: false, timestamps: true }\n);\n\nconst PhoneSchema = createSchema({\n  phoneNumber: Type.number({ required: true }),\n  name: Type.string(),\n});\n\nconst UserSchema = createSchema(\n  {\n    title: Type.string({ required: true }),\n    author: Type.string({ required: true }),\n    body: Type.string({ required: true }),\n    comments: Type.array().of({\n      body: Type.string({ required: true }),\n      date: Type.date({ required: true }),\n    }),\n    date: Type.date({ default: Date.now as any }),\n    hidden: Type.boolean({ required: true }),\n    meta: Type.object().of({\n      votes: Type.number({ required: true }),\n      favs: Type.number({ required: true }),\n    }),\n    m: Type.mixed({ required: true }),\n    gender: Type.string({ required: true, enum: genders }),\n    otherId: Type.objectId({ required: true }),\n    address: Type.schema({ required: true }).of(AddressSchema),\n    phones: Type.array({ required: true }).of(PhoneSchema),\n  },\n  { timestamps: { createdAt: true } }\n);\n\nconst User = typedModel('User', UserSchema);\nUser.findById('123').then(user => {\n  if (user) {\n    user. // autocomplete here\n  }\n});\n```\n\n### API\n\n- Each type has two forms: required and optional\n\n```ts\n{\n  // same as {type: String}\n  firstName: Type.string(),\n  // same as {type: String, required: true}\n  email: Type.string({ required: true }),\n}\n```\n\n- Each type accepts the same options from mongoose\n\n```ts\n{\n  // same as {type: String, required: true, unique: true, index: true}\n  email: Type.string({ required: true, unique: true, index: true });\n}\n```\n\n- Note that enum values need to be readonly array to be treated as literals by typescript\n\n```ts\nconst genders = ['male', 'female'] as const;\n{\n  // same as {type: String, enum: ['male', 'female']}\n  gender: Type.string({ enum: genders });\n}\n```\n\n- `schema`, `object`, `array` types have a method `of` where you must provide a child type\n\n```ts\n{\n  // same as {type: [String], required: true}\n  tags: Type.array({ required: true }).of(Type.string({ required: true }));\n}\n```\n\n- `schema.of(ExampleSchema)` has typical for Subdocument additional fields and methods. Setting `{ _id: false }` in SchemaOptions won't attach `_id` property in Subdocument\n\n```ts\nconst AddressSchema = createSchema(\n  { city: Type.string({ required: true }) },\n  { _id: false, timestamps: true }\n);\n{\n  // same as {type: AddressSchema}\n  address: Type.schema().of(AddressSchema);\n}\n// address property has city property, other Subdocument methods and properties except '_id'\n```\n\n- `array.of(ExampleSchema)` will return DocumentArray instead of standard array\n\n```ts\nconst PhoneSchema = createSchema(\n  { phoneNumber: Type.number({ required: true }) },\n  { _id: false }\n);\n{\n  // same as {type: [PhoneSchema]}\n  phones: Type.array().of(PhoneSchema);\n}\n// phones property has such methods as create(), id(), but also those typical for arrays like map(), filter() etc\n```\n\n- `ref` is a special type for creating references\n\n```ts\n{\n  // same as [{type: Schema.Types.ObjectId, ref: 'Comment'}]\n  comments: Type.array().of(\n    Type.ref(Type.objectId()).to('Comment', CommentSchema)\n  ),\n}\n```\n\n- `populateTs(property: string)` use this function to populate a property and adjust the returned type automatically. Under the hood it calls only the native `populate` method.  \n  Method will be available if you import a special plugin.\n\n```ts\n// models.ts\n\nimport 'ts-mongoose/plugin';\n\nUser.find().populateTs('comments');\n```\n\n## Extracting Document type\n\nUse `ExtractDoc` to extract generated document type.  \nUse `ExtractProps` to extract generated base model properties.  \nExample:\n\n```ts\nimport {\n  createSchema,\n  Type,\n  typedModel,\n  ExtractDoc,\n  ExtractProps,\n} from 'ts-mongoose';\n\nexport const UserSchema = createSchema({\n  email: Type.string({ required: true }),\n  username: Type.string({ required: true }),\n  isBlocked: Type.boolean(),\n});\n\nexport const User = typedModel('User', UserSchema);\nexport type UserDoc = ExtractDoc<typeof UserSchema>;\nexport type UserProps = ExtractProps<typeof UserSchema>;\n\n// example function\n\nasync function blockUser(user: UserDoc) {\n  user.isBlocked = true;\n  // access all properties + Document methods and properties\n  await user.save();\n}\n\nfunction randomUser(): UserProps {\n  // must return `email`, `username`\n  // `isBlocked` is optional\n  return {\n    email: 'user1@example.com',\n    username: 'user1',\n  };\n}\n```\n\n## Refs\n\nRefs and populations are supported.  \nCheck code under `example/example4.ts`.\n\n![alt autocomplete](.github/refs.gif)\n\n### Custom Field\n\nIf you need to specify custom fields in the model, you can add a fake annotation.  \nIt's only required if you add virtual fields or custom methods to the model.\n\n```ts\nconst UserSchema = createSchema({\n  title: Type.string({ required: true }),\n  author: Type.string({ required: true }),\n  ...({} as {\n    generatedField: string;\n    customFunction: () => number;\n  }),\n});\nconst User = typedModel('User', UserSchema);\n```\n\nAutocomplete popup:  \n![alt autocomplete](.github/custom.png)\n\n### Static methods\n\nIf you need to have static custom methods on Model you can pass them as 5th parameter of `typedModel` function. It should automatically figured out returning value, but you can declare it too.\n\n```ts\nconst UserSchema = createSchema({\n  name: Type.string({ required: true }),\n  age: Type.number({ required: true }),\n});\n\nconst User = typedModel('User', UserSchema, undefined, undefined, {\n  findByName: function(name: string) {\n    return this.find({ name });\n  },\n  findOneByName: function(name: string) {\n    return this.findOne({ name });\n  },\n  countLetters: function(name: string, bonus?: number) {\n    return name.length + (bonus ? bonus : 0);\n  },\n});\nconst u = await User.findOne({});\nif (u) u.name;\n```\n\n### TODO\n\n- support types: Map\n\nMIT\n","readmeFilename":"README.md","_id":"ts-mongoose@0.0.20-beta.3","_nodeVersion":"9.9.0","_npmVersion":"6.8.0","dist":{"integrity":"sha512-/pKsBA8Qpb5sBAheT0fJrXm/LONpkCse34UWS/UrzW6oXBSh5FUWbPyjhETQkRDdS1bKwf2ciVURZ9ii0XrAyQ==","shasum":"953f9a106c3210114319cd21e7b94cac7a6ffc87","tarball":"https://registry.npmjs.org/ts-mongoose/-/ts-mongoose-0.0.20-beta.3.tgz","fileCount":46,"unpackedSize":37688,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpCI2CRA9TVsSAnZWagAAAUkQAJp3AC6DFf92pOhJ+WCw\nttdOG+IMPvy65liKRQFMlOjJfBD66YsUUiFj4d8/84hiZObdBIT11jGZQUew\nbcMe0wqyQdO0gMkomf/CHxyoY3DpduPmD3zBp4zqm3uXwcenUre4IUX9LRQ3\nr6p/WgCdeYBzXN5m3Urj6V9xm97WGJoz4caI/bZ8LxqMDRnAgKT/Kz+SQCKX\n6CRWmKCbzfhUqr5X41LqwxoxwSfs7n8aRubjn8+HQAPyf0eS7X+FhLQ6b9tx\nSb38t8v0iWzqRWXUyV8wPPODZzO1eM1FyFRm3G4bdR0QBcH50Dk82WOJDNg9\nZdadW0UFdyTpdovrEFe30nCvIz63r6k9ZB3L9nbhSVjTMrAV3ZIJ4jdmKl8R\nNTbAuHemJXe0gpU6iDon3r822NfMg2GLYMBVNJjyI1ceX4HW0cki4e+1SSAU\n10KQrhR8tCtUtMZZHkZAyim1eRVit6so/+lnH499FDjSUhaSQJYYNCni+1VY\nCxvE9X2FWsTX7A+imvv16CMQW/F8B/fnowaKHOSsgYXJM4UB/D6CE/Xmavc0\n4qH+ANOwI4orlg428uyeQ12kP9k/7lD+ImuuGNMIeI7+K/8zvc+DdnlVna/2\nf1Mgi+9Ut3zGt80Fqg77vnp6+ajln2e3/LtG1vY6KQcvo+wSbRBdoy5k34Ri\nAPoJ\r\n=isSJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA4m0UfVOixykBPqXEMdQNHNElqOKa645+EiAdi5z2moAiEAwjLwq2oHXx64rCvQN32gxPdjbEo4ncnfmNdbqlDKlKM="}]},"maintainers":[{"email":"sonynakata@gmail.com","name":"lchimaru"},{"email":"sirmims@gmail.com","name":"lsentkiewicz"}],"_npmUser":{"name":"lchimaru","email":"sonynakata@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-mongoose_0.0.20-beta.3_1571037749722_0.12019771854983197"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.21":{"name":"ts-mongoose","version":"0.0.21","description":"Automatically infer TypeScript interfaces from mongoose schemas.","main":"index.js","module":"es/index.js","jsnext:main":"es/index.js","types":"index.d.ts","scripts":{"jest":"jest","tsc":"tsc","test":"yarn run tsc --noEmit && yarn run jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/BetterCallSky/ts-mongoose.git"},"author":{"name":"Łukasz Sentkiewicz"},"contributors":[{"name":"Łukasz Gosławski"}],"license":"MIT","bugs":{"url":"https://github.com/BetterCallSky/ts-mongoose/issues"},"homepage":"https://github.com/BetterCallSky/ts-mongoose#readme","devDependencies":{"@types/mongoose":"^5.5.21","@types/node":"^12.7.12","mongoose":"^5.7.5","@types/jest":"^24.0.19","jest":"^24.9.0","prettier":"^1.18.2","ts-jest":"^24.1.0","typescript":"^3.6.3"},"dependencies":{},"peerDependencies":{"@types/mongoose":"^5.5.21","mongoose":"^5.7.5"},"_id":"ts-mongoose@0.0.21","_nodeVersion":"9.9.0","_npmVersion":"6.8.0","dist":{"integrity":"sha512-pbRN2JJY9N7Z5ehyMo6PJ7hlftRdELzO5nh/XvS1y31TDbeefc/GjM7C7jWb6ESZz+KlOmYDUpAT/L8i4wFbmQ==","shasum":"8be3769863e89919da8020351855726d09f7126a","tarball":"https://registry.npmjs.org/ts-mongoose/-/ts-mongoose-0.0.21.tgz","fileCount":46,"unpackedSize":37712,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdphq9CRA9TVsSAnZWagAAL4QP/1gLlJriX77aI0nHt/LR\n6jNUFlToXstGRY3E/l7VP8EsLrO3JDUmeR0W6EhxzCPQqCfzZ9uj4NBEtP+T\nwsdft117ClemvQoyd6LwqhlC1Vo1jDBnjYP98ANVz62UVaBLPR6fYH/7Iqp9\nVyhYeJpQz4gHfgCxbLLEvfeI2FiPERU3f1gGhaDR8TLue4wtT4QQI9Tl3rEh\nXxMlS1NJ0nvpUM+SZi+t0xpOAy55ZZD9mRnVi3vfOJAiyqeKZD2GvkhWk1Aw\n65dPoniSjgIfFIOBULnm+1ldznXTX29JfLADZaSgEd0s5HxjZ1xtT6ifioHq\nlVjiM1nwpAGKhitRGz0aOI9Vn2s2Sv1r+AMm/S1OEBaqZhSI6+949rCi06cw\nh7Vn7I8OwCMzcNjtOufBnSfy7pXQKtRy2i+mM8jgLqjIcj8Ftme78CWFoXhm\nJIQuu/ykwvoOhqGsNP9CxA+pnP9kJS/PhPYsqjLI9a5wmP/arArlxdK1yE7F\nth1W/fZaARd2lkr2Kvjvtbq8qZOIHVAf5fjZaDCb7pl12MrEVG1xVEAWMZWw\nxVnx+mp5Sf4VI7LQuP2wM3NqWa5bwXFQAC4DxN9MTPUltNzGC+vxh6Fsn7dB\n2t5ESnAgEw4j6rb/+CZ+Fel71SGdxIHKXRZRsd+RHkCaM89AMLTmj48aCbRk\niBkL\r\n=DF2v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD3VnemC0GVG7spYgme+E2v+qVw5adCFiVQqywfgd4X6QIhAImP80mo6xS6lFbwB+jb0+bmSYtKnT5GqKGDgc3vohPt"}]},"maintainers":[{"email":"sonynakata@gmail.com","name":"lchimaru"},{"email":"sirmims@gmail.com","name":"lsentkiewicz"}],"_npmUser":{"name":"lchimaru","email":"sonynakata@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-mongoose_0.0.21_1571166909359_0.18560942859498586"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.23":{"name":"ts-mongoose","version":"0.0.23","description":"Automatically infer TypeScript interfaces from mongoose schemas.","main":"index.js","module":"es/index.js","jsnext:main":"es/index.js","types":"index.d.ts","scripts":{"jest":"jest","tsc":"tsc","test":"yarn run tsc --noEmit && yarn run jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/BetterCallSky/ts-mongoose.git"},"author":{"name":"Łukasz Sentkiewicz"},"contributors":[{"name":"Łukasz Gosławski"}],"license":"MIT","bugs":{"url":"https://github.com/BetterCallSky/ts-mongoose/issues"},"homepage":"https://github.com/BetterCallSky/ts-mongoose#readme","devDependencies":{"@types/jest":"^24.0.19","@types/mongoose":"^5.10.1","@types/node":"^12.7.12","jest":"^24.9.0","mongoose":"^5.7.5","prettier":"^1.18.2","ts-jest":"^24.1.0","typescript":"^3.6.3"},"dependencies":{},"peerDependencies":{"@types/mongoose":"^5.10.1","mongoose":"^5.10.1"},"gitHead":"68be417c4902dbc229117d10f225bb04e45fbd32","_id":"ts-mongoose@0.0.23","_nodeVersion":"12.18.2","_npmVersion":"6.14.7","dist":{"integrity":"sha512-L/VRrwiUwprnEY9s5vCYQ0xP8QFecrToGRPLgH0lCCUJmIJe1gEkVIhDsuW9/4B+uPZfpC9rbvI4hKjk/gtkKQ==","shasum":"8132d08094ceb0bfbd398d3fc5fd4427158c5e4f","tarball":"https://registry.npmjs.org/ts-mongoose/-/ts-mongoose-0.0.23.tgz","fileCount":83,"unpackedSize":4187644,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfwBO9CRA9TVsSAnZWagAAWWoP/0tGoTMpCOePNMCENesh\n4+wpaPlzbGZSeU5FEbv+lOZEwPIPYPrr1QuG+6Ec6fM+/fBP9O3Na1ytmiwN\nkCP31390eCky5Tg/0/CglyX6mnXNp7ghxmQq1NkC8H2vYiNkqriELRp5O6yt\nuOc8jLexfyhtiau2rliEydfgQkCrLovyRsG002Arpgz2ipu1ysSwLAQ3aczL\n7wrIUingAjHGfYvWmAeDN/cSH1TIh+kQrzLs6eVNgbDBGE7qAAQaGduQ9tev\nzhbLpkeuw5WxpMVq5mPWamHRkX5AwVsz6h8E4lYTw+0QgUt+RslfcVLFy+mX\nrnHgS/LQoOZpL7dI8Dr9gXU94Qa+DfC2z0kF1JKHxtjie19iyP6ZMA5C7qqP\n3jK+VqpSOt5jgIkinzjLobC8nixLnriF0Hwq7I6AePLMrcacEUHyX5tAn/X8\nBSulz4OwArqb9av/Fuzx5OgIECcgsMTldM37slWYOkO5BP+XL6ri+fls3Rsp\n6akPrA9WE6CPk5jP9tVaAjWThow7zy5N4VJkPc8OSPr4B6Tm7YrHz81vFyNU\n4qvC7Zy0tpPyeSCrtn2HnC385eyuT/RWbBhhLTvbLiRZMyH3Oj8ig+92/ej6\n9I+Bgd37si0+iPKTJahbNP1OEvSI38Bxe8aXx/vGI0jwaFtu+pOmYjA/tq6J\n+eRx\r\n=7Tj4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0lXz3pa7X1XGCoaQpqs4DIIIOLr6gSLcu7sKlpSkpWgIhAMd70ybx6AA13R80cXqqtycHjn9nGhJZSUJ+VzfhlFoJ"}]},"_npmUser":{"name":"lchimaru","email":"sonynakata@gmail.com"},"directories":{},"maintainers":[{"name":"lsentkiewicz","email":"sirmims@gmail.com"},{"name":"lchimaru","email":"sonynakata@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-mongoose_0.0.23_1606423485194_0.5003008968477587"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.24":{"name":"ts-mongoose","version":"0.0.24","description":"Automatically infer TypeScript interfaces from mongoose schemas.","main":"index.js","module":"es/index.js","jsnext:main":"es/index.js","types":"index.d.ts","scripts":{"jest":"jest","tsc":"tsc","test":"yarn run tsc --noEmit && yarn run jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/BetterCallSky/ts-mongoose.git"},"author":{"name":"Łukasz Sentkiewicz"},"contributors":[{"name":"Łukasz Gosławski"}],"license":"MIT","bugs":{"url":"https://github.com/BetterCallSky/ts-mongoose/issues"},"homepage":"https://github.com/BetterCallSky/ts-mongoose#readme","devDependencies":{"@types/jest":"^24.0.19","@types/mongoose":"^5.10.1","@types/node":"^12.7.12","jest":"^24.9.0","mongoose":"^5.7.5","prettier":"^1.18.2","ts-jest":"^24.1.0","typescript":"^3.6.3"},"dependencies":{},"peerDependencies":{"@types/mongoose":"^5.10.1","mongoose":"^5.10.1"},"_id":"ts-mongoose@0.0.24","_nodeVersion":"12.18.2","_npmVersion":"6.14.7","dist":{"integrity":"sha512-BaiyNFqieRqEBnvj2pgWB6/eQJRm7U18kAzDJ92/sfcFx1aQBZeZztzutxr49VVlUvPHxukleIoU/t3VMCBsSA==","shasum":"d6d1d4c5c62669560a3f3e26c0dd8a7365d1aee4","tarball":"https://registry.npmjs.org/ts-mongoose/-/ts-mongoose-0.0.24.tgz","fileCount":46,"unpackedSize":39188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfwBSHCRA9TVsSAnZWagAAOQsQAKDPhIZwgPbc2Mc1HlPy\nfhn7/ep215be/Naf282Osru4nMmcpKWVdOW7eSMubmCOXwhQDYNuH1g5wy/I\nDm8JWWGq/I6qZQ3gnoEKiFdN2JMeF+/M6qekXCmKPewcRnNFRdbbsDxDitZW\neeaKXiQeEEIiLedF9foDbf1NZ6X/Ww6bZYGt7BSQMvAjDQmwelsn4K4JsGCZ\nu6Rchb7d0/hg7h+onmes4JxhRheeO4tRWCNl4AW5lBWYwycsI1nUuXZPzq6y\nNOIZr2JHvDm3TyM/niPsn5IehM7pnDphXLl60VMByJ7hl5BqCqQVqAx6JyBq\nwa1C7+hlaruWmRA9U8TnhG4rHFx1K/WH3WFOErSsfVGoszPBcGiPFuyn6aSG\nnlxwlJxwFgViAiOfh1MhfYZJoidAamicnz6HnVs72+sx7OHrMgCxjz/q6/Ux\nh06ccY0G8OUz32oKGkz4Vqlsw1ygMUO2Db74+q8TUZ7EzKqG8UdFsRstn/WN\nBqZh8dRf7vUK+YAx6v4lLPPZrvo2VHsF8I8SkfVPNi6aiaPb3z7QseuTIyz9\ncYBy1M+Yk3S1k7YnCfqNP1PUOL6EBJIgDjMUuo/CBmkm8YTLW0IsHgI3bO3M\nUeu+Vb7SzaUU8/5CIcF3uKqVF06CbtLzYXhhbUTgZ02E5QCch9hGdpJirhy7\nNxmp\r\n=s7KJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHeP5fwow1pL3kSzuOHvSbnWKkIUezMld1als3xhXNCSAiEA22zZ5moz356FzsTf80/8lmo7AqXcVgRf851I+XLyDzM="}]},"_npmUser":{"name":"lchimaru","email":"sonynakata@gmail.com"},"directories":{},"maintainers":[{"name":"lsentkiewicz","email":"sirmims@gmail.com"},{"name":"lchimaru","email":"sonynakata@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-mongoose_0.0.24_1606423686791_0.3119852210030367"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2018-03-02T17:23:56.695Z","0.0.1":"2018-03-02T17:23:56.791Z","modified":"2023-10-25T09:34:51.376Z","0.0.2":"2018-12-03T19:08:38.052Z","0.0.3":"2018-12-03T19:13:35.808Z","0.0.4":"2018-12-04T17:39:50.911Z","0.0.5":"2018-12-04T17:42:12.904Z","0.0.6":"2018-12-05T13:33:09.590Z","0.0.7":"2018-12-08T11:34:46.293Z","0.0.8":"2018-12-11T11:57:23.709Z","0.0.9":"2018-12-11T12:06:10.449Z","0.0.10":"2018-12-11T12:25:55.604Z","0.0.11":"2019-01-15T10:33:42.173Z","0.0.12":"2019-04-11T09:17:35.619Z","0.0.13":"2019-04-12T08:03:46.214Z","0.0.14":"2019-04-12T08:52:43.901Z","0.0.15":"2019-05-21T06:31:21.705Z","0.0.16":"2019-06-19T14:10:42.301Z","0.0.17":"2019-06-25T20:14:17.968Z","0.0.18":"2019-06-26T13:22:59.629Z","0.0.19-beta.0":"2019-07-04T17:37:29.150Z","0.0.19":"2019-07-04T19:53:12.962Z","0.0.20-beta.0":"2019-07-16T11:23:09.072Z","0.0.20-beta.1":"2019-10-10T20:37:12.968Z","0.0.20-beta.2":"2019-10-10T20:58:43.458Z","0.0.20-beta.3":"2019-10-14T07:22:29.863Z","0.0.20":"2019-10-15T18:27:36.737Z","0.0.21":"2019-10-15T19:15:09.473Z","0.0.23":"2020-11-26T20:44:45.536Z","0.0.24":"2020-11-26T20:48:06.960Z"},"maintainers":[{"name":"lchimaru","email":"sonynakata@gmail.com"},{"name":"lsentkiewicz","email":"sirmims@gmail.com"}],"license":"MIT","readme":"# ts-mongoose\n\nAutomatically infer TypeScript interfaces from mongoose schemas.\n\n[![Build Status](https://travis-ci.org/BetterCallSky/ts-mongoose.svg?branch=master)](https://travis-ci.org/BetterCallSky/ts-mongoose) [![npm module](https://badge.fury.io/js/ts-mongoose.svg)](https://www.npmjs.org/package/ts-mongoose)\n\n## Installation\n\n```bash\nnpm i ts-mongoose mongoose @types/mongoose\nyarn add ts-mongoose mongoose @types/mongoose\n```\n\n## The Problem\n\nWhen using mongoose and Typescript, you must define schemas and interfaces. Both definitions must be maintained separately and must match each other. It can be error-prone during development and cause overhead.\n\n`ts-mongoose` is a very lightweight library that allows you to create a mongoose schema and a typescript type from a common definition.  \nAll types as created from 1-liner functions and does not depend on decorators❗️.\n\nFor example:  \n`Type.string({ required: true })` returns `{type: String, required: true}`, which is the same definition required in the original mongoose library.\n\n## Example\n\nBefore:\n\n```ts\nimport { Schema, model, Model, Document } from 'mongoose';\n\nconst AddressSchema = new Schema(\n  {\n    city: { type: String, required: true },\n    country: String,\n    zip: String,\n  },\n  { _id: false, timestamps: true }\n);\n\nconst PhoneSchema = new Schema({\n  phoneNumber: { type: Schema.Types.Number, required: true },\n  name: String,\n});\n\nconst UserSchema = new Schema(\n  {\n    title: { type: String, required: true },\n    author: { type: String, required: true },\n    body: { type: String, required: true },\n    comments: [\n      {\n        body: { type: String, required: true },\n        date: { type: Date, required: true },\n      },\n    ],\n    date: { type: Date, default: Date.now, required: true },\n    hidden: { type: Boolean, required: true },\n    meta: {\n      votes: { type: Schema.Types.Number },\n      favs: { type: Schema.Types.Number },\n    },\n    m: {\n      type: Schema.Types.Mixed,\n      required: true,\n    },\n    gender: {\n      type: Schema.Types.String,\n      required: true,\n      enum: ['male', 'female'],\n    },\n    otherId: {\n      type: Schema.Types.ObjectId,\n      required: true,\n    },\n    address: {\n      type: AddressSchema,\n      required: true,\n    },\n    phones: {\n      type: [PhoneSchema],\n      required: true,\n    },\n  },\n  { timestamps: { createdAt: true } }\n);\n\ninterface UserProps extends Document {\n  title: string;\n  author: string;\n  body: string;\n  // Duplicate all props from the above schema :(\n}\n\nconst User: Model<UserProps> = model('User', UserSchema);\n```\n\n🎉🎉🎉 After:\n\n```ts\nimport { createSchema, Type, typedModel } from 'ts-mongoose';\n\nconst genders = ['male', 'female'] as const;\n\nconst AddressSchema = createSchema(\n  {\n    city: Type.string({ required: true }),\n    country: Type.string(),\n    zip: Type.string(),\n  },\n  { _id: false, timestamps: true }\n);\n\nconst PhoneSchema = createSchema({\n  phoneNumber: Type.number({ required: true }),\n  name: Type.string(),\n});\n\nconst UserSchema = createSchema(\n  {\n    title: Type.string({ required: true }),\n    author: Type.string({ required: true }),\n    body: Type.string({ required: true }),\n    comments: Type.array().of({\n      body: Type.string({ required: true }),\n      date: Type.date({ required: true }),\n    }),\n    date: Type.date({ default: Date.now as any }),\n    hidden: Type.boolean({ required: true }),\n    meta: Type.object().of({\n      votes: Type.number({ required: true }),\n      favs: Type.number({ required: true }),\n    }),\n    m: Type.mixed({ required: true }),\n    gender: Type.string({ required: true, enum: genders }),\n    otherId: Type.objectId({ required: true }),\n    address: Type.schema({ required: true }).of(AddressSchema),\n    phones: Type.array({ required: true }).of(PhoneSchema),\n  },\n  { timestamps: { createdAt: true } }\n);\n\nconst User = typedModel('User', UserSchema);\nUser.findById('123').then(user => {\n  if (user) {\n    user. // autocomplete here\n  }\n});\n```\n\n### API\n\n- Each type has two forms: required and optional\n\n```ts\n{\n  // same as {type: String}\n  firstName: Type.string(),\n  // same as {type: String, required: true}\n  email: Type.string({ required: true }),\n}\n```\n\n- Each type accepts the same options from mongoose\n\n```ts\n{\n  // same as {type: String, required: true, unique: true, index: true}\n  email: Type.string({ required: true, unique: true, index: true });\n}\n```\n\n- Note that enum values need to be readonly array to be treated as literals by typescript\n\n```ts\nconst genders = ['male', 'female'] as const;\n{\n  // same as {type: String, enum: ['male', 'female']}\n  gender: Type.string({ enum: genders });\n}\n```\n\n- `schema`, `object`, `array` types have a method `of` where you must provide a child type\n\n```ts\n{\n  // same as {type: [String], required: true}\n  tags: Type.array({ required: true }).of(Type.string({ required: true }));\n}\n```\n\n- `schema.of(ExampleSchema)` has typical for Subdocument additional fields and methods. Setting `{ _id: false }` in SchemaOptions won't attach `_id` property in Subdocument\n\n```ts\nconst AddressSchema = createSchema(\n  { city: Type.string({ required: true }) },\n  { _id: false, timestamps: true }\n);\n{\n  // same as {type: AddressSchema}\n  address: Type.schema().of(AddressSchema);\n}\n// address property has city property, other Subdocument methods and properties except '_id'\n```\n\n- `array.of(ExampleSchema)` will return DocumentArray instead of standard array\n\n```ts\nconst PhoneSchema = createSchema(\n  { phoneNumber: Type.number({ required: true }) },\n  { _id: false }\n);\n{\n  // same as {type: [PhoneSchema]}\n  phones: Type.array().of(PhoneSchema);\n}\n// phones property has such methods as create(), id(), but also those typical for arrays like map(), filter() etc\n```\n\n- `ref` is a special type for creating references\n\n```ts\n{\n  // same as [{type: Schema.Types.ObjectId, ref: 'Comment'}]\n  comments: Type.array().of(\n    Type.ref(Type.objectId()).to('Comment', CommentSchema)\n  ),\n}\n```\n\n- `populateTs(property: string)` use this function to populate a property and adjust the returned type automatically. Under the hood it calls only the native `populate` method.  \n  Method will be available if you import a special plugin.\n\n```ts\n// models.ts\n\nimport 'ts-mongoose/plugin';\n\nUser.find().populateTs('comments');\n```\n\n## Extracting Document type\n\nUse `ExtractDoc` to extract generated document type.  \nUse `ExtractProps` to extract generated base model properties.  \nExample:\n\n```ts\nimport {\n  createSchema,\n  Type,\n  typedModel,\n  ExtractDoc,\n  ExtractProps,\n} from 'ts-mongoose';\n\nexport const UserSchema = createSchema({\n  email: Type.string({ required: true }),\n  username: Type.string({ required: true }),\n  isBlocked: Type.boolean(),\n});\n\nexport const User = typedModel('User', UserSchema);\nexport type UserDoc = ExtractDoc<typeof UserSchema>;\nexport type UserProps = ExtractProps<typeof UserSchema>;\n\n// example function\n\nasync function blockUser(user: UserDoc) {\n  user.isBlocked = true;\n  // access all properties + Document methods and properties\n  await user.save();\n}\n\nfunction randomUser(): UserProps {\n  // must return `email`, `username`\n  // `isBlocked` is optional\n  return {\n    email: 'user1@example.com',\n    username: 'user1',\n  };\n}\n```\n\n## Refs\n\nRefs and populations are supported.  \nCheck code under `example/example4.ts`.\n\n![alt autocomplete](.github/refs.gif)\n\n### Custom Field\n\nIf you need to specify custom fields in the model, you can add a fake annotation.  \nIt's only required if you add virtual fields or custom methods to the model.\n\n```ts\nconst UserSchema = createSchema({\n  title: Type.string({ required: true }),\n  author: Type.string({ required: true }),\n  ...({} as {\n    generatedField: string;\n    customFunction: () => number;\n  }),\n});\nconst User = typedModel('User', UserSchema);\n```\n\nAutocomplete popup:  \n![alt autocomplete](.github/custom.png)\n\n### Static methods\n\nIf you need to have static custom methods on Model you can pass them as 5th parameter of `typedModel` function. It should automatically figured out returning value, but you can declare it too.\n\n```ts\nconst UserSchema = createSchema({\n  name: Type.string({ required: true }),\n  age: Type.number({ required: true }),\n});\n\nconst User = typedModel('User', UserSchema, undefined, undefined, {\n  findByName: function(name: string) {\n    return this.find({ name });\n  },\n  findOneByName: function(name: string) {\n    return this.findOne({ name });\n  },\n  countLetters: function(name: string, bonus?: number) {\n    return name.length + (bonus ? bonus : 0);\n  },\n});\nconst u = await User.findOne({});\nif (u) u.name;\n```\n\n### Connection model\n\nIf you are using `mongoose.createConnection(...)`, you can pass a `<mongoose.Connection>` as the 6th parameter of `typedModel`. Then the module will be added to that connection instead.  \n(**Note:** If using the `connection` parameter, the `skipInit` parameter will not be used)\n\n```ts\nimport mongoose from 'mongoose'\nimport { typedModel } from 'ts-mongoose'\n\nconst UserSchema = createSchema({\n  name: Type.string({ required: true }),\n  age: Type.number({ required: true }),\n});\n\nconst connection = mongoose.createConnection(`mongodb://localhost:27017/test`, {...})\n\nconst User = typedModel('User', UserSchema, undefined, undefined, undefined, connection);\n\n\nconsole.log(connection.modelNames()) // Prints: [ 'User' ]\n\n// Now you can use the model directly\nUser.find({ name: 'Peter' })\n// Or through the connection\nconnection.model('User').find({ name: 'Peter' })\n\n```\n\n### TODO\n\n- support types: Map\n\nMIT\n","readmeFilename":"README.md","homepage":"https://github.com/BetterCallSky/ts-mongoose#readme","repository":{"type":"git","url":"git+https://github.com/BetterCallSky/ts-mongoose.git"},"author":{"name":"Łukasz Sentkiewicz"},"bugs":{"url":"https://github.com/BetterCallSky/ts-mongoose/issues"},"description":"Automatically infer TypeScript interfaces from mongoose schemas.","contributors":[{"name":"Łukasz Gosławski"}]}