{"_id":"@autoscout24/toguru-client","_rev":"10-e154359404e558f86c151a1a29d0417b","name":"@autoscout24/toguru-client","dist-tags":{"latest":"2.1.6","dev":"2.1.1-dev.0"},"versions":{"2.0.0":{"name":"@autoscout24/toguru-client","version":"2.0.0","description":"> A `TypeScript` client for integrating Toguru into a `Node.js` environment","main":"dist/index.js","types":"dist/index.d.ts","private":false,"scripts":{"prebuild":"rm -rf ./dist","build":"tsc","dev":"tsc --watch","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage ","format:check":"prettier --list-different '*/**/*.{js,ts,tsx,json,md,scss,graphql,css}' || (echo \"Problem with code format. Please do yarn run prettier:fix\" && exit 1)","lint":"eslint --ext={ts,tsx} .","format:fix":"prettier --write '*/**/*.{js,ts,tsx,json,md,scss,graphql,css}' '*.{js,ts,tsx,json,md,scss,graphql,css}'"},"jest":{"transform":{"^.+\\.tsx?$":"ts-jest"},"testPathIgnorePatterns":["/node_modules/"],"testRegex":"(/test/.*|\\.(test|spec))\\.(ts)$","moduleFileExtensions":["ts","tsx","js","jsx"],"coverageDirectory":"./coverage/","collectCoverage":false,"collectCoverageFrom":["src/**/*.ts"],"coverageReporters":["cobertura","html","text","text-summary"]},"keywords":[],"author":"","license":"MIT","dependencies":{"axios":"^0.19.0","bn.js":"^5.0.0","cookie":"^0.3.1","cookie-parser":"^1.4.3","jest":"^24.8.0","supertest":"^4.0.2"},"devDependencies":{"@types/bn.js":"^4.11.5","@types/cookie":"^0.3.3","@types/express":"^4.17.2","@types/jest":"^24.0.21","@typescript-eslint/eslint-plugin":"^2.6.1","@typescript-eslint/parser":"^2.6.1","eslint":"^6.0.1","eslint-config-prettier":"^6.5.0","eslint-plugin-prettier":"^3.1.0","express":"^4.17.1","node-mocks-http":"^1.8.0","prettier":"^1.19.1","semantic-release":"^12.4.1","ts-jest":"^24.1.0","typescript":"^3.7.2"},"gitHead":"a1fdcd6caaf843ec148d149bab44d49abe7514f8","_id":"@autoscout24/toguru-client@2.0.0","_nodeVersion":"12.13.1","_npmVersion":"6.12.1","dist":{"integrity":"sha512-We7bzXiedhI2MilGaSqo7zvgqgh/PlbtaepB2FxGzeg6012v/HI+/Ks0E8CbHNzO20ghkQOItM99u5PfKU3ixg==","shasum":"0b97f82bbf98a8df662e40908c809c8fb6099772","tarball":"https://registry.npmjs.org/@autoscout24/toguru-client/-/toguru-client-2.0.0.tgz","fileCount":2,"unpackedSize":7492,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd4LbICRA9TVsSAnZWagAAKYAP/2u8okK6B6vUBlXE8sOv\nUeKi30POp18F+N2MRnNbpGqvRVNEPB4OaD1+rpz+SLAI0ma5sLx1SZUH3PE3\nDYKtFV8rwdc3eRrQ5kyCcpT5gOKtLQmlFZa/eC+Xh5qcbdN5lamPT1rjQ5bk\nWL06FIiuRm6A/BAAwWThscoyeDAp71xpHTAeikEaqILOfikXPN1Ur26Aga6u\nsOTj3ieyHMkJQ0x9mkkzdtIaO+uncABT+EbStzgZ0DGWSL9jlktkG/8NzDJt\n9JnHO+ukrnEKuxFKmakQzbmibsL4/PoXnd/lnByVWwyDwv2p8CVhrhCu2WC4\ngLKHrF8fWXQLlxQtnzrESOfgVCSsondw66RjDwE6ARjSu5GySKGUHrj7NYui\nFjUrIjZc92npOEbRX4mhiuVtMwYDEbz7UG0LuvdDA2C5Hm6a6R/s8AH7rE0u\nhXloWkldClBw6Ukt+wmatIz0QZPl43odtKmCGay/ZHVEbXsNnBBER4nFbWlz\nif1LvBQpLBFnyy+Fbq9h3NM+Fi8pz8YxZKgVCNWyjQMFBtmC9uc/G7HPe8Ek\ny3AVobaKs6pFYZZkVHtKlg/t3m0aggrYMAcoDhL6VoeZaiQysYWdroCZ9wNi\nJ2riKc5TMbmnracwzywJpvs2Soe8+xnCiZq8qiCMRM614wXn13mYUQhqJWxF\nMBXh\r\n=aN8a\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDuM2it2AtYWvJKZWQmCk+AJE0G5m/Sx9yuFA1F6awaqAIhAP8c+mA/97MVwHgR+2wR01h+2vVMpxDu5LuMpDg0oOyq"}]},"maintainers":[{"name":"autoscout24","email":"#AS24-Web-Experience-Team-ds@scout24.com"}],"_npmUser":{"name":"autoscout24","email":"#AS24-Web-Experience-Team-ds@scout24.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toguru-client_2.0.0_1575007944436_0.9924136437891145"},"_hasShrinkwrap":false},"2.0.1":{"name":"@autoscout24/toguru-client","version":"2.0.1","description":"> A `TypeScript` client for integrating Toguru into a `Node.js` environment","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"prebuild":"rm -rf ./dist","build":"tsc","dev":"tsc --watch","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage ","format:check":"prettier --list-different '*/**/*.{js,ts,tsx,json,md,scss,graphql,css}' || (echo \"Problem with code format. Please do yarn run prettier:fix\" && exit 1)","lint":"eslint --ext={ts,tsx} .","format:fix":"prettier --write '*/**/*.{js,ts,tsx,json,md,scss,graphql,css}' '*.{js,ts,tsx,json,md,scss,graphql,css}'"},"jest":{"transform":{"^.+\\.tsx?$":"ts-jest"},"testPathIgnorePatterns":["/node_modules/"],"testRegex":"(/test/.*|\\.(test|spec))\\.(ts)$","moduleFileExtensions":["ts","tsx","js","jsx"],"coverageDirectory":"./coverage/","collectCoverage":false,"collectCoverageFrom":["src/**/*.ts"],"coverageReporters":["cobertura","html","text","text-summary"]},"keywords":[],"author":"","license":"MIT","dependencies":{"axios":"^0.19.0","bn.js":"^5.0.0","cookie":"^0.3.1","cookie-parser":"^1.4.3","jest":"^24.8.0","supertest":"^4.0.2"},"devDependencies":{"@types/bn.js":"^4.11.5","@types/cookie":"^0.3.3","@types/express":"^4.17.2","@types/jest":"^24.0.21","@typescript-eslint/eslint-plugin":"^2.6.1","@typescript-eslint/parser":"^2.6.1","eslint":"^6.0.1","eslint-config-prettier":"^6.5.0","eslint-plugin-prettier":"^3.1.0","express":"^4.17.1","node-mocks-http":"^1.8.0","prettier":"^1.19.1","semantic-release":"^12.4.1","ts-jest":"^24.1.0","typescript":"^3.7.2"},"gitHead":"1843fa0b0e18bf3cfff662c625070ddbc8573aa7","_id":"@autoscout24/toguru-client@2.0.1","_nodeVersion":"12.13.1","_npmVersion":"6.12.1","dist":{"integrity":"sha512-A5DgSdeTMUwAT1xYA/PqX+ENZRwc6LvBMARbd9acE8W388UoKeN7m/cnkjirm8ZafYUIeiI0fmMB6089c8LQbg==","shasum":"891f5cbd11fc1ed50e4c7ef3c14166846ca0676a","tarball":"https://registry.npmjs.org/@autoscout24/toguru-client/-/toguru-client-2.0.1.tgz","fileCount":48,"unpackedSize":75002,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd4LgUCRA9TVsSAnZWagAAao0P/3OAylics/PpTYczrlFZ\n/hvGny+mhjdVel9niYPHsWYcBxfgtFhh6UsTNSfHmduPXNp34zkyi3SIBcAd\n2tB5SgCiCNwVE4hO5M0vwrDetKz7f8RRB8v4S4eVWiUnEoLmGznBbKbS+IJh\nO0mz7ZEAKRVRXT2fQXu9rLw0qiW0PTKrx7hOBHw6aKy3/6ph3Ja3MlMmJykt\nuHtJhjUM1GXKa8cFsbqSwMDY2xCm/9HxjwCFD9F3bpdcw9eR6Jbup3NQMw4p\n9tP0Zb1Eqezgj8kSDYTqWKgY2jNFzzLuyEodwl1yaWBLpdrfrQnHESx5zGLW\nAyJ3KqZ5RoOaVkdnBPQwV2OQpR7Vuq31WA9zf5Y0y1XnSDwquhdpdeXswfrZ\nBLZd3xrys62hhLZvetRXWQ/1ZzwM8n3LPt1lifJOG+Evb1+eMD8cUnPHAAP1\nTnuKCAeY9g/Uw6pJ+21gr1IHWZSooiRaMVku5Kp6zuu7F/bSk0bywqy6m6Io\nuZHGxeC4G0kNibBUyYCw9PQwAV4IhM7bRd91cRhSkVPsw1+Bd8WphTM17j1d\nizapDKejXzepDKxL7g0/S+r/UjY9SZqDwu1FHFj9W3HQiDRT14xGPiEgmZW/\nPGFo8kIIpvtN9LqaJaaZwRcCYtdWnDU2HQVu2sksWhEs6SYB3UslGS6HSBqK\nq1vZ\r\n=7PGa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICntsmRGtjw+5hH4fxLJVTxVfV6fcQwwR0pn/P+wV8MTAiAwlAQPWtkIxKHLoJXvCMlP5dzoK11Ylkhxkf4PR/HnTA=="}]},"maintainers":[{"name":"autoscout24","email":"#AS24-Web-Experience-Team-ds@scout24.com"}],"_npmUser":{"name":"autoscout24","email":"#AS24-Web-Experience-Team-ds@scout24.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toguru-client_2.0.1_1575008275808_0.6618383925253815"},"_hasShrinkwrap":false},"2.0.3":{"name":"@autoscout24/toguru-client","version":"2.0.3","description":"> A `TypeScript` client for integrating Toguru into a `Node.js` environment","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"prebuild":"rm -rf ./dist","build":"tsc","dev":"tsc --watch","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage ","format:check":"prettier --list-different '*/**/*.{js,ts,tsx,json,md,scss,graphql,css}' || (echo \"Problem with code format. Please do yarn run prettier:fix\" && exit 1)","lint":"eslint --ext={ts,tsx} .","format:fix":"prettier --write '*/**/*.{js,ts,tsx,json,md,scss,graphql,css}' '*.{js,ts,tsx,json,md,scss,graphql,css}'"},"jest":{"transform":{"^.+\\.tsx?$":"ts-jest"},"testPathIgnorePatterns":["/node_modules/"],"testRegex":"(/test/.*|\\.(test|spec))\\.(ts)$","moduleFileExtensions":["ts","tsx","js","jsx"],"coverageDirectory":"./coverage/","collectCoverage":false,"collectCoverageFrom":["src/**/*.ts"],"coverageReporters":["cobertura","html","text","text-summary"]},"keywords":[],"author":{},"license":"MIT","dependencies":{"axios":"^0.19.0","bn.js":"^5.0.0","cookie":"^0.3.1","cookie-parser":"^1.4.3"},"devDependencies":{"@types/bn.js":"^4.11.5","@types/cookie":"^0.3.3","@types/express":"^4.17.2","@types/jest":"^24.0.21","@typescript-eslint/eslint-plugin":"^2.6.1","@typescript-eslint/parser":"^2.6.1","eslint":"^6.0.1","eslint-config-prettier":"^6.5.0","eslint-plugin-prettier":"^3.1.0","express":"^4.17.1","jest":"^24.8.0","node-mocks-http":"^1.8.0","prettier":"^1.19.1","semantic-release":"^12.4.1","supertest":"^4.0.2","ts-jest":"^24.1.0","typescript":"^3.7.2"},"_id":"@autoscout24/toguru-client@2.0.3","dist":{"shasum":"a428abd374c50e121f94c0e4499b5a520b6148dc","integrity":"sha512-RlZb9X4J+a4xfjGO3JJpUUrd1OwH9SRByLqf+ZW1b9Hrw4nm0DvufQ0BRsQuPhjHvZ7KE6uqWgWoHs96LC9olw==","tarball":"https://registry.npmjs.org/@autoscout24/toguru-client/-/toguru-client-2.0.3.tgz","fileCount":59,"unpackedSize":75015,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeVpbtCRA9TVsSAnZWagAAR5sQAJuuCzWcNauKXzgpNSq8\nYNIGAS3twfxg3+P+Lwo2k/98gC9oGyhi4JRu3Q1B3hY7sLv0MwZhrO4S5jfj\n/M39/hHpeSINqVv+osCG4+dL6zcsZ2ODZCIWLeKYXNczBf60dzzyPMjVqwHk\n9JhxA3bEm4KUIEQ+0INvb1+VFW/wCygsmdbBAVczHsGNql9z7NUxYOffohZB\nBUFsdqoAKYYppMQMirD/cCuDaCxPA0J3JdYyY8S3ATrbyV/MZP6mPxBI+4w8\nKSuBHxk0aBIRbNNi/nW6hbimqp+zGaBS40k+6Dx+kYdGfiuFkSRolzfdMN5h\nW43kRKk4sBCiC7FpReAr6uh8Pf7CSR+nO/jR64yVEdMdtoZDVvOXAqY/Y87r\ndfYCfmUweSq5NOW6NdK4kBW6qhXVw4Dja8qLTHpmt2kHft5NYwzuWOL/zjYV\n4QAzk+uy00AjdounAkbV9VCgz3/ZPLzYLAtyLVuBnuiZ6cM7GfgsIRXvl/70\nTK8iuRjOYI1uBO1NLo9jMvLBJMSYIDFrSbIOSATmPT0dhn1KE1V8u3+d0edn\nCJl/xpJLoUPcz33hHEs/HAse/ezulDE6e4gUGxMg2PYddZHGYINOdUh2Mm5+\nA198jMOAXnuoipGNJwKXiTzUV7oLZ4qcKtLBDjfKBxfI6erCIgRr3jt1bo0g\nNVmN\r\n=IGzZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJE+kqW1xspP59uMegPpreWPv0Yn7e20gXkYjjSTCeFgIhAONzGCNed1ZjF1qfpniEW25PTTZa7oSuwqJWdd/zVXgX"}]},"maintainers":[{"name":"autoscout24","email":"#AS24-Web-Experience-Team-ds@scout24.com"}],"_npmUser":{"name":"autoscout24","email":"#AS24-Web-Experience-Team-ds@scout24.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toguru-client_2.0.3_1582733036694_0.8997770297678083"},"_hasShrinkwrap":false},"2.1.0":{"name":"@autoscout24/toguru-client","version":"2.1.0","description":"> A `TypeScript` client for integrating Toguru into a `Node.js` environment","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"prebuild":"rm -rf ./dist","build":"tsc","dev":"tsc --watch","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage ","format:check":"prettier --list-different '*/**/*.{js,ts,tsx,json,md,scss,graphql,css}' || (echo \"Problem with code format. Please do yarn run prettier:fix\" && exit 1)","lint":"eslint --ext={ts,tsx} .","format:fix":"prettier --write '*/**/*.{js,ts,tsx,json,md,scss,graphql,css}' '*.{js,ts,tsx,json,md,scss,graphql,css}'"},"jest":{"transform":{"^.+\\.tsx?$":"ts-jest"},"testPathIgnorePatterns":["/node_modules/"],"moduleFileExtensions":["ts","tsx","js","jsx"],"coverageDirectory":"./coverage/","collectCoverage":false,"collectCoverageFrom":["src/**/*.ts"],"coverageReporters":["cobertura","html","text","text-summary"]},"keywords":[],"author":{},"license":"MIT","dependencies":{"axios":"^0.19.0","bn.js":"^5.0.0","cookie":"^0.4.1","cookie-parser":"^1.4.3"},"devDependencies":{"@types/bn.js":"^4.11.5","@types/cookie":"^0.4.0","@types/express":"^4.17.2","@types/jest":"^24.0.21","@typescript-eslint/eslint-plugin":"^2.6.1","@typescript-eslint/parser":"^2.6.1","eslint":"^6.0.1","eslint-config-prettier":"^6.5.0","eslint-plugin-prettier":"^3.1.0","express":"^4.17.1","jest":"^24.8.0","node-mocks-http":"^1.8.0","prettier":"^1.19.1","semantic-release":"^12.4.1","supertest":"^4.0.2","ts-jest":"^24.1.0","typescript":"^3.7.2"},"_id":"@autoscout24/toguru-client@2.1.0","dist":{"shasum":"837a7ce780ff8515c12a9cbf39bd24619ceac58d","integrity":"sha512-QQ48UnRQFMNhC7MHYtW+do8baLkndK2+Gb829FCmOd9uomzpzZA/ySljeQOpvuYlwfp9SYbJmkfP3vcCOYjlRg==","tarball":"https://registry.npmjs.org/@autoscout24/toguru-client/-/toguru-client-2.1.0.tgz","fileCount":59,"unpackedSize":72124,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8OZhCRA9TVsSAnZWagAA9ToQAIn9RvZ6aPAX4E7Y7EWU\nWSVmaN+uIw9o/lPXuEy9oyMvd0o8pSJICMgTs67/RGTul0Tq5wKFjylacvl3\nOpaa9LfpXmtixs3YeysR3FoOePxVBmlxXfyiYl9x01LdGoggpaaG2L97/Dtu\nAd7VGgV/QAeZsNiaJSbm4N0mCu9iGLaZrfkvI56mIHQEU1isBR625isgVuMw\nMXjkBgsq21WSg5+4DdbXOFEEJG8cINcT/8e5M2g6+nbAxBii81U+65hNwBkB\nd471ekEoH2dSZzGs33T8ZPA21k2IO7urN44G3BvxEjmCs60ISE3aAXHUmTHe\nAyX7E0YzkBCj35SYZim41JE6sNWuJoyRc20K4tnVo4nmGRSV4R9xGYspQtkq\nTOVRy5joGifdmOciVnmX5Y043+BqaYzYc82gsw4D/ZJ6uhp9ERbKdIG3K97M\nTUKA4/q/g+KC2/soQhC2guL/dZz33Y2X7QaVLFspeJmCqkwsiu9qZyuUiGfy\n9h5Ip4jnbkVzK0Fsh7ud3rXBEHdkwkyp3uwl+B3ULjbBQrt0Q82t4wxILRrW\nuNSSXC9U7dRlQFb4nlZ9IPMiD539DQDFUsZqNs58Y5ko0Bt+qmVQRUIerrRI\nf1wyESaC2hdAng+nz2O5H86ZsCf2o71qumx1NvQrrfyFEyZkx2ALAUcLU5ni\n0OSG\r\n=dNhO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZRtyH0CpeCWjtQazsLl1UX/KKH+QTynLLG+n+Y5SsWQIhAJzZ+uGgdJ62HwS8c+sdUORun4Xv/VNlWtsWivahQUS+"}]},"maintainers":[{"name":"autoscout24","email":"#AS24-Web-Experience-Team-ds@scout24.com"}],"_npmUser":{"name":"autoscout24","email":"#AS24-Web-Experience-Team-ds@scout24.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toguru-client_2.1.0_1592845920580_0.5078767742118213"},"_hasShrinkwrap":false},"2.1.1-dev.0":{"name":"@autoscout24/toguru-client","version":"2.1.1-dev.0","description":"> A `TypeScript` client for integrating Toguru into a `Node.js` environment","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"prebuild":"rm -rf ./dist","build":"tsc","dev":"tsc --watch","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage ","format:check":"prettier --list-different '*/**/*.{js,ts,tsx,json,md,scss,graphql,css}' || (echo \"Problem with code format. Please do yarn run prettier:fix\" && exit 1)","lint":"eslint --ext={ts,tsx} .","format:fix":"prettier --write '*/**/*.{js,ts,tsx,json,md,scss,graphql,css}' '*.{js,ts,tsx,json,md,scss,graphql,css}'"},"jest":{"transform":{"^.+\\.tsx?$":"ts-jest"},"testPathIgnorePatterns":["/node_modules/"],"moduleFileExtensions":["ts","tsx","js","jsx"],"coverageDirectory":"./coverage/","collectCoverage":false,"collectCoverageFrom":["src/**/*.ts"],"coverageReporters":["cobertura","html","text","text-summary"]},"keywords":[],"author":{},"license":"MIT","dependencies":{"@types/express-serve-static-core":"^4.17.8","axios":"^0.19.0","bn.js":"^5.0.0","cookie":"^0.4.1","cookie-parser":"^1.4.3"},"devDependencies":{"@types/bn.js":"^4.11.5","@types/cookie":"^0.4.0","@types/express":"^4.17.2","@types/jest":"^24.0.21","@typescript-eslint/eslint-plugin":"^2.6.1","@typescript-eslint/parser":"^2.6.1","eslint":"^6.0.1","eslint-config-prettier":"^6.5.0","eslint-plugin-prettier":"^3.1.0","jest":"^24.8.0","node-mocks-http":"^1.8.0","prettier":"^1.19.1","semantic-release":"^12.4.1","supertest":"^4.0.2","ts-jest":"^24.1.0","typescript":"^3.7.2"},"readmeFilename":"README.md","readme":"# Toguru Client for Node.js\n\n> A `TypeScript` client for integrating Toguru into a `Node.js` environment\n\n> [![Actions Status](https://github.com/AutoScout24/toguru-client-nodejs/workflows/Build/badge.svg)](https://github.com/AutoScout24/toguru-client-nodejs/actions) ![npm](https://img.shields.io/npm/v/@autoscout24/toguru-client)\n\n<!-- installing doctoc: https://github.com/thlorenz/doctoc#installation -->\n<!-- tocdoc command: doctoc ./README.md --maxlevel 3 --notitle -->\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n\n\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Base Client](#base-client)\n  - [Express Bridge](#express-bridge)\n- [Testing](#testing)\n  - [Express](#express)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Installation\n\nYou can install the library with your package manager of choice\n\n```bash\n$ yarn add toguru-client\n# or\n$ npm install toguru-client\n```\n\nThe client is fully written in `TypeScript` and comes with types out of the box.\n\n## Usage\n\n### Base Client\n\nThe library provides a base `Toguru` client that is independent of the framework or environment used, and can be used for `AWS lambdas`, `Kafka` streams, generic scripts, etc where toggling functionality might be needed. It allows computing toggle activations based on an activation context. For `web` application contexts, we recommend using the more specialized `Express` bridge, see below.\n\n```typescript\nimport { toguruClient, TogglingApiByActivationContext } from '@autoscout24/toguru-client'\n\nconst client: TogglingApiByActivationContext = toguruClient({\n    endpoint: 'https://example.com/togglestate',\n    refreshIntervalMs: 60 * 1000, // 1 minute\n})\n```\n\nOnce we have instantiated the `client`, it will poll the `Toguru` backend automatically and fetch all toggle information. The client needs an `ActivationContext` (`user` identifier, possible forced toggles, etc) which we can provide\n\n```ts\nconst activationContext: ActivationContext = {\n    uuid: 'ad89f957-d646-1111-1111-a02c9aa7faba',\n    forcedToggles: {\n        fooToggle: true,\n    },\n}\n```\n\nWe can then use this context to finally compute toggle activations\n\n```ts\nclient(activationContext).isToggleEnabled({ id: 'test-toggle', default: false }) // based on toguru data, fallback to `false`\nclient(activationContext).isToggleEnabled({ id: 'fooToggle', default: false }) // `true`\nclient(activationContext).togglesForService('service') // `Toggles` based on toguru data\n```\n\n### Express Bridge\n\nWhen working with a web application, it makes sense to compute toggle information based on the client's `Request`. The library provides an [Express](https://expressjs.com/) bridge that takes a base client and uses it to compute toggle activations based on a `Request`\n\n**Request-based client**\n\nWe can create a client that will compute the activation context based on a `Request`.\n\n```ts\nimport { client, toguruExpressBridge } from '@autoscout24/toguru-client'\n\n\nconst client = client({...}) // instantiate the base toguru client\n\nconst toguruExpressClient = toguruExpressBridge.client({\n    client,\n    extractors: {\n        uuid: toguruExpressBridge.requestExtractors.cookieValue('user-id') // will attempt to pull the user uuid from the `user-id` cookie\n    }\n})\n```\n\nThe `extractors` key allows customizing the behaviour, and will use certain defaults if not specified. When they are not specified, they will use `defaults`. After the express client is instantiated, it can be used to determine toggle activations\n\n```ts\napp.get('/some-route', (req, res) => {\n      const testToggleIsOn = client(req).isToggleEnabled({ id: 'test-toggle', default: false })\n      // ...\n    }\n))\n```\n\n**Middleware**\n\nThe library also provides an `Express middleware` that will augment then `Request` object with an additional `toguru` attribute. The instantiation options are the same as the express client above, and can be as follows\n\n```ts\nconst toguruClientMiddleware = toguruExpressBridge.middleware(...) // same as `toguruExpressBridge.client`\napp.get('/some-route', toguruClientMiddleware, (req, res) => {\n      const testToggleIsOn = req.toguru.isToggleEnabled({ id: 'test-toggle', default: false })\n      // ...\n    }\n))\n```\n\n## Testing\n\nIn general, we recommend parametrizing your main application to take a toguru client interface, and instantiating the client itself at the very edge of your application (typically `index.ts`). This allows you to use different clients during tests that you can fully control without the need to introduce any mocking tools.\n\n### Express\n\nFollowing the pattern align above, a typical `Express` application will look like \n\n```ts\nconst application = (\n    toguruMiddleware: Express.RequestHandler\n) => {\n  const app = express()\n  app.get('/toguru-test', toguruMiddleware,...)\n})\n```\n\nDuring tests, we can pass the `express.stubToguruMiddleware` or `express.stubClient`, depending on what the app is using, that easily allows you to instantiate the middleware/client with a given set of toggles, falling back to the toggle defaults for the rest.\n\n```ts\nstubToguruMiddleware([{ id: 'some-toggle', enabled: false }])\n```\n","_id":"@autoscout24/toguru-client@2.1.1-dev.0","dist":{"shasum":"ebe87a66f03436877970e8d2a0b355a2b609c633","integrity":"sha512-N9L84JkFsoFOoVj5+I0kKpvvkDcJdFC8YrSzwyPnFPYj1qA2EL2EiubsVBrMjJYSZTSCSOmPQ7FZMFRkmf7qsA==","tarball":"https://registry.npmjs.org/@autoscout24/toguru-client/-/toguru-client-2.1.1-dev.0.tgz","fileCount":59,"unpackedSize":72386,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe+gD+CRA9TVsSAnZWagAAoEcP/RTsNwl+dr8ngnf/dky1\n0csrmj1LaWkbKh+5yht+feOB0R11l9hkbAXkooa51ClATDkcjFYUI2rVoEXe\niRVCsUGUKub5gPdBqCuXwiQmpCfKhZH9hkqZEqDaTTvVsjgxjXMvObAL5JJa\nN79Ew2ZsUbEVEq5twgsL1dIVhFxrUD+JRKzPu9nYQUV7koxN7k4pRCJ5tehI\n5/GRJY7HvSV3b7j565CLZPP7ViGdbPP4MXAeL1dHd6430jeu60eXoyWKyfBy\nnBywTrYn6/lYwNen2xqh7/y+1qxAYEfkajuRyhl10BRJkLoJmh80O7mxJ+Bc\n4iA5b2+u5WwF9l+QYRxvKje81J8wcK67j4JDkAcci0V2N/aCPeBDCpbARMEe\nKVUslABnqvh1sdBfdWd/VYNopbXaxzoe2czLCIlB1NNSB1HX2NB2M97sLA/f\nWs+dXehGuKVaIXoPCJ5QwcgqNVbLu3lG0N8n+qm03guqN7shbBteoZaz1REM\n3iqIpAmnFCeSBAdNEKxLjxvV9Gw42n3SVLW9MfiN0bXOQ/3RDaUbZGrL7Nzz\nD32RKjHR3Vgm/8USkBvY6NEvgly3uk2qowYB3J8zSjQoW2hK41cGmKnMvjGT\nTU5sCvtsxGDQuDXb8R2nRPyO4rRDzjRAvlESTOtwu30ctxuQwX82ny8vs/1J\nJsG1\r\n=Z4Hk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFidVgVqFka6n6xq+7h21my4wRWwFnriQI6w7ECAJjvcAiAQcOakEFyMBaIWD2Xxxb/l2Hr5lbTNOMfJrLdHyea7zQ=="}]},"maintainers":[{"name":"autoscout24","email":"#AS24-Web-Experience-Team-ds@scout24.com"}],"_npmUser":{"name":"autoscout24","email":"#AS24-Web-Experience-Team-ds@scout24.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toguru-client_2.1.1-dev.0_1593442558332_0.7430092461639068"},"_hasShrinkwrap":false},"2.1.1":{"name":"@autoscout24/toguru-client","version":"2.1.1","description":"> A `TypeScript` client for integrating Toguru into a `Node.js` environment","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"prebuild":"rm -rf ./dist","build":"tsc","dev":"tsc --watch","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage ","format:check":"prettier --list-different '*/**/*.{js,ts,tsx,json,md,scss,graphql,css}' || (echo \"Problem with code format. Please do yarn run prettier:fix\" && exit 1)","lint":"eslint --ext={ts,tsx} .","format:fix":"prettier --write '*/**/*.{js,ts,tsx,json,md,scss,graphql,css}' '*.{js,ts,tsx,json,md,scss,graphql,css}'"},"jest":{"transform":{"^.+\\.tsx?$":"ts-jest"},"testPathIgnorePatterns":["/node_modules/"],"moduleFileExtensions":["ts","tsx","js","jsx"],"coverageDirectory":"./coverage/","collectCoverage":false,"collectCoverageFrom":["src/**/*.ts"],"coverageReporters":["cobertura","html","text","text-summary"]},"keywords":[],"author":{},"license":"MIT","dependencies":{"@types/express-serve-static-core":"^4.17.8","axios":"^0.19.0","bn.js":"^5.0.0","cookie":"^0.4.1","cookie-parser":"^1.4.3"},"devDependencies":{"@types/bn.js":"^4.11.5","@types/cookie":"^0.4.0","@types/express":"^4.17.2","@types/jest":"^24.0.21","@typescript-eslint/eslint-plugin":"^2.6.1","@typescript-eslint/parser":"^2.6.1","eslint":"^6.0.1","eslint-config-prettier":"^6.5.0","eslint-plugin-prettier":"^3.1.0","jest":"^24.8.0","node-mocks-http":"^1.8.0","prettier":"^1.19.1","semantic-release":"^12.4.1","supertest":"^4.0.2","ts-jest":"^24.1.0","typescript":"^3.7.2"},"_id":"@autoscout24/toguru-client@2.1.1","dist":{"shasum":"957148fd5e1576804fb6db1f00a222d48a4d4831","integrity":"sha512-Cy9g6qVBwJ+CUM61ELeRZqeu+ItMirmkl/XnOFjl9w++aLr0quQgB2iMRZgvMrD+ZOE/BdfmANW938T07ESpMg==","tarball":"https://registry.npmjs.org/@autoscout24/toguru-client/-/toguru-client-2.1.1.tgz","fileCount":3,"unpackedSize":7458,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe+0P2CRA9TVsSAnZWagAAqoIP/2NX7K/d5Tdp9CdwLEk8\nc0w30wyAThKdZqilbgMvrKpwMVg6BxMgaSRWmE4n1WybkEvtLNIbjVskAU+X\n3r0IQxMWSTC+cNDVPRuVstfuJaVFAEO66GEj4ath82Z78NNc58ifI7FCM6kE\nuzrGcjoT1GQ/MT8sG3ORvXrVz9DTwylixrAZ5uDdqch8O/+gnh+P/yA6AqMW\nZBvNiOefnzRzClfWJ53w/Wi5uJuBG6P+0I8q8cSxDiXDoUxTBLunOReVANg6\np+3OjVc3REfh/QXc58OyY8OleRtMk6EzHqQ1Vlx4+7EDNSx6GIcSEKCWXYFB\n0Ym7JyMCSFiYXzo3riWgKj2tJBdXJ4+hwo26H4nfGQ+y/CKCCBm7kWfC87Lh\n0dAatuRQJWM7Yh6srx8bg1mWpN7q/yUzWwCL1FJ+bKG3bKPSxrs2x7egNgFy\nIUMCDCZAE12jFBFtRncOtI6YddUMIk4QW8/I0W9MMe9Q/ZmIU3pjGo1eC0v+\nRynSyCoTO9HASsHOeWycEAVG29VtgafAUdeBHF74IzYPomhK3tILcNppxj38\nYdZXPvhwKGXIYc5zBKfLPd1eHt9EJA/1YkQRAonEvS1H1mtToSBjEJF9fXQD\nw8D2VyAYUisI9ICOaYAbQ9J0RpdCdoGww5wNxCDXZcNLYxYoriY/gpOA/JEZ\nh+et\r\n=pyG5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCFJQOsXseyneh3te+uIhl/aZhxGlAYfji3LDnaBEoiwIhAIfSgBHomjFwbBBb7Qiq9LbUE+Q8RCpbgi6y1/JbZMWZ"}]},"maintainers":[{"name":"autoscout24","email":"#AS24-Web-Experience-Team-ds@scout24.com"}],"_npmUser":{"name":"autoscout24","email":"#AS24-Web-Experience-Team-ds@scout24.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toguru-client_2.1.1_1593525238191_0.7742779446880808"},"_hasShrinkwrap":false},"2.1.2":{"name":"@autoscout24/toguru-client","version":"2.1.2","description":"> A `TypeScript` client for integrating Toguru into a `Node.js` environment","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"prebuild":"rm -rf ./dist","build":"tsc","dev":"tsc --watch","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage ","format:check":"prettier --list-different '*/**/*.{js,ts,tsx,json,md,scss,graphql,css}' || (echo \"Problem with code format. Please do yarn run prettier:fix\" && exit 1)","lint":"eslint --ext={ts,tsx} .","format:fix":"prettier --write '*/**/*.{js,ts,tsx,json,md,scss,graphql,css}' '*.{js,ts,tsx,json,md,scss,graphql,css}'"},"jest":{"transform":{"^.+\\.tsx?$":"ts-jest"},"testPathIgnorePatterns":["/node_modules/"],"moduleFileExtensions":["ts","tsx","js","jsx"],"coverageDirectory":"./coverage/","collectCoverage":false,"collectCoverageFrom":["src/**/*.ts"],"coverageReporters":["cobertura","html","text","text-summary"]},"keywords":[],"author":{},"license":"MIT","dependencies":{"@types/express-serve-static-core":"^4.17.8","axios":"^0.19.0","bn.js":"^5.0.0","cookie":"^0.4.1","cookie-parser":"^1.4.3"},"devDependencies":{"@types/bn.js":"^4.11.5","@types/cookie":"^0.4.0","@types/express":"^4.17.2","@types/jest":"^24.0.21","@typescript-eslint/eslint-plugin":"^2.6.1","@typescript-eslint/parser":"^2.6.1","eslint":"^6.0.1","eslint-config-prettier":"^6.5.0","eslint-plugin-prettier":"^3.1.0","jest":"^24.8.0","node-mocks-http":"^1.8.0","prettier":"^1.19.1","semantic-release":"^12.4.1","supertest":"^4.0.2","ts-jest":"^24.1.0","typescript":"^3.7.2"},"_id":"@autoscout24/toguru-client@2.1.2","dist":{"shasum":"7e3b9f75128efae7d1995e9f74460af77bcbd09e","integrity":"sha512-toetBzVxKCHVA+PVhYtIqF17ThRnXIN5QGbpsyzr5TgCYLE5FNO9es2eLZsLdlKvWc9CNkgO/00mQWXSDz3Y5A==","tarball":"https://registry.npmjs.org/@autoscout24/toguru-client/-/toguru-client-2.1.2.tgz","fileCount":59,"unpackedSize":72380,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe+0UlCRA9TVsSAnZWagAAumUP/AzCjAN0CRuLZvHWNMRE\n4Oc054TXAHeb16PXnP10fRSUwOkopbO6NdD49KLb6WSojhoE5TL6erqm5kM/\nL/99S/JHPgUgS3vbcaEnwmjcM7fu+yRtzJ6uhGq2mxzG9Msm5QPk1Jdwse+u\nHlqh4DPrqB4iziivSCfbNyT20i20zoCVSRor7HMxvo5vDiVK0hK6omjxBbdU\n/L2GVOOO8D1igbXwBRq1zpVUuIvmrf1ndQmnc/AD/wBrUJSsIHA63wdiaeEW\nsII+RZd4/5oYl5L8+eWOp4CeqSiaIZ2VFpHho3OBFJztjhNHKuqc4JL4Hj70\nH0qD4LCjFlnv6M47NDPGQJd0e0PfrAZnrOndYR8tQg7adB0gC8wl5w0hFghL\nBO3oMNHE/1+MvsvMwp+b0+fb524QzKKTz412lC3nzYVI+LN3IIvK3HHeKS8A\nHt1QbG077pebTHtkm9Q08RSfvSg13W5HDRlpkbf7maf1mD041Jp7WfZ1JWQY\nmbFpnm8jw+bi81LWtc/LBzrRuCcJSKXZBq00RKt4v3bESdBgTGHoPp4MLMzZ\nzGjvNtX/NgXXnOwON9z5Jo6OZnxNcr0/fgz+sfGhcALNBMDNX7+QFThz7Knl\nzYu/pqfkMrAaHE+a7cjzI9U+/jtJu5lLGM3h1FTY8EqT2DCoh0gG9UCRQ6wK\nbTxN\r\n=lZDq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAqOzVPhniDkgQm8p+xw8pROqRW4jaVfTt2YzEkV5EqzAiATiK0xz32DJpMvDv8ksQ1yvilm7XQZqkoDtnJl7lD4TQ=="}]},"maintainers":[{"name":"autoscout24","email":"#AS24-Web-Experience-Team-ds@scout24.com"}],"_npmUser":{"name":"autoscout24","email":"#AS24-Web-Experience-Team-ds@scout24.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toguru-client_2.1.2_1593525541458_0.49857531721309667"},"_hasShrinkwrap":false},"2.1.3":{"name":"@autoscout24/toguru-client","version":"2.1.3","description":"> A `TypeScript` client for integrating Toguru into a `Node.js` environment","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"prebuild":"rm -rf ./dist","build":"tsc","dev":"tsc --watch","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage ","format:check":"prettier --list-different '*/**/*.{js,ts,tsx,json,md,scss,graphql,css}' || (echo \"Problem with code format. Please do yarn run prettier:fix\" && exit 1)","lint":"eslint --ext={ts,tsx} .","format:fix":"prettier --write '*/**/*.{js,ts,tsx,json,md,scss,graphql,css}' '*.{js,ts,tsx,json,md,scss,graphql,css}'"},"jest":{"transform":{"^.+\\.tsx?$":"ts-jest"},"testPathIgnorePatterns":["/node_modules/"],"moduleFileExtensions":["ts","tsx","js","jsx"],"coverageDirectory":"./coverage/","collectCoverage":false,"collectCoverageFrom":["src/**/*.ts"],"coverageReporters":["cobertura","html","text","text-summary"]},"keywords":[],"author":"","license":"MIT","dependencies":{"@types/express-serve-static-core":"^4.17.18","axios":"^0.21.1","bn.js":"^4.12.0","cookie":"^0.4.1","cookie-parser":"^1.4.3"},"devDependencies":{"@types/bn.js":"^5.1.0","@types/cookie":"^0.4.0","@types/express":"^4.17.11","@types/jest":"^26.0.20","@typescript-eslint/eslint-plugin":"^4.16.1","@typescript-eslint/parser":"^4.16.1","eslint":"^7.21.0","eslint-config-prettier":"^8.1.0","eslint-plugin-prettier":"^3.3.1","jest":"^26.6.3","node-mocks-http":"^1.10.1","prettier":"^2.2.1","semantic-release":"^17.4.0","supertest":"^6.1.3","ts-jest":"^26.5.2","typescript":"^4.2.2"},"gitHead":"956f4f3a23346256adb4956b53deabc0af7a4c58","_id":"@autoscout24/toguru-client@2.1.3","_nodeVersion":"14.14.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-qZZRyQ0efGJAuTIafoTzzi0yDBEhEO2PCRtrGRzHf3JrJwGNyqK3uu5A22sMLeztFrG4fPglD54Ixbz70D6HKw==","shasum":"1f43798dc26aa57d822a0ded2466dfff0fc9a035","tarball":"https://registry.npmjs.org/@autoscout24/toguru-client/-/toguru-client-2.1.3.tgz","fileCount":2,"unpackedSize":7479,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPhWiCRA9TVsSAnZWagAALlYP/1TplYf2TqUe9tojlyvH\ng+Uz15pEK033NkY7K/VSCD4NOqvzqCeapfyDdvHJuVVi5W9xasHJWrufai0F\nVzLFHAhZJgm4gsX1EL0RovjqTBXW18SV6OfOhobTJC8yVVYrytWHUF6gqymi\n4DYxBBRrEWPweEwxsPTIMhezMwRbMSb9m/uf674mkb6+Jm4SmWJnI5eB3cYu\nR25aNKR7cuxMtftJBcYTO2uqsw9s9QriatVW8vQtwUhNLx9CVsFPhqpQ/t6y\n/E3+q651CZLgVBKRkOkd9/We0arUyRS3G+8oWKNxC/FlspoU0996VELL+Sf1\nOpGAbK2G+6AHysYgxLSyRH1a8a2WplTqTsSWzmFY2VUlaU1vlkNF1H9aOIZ0\nZNdSd+edRNKIV6mOOvM6xZDs1JNif5HK8HPn3DGDQfHEk5LcJxf7SSBIDfFq\n2DqAlektOCz/cg+t1rhRMQzuI4Qb7n/T9VVvFEKy0NqD9MOOeEIP7Qw1e6Sb\nZtCUUtczI71jDBVTwgUh7aXNDTTwS5jDzgW0/oE98cEkCXZwtgxnaGxFXgHM\nNcKQai54M0thV9E9N51pxSUsEH8be3XVTS2CWCWACJYCPY0VJSfVviGe4UEu\nS40oBeed0Pw5afQfttIq/5bKVr1XTGOtObVDFZcrlN1057/K4c1ZdxA1aWt5\n6mzM\r\n=GTRE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCrnv7zjl1hZAqBXZYQEwmYpmgq/+eLEw18GvwDCqr+uwIhAIowa2R8SIyk31U+ZXmG/Lqb3+ucduqTqY1GTWHOnKIJ"}]},"_npmUser":{"name":"autoscout24","email":"#AS24-Web-Experience-Team-ds@scout24.com"},"directories":{},"maintainers":[{"name":"autoscout24","email":"#AS24-Web-Experience-Team-ds@scout24.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toguru-client_2.1.3_1614681505408_0.3323399003602092"},"_hasShrinkwrap":false},"2.1.4":{"name":"@autoscout24/toguru-client","version":"2.1.4","description":"> A `TypeScript` client for integrating Toguru into a `Node.js` environment","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"prebuild":"rm -rf ./dist","build":"tsc","dev":"tsc --watch","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage ","format:check":"prettier --list-different '*/**/*.{js,ts,tsx,json,md,scss,graphql,css}' || (echo \"Problem with code format. Please do yarn run prettier:fix\" && exit 1)","lint":"eslint --ext={ts,tsx} .","format:fix":"prettier --write '*/**/*.{js,ts,tsx,json,md,scss,graphql,css}' '*.{js,ts,tsx,json,md,scss,graphql,css}'"},"jest":{"transform":{"^.+\\.tsx?$":"ts-jest"},"testPathIgnorePatterns":["/node_modules/"],"moduleFileExtensions":["ts","tsx","js","jsx"],"coverageDirectory":"./coverage/","collectCoverage":false,"collectCoverageFrom":["src/**/*.ts"],"coverageReporters":["cobertura","html","text","text-summary"]},"keywords":[],"author":"","license":"MIT","dependencies":{"@types/express-serve-static-core":"^4.17.18","axios":"^0.21.1","bn.js":"^4.12.0","cookie":"^0.4.1","cookie-parser":"^1.4.3"},"devDependencies":{"@types/bn.js":"^5.1.0","@types/cookie":"^0.4.0","@types/express":"^4.17.11","@types/jest":"^26.0.20","@typescript-eslint/eslint-plugin":"^4.16.1","@typescript-eslint/parser":"^4.16.1","eslint":"^7.21.0","eslint-config-prettier":"^8.1.0","eslint-plugin-prettier":"^3.3.1","jest":"^26.6.3","node-mocks-http":"^1.10.1","prettier":"^2.2.1","semantic-release":"^17.4.0","supertest":"^6.1.3","ts-jest":"^26.5.2","typescript":"^4.2.2"},"gitHead":"2f4870b0f37ee6560542c2d8d7dcadd5d429f9d2","_id":"@autoscout24/toguru-client@2.1.4","_nodeVersion":"14.14.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-iVFQWpG0N6PhPeBXujM1xkKgUyNodoAH3pN8wtzxJOxtc7yQFsDUn3iU+6OGj/m5eHCdM9Vtv8yi115a+YNMaw==","shasum":"43a4630f95d4feccbe198a316b9fc8336d022b0c","tarball":"https://registry.npmjs.org/@autoscout24/toguru-client/-/toguru-client-2.1.4.tgz","fileCount":48,"unpackedSize":72613,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPkIkCRA9TVsSAnZWagAAshEP/iYNB80/hz9ZGkUlKCsw\nZhGHtj+z8oc7cGxMtVR6BaVZDt6lDvPd4MhDReM+yam7nQ9RQ0j+iczdAzWW\ne0nU0tXahrNagZvljXj8E9nHNzehHlVhQorOUGFKXHU5BVPqKmDW56JYImve\nXpoc8lFhyofMh5UtGVVUhaHBb5Q7SsMGIvNnzwysu4mEK2Nd8xo166oeVxAG\nDGbC1W6O5TgcB78vAt2gK6AAfASbor2kW/8GxePL4qs00PHKj7Y1801SsvaM\nAYaoCCFwLHux3JjHNFhmQtDrk+EGg2GxwDXhWG8jAMC2zlSSP2VXZxzjzlZL\nyK63pSwnJY2W9fBr0UQmbEWqjsPAS0xjMzliDnfV3HIez9ItTGBETcN8/8YR\nMqZWUkkQb/tmTt203tJtzQHipAqIdLXvh8+h1aG9AQzIYuLIYBvqNSsX7IHf\nfUyESq9I+scj4ahHQbsbgYgec/68lkD4rXhT/fTrdr+fw9E2Rs8G9fGySXGw\nN1TJrbJmI2qH9P0s5PV91Tb4+g82uebh4Vwcm9TrpzNlAy5CmK5DalA0YlN3\nt7vwyER3V62cezi307Ihb0E+DlZVxgRjlfBIMi+3QrzhMdoG2rJFKHVKhSDX\nPE2w+nLS/eZ88WqJIOyaibFbOkVk21QMVqmVI0e7sxB9sBoi+1CeY7nGZI7P\n2hxL\r\n=36H+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD3qsO8yeb7zqK25vKqAEzJVL82GkUH00rDtieVEg0zgQIhAPcrgTG/xIvDqlRrrOhTAro4OlrgPYvM5zRtd/pqCj8l"}]},"_npmUser":{"name":"autoscout24","email":"#AS24-Web-Experience-Team-ds@scout24.com"},"directories":{},"maintainers":[{"name":"autoscout24","email":"#AS24-Web-Experience-Team-ds@scout24.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toguru-client_2.1.4_1614692900419_0.027660212108997717"},"_hasShrinkwrap":false},"2.1.6":{"name":"@autoscout24/toguru-client","version":"2.1.6","description":"> A `TypeScript` client for integrating Toguru into a `Node.js` environment","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"prebuild":"rm -rf ./dist","build":"tsc","dev":"tsc --watch","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage ","format:check":"prettier --list-different '*/**/*.{js,ts,tsx,json,md,scss,graphql,css}' || (echo \"Problem with code format. Please do yarn run prettier:fix\" && exit 1)","lint":"eslint --ext={ts,tsx} .","format:fix":"prettier --write '*/**/*.{js,ts,tsx,json,md,scss,graphql,css}' '*.{js,ts,tsx,json,md,scss,graphql,css}'"},"jest":{"transform":{"^.+\\.tsx?$":"ts-jest"},"testPathIgnorePatterns":["/node_modules/"],"moduleFileExtensions":["ts","tsx","js","jsx"],"coverageDirectory":"./coverage/","collectCoverage":false,"collectCoverageFrom":["src/**/*.ts"],"coverageReporters":["cobertura","html","text","text-summary"]},"keywords":[],"author":"","license":"MIT","dependencies":{"@types/express-serve-static-core":"^4.17.18","axios":"^0.21.1","bn.js":"^4.12.0","cookie":"^0.4.1","cookie-parser":"^1.4.3"},"devDependencies":{"@types/bn.js":"^5.1.0","@types/cookie":"^0.4.0","@types/express":"^4.17.11","@types/jest":"^26.0.20","@typescript-eslint/eslint-plugin":"^4.16.1","@typescript-eslint/parser":"^4.16.1","eslint":"^7.21.0","eslint-config-prettier":"^8.1.0","eslint-plugin-prettier":"^3.3.1","jest":"^26.6.3","node-mocks-http":"^1.10.1","prettier":"^2.2.1","semantic-release":"^17.4.0","supertest":"^6.1.3","ts-jest":"^26.5.2","typescript":"^4.2.2"},"gitHead":"ebbdc52061e47195f302c74e6d0fb900bf195123","_id":"@autoscout24/toguru-client@2.1.6","_nodeVersion":"14.14.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-vxrQ6FLRT9YkxjuZshl1TA2Z1qDOIERqpxN3zYq1VO1e+2bB3rKV5SvlRYRyxtrahGv0EX/ebLRTOIZ8YgGIAw==","shasum":"a924ab234a79951756fc0f5cc2a638cd815f8f56","tarball":"https://registry.npmjs.org/@autoscout24/toguru-client/-/toguru-client-2.1.6.tgz","fileCount":48,"unpackedSize":72613,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPkMqCRA9TVsSAnZWagAAN+QQAIH14GpgA8ZnEYRy067i\nzkiJ++iEfS90Ia7HnHFoqSvO6tey4Y3zXj0tPzuN89Gdw6nrj8fkJwXQcOMe\nbZ8AZdO8osnjON5FoZiqz662WuN9sMt1BrgA/QI5g4976vQQ9Wyja2BTwSD/\n99iTBtx1AMa7yBynecN6RO4x1mGPWc7ro0cKL3myfGfSPmpF/j/+gUvMp6DT\nyNX2WVfrffURggP/tziCVNsxOBQH4EvW0lIZ2kWTbucmgmXgyHEdkb3Gx4mU\ni5AzAhlzcupoxbVsZULmOtV79MD8nzqZDON0yi8Jxl8jPVc7S7r5cJwVZbPU\nF4nug7UQw5gwWr6AzXF9Rb8MYVvvS1HRy5eox8iVDGYCnZju7CzVknOyXjqB\nEo7G1G/O2jposbM2HoGVR5Iij3h4r7hGXeO485xpXJOcYxhCP3fNtE+E4Jl/\nIPrEpuKYrOuNS+iAYzMJdTbhkdwe8oAgL2qS9yBncubPdnPrKXJ0Oc4nloCA\nw2xGnw8LJAnTPYFs3aysK+5sGtHotHoHUL4TN0LeSMgMhZz1gE/VCvixgDCA\ngdLfAp2l9axjh+O61VP7Zo29jFGUaYduBUFybQZuTzTLaOZhD0Wqrwf7210g\nMwOu/C+YY6w45agJdXEMDhnBl94YUkYnmOit4nKsj/sAirNaD7wPxDwgSL8G\nfxfS\r\n=l3SK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUwdz6ObBTFM1zqw0cUPQSfkJrdJ1OzWzHZY+xKz087QIgXFhChk9+skP96OwOTA8VGCBLp06WSH/JF0zKZtRnnUc="}]},"_npmUser":{"name":"autoscout24","email":"#AS24-Web-Experience-Team-ds@scout24.com"},"directories":{},"maintainers":[{"name":"autoscout24","email":"#AS24-Web-Experience-Team-ds@scout24.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toguru-client_2.1.6_1614693161761_0.6477273018162997"},"_hasShrinkwrap":false}},"time":{"created":"2019-11-29T06:12:24.204Z","2.0.0":"2019-11-29T06:12:24.536Z","modified":"2022-04-04T16:40:44.214Z","2.0.1":"2019-11-29T06:17:56.037Z","2.0.3":"2020-02-26T16:03:56.858Z","2.1.0":"2020-06-22T17:12:00.832Z","2.1.1-dev.0":"2020-06-29T14:55:58.454Z","2.1.1":"2020-06-30T13:53:58.321Z","2.1.2":"2020-06-30T13:59:01.641Z","2.1.3":"2021-03-02T10:38:25.745Z","2.1.4":"2021-03-02T13:48:20.589Z","2.1.6":"2021-03-02T13:52:41.952Z"},"maintainers":[{"name":"autoscout24","email":"#AS24-Web-Experience-Team-ds@scout24.com"}],"description":"> A `TypeScript` client for integrating Toguru into a `Node.js` environment","keywords":[],"license":"MIT","readme":"# Toguru Client for Node.js\n\n> A `TypeScript` client for integrating Toguru into a `Node.js` environment\n\n> [![Actions Status](https://github.com/AutoScout24/toguru-client-nodejs/workflows/Build/badge.svg)](https://github.com/AutoScout24/toguru-client-nodejs/actions) ![npm](https://img.shields.io/npm/v/@autoscout24/toguru-client)\n\n<!-- installing doctoc: https://github.com/thlorenz/doctoc#installation -->\n<!-- tocdoc command: doctoc ./README.md --maxlevel 3 --notitle -->\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n\n-   [Installation](#installation)\n-   [Usage](#usage)\n    -   [Base Client](#base-client)\n    -   [Express Bridge](#express-bridge)\n-   [Testing](#testing)\n    -   [Express](#express)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Installation\n\nYou can install the library with your package manager of choice\n\n```bash\n$ yarn add toguru-client\n# or\n$ npm install toguru-client\n```\n\nThe client is fully written in `TypeScript` and comes with types out of the box.\n\n## Usage\n\n### Base Client\n\nThe library provides a base `Toguru` client that is independent of the framework or environment used, and can be used for `AWS lambdas`, `Kafka` streams, generic scripts, etc where toggling functionality might be needed. It allows computing toggle activations based on an activation context. For `web` application contexts, we recommend using the more specialized `Express` bridge, see below.\n\n```typescript\nimport { toguruClient, TogglingApiByActivationContext } from '@autoscout24/toguru-client'\n\nconst client: TogglingApiByActivationContext = toguruClient({\n    endpoint: 'https://example.com/togglestate',\n    refreshIntervalMs: 60 * 1000, // 1 minute\n})\n```\n\nOnce we have instantiated the `client`, it will poll the `Toguru` backend automatically and fetch all toggle information. The client needs an `ActivationContext` (`user` identifier, possible forced toggles, etc) which we can provide\n\n```ts\nconst activationContext: ActivationContext = {\n    uuid: 'ad89f957-d646-1111-1111-a02c9aa7faba',\n    forcedToggles: {\n        fooToggle: true,\n    },\n}\n```\n\nWe can then use this context to finally compute toggle activations\n\n```ts\nclient(activationContext).isToggleEnabled({ id: 'test-toggle', default: false }) // based on toguru data, fallback to `false`\nclient(activationContext).isToggleEnabled({ id: 'fooToggle', default: false }) // `true`\nclient(activationContext).togglesForService('service') // `Toggles` based on toguru data\n```\n\n### Express Bridge\n\nWhen working with a web application, it makes sense to compute toggle information based on the client's `Request`. The library provides an [Express](https://expressjs.com/) bridge that takes a base client and uses it to compute toggle activations based on a `Request`\n\n**Request-based client**\n\nWe can create a client that will compute the activation context based on a `Request`.\n\n```ts\nimport { client, toguruExpressBridge } from '@autoscout24/toguru-client'\n\n\nconst client = client({...}) // instantiate the base toguru client\n\nconst toguruExpressClient = toguruExpressBridge.client({\n    client,\n    extractors: {\n        uuid: toguruExpressBridge.requestExtractors.cookieValue('user-id') // will attempt to pull the user uuid from the `user-id` cookie\n    }\n})\n```\n\nThe `extractors` key allows customizing the behaviour, and will use certain defaults if not specified. When they are not specified, they will use `defaults`. After the express client is instantiated, it can be used to determine toggle activations\n\n```ts\napp.get('/some-route', (req, res) => {\n      const testToggleIsOn = client(req).isToggleEnabled({ id: 'test-toggle', default: false })\n      // ...\n    }\n))\n```\n\n**Middleware**\n\nThe library also provides an `Express middleware` that will augment then `Request` object with an additional `toguru` attribute. The instantiation options are the same as the express client above, and can be as follows\n\n```ts\nconst toguruClientMiddleware = toguruExpressBridge.middleware(...) // same as `toguruExpressBridge.client`\napp.get('/some-route', toguruClientMiddleware, (req, res) => {\n      const testToggleIsOn = req.toguru.isToggleEnabled({ id: 'test-toggle', default: false })\n      // ...\n    }\n))\n```\n\n## Testing\n\nIn general, we recommend parametrizing your main application to take a toguru client interface, and instantiating the client itself at the very edge of your application (typically `index.ts`). This allows you to use different clients during tests that you can fully control without the need to introduce any mocking tools.\n\n### Express\n\nFollowing the pattern align above, a typical `Express` application will look like\n\n```ts\nconst application = (\n    toguruMiddleware: Express.RequestHandler\n) => {\n  const app = express()\n  app.get('/toguru-test', toguruMiddleware,...)\n})\n```\n\nDuring tests, we can pass the `express.stubToguruMiddleware` or `express.stubClient`, depending on what the app is using, that easily allows you to instantiate the middleware/client with a given set of toggles, falling back to the toggle defaults for the rest.\n\n```ts\nstubToguruMiddleware([{ id: 'some-toggle', enabled: false }])\n```\n","readmeFilename":"README.md"}