{"_id":"@adelak/rest-ql","_rev":"5-2518e8959b648bd576437821a47c60b0","name":"@adelak/rest-ql","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"@adelak/rest-ql","version":"1.0.0","description":"A qurey lang for rest api","keywords":[],"author":{"name":"Adel ak"},"license":"MIT","main":"lib/index.js","types":"lib/index.d.ts","repository":{"url":"git+https://github.com/Adel-ak/RestQL.git","type":"git"},"bugs":{"url":"https://github.com/Adel-ak/RestQL/issues","email":"adelkerow@gmail.com"},"homepage":"https://github.com/Adel-ak/RestQL","scripts":{"start":"ts-node src/index","prebuild":"rm -rf lib","build":"tsc","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","lint":"eslint \"{src,apps,libs,test}/**/*.ts\" --fix","check:update":"ncu","update":"ncu -u","postinstall":"git config core.hooksPath ./git-hooks","pq":"pretty-quick","push":"npm run build && npm publish --access=public"},"dependencies":{"flat":"^5.0.2","graphql-tag":"^2.12.5"},"devDependencies":{"@types/flat":"^5.0.2","@types/node":"^16.7.1","@typescript-eslint/eslint-plugin":"^4.29.2","@typescript-eslint/parser":"^4.29.2","eslint":"^7.32.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^3.4.1","npm-check-updates":"^11.8.3","prettier":"^2.3.2","pretty-quick":"^3.1.1","ts-node":"^10.2.1","tsconfig-paths":"^3.10.1","typescript":"^4.3.5"},"publishConfig":{"access":"public"},"gitHead":"e52770f1a0c50c18171932c073bc87446acfec03","_id":"@adelak/rest-ql@1.0.0","_nodeVersion":"14.15.5","_npmVersion":"7.17.0","dist":{"integrity":"sha512-wBenIDsHnFPP2d5RPBY9w8gPsQttQVgOiOFlSdfgyva2AaMvnNc/o0AFiAiIj+X+mDwY6dy/ld2mkwDv1pjWEA==","shasum":"b199f02fb24b0b639d8d362be1d422ab99b5ad93","tarball":"https://registry.npmjs.org/@adelak/rest-ql/-/rest-ql-1.0.0.tgz","fileCount":20,"unpackedSize":32700,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJQKtCRA9TVsSAnZWagAAjNsP/2T3M8RroQkCcUwdISfg\nUtkSBL4OeNo6Q2Q2qf0N+eoAIcW2dhtFfsbJwCBM9Gbe4jzyRKM7tLOrlhSz\nvKt6ZsR8BNl54WygaZso4bcyH6SpZwxXB+s9DD6mieInWCinO81LTrV0iBUU\nBv6DqvwcpIWA1pYmKz2UGn1nLR5C7vNKMZiAkrZVXpajJZ41XAm8M1LbZQCP\n+ezCogBzeHDfqWqCs8vIEgtNyWMBMpJY3TbNXb9NxTfK0pW1F7a3Jw5bvFb1\nNWEpO1rYx0INPLKOJ19jEZe44YocS1/hQ5amDY23oFfHd6MJOuRIYJVQFgNo\nVWg4AQ5zTf4cSwIchO6josuhZ7V19iftwAKW73zoo3ULXeIq7dPGlMNvtqTb\nlFTbbNLOIj248nxBnZ0PzfTg9UaaUKd7Lj3vH50nUjlQs5+niHb0leVUjAds\nx/8VMPnS5q/ZCgxIdos/D6l1s5NGCi/kJJtVfaExHYhVBSie2X4ZFzrN06sl\nx037/c0G011FsIB/D6VaFgvjpCE8M0K9XM5nGBbT/mysfHuiK72SAvQ/XD8T\nveTaDVRwN3JxpbhIFsoztsN519otqID2fGd14wD0H1pukkfJhkM7S6zNwK8Q\nAv7fbWD3bMCJLYGsDXe5sgdKq3qaOXd+UxIs732NBnOeHRsKjBNZhJUwo5Vu\nLs13\r\n=sEwK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvwt+KUbussQ9cJMDLVNrD0+uB2R+F4vb4D5ZNZvfAlAIhAJo7CkRgq2Awvs+Vh8qF3OB0yRJAqdipeXiJlRDs9/Px"}]},"_npmUser":{"name":"adelak","email":"adelkerow@gmail.com"},"directories":{},"maintainers":[{"name":"adelak","email":"adelkerow@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rest-ql_1.0.0_1629815469430_0.17400927736145855"},"_hasShrinkwrap":false},"1.0.2":{"name":"@adelak/rest-ql","version":"1.0.2","description":"A qurey lang for rest api","keywords":[],"author":{"name":"Adel ak"},"license":"MIT","main":"lib/index.js","types":"lib/index.d.ts","repository":{"url":"git+https://github.com/Adel-ak/RestQL.git","type":"git"},"bugs":{"url":"https://github.com/Adel-ak/RestQL/issues","email":"adelkerow@gmail.com"},"homepage":"https://github.com/Adel-ak/RestQL","scripts":{"start":"ts-node src/index","prebuild":"rm -rf lib","build":"tsc","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","lint":"eslint \"{src,apps,libs,test}/**/*.ts\" --fix","check:update":"ncu","update":"ncu -u","postinstall":"git config core.hooksPath ./git-hooks","pq":"pretty-quick","push":"npm run build && npm publish --access=public"},"dependencies":{"flat":"^5.0.2","graphql-tag":"^2.12.5"},"devDependencies":{"@types/flat":"^5.0.2","@types/node":"^16.7.1","@typescript-eslint/eslint-plugin":"^4.29.2","@typescript-eslint/parser":"^4.29.2","eslint":"^7.32.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^3.4.1","npm-check-updates":"^11.8.3","prettier":"^2.3.2","pretty-quick":"^3.1.1","ts-node":"^10.2.1","tsconfig-paths":"^3.10.1","typescript":"^4.3.5"},"publishConfig":{"access":"public"},"gitHead":"b192a6e4da339eaa52183e1ab3a254680c628730","_id":"@adelak/rest-ql@1.0.2","_nodeVersion":"14.15.5","_npmVersion":"7.17.0","dist":{"integrity":"sha512-fL4NQa6j/LEN5ovFK8G6WDWZ/Vc/6cCtg9kQDxi2UX8qydDOJuXacpY8KOD6TqLlZisgug2Z5DrEvc1yMdNIrg==","shasum":"29e1e90da09f83fe0e16b16f13f3dd2218ad7908","tarball":"https://registry.npmjs.org/@adelak/rest-ql/-/rest-ql-1.0.2.tgz","fileCount":20,"unpackedSize":33360,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJQkDCRA9TVsSAnZWagAAASsP/3+TG02xsDDRhXNM/hri\nvOx9tssFtoyyAyhHuqD3VQp8LgGuX3zrtgeVtTPBl1Xh+GWfeRMAp0WfWyDl\nOzhvg6mPuz8TTfAnP6w4zTQfXTcr3X2ruUlJFkJ7tgVlM5q47nk8qXZaypyT\nERVgheaC+c0TzV0O0f7IaKYqGOpDD3gLgFNkNq55bEe4jhWW2xi2CsFea78g\n85wOV0V3E6w5DoUCeRdmzRces19RBIt+2RCM12QZhfLAz9cru+pBUxAWmxuB\nWijp16hgxb63yuLSKGL9cmGiR9aMpzVI3sGm0+cPgnF9srPoUs9iKUJ+KKq6\n7fO1Is1a76hM1ICv74cIVhdV6gCemgcec5s5Z/xJmkym6kPZcaQsQIHU7ndU\nP/xzBnVUUQ9FRYDACRYLV43Qin/jAOeFkIJJE0n5SxBng1WlulpFq4GO08wF\nQx2gEc9VXi9zNDe6mZN62u5z8icknp5ZsBb+ubpOkiVwvMnfKl1vseEBrUhq\nkrmNJaqvINymXxMCZc3JC7Kq99uPkvGlUToqkTIUN/q22EkySe1dYWFyY8E7\nX0Bbe34pAoR/p6YnAGVGju15iJGJfsCkezaLHchpdTkXjOGzkV+BWLSuKhNB\nZjWjiG5kQXapSAiaw3UkMJ4iSTtNfD7rX67+80Y7Oi2SRF5ytEH9VVvFu6sr\n22IM\r\n=Q5Iu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGUFK2mS2jG6y3cT1GyglxfN5qAdRBqP4C+cvdwQKZwCAiB/V+BD4QiRBSl4E0LN9SMJNPNusTVELgUe8Wu/R1ty7Q=="}]},"_npmUser":{"name":"adelak","email":"adelkerow@gmail.com"},"directories":{},"maintainers":[{"name":"adelak","email":"adelkerow@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rest-ql_1.0.2_1629817091232_0.7372164936355312"},"_hasShrinkwrap":false},"1.0.3":{"name":"@adelak/rest-ql","version":"1.0.3","description":"A query lang for rest api","keywords":[],"author":{"name":"Adel ak"},"license":"MIT","main":"lib/index.js","types":"lib/index.d.ts","repository":{"url":"git+https://github.com/Adel-ak/RestQL.git","type":"git"},"bugs":{"url":"https://github.com/Adel-ak/RestQL/issues","email":"adelkerow@gmail.com"},"homepage":"https://github.com/Adel-ak/RestQL","scripts":{"prebuild":"rm -rf lib","build":"tsc","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","lint":"eslint \"{src,apps,libs,test}/**/*.ts\" --fix","check:update":"ncu","update":"ncu -u","postinstall":"git config core.hooksPath ./git-hooks","pq":"pretty-quick","push":"npm run build && npm publish --access=public"},"dependencies":{"flat":"^5.0.2","graphql-tag":"^2.12.5"},"devDependencies":{"@types/flat":"^5.0.2","@types/node":"^16.7.1","@typescript-eslint/eslint-plugin":"^4.29.2","@typescript-eslint/parser":"^4.29.2","dataloader":"^2.0.0","eslint":"^7.32.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^3.4.1","npm-check-updates":"^11.8.3","prettier":"^2.3.2","pretty-quick":"^3.1.1","ts-node":"^10.2.1","tsconfig-paths":"^3.10.1","typescript":"^4.3.5"},"publishConfig":{"access":"public"},"gitHead":"485e9fd0c3c4f8f3c31ab50cdb38e43814960d34","_id":"@adelak/rest-ql@1.0.3","_nodeVersion":"14.15.5","_npmVersion":"7.17.0","dist":{"integrity":"sha512-GbnrtIrBaBga6KD9FIF655Cs6OXLQt6RscKiZuTEhyVStAkwt2bgYqSvxVNPe+tz5zuThH/oX305q9xOeo74yg==","shasum":"e332c3b8a471e4bd3f3b0e817cbc33cfb7d8e92b","tarball":"https://registry.npmjs.org/@adelak/rest-ql/-/rest-ql-1.0.3.tgz","fileCount":40,"unpackedSize":52386,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJU7MCRA9TVsSAnZWagAAVk0QAIzZvVSVp4i1N4u2O2UZ\nM3C5BKYpS4bW/KXCPnS7Vgj8X52z9/5K6bWEK5lx/qWUn6cRz3RGHY3GLxqE\nyvFgks3Aezyi0Kr6E8mFEeiwfpY782Qhc838xuUlrJYeacOoT3XMnfiVcYxW\nsvJz4N1Q8nd7wTQcUqzeTHk536FDyizTf5Th8ngblavvtAOy9R285hqrTs90\nljbMGhgpsG/Ba8yzrY6KOJZIcZ89nOgDd3Z1uMwwCQXo2fkEFc8J0QH+RsTv\nr7NSUJvVkUWhLQOQFNQ+bl8eH3Qhfi2qUcQfpt3eImRCyafB2buF6S4ILwsg\nHuqtN/NYrDmUrEhpAiqNTH0+F3TOrwAF5vnuMBghiLAnnRSD1OPW9QTNIvX6\ni+cAUPDtwFj/TWUG7pHp7VhBBULPJiROn6JelmMAkUFSr2Gc/FHVdWbpU6uo\nmm1sxgI8RVLVOFoAfxKEO2q/vi6J1l3s/nGuGq20aGfZ2wtygA5JwoKjKv2v\n9FiUaoI1gCABheHPMe7ukSV+P1LUX0VmIPjzxFw4TBLcHfcQmURj/dv04qPj\nuHMwRIwWPMcNCj10FhrdYuNJA4weFJF9TkqCKBxkodz6w323AyfnKxgercFk\niROYpGJJ/cvVs0t8hN6b01bGgZEskmvdpEwWEsTF9MGlu4giDkf6a3ab4fwA\ngZKz\r\n=1fEX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEtVpnc2DKdqE93fC8us3tVTjenRbz+3s3YQZ6uhfgW+AiB/E7Vfsap9tjrq8l/1hi26hPB5qvP17JJ4UkI2npuI8w=="}]},"_npmUser":{"name":"adelak","email":"adelkerow@gmail.com"},"directories":{},"maintainers":[{"name":"adelak","email":"adelkerow@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rest-ql_1.0.3_1629834955692_0.1301073129408008"},"_hasShrinkwrap":false},"1.0.4":{"name":"@adelak/rest-ql","version":"1.0.4","description":"A query lang for rest api","keywords":[],"author":{"name":"Adel ak"},"license":"MIT","main":"lib/index.js","types":"lib/index.d.ts","repository":{"url":"git+https://github.com/Adel-ak/RestQL.git","type":"git"},"bugs":{"url":"https://github.com/Adel-ak/RestQL/issues","email":"adelkerow@gmail.com"},"homepage":"https://github.com/Adel-ak/RestQL","scripts":{"prebuild":"rm -rf lib","build":"tsc","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","lint":"eslint \"{src,apps,libs,test}/**/*.ts\" --fix","check:update":"ncu","update":"ncu -u","postinstall":"git config core.hooksPath ./git-hooks","pq":"pretty-quick","push":"npm run build && npm publish --access=public"},"dependencies":{"flat":"^5.0.2","graphql-tag":"^2.12.5"},"devDependencies":{"@types/flat":"^5.0.2","@types/node":"^16.7.1","@typescript-eslint/eslint-plugin":"^4.29.2","@typescript-eslint/parser":"^4.29.2","dataloader":"^2.0.0","eslint":"^7.32.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^3.4.1","npm-check-updates":"^11.8.3","prettier":"^2.3.2","pretty-quick":"^3.1.1","ts-node":"^10.2.1","tsconfig-paths":"^3.10.1","typescript":"^4.3.5"},"publishConfig":{"access":"public"},"gitHead":"485e9fd0c3c4f8f3c31ab50cdb38e43814960d34","_id":"@adelak/rest-ql@1.0.4","_nodeVersion":"14.15.5","_npmVersion":"7.17.0","dist":{"integrity":"sha512-rgIRww+ASmEicIRr2R9u/Ng2oHUC5+fnQcmoiS5+kR36YfQxnoSRX/3xqvKuHDwhEpjXjgjnh2SVoEc0Mq//Tg==","shasum":"c35cf760c6b7b54fa27719517656150a8e5f8e76","tarball":"https://registry.npmjs.org/@adelak/rest-ql/-/rest-ql-1.0.4.tgz","fileCount":20,"unpackedSize":36018,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJU/gCRA9TVsSAnZWagAATEwP/jvKE3PGXMIv05wupjg1\nz9Bjf7ZZQ9oYi9PUyHzNCOOSjTaZbBakfj3NDlfbOCZsFIv2tN+aGB2LIEUw\n2KWd67eFLpPnPl0DolggwppUSKxcHYko0m4V0EwM9mw+xk8Vrl8daMBZL888\n4aejnYg9IkyHV9YjUZnEbsodmpp4gbPh90+mwdGWa7FStaKkOs6GcyLSVppf\nMJZglvFsTohkkXMVBzHZGn/aU9ZAx6FPGcgOJkZZSgPHoybpoxl4XvELshJn\nkYGWfRoWcKmr+EFYD/zVv2vKG6FAC3u6hQsa320whYaUQ9d6bUNpy4GSzF1E\nrQS5bg9YFR/QBwLL0s6U++QvCgh6Ul7zq58wH3GMpWqkboedSsa8m78hiKnF\nZ3N8xzbq8vnMJdwAn7PSp1ilB72ARcQwRGO4WOWe1kxIGkwnO5hWVdYfJlp/\nYiZEDHdOmP3Hi8/EIAhZWCg+fzK4u72R8C8N0UW1r3Pt1mqN0dUo7mzsq9EM\nD9KpkngTzE+f4jkSn4bNz2ebNQUFrh3E0+8so3ZDWUMqp9f9sU8XbB0RWpVJ\n7LaNmv4nleVg6EdeFcSkqBcBq4Hz7+4rzJf1d8DJswW/2f+h+CGDs99h2O8S\ntY5449hAQBZh6XyVtkkPQOeifADmOY8wj6LIdxnE5IKorR8O4T84qPPfCCI1\nMM4q\r\n=IWvF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNrWm6fcsDv3sIjqNSh7DFA78uGuk228og8gglvMwhiAIgLBBIQK9EZFFSgFKqGxoeJsilb/V7Dy+4LQ8wdbHyQ2k="}]},"_npmUser":{"name":"adelak","email":"adelkerow@gmail.com"},"directories":{},"maintainers":[{"name":"adelak","email":"adelkerow@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rest-ql_1.0.4_1629835232726_0.27852919768848783"},"_hasShrinkwrap":false},"1.0.5":{"name":"@adelak/rest-ql","version":"1.0.5","description":"A query lang for rest api","keywords":[],"author":{"name":"Adel ak"},"license":"MIT","main":"lib/index.js","types":"lib/index.d.ts","repository":{"url":"git+https://github.com/Adel-ak/RestQL.git","type":"git"},"bugs":{"url":"https://github.com/Adel-ak/RestQL/issues","email":"adelkerow@gmail.com"},"homepage":"https://github.com/Adel-ak/RestQL","scripts":{"start":"ts-node example/sanitizeData","prebuild":"rm -rf lib","build":"tsc","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","lint":"eslint \"{src,apps,libs,test}/**/*.ts\" --fix","check:update":"ncu","update":"ncu -u","postinstall":"git config core.hooksPath ./git-hooks","pq":"pretty-quick","push":"npm run build && npm publish --access=public","test":"jest --maxWorkers=1","test:watch":"jest --watch --maxWorkers=1","test:cov":"jest --coverage","test:debug":"node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand","test:e2e":"jest --config ./test/jest-e2e.json"},"dependencies":{"flat":"^5.0.2","graphql-tag":"^2.12.5"},"devDependencies":{"@types/flat":"^5.0.2","@types/jest":"^27.0.1","@types/node":"^16.7.1","@typescript-eslint/eslint-plugin":"^4.29.2","@typescript-eslint/parser":"^4.29.2","dataloader":"^2.0.0","eslint":"^7.32.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^3.4.1","jest":"^27.1.0","npm-check-updates":"^11.8.3","prettier":"^2.3.2","pretty-quick":"^3.1.1","ts-jest":"^27.0.5","ts-node":"^10.2.1","tsconfig-paths":"^3.10.1","typescript":"^4.3.5"},"publishConfig":{"access":"public"},"jest":{"moduleFileExtensions":["js","json","ts"],"rootDir":"src","testRegex":".*\\.spec\\.ts$","transform":{"^.+\\.(t|j)s$":"ts-jest"},"collectCoverageFrom":["**/*.(t|j)s"],"coverageDirectory":"../coverage","testEnvironment":"node"},"gitHead":"d7db71f8fd99bd56383dce1c22ca1893aa945d14","_id":"@adelak/rest-ql@1.0.5","_nodeVersion":"14.15.5","_npmVersion":"7.17.0","dist":{"integrity":"sha512-2J7Ro/KX0zQsfLpDDZAYh9PC1BtvYCfBurezFZ0uLo4X4S0hrLWKJ0oVduu/6D0+WJKY0ucVuSkRwlufbAqPzA==","shasum":"c3eff11717c90adc71fc309bdf28997f98ed994c","tarball":"https://registry.npmjs.org/@adelak/rest-ql/-/rest-ql-1.0.5.tgz","fileCount":52,"unpackedSize":66654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLVvTCRA9TVsSAnZWagAAHTwP/RGzFDx/fldfkso7fBxc\n5UKAx+KuZBEETczR8dZFZz3dJsv72Q4IE/lKGlYN+AmBD3dTWQzYMBvxF/MD\nnk8tohCA+57BzsUr75Kn9Ew51M8VwmyVvUWHVIyyXSR4VdlGxm0emm9sWwjn\ngQ6r29M7SqiwCO0uqPJy3LN5Qf2Q+I+6R9CmeiOInqZo5ZcPC1o5EnfSp0ry\n5y223pdF/dT8vsR5b0sl57rZ8zPo14VFqqA/8qLqsSNctFWPAKktILgtAtLw\ncCDXCOaGIEZD7d8i8A9wNvAs9I+qzMg88WgJnu/dyIkId+Wvk0ljqd6SctrC\n51ZuolSP+3PaCjVIR6RePAcuHjpD+nIkRS/juxROb3JFwGM94Q/IyqerV02c\n5ThTWsN07X9gGYW12zQLzFq67fyUmAd/f/ngkDTbFYm2eeCJJHikT+4kjUQs\nDLdxcAxRQBGZ1bfQvFivW3ED6TeAj6N5hQ0yqLuMsqTCBDwPIurHhCBAZwVE\nVLecgRu00KPw+chHfE3FfePQTeJAnPRElaWm8AQgFILWjE+iHXEw2rgP7B2T\nGvA2QRCl35GHmIQYuQRIGxurgjyXxhrMndmuYMILRWPD52l86FCtbS7voGZ4\n58senj8P3D/YNTyzmAKZKgwA81Z8j79kLK5vxYrWeg+lhcOrL6kWpRge5Z7t\nYn35\r\n=TRi3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCjxJsPAv9bC7RDUUlWh8nkAxrYV0+GhL3VtRtywJgBcwIhAODlM7O+ah61URvTjMD+U8J2PJK5lbEoNqt7pzjRxojn"}]},"_npmUser":{"name":"adelak","email":"adelkerow@gmail.com"},"directories":{},"maintainers":[{"name":"adelak","email":"adelkerow@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rest-ql_1.0.5_1630362579125_0.3144389782031993"},"_hasShrinkwrap":false}},"time":{"created":"2021-08-24T14:31:09.384Z","1.0.0":"2021-08-24T14:31:09.570Z","modified":"2022-04-04T11:28:37.176Z","1.0.2":"2021-08-24T14:58:11.368Z","1.0.3":"2021-08-24T19:55:56.056Z","1.0.4":"2021-08-24T20:00:32.880Z","1.0.5":"2021-08-30T22:29:39.278Z"},"maintainers":[{"name":"adelak","email":"adelkerow@gmail.com"}],"description":"A query lang for rest api","homepage":"https://github.com/Adel-ak/RestQL","keywords":[],"repository":{"url":"git+https://github.com/Adel-ak/RestQL.git","type":"git"},"author":{"name":"Adel ak"},"bugs":{"url":"https://github.com/Adel-ak/RestQL/issues","email":"adelkerow@gmail.com"},"license":"MIT","readme":"## Description\n\n[Rest-QL](https://github.com/Adel-ak/Rest-QL) A query language for your nodejs server (epressjs, nestjs etc)\n\nGraphql is awesome but at the same time it can be a pain, If you havea love hate relation ship with graphql and want to move on to rest api, but you cant forget about some of graphql feature, well this package is for you.\n\nRest-QL is a tool, which was created to help you with query your endpoints, it does'nt replace how your current server looks or run's, it just helps you return what you need and also resolve your fields if needed in a cleaner way. please view the examples to understand what this package helps with.\n\n## Installation\n\n```bash\n$ npm i @adelak/rest-ql\n```\n\n## `useSanitizeData`\n\nuseSanitizeData help in getting rid of the keys you dont need, which should should reduce in the amount of data begin send, just give it the your data from the data and your parsed query.\n\n### NOTE: -\n\nIt would be much better of your got rid of unwanted data from the data base level, example if you are using mongodb. use your parsed query for your projections.\n\nIn the event you cant, useSanitizeData.\n\n```\nconst user = {\n    _id: 123,\n    name: 'john',\n    phone: 12345,\n    age: 33,\n    address: {\n      house: 22,\n      building: 34,\n      street: 'Main street',\n    },\n  };\n\n  const body = ` {\n    _id\n    name\n    phone\n    age\n  }`;\n\n  const [query] = useParseQuery(body);\n  const [data, err] = useSanitizeData([user], query!);\n  console.log(err); // contains error if any (null if no error)\n  console.log(data); // [ { _id: 123, name: 'john', phone: 12345, age: 33 } ]\n```\n\n### Options\n\n| Key               | Type    | Deault |\n| ----------------- | ------- | ------ |\n| allFieldsRequired | boolean | false  |\n| removedNull       | boolean | true   |\n| removeEmptyObjs   | boolean | true   |\n\n## `useParseQuery`\n\nuseParseQuery will create key value pair which can be used to filter out unwanted keys from your db query.\n\n### Example\n\n```\nimport { useParseQuery } from '@adelak/rest-ql';\n\n//Send the body in url query or request body (up to you where it comes from)\nconst body = `\n  {\n    _id\n    name\n    phone\n    address {\n      house\n      building\n      street\n    }\n  }\n`\n\nconst option = {}\n\nconst [query, qureyError] = useParseQuery(body, option);\n\n\nconsole.log(qureyError) // contains error if any (null if no error)\nconsole.log(query) // contains query shape (null if there is a error)\n\n// query out put\n{\n  _id: true,\n  name: true,\n  phone: true,\n  address: {\n    house: true,\n    building: true,\n    street: true\n  }\n}\n\n// if option flatten is true object shape will be\n{\n  _id: true,\n  name: true,\n  phone: true,\n  \"address.house\": true,\n  \"address.building\": true,\n  \"address.street\": true\n}\n```\n\n### NOTE: -\n\n```\n  // if you are going to minimize the qurey size to max you make it look like this\n  -->  {_id,name,phone,address{house,building,street,}}\n  // make sure you you add a comma after each property else it will result to this\n  --> { _idnamephoneaddress: { housebuildingstreet: true } }\n```\n\n### Options\n\n| Key       | Type                        | Deault |\n| --------- | --------------------------- | ------ |\n| flatten   | boolean                     | false  |\n| Paragraph | boolean \\| string \\| 0 \\| 1 | true   |\n\n## `useResolver`\n\nuseResolver helps with resolving your data and change the shape of it in a cleaner way\n\n### Example\n\n```\nimport { useResolver } from '@adelak/rest-ql';\n\ntype TAddress = {\n    house: number | string;\n    building: number;\n    street: string;\n  };\n\n  type TUser = {\n    _id: number;\n    name: string;\n    phone: string;\n    address: TAddress;\n  };\n\n  type TState = {\n    [key: string]: any;\n  };\n\n  // data from somewhere, mongodb, mysql, lala land. it doesnt matter\n  const user = {\n    _id: 123,\n    name: 'jojo',\n    phone: '123456789',\n    address: {\n      house: 83,\n      building: 1,\n      street: 'MAIN LANE',\n    },\n  };\n\n  const addressResolver = {\n    house: (rootData: TAddress, state: TState) => {\n      const hideHouseNumber = state.hideHouseNumber;\n      return hideHouseNumber ? 'Im not telling you my house number' : rootData.house;\n    },\n    building: (rootData: TAddress, state: TState) => {\n      const hideHouseNumber = state.hideHouseNumber;\n      const building = hideHouseNumber ? rootData.building + 1e2 : rootData.building;\n      return `I live in building ${building}`;\n    },\n    street: (rootData: TAddress, state: TState) => {\n      const hideHouseNumber = state.hideHouseNumber;\n      const street = hideHouseNumber ? 'Cant remember' : rootData.street;\n      return street;\n    },\n  };\n\n  const useAddressResolver = async (rootData: TUser, state: TState) => {\n    // you can pass state from the root to another useResolver\n    const [data, err] = await useResolver<TAddress>(rootData.address, addressResolver, state);\n    if (err) {\n      // handle error\n      console.log(err);\n    }\n    return data;\n  };\n\n  const resolver = {\n    name: (rootData: TUser, state: TState) => {\n      // store any value in state to pass on to the next resolver;\n      state.counteryCode = '+902';\n      state.hideHouseNumber = true;\n      const userName = rootData.name;\n      return `Hi am ${userName}`;\n    },\n    phone: (rootData: TUser, state: TState) => {\n      const userPhone = rootData.phone;\n      return `You can get to me on my call ${state.counteryCode} - ${userPhone}`;\n    },\n    //you can also use useResolver on a nested resolver\n    address: useAddressResolver,\n  };\n\n  const [data, err] = await useResolver<TUser>(user, resolver);\n\n  console.log(err); // contains error if any (null if no error)\n  console.log(data); // contains query shape (null if there is a error)\n\n  // data out put\n  {\n    _id: 123,\n    name: 'Hi am jojo',\n    phone: 'You can get to me on my call +902 - 123456789',\n    address: {\n      house: 'Im not telling you my house number',\n      building: 'I live in building 101',\n      street: 'Cant remember'\n    }\n  }\n```\n\nyou can do more with useResolve, have a look at this examples\n\n[Resolve data with dataLoader](https://github.com/Adel-ak/RestQL/tree/main/example/resolveData-withDataLoader.ts)\n\n[Resolve data from array of objects](https://github.com/Adel-ak/RestQL/tree/main/example/resolveData-ArrayData.ts)\n\n[Resolve data from object](https://github.com/Adel-ak/RestQL/tree/main/example/resolveData.ts)\n\n[All](https://github.com/Adel-ak/RestQL/tree/main/example)\n\n## Support\n\nRest-QL is an MIT-licensed open source project. It can grow with your help by making PR's and issue's.\n\nFeel free to requrest for a feature.\n\n## Stay in touch\n\n- Author - [Adel AK](https://twitter.com/Adel_xoxo)\n\n## License\n\nRest-QL is [MIT licensed](https://github.com/Adel-ak/Rest-QL/blob/main/LICENSE).\n","readmeFilename":"README.md"}