{"_id":"@ibaraki-douji/api","_rev":"47-7f69b7d83ec3aad511c99ddc719c0f74","name":"@ibaraki-douji/api","dist-tags":{"latest":"2.1.10"},"versions":{"1.0.0":{"devDependencies":{"@types/node":"^16.4.7","ts-node":"^10.1.0","typescript":"^4.3.5"},"name":"@ibaraki-douji/api","version":"1.0.0","description":"Easy make API with Endpoints Listeners","main":"./lib/API.js","types":"./lib/API.d.ts","directories":{"lib":"lib"},"scripts":{"start":"node ./lib/main.js"},"keywords":["api","rest","route","handler","endpoint","listener","http"],"author":{"name":"ibaraki-douji"},"license":"ISC","_id":"@ibaraki-douji/api@1.0.0","_nodeVersion":"15.10.0","_npmVersion":"7.19.0","dist":{"integrity":"sha512-uQEhCBOj09H/x/OTNFWVVlNNzxJWdZ8sucouJqg0POqeKoXZSusZ4aNiKZathC1YgPWxXWC9P4txqfo5sqQl+w==","shasum":"9b013a40beeb40984753ce5dc60c3947bd64a020","tarball":"https://registry.npmjs.org/@ibaraki-douji/api/-/api-1.0.0.tgz","fileCount":13,"unpackedSize":11167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhBG+3CRA9TVsSAnZWagAA1ZMP+QA3bC4EEvM8xAJJaZFH\n4OhZI15VBOPfIIAo7EIYeXh5Sgq68/q9EAWwT5fuMWSHfXFUQpUwMGgpVlyY\n158cvPEWh+1wljplQQvE9ZrYt88XnBAxHlcejDzbRqSrZYMJJJPqj0DLRMfk\nf2sHaoRRv7Z3tAQLPdAe0thzOQFK5sQ1bcM62gO0sRjs7tqq0UQniPhirKum\npjpXWTM+G1n7CxPO+SAps/Ibq2FkiDBHaNuI+xzQbFhSKX41/KB6FnSES9uj\nPgmJo/gHeqXVrPNpCW6puZ//07/8R5UjxZHImmnpsyXTGFb245xIpQngdZpc\noH62DUqhuRGu3MuAu7aAXH0SOQngY4rNpwaVwQ44QZE7Oqhm/0x8H8/ZxSRp\nbSnOvxglFPXYmwCED/UH+K1g6I65TQJWmHWum8YCOM3Ep7ojhf3XzyNMO2Ze\nEJr9IbNCqkVFPXjzrYjokYxTVTs+rROogx3udvYcYbMS0GM1QC87B/ZE6F52\nc1RrFsqPGsaMYlzPvxCx+2F8zbfFei75hgyiGbVFVCBrTk7GxLUbPRy6smYc\nVanWC4mHJK0Rvx2IOfvKU8vGQhk3O0JvUEzvDKiszsfyvzuNt7tZHcJR2grA\nyaRKFC8/JjRnX3v9fFWDYUT+mgQ3UZkWoch4uYxXAF1IXr/oX5Zj9gr4cnnV\naSz2\r\n=ClgR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIErOq/ISq6kQBpqh2XKFQ6jpX7jlFh/T5n0098YhVsz9AiBmFeX7ToB2JLkN+yvfDog5K2yeY2ad9ygbXo3tF6dCtw=="}]},"_npmUser":{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"},"maintainers":[{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api_1.0.0_1627680695011_0.5867900801523309"},"_hasShrinkwrap":false},"1.1.0":{"devDependencies":{"@types/node":"^16.4.7","ts-node":"^10.1.0","typescript":"^4.3.5"},"name":"@ibaraki-douji/api","version":"1.1.0","description":"Easy make API with Endpoints Listeners","main":"./lib/API.js","types":"./lib/API.d.ts","directories":{"lib":"lib"},"scripts":{"start":"node ./lib/main.js"},"keywords":["api","rest","route","handler","endpoint","listener","http","dynamic"],"author":{"name":"ibaraki-douji"},"license":"ISC","_id":"@ibaraki-douji/api@1.1.0","_nodeVersion":"15.10.0","_npmVersion":"7.19.0","dist":{"integrity":"sha512-O4ieprJDRVJ21eRy+aSoe9c/xyZ8qRagQhtPDz86MwKeRqNARA9bP2wk0hDZMmX0FlaclPAPvbHlJ6tUjohj7g==","shasum":"cc0d833268c00ee0cf0b00142b4dcd031d69f556","tarball":"https://registry.npmjs.org/@ibaraki-douji/api/-/api-1.1.0.tgz","fileCount":13,"unpackedSize":14410,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhBTtECRA9TVsSAnZWagAA6LIP/jwEI/vye4OsmfVlt3NH\n8k5m24OHdChT1KS+uNqdlhYGRGtOXUzaBl5mUxykNl9Uc15dirVbPdEziakI\n0SDap2IJbXDVD+REeDzwu7tKBNDiNg/6uWpluSEXm9iKxxdxd4jUobwYzarP\nC7szeshcYjvsaLOPZuE/Ic1BUJIJmx1btGyQhodpf52WhHdYMZ/brq/HCqQ/\n4mTo+sey9dIqoHbpZdKqEmqg9xq2Sz/inYUfeVcQcg1BmC2g9RH6/VbGLsBt\nnGLul+5j8svOe+WErR8PdFeN7dpB0UB4cochuZ60EgbZAM6KujJHLfz0Rb4B\nvijTErtLPbCQoWyz8UMox77idBZrrsxL3GrgyEdmpcAUb/BgUY9tWS9mXCZw\nUCNcYgkjEa/4Wa0vQelLcgnn6q1zCKj2YiOA52EbpFnAEI1X9+/exOMqHD7v\nXIGUir/zIuqxEjML3htL82W7weFu//lI3UE2vKhr2/e0VygrK/kjO4dwGC8d\nvJKmkja4+XmV8C3x2egbkhzS0/BRHJUXWEsoY5SnbVgEj5oFfSKbXNdOOaA8\n73aJGWiXbdICOd0/mmehFuQR6bq26Uh//NmbB5slGZxTt8ob8tfFNEt36iSh\nYJkNIq535i6IZzdnePJiE+BZmjV+mgplEsRAQtxkhhYylWXmKsN7ihPkTELJ\n/dYB\r\n=j/80\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID8w7q8YXWly+CmVEQs1qsfA+3ggGWUWJAoy27131Mr7AiBb5fWBzt8nKz1PgCBPz6YKphkpD9+xChdklQUsl9POpQ=="}]},"_npmUser":{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"},"maintainers":[{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api_1.1.0_1627732804410_0.43834571937983324"},"_hasShrinkwrap":false},"1.1.1":{"devDependencies":{"@types/node":"^16.4.7","ts-node":"^10.1.0","typescript":"^4.3.5"},"name":"@ibaraki-douji/api","version":"1.1.1","description":"Easy make API with Endpoints Listeners","main":"./lib/API.js","types":"./lib/API.d.ts","directories":{"lib":"lib"},"scripts":{"start":"node ./lib/main.js"},"keywords":["api","rest","route","handler","endpoint","listener","http","dynamic"],"author":{"name":"ibaraki-douji"},"license":"ISC","_id":"@ibaraki-douji/api@1.1.1","_nodeVersion":"15.10.0","_npmVersion":"7.19.0","dist":{"integrity":"sha512-6rt1MRGSF5TnpjzvWRQVhlOIJT0hyqAs+eWiCkJouvZacZWN57mYHsHh9lyodp2sinzCBcJFKOFvLM/thwa0jQ==","shasum":"480c165cb578a5e5ba403e164b5a2214e8873e1f","tarball":"https://registry.npmjs.org/@ibaraki-douji/api/-/api-1.1.1.tgz","fileCount":13,"unpackedSize":15126,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhGC10CRA9TVsSAnZWagAAD2AP/2wFYymznztcvI5rUeET\nvUnaBr4wo5RG4jRkIDTq0AmLNmryEttPWMRmVp7OzoNh3y5+RHygLYlRYph7\n3ujPIlotNJsZxdYkIcokZpfGLOU7/WqNdTVgOIUdpIhVKaKV3jMKTuAQTmBv\n9CefT91oDod2ceZFgp5mUQAlb+paiBIKn1FZ19P6GakC8JdMeMtyl0GfPEB6\nWWG4G3FXGz5cESyL/zQwF2kArl/Yf1d9sadhdoXi+3JiSWh1wY4xpdXZqEKi\n9rDoOSgtNg0iQo15QGO1yNC0Dx73Baua9v37+OzTZ7uNlZ85sVqcWs4zXFBR\ni5ovuo4MMukMnv9uooDuQ9Ej+nXziSzeG5sm2uvHbnubJkJsw6BLnddTfC2a\np5SJLeqMP1/LXmIvm7onFXEvnePudOBobC3vLvvwMoPvbXzZWJbwgEj1FkxJ\nhbJgrts/V+OVikkzw3VMUd11BLVon3jcebJ9QU5+kTnVzdjJuzC/GgCfp8Fa\nqaFilZh+UnVmPF9gC0Q3o81vLdzDRVnhxuusIRCSI6SVrQt0w+hChXoohqkG\nkcRKdHbIcJmKXVj0bNHFcCl7kTtMQVwunRCT2caeQo+g93ArCyRhKE+7xXxj\n6eZgjm45lBGj4JfXbYqMC21eq4hPZZGxfcTJIebOFKFOKjzexGY7xLs0LaY9\nOiba\r\n=fEZs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB0ZzMhyNu6tgbbTECn6ulpiSC0xA/VXu8zqiQJoKg78AiEA/7yw4mITe4lqg8hdgoOtodpDrsxomQ+e0lS0VyDY5Yo="}]},"_npmUser":{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"},"maintainers":[{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api_1.1.1_1628974452562_0.12917109311250763"},"_hasShrinkwrap":false},"1.1.2":{"devDependencies":{"@types/node":"^16.4.7","ts-node":"^10.1.0","typescript":"^4.3.5"},"name":"@ibaraki-douji/api","version":"1.1.2","description":"Easy make API with Endpoints Listeners","main":"./lib/API.js","types":"./lib/API.d.ts","directories":{"lib":"lib"},"scripts":{"start":"node ./lib/main.js"},"keywords":["api","rest","route","handler","endpoint","listener","http","dynamic"],"author":{"name":"ibaraki-douji"},"license":"ISC","_id":"@ibaraki-douji/api@1.1.2","_nodeVersion":"15.10.0","_npmVersion":"7.19.0","dist":{"integrity":"sha512-QjvHChjhYIgnsn9EfHNd/dHWGcnMb5eAWiaTxTER0GWdqtvBDyv0gfGpLOzau8lPbNQx42H9QhBqBYJgFVPJSA==","shasum":"e6426e07370471e1a922ac295287b6a3bc73ef2d","tarball":"https://registry.npmjs.org/@ibaraki-douji/api/-/api-1.1.2.tgz","fileCount":13,"unpackedSize":15140,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhGC6eCRA9TVsSAnZWagAAq/UP/iRsFGDQ3uifV9jtlKO7\nJo+dwMJ4bnhwhbzk631l+jER9ChxSDzYF++Z7ws/VQgY5FmBBS/SS4REXTQg\n/y9n0IIZ1/+Or7bbIK8E/6hFevz3EzIsyj9fbFl61s5WUpdO94eyh0Ec/Wxy\nUAuLAJQjpyUuBMHhIOeYaY63jo1QcFCRXkXtAfRgY+h4VZiDMkm0venaNcE6\n9rykBL7JC7SWKk3fo1lPG44PQvTMiC9Fn2T7RRbUuGL33OGtVh5ye8sshM5u\nxxpSRv+6smY4qSCIJSA6v+bYz5TZ9yWNbDrCl5qVszOotlUA7x4ets4ScU7x\nxS1UbKhEY2xGdEno4lKyW875FY/no/NRBeMySPQHCpNvIl6MkNMJNaoSbd/Q\nFoHSKj15oRqT72HAb7gszYDoN2tViliU5nJ0iXftTsEQuFOgzKpdBX6G8GRU\nN5XXyQrHtG8oyjftmHgsH6KOeD0ARmLF7iR7/vj61qnwX2u2oaDjSksRxwWu\nWUrOo3moLbwml0R5lcoyIdhZSZ4A5J/4VkFqxG9vZT62lJKdFgOjAPQfUOFw\nKgbuK8hx0ejsJtX2VmhFAjpEjGopZod6ndFOtfg/mpPet9na0USzoY4Ti4Ni\nz0HAgcPXk/8ArqKy0rG0TgQpDzIp631EFDdsbxwo5k8Ffhw+kOaHc5qgCHL4\nfyw8\r\n=XPw0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDoqxdcrYltJ2lZMjSlGESU4nt9HSODsp4s4GExjbe03QIgRjcPSF5sE46IKszV3LhGxLmRT8c3kUD4DfNsHMbzdCc="}]},"_npmUser":{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"},"maintainers":[{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api_1.1.2_1628974750601_0.3438082609661113"},"_hasShrinkwrap":false},"1.1.3":{"devDependencies":{"@types/node":"^16.4.7","ts-node":"^10.1.0","typescript":"^4.3.5"},"name":"@ibaraki-douji/api","version":"1.1.3","description":"Easy make API with Endpoints Listeners","main":"./lib/API.js","types":"./lib/API.d.ts","directories":{"lib":"lib"},"scripts":{"start":"node ./lib/main.js"},"keywords":["api","rest","route","handler","endpoint","listener","http","dynamic"],"author":{"name":"ibaraki-douji"},"license":"ISC","_id":"@ibaraki-douji/api@1.1.3","_nodeVersion":"15.10.0","_npmVersion":"7.19.0","dist":{"integrity":"sha512-BW4XIpd74/4RTnsaLBUkWs0PoXU1xZ7TMu8dPUpgXFEoha4w6j1Se/v7ihy3n96JSQeu/Gc4QNNAHos9Xnl17Q==","shasum":"a84bf54dae20945df274ffe539748a2c52d6152e","tarball":"https://registry.npmjs.org/@ibaraki-douji/api/-/api-1.1.3.tgz","fileCount":13,"unpackedSize":15944,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhGDSGCRA9TVsSAnZWagAA/aYP/1vhRh5BASrDZ/X9jIO3\nCzriHKv0aEvfqu5qz09g5PsTtZEHUeHf9rLP+EHnFYU/MomQKNjyG9OqJSl9\nSL9vStmNNfXYy7cG3UHILru2JpAFBFFvhwvb56pbCl8IDMuQvkPMsSRVepfz\nscVhH2RqYIZ338cz0ly/Bex+S0gQDC/UWBt0AzuQDrv8RgZ3LuZjkifMBdkZ\n/6zuWWTto/nSeSvnnQmltPd5zeVk7GtDZbZEyMWXibkoS5++XpUFq29I0+e0\ndfTj2crxBgqCiHc5rV3wsoeK+4DAugmSnhQLc6pno6GOiBv1iq1+bgx2EXv4\nurwBORJniMrufRoXzpMVVJh11i9RlVNCPg+aWDW9lK05LOAku+K/uGnbIxbY\n9DSBQxJnDzEU6zvvQ9E9iizr3T7G+2f1gv2h0kBMPDMLkOAOrzfTH3ukHH3D\nyBIrwzeOpU9YVj0ww3OkiBGEYWqpK71rNtVFqCxzLjSZP/4JcPGkNqIGd5Vz\nHFVx6NcmxLCffz+OQcnI6k/kkk7iCfu7MT3niwohzvBepBoeyNiiyz1U+ksC\nUMazaCj1PcaTvAKot9AaXuR6iABjSQd5fG2iItEuN7UJemZxuzY2zyppS1cV\n3TDSjoqJq1ewwA1mv/PzQ55zo7gNuTmeXzQ9OIbLqeEhoUVSa/pmTANw5x/w\n4/21\r\n=UBL6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHCHhaZR0azXfPHPUwDR9YU2eON3B5ag5PkBVVhNk5XiAiA0JteQTOZHs0XE9gHSdsylxYRPEIcU0MBMK14R6x9u6Q=="}]},"_npmUser":{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"},"maintainers":[{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api_1.1.3_1628976262563_0.34821906868048"},"_hasShrinkwrap":false},"1.1.4":{"devDependencies":{"@types/node":"^16.4.7","ts-node":"^10.1.0","typescript":"^4.3.5"},"name":"@ibaraki-douji/api","version":"1.1.4","description":"Easy make API with Endpoints Listeners","main":"./lib/API.js","types":"./lib/API.d.ts","directories":{"lib":"lib"},"scripts":{"start":"node ./lib/main.js"},"keywords":["api","rest","route","handler","endpoint","listener","http","dynamic"],"author":{"name":"ibaraki-douji"},"license":"ISC","_id":"@ibaraki-douji/api@1.1.4","_nodeVersion":"15.10.0","_npmVersion":"7.19.0","dist":{"integrity":"sha512-KVh3i3O/IaKDG65hv/0MIs0aoldZtMKu05oAJYI5uHjX6pFVLUzWhoBV2DIzCQeENBdy/84I6A5BO1OOww5sNQ==","shasum":"9d8bc0b698d500f903b27c7ee5779c0206e0ddb5","tarball":"https://registry.npmjs.org/@ibaraki-douji/api/-/api-1.1.4.tgz","fileCount":13,"unpackedSize":16212,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhGDXZCRA9TVsSAnZWagAALgkQAJCZQH0pVpbosWzBpgJ6\nwQ1Y6/m7bOq+TyZwU5gC1jNu5PxFzzZQimR8fqNe7eVRcaNFBqsmapL8Zvcs\nWHoY6awLQEISzrqPOew4IupEUaKxg8ZXLXT4iyJWo5RSqNE5yJQUX47P2Oto\niLzj800dCNBLQEtdY0Zmqg9hy5E9b0WHBj5pbKHBVwszJdKLtoQ7he1yD213\nbGJHQr4QBqFBZfWhNeErk4hxRXt8oPnfzZggBhQ1JIbkMPPYS9F0iK5wMb9Y\nuIa8DV4MM2P9Q7amqk6p++fScSM1AP/jYrw5cQUlQqojy3nD2lBr2i6/hUOr\nkYc8YU+C7dchQrrQU+tqaMXjNf4xGdIRuyX3qqVs6cjmEcKFubN/GY1yE96y\nstZ1cF+AcNzqT5zULtRncNUj0/09FzwKxxp9ASZp8kA12pe7wIK/QVaobbVx\nhr1R9w4p6ewkL1ZwCcv4q87J1cEUhxDSUatNP5iOhChDZL7Sl8hgIWWJAj/4\nCvfXwO5x8phIPy4DSh9WUS6UvwzKqJ5+Lc8BEraNberTrZxgU0Px0LLXmDHQ\nXayD4bF4C9hSSTFm1ykyeiX+ACUypUWHWuENycNxgzLZGNNCmm8F9KHzFarn\nJ/d7wBrfReTEXrPVr2Rps1QeodYhQyHx09cKYuvE1t/GYQvHmWrLU80BD9iw\nC4Rf\r\n=rs4E\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFvoMbV6lygCnq3uYZ9I3JAgf8RPpUyU1GIvgfXHmCB6AiEArSNCI9fo4PfiheNpqhuYgkNR1rs7jb/xhURUbwEml0s="}]},"_npmUser":{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"},"maintainers":[{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api_1.1.4_1628976601235_0.10208476833044933"},"_hasShrinkwrap":false},"2.0.0-beta.1":{"name":"@ibaraki-douji/api","version":"2.0.0-beta.1","description":"Create a simple API server with TypeScript.","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["typescript","api","server","layered","architecture","mysql","jwt","websocket"],"author":{"name":"ibaraki-douji"},"license":"ISC","devDependencies":{"@types/node":"^20.1.4","@types/ws":"^8.5.4","ts-node":"^10.9.1","@types/jsonwebtoken":"^9.0.2","typescript":"^5.0.4"},"dependencies":{"@ibaraki-douji/console":"^1.0.1","jsonwebtoken":"^9.0.0","mysql2":"^3.3.1","reflect-metadata":"^0.1.13","ws":"^8.13.0"},"_id":"@ibaraki-douji/api@2.0.0-beta.1","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-ZNVgJpKno8N2bNpc4WR8iz1IChOgtIWpQj/pFTfxPTvN+uCJODSt91WI9+sjZ9mbNl5JvGiWvFMgudCgTtOYjw==","shasum":"97330ce4c7e8101d808240c55f8d263bbe9004e7","tarball":"https://registry.npmjs.org/@ibaraki-douji/api/-/api-2.0.0-beta.1.tgz","fileCount":74,"unpackedSize":81022,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDRJcq6XD0npKWqSnih070Yr/Paqkl39QwpG4X07y804AIgN8EYXkZ6GLjg7OAsBOXn83EBXqhLzPUqw8L567KddGI="}]},"_npmUser":{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"},"directories":{},"maintainers":[{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api_2.0.0-beta.1_1684334750956_0.4442901629569831"},"_hasShrinkwrap":false},"2.0.0-beta.2":{"name":"@ibaraki-douji/api","version":"2.0.0-beta.2","description":"Create a simple API server with TypeScript.","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["typescript","api","server","layered","architecture","mysql","jwt","websocket"],"author":{"name":"ibaraki-douji"},"license":"ISC","devDependencies":{"@types/node":"^20.1.4","@types/ws":"^8.5.4","ts-node":"^10.9.1","@types/jsonwebtoken":"^9.0.2","typescript":"^5.0.4"},"dependencies":{"@ibaraki-douji/console":"^1.0.1","jsonwebtoken":"^9.0.0","mysql2":"^3.3.1","reflect-metadata":"^0.1.13","ws":"^8.13.0"},"_id":"@ibaraki-douji/api@2.0.0-beta.2","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-ljtJyhR4GAqGiypuowDDxS164k8QiuQ+gVhgB/phIvxDPYUEcY3aDsIClqeY+bKiIVIWO6X1tYx9yXMiet6Xqg==","shasum":"bcb65a10847ba3ac3eaa103845d5bd8210f0bd2a","tarball":"https://registry.npmjs.org/@ibaraki-douji/api/-/api-2.0.0-beta.2.tgz","fileCount":74,"unpackedSize":81050,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDajGgEvk6A1V8wZSdvTp+qaDKi8DSB3lE1sFY7nCknhQIhANQURMMYrlMkYsNd9bqWtxWYuZGssna1QJJR4bmZH1+W"}]},"_npmUser":{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"},"directories":{},"maintainers":[{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api_2.0.0-beta.2_1684334876634_0.8427038243754457"},"_hasShrinkwrap":false},"2.0.0-beta.3":{"name":"@ibaraki-douji/api","version":"2.0.0-beta.3","description":"Create a simple API server with TypeScript.","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["typescript","api","server","layered","architecture","mysql","jwt","websocket"],"author":{"name":"ibaraki-douji"},"license":"ISC","devDependencies":{"@types/node":"^20.1.4","@types/ws":"^8.5.4","ts-node":"^10.9.1","@types/jsonwebtoken":"^9.0.2","typescript":"^5.0.4"},"dependencies":{"@ibaraki-douji/console":"^1.0.1","jsonwebtoken":"^9.0.0","mysql2":"^3.3.1","reflect-metadata":"^0.1.13","ws":"^8.13.0"},"_id":"@ibaraki-douji/api@2.0.0-beta.3","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-0e3Y6SXJjQKEXEpKWbe0kcrOv/P9o8z62ijKEHkB8pXQnFYMVAZtuSijNrbMMIb9MZE4J0pDzmN6WW/0Jp+gEQ==","shasum":"100c7daa639497d6c1ba86c5b164c86fd84e2a0a","tarball":"https://registry.npmjs.org/@ibaraki-douji/api/-/api-2.0.0-beta.3.tgz","fileCount":74,"unpackedSize":80999,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDAxNUaBgkcjkcZBFm4rwCu1u52SwJSGSQ8okztWANNewIhALhGxiinShsz/Uavpw+EapH8ZX/mDJWXqGK0a7i+UVnz"}]},"_npmUser":{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"},"directories":{},"maintainers":[{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api_2.0.0-beta.3_1684334941418_0.41248833730647094"},"_hasShrinkwrap":false},"2.0.0-beta.4":{"name":"@ibaraki-douji/api","version":"2.0.0-beta.4","description":"Create a simple API server with TypeScript.","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["typescript","api","server","layered","architecture","mysql","jwt","websocket"],"author":{"name":"ibaraki-douji"},"license":"ISC","devDependencies":{"@types/node":"^20.1.4","@types/ws":"^8.5.4","ts-node":"^10.9.1","@types/jsonwebtoken":"^9.0.2","typescript":"^5.0.4"},"dependencies":{"@ibaraki-douji/console":"^1.0.1","jsonwebtoken":"^9.0.0","mysql2":"^3.3.1","reflect-metadata":"^0.1.13","ws":"^8.13.0"},"_id":"@ibaraki-douji/api@2.0.0-beta.4","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-gUwNK1dWFtjInq7ztUCnByCZKvC3OjnvRZfdM4MXFFrMAxDzm+sF9djYOOe9Zevts6S95mgip4cLcefGR/jPkg==","shasum":"6eed6e4a5568fae9246ae52ecb7880890f76c853","tarball":"https://registry.npmjs.org/@ibaraki-douji/api/-/api-2.0.0-beta.4.tgz","fileCount":74,"unpackedSize":81022,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxpMKRo09kXqe20I1PZOwgrYfYi0N/VxOYm1PZrgewlwIhAJQzu5XkFMIm8ZvgWw7WsEvEXAGFueoQAatFXzMlIGEe"}]},"_npmUser":{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"},"directories":{},"maintainers":[{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api_2.0.0-beta.4_1684335064254_0.197613251571767"},"_hasShrinkwrap":false},"2.0.0-beta.5":{"name":"@ibaraki-douji/api","version":"2.0.0-beta.5","description":"Create a simple API server with TypeScript.","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["typescript","api","server","layered","architecture","mysql","jwt","websocket"],"author":{"name":"ibaraki-douji"},"license":"ISC","devDependencies":{"@types/node":"^20.1.4","@types/ws":"^8.5.4","ts-node":"^10.9.1","@types/jsonwebtoken":"^9.0.2","typescript":"^5.0.4"},"dependencies":{"@ibaraki-douji/console":"^1.0.1","jsonwebtoken":"^9.0.0","mysql2":"^3.3.1","reflect-metadata":"^0.1.13","ws":"^8.13.0"},"_id":"@ibaraki-douji/api@2.0.0-beta.5","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-DhKyJcaqI0q+RPOct2+U8OLwKiFKLBsj3YDe+QQ2YVfsnpMiKfVdrYwjLz8uzjI5NabUvnpeAX+zwNiiXRr/fw==","shasum":"7e3b9669c87079178a700619c4e45b0fbd44b608","tarball":"https://registry.npmjs.org/@ibaraki-douji/api/-/api-2.0.0-beta.5.tgz","fileCount":74,"unpackedSize":81115,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG7X9od5ETZ4SKitMkIk0LIZt2JTT6yDOEVdfKJ7eurXAiBw9f+zLUTR6bnuvs5cVlfgHFHqkUlfhvd0OUJwb5v/kg=="}]},"_npmUser":{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"},"directories":{},"maintainers":[{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api_2.0.0-beta.5_1684335259943_0.819330395790564"},"_hasShrinkwrap":false},"2.0.0-beta.6":{"name":"@ibaraki-douji/api","version":"2.0.0-beta.6","description":"Create a simple API server with TypeScript.","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["typescript","api","server","layered","architecture","mysql","jwt","websocket"],"author":{"name":"ibaraki-douji"},"license":"ISC","devDependencies":{"@types/node":"^20.1.4","@types/ws":"^8.5.4","ts-node":"^10.9.1","@types/jsonwebtoken":"^9.0.2","typescript":"^5.0.4"},"dependencies":{"@ibaraki-douji/console":"^1.0.1","jsonwebtoken":"^9.0.0","mysql2":"^3.3.1","reflect-metadata":"^0.1.13","ws":"^8.13.0"},"_id":"@ibaraki-douji/api@2.0.0-beta.6","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-ynazHEFqdzUe/t7AN/qzE0uC7lkQA7p8ZNEI1BsCJlPbyN/mylJoF91mV68d2pjq4NA8RD6rVIQpCqtuOGP8pg==","shasum":"227958753fe25f13094b3b262e1c1baa0f130ccb","tarball":"https://registry.npmjs.org/@ibaraki-douji/api/-/api-2.0.0-beta.6.tgz","fileCount":76,"unpackedSize":88939,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQChgeeP7hGQC44xnvhNevOuf0m+1D5rKQXWwRgKtJSUPgIgVnhbgnNxBplbHrOXoCwg4q0leGwT3ryV/JDr5Ei8/LE="}]},"_npmUser":{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"},"directories":{},"maintainers":[{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api_2.0.0-beta.6_1684410641782_0.5633661296882957"},"_hasShrinkwrap":false},"2.0.0-beta.7":{"name":"@ibaraki-douji/api","version":"2.0.0-beta.7","description":"Create a simple API server with TypeScript.","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["typescript","api","server","layered","architecture","mysql","jwt","websocket"],"author":{"name":"ibaraki-douji"},"license":"ISC","devDependencies":{"@types/node":"^20.1.4","@types/ws":"^8.5.4","ts-node":"^10.9.1","@types/jsonwebtoken":"^9.0.2","typescript":"^5.0.4"},"dependencies":{"@ibaraki-douji/console":"^1.0.1","jsonwebtoken":"^9.0.0","mysql2":"^3.3.1","reflect-metadata":"^0.1.13","ws":"^8.13.0"},"_id":"@ibaraki-douji/api@2.0.0-beta.7","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-vV32g/nxyCSVvzxdHaxuAidMLFN2Fi4o5liqPinM9+wtOxN78UKnhWN8oBxB5R1pu8m9LTIE3Q+WXep/lqQGbg==","shasum":"bb81401cf98a99ab3d7b6ce76858219f16a5c9ca","tarball":"https://registry.npmjs.org/@ibaraki-douji/api/-/api-2.0.0-beta.7.tgz","fileCount":76,"unpackedSize":90194,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC05MhOKm1MuxvXGFF2iFqsSD+y2Eg0p0LfHcg3Nr40fwIhAJMrrLGrOfnmyRDwrdhBs4FNphy16MGGsX8oBe/0RZVg"}]},"_npmUser":{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"},"directories":{},"maintainers":[{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api_2.0.0-beta.7_1684411281246_0.35361317993555796"},"_hasShrinkwrap":false},"2.0.0-beta.8":{"name":"@ibaraki-douji/api","version":"2.0.0-beta.8","description":"Create a simple API server with TypeScript.","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["typescript","api","server","layered","architecture","mysql","jwt","websocket"],"author":{"name":"ibaraki-douji"},"license":"ISC","devDependencies":{"@types/node":"^20.1.4","@types/ws":"^8.5.4","ts-node":"^10.9.1","@types/jsonwebtoken":"^9.0.2","typescript":"^5.0.4"},"dependencies":{"@ibaraki-douji/console":"^1.0.1","jsonwebtoken":"^9.0.0","mysql2":"^3.3.1","reflect-metadata":"^0.1.13","ws":"^8.13.0"},"_id":"@ibaraki-douji/api@2.0.0-beta.8","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-1r79ER+SJMiQoXTB1i6lJ9Rwb3pVOD0fZjK7MD3ZlsnloUaEBM8zutqcXtJyrr0/4eHaUx1hPWiojRg5IzIwsg==","shasum":"92b6cd28ce83adc54571279de883cfcaddb31d87","tarball":"https://registry.npmjs.org/@ibaraki-douji/api/-/api-2.0.0-beta.8.tgz","fileCount":76,"unpackedSize":95558,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGFuU41+Y+W+X/df+fSf9oXOGA7PHm9tw1xZu9axjszUAiATFv44ej+0dmF3z2Gi2DgqmXlDosCNJHtHjhrmV2TDXQ=="}]},"_npmUser":{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"},"directories":{},"maintainers":[{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api_2.0.0-beta.8_1684618539236_0.18047408303884804"},"_hasShrinkwrap":false},"2.0.0-beta.9":{"name":"@ibaraki-douji/api","version":"2.0.0-beta.9","description":"Create a simple API server with TypeScript.","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["typescript","api","server","layered","architecture","mysql","jwt","websocket"],"author":{"name":"ibaraki-douji"},"license":"ISC","devDependencies":{"@types/node":"^20.1.4","@types/ws":"^8.5.4","ts-node":"^10.9.1","@types/jsonwebtoken":"^9.0.2","typescript":"^5.0.4"},"dependencies":{"@ibaraki-douji/console":"^1.0.1","jsonwebtoken":"^9.0.0","mysql2":"^3.3.1","reflect-metadata":"^0.1.13","ws":"^8.13.0"},"_id":"@ibaraki-douji/api@2.0.0-beta.9","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-KYiHKXs2IkxakhCRBUcypBEDcVGv2dJWupvRcSzg2DD6D+derpPA0bnQM/3sDGTont6hiQzqhdXPtS9vtB0jIg==","shasum":"acc0d072de1192fdedddbfcba66c61ddf7bcab0b","tarball":"https://registry.npmjs.org/@ibaraki-douji/api/-/api-2.0.0-beta.9.tgz","fileCount":76,"unpackedSize":95564,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICF6j3t0O0TUiPjr58O/iaki0pFkhy85PaoNe99szgPZAiEAk7MdxPBc5/sjJ2I65jpjXXJzQKqdI0q4gHhQ4PjCddA="}]},"_npmUser":{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"},"directories":{},"maintainers":[{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api_2.0.0-beta.9_1684618645120_0.7921486695763171"},"_hasShrinkwrap":false},"2.0.0":{"name":"@ibaraki-douji/api","version":"2.0.0","description":"Create a simple API server with TypeScript.","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["typescript","api","server","layered","architecture","mysql","jwt","websocket"],"author":{"name":"ibaraki-douji"},"license":"ISC","devDependencies":{"@types/node":"^20.1.4","@types/ws":"^8.5.4","ts-node":"^10.9.1","@types/jsonwebtoken":"^9.0.2","typescript":"^5.0.4"},"dependencies":{"@ibaraki-douji/console":"^1.0.1","jsonwebtoken":"^9.0.0","mysql2":"^3.3.1","reflect-metadata":"^0.1.13","ws":"^8.13.0"},"_id":"@ibaraki-douji/api@2.0.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-UBF+Wr3EtA9h7HL5+yABrBAVKZAc6H1tXlZJwWTx3opTdZuUPkO+bRYH7Gj3MhPhQEBB5Cldu1e6s0pUAw6TiA==","shasum":"62599e04f0f924e0c17cd584beeae9a9e290a763","tarball":"https://registry.npmjs.org/@ibaraki-douji/api/-/api-2.0.0.tgz","fileCount":76,"unpackedSize":105499,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD2BFy3YJ2jWxVKh9sZfiRo9TaRJ8HyFBH5CeHJGUhGjgIgFqxeAZ0jh9zTvC2fPtoe99c5wiaJZDEIbJeaeflQWT0="}]},"_npmUser":{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"},"directories":{},"maintainers":[{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api_2.0.0_1684676018373_0.6412882995099687"},"_hasShrinkwrap":false},"2.0.3":{"name":"@ibaraki-douji/api","version":"2.0.3","description":"Create a simple API server with TypeScript.","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["typescript","api","server","layered","architecture","mysql","jwt","websocket"],"author":{"name":"ibaraki-douji"},"license":"ISC","devDependencies":{"@types/node":"^20.1.4","@types/ws":"^8.5.4","ts-node":"^10.9.1","@types/jsonwebtoken":"^9.0.2","typescript":"^5.0.4"},"dependencies":{"@ibaraki-douji/console":"^1.0.1","jsonwebtoken":"^9.0.0","mysql2":"^3.3.1","reflect-metadata":"^0.1.13","ws":"^8.13.0"},"_id":"@ibaraki-douji/api@2.0.3","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-LVCxX91gX2CQ9hlZASmZC50bZgerWarZ5L4o+MSqCkMcT/h0Sfv0b6zrc+4z65LKj1jbtTvpmL3WltBe0jwKbw==","shasum":"185a40f4220a01ac849d1a82faa1c1eaba127bd1","tarball":"https://registry.npmjs.org/@ibaraki-douji/api/-/api-2.0.3.tgz","fileCount":78,"unpackedSize":107625,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFLqHu6UHQZlkFOyeCMbhvXdsbXbnjqNr/8i+mvVJ9WFAiEAyWpsEWz3twO4/ETOB9GXP01a1e2d/un/X175xHSfdYM="}]},"_npmUser":{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"},"directories":{},"maintainers":[{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api_2.0.3_1685543701120_0.7574710327139433"},"_hasShrinkwrap":false},"2.1.4":{"name":"@ibaraki-douji/api","version":"2.1.4","description":"Create a simple API server with TypeScript.","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["typescript","api","server","layered","architecture","mysql","jwt","websocket"],"author":{"name":"ibaraki-douji"},"license":"ISC","devDependencies":{"@types/node":"^20.1.4","@types/ws":"^8.5.4","ts-node":"^10.9.1","@types/jsonwebtoken":"^9.0.2","typescript":"^5.0.4"},"dependencies":{"@ibaraki-douji/console":"^1.0.1","jsonwebtoken":"^9.0.0","mysql2":"^3.3.1","reflect-metadata":"^0.1.13","ws":"^8.13.0"},"_id":"@ibaraki-douji/api@2.1.4","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-vONl7eSRHL9AQ1l3lN7n18zM9+uJMMqUYNzM662mS3JQh64Y3ncO7jsNKaaCtexGIqmli7AzJiSAoVBSGsOP2Q==","shasum":"e3c6c71bf8e0e189344950b307e7b9537c3c1942","tarball":"https://registry.npmjs.org/@ibaraki-douji/api/-/api-2.1.4.tgz","fileCount":84,"unpackedSize":112361,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDXGg4pMqNUX2p9MwBzOfi4HFTN8a2krB0rI3llOsqBdwIgU+TDWfn7TLKT9Kfnc0lK3jhGMZkhDQVT7/H1yMMP8t8="}]},"_npmUser":{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"},"directories":{},"maintainers":[{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api_2.1.4_1686141820842_0.5349539767859979"},"_hasShrinkwrap":false},"2.1.5":{"name":"@ibaraki-douji/api","version":"2.1.5","description":"Create a simple API server with TypeScript.","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["typescript","api","server","layered","architecture","mysql","jwt","websocket"],"author":{"name":"ibaraki-douji"},"license":"ISC","devDependencies":{"@types/node":"^20.1.4","@types/ws":"^8.5.4","ts-node":"^10.9.1","@types/jsonwebtoken":"^9.0.2","typescript":"^5.0.4"},"dependencies":{"@ibaraki-douji/console":"^1.0.1","jsonwebtoken":"^9.0.0","mysql2":"^3.3.1","reflect-metadata":"^0.1.13","ws":"^8.13.0"},"_id":"@ibaraki-douji/api@2.1.5","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-d4aO+jvKNzifJIyy+IcQ2m6ArOwOZtyBgxfohAGEVW4+WqMDbVaIg0XZ/QpoNEDSEX6trV0LgFaTED8NUYr/2w==","shasum":"26e27425562e4ba48a01dfb5c6e2c3a07c93d4b3","tarball":"https://registry.npmjs.org/@ibaraki-douji/api/-/api-2.1.5.tgz","fileCount":84,"unpackedSize":112405,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDgLcwAFKaTOai8n07BOw8m9VMijjmtUsW3hoX6x8McLAiEAqck9IKecqyK5ETRwybMpGY94YmntiPR3nVroeTU51OE="}]},"_npmUser":{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"},"directories":{},"maintainers":[{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api_2.1.5_1686144588687_0.5483133239843456"},"_hasShrinkwrap":false},"2.1.6":{"name":"@ibaraki-douji/api","version":"2.1.6","description":"Create a simple API server with TypeScript.","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["typescript","api","server","layered","architecture","mysql","jwt","websocket"],"author":{"name":"ibaraki-douji"},"license":"ISC","devDependencies":{"@types/node":"^20.1.4","@types/ws":"^8.5.4","ts-node":"^10.9.1","@types/jsonwebtoken":"^9.0.2","typescript":"^5.0.4"},"dependencies":{"@ibaraki-douji/console":"^1.0.1","jsonwebtoken":"^9.0.0","mysql2":"^3.3.1","reflect-metadata":"^0.1.13","ws":"^8.13.0"},"_id":"@ibaraki-douji/api@2.1.6","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-tdOGuxd31oFSOAXVlqg037c5oZ3Rwkobm1nvuc8h7wyEfwS9bZpdN2/ZCczFA48eHGBFbWYCBE998VeaXcLIIA==","shasum":"508d90859191b22c045ebf5754dddbdec1d3d6cc","tarball":"https://registry.npmjs.org/@ibaraki-douji/api/-/api-2.1.6.tgz","fileCount":84,"unpackedSize":112527,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBetsPjpdrk8mGFTSAA7f1s/ZCGqwNYonRxRX24d01hOAiANmYlMOtezASV+bHet5t8/jBPJ78/wGXJegToyyK+AJQ=="}]},"_npmUser":{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"},"directories":{},"maintainers":[{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api_2.1.6_1686145616993_0.05031998954479944"},"_hasShrinkwrap":false},"2.1.7":{"name":"@ibaraki-douji/api","version":"2.1.7","description":"Create a simple API server with TypeScript.","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["typescript","api","server","layered","architecture","mysql","jwt","websocket"],"author":{"name":"ibaraki-douji"},"license":"ISC","devDependencies":{"@types/node":"^20.1.4","@types/ws":"^8.5.4","ts-node":"^10.9.1","@types/jsonwebtoken":"^9.0.2","typescript":"^5.0.4"},"dependencies":{"@ibaraki-douji/console":"^1.0.1","jsonwebtoken":"^9.0.0","mysql2":"^3.3.1","reflect-metadata":"^0.1.13","ws":"^8.13.0"},"_id":"@ibaraki-douji/api@2.1.7","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-rPLeK4Of2jM3F526ESXDWNXBrp1xTARKZ0OBPd9xImgmvnH9ew0yN91kXGu0DKyvlnGADippjMMEsSMcS1o3EQ==","shasum":"ee2b1e8a49f0e4b7be8b1ac5c89cd41b1c1e164a","tarball":"https://registry.npmjs.org/@ibaraki-douji/api/-/api-2.1.7.tgz","fileCount":84,"unpackedSize":112300,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA/LyuAG4u/Bml9Tl3HYRf4X7WgU25ADikAe5PvmffouAiBGc3cujwtWM0Fe+l49naFnXi6habtc+LZTM4dstRHkng=="}]},"_npmUser":{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"},"directories":{},"maintainers":[{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api_2.1.7_1687030085977_0.21355534919195196"},"_hasShrinkwrap":false},"2.1.8":{"name":"@ibaraki-douji/api","version":"2.1.8","description":"Create a simple API server with TypeScript.","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["typescript","api","server","layered","architecture","mysql","jwt","websocket"],"author":{"name":"ibaraki-douji"},"license":"ISC","devDependencies":{"@types/node":"^20.1.4","@types/ws":"^8.5.4","ts-node":"^10.9.1","@types/jsonwebtoken":"^9.0.2","typescript":"^5.0.4"},"dependencies":{"@ibaraki-douji/console":"^1.0.1","jsonwebtoken":"^9.0.0","mysql2":"^3.3.1","reflect-metadata":"^0.1.13","ws":"^8.13.0"},"_id":"@ibaraki-douji/api@2.1.8","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-MHxQkzE6Dnj5dTposOpoIOm4czBQ3nE1hk6jg+nalrwVbNtRQJoMht2UkdX/s7OMZtfwp8+KsR3WaBXANDaJIg==","shasum":"2f211e297f319ef35b183f113c3d16aa01bbad5b","tarball":"https://registry.npmjs.org/@ibaraki-douji/api/-/api-2.1.8.tgz","fileCount":84,"unpackedSize":113011,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDkrrDs79Ex/yf/xGMqbSZOu9IC+JducTHqWbe54tm/cgIgBMg+rxwidN4wuuJ/6KgE3K2fz0MRh/wbx1y9DWaSLbg="}]},"_npmUser":{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"},"directories":{},"maintainers":[{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api_2.1.8_1687085225667_0.8432168976992473"},"_hasShrinkwrap":false},"2.1.9":{"name":"@ibaraki-douji/api","version":"2.1.9","description":"Create a simple API server with TypeScript.","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["typescript","api","server","layered","architecture","mysql","jwt","websocket"],"author":{"name":"ibaraki-douji"},"license":"ISC","devDependencies":{"@types/node":"^20.1.4","@types/ws":"^8.5.4","ts-node":"^10.9.1","@types/jsonwebtoken":"^9.0.2","typescript":"^5.0.4"},"dependencies":{"@ibaraki-douji/console":"^1.0.1","jsonwebtoken":"^9.0.0","mysql2":"^3.3.1","reflect-metadata":"^0.1.13","ws":"^8.13.0"},"_id":"@ibaraki-douji/api@2.1.9","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-DSpun/cpN25TsAtjImIqgVS/4Qo0dBA/zwLn2oTv+/txko5JrApTFOZzKslY6fR8sf2Kcl+Dw+qRCJcxWX+J/Q==","shasum":"f32800bfe949dd434811a61196b7410cfe4d1ba9","tarball":"https://registry.npmjs.org/@ibaraki-douji/api/-/api-2.1.9.tgz","fileCount":86,"unpackedSize":113441,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDmJ5WmUyS5VTYxSQlfQx9tBG2L9NoIqv+yAemZwyEo3gIgcJNdqHpW6FiRvSkVB8ETA9m/irt5CuvFc/kK1aRniP8="}]},"_npmUser":{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"},"directories":{},"maintainers":[{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api_2.1.9_1691775453042_0.6611670953132838"},"_hasShrinkwrap":false},"2.1.10":{"name":"@ibaraki-douji/api","version":"2.1.10","description":"Create a simple API server with TypeScript.","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["typescript","api","server","layered","architecture","mysql","jwt","websocket"],"author":{"name":"ibaraki-douji"},"license":"ISC","devDependencies":{"@types/node":"^20.1.4","@types/ws":"^8.5.4","ts-node":"^10.9.1","@types/jsonwebtoken":"^9.0.2","typescript":"^5.0.4"},"dependencies":{"@ibaraki-douji/console":"^1.0.1","jsonwebtoken":"^9.0.0","mysql2":"^3.3.1","reflect-metadata":"^0.1.13","ws":"^8.13.0"},"_id":"@ibaraki-douji/api@2.1.10","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-mNZjJ8fcNLrC/KzqCN9BCH3uk63P3fUeiEyRWy5bTHCckUOcznKWw/Gy+v5u/nMeZeu8HOlrNLtRLs5nTH6w1Q==","shasum":"444e0007e7f37ca1a2612ef49f0e5d64031cac15","tarball":"https://registry.npmjs.org/@ibaraki-douji/api/-/api-2.1.10.tgz","fileCount":86,"unpackedSize":113498,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDmgaU1rMLUY8DWn25Z6ps85AssXczhoHv8WUTTnA0hHAIhAMamO7z0lvZYj+YHmjldyfbOXmvkZyBF//daZvB5dc7B"}]},"_npmUser":{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"},"directories":{},"maintainers":[{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api_2.1.10_1691778417414_0.553672609003901"},"_hasShrinkwrap":false}},"time":{"created":"2021-07-30T21:31:34.950Z","1.0.0":"2021-07-30T21:31:35.161Z","modified":"2023-08-11T18:26:57.828Z","1.1.0":"2021-07-31T12:00:04.551Z","1.1.1":"2021-08-14T20:54:12.744Z","1.1.2":"2021-08-14T20:59:10.793Z","1.1.3":"2021-08-14T21:24:22.688Z","1.1.4":"2021-08-14T21:30:01.376Z","2.0.0-beta.1":"2023-05-17T14:45:51.155Z","2.0.0-beta.2":"2023-05-17T14:47:56.819Z","2.0.0-beta.3":"2023-05-17T14:49:01.623Z","2.0.0-beta.4":"2023-05-17T14:51:04.465Z","2.0.0-beta.5":"2023-05-17T14:54:20.160Z","2.0.0-beta.6":"2023-05-18T11:50:41.967Z","2.0.0-beta.7":"2023-05-18T12:01:21.438Z","2.0.0-beta.8":"2023-05-20T21:35:39.471Z","2.0.0-beta.9":"2023-05-20T21:37:25.308Z","2.0.0":"2023-05-21T13:33:38.539Z","2.0.1":"2023-05-24T08:14:00.999Z","2.0.2":"2023-05-30T09:45:21.708Z","2.0.3":"2023-05-31T14:35:01.339Z","2.1.0":"2023-06-07T11:48:11.532Z","2.1.1":"2023-06-07T12:09:06.803Z","2.1.2":"2023-06-07T12:29:30.791Z","2.1.3":"2023-06-07T12:41:44.980Z","2.1.4":"2023-06-07T12:43:41.066Z","2.1.5":"2023-06-07T13:29:48.883Z","2.1.6":"2023-06-07T13:46:57.167Z","2.1.7":"2023-06-17T19:28:06.177Z","2.1.8":"2023-06-18T10:47:05.830Z","2.1.9":"2023-08-11T17:37:33.241Z","2.1.10":"2023-08-11T18:26:57.610Z"},"maintainers":[{"name":"ibaraki-douji","email":"daynesmorgan33@gmail.com"}],"description":"Create a simple API server with TypeScript.","keywords":["typescript","api","server","layered","architecture","mysql","jwt","websocket"],"author":{"name":"ibaraki-douji"},"license":"ISC","readme":"# API\r\nEasy make REST API with layers and dynamic routes.\r\n\r\n⚠️ This project need a specific structure to work and only work in typescript (or gl with js files)! ⚠️\r\n\r\n\\- project  \r\n| - src  \r\n| - | - index.ts  \r\n| - | Controllers  \r\n| - | - | - UserController.ts  \r\n| - | Services  \r\n| - | - | - UserService.ts  \r\n| - | Mappings  \r\n| - | - | - UserMapping.ts  \r\n| - | Repositories  \r\n| - | - | - UserRepository.ts  \r\n| - | Models  \r\n| - | - | - User.ts  \r\n|  - package.json  \r\n\r\n## Getting started\r\n`npm i @ibaraki-douji/api --save`\r\n\r\n## Usage\r\n\r\n### Create the API\r\nThis is the content of the `index.ts` file.\r\n```ts\r\nimport API from \"@ibaraki-douji/api\";\r\n\r\nAPI.debug = true;\r\nAPI.start(3000);\r\n```\r\nReplace 3000 by your port. (default: 5055)\r\n### Create Controller\r\nAll controllers need to be placed in the `Controllers` folder.\r\n```ts\r\nimport { Autowire, BodyParam, Controller, Delete, Get, PathParam, Post, Put } from \"@ibaraki-douji/api\";\r\nimport { UserService } from \"../Services/UserService\";\r\nimport { User } from \"../Models/User\";\r\n\r\n@Controller('/users')\r\nexport class UserController {\r\n\r\n    @Autowire()\r\n    private userService: UserService;\r\n\r\n    constructor() {}\r\n\r\n    @Get('/:id')\r\n    public getOne(\r\n        @PathParam(\"id\") id: number\r\n    ) { \r\n        return this.userService.getUser(id);\r\n    }\r\n\r\n    @Get('/')\r\n    public async getAll() {\r\n        return this.userService.getUsers();\r\n    }\r\n\r\n    @Post('/')\r\n    public async create(\r\n        @BodyParam() user: User\r\n    ) {\r\n        return this.userService.createUser(user);\r\n    }\r\n\r\n    @Put('/:id')\r\n    public async update(\r\n        @PathParam(\"id\") id: number,\r\n        @BodyParam() user: User\r\n    ) {\r\n        return this.userService.updateUser(id, user);\r\n    }\r\n\r\n    @Delete('/:id')\r\n    public async delete(\r\n        @PathParam(\"id\") id: number\r\n    ) {\r\n        return this.userService.deleteUser(id);\r\n    }\r\n\r\n}\r\n```\r\n### Create Service\r\nAll services need to be placed in the `Services` folder.\r\n```ts\r\nimport { Autowire, Service } from \"@ibaraki-douji/api\";\r\nimport { UserRepository } from \"../Repositories/UserRepository\";\r\nimport { User } from \"../Models/User\";\r\n\r\n@Service()\r\nexport class UserService {\r\n\r\n    @Autowire()\r\n    private userRepository: UserRepository;\r\n\r\n    public async getUser(id: number) {\r\n        return this.userRepository.get(id);\r\n    }\r\n\r\n    public async getUsers() {\r\n        return this.userRepository.getAll();\r\n    }\r\n\r\n    public async createUser(user: User) {\r\n        return this.userRepository.create(user);\r\n    }\r\n\r\n    public async updateUser(id: number, user: User) {\r\n        return this.userRepository.update(id, user);\r\n    }\r\n\r\n    public async deleteUser(id: number) {\r\n        return this.userRepository.delete(id);\r\n    }\r\n}\r\n```\r\n\r\n### Create Repository\r\nAll repositories need to be placed in the `Repositories` folder.\r\n```ts\r\nimport { Repository, RepositoryImpl } from \"@ibaraki-douji/api\";\r\nimport { User } from \"../Models/User\";\r\n\r\n@Repository(\"users\")\r\nexport class UserRepository extends RepositoryImpl<User> {\r\n\r\n}\r\n```\r\n\r\n### Create Model\r\nAll models need to be placed in the `Models` folder.\r\n```ts\r\nimport { Id, Model, Role } from \"@ibaraki-douji/api\";\r\n\r\n@Model()\r\nexport class User {\r\n\r\n    @Id()\r\n    id: number;\r\n    name: string;\r\n    email: string;\r\n    password: string;\r\n\r\n    @Role()\r\n    role: string;\r\n}\r\n```\r\n\r\n### Create Mapping\r\nAll mappings need to be placed in the `Mappings` folder.\r\n```ts\r\nimport { Service } from \"@ibaraki-douji/api\";\r\n\r\n@Service()\r\nexport class UserMapping {\r\n\r\n    public map(user: any) {\r\n        return {\r\n            id: user.id,\r\n            name: user.name,\r\n            email: user.email,\r\n            role: user.role,\r\n            created_at: user.created_at\r\n        }\r\n    }\r\n\r\n    public mapAll(users: any[]) {\r\n        return users.map(user => this.map(user));\r\n    }\r\n\r\n}\r\n```\r\n\r\n### tsconfig.json\r\nYou need to add this to your `tsconfig.json` file.\r\n```json\r\n{\r\n    \"compilerOptions\": {\r\n        \"rootDir\": \"./src\",\r\n        \"outDir\": \"./lib\",\r\n        \"noEmitHelpers\": false,\r\n        \"target\": \"ESNext\",\r\n        \"moduleResolution\": \"node\",\r\n        \"module\": \"CommonJS\",\r\n        \"experimentalDecorators\": true,\r\n        \"skipLibCheck\": true,\r\n        \"emitDecoratorMetadata\": true,\r\n        \"useDefineForClassFields\": false\r\n    },\r\n    \"include\": [\r\n        \"./src/**/*\"\r\n    ]\r\n}\r\n```\r\n\r\n#### package.json\r\nYou need to add this to your `package.json` file.\r\n```json\r\n{\r\n    \"scripts\": {\r\n        \"start\": \"tsc && node ./lib/index.js\",\r\n        \"build\": \"tsc\"\r\n    },\r\n    \"dependencies\": {\r\n        \"@ibaraki-douji/api\": \"latest\"\r\n    },\r\n    \"devDependencies\": {\r\n        \"@types/node\": \"latest\",\r\n        \"typescript\": \"latest\"\r\n    }\r\n}\r\n```\r\nUse `npm run start` to start the API. (You might need to change the `index.js` to the main file of your API)  \r\nUse `npm run build` to build the API.\r\n\r\n## Documentation\r\n\r\n### Annotations / Decorators\r\n\r\n#### @Controller\r\nThis decorator is used to define a controller.  \r\nYou can add a prefix to the controller. (ex: `/users` is the base route for all routes in the controller)  \r\nYou can name the controller (used for the documentation).\r\n```ts\r\nimport { Controller } from \"@ibaraki-douji/api\";\r\n\r\n@Controller('/users', { name: \"Users\" })\r\nexport class UserController {\r\n    // ...\r\n}\r\n```\r\n\r\n#### @Service\r\nThis decorator is used to define a service.  \r\nThis decorator also work with mappings.\r\n```ts\r\nimport { Service } from \"@ibaraki-douji/api\";\r\n\r\n@Service()\r\nexport class UserService {\r\n    // ...\r\n}\r\n```\r\n\r\n#### @Repository\r\nThis decorator is used to define a repository.  \r\nYou can add a prefix to the repository. (ex: `users` is the name of the table in the database)\r\n```ts\r\nimport { Repository, RepositoryImpl } from \"@ibaraki-douji/api\";\r\n\r\n@Repository(\"users\")\r\nexport class UserRepository extends RepositoryImpl<User> {\r\n    // ...\r\n}\r\n```\r\n\r\n#### @Entity / @Model\r\nThis decorator is used to define an entity.\r\nYou can use either `@Entity` or `@Model` to define an entity.\r\n```ts\r\nimport { Entity } from \"@ibaraki-douji/api\";\r\n\r\n@Entity()\r\nexport class User {\r\n    // ...\r\n}\r\n```\r\n\r\n#### @Autowire\r\nThis decorator is used to inject a service or a repository in a controller or a service.\r\n```ts\r\nimport { Autowire, Controller } from \"@ibaraki-douji/api\";\r\n\r\n@Controller('/users')\r\nexport class UserController {\r\n\r\n    @Autowire()\r\n    private userService: UserService;\r\n\r\n    // ...\r\n}\r\n```\r\n\r\n#### @Model\r\nThis decorator is used to define a model.\r\n```ts\r\nimport { Model } from \"@ibaraki-douji/api\";\r\n\r\n@Model()\r\nexport class User {\r\n    // ...\r\n}\r\n```\r\n\r\n#### @Id\r\nThis decorator is used to define the id of a model.  \r\nThis is used for the authorization/security.\r\n```ts\r\nimport { Model, Id } from \"@ibaraki-douji/api\";\r\n\r\n@Model()\r\nexport class User {\r\n\r\n    @Id()\r\n    id: number;\r\n\r\n    // ...\r\n}\r\n```\r\n\r\n#### @Role\r\nThis decorator is used to define the role of a model.  \r\nThis is used for the authorization/security.\r\n```ts\r\nimport { Model, Role } from \"@ibaraki-douji/api\";\r\n\r\n@Model()\r\nexport class User {\r\n\r\n    @Role()\r\n    role: string;\r\n\r\n    // ...\r\n}\r\n```\r\n\r\n#### @Get / @Post / @Put / @Delete / @Patch / @Head / @Options\r\nThose decorators are used to define a route.  \r\nYou can add a prefix to the route. (ex: `/:id` is the id of the user)\r\n```ts\r\nimport { Controller, Get, PathParam } from \"@ibaraki-douji/api\";\r\n\r\n@Controller('/users')\r\nexport class UserController {\r\n\r\n    @Get('/:id')\r\n    public getOne(\r\n        @PathParam(\"id\") id: number\r\n    ) {   \r\n        // ...\r\n    }\r\n\r\n    @Get('/:id', { name: 'getOne', response: { property: { type: \"string\"}}})\r\n    public getOne(\r\n        @PathParam(\"id\") id: number\r\n    ) {   \r\n        // ...\r\n    }\r\n}\r\n```\r\nYou can add a name to the route and / or a description. (used for the documentation)  \r\nYou can also add a custom request and response to the route. (used for the documentation)  \r\nFor the custom request and response you can also provide a model. (ex: `@Get('/:id', { request: UserModel, response: UserModel})`)  \r\nFor an custom Array request/response you can do `@Get('/:id', { request: [UserModel], response: [UserModel]})`. \r\n\r\n#### @PathParam / @QueryParam / @HeaderParam / @CookieParam\r\nThose decorators are used to get the parameters of a route.  \r\nThey all need a name.  \r\nFor the `PathParam`, you need to add the name of the parameter in the route.  \r\nFor the `QueryParam`, `CookieParam` and `HeaderParam`, you need to add the name of the parameter in the query, cookie or in the header.\r\n```ts\r\nimport { Controller, Get, HeaderParam, CookieParam, PathParam, QueryParam } from \"@ibaraki-douji/api\";\r\n\r\n@Controller('/users')\r\nexport class UserController {\r\n\r\n    @Get('/:id')\r\n    public getOne(\r\n        @PathParam(\"id\") id: number,\r\n        @QueryParam(\"name\") name: string,\r\n        @HeaderParam(\"token\") token: string,\r\n        @CookieParam(\"session\") session: string\r\n    ) {   \r\n        // ...\r\n    }\r\n\r\n    // ...\r\n}\r\n```\r\n\r\n#### @BodyParam / @HeadersParam / @CookiesParam\r\nThose decorators are used to get the body or all headers of a request.\r\n```ts\r\nimport { BodyParam, Controller, CookiesParam, HeadersParam, Post, Headers, Cookies } from \"@ibaraki-douji/api\";\r\n\r\n@Controller('/users')\r\nexport class UserController {\r\n\r\n    @Post('/')\r\n    public async create(\r\n        @BodyParam() user: User,\r\n        @HeadersParam() headers: Headers,\r\n        @CookiesParam() cookies: Cookies\r\n    ) {\r\n        // ...\r\n    }\r\n\r\n    // ...\r\n}\r\n```\r\n\r\n#### @Security\r\nThis decorator is used to define a security.  \r\nYou can add a name to the security. (ex: `user` is the name of the security group (explained later))  \r\n⚠️ You need to put the `@Security` decorator before the route decorator. ⚠️\r\n```ts\r\nimport { Controller, Get, PathParam, Security } from \"@ibaraki-douji/api\";\r\n\r\n@Controller('/users')\r\nexport class UserController {\r\n\r\n    @Security(\"user\")\r\n    @Get('/:id')\r\n    public getOne(\r\n        @PathParam(\"id\") id: number\r\n    ) {   \r\n        // ...\r\n    }\r\n\r\n    // ...\r\n}\r\n```\r\n\r\n#### @WebSocket\r\nThis decorator is used to define a websocket route.  \r\nYou can add a prefix to the route. (ex: `/:id` is the id of the user)\r\n```ts\r\nimport { Controller, BodyParam, WebSocket } from \"@ibaraki-douji/api\";\r\n\r\n@Controller('/users')\r\nexport class UserController {\r\n\r\n    @WebSocket('/:id')\r\n    public messages(\r\n        @BodyParam() id: number\r\n    ) {   \r\n        // ...\r\n    }\r\n\r\n    // ...\r\n}\r\n```\r\n\r\n#### @String / @Number / @Boolean / @Array / @Object\r\nThose decorators are used to define the type of a parameter in a model.\r\n```ts\r\nimport { Entity, String, Number, Boolean, Array, Object } from \"@ibaraki-douji/api\";\r\n\r\n@Entity()\r\nexport class User {\r\n\r\n    @String()\r\n    name: string;\r\n\r\n    @Number()\r\n    age: number;\r\n\r\n    @Boolean()\r\n    isAdult: boolean;\r\n\r\n    @Array(\"string\")\r\n    friends: string[];\r\n\r\n    @Object({\r\n        street: {\r\n            type: \"string\"\r\n        },\r\n        city: {\r\n            type: \"string\"\r\n        },\r\n        country: {\r\n            type: \"string\"\r\n        }\r\n    })\r\n    address: {\r\n        street: string;\r\n        city: string;\r\n        country: string;\r\n    };\r\n\r\n    // ...\r\n}\r\n```\r\nYou can also use a model as a type.\r\n```ts\r\nimport { Entity, Array, Object } from \"@ibaraki-douji/api\";\r\n\r\n@Entity()\r\nexport class User {\r\n\r\n    @Array(User)\r\n    friends: User[];\r\n\r\n    @Object(User)\r\n    friend: User;\r\n}\r\n```\r\nFor `@Array` you can do a multi type array by putting your types in an array.\r\n```ts\r\nimport { Entity, Array, Object } from \"@ibaraki-douji/api\";\r\n\r\n@Entity()\r\nexport class User {\r\n\r\n    @Array([\"string\", \"number\"])\r\n    friends: (string | number)[];\r\n}\r\n```\r\n\r\n-----------------\r\n### Layers\r\n#### Repository\r\nThe repository is used to interact with the database.  \r\nYou can use the `RepositoryImpl` class to create a repository.\r\n```ts\r\nimport { Repository, RepositoryImpl } from \"@ibaraki-douji/api\";\r\n\r\n@Repository(\"users\")\r\nexport class UserRepository extends RepositoryImpl<User> {\r\n    // ...\r\n}\r\n```\r\nYou can add more methods to the repository.\r\n```ts\r\nimport { Repository, RepositoryImpl } from \"@ibaraki-douji/api\";\r\n\r\n@Repository(\"users\")\r\nexport class UserRepository extends RepositoryImpl<User> {\r\n\r\n    public async getByName(name: string) {\r\n        return this.getAll().find(user => user.name === name);\r\n    }\r\n\r\n}\r\n```\r\nThe default methods are :\r\n- `get(id: number)`\r\n- `getAll()`\r\n- `create(object: T)`\r\n- `update(id: number, object: T)`\r\n- `delete(id: number)`\r\n\r\nIf you are not happy with the few methods provided by the `RepositoryImpl` class, you can wire the `DBManager` class.\r\n```ts\r\nimport { Repository, DBManager, Autowire } from \"@ibaraki-douji/api\";\r\n\r\n@Repository(\"users\")\r\nexport class UserRepository extends RepositoryImpl<User> {\r\n\r\n    @Autowire()\r\n    private dbManager: DBManager;\r\n\r\n    public async getByName(name: string) {\r\n        return this.dbManager.query(\"SELECT * FROM users WHERE name = ?\", [name]);\r\n    }\r\n\r\n    public async setAge(id: number, age: number) {\r\n        return this.dbManager.query(\"UPDATE users SET age = ? WHERE id = ?\", [age, id]);\r\n    }\r\n\r\n}\r\n```\r\n\r\n#### Mapping\r\nMapping classes are optional. They are used to change the data returned by the API if this is different from the data in the database.\r\n```ts\r\nimport { Service } from \"@ibaraki-douji/api\";\r\n\r\n@Service()\r\nexport class UserMapping {\r\n    // ...\r\n}\r\n```\r\n\r\n#### Service\r\nThe service is used to interact with the repository and the mapping. It is also used to add more logic to the API.\r\n```ts\r\nimport { Service } from \"@ibaraki-douji/api\";\r\n\r\n@Service()\r\nexport class UserService {\r\n    // ...\r\n}\r\n```\r\n\r\n#### Controller\r\nThe controller is used to define the routes of the API.  \r\nIt uses the service to interact with the database.\r\n```ts\r\nimport { Controller } from \"@ibaraki-douji/api\";\r\n\r\n@Controller('/users')\r\nexport class UserController {\r\n    // ...\r\n}\r\n```\r\n\r\n-----------------\r\n\r\n### Database\r\nFor now the DB is only MySQL.  \r\nTo configure the DB you need to set the environment variables :\r\n- `DB_HOST` (default: `127.0.0.1`)\r\n- `DB_PORT` (default: `3306`)\r\n- `DB_USER` (default: `root`)\r\n- `DB_PASSWORD` (default: `root`)\r\n- `DB_DATABASE` (default: `api`)\r\n\r\nMake sure to have an empty database with the name you set in the environment variables.\r\n\r\n### Main file\r\nYou need to create a main file to start the API.\r\n```ts\r\nimport API from \"@ibaraki-douji/api\";\r\n\r\nAPI.start();\r\n```\r\n\r\n#### Custom layers folders\r\nYou can change the folders of the layers in the main file.  \r\nThe path is from the `src` folder.\r\n```ts\r\nimport API from \"@ibaraki-douji/api\";\r\n\r\nAPI.folders.controllers = \"controllers\"; // default: \"Controllers\"\r\nAPI.folders.services = \"services\"; // default: \"Services\"\r\nAPI.folders.repositories = \"repositories\"; // default: \"Repositories\"\r\nAPI.folders.mappings = \"mappings\"; // default: \"Mappings\"\r\nAPI.folders.entities = \"entities\"; // default: \"Models\"\r\n\r\n```\r\n\r\n\r\n#### Debug logs\r\nYou can enable the debug logs in the main file.\r\n```ts\r\nimport API from \"@ibaraki-douji/api\";\r\n\r\nAPI.debug = true; // default: false\r\n\r\nAPI.start();\r\n```\r\n\r\n#### Port\r\nYou can change the port of the API in the main file.\r\n```ts\r\nimport API from \"@ibaraki-douji/api\";\r\n\r\nAPI.start(3000); // default: 5055\r\n```\r\n\r\n#### Websocket\r\nYou can enable the websocket in the main file.\r\n```ts\r\n\r\nimport API from \"@ibaraki-douji/api\";\r\n\r\nAPI.websocket = true; // default: false\r\n\r\nAPI.start();\r\n```\r\n\r\n#### Swagger\r\nYou can enable the swagger in the main file.\r\n```ts\r\nimport API from \"@ibaraki-douji/api\";\r\n\r\nAPI.swagger = true; // default: false\r\n\r\nAPI.servers.push({\r\n    baseUrl: \"http://localhost:5055\",\r\n    name: \"Local server\"\r\n}) // default: [{baseUrl: \"http://localhost:<port>\", name: \"default\"}]\r\n\r\nAPI.start();\r\n```\r\n\r\nSwagger is available at `/swagger-ui`.  \r\nSwagger JSON file is available at `/swagger-ui/api.json`.  \r\n\r\n-----------------\r\n\r\n### Security\r\nYou can configure the security of the API in the main file.\r\n\r\n```ts\r\nimport API from \"@ibaraki-douji/api\";\r\n\r\n// Enable or disable the security\r\nAPI.security.enabled = true; // default: false\r\n\r\n// Configure the secret used to generate the tokens\r\nAPI.security.secret = \"secret\"; // default: random string of 32 characters\r\n\r\n// Configure if all the routes are protected by default (with minimum level)\r\nAPI.security.defaultProtected = true; // default: false\r\n\r\n// Configure the user model (the model need to have a \"role\" property and an \"id\" property)\r\nAPI.security.userModel = \"User\"; // default: \"User\"\r\n\r\n// Configure the roles (value is the name of the role (need to be the same as the DB values) and level is the minimum access level)\r\nAPI.security.roles = [ // default: like this\r\n    {\r\n        value: \"user\",\r\n        level: 1\r\n    },\r\n    {\r\n        value: \"admin\",\r\n        level: 2\r\n    }\r\n];\r\n```\r\n\r\n### Handle Websocket\r\n#### Client\r\nConnect to the websocket with the url `ws://localhost:5055` (replace `localhost` and `5055` with your values).\r\n```js\r\nconst socket = new WebSocket('ws://localhost:5055');\r\n```\r\n\r\nSend a message to the server.\r\n```js\r\nconst data = {\r\n    endpoint: \"/something\", // the endpoint of the API\r\n    data: \"your data\", // can be a string, a number, an object, ...\r\n    token: \"XXXXXXXXXXXXXXXXXXXXXX\" // the token of the user (if endpoint is secured with minimum level)\r\n};\r\n\r\nsocket.send(JSON.stringify(data));\r\n```\r\n\r\nReceive a message from the server.  \r\nif you want to listen to protected routes you need to send the token of the user at least once.4\r\n```js\r\nsocket.onmessage = function(event) {\r\n    const data = JSON.parse(event);\r\n    console.log(event.data);\r\n};\r\n```\r\n\r\n#### Server\r\nYou can handle websocket in the controller.\r\n```ts\r\nimport { Controller, WebSocket, PathParam, BodyParam } from \"@ibaraki-douji/api\";\r\n\r\n@Controller('/users')\r\nexport class UserController {\r\n\r\n    @WebSocket('/:id')\r\n    public messages(\r\n        @PathParam() id: number,\r\n        @BodyParam() data: any\r\n    ) {   \r\n        // ...\r\n    }\r\n\r\n    // ...\r\n}\r\n```\r\n\r\nYou can return a value to the client.\r\n```ts\r\nimport { Controller, WebSocket, PathParam, BodyParam } from \"@ibaraki-douji/api\";\r\n\r\n@Controller('/users')\r\nexport class UserController {\r\n\r\n    @WebSocket('/:id')\r\n    public messages(\r\n        @PathParam() id: number,\r\n        @BodyParam() data: any\r\n    ) {   \r\n        return \"Hello World\";\r\n    }\r\n\r\n    // ...\r\n}\r\n```\r\n\r\nYou can broadcast a message to all the clients. (if protected route, the user need to send the token at least once)\r\n```ts\r\nimport { Controller, WebSocket, PathParam, BodyParam, Autowire, WebsocketService } from \"@ibaraki-douji/api\";\r\n\r\n@Controller('/users')\r\nexport class UserController {\r\n\r\n    @Autowire()\r\n    private websocketService: WebsocketService;\r\n\r\n    @WebSocket('/:id')\r\n    public messages(\r\n        @PathParam() id: number,\r\n        @BodyParam() data: any\r\n    ) {   \r\n        this.websocketService.broadcast(\"/users/\" + id, \"Hello World\");\r\n    }\r\n\r\n    // ...\r\n}\r\n```\r\nThis will send the message to all the clients connected to the route `/users/:id`.  \r\n\r\nIf you want to create an endpoint to only send messages to the clients you can do this : (it also can be a protected route)\r\n```ts\r\nimport { Controller, WebSocket, BodyParam, Autowire, WebsocketService, Post } from \"@ibaraki-douji/api\";\r\n\r\n@Controller('/messages')\r\nexport class MessagesController {\r\n\r\n    @Autowire()\r\n    private websocketService: WebsocketService;\r\n\r\n    @Listener()\r\n    @WebSocket('/')\r\n    public messages() {}\r\n\r\n    @Post('/')\r\n    public sendMessage(\r\n        @BodyParam() data: any\r\n    ) {\r\n        this.websocketService.broadcast(\"/messages\", data);\r\n    }\r\n    // ...\r\n}\r\n```\r\n\r\nRetrive the token of the user.\r\n```ts\r\nimport { Controller, WebSocket, BodyParam, Autowire, WebsocketService, Post } from \"@ibaraki-douji/api\";\r\n\r\n@Controller('/messages')\r\nexport class MessagesController {\r\n\r\n    @Autowire()\r\n    private websocketService: WebsocketService;\r\n\r\n    @Listener()\r\n    @WebSocket('/')\r\n    public messages(\r\n        @BodyParam() data: any,\r\n        @Header(\"authorization\") token: string\r\n    ) {\r\n        console.log(token.split(\" \")[1]);\r\n    }\r\n\r\n    // ...\r\n}\r\n```\r\n\r\n-----------------\r\n\r\n### Start the API\r\nTo start the API you need to run the index.js file.\r\n```bash\r\nnode lib/index.js\r\n```\r\nYou can also setup this command in your `package.json` file.\r\n```json\r\n{\r\n    \"scripts\": {\r\n        \"start\": \"node lib/index.js\"\r\n    }\r\n}\r\n```\r\nThen you can run the API with :\r\n```bash\r\nnpm start\r\n```\r\n\r\n\r\n## More Help and Support\r\nDiscord : https://discord.gg/mD9c4zP4Er (`Projects` category then `help-me` channel)","readmeFilename":"README.md"}