{"_id":"@axmit/redux-communications","_rev":"72-e3c714254369a178ff3178a494b87d6b","name":"@axmit/redux-communications","dist-tags":{"latest":"6.1.5","beta":"4.1.3-beta.0"},"versions":{"1.0.5":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"1.0.5","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc","prepublishOnly":"npm version patch && git push && yarn build","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"devDependencies":{"husky":"^1.3.1","lint-staged":"^8.1.0","prettier":"^1.15.3","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"gitHead":"f808bda43cc6c9d75c07edb66d4bd43de60c9f7b","_id":"@axmit/redux-communications@1.0.5","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-r53hYBry1NnpPA8+NpCAF/CDLCmI4SkhiymDmQZNHNgW3LxVOVPyC6S7OmJN8iPwJO1n/QTxydg07P6J/OGrOg==","shasum":"96c88a68a84d5776ae45aa84951f2105f367e8dd","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-1.0.5.tgz","fileCount":35,"unpackedSize":113135,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcXVQ5CRA9TVsSAnZWagAAjdgP/j17X9pc1+DPKnfReSB6\nI/BGVajJjx0kQ4YjIxI8SwUbA5FBKgg7vZtB1Zzwz3XG18qtJ00ErJCtEmfh\nh8aEOD7a100P1D2VgGs0jmpdlWsWqvu3dh5EYoyI7S5XvLlkfSnZmddgkGt6\nc3EgYDY5i9ozNW1MGPQtR3IJM2zk+VnI00arArpXnp1+Ww4KzH2RT7eulj3x\n0EkEkpJZOYpeWvuHxj7ehKGppe4AcRKqyHDAUEW46Olq5ISmEzgzlmpcluqZ\nKgZVHCTwmSmqGSSnT9fvEoNETy1gUi1XWCSpFjuuFvKSMhDMCKirAn7WUhWm\nU5BEwmY8ZUKZwPu+st6ajn0gM/GCri7Hg4W4QhNI7mVtb/BgpBr3Ss9Y7697\nOdhHkm7WK1X/8TOmcoE0RgSVv1twV9bOJkPXueBiOie8AZm5MDwI5IuVu2kU\nJntTp5wP97z+ehBI7n0teFF15b/XChKC+zLbDS1KnNs85Wrpcv51EPcH5lwu\niop0UOItwNrxuggDDKUISl6nziuazh7U6WOtvPQcVTDoNKBrx3sb3wJT8cjD\nhGxYMUt0kCTLNOP3NshBZdL2xRWrDF32aYiGTXJlkPbHpdcVKcIfcor1CB4a\n4+OvYCziUGcYi/HBIiOlA33hAYE4d+zq0XVtInfHc3+KZBYPNekj8vDFuAwb\n1Ux5\r\n=7Jk/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDa0SGKNB9Qciuo3QCdcrGngkNhqLmrJq45Zey5JHXmQAiEA/8c8yrmANwFUR4hELz2Yeavs7FB2gM93YpZrrfeTwHk="}]},"maintainers":[{"name":"itersh","email":"ivan@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"axmit-boris","email":"boris@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_1.0.5_1549620280783_0.9996008770947602"},"_hasShrinkwrap":false},"2.0.0":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"2.0.0","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc","prepublishOnly":"npm version patch && git push && yarn build","test":"./node_modules/.bin/mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","_id":"@axmit/redux-communications@2.0.0","dist":{"shasum":"4b00f149733563837af6cc903b3af06544295310","integrity":"sha512-caFUgr4sImmex9mS/SzaMkHgOR5QgZerofQHgih8JcNidKDPnxvDqdH2iGCV0VrC8sqIGd3Izx9P085e2YEvWQ==","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-2.0.0.tgz","fileCount":18,"unpackedSize":27455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJceQHJCRA9TVsSAnZWagAAy0EQAJ2GbJAdms3/XcY0tfjD\nDXUWSkwTTR2zMkeKfVOU9dqjJUgxUalLeNxg0zd6C55MELECNBSMqXlUmS8P\nqRsCHqF+gy2I2omsWwaNZeppq8UYnNFfji6niXe/3kJZKEp/6jmEYMg2afHh\ngaNFrd2gURHiByMykwa5WwrZMPWfCWyeyRlDxp72TxWaPsLp7fzpo7KGbPar\nE6AhQE8giomSRog2aDtj570syfiw0EUEtEJCzf4JvZEP9Kl1cC3fDqJ0sxDH\nIpuRYNxUTyDmPbs7TPJExlN4dOaoFblPkdwFxSqwQtVs0nBWVo1khaijXtMo\nFWqFajOo4gJBeCE/13NsVazQBOdk7lDO3ZM3fXTjCyeZrhb8cp/I2NUmXAXV\n0vQbAsWXCN4yZ1mpZ0KnJPxMl5AbDpndZmxf+c7eyWyVlqk0fOAXfPfd0prJ\n8Snqd8Ejq/h8LmEInTxcD7Gj8xEqaQ192IjNbZgHEyHZKFWuV7gKdxOX5aJz\nAFfU56luJ1BIcph8jtKTwmYqdKOVNIT+xcqNq1zcdmqWCeDauuHEpVQPJ1co\nd/CFlMXf8zfx+WFZ3X8ZUVkJeVQUPq7Uol9sDrZ6X+zhiD8l1ZA/LA/cAq/X\nUKPU5lR29WcgWgotcrpe8t8A+kfYru1lP0bLyZtY1rxyntFqtIDC+Fz975cZ\nDWhG\r\n=hV41\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDLNUDoRi67dk94pRZ2lUXVmv3aSH1PR+unXCPZmf4gTwIhAK51fUUy/kd+OYRpCcKiOA3Axzf9TNso4oy00SH6r6y3"}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_2.0.0_1551434184738_0.1362095225762081"},"_hasShrinkwrap":false},"2.0.2":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"2.0.2","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"27d72920d59d91beac552b12eb5bb3acefa1393a","_id":"@axmit/redux-communications@2.0.2","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-WWtW/GbmKk8734IPCVKCLPzjAwyDcWjmCbyN3jE72SC10+w5EBuGPB8Sd6Y2ARXoHazJpK3ccvQAJ8zEpHtsxA==","shasum":"ce8f9a158e268dd74e087214e2a5e962446dd4c9","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-2.0.2.tgz","fileCount":40,"unpackedSize":143028,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJceQ64CRA9TVsSAnZWagAAWKAP/i8cgKtlHBQfA9mL/acQ\n+WyAfXSK9hHem2Z0qpGwa8jNbFoiBdl7sd3ogVkrKkjGfBkmK7iPwGdoh305\n6cvD6lMcINfB+wpzutzcxFTXjcVBnKx+97/mMZnldizRlEprgNThdHCLemzM\nMaJeY3z4Hwc0tKVuqh20tszaz7lP5RwHg0v50lB3ZTNTr2NL7u9s43Kd3qB8\nTFGHMilOgWrDvIEHHcH6zij9z90pbZV6tZjx8ad8MA9uAVZos63YXC53Ugpz\n7eE765A8uUk+pQTCoOTxB5cJyjpMLmvqzkWb+jTGky1HjiPpiRyqwfwnQCA5\nEsRdrCrKLnbAqAGPlti1xf6SnizcPK61PZUt2WjzUxYCL2+oLnUh5N3c9Up0\n9PBDz3zOvo11BGe+hfnXzUV6LS0Ne0uqZ6PSkOBj1oyb1u7oBkCSqj9hhRHE\n8FmiHzxludJeEJjBIXIraOgqbDPXpFHQiY+Br4m+08X1DLhtvcVf/myvh4z1\n1erfDwKE47FRAPmdhkywWEv7ko+vu0Rj/WSii/11y76MJ2WaB+ebQAX1zIo/\ncoFQAVyZj/ROUUbGJrLZ+u4g3iEhMSA5PeTPUh5+NKvvyYgLA0QtN1qZqKwt\nO7DLcnII1wXWw9juBWBT7N+IWjwv9pJ6iVzV/lrdU5KrJqCIhsYJjBFE4ADT\nNiD7\r\n=cBUk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEYZ9h25vYpg3WXbmlOT4YhNp7cW+eRILOZvgKXzANmfAiEAnH/WtUpVmm0Gw3hAl63MnEab6rT7k5EuVC3lih6rq+I="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_2.0.2_1551437495407_0.3851314979523217"},"_hasShrinkwrap":false},"2.0.3":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"2.0.3","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"7e21088b2ccdb889d3a06544e0eff06f8a65fe87","_id":"@axmit/redux-communications@2.0.3","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-wQ4iihjv9RuleR8IwoxUgdDBzSH9IRxMV7TvMMyjOrlLBZjmBQZlPnQzTaAep2Sdx5FluH2tp9EibxaNek5Jaw==","shasum":"559f453b34062f6e1943b8e369f6a8dea21a00e6","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-2.0.3.tgz","fileCount":40,"unpackedSize":143042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJceRANCRA9TVsSAnZWagAAZJEP/0gxiuq6xp7kFrIg+p9B\nf2grX4HvHuMUuh8rYV/p8XbnThmyvkR+Y+0FBzLUIereCLeH+5bFOq0vor5W\nQUUcvn7YFCk1R1S34lSWoWtCyniffVTAjTuvgIvXeAYl27GDXRrPcJZKGpVV\nrydG86GwPR4ibiMa8m5lIYHa4Qpk8YjRMG3144wjZaKOoRBHTckyOL+C46dE\nYE3qWqu4h2tNaEXg9WGKXtGGYqP6HRLog8hpgngpe/ieHmv1geCIhMDxa7g+\n1vZpKyIsEBLYWFxzzABsOlH5Hi4KAyiFzQz/NUjgI1qYXwS0D/8y4oDlryjw\neyLp0rekiszBGE9SNXVtt7zZmzQ7Kv/kWhAdvtZOa/ZjcAXgfOwkZ6yJcH8l\nx1vHflTTpi9ZpN0S5bgz8gduL5Ql/+z4U75/rqTKOuFsg5JMOuS7gAkZCo91\nrsFDTfS5xKnIxGShR/+CBurhw31L0crMeFWZk5K9A8n2EKii4bvAdF5yQMox\n7JRh2czTc1+8ZqFg84JCnHzlEMdUs+AYgk21ivRjGDctK+fVHb1KVobK5Hbq\nFJ1Apy/pzxXlKu7iH57ORle568uiniG0nhRFvQcTsD7VlSnqo1F+Y/Pkem2c\n++hHakBeoTkXE9vYtfJVKm2+kV34losEDniGmgkBjIuBLxakrqp9q9T+GxbU\nzO7R\r\n=cztq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDeSc0MqbaeP6ft674Pn1H9H9zK7xu7xjQt3YqlzXrgGAIhAP+Lqcb4EhwX2eu7OL34s2Nq6hHXJjdU0xIkGSw7nNNY"}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_2.0.3_1551437837334_0.12143225133061186"},"_hasShrinkwrap":false},"2.1.6":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"2.1.6","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"40db1a2afb1f9c6d76c73effd238d3b196b2b806","_id":"@axmit/redux-communications@2.1.6","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-o8CBCf0JamPj/2bT6h1HXiDZ5m3kRxNd7+nmklsofn7ZeAsERdxDi2F8ON1uR25Na50MwvhtAegqVWe61Q7w+g==","shasum":"9d49870665c876f97bba20b06fbd6b14cff87b40","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-2.1.6.tgz","fileCount":40,"unpackedSize":143848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfk32CRA9TVsSAnZWagAAE5MP/35HIwMBeKN/cwlAvVai\nUWbNqNiM4nfa9g3h7ZQSce7UKe4Ael8q1BmentDtLS5cyuC7/32S2JisXVkc\niMnlB60VnK2NlxDeXxcbhDFtlgFo+eIP/rkjzCo6Y6XYMNs76T7hReX4KZvS\n7JB03qJSbckcucv4Z0l24kHY/YoherdPAUSp9qH1D5snUo2u5piRnLpBii8R\nSvzbNUHIYnDu6iFYgcFyn7wKYm/MLvkEjHO918iQuNcqhLdrEWmJpCSuJH08\nHqFWvT2A8x1bCOut9xRxbmLFIotZU7XfTucOFrLz7iMbRCmEZPw1nHK9tDud\niIR/KH7RSl0uveMlgPL6ytZK2CWjnzzoUkqvpJEbg5exrYsxD8pdaKNa7aZ1\nbtGQOQEVJGpIPWd2uUkYczu6GLwjZ7X/W8VG0bifhsWp8jNf4lcxND0oiB+V\ndGLxiXatRrL3xKtyWRMgl4iO3sHqaXK/H0+8SfgRtiFPXKX8lxcOafbo3gG4\nqxAgnlat/PWNhapKmLuvKeHPPNgatYG7ORvcw3m/kd3vY1QfwPnGMw++Otde\nvIoRIROcXtRozfoTaUub/JJJT/QxhFL5gox2XEVWTLDM/r1AHiYuS2GDkTw8\nvri7J0ysQP65gMraY0rWoB+tPan9y1eUIjltPYcnwAorP9u5mDrKjj1FTMmD\nkIle\r\n=T+4G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDfSQdvPyB7RYoyMJT1YLzXnMmSPQ2ZCAnwSnXwzP31lwIgIjErxk5rcLSWyTIO70O7LNGCdMW1tLwVR1rR+7bz/P8="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_2.1.6_1551781366125_0.8796646182176708"},"_hasShrinkwrap":false},"2.1.7":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"2.1.7","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"9ba242cf20b1830c19edb457b7f0a6e5956fc679","_id":"@axmit/redux-communications@2.1.7","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-NO5myNRgk/qVtcLUK0EPmlfFErdMqaTBEbsu/GDMgX1QnUX5VH8ei12bOkfGy9z3Sn4YO73vMEr02cD5wlHqJQ==","shasum":"29c20e75c86e44e2297ba8455bbca9a0e9f8e598","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-2.1.7.tgz","fileCount":40,"unpackedSize":143855,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfk8oCRA9TVsSAnZWagAA4goP/RarqnS+SZEkAWpR7exG\nT2pyQf86KaCr/FiShEqeM7w8N0hefEomb1fQVb50E1lWfD/3LZNBIsUfgp99\n1OO5sBxXX4MRJa3nmCd3izbeiWGgegJc4UKtxozMm11FKzk/aowPdUbQC1V5\nRm97E9a72jaanfc9rhkpbiKHvO+LXEIFWR8CMI3WACwygF019yFbIKWbma+C\nxjW6jCkGBvjX8B00Afpl9XC2/Ka/aCBLPc5RSks8SYs0fdL7ME9KhAop8UzA\nzCR0TnAQRisIfqcmyNba+c97+Fn8232X2Jx3+tr+KK/ambEIh64nJ4Wz2kL3\nOTM2ZKZNp7iNwnVZWRi6Q094/qkJBUQ6cikL3EInkKQi8Rikc+YuY8rEvzWm\n60mOt31K1uoPjH4bUPFKr92Vq35998WHWy3B/TA8p8Lce6Phypuamgr7V29k\nVFab262j4gsVh1hueVOU/noQQLI1qlvrkcck2kWznhuTzagt6qQMLD7Hca5c\nMEhYUn11/Va/9lSZRNtGcl/aSXYEEQY3zfj3SJzaGAi39esT/+gOcFWAnCr3\ng87NPgCjPGB2TM1/mQt7R+zdirBbdWmubSVtdK9QcpEHTdQFpOwQuK09uck1\n+euPnQ/FaFasev9I5CkCPNBqcveqMC0hFRKBXCJn3p5w1U2r2gNyJceLfice\n9baR\r\n=av7p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICQHRtHADz+vQPY2WhA53BFfDMhHQ+ejtxuLSSiSMXRrAiEA7SYB6aKs+6VeQFfCOgG9ry7ziGH9X5Lnmz7IKCluE7E="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_2.1.7_1551781671271_0.7034417067198733"},"_hasShrinkwrap":false},"2.1.8":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"2.1.8","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"fdafe20aa98fb777aeb0813df1ab9e6c92137211","_id":"@axmit/redux-communications@2.1.8","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-15TioFoEWZjlAs//c3TXFpBvf+kiBcrxKBn25sCuzVoXHXCfXsqq+o1KFacDGBTGZs/1q/gbeMjrncJjma9WOA==","shasum":"8251bd1ab534b76b6da6b5125ddccb22b02fa3bd","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-2.1.8.tgz","fileCount":40,"unpackedSize":143911,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcflAnCRA9TVsSAnZWagAA544P/2jAgfaMVz8kxMegndgx\nbDrQlXWzoB1BAV6XRlfsbnH1bkpc0JmtqkMWD3khqL2EmU6oIPpzQuhg6+6b\nmrGsFesF1UKjeKs3sJw8FI6duobgyqTxO+eCtP1uCI0W4pri/+t+OliSaRnd\nfe6XHhQz/MZ7OlY/1Q18KecjBxKAIntfSqHAq9nTuIDxX/eXE/Nj3D9oYtus\nLMI19qBl2+UGe+WSdQSd/zheeixFmJHd9cnXZitMtdWfY63WcOTtfyRph+cv\nshOSXvrmsed0nxbnXLbqKs3i2Db5b6VxweYBahlxHy5o4FPma0XwANDzX7SZ\nq1xN4pP4UwpAVwCNBoelZBKhEvH7F1/ABBAUS1lQei8q8njabqTqAsbwSDtM\nMNfVZpET0kxCfvh7KBDTfsHyX3aAny3SvaKdUBMsHMyMQ9rjsFxWVMwzgCy+\nmXzwnbklZUF/fImqJhY/W96Yv6LHYsUh9aFO/qeQFuJBwYXeZ7D5TNMw80PT\niTSF5gjlf8pvdkmjfMTs3Q4XdRssAY7lH1i/l/NXHRl+xjqu0Mc6YJ5+BNSy\nmi55Ifrk9uvg3zDBPfJtUOLIvI9lleH4cRPjCoVmsvDC0TGdtdCDxUQOH6nU\nDrqFApltL0hZr/k4ilrlPCrtNKAfWIvK8hY7p/tR9DAl27puuMBel66UbmYt\njeC3\r\n=MXtr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFxkaiOCWUGdm0ya0geX+d+v+ejQRlOWWPwAktetYdHsAiEA4YIwwmKEgUTV9+kV9FCUTUiOJMgAyWXghBXU4LjV2xk="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_2.1.8_1551781926914_0.06242167788751529"},"_hasShrinkwrap":false},"2.1.9":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"2.1.9","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"e26bb19f43c2cb3131a9abcdc5ed0185addd6d56","_id":"@axmit/redux-communications@2.1.9","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-6t5vXYL12Htx+lhrWz3ARzzLMy8VWQAhTGqkR4cIN6JuC/cuovtG5bIu8xPD5kz9JwoccX4CtdfHVONE0OQlIQ==","shasum":"dbe2f2227270e7e5aab523be97075b8e0e292d93","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-2.1.9.tgz","fileCount":40,"unpackedSize":143808,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcflRYCRA9TVsSAnZWagAAOVoP+wUd91E3o6/zO4P7wbOf\npFRbzZQxizB7d3Elu/Cs4/p6ohqyHoFLIXv39h2L5DAwr3soY8FwhwLEQcYJ\n8/4iXYUAtMfQYonp72YWsK7JOs3UzTtB9wySl/tqTm/j3C2mI8cPvkknbfAU\n+8/3hFkekDr3fkhe3OhqmOJHxvR000D+x91Qag+cyc+LBV6UcJD8hKnDVhtN\n8ML55+b76i2+HHzEqlBjyxH0MU2lCecq0potFEE+f5+YXiHZKls1mhCDdNMp\nJYYy4HTK5IrvTdWRugPVrlKTbh3leAPSmmg+uhn8ph/TZ3o7QQpCfdpCtBz0\n/xtIAkGdeBPlhtPns1Q3raH/VmO6ideJOpftWe08CUJ30jNuTsRCtHsPManS\nctNK49b6tHLktmV5XjPLn82w0R/7IsFKMPaYCKUzJSXrbBOaU2en1G/isiof\n7xulQACr6SJd8wzxlj55ytedBKrM+Yzh/CqoA9UBntHpBt/NqnN16x2fu2SY\nb/M3z0xrZ+Ee/saJgu4NKcV5ly/l+ORghVvU6Kk9uVvyWDToGDoyW3U3zR43\npiLddk/r786Uftari85dqswNrOG1VwNqt5graakS7grRI2uVgQU/PJMieHwk\nlK/Oz4pdZ2VerDxGnmp+AAUIEdwE4aNTgbkh8IcQXhf7DVnrFxB+1IxcgPAs\nHkA/\r\n=4Z+t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCu6JHNXZ5UYeHFQzHuHN+L5b0OGBC2/f8OsrpTrVBI8gIgEbfaksFi2FfRDFTTrOHA3mWc59nneAhSGiZXvENAcXE="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_2.1.9_1551783000088_0.6281278538626129"},"_hasShrinkwrap":false},"2.1.10":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"2.1.10","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"671baf944e1225f958a452bc057d168a892d11aa","_id":"@axmit/redux-communications@2.1.10","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-XQHZXU1yWED3owsgaYcx4AdtyJSBS+/cZrPBTw5/KsgX+nNCXuNWB4DNgsw/GBz+4JVfrF2MhhYLn6V6RehnHQ==","shasum":"d91770dfcca7728f302a85fdb3dcb20daa32fca8","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-2.1.10.tgz","fileCount":40,"unpackedSize":143810,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcflatCRA9TVsSAnZWagAAhqQP/1bsblQBubwNcAVkZ50Y\nTSJTV7xDPMhqJpXg2BJXaeEFsPs+98tj9kXGVGYt3bZsxiGGrk1Ep9QALU/M\nW2nDPO6++Gt3JC7f9/cyyf0O68l74AENYlCY6abOPrFnmUdPBVhyPatK4PmQ\nkYjShGyuT9rUCuvHoSlfXi06CJt5/SPQFnm2/fVlVvAVvCnE/Un78ZuC/Wk0\nP424QmgbkeH0gexe7vLObb+R5i5atp6jXGF4F6JRi1ee27zEhORIkr9uEuFL\nUkajdTktiaOhRLPBM4uLIWjOxA8ON+IDzgNjiMCb4F1LtozPqXEmwxt18rYB\ndH1xgNp9jlgTnXBNmnGrxOEtqHTjaOWpiFeGHnHnQ0Az7Wej/UmjFDW1c3LA\nEebPU9JJHvdnaLTSmYfWUoJ0N6JT3tmmLbuBSZEWr+K7Vytm9IWr7ew9pdvA\nKPtIG5m7d9iq3dJijsMPsQH4S64ztpHVV8SM3G5Mv4i2ltG9SOlQOToJnVHm\nEr9oEd9vSrwHj35f7nqYyy38Eln7typhAzXKY1R0VpaQa/lXXXxZAd9fk/Yx\n0cbHOhbBbSA497y4WP9vqwsCKKx7Bokl5kFNdcroyap6bpOJgADgZnDsWmEe\nwGjwvM7K+NFW9F3BAok5VqVUWgnABK3EyYmPlt+6mKllYZuel59/UCx0bmQx\nzXzw\r\n=D8i9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICy9HQ5Kk1bFI4q9/gpo2UcoxapW2E6mmczUOpZkk2ifAiEAz9G5Pf9ATq5rsxr7h9GDcfXRdrfLVmk9X9qUS69MfgY="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_2.1.10_1551783597031_0.7818646347784806"},"_hasShrinkwrap":false},"2.1.11":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"2.1.11","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"427aacbba6ec469ac519ac845ca5098ff890028b","_id":"@axmit/redux-communications@2.1.11","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-KjOBXlAlFWpLrZKkaCYuZeKoqr2T0/xgPRE9AmVHSkEHo/Nx78jRexqH22jiQMFOI51wUFhDMqqI5QBaZ5uYVQ==","shasum":"4b08e4cc6f88a2b97072cd506c05fafa37a25970","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-2.1.11.tgz","fileCount":40,"unpackedSize":143813,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfld7CRA9TVsSAnZWagAA4WoP/1nDHqYPzvoAu61hYdQX\nqPTjDw7oZouwkrqP58w+Aw1f2TIOHN3GNqkYbdTWwNql8c3qLRXsZGgORvco\nbTSQ4ad8+F4eNxNbKvhyTyolmF5TGCKZaBYDzyEBB8eYMBQXr5ckb3u8al9x\nyfko6nfR0we3F9Qx3jHUa/ttf8L+nwaEuJGZf7kOFM8iAEmTd/D5OC7OnEaM\nQDj150t4Ft0yq5KKc9+Xb79T3yDbKQmsATDONguwVCwnJWP/jqEwbvOwbZLH\nYQGuSkzERjQJKaeqr3j8llZUs36LzbMxrQN2aoxlftRLW8wDR1qq8Wqz1iIt\nwzBHuBmfc78NGHsY3cTiJc94yYkqsqXsGf/nAbPZQlgFi3JAHlBgOjz9EpoK\nqaN/Gm4rVqF+mRn0aFczeWEiONWX6Vb8zRG7hmOZzKiMVyqUqTfCVBX3mNYb\nI24dhkAu9v1k8mleQpieCNtIevUwape7O6ZAA8JmfW/nkRf7XeMqRXpROUbl\nfsxF1+b0D3i0D6A2pw9Q3Evd6qosv30e8y8sri38f25lWQFeLf2ibCMlHfcj\n0OPT8lQSIt93MQH3w1WLv2+8Z9ZgTYGG3zMKKCKWHBp0+FenSdCOuzcWRYzA\nq7QzctGMuQlUyPCfuLTPsOhqLCTzeIu8MvckCMVsTJNcgMztNMupiDPDJ1fY\ni6/W\r\n=BtWK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFKFdK7zbHVAYfpzlTAVGTvdb6jaQOOsyKROvU0Yrq0AAiEA9n5lq7mQRw83DfzQ6RQFjy0CYhrQ0SBQ5YdlDuhIZW8="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_2.1.11_1551783802578_0.35868676206640315"},"_hasShrinkwrap":false},"2.1.12":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"2.1.12","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"03ff2d2f62a6aa335a56bc1fa7f6606b44509dac","_id":"@axmit/redux-communications@2.1.12","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-YxectAiEm5OeLlQdKoRYsx08UWZ2ostDuHrrJvn5KSIIxEtxpfRdi9KkEy1tXfVtrQPMlxqq9En9tG5z6qvyow==","shasum":"9180654e63bf0d0cf2b80ca649b999cc2969162e","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-2.1.12.tgz","fileCount":40,"unpackedSize":143786,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcflmBCRA9TVsSAnZWagAA/SsP/1DboRFERUjCxps/UL/y\nIw1Vibnqk1xlLjktKeM0OFaYOHF3vZOT0Da8qE/glePyjWzZzGJQ5lmVnkoT\ng/e55KOBt/x4ZykUpe13eBomAm3Brsm2licctPeXf9UysM2wJB33onVo3Bzj\nAaA/GQHSYFqcRzLi5Gy+3F1EPDCbW9SfUdfJdb3tfJ8ru13+5c3nuj9SWMdW\ne09xvka4H2B1JVOCjg3SQ2qXMpu/d8T++2KuY0sfGI1iqRk11w4dlgUz/dq2\n82Opdru9O3OPeyrnG1j4+7GLKN2Pj6EdPQSpg+Fgb6T1rHBC2ItxWsNYR96p\nYegyUPh9y7lxv+r1xhRGUQTg52lQgKzttEhXk/Mc4a245yhIOz5pMmdUSWed\neRA6qFjEgwqnKi1AEaB97tSYygdmMJ2uVh9ZSaGAzKnH4tHrwTEEH4Vi0AXu\njDfO/cyX0tFBmPosA/tszGMk6jFvNPJsISlBQk04A47KeGtXdnzNHcVaLYUp\nQQjlbsqTWcluSWJzvRvsVsdsuef6zpmBpycjJyzCEHOjCnjwpNX9IE4vucCC\ngswed5khG/PqGlr0CkZljROnQqu/7mPesgBHU+J9Zakg+AceMD5y12tdiX22\n0crqH/PDq629FFIjoSjfebTP1uo8uDCXa71l6zNIDB8ZS40SNCRUg0WNZ7Xk\nx6Ie\r\n=xx5U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAEskRaXH34YiuyPWNUsmMLWd/PlQjGP4fCJwTdgOUUqAiAO6C4krIjADYJLIFLHQI8bAYDARVrI/rTvoVrtbZn73Q=="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_2.1.12_1551784321333_0.8221598870094398"},"_hasShrinkwrap":false},"2.1.14":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"2.1.14","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"89e3abb01b61b3dc438073ec1c081ad842f1c693","_id":"@axmit/redux-communications@2.1.14","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-eJ9qPNKXWYg0FkbOWvlMNHU6gtFtu2Zohx1EWXe82vZO/pVjsXs2QK64+gXOe5VpUNasJfRVU+gzzaALWNNP+Q==","shasum":"6633ef099a4d4d1bc3158d05c5e3b4892046b9d5","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-2.1.14.tgz","fileCount":40,"unpackedSize":144403,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfl5LCRA9TVsSAnZWagAA2soP/2kZr3a00YeKX5qlo9SF\n6pu2G+oQNu+gl2CldGghP4jM4BP44bb5tuQNtOEKKHwOQVW+QTSgJWRSdX28\nDMu6tbXQyQZaN7PgjRv8j4rFc5Vsrnm/JGqwCrUpvjLW3F+OHu5r4NHCqFmw\nBx/DDNUSVt+p234qsxQ/9IFjTyKpMSmPtttuUamyFNZyR+t7ddWOhDGCjL82\nBe9qQwAJqnwQGqo4PHXC5TEP/LiKj7fmWqIWB+pt//d5TZ6ttebyHSN2xhM+\n+kuEs4fKCBSrq6Rn5Iwa15Wy3sdhIpjmIfgN6iau4hsPf3dYsy6WZSnWBPM9\nn/9tGxMRqNPHHeLyUs5lhJxiFt1xg87ymY+mQjm/H7T0Oc7Y+pIxNZAVkakT\nJBqt0Ra1a1qaJllmS96n2H/dhFrJddS44QHdaUYy4ALlaWluWRteINkydKmk\nqErtB8WwWkQcjJ8d6oSdckyxeTlFXr/A8CmhKlak6fqC+7WBTWW0x2MAZG1H\nBjnCIq3SGYJyZkguEv1H4RIs0S57gve2FD8qJbQPfTqk+RcDR2HGWYLMF6oW\nymGVbs8gZhdFTWN2cpg51gNuDhOwJWtVwlijHFTRDn1ccrSPc1aiIL4qMspj\nvqmxcTrYdhvPMwraILeZ4mrcccNTltmqYjKD83lTB4nfRVF2N+3V1XA1VLhH\nEnnj\r\n=bGv7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEOMXYnQyQwvt8ob33aVJo2WFBpUBGZRtOq6QUrdlWogIgCD9C6hj48WeRpghIrHqR1cjurUwj95Ug9W8zDItG0nQ="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_2.1.14_1551785546463_0.4303079806269885"},"_hasShrinkwrap":false},"2.1.15":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"2.1.15","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"9874cc5082082c96fcce484d336ae5ecd61bba7d","_id":"@axmit/redux-communications@2.1.15","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-nGwq+GJQ7cdIzVeIyjSP62gwWPDgEW8iq5JlWnSaVSY7EFr+GkIVSjTcmire8/ZTuNjl3UKiAyb5lAFDeGL9bg==","shasum":"e3ef849e16bf9db6584807a57ddbd2013832f0f7","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-2.1.15.tgz","fileCount":40,"unpackedSize":144338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfl+qCRA9TVsSAnZWagAA9joP/0FzS3C91AmqNxOU/NWL\nD9ZX/tgqN9N6EMEWX0kla2TTxIzV9+gXTRFAaMqQeaf47iFXH1vel+jC5El/\nTrM31uqPeOnZWl5DItrXSN8Ez48TI87Xqsozkn8ZDdeclROTxerItPDzj6Gg\n7GhlUx9oIsdEA9dD++r3zrvYBNev6Cr/exff91R+t6NdCAW/1iXAqwWJx7XV\nL06vZXF+ggipmiB0kltb680VEDOoANGVuNYOOy9kwZHa7obyUJ9sMNk0gDD1\n9haQfAE6MkQmjIQywe+xeC/Ff9wze1sT5zIk1uyYRDboTwTBOhRjKU2zT+9k\na90HfSQfhKeINq5xyZsct+9T7s/9jaonASZXN5uPh2N2j5w17e1ruRevNJf4\njl55zLaehYrF+I5Zbzz0Yon6NtUU91j60JbkwLlz8zPVGj4xZsYZ98hlBZKE\nguhpT4JRmxzBYFYSuXzrkA7QUEl1lC2DywnDLwxlBzEhaxbzPL4SsMqWjt5+\n4wf30igoS1ro2GhSObDdx5t6Mf65o6cgTPtF1Oy4CdPsSXlJ2k6RXbAyut9S\nI5A6p8bXSeuNLtv06sSp454MNLOKXitsmzAvQTS1mhKP/DnoyKzMTfz5ct+K\nycfaxflIg5K7YIoZiAAqhH6PV+XwoHS2yNchZiJ2c0GT3TC0w6RIK66XdnkQ\novPP\r\n=Gnuv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGT58Wx0SdwL6fuxcx43IoO1dW3gBsESTYZBZCQwfxgHAiEA9bKGkuygRyrcuA2xqG02aKIRI/nYcbzXuxptTcsG+Ow="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_2.1.15_1551785897632_0.7011634726540577"},"_hasShrinkwrap":false},"2.1.16":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"2.1.16","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"9ca20d995e000004f43bd426946ebf461427b985","_id":"@axmit/redux-communications@2.1.16","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-ArWN8tAGXWAgFJjKxenq7Ud8UbEDfT/y+c0/REl2lu77Xxf3WkiyD5JBfw6cwGMVivas//PzyPicXanygLLusQ==","shasum":"2dda7e86424631e0823ea288e8665835783c39fc","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-2.1.16.tgz","fileCount":40,"unpackedSize":144342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfmM2CRA9TVsSAnZWagAAO/4QAKMolEnoc3ODRUucEGAm\nX0IsNNkdSe2d1DUe5vcvn4Om/W0Hfv++OCC2ex2sTxaeHAzwL9NgV5N6NA1v\nQXpQyFBdg0Wli9BFPnkc3jiaugHK8klrUJfz5WR1vNsuWrUnB7UMU48p4Wqj\n6bjwIa8O+z/Y4cjR/juvPdFyHoeYlplVaZRurNKzis/0rIhcrninL/XzqgeI\nkuzOQafr0XFOJwPHtTMqkOMtIww5pZ07en1U1irCWx/cyk03i9fymtbSZYQR\nvXQxmtnfaW+h6UWb3DQKhWnMZJTPgLsCzngG99TnZaofRBTLGvFpLMtUm/4P\ntKVMFQvQYYwv+PjibwCg7l9qjvSM4YpvdrmGNzO46cb/CUCmT/ENeSnq35Ne\nSBJx/mU422XKJSJ68+857DsMIAc1IF3PR/UPihOrrUDjyIEzII/uorBuBpby\nhG0Xgx9ZK4dU0huuC5hi5nGw6WZFB9WKRADIOTaRyC35Trrn1s6+37Pr62mk\nUumUNiNbHyvnu9CrkzYsszjFZXjsS30kpdGUjiXzS6Aj7vydhYAV2rHNe6o+\nSVuY8/lQeLQ5lo2ZML+tmWBIPRuKV1sCSa2Xww6D0MnwwXEotBjsAk2rIzLD\nYKxl3exnt2d6ynGA9W/E94loyHS2dhsJnD/JhxCqci4WYBHj7Bw5fvkqGdkc\nw0i6\r\n=mfDm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAzPQfUfQ9rDaZEdS1mtBSWcbCFXojvX6jtAcQyCtnLbAiEA+eUdzPVEUmZ15F+ufnnNsGGRcKoo3/dPL9TKjqERsZo="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_2.1.16_1551786805444_0.977844187983945"},"_hasShrinkwrap":false},"2.1.17":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"2.1.17","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"d3c98aab0cad0b4c7365b9d01fc1d1c125c8b8ca","_id":"@axmit/redux-communications@2.1.17","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-N71BDRq3qnczpY0Ex0b1wpPPq3Wcgo01VJEy7C0l7/kYDh7Woya+OASc2db5bHq7cOoIIf7QQSwh7o8DSGwlpg==","shasum":"e0b49b2f6e64c38150576722ab64d9da50a3e6b0","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-2.1.17.tgz","fileCount":40,"unpackedSize":144418,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfmUbCRA9TVsSAnZWagAAdgoP/0CqymagiuGli2GvXSAR\nUM4IVOikLGGfxwX4Rune6FTuWxU2zo0m0WLu7t+PvJ/2y3qC8hBK6M+AmurE\nJiX1ZGgudYzuhRfCB0wtFxGEr1MR2XnlBELbItCsm4zj0iyS/xE6xEoUjWS0\n5R3eAP2GycxbK8wODzJZEyWH7lHOnpLObtRuyhuKznhqFbP1e7JIYBH2ab1/\n2BDUbeVwzvN1Ti9gKX7oIqA6s9QIvx1pcuXiSWAXbqGQPQpunTDmoC78f5nT\nCYxFgBHsVma+67WLXJF8m3iUtgI0FfszQHAW7fuQCyEzsfDDw3O90HaSyNpW\nwPbRJvvZtE9uKN61r+/4NN2Eitfaf70kQ6Cw9b6h7McT5rKifSRFeExOKS7F\nZg8Dr5STvO+VPO6cUO6kL78nK1a008+kq3m1PzSHhuKlhF+jYMEnN66YhD/N\niC7FNENCN76f+Dqhltm/z/vfYVYqX6YzHvdEGZhPYvvrLvoXZW0CYuCTv3D/\nqiSchv8JRMQMjdTeliNxOc0hKLaPiDc0AGgZ48D5ryKNq/UunxkvMvJXvUWw\n6CryVydjlg9rDRvSmRyTjOLiYw3pv59WM9WE58VU84lISCHUAdxJaDi5K/+h\nXXztkyJIuLkCAlY8+PnXcwucVnnbSeFz+8+ApopUhJrJiiOv6LLlvSVDJ5OL\nDsaY\r\n=0LZN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAmJq3Vei0tEtvbDTYXj2P7QTFRmrZi8ZJxV4KT/zbeVAiEA3x/WoYhkbS3ehBc1ci/3CERij9xguRCHYtjaOTil1ac="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_2.1.17_1551787290863_0.965728482142002"},"_hasShrinkwrap":false},"2.1.18":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"2.1.18","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"6eca4ec169ca929107dbec648b515e98cec411e6","_id":"@axmit/redux-communications@2.1.18","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-Z3H0cBtcBhvHwAdxG+BzWX24C6aKUWKT5JSys8Eda491K3n3/gAzUU0FMxg/uCNXWkx+lKHrXU7qis3wkirhQQ==","shasum":"4d633f47c5c8fc62202e3c8bac16c6071216de03","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-2.1.18.tgz","fileCount":40,"unpackedSize":143865,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfmoUCRA9TVsSAnZWagAALZwP/RqPd7wsZheDErmbQ9zw\n5+UnreX7oXDDKLKgOSEgqKZ8CNC8oRwTMDcfJIC5Er7/9k7mosJO3qTUQN3j\n3Y5dPoNKQxKQbyVqfwHu34o0MVvxG9b/Tv8tm5HC90w74Vs1z/gl9b7HaPbp\nGc/X72dJ1e1EShlBUHZyNJSJjcR2v2ZzhopC5KJ04NW5ThvDyfjMvZON6WeP\n5dC7ekMI5fDBFged6/L622ufJvdawSt8Lk1rPLfvy3BszeaLOUn4eq5Asc2w\nhUo07N6FU/Df3IFsFoV+MW6Nf39k/amgv9reePZreCwLLpcF+RNX4txtPA3Y\nPQq0c+WmStgf/xnQFRrBCpwp5sV17+5Y0mtG7E+p+bCKEKKr3puiDZ+RocAd\nCrFI6U/VWadESIssrXMEzvdM+iGwyaFPK2F+inbIBegkkb3WjDyU0JNr0Sc8\nDLNGwLD65ukLU9xVWK9tTnpEFh4o+SYczCcwiqMIfWlaAuBfP488OLBNGXrc\ncldFKlNWicRPEKKh4ZqV2/rWz11BQmt1F2R81hc05TxlfmSdN6Tmz2jhPZqi\nckon3rPTIYryqYstCk48WUNLLDU7ZKeFBu7o+XGuOLxh8GyaG4ZUR5srcV7e\n2BmP92Vkkrky6QP4IQOFcfHIuYgFTCCIw8mFy4tqadvMrVh3jI+if2XWCTH1\nOVDk\r\n=f0+k\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+CZKHn45eZLL+qW1EoO2A6iezWHyHhkZms8nSlUGiKwIhALbvC2XiJL71VGtoLtBRY17xpG02/coZk30O2dq+vS9E"}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_2.1.18_1551788563587_0.692021796739039"},"_hasShrinkwrap":false},"2.2.1":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"2.2.1","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"a512cdcf723fe39477ac2fcd43fd46233963da0e","_id":"@axmit/redux-communications@2.2.1","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-GL59NxTbhrbN35aVUr9sugbO1haDy+0i8AVKlJAhFXrjZiEbuNRMj3rDn5np/fXKczk9SwIZgKeedD7r7IdH9Q==","shasum":"bf5a1d3849e37cb7cc8c7c2a3f6dc7f215f739d2","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-2.2.1.tgz","fileCount":40,"unpackedSize":144770,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgDbuCRA9TVsSAnZWagAAYl4QAIGlK2Y/yotj0TXEd4oy\nVAt/CkQklf5t/5Xlxzy+XNrIWplPBh7C4SoyTZbk1os1SwRHurcbq+074wBv\n8f2dFjTUDKDsTaKIfUceBBDwqKADcV4Oi1Y5WwhhGHRnA6WMZAdXYDV0Qxuw\n0g/K/am6I5ow5+OKnuOGA89ON6D59bbees+liDBKaEJI0GTUcjAgLkhdYpK6\nsxi3VguMYnmKH66M5z8dqcT9Ls/sH5ANIAZE0RUIKt6bMMvWt8h8jTL1/qtS\npmtQTdGOXRVi4qsbkQk2p3O3Q1KDGajSF0eEEdY+nPX/3UxwbtSPb13r4goM\nEFte6pdOd4WYhcW4+MJtbXB9aMsRpSb9Z0dE8rDd6WayPtYa97Lnw/8aajZr\n18qqxeiQ2hNxXVnYXqDDMxx/ASUM3KTDtJC0mUiRwvcLNaOmuffb9FPxc9a7\np4W9nf1BOaCqXc6VLCbvTIgo7wWMX7hpr9rNpqwS2nXXBEhVekmjhSPUMEGW\nnYHOOmCqZRBOzGMxpk2StLRLYee8wyXcbepO1XheqZrSNc8yiIzG3X1ldrjK\n9exvQ+RHhE2nMX+yvuShG/z//Q+sEZPtM+ANHgSKGMkTRviqk8POnq0n4eUf\nME18VZlzwtwKhXFrfleXdHkrI8P44YPL8l6ovgNBiRYdxb4yzv74/hSVGdq6\nrlj5\r\n=MUhy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDG7KArJ3DRMp5WK4+BfERRgUc6OQBvbkxf4YFhkZs1AIgNaSutdhEuZiBgNf7EVzLV57hXZKrh7NcSJvrTs6Jeqc="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_2.2.1_1551906541965_0.49602783137855977"},"_hasShrinkwrap":false},"2.3.1":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"2.3.1","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"a47f47e7ed198c7ea1c689ef21c5f6013da98a7b","_id":"@axmit/redux-communications@2.3.1","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-7OIYDPRA6GTZX7tMRt0QIwXqcYr9IVpl7N/PeWM6YREl2onLi/MOU63ktHeLKRo88Wc1oAPH5H4Rm6k+PJd9DA==","shasum":"428c8d6f2e5262b5719027634a25f5afcea04822","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-2.3.1.tgz","fileCount":40,"unpackedSize":145577,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgP1NCRA9TVsSAnZWagAA0t0P/A9ljFjg84CG+MQFzFwL\nBrNRVPE8h4RPMVz1nUZ/xSL5FDzAAIiKucG7aD/N51hUwkFxNw/XQ4v2V3un\nTe+IhMPTsv1VT8G+XzhpJGDkv9re8u+kWbczQttezokj9TQ48q3QMGRF5Ku8\nAgs0QaA4wC4//Fae+UQxlirRgn2zGzgHK/znZPHN2a0JT/jeoOyzKN+s5Xf2\nQ3zjYXzZ0o34OGyfElJJp2ZtbzwABds/YkMZKdpQexamQ5kMc1zm7yWyZw1Y\n/LTYZe+GdYLJJ+CzVkhZwxG/6ydwe7jSkz16vzwKqmnoT5R+GESdMMRatxtM\nD1oEt4Ome7Lw+kz2aeZ8A4qgopJA+xBogcU9HNdiCnx01HCk+fkDKFlUDeJj\nlolrmZQx9tf7pcq5eXqmS9Ox17o+26ebho/Vq/ulsts2HwrgavFOQWAuVt4Y\njdh+Ye8vG+8swTneD/cF7u2hC7+CXhJl2mW5X1zkdcM95coxBHYkFaINcute\naJwz6PyaGqyriRDmntlpkXFieQ2sVfo7I+RoGSoMYGS/uwLXGhSpEEvl4xP6\nRhrhh9odV/JjNVGK1pBAVDQSuFrux/aoflD0wyfClwATuG+0vQojfJsCcJYF\nPbc7dMs4QW1vRxnvTUwbvyiIb0JFpmQ3jQVFpiZMW5M6bPIfECiSBRW7ZG3p\nKPK6\r\n=9jhI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCBQYhqU90tmsxZyDuZw+xX87lGUrXXefZcAv+we9rvsQIhAICiOhiXciaMH4zTqe+xqeJE3RzZ6SUUA/ddULWPJu49"}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_2.3.1_1551957324724_0.2740746929428013"},"_hasShrinkwrap":false},"2.3.2":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"2.3.2","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"e9261a3de1a3ccd97409353f4550b6eea6cf7f64","_id":"@axmit/redux-communications@2.3.2","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-DPHYemAJsSY65TFrAvRI3wbZFZ6Lhr7mHo21wZP27FzTmFIBWUSYDk3BHglAN9ob+a1BML9DgYu3uCvOz7IXYg==","shasum":"67d35f5a012450ba2fca96eba57b1ca13638280d","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-2.3.2.tgz","fileCount":40,"unpackedSize":145573,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgQXsCRA9TVsSAnZWagAAB8AP/jZhCOT+3vao17EpKZIu\nHP0kdalqeS2Dy4ezgM2z0I5hT024FGAAiYR+3FPRtzoKPmdudkKjQECEXc+0\n/7b9TtdYjE2lHg+ZOOSra3/qtncCAX2hhYIyFbE+blOvs+tsIDtGrVTylXAL\ndEvSLvf7yI0GayVG6JIWHepE2ZGIoAyojOAAO6Jm2keuI9dmxoAgeKGhhxof\neHxBXPYiXgOUvGERfabPy3RbgTyFl1b2jQnd/GmZWwgUN0lILF64g+tWJjjU\n7d/87eJPpRhPiLy7QUX44wJmA70SMjDDPLYNHDVkWhoOyzHQHQtXfkRJjUAy\nijP7pMK78N8GLzq+zuP9lunfrfKKM3cgKSsIxJkCvo6/Gcp/WlHeC7W5eAKx\nJRqB/npyEr2BjaisaHmVPo4v/PNCvMkeyDeF4rfM7YAtCCRydJs+oqrDKKkP\nJyF20jI5PVvTdzA1U5EPB/LQC1GMkhNAKxioos7WYMOg70sjzaBlozmyOA9/\niLDCqYRy0ill7dlrfSItE8zF6f0Nz3f22Vph1jWDpOZPGoSzRnx0HnbbDHKI\nUq3knWDgCVlQdcJv+Ac0bk/ZajaGHBVojUMLiQUfLLiK5SkHmvFDZ7OgUA2g\nS1BgUqIyQIfGonhORfVqOzGKkqTTiCsYqKGT1BLDLIvUqryQQqj1hVvu2RXi\nRCf8\r\n=wK/y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHkivyPHCSseFMNNDDsnETpyxd50PdE5qAlvrrL8lEusAiEA3FR9d6CB4NVERkDpuADOz3lmRm0432XFBs/YO2GNx4U="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_2.3.2_1551959532351_0.8126506341050976"},"_hasShrinkwrap":false},"2.3.3":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"2.3.3","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"65c51ac78ed8b193b313704cc8cb164aa3b8b1dc","_id":"@axmit/redux-communications@2.3.3","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-pUh+EhWSmHrwKuiiMdDsEGnVBTwHjwbIgRz6imY12nj232Tn+wEbsK2UWOQSprtGsmNRNHPyPM6xV6TQS1tRCw==","shasum":"268e6f3e61ec8205b2a4f4e08b57d314814bc414","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-2.3.3.tgz","fileCount":40,"unpackedSize":145255,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgQqyCRA9TVsSAnZWagAA2TEP/A1B7Q36JzIlUYQ8GGo5\nP080gxtlODCMvrMNQ6qDuPiFxLB6G0fM0U7MJOR28DGa/VuyfYUiS48pA+Bb\n95O7cz0pGR3HJtknWqnxpBetpN+HXeNFQKUvagArSIyReuhycgs+1ZrJyEB9\nvm+mQOZFpMMXnIUMYcAWHuiJS9XXNmhK+MdA9ccfdcnyV2bBqsRSZJ+CDOSW\nb4fERdPtSIYBQVYEnPjJ3XzJIgxY04yv3tzc67fZctEcwEtTkuFiofEpCR5E\nkwZaAjC6OJtDvleh9iiD0y0narkp6LyPBSsMV2LVMaItmDBVCy9KVKM6N9V6\nhYBa0FGOdTGoG3I4UR59mxxYlvvg9zGoq8rvgq2pdyBVSllDJE+l3uQv013+\nTj9wMRlp0eg1hq8rwtg4EI7keXTVEc/Sg/SEDUuWztC9iAAGd/F+nPsEiwRn\nahEHCemY/wZpIb8/H4v2gj30hOMkXIEnWwBrP/VrbhbJd4ID92JuTdo3G6lZ\n6POsuIdjsdBPm9hHR79o7OIBE0NzDdz0LuoQ9vS0Evhk36tsPUAB7vmCoIXP\nN2Ik+Sv1hW7FN2O/Rt5Jg8b3UaMCTq71zBYSoBqKgkepoKS8trc/kWVehT7p\nzqqplkjGi0Wr1EzMzqg4ZJLLhfTrZ5GW0fzObJsh+UlPEKMpuhTN93wOYWre\nrPEg\r\n=kDRy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDf7Xuy3SjtQ7cELFAr55jIL8XZTwzpPlBVLm6RCmZKQAIhAN9d7Yb9Arl75N42kPcjyJuPLGbefm5Vs/VBFS2dGfXT"}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_2.3.3_1551960753518_0.7169943321403791"},"_hasShrinkwrap":false},"2.3.4":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"2.3.4","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"700f299d75f6268db733f0f1617a87c98435bf18","_id":"@axmit/redux-communications@2.3.4","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-L/8q8urdwl0xdn/OzvqiGJmMpKU6xxWyskMvNz2BhOJEg6dEIu4ggR/hWJmgXokFe7GyWiVOo6C1lQXmFtK79g==","shasum":"0d00151c7bc85d7397b465465e241823473e9cce","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-2.3.4.tgz","fileCount":40,"unpackedSize":145352,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgQuxCRA9TVsSAnZWagAAB+cP/i4jP9sUS6LbpceBJrqC\njZaSTaZX6Qeq7kLUjKYFwSsbVWKgDyBH29d5bM7MndkM4P6R1stvmOBEB5QO\ndIIJW2/4PN2SSEOofGplKBbW5cST6Radz7r4o8pokgasOWR3U+AFw4Ezqq/l\nH3u4zl36/lDGG/wvl3FcqGN42QsgwmJhCA5yRF+PIfavnIudg+6Mzb/Lgyo9\nPqIMrqi+ytGxgz64Af6RnVvDuPjv6r8lxPWUZAOXPwkK+a4d8ytyX3vm2CvA\nr5uV/c6IUN6lUbJ6rV4GmJ3MdxEuRmtIUD072CTYeeuH4kxz+3hWt2+s16Qo\nLi1BooH5PC1AgAHd76KDSFqV617f89CdPmtDiQLCi0H4HOR17HwYmVYS3aQb\nN8sI6UXdnY1FIN+XNV1d1+C2tYgl4xQ3PZiXgGoiMf/gW5BA8/SrDYpkDf/2\nr7rU3NNECL9bX9nhya5QwsYq9WeVNnlOsphJy4fROw5ouH4u5V4luL/i/OL5\nqVMcIMmSg8UHIN14xAaRd0mwVrsC/bBacpqRAeCa8obsKljH9Mtt7Bv8JGo3\nubWvBpOOjEM5xVDkxNvbOSqbF+St5ag+vbG5evCoWUd5TVmDyZJWn8UaprMO\nrfZq5NtwdS8gWiyTnNz+7KY6hVYjmaYgCDkANO2p4UElvhMU4JFbknB3k/VL\ni80U\r\n=/Tog\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICQHQgW+xInDxHvoUm/nGSwu65gFV/b4L9CU6HshH3T+AiB3klvNIRXhc/1Oi2b9xm9ITECj/SfgmIf6B7x1wixnsA=="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_2.3.4_1551961009183_0.31559129165377975"},"_hasShrinkwrap":false},"2.3.7":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"2.3.7","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"9e36d6883e6d57a3ed312fdf6039c8ccaa43d5e4","_id":"@axmit/redux-communications@2.3.7","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-AevxVvRs/ZU0fQDVJ7bnDScMJKwwnb++GVdeBSwuu90HO+HRxXQ1nn81m0MXZhAokdwhPp1IY0mwdhTecZpJ8w==","shasum":"233ea43d1a0f0c71470a138752ed42f58c5d27fd","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-2.3.7.tgz","fileCount":40,"unpackedSize":145275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgQ3sCRA9TVsSAnZWagAAE38P/A4z+s9F2Iwq8Nz0YefT\nP7WTuh7wyyNx0PO5x+wR+pjISXmzC4iViMc0GSN6bK3Aimi6RqHJKHWXe+R3\n/txpCX3icaFqh/B7aO8fKYGfl2GVoFJKCNDUDFOUJE+YRueVWzZVuqhZ90Vm\nU0oqWe79azUKOH+W5CtS4q6V4S7pRDro9QT5iwDAP+FmVs63pLmwBZ/Tf1iA\nQh5u4diupjf3JQanF/VJ6C+5SyCGsl8fOlOajVSaeOBiEZJh7BTBZyh8vlOx\nINXt0eCJ+Or7qPy34YGZ5Av1HokbN6zqSoKA+GmbQ5NPlDsyBx10VmJdBKLJ\njomUzZsub3RtTHJsymT7X/vrl2q+AgHlc4Zx8u7vwpPKBs8Ya4Uh6F76nR7B\nM14QAe2eqzFzAsh717+DKszAnMqgDxqadxAAl5+VhjFz2G4qlYFcIcDBP09R\nX8WmHmJGLrALKp3aWtU+Gnido2qMFG5to50+9FGzbF82ucVvocMZhIf17UUZ\nIhr3jVAdrh0IjYmBIT6zKhGS2CIXgAsWtE9g0g8YpXlwKweJ3G5+LJhA2wBL\nIM7bDNJSM5J8G+Zr64MkFFCImXKLkIfOfs26h73IvcONHdTBfrunmJ/xq3YF\n8Yo4oROztMljb5KnXrSzd/lpDKapdoy5kg7EuZ3XSeQDzXQltg1dbssr7cEo\nfMOn\r\n=gCwY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF+UsHYbKP5Lseu1fqMxkkleYpojSqZOCMl+krZZu+STAiAeVsB72pLS+49elNMFweXzixpetFJad73ieObyYcXrQw=="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_2.3.7_1551961580172_0.6801642277195057"},"_hasShrinkwrap":false},"3.0.2":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"3.0.2","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"f170b3bbedd213b8c54dac73610e9ee9ebf57f98","_id":"@axmit/redux-communications@3.0.2","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-Ot8VAg3g0OOpa0a971QSZwW1Dy7oRyQFAmNdvhtwjsXCMuRZPraZeI2CXE9ToyCKHhVKbuP5LjcIsjTxtyzTvA==","shasum":"3ece47763c6f26e47551750d6a46645944fa7513","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-3.0.2.tgz","fileCount":40,"unpackedSize":151956,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJch7oiCRA9TVsSAnZWagAAKQcP/iKzK9BKpgL9oPpPCz+i\n4wtV5/rGBulZXe/2AaDJPqdSVO3Mv/+s6DMd6GvdNCRBqk8dfmTjFPbXuOlO\nEy2btqcCpvM3McMUiVRZvN1UIwMSljitfnwBoIeLEGSw+0C+UcnwlhiCxmEz\nRjzNITZSW3zZhd1XBkcdi1GJSMW2QiSgCnuAA8f+mdKu9poKoONYgCx8uPG/\nizjiLlEisnEwh0SRMju4tSXZvyaXWdj1U35UVKYRQ27oA/uROrxbPP8lMBK9\nxFkc2b/uCi1h+DvxIoAGNXFlFA6zgi0pxUSJ5YBlngLRmoMX7k0IU3muFzuk\ntnHLEJjmAOkx0KMBNvOtnSfpu1Yd25+LrTsuojw9K1KVh94IhsuKxIbAbzmr\ntK5jeKZAW8KSZj1vlZTkKMJH/AUhmC3mAgk9q7hSXzxS1AX9QREXg+f8G17d\nIQWMe2CSu19tnsjnBkHT0IH1mOPF5dWa89jcMR8XkZLwULY9pCwnTfbNvoZR\nuZyH3HdCBrgqHI/64YQDS0OYPi5mOK4OZIuYiI8lZVeQfR1c6M/60k3w71Cz\nWTxbaBNVpaxzaplRwt5lRGazK1PY9m94NtXVLn2hPffA01VmY4zpdL4DZVDB\nmqYlP+fceTaoaa9KzzGTnIPnarScyquhNRtUUO6KKWn1Iqr8E97tXCgw5/jV\nvXLj\r\n=skbb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDZMwOmw9O9n0tMkmbGRVYDusVhBd09WXcN+IE+wQ7SnAiAncPtGe2xp6ElJSQU4Eyjv/+kqwtNBVJM2uYtn7b5YVA=="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_3.0.2_1552398882123_0.08082701689938987"},"_hasShrinkwrap":false},"3.1.2":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"3.1.2","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"2109ccec4ccffb4e67def796d8ced36acee6c934","_id":"@axmit/redux-communications@3.1.2","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-oeTIJTZaHtkDaewderKxBlSuVuy/El0d2yIzo86c3osIzzh8i1eDmdzMeOlPhjJ7/4hfyKth5zC32/r+WhxmOQ==","shasum":"cb952770b05d0dfeb78a7b6c4fddf97c328faa0d","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-3.1.2.tgz","fileCount":43,"unpackedSize":158957,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcirmwCRA9TVsSAnZWagAALmMP/1VQRPU+EAZFfdtd9D0q\nlYugkNuG+ItBIbEGOb2mvDIMD/poy+rtahHOl+8cVpgvlRmAVKvp6DVy7H6f\nxcR+4mIdGzkfCxDeBknu26i+/UNBMppiFrq0rNlibeWz2ismWL2kVeWT6HXk\n/QY6IgXZRMkzaM9S9DdbR8ZaM2MHMueeJSzYNdJAD1GpfmOMZTildTJSz7D+\nARWln1tNFDm5MLC+AxtYpUC6bF6+NMQR2ynPrwqSWlKisb3VYvvUE1Xna8HX\nnvAs8ba+Z0N4DsMwF7IDhTp2/DJAkzhK/C/jDzbI+6M/wb90sRUd09g5bd+F\n2W++lq9qQnrq17ftrsu/IDj/o/EnHcnTHspWQDB2FVZojKbBtAyTPxSE7/+j\nXbXipiZI1ixsiL4zxHrjKFVtuz2fn2diltdhyx/3mInwgAOpGCDanQSyBSJk\nkBxM55pbR1v74H4kGIabarpYuQI0nhINK3wHy8WZKfLNKsyWzJez8HPwo9Ju\nckZ3QFfaZvglK/85k08fD2VlidT5TT5Gbvk/drwW0skVZOf9Fr4mniYUXxAE\neC9g62GuuZsOMAMZt/oopbnzzOfrIMUhT/Y7cQqko7fZdh9IxKym4CIJwWBG\nBTxlKHHwibG9XRKQfJARZPd0o/iKtwE3ZYTPL9EK1Dxg85eReiy6NKNJkD9s\nXd4T\r\n=db/W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICbIVhmx4GrsDJJvQpaLt7Cq9YGbx06Z4O9NhPLckHfLAiApW2s7je/wgVxbZhPgGkH47jP3l1zHXf/NTSz45FuJMQ=="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_3.1.2_1552595375398_0.5023661108655928"},"_hasShrinkwrap":false},"3.1.3":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"3.1.3","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"85ab984272c32842836d27573769c91e9c0060fa","_id":"@axmit/redux-communications@3.1.3","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-sV4M345g9gif+AEro72vKX+DzsiYkPXnY4MLhLx9tJaSyV6WD6VBjf7/XacIE190yNv+hjqcq13nQOP1Dt9Oeg==","shasum":"88a4b790ad2b2172f4d9998d3156b9fe591a2657","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-3.1.3.tgz","fileCount":43,"unpackedSize":159074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcirn6CRA9TVsSAnZWagAAvZwP/jGr6AS38ooFO/42lftg\ncQfrDQmZx6y20aVoO53KUluMrBDPazmPPG6azmp9G99m30/YdkaSjmYenTJG\nHOX4rXILoBVsMFCeYuX7KNW7IRc3+rpo7ynoJVzBZS/pea3oQflKAHbg3E3S\ncnrIhFd3U7h685RrDOuQWgUuOCmO/S1Rou13T+2aE0beM18biL5zPWvJEC8g\n15sYZgzzwIU5HOcMEDXm6Blq+FctvuA+8rcS3yYoVDZkWDePDJf7ul5RlmXL\n3X3ULpPVnm4UrGGVHg6qutXKm0c3BkkIDqXWiK8yUOnPio3Ia7nNEW9Mxfiy\nKcZKjfF0+dxuQjAwMT8eSMWK8gd858/FtGxipU+xe/0sV+kfvbT0+hxtW5N+\nc+5ZTfbtfX2UnIDR8NEAfmVCV099sxJ4kzwQ78hoiS0SUq8fm5lPDWn9G2xk\nv75hQIgem2yXI8Uz3cc8FOVLduCwunFq3BUcAACY1D72obs/7MPfJQ/pR1n2\nJbZsdFMSzh5oUSl/25vK/lbs41zTXjzkswZHlinQldX0T+zVc5IQ4kD3ZO4L\n5j+e41nT+OvkvvwPGDXP9a0gSIIm3bYp2YbbPajffsE4iBDkstUQvyC5TQj0\npLzbEn7OVfTOsDPSu10qi4/VM/dKgrMrgtnR59LFwtn+z5HiE3pVQ5XuSLcT\n+Yil\r\n=xXEw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDEcGTXjrM/syogYbMMt5BniTT7DEu6m9nE7f57wgnzFAIgS7slqqMeOQ0fSdVJLU7Fk3tGduNvRpdA319CD6n66UI="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_3.1.3_1552595449479_0.48364011730546697"},"_hasShrinkwrap":false},"3.1.4":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"3.1.4","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"2309a6ed5ea69ced368fa27e2d1f74ba6ecca4ba","_id":"@axmit/redux-communications@3.1.4","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"axmit-engineers","email":"engineers@axmit.com"},"dist":{"integrity":"sha512-ENdoY5Mpv0Ag05KfCCHyGt264d6ViAsdym30Ol7mphzsZ63mKuUDYxSInt8nhk/1Osw92LSNDEcTLzSiRHJD6w==","shasum":"f96c51fb2f950587e103671263d3644854001294","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-3.1.4.tgz","fileCount":43,"unpackedSize":159074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJci2k/CRA9TVsSAnZWagAAdK8P/1mfxNEg5Li5ZGKZCceR\nX41Yb+LJFjEDOiupOsRe6Ph9fiGbK7+C2H6rr8QCTMgF+txD+hg4SdXTHxBL\n1dhrC9uzyKTlfsGvC2eXBGEpIPFNFtJ24HMmmDH3qVaL39iWVwTiWZN8PoIM\nFeDQnMZSQfNlUstiye6rcN6T75LrOJNQUDlggc3yyqpVc1ABxrZIwEPjv3nf\n6Q/FUjrzUtVQBc4d1RRgqPeSWJvjbLS6ah5tFbGtGqhfUc8fhcODE1yjWEnb\n/m/FFXQjFjKdRTngVNYW0AzH7Hg0igjVzjrsMOjcc3DLXsJVKMbCJRHf9JB7\nhmc3mwALERwR+QDt/o7Cv1XwFwwygx/ll09I6JdTHe+O24QVzHkXG+gVPyiF\n4BFq4BAk7h9mcA94fPtSEIcTlzIBSuIS4og/0zA9GbL0AOrBpiwxv8N4H/EQ\nGHGCXGDoXVheBtYKrmKwYAVHdTpflfQGQfphG57ls4q6k9qYx0IDu4xXjk5e\n1lDisxQv5b8uJLsfLGrUerglh0rqn8DTXGRJR/fpAikbIo6qgOx40pfBXoXJ\nXgMEgKU+g9AhSYp3FPitc6KCib9t1IiN+cpsHbQjZ/SEF6YIe5/IzaJLPFMO\n1bJcUKXyCnqOwy579005F4FiNBy/KpiYoEOUwjG4YQTZAQaTVUJdQLeTUHgm\neZ3n\r\n=eFke\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICP2ltJp03dq+U/FAqyPjiLSKKEED8v9rBvLCbbjXSYHAiEA/3Zy3xzUGKgROPAH7H7CCONyM/dno0XWWTKifeiGDac="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_3.1.4_1552640319165_0.9636284287920442"},"_hasShrinkwrap":false},"3.2.1":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"3.2.1","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"129f0acf849434f122c9966f1d6b0e02c10cacb4","_id":"@axmit/redux-communications@3.2.1","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-94PcXV1xW1efRI93wGj5UqHV/2Y+y5HUCSnrYgyfEyTZ4DTBkQ0FtnZaRHa7hy+/en8VwDJDQKVctNNyQ7aD/g==","shasum":"c5d71dde21fe2e8f7606d3a982f4ffcec30e3a38","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-3.2.1.tgz","fileCount":43,"unpackedSize":159829,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnIZtCRA9TVsSAnZWagAAPOEP/3cq74mfonOqMYpn3Q2X\nvId1lG8vXscBrxs+bdOiou8PjUwtZGacsHYngm4gL7RSxFtYfez9gDFdBvpI\n2kTNUdNIqXivVmP75xOELdLxk+WYSNqA5VT+9m7cA3DbHuc57ztazf6Elbyc\nvqUD0TXU57VzD9X3+Ex94lhjLe/k2VvNZWWkKt906lWRonnB6ZR+jUrYkt/R\njBZd1NYXqQ+1mvGp9hRVy5KxyvpRAx2eX27fjz6ERuXmPhCBBa5zS/EfqVAu\nBY7aHX9/D7zxaBFlI/6pqF2d44eoW0PVhX7qf3ftmbE+7yqP509F2y3x/M0X\nVYUEK58sNrRjHfrX4IXeLhFENr3BqiJjMXehSzp50UGvVm0wYnST2LZlxjDq\nt/sQ5ue3lpMkEacYD5tEtkGMaxXMGuTvQfMH4Ic0pmc82RYVdwtsiyEIMqZx\ndhSM/W3JN7afJnkwnF/Tygof4QK7SE7QHVY7DPGdr2kzdyDjrJeBWrGqCUAr\nb51B3SjIBUMfatMIl97NW4proAe6U4X4o+VCW+yOAapS+JFhd8sRqOa1qMUg\nYlrlm8m8WoY/j592tPpYYbUKrie2zKKjhfOT1sYYLn0YtwJ/11fIWnm0e9XH\nr4X+lEKfMJzAvzesXgSkX5gCzSF90ZCoel45tSycyyF3BXdoHMK83g/wWtMg\niqGu\r\n=/2sx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHfeVeNcgVor0ELMlwwApQkiDDrmPtJ5oLX7qxcXCXOmAiBclcPrDhXc6ARcjBSx+DmpHbBuc2wQkYkevBkdEtV4Lw=="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_3.2.1_1553761899599_0.01289498589122906"},"_hasShrinkwrap":false},"3.2.2":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"3.2.2","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"ceb2bd039558279c165109800293df0ceca6f039","_id":"@axmit/redux-communications@3.2.2","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-wogPQvfDuoa5GuMlSTQmoykS9cI+XVldbbC+zkJ9M+4vCWQ3u4lhEtIk09sl2wuJ3ApNfcbqCh9dzcd+uway/A==","shasum":"5d315771b24247104341beee297d39ffc17b671c","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-3.2.2.tgz","fileCount":43,"unpackedSize":159805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnMJfCRA9TVsSAnZWagAAUgoP/As2dPGXR86Fikb63WQo\ni1NV+Naw5mQrnJuABk3u3mAoW2N6KvLc32LMiBPYGk/tJeQk47IYjzCTb2jp\ntQc10/2bk8JJX6P1S4xPQnVbHPfDe8ThOuujeIIDZIvNzn8ZyBVDIs4mCBw6\n/Lkq+PtBlKbgt9q7bfAGu3oqZ5bCigRhtKrU3w0ZBaDfJgCY7aULiI7y6hYA\nPk7wvq5OW6HnV7NiMiidPgS8Rj3mesyYzk5kr2xRw0jtuDd5xAvIlMU4vdB+\nadJUVD67JXET5TOhI2D0pWAxLp07t0qUxMt6XpLEkJY3YwhasKz/GLGUJykw\nRtJ0rSIWR6JAGpfgLzcaaO7xDY0MmalhRZfEEp4VkJMQ40BEpaNxr6KFBNvh\nDiEY7hnjkg1LqiI2PKhybTXGguNwfByzM+NCI1tiUb+KMm4Wdtxd3pVbeM70\nShIqVwIwIjLtdmzkpKqhWstgZnUu+4WYPGsD375N+0c8bpKnQvq4uuemNjez\nigQ7FDSeeXm+vIHwBGNPoMVKXtTKCA03+KUC8Qr48Ccr1RTjoFBvoCHHLTQH\nNKgIE2tgmQKahESSeKhHewh6CJ56cnNx+vGtK/2HB/LkIlcHhyVruIoPc8UF\nryDOA9mp02/7nFAQm32c+vEmOhJU7La9uxil0pwuTDQgZAE3kFYlRul8/4Kg\n5ubx\r\n=faT6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFREutzLpwofsnqWz+3xvk+/hJ1MwFhba5F2o8Akfgh4AiBU9R5lLbpKrJ66lUu87+EF2E63qHaH8jMUu4+pTtTe/A=="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_3.2.2_1553777246684_0.3627880385537141"},"_hasShrinkwrap":false},"3.3.1":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"3.3.1","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"c145c84efb7993d929b68e95914217c4c174dc5a","_id":"@axmit/redux-communications@3.3.1","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-8zgLz5tvIYKvE4F/rlQfRM9ZPyOlQKYdQFSm8dbEQvjl9J1Bpg9I4qbBCGsUwr1BxvZdgefJX58Daph5LK3mXw==","shasum":"c04c25b42446294a458794fe76ab9b2de4bd4689","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-3.3.1.tgz","fileCount":43,"unpackedSize":165606,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJco3l4CRA9TVsSAnZWagAAyYsP/2pbSwHvtr6n/26NMstI\nID6bm+d+Qf0FcjVRs40BCNlSzioDUydapAlRXeFcmUAmygx0+hz4oCFDaqLx\nrqsAlP2TeBgNTKCgEeQBJS1i2SXBRUNe2H6HrQop3p/ut1fABhNVTRZV3MQ0\nlnwOxvB2cOpsAo+dtezOuAdLyxPV6tIl9ZZaUDfi7JtTlRRdUgyQwF1YGDUt\nj+XZ7zzcDTbOyVmnhX9NEjH9Wn7l+SdUfK+iTAKeUUaGmnpm/JchziReFD0V\nB0Y+NIdnu/Iy0tb7RCu2DKUXZ36+WGYD3s4lJuNlnI4imlpyfO3qmRP5hjRt\n5xISI7rIhhknbyXfAwuL3HtOUNsGke8sJKBRoVmIwzMql+Unu3bVRwYRKFR5\nTtGqXlV2FCFTzJShcmB3yQivUUMn3HMcpLEtVnvQOwnylYGaJNQyvLY/WUzl\nXTqpsSRsZk7nRdXa12R7OhOiplr5ludiZkUzLkI+y3VyJV3NLDV59fSotpaG\nRt5eVCg2EmaZLntiAWdOaObmFlG0vU9E6Y2jl5O7gVi5XWHHdKXBMwD0k2PJ\nMam0EELv4/RL5e6vudzB21brE1Jr2lThTeqmNOhOHdOP7jlgnC4hx4vieUXY\nHiAqdgv2tvMifz4LZM2A6aI2RRcoD+GWaaKJbZyPcrSpve4T4Nd6uDPdy3UQ\n4ELr\r\n=+X+2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDz32R/IMGLzhTeNnxxepbeL3LQM2tQft4igXY/LYKNdgIgPCPXXgENesei41R7vxjv91rF5NQSzbOSgzta3p6rShc="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_3.3.1_1554217335103_0.021866296260323104"},"_hasShrinkwrap":false},"3.2.2-beta.0":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"3.2.2-beta.0","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","readme":"# Redux communications\n\nThis package provides a toolset to simplify working with redux and saga libs.\n\n## Quick start\n\nTo create a new communication you should do the following:\n\n```\nconst namespace = 'line';\n//\nconst apiProvider = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (): Promise<any> => axios.get(`/lines`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.get)]: (line): Promise<any> => axios.get(`/lines/${line.id}`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.post)]: (line): Promise<any> => axios.post(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.put)]: (line): Promise<any> => axios.put(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.delete)]: (line): Promise<any> => axios.delete(`/lines/${line.id}`)\n};\n\nconst config = {\n  namespace,\n  apiProvider\n};\n\nconst strategy = new CRUDStrategy(config);\n\nconst communicationLine = buildCommunication(strategy);\n```\n\nAfter that you will have a communication that contains base set of reducers, actions and sagas. You can easily setup it as usual...\n\n```\n//Sagas setup\nexport default function* rootSaga(): any {\n  yield all([\n    ...communicationLine.sagas\n  ]);\n}\n\n//Reducers setup\nconst reducers = {\n  ...communicationLine.reducers\n};\n\n//To put actions in component\nconst mapDispatchToProps = {\n  ...communicationLine.actions\n};\n\nconst { data, loading } = state.line.model;\n\nreturn {\n    linesList: data\n};\n\nexport default connect(\n  mapStateToProps,\n  mapDispatchToProps\n)(SomeComponent);\n\n\n//Actions usage\ncomponentDidMount(){\n    this.props.dispatchAction(communicationLine.namespace, 'collection', actionsTypes.get, payload);\n}\n\n```\n\n## Detailed explanation\n\nThe idea of this package is to provide a simple way (toolset) of generating event publishers and subscribers.\n\n### **!!! _IMPORTANT_ !!!**\n\n> If you want to understand this module completely you should be familiar with publisher-subscriber pattern (https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern).\n> Because in fact this pattern underlies for Redux/Saga communication.\n\nIn fact we have:\n\n1. event publisher\n   - actions - common example for generating events\n2. event subscriber reducer\n   - reducer - common example for handling events and update the store\n   - saga - handlers that can be used for side effects and generating new event\n\nActually each async action consists of 3 actions:\n\n1. Start action - triggered to start execution of async call\n2. Success action - called if action finished with success\n3. Fail action - called if action finished with fail\n\nWe can use reducers to update the store depending on action type and use sagas to generate some actions depending on results of other actions.\n\nFor example we can handle _USER_MODEL_GET_SUCCESS_ action and after that generate action _TASK_COLLECTION_GET_START_ to start getting collection of tasks for current user.\n\n## Store structure:\n\nThe store consists of namespaces that are divided into branches. Each branch contains 3 fields:\n\n1. Data - data for this branch\n2. Loading - status of data loading of this branch\n3. Errors - errors for branch if there are any\n4. Params - params that are provided in the start action\n   For more details see implementation in ./src/buildReducer.ts\n\n#### Example:\n\nNamespace - user\nBranches - model, collection\n\n```\nstore = {\n    user: {\n        model: {\n            data: {\n                data: {\n                    id: 1\n                    firstName: \"Ivan\",\n                    lastName: \"Tershukov\"\n                },\n                meta: {\n                    lastLoginAt: '01.01.19 12:00'\n                }\n            },\n            params: 1, // id of current model\n            loading: false,\n            errors: null\n        },\n        collection: {\n            data: {\n                data: [\n                    {\n                        id: 1\n                        firstName: \"Ivan\",\n                        lastName: \"Tershukov\"\n                    },\n                    {\n                        id: 2\n                        firstName: \"Yana\",\n                        lastName: \"Banina\"\n                    },\n                    {\n                        id: 3\n                        firstName: \"Mike\",\n                        lastName: \"Sidorov\"\n                    }\n                ],\n                meta: {\n                    limit: 100,\n                    offset: 0,\n                    q: ''\n                }\n            },\n            params: {\n                order: 'asc',\n                limir: 10,\n                offset: 50\n            },\n            loading: false,\n            errors: null\n        }\n    }\n}\n```\n\n## Strategy:\n\nThe strategy determines which part of communication logic will be generated.\nThe most common strategy is Base strategy.\nTo initialize any strategy you should use Config.\n\n### CRUD strategy\n\nWill generate actions, reducers and sagas for 2 base branches:\n\n1. Model\n2. Collection\n\nExample:\n\n```\n// To create a strategy you should provide a config\nconst strategy = new CRUDStrategy(config);\n\nconst communicationLine = buildCommunication(strategy);\n```\n\n### Base strategy\n\nIf you want you can give any names to branches, but preferably use 'model' for entity which you will work on and 'collection' for list of entities.\n\n## Config\n\nConfig is needed to tune strategy behaviour. Config can be more or less complicated depending on strategy type.\nEach config should contain namespace and API provider.\nFor Base strategy you also should provide the list of branches.\n\n## API Provider\n\nIt's an object that contains implementation for side effects calls.\nThe most common example are API calls, but it can also contain any async calls to Local storage, DB, etc.\n\n## Branches\n\nBranch describes behavior for branch of the store. At the moment it includes only a branch name.\nAnd if needed you can also setup initial state for the branch.\n\n## Toolset\n\nThis package also contains a toolset that simplifies your life.\nFor example you can easy generate types for actions:\n\n```\ngetStartType('users', 'model', 'get') => USERS_MODEL_GET_TRY\ngetSuccessType('users', 'model', 'get') => USERS_MODEL_GET_SUCCESS\ngetFailType('users', 'model', 'get') => USERS_MODEL_GET_FAIL\n```\n\nAlso you can easily generate names for API provider methods\n\n```\ngetAPIMethodName('users', 'model', 'GET') => getUsersModel\n```\n\nMore examples see in: ./src/helpers.spec.ts\n\n## Types of actions\n\nactionsTypes - it's enum with base set of default actions.\nAt at the moment it supports _init_, _clear_, _add_, _get_, _update_ and _delete_ types.\n\n## Sagas combinations\n\nIf you want to add sagas you can just add them directly in communication sagas array or in the root saga.\n\n```\nfunction* getEmptyCollection(action: any) {\n  // Here you can use put to generate action or call to call any async funtions\n  ...\n}\n\nfunction* getEmptyCollectionSaga() {\n  const successActionType = getSuccessType(namespace, 'collection', actionsTypes.get);\n\n  yield takeEvery(successActionType, getEmptyCollection);\n}\n```\n\nand then\n\n```\ncommunicationLine.sagas.push(getEmptyCollectionSaga());\n\n```\n\nor\n\n```\nexport default function* rootSaga(): any {\n  yield all([\n    getEmptyCollectionSaga(),\n    ...\n  ]);\n}\n\n```\n","readmeFilename":"README.md","gitHead":"0d029982f6ec5ff157af6b802e4030d4eb06304e","_id":"@axmit/redux-communications@3.2.2-beta.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"axmit-engineers","email":"engineers@axmit.com"},"dist":{"integrity":"sha512-2Uy+dPOTumjP4tXlZiZP2eavE88Ny1Iiyff0JT1XHUQVkURE8IeDbvbKgEFQ5DNEUB0+N5cM02aAqM6ILiC2yg==","shasum":"b5528d4941b346d5adaa067fd6e3e8549d7cfcaa","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-3.2.2-beta.0.tgz","fileCount":49,"unpackedSize":176583,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJco3oSCRA9TVsSAnZWagAAYJ8QAIi0ZUx+5o+KPzFeaPs3\nGan/TTt8C1VByDjZn8tsZ7rFFvC9vEQw6pJa2r8WA5QA49TLDeAo8rqxqLqg\nUV2SoCksaeAj6G9w21E+VX8UONoXPc92cZUcNp22Vb5CKz3lawPnBwTyJ7wy\nW1eDTU4Ys9QD3dqflSY2uAEoI1oFbiPGIuv/Qkc/Ff9Juw0fvCS9+WwGENZt\nRVAj080oQKbIYWPn5AqEda/LS8R93IeLUpjIoy7fdtL5jeWp5HTFXFtzliVP\nMNSaG218psrBfCL3+C20zP/CQ/2BjrDI5S7tr7LH2oAWw3pQE8QTjMKl8yt1\njois+T5DGDB7hFIaNV0S+NAJYtiRWyL/pHc7zcOAa1O20iiRi6RbyF/KHOzV\nm7gQkedyfNyfIQdUVQScJ6qAkz7c1iSQ5V5tS4py8NpU2dRTROxozmPGwLDi\nIL/8IpKRNICRpf9PVi7xL9lkzE/QC+3uQaemjqduifslOtfI+yk3Ej6gZbmW\nkRy09P2PsFv61VcxmAmKNtYFhz+BCpnLG4we9rlHIwr71PzEltvUfM9oh+Yl\n7aeNBrmGtEGWfRlQ3qC0uJLNJMHA1tE68rPyPEfnEqT3PUJ0AL7QuGbsFWvX\nQG/25ldlYwJnszWB395dY+JuiGZz6RmBqpt56p9B6/9bCWiD7zTeH8hNWZFa\ng8Cn\r\n=idyt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBdlSF93lcJxDMuVqzfvLlvN7eNU0lz4HMYx227tADm8AiAj21LLnOMEb8nEbBpBWedWM9bWniTNATrURqR85kujVQ=="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_3.2.2-beta.0_1554217488705_0.21516843169674105"},"_hasShrinkwrap":false},"3.2.2-beta.1":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"3.2.2-beta.1","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","readme":"# Redux communications\n\nThis package provides a toolset to simplify working with redux and saga libs.\n\n## Quick start\n\nTo create a new communication you should do the following:\n\n```\nconst namespace = 'line';\n//\nconst apiProvider = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (): Promise<any> => axios.get(`/lines`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.get)]: (line): Promise<any> => axios.get(`/lines/${line.id}`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.post)]: (line): Promise<any> => axios.post(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.put)]: (line): Promise<any> => axios.put(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.delete)]: (line): Promise<any> => axios.delete(`/lines/${line.id}`)\n};\n\nconst config = {\n  namespace,\n  apiProvider\n};\n\nconst strategy = new CRUDStrategy(config);\n\nconst communicationLine = buildCommunication(strategy);\n```\n\nAfter that you will have a communication that contains base set of reducers, actions and sagas. You can easily setup it as usual...\n\n```\n//Sagas setup\nexport default function* rootSaga(): any {\n  yield all([\n    ...communicationLine.sagas\n  ]);\n}\n\n//Reducers setup\nconst reducers = {\n  ...communicationLine.reducers\n};\n\n//To put actions in component\nconst mapDispatchToProps = {\n  ...communicationLine.actions\n};\n\nconst { data, loading } = state.line.model;\n\nreturn {\n    linesList: data\n};\n\nexport default connect(\n  mapStateToProps,\n  mapDispatchToProps\n)(SomeComponent);\n\n\n//Actions usage\ncomponentDidMount(){\n    this.props.dispatchAction(communicationLine.namespace, 'collection', actionsTypes.get, payload);\n}\n\n```\n\n## Detailed explanation\n\nThe idea of this package is to provide a simple way (toolset) of generating event publishers and subscribers.\n\n### **!!! _IMPORTANT_ !!!**\n\n> If you want to understand this module completely you should be familiar with publisher-subscriber pattern (https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern).\n> Because in fact this pattern underlies for Redux/Saga communication.\n\nIn fact we have:\n\n1. event publisher\n   - actions - common example for generating events\n2. event subscriber reducer\n   - reducer - common example for handling events and update the store\n   - saga - handlers that can be used for side effects and generating new event\n\nActually each async action consists of 3 actions:\n\n1. Start action - triggered to start execution of async call\n2. Success action - called if action finished with success\n3. Fail action - called if action finished with fail\n\nWe can use reducers to update the store depending on action type and use sagas to generate some actions depending on results of other actions.\n\nFor example we can handle _USER_MODEL_GET_SUCCESS_ action and after that generate action _TASK_COLLECTION_GET_START_ to start getting collection of tasks for current user.\n\n## Store structure:\n\nThe store consists of namespaces that are divided into branches. Each branch contains 3 fields:\n\n1. Data - data for this branch\n2. Loading - status of data loading of this branch\n3. Errors - errors for branch if there are any\n4. Params - params that are provided in the start action\n   For more details see implementation in ./src/buildReducer.ts\n\n#### Example:\n\nNamespace - user\nBranches - model, collection\n\n```\nstore = {\n    user: {\n        model: {\n            data: {\n                data: {\n                    id: 1\n                    firstName: \"Ivan\",\n                    lastName: \"Tershukov\"\n                },\n                meta: {\n                    lastLoginAt: '01.01.19 12:00'\n                }\n            },\n            params: 1, // id of current model\n            loading: false,\n            errors: null\n        },\n        collection: {\n            data: {\n                data: [\n                    {\n                        id: 1\n                        firstName: \"Ivan\",\n                        lastName: \"Tershukov\"\n                    },\n                    {\n                        id: 2\n                        firstName: \"Yana\",\n                        lastName: \"Banina\"\n                    },\n                    {\n                        id: 3\n                        firstName: \"Mike\",\n                        lastName: \"Sidorov\"\n                    }\n                ],\n                meta: {\n                    limit: 100,\n                    offset: 0,\n                    q: ''\n                }\n            },\n            params: {\n                order: 'asc',\n                limir: 10,\n                offset: 50\n            },\n            loading: false,\n            errors: null\n        }\n    }\n}\n```\n\n## Strategy:\n\nThe strategy determines which part of communication logic will be generated.\nThe most common strategy is Base strategy.\nTo initialize any strategy you should use Config.\n\n### CRUD strategy\n\nWill generate actions, reducers and sagas for 2 base branches:\n\n1. Model\n2. Collection\n\nExample:\n\n```\n// To create a strategy you should provide a config\nconst strategy = new CRUDStrategy(config);\n\nconst communicationLine = buildCommunication(strategy);\n```\n\n### Base strategy\n\nIf you want you can give any names to branches, but preferably use 'model' for entity which you will work on and 'collection' for list of entities.\n\n## Config\n\nConfig is needed to tune strategy behaviour. Config can be more or less complicated depending on strategy type.\nEach config should contain namespace and API provider.\nFor Base strategy you also should provide the list of branches.\n\n## API Provider\n\nIt's an object that contains implementation for side effects calls.\nThe most common example are API calls, but it can also contain any async calls to Local storage, DB, etc.\n\n## Branches\n\nBranch describes behavior for branch of the store. At the moment it includes only a branch name.\nAnd if needed you can also setup initial state for the branch.\n\n## Toolset\n\nThis package also contains a toolset that simplifies your life.\nFor example you can easy generate types for actions:\n\n```\ngetStartType('users', 'model', 'get') => USERS_MODEL_GET_TRY\ngetSuccessType('users', 'model', 'get') => USERS_MODEL_GET_SUCCESS\ngetFailType('users', 'model', 'get') => USERS_MODEL_GET_FAIL\n```\n\nAlso you can easily generate names for API provider methods\n\n```\ngetAPIMethodName('users', 'model', 'GET') => getUsersModel\n```\n\nMore examples see in: ./src/helpers.spec.ts\n\n## Types of actions\n\nactionsTypes - it's enum with base set of default actions.\nAt at the moment it supports _init_, _clear_, _add_, _get_, _update_ and _delete_ types.\n\n## Sagas combinations\n\nIf you want to add sagas you can just add them directly in communication sagas array or in the root saga.\n\n```\nfunction* getEmptyCollection(action: any) {\n  // Here you can use put to generate action or call to call any async funtions\n  ...\n}\n\nfunction* getEmptyCollectionSaga() {\n  const successActionType = getSuccessType(namespace, 'collection', actionsTypes.get);\n\n  yield takeEvery(successActionType, getEmptyCollection);\n}\n```\n\nand then\n\n```\ncommunicationLine.sagas.push(getEmptyCollectionSaga());\n\n```\n\nor\n\n```\nexport default function* rootSaga(): any {\n  yield all([\n    getEmptyCollectionSaga(),\n    ...\n  ]);\n}\n\n```\n","readmeFilename":"README.md","gitHead":"5eec8a00fda5353296d8c348f3fc889aa0b76b03","_id":"@axmit/redux-communications@3.2.2-beta.1","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"axmit-engineers","email":"engineers@axmit.com"},"dist":{"integrity":"sha512-kfMcKYrJXZVxChAmaFBVvm4n3wimScftaYOKsCQWHH+d1dMJNbh8KuJFxIP3lMNLVONC1B6XqDoW0cVtuhIGfQ==","shasum":"d76c072beb42c29bd8d523d9bc2a748da28618c0","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-3.2.2-beta.1.tgz","fileCount":49,"unpackedSize":169657,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJco35CCRA9TVsSAnZWagAAQzsP/33ymBhowP3MSXiUe3K5\nZNeiGVKIgmQoKhNcn3+GQxG5xOQK8r1jQn7Ge0EQQU/Cr31PdGs93sO9ubRp\nnOQsIyzorfW0yDZKRAhqlhSd1EidJTt9zKsSIxaBT7sgZ1VzMBWv1aXyP9Bt\nJdVQFQvaIs004k21Cw6bpzIz5anrX1NMaMv1n/MAss/fRslXhB6pKrDQ0E4/\nnMY4MZkYka3UNFKIySwbDTK5G9YAGsb0mA+ZVZ56ASBwDjFJaHtPjrTY9mn4\n3gs5zBrxrdFmOJM4kPmPJ5hP0lYMxBR1LSUnx9jWyhOdRjE1/7XYcCxzEK49\nJHbnSzQasvRc+vl5KTFSMKPToVo+Hx8L0hWmrsXX5keFziQOFryos8b4vm0c\n98eKPTyIclqRHvlzPxLoAY8/ixJdTpa9+T64Hdcdf72JiynSYX9mPwWzjcue\nWaTy3rImTqCVGCJKmVD35IUYRAxdwm0kphoNRcz+f11W+fzZ6iarovISmaJC\ndXjzCsW0kRjWCO0GbOh4Is1cuMMHDmHd3UvaSO3OlVrsxmbLSAqpbJ9rKLag\np2EYS3FUTQoJp/QpXm/K50lDTrMb3v4XZwU26CyblNY9pjM8aVgJB9SFypqA\n2DE47ou69R0YV35sFKjnfk/YCqpp4Rrmu0ABg50TFEl8G/fYMlK7UP/LM5SJ\nkQ4E\r\n=E4j2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHP0XnknX+qQGx4VQo5a1im/fP9I+ZPeD71cZ1uYoUBnAiAzRlkVkm14QqkDLGOlaIKFAgubu5+b5lxZXIJq3bBRYg=="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_3.2.2-beta.1_1554218562400_0.9554588937632749"},"_hasShrinkwrap":false},"4.0.0-beta.0":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"4.0.0-beta.0","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"973a9d3490a0d75cac792fb897c51e2388202955","_id":"@axmit/redux-communications@4.0.0-beta.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"axmit-engineers","email":"engineers@axmit.com"},"dist":{"integrity":"sha512-As2K1pwIMMCiIzkqL9MEwzPbEAPT/LG5v5Z5zrt56ansZtmqWmSLXjXYjN6ESx02Jk3M6+Zwslo8cBU+BLLAPg==","shasum":"0f9e521b5bc45a86028781114467bd36f75de16f","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-4.0.0-beta.0.tgz","fileCount":49,"unpackedSize":174469,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJco6nYCRA9TVsSAnZWagAADqAP/R5e8wHDTEZxQssbvbAp\nTAQm3bxyuRv+Cf1mCNKp5TWipnhaCSMkfjKO+e0/4RzexCGpKZX4mCwZu/Jk\nbfXDKd3jkbuwUX2uzxEp3fjGkLtUty6Lz8SZCUWgFgb8afVVyl49mn/s/7SA\ntZN35ZQZBpyTRnvxnb8+iDXOPVemmN6rgxpV5emkpTH8CjrD7zBaeSdOaxEI\nAmZoXAe7y8PT/TZqwtt+3dVPUrOurjtUuFNXcD89S75Hi7ms691mJ/MzZGG9\nZl98bNwUi+7NEIu5VTEZXCTCs1UqaCuqKa7a64sNm3hJib377fyeLMYyKtUD\nqaiOJfBH0AbTUATinZ0f1J8Y5cva1RRgLbCOzOb0o4LJERHDjZ5YQCQFUsof\nQhvLXR4dlwRyJWE8mEMM6s+ismcH+r60XdiolKVlHusQ/cx9dxgJrhPm0hVE\nWO84L+zZjWVDZatTN+qCCUTQIvXMorA3OtViyPmKVXVt7Si1++l6jS1Czf66\nk4cfxdAuQJHuXqgHcFyeE9ws9QFTSUYQXLJzpfjUau/eokejE1WIUnu4uMig\nJVjtuh5ri5ZxgAO5cWJ41lDb9prWcHADyWdbWYjBH7vcWfxItTDubnrI2b37\ngvaqJISPZNa+iCWARrvD6bJB2DlEbE4Qu/9NnEJ65NdN4Xj8GFmMPqr4wvnV\nCEGp\r\n=XvPs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyaBGF9a4VSasOONhgNW7Q7pgNZhdUfC4NziQ+zRQiJQIhAIsqL16w+upBpLu98v0UhnuhUmEtd2+s/v46g6A2wSJS"}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_4.0.0-beta.0_1554229719542_0.22618559715072295"},"_hasShrinkwrap":false},"3.3.2":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"3.3.2","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"667f4f107c98f5d2da2ca911393e1a6989ecf7c3","_id":"@axmit/redux-communications@3.3.2","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"axmit-engineers","email":"engineers@axmit.com"},"dist":{"integrity":"sha512-oXJQVutuc7ZYwK8mF5lmcqtELFd72l4WkLFAn0Q7AFfnwkznG4zIhRQShbAVL7Rr+QG2luRQbW7iZQ7k0+uV2w==","shasum":"10d49a144ac4b85d0be3267571104ab5d382971d","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-3.3.2.tgz","fileCount":43,"unpackedSize":165606,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJco6oyCRA9TVsSAnZWagAAyRIP/jPV+ZTh068Eb6den5te\n/1EtsNOwmfTDtpacEpeyqDFU6zpyd6HN1S/tM/8LatwT09/kyGd+rOgjjku/\nt3yzEdQmoW2X0RFvHRKqic9d4dOw85UeAI3TRenfmRjbCgbnJC6aW5XqyCHX\nqXGo+0NsmD4+6VZVBi9Lgv3TNDHAldHw0TAWGymAUsGlfxihogL6Pb8OkacK\nXyQGj8JsCRJ6ONEKUPqWDqoN3yWUBGH4EVI2wb6a4C5gAVfkGfDMMSmkN57l\n1bYh7lbMNMEkJpiiPDYOGHPIIfqTCRLrL7kq3G4sIrD6uHju713LWxMsB9jp\nGrAtOmOgeFaSeuRJZRVYG4s3qalsZ2TF/9brkhvubtiml092wpbteLXsEYDN\noyX7Z+WTFde4wDFiNflKhRocKeHgzHh4mpLVKi1HTALdFoYcaakCAyzXVYHG\nenCEArIWgyb1j/D+P6jEEX7JdPh1tUUPT2Jrbq2pJ7wLj5JVoF1I6xJVi7Vc\nvsbCeSaV5GLJrJY/W/RgRFjFXgwQHWpMlTUlEs/jdnk5OSPTD+Ngzxy0DZxT\nhgI32NUoCFqtV1ErO52sB+8jprzhqN5rzzgEKCvCRwhqQHL8uT5KesYDR/PH\n7DmQV7Rk+GHX4m+PcgIRj3LiUTHEkUeH4FSblBu/50v8mqpgQypzFdNgMu2G\ncoBF\r\n=RgwZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEYTgLF7ChlkhnheVu3C6T5ltC4LhPfUs9DsKjVTVLvtAiEA9fEnOU+EpNtHMlXFfBQQDD9pqBisWSRPVfk5oNkeEDo="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_3.3.2_1554229809786_0.2860492699224495"},"_hasShrinkwrap":false},"4.0.0-beta.1":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"4.0.0-beta.1","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","readme":"# Redux communications\n\nThis package provides a toolset to simplify working with redux and saga libs.\n\n## Quick start\n\nTo create a new communication you should do the following:\n\n```\nconst namespace = 'line';\n//\nconst apiProvider = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (): Promise<any> => axios.get(`/lines`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.get)]: (line): Promise<any> => axios.get(`/lines/${line.id}`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.post)]: (line): Promise<any> => axios.post(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.put)]: (line): Promise<any> => axios.put(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.delete)]: (line): Promise<any> => axios.delete(`/lines/${line.id}`)\n};\n\nconst config = {\n  namespace,\n  apiProvider\n};\n\nconst strategy = new CRUDStrategy(config);\n\nconst communicationLine = buildCommunication(strategy);\n```\n\nAfter that you will have a communication that contains base set of reducers, actions and sagas. You can easily setup it as usual...\n\n```\n//Sagas setup\nexport default function* rootSaga(): any {\n  yield all([\n    ...communicationLine.sagas\n  ]);\n}\n\n//Reducers setup\nconst reducers = {\n  ...communicationLine.reducers\n};\n\n//To put actions in component\nconst mapDispatchToProps = {\n  ...communicationLine.actions\n};\n\nconst { data, loading } = state.line.model;\n\nreturn {\n    linesList: data\n};\n\nexport default connect(\n  mapStateToProps,\n  mapDispatchToProps\n)(SomeComponent);\n\n\n//Actions usage\ncomponentDidMount(){\n    this.props.dispatchAction(communicationLine.namespace, 'collection', actionsTypes.get, payload);\n}\n\n```\n\n## Detailed explanation\n\nThe idea of this package is to provide a simple way (toolset) of generating event publishers and subscribers.\n\n### **!!! _IMPORTANT_ !!!**\n\n> If you want to understand this module completely you should be familiar with publisher-subscriber pattern (https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern).\n> Because in fact this pattern underlies for Redux/Saga communication.\n\nIn fact we have:\n\n1. event publisher\n   - actions - common example for generating events\n2. event subscriber reducer\n   - reducer - common example for handling events and update the store\n   - saga - handlers that can be used for side effects and generating new event\n\nActually each async action consists of 3 actions:\n\n1. Start action - triggered to start execution of async call\n2. Success action - called if action finished with success\n3. Fail action - called if action finished with fail\n\nWe can use reducers to update the store depending on action type and use sagas to generate some actions depending on results of other actions.\n\nFor example we can handle _USER_MODEL_GET_SUCCESS_ action and after that generate action _TASK_COLLECTION_GET_START_ to start getting collection of tasks for current user.\n\n## Store structure:\n\nThe store consists of namespaces that are divided into branches. Each branch contains 3 fields:\n\n1. Data - data for this branch\n2. Loading - status of data loading of this branch\n3. Errors - errors for branch if there are any\n4. Params - params that are provided in the start action\n   For more details see implementation in ./src/buildReducer.ts\n\n#### Example:\n\nNamespace - user\nBranches - model, collection\n\n```\nstore = {\n    user: {\n        model: {\n            data: {\n                data: {\n                    id: 1\n                    firstName: \"Ivan\",\n                    lastName: \"Tershukov\"\n                },\n                meta: {\n                    lastLoginAt: '01.01.19 12:00'\n                }\n            },\n            params: 1, // id of current model\n            loading: false,\n            errors: null\n        },\n        collection: {\n            data: {\n                data: [\n                    {\n                        id: 1\n                        firstName: \"Ivan\",\n                        lastName: \"Tershukov\"\n                    },\n                    {\n                        id: 2\n                        firstName: \"Yana\",\n                        lastName: \"Banina\"\n                    },\n                    {\n                        id: 3\n                        firstName: \"Mike\",\n                        lastName: \"Sidorov\"\n                    }\n                ],\n                meta: {\n                    limit: 100,\n                    offset: 0,\n                    q: ''\n                }\n            },\n            params: {\n                order: 'asc',\n                limir: 10,\n                offset: 50\n            },\n            loading: false,\n            errors: null\n        }\n    }\n}\n```\n\n## Strategy:\n\nThe strategy determines which part of communication logic will be generated.\nThe most common strategy is Base strategy.\nTo initialize any strategy you should use Config.\n\n### CRUD strategy\n\nWill generate actions, reducers and sagas for 2 base branches:\n\n1. Model\n2. Collection\n\nExample:\n\n```\n// To create a strategy you should provide a config\nconst strategy = new CRUDStrategy(config);\n\nconst communicationLine = buildCommunication(strategy);\n```\n\n### Base strategy\n\nIf you want you can give any names to branches, but preferably use 'model' for entity which you will work on and 'collection' for list of entities.\n\n## Config\n\nConfig is needed to tune strategy behaviour. Config can be more or less complicated depending on strategy type.\nEach config should contain namespace and API provider.\nFor Base strategy you also should provide the list of branches.\n\n## API Provider\n\nIt's an object that contains implementation for side effects calls.\nThe most common example are API calls, but it can also contain any async calls to Local storage, DB, etc.\n\n## Branches\n\nBranch describes behavior for branch of the store. At the moment it includes only a branch name.\nAnd if needed you can also setup initial state for the branch.\n\n### Example\n\n```\nconst namespace = 'auth';\n\nconst apiProvider = {\n  [getAPIMethodName(namespace, 'registration', 'post')]: (data): Promise<any> => axios.post('/registration', data),\n  //Async state init\n  [getAPIMethodName(namespace, 'model', 'init')]: (): Promise<any> => getCreds().then(data => ({ data })),\n  [getAPIMethodName(namespace, 'model', 'get')]: (): Promise<any> => axios.get('/auth'),\n  [getAPIMethodName(namespace, 'model', 'post')]: (data): Promise<any> => axios.post('/auth', data),\n  [getAPIMethodName(namespace, 'model', 'delete')]: (data): Promise<any> => axios.delete('/auth', data),\n  [getAPIMethodName(namespace, 'reset', 'post')]: (data): Promise<any> => axios.post('/password-reset', data),\n  [getAPIMethodName(namespace, 'reset', 'put')]: (data): Promise<any> => axios.put('/password-reset', data),\n  [getAPIMethodName(namespace, 'reset', 'delete')]: (): Promise<any> => Promise.resolve({})\n};\n\nconst config = {\n  namespace,\n  apiProvider,\n  branches: [new Branch('registration'), new Branch('model'), new Branch('reset')]\n};\n\nconst strategy = new BaseStrategy(config);\n\nconst communicationAuth = buildCommunication(strategy);\n```\n\n## Toolset\n\nThis package also contains a toolset that simplifies your life.\nFor example you can easy generate types for actions:\n\n```\ngetStartType('users', 'model', 'get') => USERS_MODEL_GET_TRY\ngetSuccessType('users', 'model', 'get') => USERS_MODEL_GET_SUCCESS\ngetFailType('users', 'model', 'get') => USERS_MODEL_GET_FAIL\n```\n\nAlso you can easily generate names for API provider methods\n\n```\ngetAPIMethodName('users', 'model', 'GET') => getUsersModel\n```\n\nMore examples see in: ./src/helpers.spec.ts\n\n## Types of actions\n\nactionsTypes - it's enum with base set of default actions.\nAt at the moment it supports _init_, _clear_, _add_, _get_, _update_ and _delete_ types.\n\n## Sagas combinations\n\nIf you want to add sagas you can just add them directly in communication sagas array or in the root saga.\n\n```\nfunction* getEmptyCollection(action: any) {\n  // Here you can use put to generate action or call to call any async funtions\n  ...\n}\n\nfunction* getEmptyCollectionSaga() {\n  const successActionType = getSuccessType(namespace, 'collection', actionsTypes.get);\n\n  yield takeEvery(successActionType, getEmptyCollection);\n}\n```\n\nand then\n\n```\ncommunicationLine.sagas.push(getEmptyCollectionSaga());\n\n```\n\nor\n\n```\nexport default function* rootSaga(): any {\n  yield all([\n    getEmptyCollectionSaga(),\n    ...\n  ]);\n}\n\n```\n\n## Response formatting\n\nIf you want format or map responses from API Provider you can use `responseFormatter`. Just put it in the config.\n\n### Example:\n\n```\nconst responseFormatter = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    const resultData = [ ...branchState.data, ... response.data.items];\n    const resultMeta = { count: branchState.meta.count + response.meta.count};\n    return {data: resultData, meta: resultMeta};\n  }\n}\n```\n\n## Hooks\n\nYou can specify post hooks for `success` and `fail` sagas to prevent creation custom sagas\nif you just want to do some sync operations.\n\n### Example\n\n```\nconst postSuccessHooks = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    console.log(response, payload, branchState, state);\n  }\n}\n\nconst postFailHooks = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    console.log(response, payload, branchState, state);\n  }\n}\n```\n\n## Full example:\n\n```\nconst namespace = 'line';\n//\nconst apiProvider = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (): Promise<any> => axios.get(`/lines`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.get)]: (line): Promise<any> => axios.get(`/lines/${line.id}`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.post)]: (line): Promise<any> => axios.post(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.put)]: (line): Promise<any> => axios.put(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.delete)]: (line): Promise<any> => axios.delete(`/lines/${line.id}`)\n};\n\nconst responseFormatter = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    const resultData = [ ...branchState.data, ... response.data.items];\n    const resultMeta = { count: branchState.meta.count + response.meta.count};\n    return {data: resultData, meta: resultMeta};\n  }\n};\n\nconst postSuccessHooks = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    console.log(response, payload, branchState, state);\n  }\n}\n\nconst config = {\n  namespace,\n  apiProvider,\n  responseFormatter,\n  postSuccessHooks\n};\n\nconst strategy = new CRUDStrategy(config);\n\nconst communicationLine = buildCommunication(strategy);\n```\n\n## Troubleshooting\n\n1. Update version of saga\n","readmeFilename":"README.md","gitHead":"62f3332c9b7bea64919e351ea32c4e165664ba55","_id":"@axmit/redux-communications@4.0.0-beta.1","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"axmit-engineers","email":"engineers@axmit.com"},"dist":{"integrity":"sha512-3IudK7RIHyvaWzBn0FgTUMPhjN+J/8cwMjTTNpkEmgumqQfJSNMMmDtR7vIlYuG1oReK89WyzYsM34tm5RNxSQ==","shasum":"5acfb41eb91ba9cc7d83c6ad4f183ea0e52ca88d","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-4.0.0-beta.1.tgz","fileCount":49,"unpackedSize":174469,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJco6y4CRA9TVsSAnZWagAAIPMP/jlW8wt+37iGQ1Q7W68I\nMaj1CYbiW/dV8VSjZt71NwcukyzrFqxvr6pVBrCJRn3NfVcQTapGObWxp8Uq\npMd99BHlprcEL3M0VQsrYU5OgdGUv/pvirVP1xEijG9vA+/g/410AVKD52el\nwlTewjKyefjL0hQEvKW9r4VQcxXejXjouiRsMSDM28qMYwG5gr3Wxqr4TnVl\n/bpqAn5yUFIaP1bbl3pqMEuBsaoKDLYI0xms70tFcpWPcdk+cCVuCdv9RfKz\nzDYrEQWFU+v6MIIG5elbiV9OskMDQrhX3F1flQLSqv3C+6EWI2SK2X+gZ0F/\nkigxM2yLkcMQ/zntmaRpO7TbkHddChgytTPdM2XpXv3pLX6c/pmO+4pCdK8d\noIj0mhAXMvM6aRS6K0luhpI+rGAZc/SLNuzTeLkhHwy2gssuUEikrOvbCPLl\nJdvraVegHqG4bf3jNHwpob5WK3yBDIgGne9m59A8wmfxPxacT1Euy1ODhv8/\n5S75D4D3CggeSFMjCCGJo5hY84iyGYftz8QAD3djin8GX3ZauoMnePVsxcFi\nnXHKVlOTwzap+x5dUIASa4/oZjnMxX4KNAmKLHdXKTo/HhNRwnAlxeO/YLay\nt6Su4S/lW7+pNMZoWRwyTmPWo3k8+TsMf5b4AoUUkkYw58kccU7/CmHc7eD3\njYuV\r\n=dR6u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCIGBrRpbTMmFUxu3Heab6TYLPpbe0s4ghYdAsqmkUGtwIgGP6LjBu08nYBqWJwHC/Gmp4IsIdFNw5jTRX/Q8hVBOM="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_4.0.0-beta.1_1554230456278_0.5563298624314379"},"_hasShrinkwrap":false},"4.0.0-beta.2":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"4.0.0-beta.2","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","readme":"# Redux communications\n\nThis package provides a toolset to simplify working with redux and saga libs.\n\n## Quick start\n\nTo create a new communication you should do the following:\n\n```\nconst namespace = 'line';\n//\nconst apiProvider = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (): Promise<any> => axios.get(`/lines`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.get)]: (line): Promise<any> => axios.get(`/lines/${line.id}`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.post)]: (line): Promise<any> => axios.post(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.put)]: (line): Promise<any> => axios.put(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.delete)]: (line): Promise<any> => axios.delete(`/lines/${line.id}`)\n};\n\nconst config = {\n  namespace,\n  apiProvider\n};\n\nconst strategy = new CRUDStrategy(config);\n\nconst communicationLine = buildCommunication(strategy);\n```\n\nAfter that you will have a communication that contains base set of reducers, actions and sagas. You can easily setup it as usual...\n\n```\n//Sagas setup\nexport default function* rootSaga(): any {\n  yield all([\n    ...communicationLine.sagas\n  ]);\n}\n\n//Reducers setup\nconst reducers = {\n  ...communicationLine.reducers\n};\n\n//To put actions in component\nconst mapDispatchToProps = {\n  ...communicationLine.actions\n};\n\nconst { data, loading } = state.line.model;\n\nreturn {\n    linesList: data\n};\n\nexport default connect(\n  mapStateToProps,\n  mapDispatchToProps\n)(SomeComponent);\n\n\n//Actions usage\ncomponentDidMount(){\n    this.props.dispatchAction(communicationLine.namespace, 'collection', actionsTypes.get, payload);\n}\n\n```\n\n## Detailed explanation\n\nThe idea of this package is to provide a simple way (toolset) of generating event publishers and subscribers.\n\n### **!!! _IMPORTANT_ !!!**\n\n> If you want to understand this module completely you should be familiar with publisher-subscriber pattern (https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern).\n> Because in fact this pattern underlies for Redux/Saga communication.\n\nIn fact we have:\n\n1. event publisher\n   - actions - common example for generating events\n2. event subscriber reducer\n   - reducer - common example for handling events and update the store\n   - saga - handlers that can be used for side effects and generating new event\n\nActually each async action consists of 3 actions:\n\n1. Start action - triggered to start execution of async call\n2. Success action - called if action finished with success\n3. Fail action - called if action finished with fail\n\nWe can use reducers to update the store depending on action type and use sagas to generate some actions depending on results of other actions.\n\nFor example we can handle _USER_MODEL_GET_SUCCESS_ action and after that generate action _TASK_COLLECTION_GET_START_ to start getting collection of tasks for current user.\n\n## Store structure:\n\nThe store consists of namespaces that are divided into branches. Each branch contains 3 fields:\n\n1. Data - data for this branch\n2. Loading - status of data loading of this branch\n3. Errors - errors for branch if there are any\n4. Params - params that are provided in the start action\n   For more details see implementation in ./src/buildReducer.ts\n\n#### Example:\n\nNamespace - user\nBranches - model, collection\n\n```\nstore = {\n    user: {\n        model: {\n            data: {\n                data: {\n                    id: 1\n                    firstName: \"Ivan\",\n                    lastName: \"Tershukov\"\n                },\n                meta: {\n                    lastLoginAt: '01.01.19 12:00'\n                }\n            },\n            params: 1, // id of current model\n            loading: false,\n            errors: null\n        },\n        collection: {\n            data: {\n                data: [\n                    {\n                        id: 1\n                        firstName: \"Ivan\",\n                        lastName: \"Tershukov\"\n                    },\n                    {\n                        id: 2\n                        firstName: \"Yana\",\n                        lastName: \"Banina\"\n                    },\n                    {\n                        id: 3\n                        firstName: \"Mike\",\n                        lastName: \"Sidorov\"\n                    }\n                ],\n                meta: {\n                    limit: 100,\n                    offset: 0,\n                    q: ''\n                }\n            },\n            params: {\n                order: 'asc',\n                limir: 10,\n                offset: 50\n            },\n            loading: false,\n            errors: null\n        }\n    }\n}\n```\n\n## Strategy:\n\nThe strategy determines which part of communication logic will be generated.\nThe most common strategy is Base strategy.\nTo initialize any strategy you should use Config.\n\n### CRUD strategy\n\nWill generate actions, reducers and sagas for 2 base branches:\n\n1. Model\n2. Collection\n\nExample:\n\n```\n// To create a strategy you should provide a config\nconst strategy = new CRUDStrategy(config);\n\nconst communicationLine = buildCommunication(strategy);\n```\n\n### Base strategy\n\nIf you want you can give any names to branches, but preferably use 'model' for entity which you will work on and 'collection' for list of entities.\n\n## Config\n\nConfig is needed to tune strategy behaviour. Config can be more or less complicated depending on strategy type.\nEach config should contain namespace and API provider.\nFor Base strategy you also should provide the list of branches.\n\n## API Provider\n\nIt's an object that contains implementation for side effects calls.\nThe most common example are API calls, but it can also contain any async calls to Local storage, DB, etc.\n\n## Branches\n\nBranch describes behavior for branch of the store. At the moment it includes only a branch name.\nAnd if needed you can also setup initial state for the branch.\n\n### Example\n\n```\nconst namespace = 'auth';\n\nconst apiProvider = {\n  [getAPIMethodName(namespace, 'registration', 'post')]: (data): Promise<any> => axios.post('/registration', data),\n  //Async state init\n  [getAPIMethodName(namespace, 'model', 'init')]: (): Promise<any> => getCreds().then(data => ({ data })),\n  [getAPIMethodName(namespace, 'model', 'get')]: (): Promise<any> => axios.get('/auth'),\n  [getAPIMethodName(namespace, 'model', 'post')]: (data): Promise<any> => axios.post('/auth', data),\n  [getAPIMethodName(namespace, 'model', 'delete')]: (data): Promise<any> => axios.delete('/auth', data),\n  [getAPIMethodName(namespace, 'reset', 'post')]: (data): Promise<any> => axios.post('/password-reset', data),\n  [getAPIMethodName(namespace, 'reset', 'put')]: (data): Promise<any> => axios.put('/password-reset', data),\n  [getAPIMethodName(namespace, 'reset', 'delete')]: (): Promise<any> => Promise.resolve({})\n};\n\nconst config = {\n  namespace,\n  apiProvider,\n  branches: [new Branch('registration'), new Branch('model'), new Branch('reset')]\n};\n\nconst strategy = new BaseStrategy(config);\n\nconst communicationAuth = buildCommunication(strategy);\n```\n\n## Toolset\n\nThis package also contains a toolset that simplifies your life.\nFor example you can easy generate types for actions:\n\n```\ngetStartType('users', 'model', 'get') => USERS_MODEL_GET_TRY\ngetSuccessType('users', 'model', 'get') => USERS_MODEL_GET_SUCCESS\ngetFailType('users', 'model', 'get') => USERS_MODEL_GET_FAIL\n```\n\nAlso you can easily generate names for API provider methods\n\n```\ngetAPIMethodName('users', 'model', 'GET') => getUsersModel\n```\n\nMore examples see in: ./src/helpers.spec.ts\n\n## Types of actions\n\nactionsTypes - it's enum with base set of default actions.\nAt at the moment it supports _init_, _clear_, _add_, _get_, _update_ and _delete_ types.\n\n## Sagas combinations\n\nIf you want to add sagas you can just add them directly in communication sagas array or in the root saga.\n\n```\nfunction* getEmptyCollection(action: any) {\n  // Here you can use put to generate action or call to call any async funtions\n  ...\n}\n\nfunction* getEmptyCollectionSaga() {\n  const successActionType = getSuccessType(namespace, 'collection', actionsTypes.get);\n\n  yield takeEvery(successActionType, getEmptyCollection);\n}\n```\n\nand then\n\n```\ncommunicationLine.sagas.push(getEmptyCollectionSaga());\n\n```\n\nor\n\n```\nexport default function* rootSaga(): any {\n  yield all([\n    getEmptyCollectionSaga(),\n    ...\n  ]);\n}\n\n```\n\n## Response formatting\n\nIf you want format or map responses from API Provider you can use `responseFormatter`. Just put it in the config.\n\n### Example:\n\n```\nconst responseFormatter = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    const resultData = [ ...branchState.data, ... response.data.items];\n    const resultMeta = { count: branchState.meta.count + response.meta.count};\n    return {data: resultData, meta: resultMeta};\n  }\n}\n```\n\n## Hooks\n\nYou can specify post hooks for `success` and `fail` sagas to prevent creation custom sagas\nif you just want to do some sync operations.\n\n### Example\n\n```\nconst postSuccessHooks = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    console.log(response, payload, branchState, state);\n  }\n}\n\nconst postFailHooks = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    console.log(response, payload, branchState, state);\n  }\n}\n```\n\n## Full example:\n\n```\nconst namespace = 'line';\n//\nconst apiProvider = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (): Promise<any> => axios.get(`/lines`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.get)]: (line): Promise<any> => axios.get(`/lines/${line.id}`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.post)]: (line): Promise<any> => axios.post(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.put)]: (line): Promise<any> => axios.put(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.delete)]: (line): Promise<any> => axios.delete(`/lines/${line.id}`)\n};\n\nconst responseFormatter = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    const resultData = [ ...branchState.data, ... response.data.items];\n    const resultMeta = { count: branchState.meta.count + response.meta.count};\n    return {data: resultData, meta: resultMeta};\n  }\n};\n\nconst postSuccessHooks = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    console.log(response, payload, branchState, state);\n  }\n}\n\nconst config = {\n  namespace,\n  apiProvider,\n  responseFormatter,\n  postSuccessHooks\n};\n\nconst strategy = new CRUDStrategy(config);\n\nconst communicationLine = buildCommunication(strategy);\n```\n\n## Troubleshooting\n\n1. Update version of saga\n","readmeFilename":"README.md","gitHead":"527bd517c5d1f3c28760d5ce728d6880579d961a","_id":"@axmit/redux-communications@4.0.0-beta.2","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"axmit-engineers","email":"engineers@axmit.com"},"dist":{"integrity":"sha512-ABKqsVAvC8xxb25/U4eiJW63GMtwSjj2TVkJ9rVGCPFS7nQdNChwQ6LBAp4rDBUt/TMQRJNlRrP6Ziy4XzRngQ==","shasum":"f02f1064e2b8bb5e2c8a4aa4983b750d7ef6a042","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-4.0.0-beta.2.tgz","fileCount":49,"unpackedSize":174783,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJco7DTCRA9TVsSAnZWagAAdfYQAKLDSqR+UxgvBLYw3bmj\nZPDtzLpxmchet08a1Wi+++ekLFCXt+sTK7COh+6BMNFwjhb97iZP66jrIrwW\nPT98TunbQVswv+umyWqvu4C8QWj/LYWadO5C5x/RzNqf6fqrQBTKSCETWflc\nlDlifTpStf8C0cgOpm0r9de+0hUH2038eUzod4j4pCxW+VTYpzj31XEfzR6P\n0OTwJerMu1gd5dmUfhgUcj3G8rEku8SQ/GphC2fyWlGACdNRmVWpXqo2ibJq\nyCIB0Zgb1tX8xQPBQbwATLyXjyEnYFG9sOg19GTP01IXog4e78dbzFbifUft\n/DbTp6ISkTuvb62pLPsHQy1Q+/Yp0/z+GZtzGaAfLQIjkjBU2XWb1OpESgh0\nkHMvsyJrnaKQSdy8W6LyuEB8507DgM0fdfhGcKDXlljvPYGfKgxE/FfYRMww\nJBvac2T/wk1zPrC7oXtfABVroeMRwCi/KMcQwUjasMCGFy4i0/U2NgUud0v/\nbut8CywzDg7Tvqgi5V45JkMoEkMhJGIO/IbD4MF2JYu+saJ/zNm+asbTkQAM\nRdmkk+WMKdKSD8lowbAB41SDHLbwttCrwJ8z+3Zt86uKBt6VFuK7eqnGe5g5\nyOEOIEaMZSOEaOyQ7jU2en9BehrWjcZKZF27/cg9MoGXCIJH8U2VDcdDYuiM\nDmkA\r\n=F4Z1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICO5A/CvEt0CxX8xjW8UEh3iNi96qfgpSOt29AbRmK1cAiEA7qad0dBbdGIeU/izzQ0yeJ/F4UcvW94HVgX/J7vbB9Q="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_4.0.0-beta.2_1554231506562_0.11509746231149798"},"_hasShrinkwrap":false},"4.0.0-beta.3":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"4.0.0-beta.3","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","readme":"# Redux communications\n\nThis package provides a toolset to simplify working with redux and saga libs.\n\n## Quick start\n\nTo create a new communication you should do the following:\n\n```\nconst namespace = 'line';\n//\nconst apiProvider = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (): Promise<any> => axios.get(`/lines`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.get)]: (line): Promise<any> => axios.get(`/lines/${line.id}`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.post)]: (line): Promise<any> => axios.post(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.put)]: (line): Promise<any> => axios.put(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.delete)]: (line): Promise<any> => axios.delete(`/lines/${line.id}`)\n};\n\nconst config = {\n  namespace,\n  apiProvider\n};\n\nconst strategy = new CRUDStrategy(config);\n\nconst communicationLine = buildCommunication(strategy);\n```\n\nAfter that you will have a communication that contains base set of reducers, actions and sagas. You can easily setup it as usual...\n\n```\n//Sagas setup\nexport default function* rootSaga(): any {\n  yield all([\n    ...communicationLine.sagas\n  ]);\n}\n\n//Reducers setup\nconst reducers = {\n  ...communicationLine.reducers\n};\n\n//To put actions in component\nconst mapDispatchToProps = {\n  ...communicationLine.actions\n};\n\nconst { data, loading } = state.line.model;\n\nreturn {\n    linesList: data\n};\n\nexport default connect(\n  mapStateToProps,\n  mapDispatchToProps\n)(SomeComponent);\n\n\n//Actions usage\ncomponentDidMount(){\n    this.props.dispatchAction(communicationLine.namespace, 'collection', actionsTypes.get, payload);\n}\n\n```\n\n## Detailed explanation\n\nThe idea of this package is to provide a simple way (toolset) of generating event publishers and subscribers.\n\n### **!!! _IMPORTANT_ !!!**\n\n> If you want to understand this module completely you should be familiar with publisher-subscriber pattern (https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern).\n> Because in fact this pattern underlies for Redux/Saga communication.\n\nIn fact we have:\n\n1. event publisher\n   - actions - common example for generating events\n2. event subscriber reducer\n   - reducer - common example for handling events and update the store\n   - saga - handlers that can be used for side effects and generating new event\n\nActually each async action consists of 3 actions:\n\n1. Start action - triggered to start execution of async call\n2. Success action - called if action finished with success\n3. Fail action - called if action finished with fail\n\nWe can use reducers to update the store depending on action type and use sagas to generate some actions depending on results of other actions.\n\nFor example we can handle _USER_MODEL_GET_SUCCESS_ action and after that generate action _TASK_COLLECTION_GET_START_ to start getting collection of tasks for current user.\n\n## Store structure:\n\nThe store consists of namespaces that are divided into branches. Each branch contains 3 fields:\n\n1. Data - data for this branch\n2. Loading - status of data loading of this branch\n3. Errors - errors for branch if there are any\n4. Params - params that are provided in the start action\n   For more details see implementation in ./src/buildReducer.ts\n\n#### Example:\n\nNamespace - user\nBranches - model, collection\n\n```\nstore = {\n    user: {\n        model: {\n            data: {\n                data: {\n                    id: 1\n                    firstName: \"Ivan\",\n                    lastName: \"Tershukov\"\n                },\n                meta: {\n                    lastLoginAt: '01.01.19 12:00'\n                }\n            },\n            params: 1, // id of current model\n            loading: false,\n            errors: null\n        },\n        collection: {\n            data: {\n                data: [\n                    {\n                        id: 1\n                        firstName: \"Ivan\",\n                        lastName: \"Tershukov\"\n                    },\n                    {\n                        id: 2\n                        firstName: \"Yana\",\n                        lastName: \"Banina\"\n                    },\n                    {\n                        id: 3\n                        firstName: \"Mike\",\n                        lastName: \"Sidorov\"\n                    }\n                ],\n                meta: {\n                    limit: 100,\n                    offset: 0,\n                    q: ''\n                }\n            },\n            params: {\n                order: 'asc',\n                limir: 10,\n                offset: 50\n            },\n            loading: false,\n            errors: null\n        }\n    }\n}\n```\n\n## Strategy:\n\nThe strategy determines which part of communication logic will be generated.\nThe most common strategy is Base strategy.\nTo initialize any strategy you should use Config.\n\n### CRUD strategy\n\nWill generate actions, reducers and sagas for 2 base branches:\n\n1. Model\n2. Collection\n\nExample:\n\n```\n// To create a strategy you should provide a config\nconst strategy = new CRUDStrategy(config);\n\nconst communicationLine = buildCommunication(strategy);\n```\n\n### Base strategy\n\nIf you want you can give any names to branches, but preferably use 'model' for entity which you will work on and 'collection' for list of entities.\n\n## Config\n\nConfig is needed to tune strategy behaviour. Config can be more or less complicated depending on strategy type.\nEach config should contain namespace and API provider.\nFor Base strategy you also should provide the list of branches.\n\n## API Provider\n\nIt's an object that contains implementation for side effects calls.\nThe most common example are API calls, but it can also contain any async calls to Local storage, DB, etc.\n\n## Branches\n\nBranch describes behavior for branch of the store. At the moment it includes only a branch name.\nAnd if needed you can also setup initial state for the branch.\n\n### Example\n\n```\nconst namespace = 'auth';\n\nconst apiProvider = {\n  [getAPIMethodName(namespace, 'registration', 'post')]: (data): Promise<any> => axios.post('/registration', data),\n  //Async state init\n  [getAPIMethodName(namespace, 'model', 'init')]: (): Promise<any> => getCreds().then(data => ({ data })),\n  [getAPIMethodName(namespace, 'model', 'get')]: (): Promise<any> => axios.get('/auth'),\n  [getAPIMethodName(namespace, 'model', 'post')]: (data): Promise<any> => axios.post('/auth', data),\n  [getAPIMethodName(namespace, 'model', 'delete')]: (data): Promise<any> => axios.delete('/auth', data),\n  [getAPIMethodName(namespace, 'reset', 'post')]: (data): Promise<any> => axios.post('/password-reset', data),\n  [getAPIMethodName(namespace, 'reset', 'put')]: (data): Promise<any> => axios.put('/password-reset', data),\n  [getAPIMethodName(namespace, 'reset', 'delete')]: (): Promise<any> => Promise.resolve({})\n};\n\nconst config = {\n  namespace,\n  apiProvider,\n  branches: [new Branch('registration'), new Branch('model'), new Branch('reset')]\n};\n\nconst strategy = new BaseStrategy(config);\n\nconst communicationAuth = buildCommunication(strategy);\n```\n\n## Toolset\n\nThis package also contains a toolset that simplifies your life.\nFor example you can easy generate types for actions:\n\n```\ngetStartType('users', 'model', 'get') => USERS_MODEL_GET_TRY\ngetSuccessType('users', 'model', 'get') => USERS_MODEL_GET_SUCCESS\ngetFailType('users', 'model', 'get') => USERS_MODEL_GET_FAIL\n```\n\nAlso you can easily generate names for API provider methods\n\n```\ngetAPIMethodName('users', 'model', 'GET') => getUsersModel\n```\n\nMore examples see in: ./src/helpers.spec.ts\n\n## Types of actions\n\nactionsTypes - it's enum with base set of default actions.\nAt at the moment it supports _init_, _clear_, _add_, _get_, _update_ and _delete_ types.\n\n## Sagas combinations\n\nIf you want to add sagas you can just add them directly in communication sagas array or in the root saga.\n\n```\nfunction* getEmptyCollection(action: any) {\n  // Here you can use put to generate action or call to call any async funtions\n  ...\n}\n\nfunction* getEmptyCollectionSaga() {\n  const successActionType = getSuccessType(namespace, 'collection', actionsTypes.get);\n\n  yield takeEvery(successActionType, getEmptyCollection);\n}\n```\n\nand then\n\n```\ncommunicationLine.sagas.push(getEmptyCollectionSaga());\n\n```\n\nor\n\n```\nexport default function* rootSaga(): any {\n  yield all([\n    getEmptyCollectionSaga(),\n    ...\n  ]);\n}\n\n```\n\n## Response formatting\n\nIf you want format or map responses from API Provider you can use `responseFormatter`. Just put it in the config.\n\n### Example:\n\n```\nconst responseFormatter = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    const resultData = [ ...branchState.data, ... response.data.items];\n    const resultMeta = { count: branchState.meta.count + response.meta.count};\n    return {data: resultData, meta: resultMeta};\n  }\n}\n```\n\n## Hooks\n\nYou can specify post hooks for `success` and `fail` sagas to prevent creation custom sagas\nif you just want to do some sync operations.\n\n### Example\n\n```\nconst postSuccessHooks = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    console.log(response, payload, branchState, state);\n  }\n}\n\nconst postFailHooks = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    console.log(response, payload, branchState, state);\n  }\n}\n```\n\n## Full example:\n\n```\nconst namespace = 'line';\n//\nconst apiProvider = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (): Promise<any> => axios.get(`/lines`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.get)]: (line): Promise<any> => axios.get(`/lines/${line.id}`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.post)]: (line): Promise<any> => axios.post(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.put)]: (line): Promise<any> => axios.put(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.delete)]: (line): Promise<any> => axios.delete(`/lines/${line.id}`)\n};\n\nconst responseFormatter = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    const resultData = [ ...branchState.data, ... response.data.items];\n    const resultMeta = { count: branchState.meta.count + response.meta.count};\n    return {data: resultData, meta: resultMeta};\n  }\n};\n\nconst postSuccessHooks = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    console.log(response, payload, branchState, state);\n  }\n}\n\nconst config = {\n  namespace,\n  apiProvider,\n  responseFormatter,\n  postSuccessHooks\n};\n\nconst strategy = new CRUDStrategy(config);\n\nconst communicationLine = buildCommunication(strategy);\n```\n\n## Troubleshooting\n\n1. Update version of saga\n","readmeFilename":"README.md","gitHead":"5761f5f2b7719917f07fd8fb74772c759d93b58c","_id":"@axmit/redux-communications@4.0.0-beta.3","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"axmit-engineers","email":"engineers@axmit.com"},"dist":{"integrity":"sha512-5OdT5s9cwCQt55aYlS62jScmtbUrFlFuu9/p2e3uIxrC6Te1g0lrZrmtGCxe5grbm68TNw42IrCwftNEtDBxlg==","shasum":"e17155a3e907bbd10e8cc1a9d9dfe5420c0ed441","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-4.0.0-beta.3.tgz","fileCount":49,"unpackedSize":175051,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJco9bsCRA9TVsSAnZWagAAisIP/1QZeiQm2PXUhq0Yt07+\nvHXuKtQU3SkyuEkXqqyk5O4WgOuMQMXZtBD9PRre9Qfmkj6r62+wUwD+H63m\nuyqnOqVbKTFHIYQ6YSTm36LfxGMjyKEy9UiKgg9kKB104SFhkgDc5ul7PSLf\najlP7+kY7A9rVAfMV39XpOKWp7WwXTXF0yZvSt/midzChrAZTIMEYrPcT9g1\noA+2OZ/XrBEUEax3I3dTQjeNhiACHAyTd0/tA94kobFqf/7FolvX6jF8u6po\nW6w3zR94fjuobyg6ir6b3K8CQjmki0vRNhbWbwQgpaGDM0hRLgs5rv5qYJKA\ngfyC1BhszyXBMSAyTsQa1z90LcQ1xnOoK3b6AyHGbmNfu90LKwNaXGeIPG6f\nEdJS+ElxtpDtbCkvOsdioNEfDQgoOASnBGvJtj7HedZoHpoe9iSNF4jEvJKO\nZNPThf4qP4l5J0wCjDa9A+kJuHpXWFJaC1aCqZHhc0a4TT6kOVfzJmABZGIa\nY8Dmx/CU4Y0L2wQNYYIBYxln1xvBuvKoM76XnT1YKOekwcV4X5To0dVNLge1\nVP/x2ZiCAiefhL81UkxvbD1v3fpDTCW9Oa/+790fqvJmOF3LSJsuIdZUZ8lI\n0aGmT/MDiR5Lp4fdb3zoA/PtglQOnsg61sxX1cxlKt86lv9rrd3JavzsbhMY\nsEph\r\n=/jjR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGNukRftADPvA4S/Dw4WKh71IvpxkDGIbF2j7N46Kz1/AiAe3qQxTHJ3zmDxZT/b33xv3wjf00QtQfPLEnUVdVb6kg=="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_4.0.0-beta.3_1554241260307_0.09633994589382011"},"_hasShrinkwrap":false},"4.0.0-beta.4":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"4.0.0-beta.4","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","readme":"# Redux communications\n\nThis package provides a toolset to simplify working with redux and saga libs.\n\n## Quick start\n\nTo create a new communication you should do the following:\n\n```\nconst namespace = 'line';\n//\nconst apiProvider = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (): Promise<any> => axios.get(`/lines`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.get)]: (line): Promise<any> => axios.get(`/lines/${line.id}`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.post)]: (line): Promise<any> => axios.post(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.put)]: (line): Promise<any> => axios.put(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.delete)]: (line): Promise<any> => axios.delete(`/lines/${line.id}`)\n};\n\nconst config = {\n  namespace,\n  apiProvider\n};\n\nconst strategy = new CRUDStrategy(config);\n\nconst communicationLine = buildCommunication(strategy);\n```\n\nAfter that you will have a communication that contains base set of reducers, actions and sagas. You can easily setup it as usual...\n\n```\n//Sagas setup\nexport default function* rootSaga(): any {\n  yield all([\n    ...communicationLine.sagas\n  ]);\n}\n\n//Reducers setup\nconst reducers = {\n  ...communicationLine.reducers\n};\n\n//To put actions in component\nconst mapDispatchToProps = {\n  ...communicationLine.actions\n};\n\nconst { data, loading } = state.line.model;\n\nreturn {\n    linesList: data\n};\n\nexport default connect(\n  mapStateToProps,\n  mapDispatchToProps\n)(SomeComponent);\n\n\n//Actions usage\ncomponentDidMount(){\n    this.props.dispatchAction(communicationLine.namespace, 'collection', actionsTypes.get, payload);\n}\n\n```\n\n## Detailed explanation\n\nThe idea of this package is to provide a simple way (toolset) of generating event publishers and subscribers.\n\n### **!!! _IMPORTANT_ !!!**\n\n> If you want to understand this module completely you should be familiar with publisher-subscriber pattern (https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern).\n> Because in fact this pattern underlies for Redux/Saga communication.\n\nIn fact we have:\n\n1. event publisher\n   - actions - common example for generating events\n2. event subscriber reducer\n   - reducer - common example for handling events and update the store\n   - saga - handlers that can be used for side effects and generating new event\n\nActually each async action consists of 3 actions:\n\n1. Start action - triggered to start execution of async call\n2. Success action - called if action finished with success\n3. Fail action - called if action finished with fail\n\nWe can use reducers to update the store depending on action type and use sagas to generate some actions depending on results of other actions.\n\nFor example we can handle _USER_MODEL_GET_SUCCESS_ action and after that generate action _TASK_COLLECTION_GET_START_ to start getting collection of tasks for current user.\n\n## Store structure:\n\nThe store consists of namespaces that are divided into branches. Each branch contains 3 fields:\n\n1. Data - data for this branch\n2. Loading - status of data loading of this branch\n3. Errors - errors for branch if there are any\n4. Params - params that are provided in the start action\n   For more details see implementation in ./src/buildReducer.ts\n\n#### Example:\n\nNamespace - user\nBranches - model, collection\n\n```\nstore = {\n    user: {\n        model: {\n            data: {\n                data: {\n                    id: 1\n                    firstName: \"Ivan\",\n                    lastName: \"Tershukov\"\n                },\n                meta: {\n                    lastLoginAt: '01.01.19 12:00'\n                }\n            },\n            params: 1, // id of current model\n            loading: false,\n            errors: null\n        },\n        collection: {\n            data: {\n                data: [\n                    {\n                        id: 1\n                        firstName: \"Ivan\",\n                        lastName: \"Tershukov\"\n                    },\n                    {\n                        id: 2\n                        firstName: \"Yana\",\n                        lastName: \"Banina\"\n                    },\n                    {\n                        id: 3\n                        firstName: \"Mike\",\n                        lastName: \"Sidorov\"\n                    }\n                ],\n                meta: {\n                    limit: 100,\n                    offset: 0,\n                    q: ''\n                }\n            },\n            params: {\n                order: 'asc',\n                limir: 10,\n                offset: 50\n            },\n            loading: false,\n            errors: null\n        }\n    }\n}\n```\n\n## Strategy:\n\nThe strategy determines which part of communication logic will be generated.\nThe most common strategy is Base strategy.\nTo initialize any strategy you should use Config.\n\n### CRUD strategy\n\nWill generate actions, reducers and sagas for 2 base branches:\n\n1. Model\n2. Collection\n\nExample:\n\n```\n// To create a strategy you should provide a config\nconst strategy = new CRUDStrategy(config);\n\nconst communicationLine = buildCommunication(strategy);\n```\n\n### Base strategy\n\nIf you want you can give any names to branches, but preferably use 'model' for entity which you will work on and 'collection' for list of entities.\n\n## Config\n\nConfig is needed to tune strategy behaviour. Config can be more or less complicated depending on strategy type.\nEach config should contain namespace and API provider.\nFor Base strategy you also should provide the list of branches.\n\n## API Provider\n\nIt's an object that contains implementation for side effects calls.\nThe most common example are API calls, but it can also contain any async calls to Local storage, DB, etc.\n\n## Branches\n\nBranch describes behavior for branch of the store. At the moment it includes only a branch name.\nAnd if needed you can also setup initial state for the branch.\n\n### Example\n\n```\nconst namespace = 'auth';\n\nconst apiProvider = {\n  [getAPIMethodName(namespace, 'registration', 'post')]: (data): Promise<any> => axios.post('/registration', data),\n  //Async state init\n  [getAPIMethodName(namespace, 'model', 'init')]: (): Promise<any> => getCreds().then(data => ({ data })),\n  [getAPIMethodName(namespace, 'model', 'get')]: (): Promise<any> => axios.get('/auth'),\n  [getAPIMethodName(namespace, 'model', 'post')]: (data): Promise<any> => axios.post('/auth', data),\n  [getAPIMethodName(namespace, 'model', 'delete')]: (data): Promise<any> => axios.delete('/auth', data),\n  [getAPIMethodName(namespace, 'reset', 'post')]: (data): Promise<any> => axios.post('/password-reset', data),\n  [getAPIMethodName(namespace, 'reset', 'put')]: (data): Promise<any> => axios.put('/password-reset', data),\n  [getAPIMethodName(namespace, 'reset', 'delete')]: (): Promise<any> => Promise.resolve({})\n};\n\nconst config = {\n  namespace,\n  apiProvider,\n  branches: [new Branch('registration'), new Branch('model'), new Branch('reset')]\n};\n\nconst strategy = new BaseStrategy(config);\n\nconst communicationAuth = buildCommunication(strategy);\n```\n\n## Toolset\n\nThis package also contains a toolset that simplifies your life.\nFor example you can easy generate types for actions:\n\n```\ngetStartType('users', 'model', 'get') => USERS_MODEL_GET_TRY\ngetSuccessType('users', 'model', 'get') => USERS_MODEL_GET_SUCCESS\ngetFailType('users', 'model', 'get') => USERS_MODEL_GET_FAIL\n```\n\nAlso you can easily generate names for API provider methods\n\n```\ngetAPIMethodName('users', 'model', 'GET') => getUsersModel\n```\n\nMore examples see in: ./src/helpers.spec.ts\n\n## Types of actions\n\nactionsTypes - it's enum with base set of default actions.\nAt at the moment it supports _init_, _clear_, _add_, _get_, _update_ and _delete_ types.\n\n## Sagas combinations\n\nIf you want to add sagas you can just add them directly in communication sagas array or in the root saga.\n\n```\nfunction* getEmptyCollection(action: any) {\n  // Here you can use put to generate action or call to call any async funtions\n  ...\n}\n\nfunction* getEmptyCollectionSaga() {\n  const successActionType = getSuccessType(namespace, 'collection', actionsTypes.get);\n\n  yield takeEvery(successActionType, getEmptyCollection);\n}\n```\n\nand then\n\n```\ncommunicationLine.sagas.push(getEmptyCollectionSaga());\n\n```\n\nor\n\n```\nexport default function* rootSaga(): any {\n  yield all([\n    getEmptyCollectionSaga(),\n    ...\n  ]);\n}\n\n```\n\n## Response formatting\n\nIf you want format or map responses from API Provider you can use `responseFormatter`. Just put it in the config.\n\n### Example:\n\n```\nconst responseFormatter = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    const resultData = [ ...branchState.data, ... response.data.items];\n    const resultMeta = { count: branchState.meta.count + response.meta.count};\n    return {data: resultData, meta: resultMeta};\n  }\n}\n```\n\n## Hooks\n\nYou can specify post hooks for `success` and `fail` sagas to prevent creation custom sagas\nif you just want to do some sync operations.\n\n### Example\n\n```\nconst postSuccessHooks = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    console.log(response, payload, branchState, state);\n  }\n}\n\nconst postFailHooks = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    console.log(response, payload, branchState, state);\n  }\n}\n```\n\n## Full example:\n\n```\nconst namespace = 'line';\n//\nconst apiProvider = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (): Promise<any> => axios.get(`/lines`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.get)]: (line): Promise<any> => axios.get(`/lines/${line.id}`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.post)]: (line): Promise<any> => axios.post(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.put)]: (line): Promise<any> => axios.put(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.delete)]: (line): Promise<any> => axios.delete(`/lines/${line.id}`)\n};\n\nconst responseFormatter = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    const resultData = [ ...branchState.data, ... response.data.items];\n    const resultMeta = { count: branchState.meta.count + response.meta.count};\n    return {data: resultData, meta: resultMeta};\n  }\n};\n\nconst postSuccessHooks = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    console.log(response, payload, branchState, state);\n  }\n}\n\nconst config = {\n  namespace,\n  apiProvider,\n  responseFormatter,\n  postSuccessHooks\n};\n\nconst strategy = new CRUDStrategy(config);\n\nconst communicationLine = buildCommunication(strategy);\n```\n\n## Troubleshooting\n\n1. Update version of saga\n","readmeFilename":"README.md","gitHead":"76881c0a8b7e3aa2bfd68c954cc8278787c03aee","_id":"@axmit/redux-communications@4.0.0-beta.4","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"axmit-engineers","email":"engineers@axmit.com"},"dist":{"integrity":"sha512-I4i/QQ27u75K1Adi3pZ0czRaBF433llZqjUzIgRtizJKx7BA/dtXJD7XuIzRrxs1ZC7HgSqMWgLD6Dl6hPwmIQ==","shasum":"44c40942652f918566112bacac1e65cf52be39c0","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-4.0.0-beta.4.tgz","fileCount":52,"unpackedSize":175108,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJco+BwCRA9TVsSAnZWagAAhMgP/1cftmT+jeT8GqZoQTje\nc/w8/vuf7+hJWV/Dk+HLj3OzbsIyYmAHGqSj9F2dnpDlouoLodIGT1g2ZXEB\n0GujIyT0HBPX+T96IgpRNHO6/NzL+blOzKhX9q6A0JlZONA19zRj6nUmCUzp\nihCsjw+ddL4GGckCgq0NMj4wocq9iVWMXkOa+9TWe43vLDlhbu6Ggw0EvVuX\nAnEJXY5LEakdZKheA2/uJnugjbKYl146MiTu6uumVwWFGk8N5NLzKCq9HHmJ\nYxIcFjwAOHelcdS1xnRMFQvogma1yMFpB83lHL4lWJ+xnFE7xnTdQFAJ0/jJ\nfyom0ReCm/GkhsRsVAy4EHWzGizSGRmxSbUb3/GeidSk1XtCL5evWlEnp/wk\n8eSc0isFI4t4UQtwtl1prguqjCl+3TCvSFP8R+2LQdlI6+uicql3zx49NG2n\nUMpLWKVU+TIU4bIbbC8tAsIifA1tnW+SnWrrsBlb298Lxno72U6qSA4IYpXp\nzdgAvZpgx4EwGIBYfjdT0DCbG+C13F2XgUGTFCyreJYGU9BpRA231J8CYhSn\nTGscT79F804Eyc17eIlFNtXIetXmEisgOa3HWMp2t8F6rLu+/4Apzg75chg0\nshbEsmVFOg4998j26IktnUrk00YOzzmlWmZRjgJNMbAOvKz+YLM+vGF3ShaX\nw6mV\r\n=fBac\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH4k3zait34T8Yv9C1VC8VHNu6kUiF8WBgpso9MQoecBAiEAjiBHdvQ7aIjiuaXe8zcbmrc9yQVa/WSQFCB87/RdEpk="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_4.0.0-beta.4_1554243696023_0.7119738912392777"},"_hasShrinkwrap":false},"4.0.0-beta.5":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"4.0.0-beta.5","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","readme":"# Redux communications\n\nThis package provides a toolset to simplify working with redux and saga libs.\n\n## Quick start\n\nTo create a new communication you should do the following:\n\n```\nconst namespace = 'line';\n//\nconst apiProvider = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (): Promise<any> => axios.get(`/lines`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.get)]: (line): Promise<any> => axios.get(`/lines/${line.id}`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.post)]: (line): Promise<any> => axios.post(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.put)]: (line): Promise<any> => axios.put(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.delete)]: (line): Promise<any> => axios.delete(`/lines/${line.id}`)\n};\n\nconst config = {\n  namespace,\n  apiProvider\n};\n\nconst strategy = new CRUDStrategy(config);\n\nconst communicationLine = buildCommunication(strategy);\n```\n\nAfter that you will have a communication that contains base set of reducers, actions and sagas. You can easily setup it as usual...\n\n```\n//Sagas setup\nexport default function* rootSaga(): any {\n  yield all([\n    ...communicationLine.sagas\n  ]);\n}\n\n//Reducers setup\nconst reducers = {\n  ...communicationLine.reducers\n};\n\n//To put actions in component\nconst mapDispatchToProps = {\n  ...communicationLine.actions\n};\n\nconst { data, loading } = state.line.model;\n\nreturn {\n    linesList: data\n};\n\nexport default connect(\n  mapStateToProps,\n  mapDispatchToProps\n)(SomeComponent);\n\n\n//Actions usage\ncomponentDidMount(){\n    this.props.dispatchAction(communicationLine.namespace, 'collection', actionsTypes.get, payload);\n}\n\n```\n\n## Detailed explanation\n\nThe idea of this package is to provide a simple way (toolset) of generating event publishers and subscribers.\n\n### **!!! _IMPORTANT_ !!!**\n\n> If you want to understand this module completely you should be familiar with publisher-subscriber pattern (https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern).\n> Because in fact this pattern underlies for Redux/Saga communication.\n\nIn fact we have:\n\n1. event publisher\n   - actions - common example for generating events\n2. event subscriber reducer\n   - reducer - common example for handling events and update the store\n   - saga - handlers that can be used for side effects and generating new event\n\nActually each async action consists of 3 actions:\n\n1. Start action - triggered to start execution of async call\n2. Success action - called if action finished with success\n3. Fail action - called if action finished with fail\n\nWe can use reducers to update the store depending on action type and use sagas to generate some actions depending on results of other actions.\n\nFor example we can handle _USER_MODEL_GET_SUCCESS_ action and after that generate action _TASK_COLLECTION_GET_START_ to start getting collection of tasks for current user.\n\n## Store structure:\n\nThe store consists of namespaces that are divided into branches. Each branch contains 3 fields:\n\n1. Data - data for this branch\n2. Loading - status of data loading of this branch\n3. Errors - errors for branch if there are any\n4. Params - params that are provided in the start action\n   For more details see implementation in ./src/buildReducer.ts\n\n#### Example:\n\nNamespace - user\nBranches - model, collection\n\n```\nstore = {\n    user: {\n        model: {\n            data: {\n                data: {\n                    id: 1\n                    firstName: \"Ivan\",\n                    lastName: \"Tershukov\"\n                },\n                meta: {\n                    lastLoginAt: '01.01.19 12:00'\n                }\n            },\n            params: 1, // id of current model\n            loading: false,\n            errors: null\n        },\n        collection: {\n            data: {\n                data: [\n                    {\n                        id: 1\n                        firstName: \"Ivan\",\n                        lastName: \"Tershukov\"\n                    },\n                    {\n                        id: 2\n                        firstName: \"Yana\",\n                        lastName: \"Banina\"\n                    },\n                    {\n                        id: 3\n                        firstName: \"Mike\",\n                        lastName: \"Sidorov\"\n                    }\n                ],\n                meta: {\n                    limit: 100,\n                    offset: 0,\n                    q: ''\n                }\n            },\n            params: {\n                order: 'asc',\n                limir: 10,\n                offset: 50\n            },\n            loading: false,\n            errors: null\n        }\n    }\n}\n```\n\n## Strategy:\n\nThe strategy determines which part of communication logic will be generated.\nThe most common strategy is Base strategy.\nTo initialize any strategy you should use Config.\n\n### CRUD strategy\n\nWill generate actions, reducers and sagas for 2 base branches:\n\n1. Model\n2. Collection\n\nExample:\n\n```\n// To create a strategy you should provide a config\nconst strategy = new CRUDStrategy(config);\n\nconst communicationLine = buildCommunication(strategy);\n```\n\n### Base strategy\n\nIf you want you can give any names to branches, but preferably use 'model' for entity which you will work on and 'collection' for list of entities.\n\n## Config\n\nConfig is needed to tune strategy behaviour. Config can be more or less complicated depending on strategy type.\nEach config should contain namespace and API provider.\nFor Base strategy you also should provide the list of branches.\n\n## API Provider\n\nIt's an object that contains implementation for side effects calls.\nThe most common example are API calls, but it can also contain any async calls to Local storage, DB, etc.\n\n## Branches\n\nBranch describes behavior for branch of the store. At the moment it includes only a branch name.\nAnd if needed you can also setup initial state for the branch.\n\n### Example\n\n```\nconst namespace = 'auth';\n\nconst apiProvider = {\n  [getAPIMethodName(namespace, 'registration', 'post')]: (data): Promise<any> => axios.post('/registration', data),\n  //Async state init\n  [getAPIMethodName(namespace, 'model', 'init')]: (): Promise<any> => getCreds().then(data => ({ data })),\n  [getAPIMethodName(namespace, 'model', 'get')]: (): Promise<any> => axios.get('/auth'),\n  [getAPIMethodName(namespace, 'model', 'post')]: (data): Promise<any> => axios.post('/auth', data),\n  [getAPIMethodName(namespace, 'model', 'delete')]: (data): Promise<any> => axios.delete('/auth', data),\n  [getAPIMethodName(namespace, 'reset', 'post')]: (data): Promise<any> => axios.post('/password-reset', data),\n  [getAPIMethodName(namespace, 'reset', 'put')]: (data): Promise<any> => axios.put('/password-reset', data),\n  [getAPIMethodName(namespace, 'reset', 'delete')]: (): Promise<any> => Promise.resolve({})\n};\n\nconst config = {\n  namespace,\n  apiProvider,\n  branches: [new Branch('registration'), new Branch('model'), new Branch('reset')]\n};\n\nconst strategy = new BaseStrategy(config);\n\nconst communicationAuth = buildCommunication(strategy);\n```\n\n## Toolset\n\nThis package also contains a toolset that simplifies your life.\nFor example you can easy generate types for actions:\n\n```\ngetStartType('users', 'model', 'get') => USERS_MODEL_GET_TRY\ngetSuccessType('users', 'model', 'get') => USERS_MODEL_GET_SUCCESS\ngetFailType('users', 'model', 'get') => USERS_MODEL_GET_FAIL\n```\n\nAlso you can easily generate names for API provider methods\n\n```\ngetAPIMethodName('users', 'model', 'GET') => getUsersModel\n```\n\nMore examples see in: ./src/helpers.spec.ts\n\n## Types of actions\n\nactionsTypes - it's enum with base set of default actions.\nAt at the moment it supports _init_, _clear_, _add_, _get_, _update_ and _delete_ types.\n\n## Sagas combinations\n\nIf you want to add sagas you can just add them directly in communication sagas array or in the root saga.\n\n```\nfunction* getEmptyCollection(action: any) {\n  // Here you can use put to generate action or call to call any async funtions\n  ...\n}\n\nfunction* getEmptyCollectionSaga() {\n  const successActionType = getSuccessType(namespace, 'collection', actionsTypes.get);\n\n  yield takeEvery(successActionType, getEmptyCollection);\n}\n```\n\nand then\n\n```\ncommunicationLine.sagas.push(getEmptyCollectionSaga());\n\n```\n\nor\n\n```\nexport default function* rootSaga(): any {\n  yield all([\n    getEmptyCollectionSaga(),\n    ...\n  ]);\n}\n\n```\n\n## Response formatting\n\nIf you want format or map responses from API Provider you can use `responseFormatter`. Just put it in the config.\n\n### Example:\n\n```\nconst responseFormatter = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    const resultData = [ ...branchState.data, ... response.data.items];\n    const resultMeta = { count: branchState.meta.count + response.meta.count};\n    return {data: resultData, meta: resultMeta};\n  }\n}\n```\n\n## Hooks\n\nYou can specify post hooks for `success` and `fail` sagas to prevent creation custom sagas\nif you just want to do some sync operations.\n\n### Example\n\n```\nconst postSuccessHooks = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    console.log(response, payload, branchState, state);\n  }\n}\n\nconst postFailHooks = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    console.log(response, payload, branchState, state);\n  }\n}\n```\n\n## Full example:\n\n```\nconst namespace = 'line';\n//\nconst apiProvider = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (): Promise<any> => axios.get(`/lines`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.get)]: (line): Promise<any> => axios.get(`/lines/${line.id}`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.post)]: (line): Promise<any> => axios.post(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.put)]: (line): Promise<any> => axios.put(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.delete)]: (line): Promise<any> => axios.delete(`/lines/${line.id}`)\n};\n\nconst responseFormatter = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    const resultData = [ ...branchState.data, ... response.data.items];\n    const resultMeta = { count: branchState.meta.count + response.meta.count};\n    return {data: resultData, meta: resultMeta};\n  }\n};\n\nconst postSuccessHooks = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    console.log(response, payload, branchState, state);\n  }\n}\n\nconst config = {\n  namespace,\n  apiProvider,\n  responseFormatter,\n  postSuccessHooks\n};\n\nconst strategy = new CRUDStrategy(config);\n\nconst communicationLine = buildCommunication(strategy);\n```\n\n## Troubleshooting\n\n1. Update version of saga\n","readmeFilename":"README.md","gitHead":"3790256c859c43e4e3e91cf2c87474325add20f5","_id":"@axmit/redux-communications@4.0.0-beta.5","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"axmit-engineers","email":"engineers@axmit.com"},"dist":{"integrity":"sha512-RZriuIAGWfo4b3zcE1Hi1tw/KYwTDCBMZ4uWp4iefbtR47kaP4AaALbcbdumcwwSGxR9v3tluWG/pJkEJG5mdQ==","shasum":"421ec1896f72bc2d15d15ea361ea2ff21892a768","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-4.0.0-beta.5.tgz","fileCount":52,"unpackedSize":175079,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJco+qzCRA9TVsSAnZWagAAwV4P/iwQLiTIDgmWVmxWugUP\nfYeaPxqYEWzKr7OyKQwYwKa2P3ISeUTtvN3r9CnSmRrgcQuJvLmN2F1AYns/\nkhW0dPh2JpiVdqj5AAmauh2Dk3cGnGm1YEvgbOOqD4sOzIGkZIum3UuYjZ8v\nanewGysqwjQTH/FkWKkbg7l9tB6TVyM0WUVG6gnYyTCeeJS+JMl4itPbLQdn\nhnqKQOk2X1+Ev5s6B+ZZVRsxHfHFtIKetnXBrFFqcNHhGSXeMG25ptYY7N2y\n18aCZZ02uCJ6r1MP59EFx6BeK5jftXH5FVVUK2T0aisBK0MITJ3/hJFTDIMU\n9v7Z2coYXwdyFnoWMFlMI5pCnnv/qJekDOQZqcUG5h03p6Ql65jXto1uW7gq\nM27oi4cPSsHBM1zIGjqA5nqG8Ekz/2tGuBHnxUS65JahpWAOQ00SGLgPz1FU\noTe6yPjb36fAnxqNK4TG5aj7pu08WdJyDLPXIN13CcHSHdDgnAoVanjMfUm0\njIHq2ItX/eJQTsr6xOSlZvvu0pNd4EUXq1honOY3nBuZ4S205Sgd/WKh0gor\nGm4RYhTUfv2avtk9kEhBkdm4ez6hMQlTZt+uS/2tf9s1HwXrnjjSGEW9RWr7\nIEqbAtDHUW8XltzTkrjEC3GQ5m0otHnIskuMX5jZl+N+I78UUuU13MVszK4d\nI/n5\r\n=2Qns\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/H3ykcm+JooXv5VJiNk0LPr+Verq1tgHoQBwn5I3NYAIhAPn+ObQdgfXnrWCrsk9RfGORnRJ+VqStuIrCLAC2Hcpn"}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_4.0.0-beta.5_1554246323274_0.29683260332400385"},"_hasShrinkwrap":false},"4.0.0-beta.6":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"4.0.0-beta.6","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","readme":"# Redux communications\n\nThis package provides a toolset to simplify working with redux and saga libs.\n\n## Quick start\n\nTo create a new communication you should do the following:\n\n```\nconst namespace = 'line';\n//\nconst apiProvider = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (): Promise<any> => axios.get(`/lines`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.get)]: (line): Promise<any> => axios.get(`/lines/${line.id}`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.post)]: (line): Promise<any> => axios.post(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.put)]: (line): Promise<any> => axios.put(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.delete)]: (line): Promise<any> => axios.delete(`/lines/${line.id}`)\n};\n\nconst config = {\n  namespace,\n  apiProvider\n};\n\nconst strategy = new CRUDStrategy(config);\n\nconst communicationLine = buildCommunication(strategy);\n```\n\nAfter that you will have a communication that contains base set of reducers, actions and sagas. You can easily setup it as usual...\n\n```\n//Sagas setup\nexport default function* rootSaga(): any {\n  yield all([\n    ...communicationLine.sagas\n  ]);\n}\n\n//Reducers setup\nconst reducers = {\n  ...communicationLine.reducers\n};\n\n//To put actions in component\nconst mapDispatchToProps = {\n  ...communicationLine.actions\n};\n\nconst { data, loading } = state.line.model;\n\nreturn {\n    linesList: data\n};\n\nexport default connect(\n  mapStateToProps,\n  mapDispatchToProps\n)(SomeComponent);\n\n\n//Actions usage\ncomponentDidMount(){\n    this.props.dispatchAction(communicationLine.namespace, 'collection', actionsTypes.get, payload);\n}\n\n```\n\n## Detailed explanation\n\nThe idea of this package is to provide a simple way (toolset) of generating event publishers and subscribers.\n\n### **!!! _IMPORTANT_ !!!**\n\n> If you want to understand this module completely you should be familiar with publisher-subscriber pattern (https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern).\n> Because in fact this pattern underlies for Redux/Saga communication.\n\nIn fact we have:\n\n1. event publisher\n   - actions - common example for generating events\n2. event subscriber reducer\n   - reducer - common example for handling events and update the store\n   - saga - handlers that can be used for side effects and generating new event\n\nActually each async action consists of 3 actions:\n\n1. Start action - triggered to start execution of async call\n2. Success action - called if action finished with success\n3. Fail action - called if action finished with fail\n\nWe can use reducers to update the store depending on action type and use sagas to generate some actions depending on results of other actions.\n\nFor example we can handle _USER_MODEL_GET_SUCCESS_ action and after that generate action _TASK_COLLECTION_GET_START_ to start getting collection of tasks for current user.\n\n## Store structure:\n\nThe store consists of namespaces that are divided into branches. Each branch contains 3 fields:\n\n1. Data - data for this branch\n2. Loading - status of data loading of this branch\n3. Errors - errors for branch if there are any\n4. Params - params that are provided in the start action\n   For more details see implementation in ./src/buildReducer.ts\n\n#### Example:\n\nNamespace - user\nBranches - model, collection\n\n```\nstore = {\n    user: {\n        model: {\n            data: {\n                data: {\n                    id: 1\n                    firstName: \"Ivan\",\n                    lastName: \"Tershukov\"\n                },\n                meta: {\n                    lastLoginAt: '01.01.19 12:00'\n                }\n            },\n            params: 1, // id of current model\n            loading: false,\n            errors: null\n        },\n        collection: {\n            data: {\n                data: [\n                    {\n                        id: 1\n                        firstName: \"Ivan\",\n                        lastName: \"Tershukov\"\n                    },\n                    {\n                        id: 2\n                        firstName: \"Yana\",\n                        lastName: \"Banina\"\n                    },\n                    {\n                        id: 3\n                        firstName: \"Mike\",\n                        lastName: \"Sidorov\"\n                    }\n                ],\n                meta: {\n                    limit: 100,\n                    offset: 0,\n                    q: ''\n                }\n            },\n            params: {\n                order: 'asc',\n                limir: 10,\n                offset: 50\n            },\n            loading: false,\n            errors: null\n        }\n    }\n}\n```\n\n## Strategy:\n\nThe strategy determines which part of communication logic will be generated.\nThe most common strategy is Base strategy.\nTo initialize any strategy you should use Config.\n\n### CRUD strategy\n\nWill generate actions, reducers and sagas for 2 base branches:\n\n1. Model\n2. Collection\n\nExample:\n\n```\n// To create a strategy you should provide a config\nconst strategy = new CRUDStrategy(config);\n\nconst communicationLine = buildCommunication(strategy);\n```\n\n### Base strategy\n\nIf you want you can give any names to branches, but preferably use 'model' for entity which you will work on and 'collection' for list of entities.\n\n## Config\n\nConfig is needed to tune strategy behaviour. Config can be more or less complicated depending on strategy type.\nEach config should contain namespace and API provider.\nFor Base strategy you also should provide the list of branches.\n\n## API Provider\n\nIt's an object that contains implementation for side effects calls.\nThe most common example are API calls, but it can also contain any async calls to Local storage, DB, etc.\n\n## Branches\n\nBranch describes behavior for branch of the store. At the moment it includes only a branch name.\nAnd if needed you can also setup initial state for the branch.\n\n### Example\n\n```\nconst namespace = 'auth';\n\nconst apiProvider = {\n  [getAPIMethodName(namespace, 'registration', 'post')]: (data): Promise<any> => axios.post('/registration', data),\n  //Async state init\n  [getAPIMethodName(namespace, 'model', 'init')]: (): Promise<any> => getCreds().then(data => ({ data })),\n  [getAPIMethodName(namespace, 'model', 'get')]: (): Promise<any> => axios.get('/auth'),\n  [getAPIMethodName(namespace, 'model', 'post')]: (data): Promise<any> => axios.post('/auth', data),\n  [getAPIMethodName(namespace, 'model', 'delete')]: (data): Promise<any> => axios.delete('/auth', data),\n  [getAPIMethodName(namespace, 'reset', 'post')]: (data): Promise<any> => axios.post('/password-reset', data),\n  [getAPIMethodName(namespace, 'reset', 'put')]: (data): Promise<any> => axios.put('/password-reset', data),\n  [getAPIMethodName(namespace, 'reset', 'delete')]: (): Promise<any> => Promise.resolve({})\n};\n\nconst config = {\n  namespace,\n  apiProvider,\n  branches: [new Branch('registration'), new Branch('model'), new Branch('reset')]\n};\n\nconst strategy = new BaseStrategy(config);\n\nconst communicationAuth = buildCommunication(strategy);\n```\n\n## Toolset\n\nThis package also contains a toolset that simplifies your life.\nFor example you can easy generate types for actions:\n\n```\ngetStartType('users', 'model', 'get') => USERS_MODEL_GET_TRY\ngetSuccessType('users', 'model', 'get') => USERS_MODEL_GET_SUCCESS\ngetFailType('users', 'model', 'get') => USERS_MODEL_GET_FAIL\n```\n\nAlso you can easily generate names for API provider methods\n\n```\ngetAPIMethodName('users', 'model', 'GET') => getUsersModel\n```\n\nMore examples see in: ./src/helpers.spec.ts\n\n## Types of actions\n\nactionsTypes - it's enum with base set of default actions.\nAt at the moment it supports _init_, _clear_, _add_, _get_, _update_ and _delete_ types.\n\n## Sagas combinations\n\nIf you want to add sagas you can just add them directly in communication sagas array or in the root saga.\n\n```\nfunction* getEmptyCollection(action: any) {\n  // Here you can use put to generate action or call to call any async funtions\n  ...\n}\n\nfunction* getEmptyCollectionSaga() {\n  const successActionType = getSuccessType(namespace, 'collection', actionsTypes.get);\n\n  yield takeEvery(successActionType, getEmptyCollection);\n}\n```\n\nand then\n\n```\ncommunicationLine.sagas.push(getEmptyCollectionSaga());\n\n```\n\nor\n\n```\nexport default function* rootSaga(): any {\n  yield all([\n    getEmptyCollectionSaga(),\n    ...\n  ]);\n}\n\n```\n\n## Response formatting\n\nIf you want format or map responses from API Provider you can use `responseFormatter`. Just put it in the config.\n\n### Example:\n\n```\nconst responseFormatter = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    const resultData = [ ...branchState.data, ... response.data.items];\n    const resultMeta = { count: branchState.meta.count + response.meta.count};\n    return {data: resultData, meta: resultMeta};\n  }\n}\n```\n\n## Hooks\n\nYou can specify post hooks for `success` and `fail` sagas to prevent creation custom sagas\nif you just want to do some sync operations.\n\n### Example\n\n```\nconst postSuccessHooks = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    console.log(response, payload, branchState, state);\n  }\n}\n\nconst postFailHooks = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    console.log(response, payload, branchState, state);\n  }\n}\n```\n\n## Full example:\n\n```\nconst namespace = 'line';\n//\nconst apiProvider = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (): Promise<any> => axios.get(`/lines`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.get)]: (line): Promise<any> => axios.get(`/lines/${line.id}`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.post)]: (line): Promise<any> => axios.post(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.put)]: (line): Promise<any> => axios.put(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.delete)]: (line): Promise<any> => axios.delete(`/lines/${line.id}`)\n};\n\nconst responseFormatter = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    const resultData = [ ...branchState.data, ... response.data.items];\n    const resultMeta = { count: branchState.meta.count + response.meta.count};\n    return {data: resultData, meta: resultMeta};\n  }\n};\n\nconst postSuccessHooks = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    console.log(response, payload, branchState, state);\n  }\n}\n\nconst config = {\n  namespace,\n  apiProvider,\n  responseFormatter,\n  postSuccessHooks\n};\n\nconst strategy = new CRUDStrategy(config);\n\nconst communicationLine = buildCommunication(strategy);\n```\n\n## Troubleshooting\n\n1. Update version of saga\n","readmeFilename":"README.md","gitHead":"233367fc4b02a7e0d0a1629429cc1ef7e74aa4ca","_id":"@axmit/redux-communications@4.0.0-beta.6","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"axmit-engineers","email":"engineers@axmit.com"},"dist":{"integrity":"sha512-3+znPE7b7A1cHL7YAqO4NW+S5f0jvMitaO9Wx6MqwaHcAZlTCJqGsF5XJhPpp8KtMHhHQYIO0bG1gqSfeAdXpQ==","shasum":"a621b2431afb90c1bc412dd588aa90c5a18277fc","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-4.0.0-beta.6.tgz","fileCount":52,"unpackedSize":175086,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJco++GCRA9TVsSAnZWagAAKpIQAIg9G6OwriNI/PYG0N2R\nGRpVPNRaMZfERhdM/zOtEsvve+50c3cT9TpGvD4yt6mItg12pj3xVX0uVgom\n22ujIntPuDCwbuFIwU/IrynU9N8i6YrH0vl+QgspWCs2D87dqCDqmXtRtuja\nvunCB8fCcwlSuO9icdfC+t4YlT/1gjW5ZIJKv0CZbE5gTaac6ceWCUPPR2TY\n1ezoEU6PfFU3XTjgEwQ1cHiMzrE1/EHpcLtXgDl7HPusuEBMu3qrj4f5mt6p\n3YbDhC4Om612vDzCdkEqh+Vlfwazvr/jUzuC+zk0Bl58Rq84X0oUrR6q0dsY\ngBp674nv6O6x2CMYeLhn6Y6u+vcIbYZCeEQ4lZIgkmI65ZSCa4IQl1K3iGPt\nwJNznfh2ROQuC7qFroFUuUnUcwJyUQLayww40qhNz5PvkmqIxnfuaWPJThbi\nEptc1liHJzkStCYUv9GzHVXJjCJR2hC3D5h2d54HwKcXiz8Y0+joppVYnRju\n9i+fambhXnVDNcnnTxWhuZV/EOr0ys4QrWBiU6wnkMQotbElf8AK2mZvRYGV\nU1x28NFkbAusYt61QUtJvVGvW9ZslkHfr+Oa6QXIyyNwr2VD/FBAKU8DCXlQ\nCpDdASABE/xELLNGUL9rbDmQ8Gqgsxc0H+i+NQv6OR35Pfv5mLMoT4nZBX4p\nG5TD\r\n=HHm8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9iZaiWy1vqbLZ9O4N0EnxhQxdUdv59fOaURiN5bQrigIgPP0FJoYUmgJ4O0+4dOml77TEvmTXtQR2Y6BKVlSV2Fc="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_4.0.0-beta.6_1554247557164_0.2089671578684924"},"_hasShrinkwrap":false},"4.0.0-beta.7":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"4.0.0-beta.7","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","readme":"# Redux communications\n\nThis package provides a toolset to simplify working with redux and saga libs.\n\n## Quick start\n\nTo create a new communication you should do the following:\n\n```\nconst namespace = 'line';\n//\nconst apiProvider = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (): Promise<any> => axios.get(`/lines`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.get)]: (line): Promise<any> => axios.get(`/lines/${line.id}`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.post)]: (line): Promise<any> => axios.post(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.put)]: (line): Promise<any> => axios.put(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.delete)]: (line): Promise<any> => axios.delete(`/lines/${line.id}`)\n};\n\nconst config = {\n  namespace,\n  apiProvider\n};\n\nconst strategy = new CRUDStrategy(config);\n\nconst communicationLine = buildCommunication(strategy);\n```\n\nAfter that you will have a communication that contains base set of reducers, actions and sagas. You can easily setup it as usual...\n\n```\n//Sagas setup\nexport default function* rootSaga(): any {\n  yield all([\n    ...communicationLine.sagas\n  ]);\n}\n\n//Reducers setup\nconst reducers = {\n  ...communicationLine.reducers\n};\n\n//To put actions in component\nconst mapDispatchToProps = {\n  ...communicationLine.actions\n};\n\nconst { data, loading } = state.line.model;\n\nreturn {\n    linesList: data\n};\n\nexport default connect(\n  mapStateToProps,\n  mapDispatchToProps\n)(SomeComponent);\n\n\n//Actions usage\ncomponentDidMount(){\n    this.props.dispatchAction(communicationLine.namespace, 'collection', actionsTypes.get, payload);\n}\n\n```\n\n## Detailed explanation\n\nThe idea of this package is to provide a simple way (toolset) of generating event publishers and subscribers.\n\n### **!!! _IMPORTANT_ !!!**\n\n> If you want to understand this module completely you should be familiar with publisher-subscriber pattern (https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern).\n> Because in fact this pattern underlies for Redux/Saga communication.\n\nIn fact we have:\n\n1. event publisher\n   - actions - common example for generating events\n2. event subscriber reducer\n   - reducer - common example for handling events and update the store\n   - saga - handlers that can be used for side effects and generating new event\n\nActually each async action consists of 3 actions:\n\n1. Start action - triggered to start execution of async call\n2. Success action - called if action finished with success\n3. Fail action - called if action finished with fail\n\nWe can use reducers to update the store depending on action type and use sagas to generate some actions depending on results of other actions.\n\nFor example we can handle _USER_MODEL_GET_SUCCESS_ action and after that generate action _TASK_COLLECTION_GET_START_ to start getting collection of tasks for current user.\n\n## Store structure:\n\nThe store consists of namespaces that are divided into branches. Each branch contains 3 fields:\n\n1. Data - data for this branch\n2. Loading - status of data loading of this branch\n3. Errors - errors for branch if there are any\n4. Params - params that are provided in the start action\n   For more details see implementation in ./src/buildReducer.ts\n\n#### Example:\n\nNamespace - user\nBranches - model, collection\n\n```\nstore = {\n    user: {\n        model: {\n            data: {\n                data: {\n                    id: 1\n                    firstName: \"Ivan\",\n                    lastName: \"Tershukov\"\n                },\n                meta: {\n                    lastLoginAt: '01.01.19 12:00'\n                }\n            },\n            params: 1, // id of current model\n            loading: false,\n            errors: null\n        },\n        collection: {\n            data: {\n                data: [\n                    {\n                        id: 1\n                        firstName: \"Ivan\",\n                        lastName: \"Tershukov\"\n                    },\n                    {\n                        id: 2\n                        firstName: \"Yana\",\n                        lastName: \"Banina\"\n                    },\n                    {\n                        id: 3\n                        firstName: \"Mike\",\n                        lastName: \"Sidorov\"\n                    }\n                ],\n                meta: {\n                    limit: 100,\n                    offset: 0,\n                    q: ''\n                }\n            },\n            params: {\n                order: 'asc',\n                limir: 10,\n                offset: 50\n            },\n            loading: false,\n            errors: null\n        }\n    }\n}\n```\n\n## Strategy:\n\nThe strategy determines which part of communication logic will be generated.\nThe most common strategy is Base strategy.\nTo initialize any strategy you should use Config.\n\n### CRUD strategy\n\nWill generate actions, reducers and sagas for 2 base branches:\n\n1. Model\n2. Collection\n\nExample:\n\n```\n// To create a strategy you should provide a config\nconst strategy = new CRUDStrategy(config);\n\nconst communicationLine = buildCommunication(strategy);\n```\n\n### Base strategy\n\nIf you want you can give any names to branches, but preferably use 'model' for entity which you will work on and 'collection' for list of entities.\n\n## Config\n\nConfig is needed to tune strategy behaviour. Config can be more or less complicated depending on strategy type.\nEach config should contain namespace and API provider.\nFor Base strategy you also should provide the list of branches.\n\n## API Provider\n\nIt's an object that contains implementation for side effects calls.\nThe most common example are API calls, but it can also contain any async calls to Local storage, DB, etc.\n\n## Branches\n\nBranch describes behavior for branch of the store. At the moment it includes only a branch name.\nAnd if needed you can also setup initial state for the branch.\n\n### Example\n\n```\nconst namespace = 'auth';\n\nconst apiProvider = {\n  [getAPIMethodName(namespace, 'registration', 'post')]: (data): Promise<any> => axios.post('/registration', data),\n  //Async state init\n  [getAPIMethodName(namespace, 'model', 'init')]: (): Promise<any> => getCreds().then(data => ({ data })),\n  [getAPIMethodName(namespace, 'model', 'get')]: (): Promise<any> => axios.get('/auth'),\n  [getAPIMethodName(namespace, 'model', 'post')]: (data): Promise<any> => axios.post('/auth', data),\n  [getAPIMethodName(namespace, 'model', 'delete')]: (data): Promise<any> => axios.delete('/auth', data),\n  [getAPIMethodName(namespace, 'reset', 'post')]: (data): Promise<any> => axios.post('/password-reset', data),\n  [getAPIMethodName(namespace, 'reset', 'put')]: (data): Promise<any> => axios.put('/password-reset', data),\n  [getAPIMethodName(namespace, 'reset', 'delete')]: (): Promise<any> => Promise.resolve({})\n};\n\nconst config = {\n  namespace,\n  apiProvider,\n  branches: [new Branch('registration'), new Branch('model'), new Branch('reset')]\n};\n\nconst strategy = new BaseStrategy(config);\n\nconst communicationAuth = buildCommunication(strategy);\n```\n\n## Toolset\n\nThis package also contains a toolset that simplifies your life.\nFor example you can easy generate types for actions:\n\n```\ngetStartType('users', 'model', 'get') => USERS_MODEL_GET_TRY\ngetSuccessType('users', 'model', 'get') => USERS_MODEL_GET_SUCCESS\ngetFailType('users', 'model', 'get') => USERS_MODEL_GET_FAIL\n```\n\nAlso you can easily generate names for API provider methods\n\n```\ngetAPIMethodName('users', 'model', 'GET') => getUsersModel\n```\n\nMore examples see in: ./src/helpers.spec.ts\n\n## Types of actions\n\nactionsTypes - it's enum with base set of default actions.\nAt at the moment it supports _init_, _clear_, _add_, _get_, _update_ and _delete_ types.\n\n## Sagas combinations\n\nIf you want to add sagas you can just add them directly in communication sagas array or in the root saga.\n\n```\nfunction* getEmptyCollection(action: any) {\n  // Here you can use put to generate action or call to call any async funtions\n  ...\n}\n\nfunction* getEmptyCollectionSaga() {\n  const successActionType = getSuccessType(namespace, 'collection', actionsTypes.get);\n\n  yield takeEvery(successActionType, getEmptyCollection);\n}\n```\n\nand then\n\n```\ncommunicationLine.sagas.push(getEmptyCollectionSaga());\n\n```\n\nor\n\n```\nexport default function* rootSaga(): any {\n  yield all([\n    getEmptyCollectionSaga(),\n    ...\n  ]);\n}\n\n```\n\n## Response formatting\n\nIf you want format or map responses from API Provider you can use `responseFormatter`. Just put it in the config.\n\n### Example:\n\n```\nconst responseFormatter = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    const resultData = [ ...branchState.data, ... response.data.items];\n    const resultMeta = { count: branchState.meta.count + response.meta.count};\n    return {data: resultData, meta: resultMeta};\n  }\n}\n```\n\n## Hooks\n\nYou can specify post hooks for `success` and `fail` sagas to prevent creation custom sagas\nif you just want to do some sync operations.\n\n### Example\n\n```\nconst postSuccessHooks = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    console.log(response, payload, branchState, state);\n  }\n}\n\nconst postFailHooks = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    console.log(response, payload, branchState, state);\n  }\n}\n```\n\n## Full example:\n\n```\nconst namespace = 'line';\n//\nconst apiProvider = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (): Promise<any> => axios.get(`/lines`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.get)]: (line): Promise<any> => axios.get(`/lines/${line.id}`),\n  [getAPIMethodName(namespace, 'model', actionsTypes.post)]: (line): Promise<any> => axios.post(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.put)]: (line): Promise<any> => axios.put(`/lines/${line.id}`, line),\n  [getAPIMethodName(namespace, 'model', actionsTypes.delete)]: (line): Promise<any> => axios.delete(`/lines/${line.id}`)\n};\n\nconst responseFormatter = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    const resultData = [ ...branchState.data, ... response.data.items];\n    const resultMeta = { count: branchState.meta.count + response.meta.count};\n    return {data: resultData, meta: resultMeta};\n  }\n};\n\nconst postSuccessHooks = {\n  [getAPIMethodName(namespace, 'collection', actionsTypes.get)]: (response, payload, branchState, state) => {\n    console.log(response, payload, branchState, state);\n  }\n}\n\nconst config = {\n  namespace,\n  apiProvider,\n  responseFormatter,\n  postSuccessHooks\n};\n\nconst strategy = new CRUDStrategy(config);\n\nconst communicationLine = buildCommunication(strategy);\n```\n\n## Troubleshooting\n\n1. Update version of saga\n","readmeFilename":"README.md","gitHead":"585db0ce35dc5e6f07b58226825763f72a62b1c9","_id":"@axmit/redux-communications@4.0.0-beta.7","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"axmit-engineers","email":"engineers@axmit.com"},"dist":{"integrity":"sha512-iNu0YmN3Q396410UMwJLka1GG2PQLCMiFqW0+vgpPwunsPTX7/XjsAJjzLuyuZ+FPVgRUITji4QDGVMS0HCXCg==","shasum":"a7a988500d771980cedb0715b133dcc43f1867d3","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-4.0.0-beta.7.tgz","fileCount":52,"unpackedSize":175084,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJco/BTCRA9TVsSAnZWagAAJQ0P/26qUBhE7AcpgwUbSs/1\nYC4ET8Hlxh/vATwI2zbJ0TL+2EHS83FehtIs0BFERGSXOYWTPatTgRRTv4E0\n9ux7s1zLG5wCx28V3XIQ3CxlNfEJsUFzClIWQQ05LJAtbyezHGEXqWDxQLtA\n5cpR8B/SaBUH9Xz470UzHB1MeKCBUAr/ZZqSn6oA5oV8z1w/Vnn6E0vYrFU2\ngPbww069a2+SocZs0TlCJUtizMEEF06GKL44FSWgvAIyM01vuv8kpA3p3A5O\n56wguROjpf9nZOLnoE93T9vHByQhwT4ZtFKl56MzQ44Fox07HJevEYkxm8OU\n7JPhcR98mJBbm5L6JXjs8pP7D9/+d78qlp/jzK3xJUbSX/Ck1Wqj5g+56oht\nJzI9fE3PeCquSJrRfnBhs0UetfSwuh4SzNvcRJLH3FiHuR+R0alrOOKFy2cA\nsPlFff5ySoY7Li/8ds6MluYA8akS3g1YIgecitFsBFkBvF3BdvfDTxysFS5I\niLCqz4U8gO2Usxsm5iuydT4e41OQp7sEQFRKzaHyDjpGmvHGylMDpAJWgSej\nRB1RhBwCNh0KB5S7+TkVKeeZiUg12WrXbKnGIMMERFbevruwHZJ6cHGNww3F\n/WnCBn6gxIL+gs0coWTcieoCW/uDRUGniYoUI8NdmTpRQBtKLEjwTUrd4B75\njtvf\r\n=lqO3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTcQnclnR0D7ICZl3MNNlAf5ovPT9l0OVpaoCcQjTFMwIgdSR6WRRVv4v7/+dTqDirFdnZNqpYx9+UfK14zhZL38U="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_4.0.0-beta.7_1554247762698_0.5212484086945981"},"_hasShrinkwrap":false},"3.3.3":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"3.3.3","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"13d8e68dc9f2ec25ac13c819875952eaae379bd3","_id":"@axmit/redux-communications@3.3.3","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-z+UHz7tOexNKXdG+1hk43QWEBpIjiy6HxQMIwKEj/ygD+iMARP/R6EGlonTfYyVOcLmisOZEyVoDh6IfMIw2jA==","shasum":"0ceaad1a8cd0175256faf6dfa936f6f1ff4524e6","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-3.3.3.tgz","fileCount":43,"unpackedSize":165617,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcpJJsCRA9TVsSAnZWagAAmIMQAIcckPZnfANVWrmbGhk9\nySvYCwXfjweL283MSuckvRJK+uEI42hcXiTeo3yOlzQihFGA0WBNVYU9TJv3\nQS+aBr1/ZPjZrsZPj26l4zqfask8B5ZhRaHqf4E1CireJ9exHzw5XKkZl1N4\nYe7kmvXS3enQmgQEKqIqs5I2tl0BmjfxLgUS6CioW29L0HLCDOkZD0vDWTUz\n/0GfW/Hx8XHPDPdZoqghsQJxTuEF6LRgc4K4ex7SCPgSyDHxL4SW9s2msBVm\ne7VZO40qqsklEWsZaI+/FzhTGYd6CxLHMDt84dN02tTu7H6UvaA9EsjLchO9\nq7gJ4WNLk/Kh7YozWI2SwlECxWsk2jqjKm6itr7jV9dAW1DJkRRuu3RCLvCo\nK/wva6+KQVhYpx/BHLj4MU8Xa4mvqo2vX1WG1pukLNycrLpQ6IG8mmdOAo7N\nb0ioygkRgRNhjlJd8UO0GvgEgaaZTVoDMy/s0FkMU/1llg3THPgUAQDC6L5k\n2e1EhIzqe6shSBciJSxB2L/KMvpt4z9/12nEvg/JmaG4UlXjnsrmzz1RUOsk\nm4IDJQEMu7wPQN9xFQrXXf/fayBcZJlZTMBQO5wLxhNZYNuEK7cGF3DqDsrZ\nAC0aKjYd/T21WVq6HUqjNagUMDIy3XHLMtZHPFFpfclxKUU10xk7Vb/g56r+\ntg1B\r\n=4WuC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCDR3m1ObjJ9aBPsvs7hCR489p6OIIj0pQ82pg8qHxucgIhAN0srpTOkZcg5OYOvAkh6eLApB7DhkOmIF5R+D7AFDOG"}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_3.3.3_1554289260015_0.43960512911751404"},"_hasShrinkwrap":false},"4.0.2":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"4.0.2","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"d6314ebd7ad455fe3ed7fc6cfe913fd3ac7cc293","_id":"@axmit/redux-communications@4.0.2","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-jnIOtbp9/Fvv6gRA6hRRVv6bItfHcMzdcLiPU51JMVk9pHWS/a9laXiqFk0wMejkgZaVdYqkXbtsLTH+TCgCuQ==","shasum":"54c29119c688645dccd112be559d42bb36260c34","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-4.0.2.tgz","fileCount":44,"unpackedSize":153042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcpu4rCRA9TVsSAnZWagAAy3IP/jMP5QqJLZN3syVUFb/P\nb2bOjCPEhqnkRtmfDtI+Y8aeAfQkyUy+HY2/Kz+ZK8tV6NpQ9MJWeUTEyuhx\n6jgIZkTcgY6COb9p7CM1yyEjlgE3LrzWm9sqmJgARanDS8nwnhMVAgXyWWI8\n3jOF2gHyUpZXeWES0cJ4VBzFCY1wcIrv//r0RvAc+DwKp4crHzbbQx0EqeG3\nxd2YmLXEa11LJZ8L+6y3FeREqv/rhDJpLNIXRpJPrOB01G0ouc6aWRZHyjGf\nli6I5eBkHYqHNN7TnnDJ/PCNqCaFEizQcA8aQYW++i7otFCVBwFxdv2DZbw6\noEHLItYgEkkIzjdsg8rXsrReHvQNLqwty6EPp0OpwceIoUR0VVKPt/E+axHu\nIJpBfgFlJzmglUjjLaCSJSxqTRTejhbR/tTPvitdJDFDLN+p6EV9/w+kScLK\nhqrMvMwb1vM4Oz5LsJR/aCguDpaopJHpk63bgELLn1aMgQwJuUbcHbodvPGc\nFHSjaf9qj9mKLSBeDW+Xx40ztdyplu7kYXw6xjAh9eV8O0eIvNqDQKMFlpBE\n90YBgWII2eY3kS14ZgLefkNjkP5nhZbqT/QzrlvGUMfIHmIpT7jvxCDhcpNg\nU5LZLamtqwqHqSxf7G/QN67KgnPSEHyxLTLi9FvuwzLYXk2DFv2ea8gYU6B/\nZOGl\r\n=q+WB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBv0WwPweXgbaYCIM5XDeuF06XaGSrl6dmAHS86RegDTAiEAlnDo227PQz52cFSZsWwXkIPap1mmBEdRawvF8NCaxNk="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_4.0.2_1554443818379_0.8232053509725612"},"_hasShrinkwrap":false},"4.0.3-beta.0":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"4.0.3-beta.0","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","readme":"# Redux communications\n\nThis package provides a toolset to simplify working with redux and saga libs.\n\n## Installation\n\n`npm i @axmit/redux-communications` or `yarn add @axmit/redux-communications`\n\n## Quick start\n\nTo create a new communication you should do the following:\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch, actionsTypes } from '@axmit/redux-communications';\n\nconst namespace = 'line';\nexport interface ILinesConnectedProps {\n\tlineCollection: StoreBranches<[], any>\n\tgetLineCollection(params: any): void;\n\tclearLineCollection(): void;\n}\n\nconst apiProvider = new APIProvider(actionsTypes.get, Promise<any> => axios.get(`/lines`));\nconst branches = [new Branch('collection', apiProvider, new StoreBranch([])]\n\nconst strategy = new BaseStrategy({\n\tnamespace,\n\tbranches\n})\n\nconst communicationLine = buildCommunication<ILinesConnectedProps>(strategy);\n```\n\nAfter that you will have a communication that contains base set of reducers, actions. You can easily setup it as usual.\n\n```\n//Sagas setup\nexport default function* rootSaga(): any {\n yield all([ ...communicationLine.sagas ]);}\n\n//Reducers setup\nconst reducers = {\n ...communicationLine.reducers\n };\n```\n\nCommunication also contains `injector` for adding generated dispatchers and store branches to components\n\n```typescript\nimport React from 'react';\nimport { ILinesConnectedProps } from './linesCommunication';\n\nclass TestComponent extends React.Component<ILinesConnectedProps> {\n  //Component logic goes here\n}\n\ncommunicationLine.injector(TestComponent);\n```\n\n## Detailed explanation\n\nThe idea of this package is to provide a simple way (toolset) of generating event publishers and subscribers.\n\n### **!!! _IMPORTANT_ !!!**\n\n> If you want to understand this module completely you should be familiar with publisher-subscriber pattern (https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern).  \n> Because in fact this pattern underlies for Redux/Saga communication.\n\nIn fact we have:\n\n1. event publisher\n   - actions - common example for generating events\n2. event subscriber reducer\n   - reducer - common example for handling events and update the store\n   - saga - handlers that can be used for side effects and generating new event\n\nActually each async action consists of 3 actions:\n\n1. Start action - triggered to start execution of async call\n2. Success action - called if action finished with success\n3. Fail action - called if action finished with fail\n\nWe can use reducers to update the store depending on action type and use sagas to generate some actions depending on results of other actions.\n\nFor example we can handle _USER_MODEL_GET_SUCCESS_ action and after that generate action _TASK_COLLECTION_GET_START_ to start getting collection of tasks for current user.\n\n## Store structure:\n\nThe store consists of namespaces that are divided into branches. Each branch contains 4 fields:\n\n1. Data - data for this branch\n2. Loading - status of data loading of this branch\n3. Errors - errors for branch if there are any\n4. Params - params that are provided in the start action  \n   For more details see implementation in ./src/buildReducer.ts\n\n#### Example:\n\nNamespace - user  \nBranches - model, collection\n\n```typescript\nstore = {\n  user: {\n    model: {\n      data: {\n        data: {\n          id: 1,\n          firstName: 'Ivan',\n          lastName: 'Tershukov'\n        },\n        meta: {\n          lastLoginAt: '01.01.19 12:00'\n        }\n      },\n      params: 1, // id of current model\n      loading: false,\n      errors: null\n    },\n    collection: {\n      data: {\n        data: [\n          {\n            id: 1,\n            firstName: 'Ivan',\n            lastName: 'Tershukov'\n          },\n          {\n            id: 2,\n            firstName: 'Yana',\n            lastName: 'Banina'\n          },\n          {\n            id: 3,\n            firstName: 'Mike',\n            lastName: 'Sidorov'\n          }\n        ],\n        meta: {\n          limit: 100,\n          offset: 0,\n          q: ''\n        }\n      },\n      params: {\n        order: 'asc',\n        limit: 10,\n        offset: 50\n      },\n      loading: false,\n      errors: null\n    }\n  }\n};\n```\n\n# Inner structure\n\n## Strategies:\n\nThe strategy determines which part of communication logic will be generated.\n\nAll strategy receives config as constructor param. Every strategy has unique params set but there is common config params for all of them:\n\n- namespace: string (required) - name of store namespace to be generated\n- actions: Array (optional) - array of custom actions\n- reducers: Array (optional) - array of custom reducers\n- sagas: Array (optional) - array of custom sagas\n\n### BaseStrategy\n\nThis strategy requires direct approach in communication generation. You must specify at least `namespace` and `branches` to get communication.\n\nAvailable `BaseStrategy` methods:\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- branches: Branch[](required) - array of `Branches` see below for more information\n\n#### .buildReducers()\n\nMethod to build reducers based on strategy config\n\n#### .buildInjector()\n\nMethod to build injector based on strategy config\n\n#### .buildSagas()\n\nMethod to build sagas based on strategy config\n\n### CRUDStrategy\n\nThis strategy predefines 2 namespace branches in `Redux`:\n\n1. Model\n2. Collection\n\nIt extends `BaseStrategy` so methods are similar\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- modelApiProviders: APIProvider[](required) - array of APIProviders connected to model store branch\n- collectionApiProviders: APIProvider[](required) - array of APIProviders connected to collection store branch\n- modelInitialState: StoreBranch (optional) - initial state for model branch\n- collectionInitialState: StoreBranch (optional) - initial state for collection branch\n\n### SimpleStrategy\n\nThis strategy predefines only one namespace branch `model` in `Redux`:\nIt extends `BaseStrategy` so methods are similar\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- apiProvider: APIProvider[](required) - array of APIProviders connected to model store branch\n- initialState: StoreBranch (optional) - initial state for model branch\n\n## Class Helpers\n\nThere is an amount of classes to help you build you communication\n\n### APIProvider\n\nThis class contains provider for your API logic (request and so on)\n**NOTE!** For each API provider you defined a saga will be generated\n\n#### constructor(type, handler, hooks)\n\n- type: string - string literal indicating type of performing action (can be any string you like)\n- handler: Function - function containing provider logic (ex. API call)\n- hooks (optional) - object containing different hooks for APIProvider each hook is function with following signature (response, payload, branchState, fullState) => any:\n\n  - response - handler call result\n  - payload - action payload\n  - branchState - current branch state\n  - fullState- full application state\n\n  Available hooks:\n\n  - responseFormatter - occur just after after handler call\n  - postSuccessHooks - occur after success action is dispatched\n  - postFailHooks - occur after fail action is dispatched\n\n#### Example\n\n```typescript\nnew APIProvider('get', () => axios.get('/test'), {\n  responseFormatter: (response, payload, branchState, fullState) => response.map(item => response.test)\n});\n```\n\nThis `APIProvider` will generate a saga which send GET /test and apply `responseFormatter` to response\n\n### Branch\n\nThis class responsible for namespace branches in store\n\nAvailable `Branch` methods\n\n#### constructor(name, apiProviders, initialState)\n\n- name: string - branch name\n- apiProviders: APIProvider[] | APIProvider - array of connected to branch APIProviders\n- initialState: StoreBranch - initial state of branch\n\n#### .buildBranchReducers(namespace: string)\n\nBuilds reducers for store branch\n\n#### .buildBranchDispatchers(namespace: string)\n\nBuilds dispatchers for store branch\n\n#### .buildBranchSagas(namespace: string)\n\nBuilds sagas for store branch\n\n### StoreBranch\n\nHelper class for defining store branches, every store branch is instance of `StoreBranch`\n\nContains following fields:\n\n- data - main branch data\n- params - params for dispatchers\n- errors - branch errors\n- loading - progress of current async operation\n\n#### constructor(data, params, errors, loading)\n\n## Communication factory\n\nThis factory contains functions for communications build:\n\n### buildCommunication\n\nBuild communication based on strategy provided. Return object containing:\n\n- namespace: string - namespace\n- branches: Branches[] - store branches\n- reducers - builded reducers (must be includes into application reducers)\n- sagas - builded sagas (must be included into application sagas)\n- injector - react HOC for injecting props into components (connect())\n\n**NOTE!** To make `injector` work correctly you must define interface describing injected props and pass it into `buildCommunication`\n\n### Example\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch } from '@axmit/redux-communications';\n\nexport interface ITestConnectedProps {\n  testNames: StoreBranch<string[], string>;\n  getTestNames(searchStr?: string): void;\n  clearTestNames(): void;\n}\n\nconst apiProvider = new APIProvider('get', () => axios.get('/test/names'));\nconst branches = [new Branch('names', apiProvider, new StoreBranch([]))];\n\nconst strategy = new BaseStrategy({\n  namespace: 'test',\n  branches\n});\n\nconst testCommunication = buildCommunication<ITestConnectedProps>(strategy);\n```\n\nIn this example `ITestConnectedProps` passed as generic param into `buildCommunication` for right types in injector;\n\n### Rules of IConnectedProps interfaces\n\nConnected props interface contains of 2 parts:\n\n- state branches - generates based on `Branch` amount you pass into strategy, for each branch injector will add property by following format `[namespace][BranchName]` .\n  - **Example** if namespace is `lines` and there is 2 branches: `[new Branch('model'), new Branch('collection')]` then there will be 2 properties injected by generated injector: `linesModel` and `linesCollection`\n- dispatchers - generates based on `APIProviders` amount plus `clear` dispatcher for each branch is generated automatically. For each `APIProvider` will be generated dispatcher by following format `[APIProviderType][Namespace][BranchName]`.\n  - **Example** if namespace is `lines`, branch is `new Branch('names', apiProviders)` and `apiProviders` are\n    `typescript const apiProviders = [ new APIProvider('get', handler), new APIProvider('update', handler2) ]`\n    Dispatchers to be generated will be\n    `getLinesNames clearLinesNames updateLinesNames`\n\n## Toolset\n\nThis package also contains a toolset that simplifies your life.  \nFor example you can easy generate types for actions:\n\n```\ngetStartType('users', 'model', 'get') => USERS_MODEL_GET_TRY\ngetSuccessType('users', 'model', 'get') => USERS_MODEL_GET_SUCCESS\ngetFailType('users', 'model', 'get') => USERS_MODEL_GET_FAIL\n```\n\nAlso you can easily generate names for API provider methods\n\n```\ngetAPIMethodName('users', 'model', 'GET') => getUsersModel\n```\n\nMore examples see in: ./src/helpers.spec.ts\n\n## Types of actions\n\nactionsTypes - it's enum with base set of default actions.  \nAt at the moment it supports _init_, _clear_, _add_, _get_, _update_ and _delete_ types.\n\n## Sagas combinations\n\nIf you want to add sagas you can just add them directly in communication sagas array or in the root saga.\n\n```\nfunction* getEmptyCollection(action: any) {\n // Here you can use put to generate action or call to call any async funtions ...}\n\nfunction* getEmptyCollectionSaga() {\n const successActionType = getSuccessType(namespace, 'collection', actionsTypes.get);\n yield takeEvery(successActionType, getEmptyCollection);}\n```\n\nand then\n\n```\ncommunicationLine.sagas.push(getEmptyCollectionSaga());\n\n```\n\nor\n\n```\nexport default function* rootSaga(): any {\n yield all([ getEmptyCollectionSaga(), ... ]);}\n\n```\n\n## Full example\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch, actionsTypes } from '@axmit/redux-communications';\n\nconst namespace = 'line';\n\nexport interface ILineModel {\n  id: number;\n  name: string;\n}\n\nexport interface ILinesConnectedProps {\n  lineCollection: StoreBranch<ILineModel[], any>;\n  lineModel: StoreBranch<ILineModel, any>;\n  getLineCollection(params: any): void;\n  clearLineCollection(): void;\n  getLineModel(id: number): void;\n  updateLineModel(id: number, data: ILineModel): void;\n  clearLineModel(): void;\n}\n\nconst collectionApiProvider = new APIProvider(actionsTypes.get, (): Promise<ILineModel[]> => axios.get(`/lines`));\nconst modelApiProvider = [\n  new APIProvider(actionsTypes.get, (id: number): Promise<ILineModel> => axios.get(`/lines/${id}`), {\n    responseFormatter: (response, payload, branchState, fullState) => response.map(model => model),\n    postSuccessHook: (response, payload, branchState, fullState) => console.log('post success'),\n    postFailHook: (response, payload, branchState, fullState) => console.log('post fail')\n  }),\n  new APIProvider(actionsTypes.update, (id: number, data: ILineModel): Promise<ILineModel> => axios.put(`/lines/${id}`, data))\n];\n\nconst branches = [new Branch('collection', collectionApiProvider, new StoreBranch([])), new Branch('model', modelApiProvider)];\n\nconst strategy = new BaseStrategy({\n  namespace,\n  branches\n});\n\nexport const communicationLine = buildCommunication<ILinesConnectedProps>(strategy);\n```\n\n## Troubleshooting\n\n1. Update version of saga\n","readmeFilename":"README.md","gitHead":"ccd58c26a053fa8387bdb512b27f58e839ea1d6f","_id":"@axmit/redux-communications@4.0.3-beta.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"axmit-engineers","email":"engineers@axmit.com"},"dist":{"integrity":"sha512-wRl9EKK53sSj/GZUqgrZM5V2lcTLBFrxH0ZNwcvtuqd0oKv9sNTFA9/WaI6MOj+1yOPn84k0/lemFKtFSW1AAw==","shasum":"93d5225bbc143d9b5be308087d98fae6bb7f7cc4","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-4.0.3-beta.0.tgz","fileCount":44,"unpackedSize":152916,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2w92CRA9TVsSAnZWagAA/g4P/3NOiJZkKCGNj7Xgk9ZB\n5cgSoP6IMylRrPqdt0/bG7KKPawIj+Y2pqIcQSNnnLmKVteSe+RCsZEKJZY6\n3D0ZBvqeAshRlWigb5LgUfbxvPZzrHb/N8sZeV02A9Gmrd+L5pm2tNU6TNoN\nEz7/lMo+OxsYQ31f+jGgob1Q8AuWooNHyo8kdrd1nTGUo4QRIYZ1Wo1T2Sla\naJEM5N53+AufxJEC7jy+EMfa76f5/jv6yaRmEBryaRhxAbkkeCjf5XOnUhRQ\nZcs+h/OLg1471fY/w7TL5ydJr69NkDdznBcKcJvQp8ZfSN6irQRzYxybOMjm\nBLjV5kqXzC2vl24MGYdlPVpuPGSUe8bcMjrdDoawDkqi6CV9C3aRB1szj6If\n63A8I21zr2GZWH7Eg0o5lzz4yUjfOeDe2bv6XQGAh0NzX/ztxAzbdBscA4ym\nWBRssy1dzIwFNialEOJpt4h8X1na3NgaJN3M/LRcrQgfVzMBNcEOSle7xWmI\nA57zKInmC+2QBLi+PIJ3zkjX2naYPy6OL5qCgHQh2e4TdEyH5BmowTOL0DPw\n6YmiNCQd1E8exZMTBA0tGWd6p/9NkRt4yvt2TRdyvka8XU3p4xJBfK2shQ1I\nhUDrkfK2Lmut6zt8a0uG/KPTXaWF49A3Xm3dB7Lns1/kRTbucWWeNoRbPVwm\nHd+i\r\n=hdqp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBSRCterHNFXyLAhaebhKqaizI8tYjDl93cMWOmiXW/mAiBy/liqU/izUUfM3k8vajHAGx2gWWZsCQtnN+nhG+IuBw=="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_4.0.3-beta.0_1557860213772_0.13458874439398305"},"_hasShrinkwrap":false},"4.0.3-beta.1":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"4.0.3-beta.1","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","readme":"# Redux communications\n\nThis package provides a toolset to simplify working with redux and saga libs.\n\n## Installation\n\n`npm i @axmit/redux-communications` or `yarn add @axmit/redux-communications`\n\n## Quick start\n\nTo create a new communication you should do the following:\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch, actionsTypes } from '@axmit/redux-communications';\n\nconst namespace = 'line';\nexport interface ILinesConnectedProps {\n\tlineCollection: StoreBranches<[], any>\n\tgetLineCollection(params: any): void;\n\tclearLineCollection(): void;\n}\n\nconst apiProvider = new APIProvider(actionsTypes.get, Promise<any> => axios.get(`/lines`));\nconst branches = [new Branch('collection', apiProvider, new StoreBranch([])]\n\nconst strategy = new BaseStrategy({\n\tnamespace,\n\tbranches\n})\n\nconst communicationLine = buildCommunication<ILinesConnectedProps>(strategy);\n```\n\nAfter that you will have a communication that contains base set of reducers, actions. You can easily setup it as usual.\n\n```\n//Sagas setup\nexport default function* rootSaga(): any {\n yield all([ ...communicationLine.sagas ]);}\n\n//Reducers setup\nconst reducers = {\n ...communicationLine.reducers\n };\n```\n\nCommunication also contains `injector` for adding generated dispatchers and store branches to components\n\n```typescript\nimport React from 'react';\nimport { ILinesConnectedProps } from './linesCommunication';\n\nclass TestComponent extends React.Component<ILinesConnectedProps> {\n  //Component logic goes here\n}\n\ncommunicationLine.injector(TestComponent);\n```\n\n## Detailed explanation\n\nThe idea of this package is to provide a simple way (toolset) of generating event publishers and subscribers.\n\n### **!!! _IMPORTANT_ !!!**\n\n> If you want to understand this module completely you should be familiar with publisher-subscriber pattern (https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern).  \n> Because in fact this pattern underlies for Redux/Saga communication.\n\nIn fact we have:\n\n1. event publisher\n   - actions - common example for generating events\n2. event subscriber reducer\n   - reducer - common example for handling events and update the store\n   - saga - handlers that can be used for side effects and generating new event\n\nActually each async action consists of 3 actions:\n\n1. Start action - triggered to start execution of async call\n2. Success action - called if action finished with success\n3. Fail action - called if action finished with fail\n\nWe can use reducers to update the store depending on action type and use sagas to generate some actions depending on results of other actions.\n\nFor example we can handle _USER_MODEL_GET_SUCCESS_ action and after that generate action _TASK_COLLECTION_GET_START_ to start getting collection of tasks for current user.\n\n## Store structure:\n\nThe store consists of namespaces that are divided into branches. Each branch contains 4 fields:\n\n1. Data - data for this branch\n2. Loading - status of data loading of this branch\n3. Errors - errors for branch if there are any\n4. Params - params that are provided in the start action  \n   For more details see implementation in ./src/buildReducer.ts\n\n#### Example:\n\nNamespace - user  \nBranches - model, collection\n\n```typescript\nstore = {\n  user: {\n    model: {\n      data: {\n        data: {\n          id: 1,\n          firstName: 'Ivan',\n          lastName: 'Tershukov'\n        },\n        meta: {\n          lastLoginAt: '01.01.19 12:00'\n        }\n      },\n      params: 1, // id of current model\n      loading: false,\n      errors: null\n    },\n    collection: {\n      data: {\n        data: [\n          {\n            id: 1,\n            firstName: 'Ivan',\n            lastName: 'Tershukov'\n          },\n          {\n            id: 2,\n            firstName: 'Yana',\n            lastName: 'Banina'\n          },\n          {\n            id: 3,\n            firstName: 'Mike',\n            lastName: 'Sidorov'\n          }\n        ],\n        meta: {\n          limit: 100,\n          offset: 0,\n          q: ''\n        }\n      },\n      params: {\n        order: 'asc',\n        limit: 10,\n        offset: 50\n      },\n      loading: false,\n      errors: null\n    }\n  }\n};\n```\n\n# Inner structure\n\n## Strategies:\n\nThe strategy determines which part of communication logic will be generated.\n\nAll strategy receives config as constructor param. Every strategy has unique params set but there is common config params for all of them:\n\n- namespace: string (required) - name of store namespace to be generated\n- actions: Array (optional) - array of custom actions\n- reducers: Array (optional) - array of custom reducers\n- sagas: Array (optional) - array of custom sagas\n\n### BaseStrategy\n\nThis strategy requires direct approach in communication generation. You must specify at least `namespace` and `branches` to get communication.\n\nAvailable `BaseStrategy` methods:\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- branches: Branch[](required) - array of `Branches` see below for more information\n\n#### .buildReducers()\n\nMethod to build reducers based on strategy config\n\n#### .buildInjector()\n\nMethod to build injector based on strategy config\n\n#### .buildSagas()\n\nMethod to build sagas based on strategy config\n\n### CRUDStrategy\n\nThis strategy predefines 2 namespace branches in `Redux`:\n\n1. Model\n2. Collection\n\nIt extends `BaseStrategy` so methods are similar\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- modelApiProviders: APIProvider[](required) - array of APIProviders connected to model store branch\n- collectionApiProviders: APIProvider[](required) - array of APIProviders connected to collection store branch\n- modelInitialState: StoreBranch (optional) - initial state for model branch\n- collectionInitialState: StoreBranch (optional) - initial state for collection branch\n\n### SimpleStrategy\n\nThis strategy predefines only one namespace branch `model` in `Redux`:\nIt extends `BaseStrategy` so methods are similar\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- apiProvider: APIProvider[](required) - array of APIProviders connected to model store branch\n- initialState: StoreBranch (optional) - initial state for model branch\n\n## Class Helpers\n\nThere is an amount of classes to help you build you communication\n\n### APIProvider\n\nThis class contains provider for your API logic (request and so on)\n**NOTE!** For each API provider you defined a saga will be generated\n\n#### constructor(type, handler, hooks)\n\n- type: string - string literal indicating type of performing action (can be any string you like)\n- handler: Function - function containing provider logic (ex. API call)\n- hooks (optional) - object containing different hooks for APIProvider each hook is function with following signature (response, payload, branchState, fullState) => any:\n\n  - response - handler call result\n  - payload - action payload\n  - branchState - current branch state\n  - fullState- full application state\n\n  Available hooks:\n\n  - responseFormatter - occur just after after handler call\n  - postSuccessHooks - occur after success action is dispatched\n  - postFailHooks - occur after fail action is dispatched\n\n#### Example\n\n```typescript\nnew APIProvider('get', () => axios.get('/test'), {\n  responseFormatter: (response, payload, branchState, fullState) => response.map(item => response.test)\n});\n```\n\nThis `APIProvider` will generate a saga which send GET /test and apply `responseFormatter` to response\n\n### Branch\n\nThis class responsible for namespace branches in store\n\nAvailable `Branch` methods\n\n#### constructor(name, apiProviders, initialState)\n\n- name: string - branch name\n- apiProviders: APIProvider[] | APIProvider - array of connected to branch APIProviders\n- initialState: StoreBranch - initial state of branch\n\n#### .buildBranchReducers(namespace: string)\n\nBuilds reducers for store branch\n\n#### .buildBranchDispatchers(namespace: string)\n\nBuilds dispatchers for store branch\n\n#### .buildBranchSagas(namespace: string)\n\nBuilds sagas for store branch\n\n### StoreBranch\n\nHelper class for defining store branches, every store branch is instance of `StoreBranch`\n\nContains following fields:\n\n- data - main branch data\n- params - params for dispatchers\n- errors - branch errors\n- loading - progress of current async operation\n\n#### constructor(data, params, errors, loading)\n\n## Communication factory\n\nThis factory contains functions for communications build:\n\n### buildCommunication\n\nBuild communication based on strategy provided. Return object containing:\n\n- namespace: string - namespace\n- branches: Branches[] - store branches\n- reducers - builded reducers (must be includes into application reducers)\n- sagas - builded sagas (must be included into application sagas)\n- injector - react HOC for injecting props into components (connect())\n\n**NOTE!** To make `injector` work correctly you must define interface describing injected props and pass it into `buildCommunication`\n\n### Example\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch } from '@axmit/redux-communications';\n\nexport interface ITestConnectedProps {\n  testNames: StoreBranch<string[], string>;\n  getTestNames(searchStr?: string): void;\n  clearTestNames(): void;\n}\n\nconst apiProvider = new APIProvider('get', () => axios.get('/test/names'));\nconst branches = [new Branch('names', apiProvider, new StoreBranch([]))];\n\nconst strategy = new BaseStrategy({\n  namespace: 'test',\n  branches\n});\n\nconst testCommunication = buildCommunication<ITestConnectedProps>(strategy);\n```\n\nIn this example `ITestConnectedProps` passed as generic param into `buildCommunication` for right types in injector;\n\n### Rules of IConnectedProps interfaces\n\nConnected props interface contains of 2 parts:\n\n- state branches - generates based on `Branch` amount you pass into strategy, for each branch injector will add property by following format `[namespace][BranchName]` .\n  - **Example** if namespace is `lines` and there is 2 branches: `[new Branch('model'), new Branch('collection')]` then there will be 2 properties injected by generated injector: `linesModel` and `linesCollection`\n- dispatchers - generates based on `APIProviders` amount plus `clear` dispatcher for each branch is generated automatically. For each `APIProvider` will be generated dispatcher by following format `[APIProviderType][Namespace][BranchName]`.\n  - **Example** if namespace is `lines`, branch is `new Branch('names', apiProviders)` and `apiProviders` are\n    `typescript const apiProviders = [ new APIProvider('get', handler), new APIProvider('update', handler2) ]`\n    Dispatchers to be generated will be\n    `getLinesNames clearLinesNames updateLinesNames`\n\n## Toolset\n\nThis package also contains a toolset that simplifies your life.  \nFor example you can easy generate types for actions:\n\n```\ngetStartType('users', 'model', 'get') => USERS_MODEL_GET_TRY\ngetSuccessType('users', 'model', 'get') => USERS_MODEL_GET_SUCCESS\ngetFailType('users', 'model', 'get') => USERS_MODEL_GET_FAIL\n```\n\nAlso you can easily generate names for API provider methods\n\n```\ngetAPIMethodName('users', 'model', 'GET') => getUsersModel\n```\n\nMore examples see in: ./src/helpers.spec.ts\n\n## Types of actions\n\nactionsTypes - it's enum with base set of default actions.  \nAt at the moment it supports _init_, _clear_, _add_, _get_, _update_ and _delete_ types.\n\n## Sagas combinations\n\nIf you want to add sagas you can just add them directly in communication sagas array or in the root saga.\n\n```\nfunction* getEmptyCollection(action: any) {\n // Here you can use put to generate action or call to call any async funtions ...}\n\nfunction* getEmptyCollectionSaga() {\n const successActionType = getSuccessType(namespace, 'collection', actionsTypes.get);\n yield takeEvery(successActionType, getEmptyCollection);}\n```\n\nand then\n\n```\ncommunicationLine.sagas.push(getEmptyCollectionSaga());\n\n```\n\nor\n\n```\nexport default function* rootSaga(): any {\n yield all([ getEmptyCollectionSaga(), ... ]);}\n\n```\n\n## Full example\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch, actionsTypes } from '@axmit/redux-communications';\n\nconst namespace = 'line';\n\nexport interface ILineModel {\n  id: number;\n  name: string;\n}\n\nexport interface ILinesConnectedProps {\n  lineCollection: StoreBranch<ILineModel[], any>;\n  lineModel: StoreBranch<ILineModel, any>;\n  getLineCollection(params: any): void;\n  clearLineCollection(): void;\n  getLineModel(id: number): void;\n  updateLineModel(id: number, data: ILineModel): void;\n  clearLineModel(): void;\n}\n\nconst collectionApiProvider = new APIProvider(actionsTypes.get, (): Promise<ILineModel[]> => axios.get(`/lines`));\nconst modelApiProvider = [\n  new APIProvider(actionsTypes.get, (id: number): Promise<ILineModel> => axios.get(`/lines/${id}`), {\n    responseFormatter: (response, payload, branchState, fullState) => response.map(model => model),\n    postSuccessHook: (response, payload, branchState, fullState) => console.log('post success'),\n    postFailHook: (response, payload, branchState, fullState) => console.log('post fail')\n  }),\n  new APIProvider(actionsTypes.update, (id: number, data: ILineModel): Promise<ILineModel> => axios.put(`/lines/${id}`, data))\n];\n\nconst branches = [new Branch('collection', collectionApiProvider, new StoreBranch([])), new Branch('model', modelApiProvider)];\n\nconst strategy = new BaseStrategy({\n  namespace,\n  branches\n});\n\nexport const communicationLine = buildCommunication<ILinesConnectedProps>(strategy);\n```\n\n## Troubleshooting\n\n1. Update version of saga\n","readmeFilename":"README.md","gitHead":"698e9fdb09be995566ae77a07f64d890749d8c2a","_id":"@axmit/redux-communications@4.0.3-beta.1","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"axmit-engineers","email":"engineers@axmit.com"},"dist":{"integrity":"sha512-TKctz//ud2v2zlVPPU/4X9BsSt6Ki3g9lu0cQGbDYg16F24NMkVUd3fm0FZUnLnKfv73S147ZFiqcEAwkXuwkw==","shasum":"f9b2288f59512a4e94a7433a5d6de210d4b89e25","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-4.0.3-beta.1.tgz","fileCount":44,"unpackedSize":153562,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2xIBCRA9TVsSAnZWagAAXEIP/j6HWUnNnvSb3Q8AJptq\nIKatM1bsUhoPmohWCFijlxz8wIArCSQaVJnof+1sbgGxUXrlNmC9Gy5e16gi\n/KR7lkTKmVqCwCRki7TH8iEGZhNgxC+dvDyTl5oklPir7DlPtGk6x5bVAWyU\ntIyEejTm0M/LJn31Ia/x5MFmusW3noi39RkWZ8OE3cVDVLGq4iR+LUUuO4E2\nN3eob+Ide/WAvq0zzmtEfXQi8pi5pjAxxyabzTsRryLFhUNm0Gj+29BddACS\nv93edu4YSLblZTuaQyJsSRu0Mmrv0ennf59TktRdjW3t4iiMcaTZrT1VLJNu\nHF9QnB7QEmAYf1y97MJDNbdw70K7J6/Ap5yWb108UXc5Rzcakx5lO2L5AAeZ\nmi+LTS/eo9++p6clV4Dgo8s4UHJZLFKdQ7Bz3EzgttHmHfCBZ9RSRgszp9CV\n02m/KJ1Oefi5cpWweQkkotM+xdBjgBlOoOcFWMZHOyY7HdYlXIus+SZPCWI5\n0hg1++bxaOJeWg+3Hxb0n7cBF1Gn94w8bLs8STrxB+asT32nCk7cTlTCwCF8\nhUOL1MfrxnPNHP9vsHbuCf/Gwj2i8ewcjadaVU0TVC3gGwzxFVH/b/50xThm\nq0WHKT2Bhz/sXTRVtwRoAFQK+7IxCgqLxvOwUqfrZI+ckdUR8Z1S/2z09fub\n3TcP\r\n=PuMy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIADSYpk+MurjOYugzKSgMordPX9r8MWgVwcaoGNcCJdpAiA+01IK/45Ub5hp67e9p6WbLnSL0GGr7SncSTb5tC4p+w=="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_4.0.3-beta.1_1557860864761_0.8193813530825373"},"_hasShrinkwrap":false},"4.0.3-beta.2":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"4.0.3-beta.2","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","readme":"# Redux communications\n\nThis package provides a toolset to simplify working with redux and saga libs.\n\n## Installation\n\n`npm i @axmit/redux-communications` or `yarn add @axmit/redux-communications`\n\n## Quick start\n\nTo create a new communication you should do the following:\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch, actionsTypes } from '@axmit/redux-communications';\n\nconst namespace = 'line';\nexport interface ILinesConnectedProps {\n\tlineCollection: StoreBranches<[], any>\n\tgetLineCollection(params: any): void;\n\tclearLineCollection(): void;\n}\n\nconst apiProvider = new APIProvider(actionsTypes.get, Promise<any> => axios.get(`/lines`));\nconst branches = [new Branch('collection', apiProvider, new StoreBranch([])]\n\nconst strategy = new BaseStrategy({\n\tnamespace,\n\tbranches\n})\n\nconst communicationLine = buildCommunication<ILinesConnectedProps>(strategy);\n```\n\nAfter that you will have a communication that contains base set of reducers, actions. You can easily setup it as usual.\n\n```\n//Sagas setup\nexport default function* rootSaga(): any {\n yield all([ ...communicationLine.sagas ]);}\n\n//Reducers setup\nconst reducers = {\n ...communicationLine.reducers\n };\n```\n\nCommunication also contains `injector` for adding generated dispatchers and store branches to components\n\n```typescript\nimport React from 'react';\nimport { ILinesConnectedProps } from './linesCommunication';\n\nclass TestComponent extends React.Component<ILinesConnectedProps> {\n  //Component logic goes here\n}\n\ncommunicationLine.injector(TestComponent);\n```\n\n## Detailed explanation\n\nThe idea of this package is to provide a simple way (toolset) of generating event publishers and subscribers.\n\n### **!!! _IMPORTANT_ !!!**\n\n> If you want to understand this module completely you should be familiar with publisher-subscriber pattern (https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern).  \n> Because in fact this pattern underlies for Redux/Saga communication.\n\nIn fact we have:\n\n1. event publisher\n   - actions - common example for generating events\n2. event subscriber reducer\n   - reducer - common example for handling events and update the store\n   - saga - handlers that can be used for side effects and generating new event\n\nActually each async action consists of 3 actions:\n\n1. Start action - triggered to start execution of async call\n2. Success action - called if action finished with success\n3. Fail action - called if action finished with fail\n\nWe can use reducers to update the store depending on action type and use sagas to generate some actions depending on results of other actions.\n\nFor example we can handle _USER_MODEL_GET_SUCCESS_ action and after that generate action _TASK_COLLECTION_GET_START_ to start getting collection of tasks for current user.\n\n## Store structure:\n\nThe store consists of namespaces that are divided into branches. Each branch contains 4 fields:\n\n1. Data - data for this branch\n2. Loading - status of data loading of this branch\n3. Errors - errors for branch if there are any\n4. Params - params that are provided in the start action  \n   For more details see implementation in ./src/buildReducer.ts\n\n#### Example:\n\nNamespace - user  \nBranches - model, collection\n\n```typescript\nstore = {\n  user: {\n    model: {\n      data: {\n        data: {\n          id: 1,\n          firstName: 'Ivan',\n          lastName: 'Tershukov'\n        },\n        meta: {\n          lastLoginAt: '01.01.19 12:00'\n        }\n      },\n      params: 1, // id of current model\n      loading: false,\n      errors: null\n    },\n    collection: {\n      data: {\n        data: [\n          {\n            id: 1,\n            firstName: 'Ivan',\n            lastName: 'Tershukov'\n          },\n          {\n            id: 2,\n            firstName: 'Yana',\n            lastName: 'Banina'\n          },\n          {\n            id: 3,\n            firstName: 'Mike',\n            lastName: 'Sidorov'\n          }\n        ],\n        meta: {\n          limit: 100,\n          offset: 0,\n          q: ''\n        }\n      },\n      params: {\n        order: 'asc',\n        limit: 10,\n        offset: 50\n      },\n      loading: false,\n      errors: null\n    }\n  }\n};\n```\n\n# Inner structure\n\n## Strategies:\n\nThe strategy determines which part of communication logic will be generated.\n\nAll strategy receives config as constructor param. Every strategy has unique params set but there is common config params for all of them:\n\n- namespace: string (required) - name of store namespace to be generated\n- actions: Array (optional) - array of custom actions\n- reducers: Array (optional) - array of custom reducers\n- sagas: Array (optional) - array of custom sagas\n\n### BaseStrategy\n\nThis strategy requires direct approach in communication generation. You must specify at least `namespace` and `branches` to get communication.\n\nAvailable `BaseStrategy` methods:\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- branches: Branch[](required) - array of `Branches` see below for more information\n\n#### .buildReducers()\n\nMethod to build reducers based on strategy config\n\n#### .buildInjector()\n\nMethod to build injector based on strategy config\n\n#### .buildSagas()\n\nMethod to build sagas based on strategy config\n\n### CRUDStrategy\n\nThis strategy predefines 2 namespace branches in `Redux`:\n\n1. Model\n2. Collection\n\nIt extends `BaseStrategy` so methods are similar\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- modelApiProviders: APIProvider[](required) - array of APIProviders connected to model store branch\n- collectionApiProviders: APIProvider[](required) - array of APIProviders connected to collection store branch\n- modelInitialState: StoreBranch (optional) - initial state for model branch\n- collectionInitialState: StoreBranch (optional) - initial state for collection branch\n\n### SimpleStrategy\n\nThis strategy predefines only one namespace branch `model` in `Redux`:\nIt extends `BaseStrategy` so methods are similar\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- apiProvider: APIProvider[](required) - array of APIProviders connected to model store branch\n- initialState: StoreBranch (optional) - initial state for model branch\n\n## Class Helpers\n\nThere is an amount of classes to help you build you communication\n\n### APIProvider\n\nThis class contains provider for your API logic (request and so on)\n**NOTE!** For each API provider you defined a saga will be generated\n\n#### constructor(type, handler, hooks)\n\n- type: string - string literal indicating type of performing action (can be any string you like)\n- handler: Function - function containing provider logic (ex. API call)\n- hooks (optional) - object containing different hooks for APIProvider each hook is function with following signature (response, payload, branchState, fullState) => any:\n\n  - response - handler call result\n  - payload - action payload\n  - branchState - current branch state\n  - fullState- full application state\n\n  Available hooks:\n\n  - responseFormatter - occur just after after handler call\n  - postSuccessHooks - occur after success action is dispatched\n  - postFailHooks - occur after fail action is dispatched\n\n#### Example\n\n```typescript\nnew APIProvider('get', () => axios.get('/test'), {\n  responseFormatter: (response, payload, branchState, fullState) => response.map(item => response.test)\n});\n```\n\nThis `APIProvider` will generate a saga which send GET /test and apply `responseFormatter` to response\n\n### Branch\n\nThis class responsible for namespace branches in store\n\nAvailable `Branch` methods\n\n#### constructor(name, apiProviders, initialState)\n\n- name: string - branch name\n- apiProviders: APIProvider[] | APIProvider - array of connected to branch APIProviders\n- initialState: StoreBranch - initial state of branch\n\n#### .buildBranchReducers(namespace: string)\n\nBuilds reducers for store branch\n\n#### .buildBranchDispatchers(namespace: string)\n\nBuilds dispatchers for store branch\n\n#### .buildBranchSagas(namespace: string)\n\nBuilds sagas for store branch\n\n### StoreBranch\n\nHelper class for defining store branches, every store branch is instance of `StoreBranch`\n\nContains following fields:\n\n- data - main branch data\n- params - params for dispatchers\n- errors - branch errors\n- loading - progress of current async operation\n\n#### constructor(data, params, errors, loading)\n\n## Communication factory\n\nThis factory contains functions for communications build:\n\n### buildCommunication\n\nBuild communication based on strategy provided. Return object containing:\n\n- namespace: string - namespace\n- branches: Branches[] - store branches\n- reducers - builded reducers (must be includes into application reducers)\n- sagas - builded sagas (must be included into application sagas)\n- injector - react HOC for injecting props into components (connect())\n\n**NOTE!** To make `injector` work correctly you must define interface describing injected props and pass it into `buildCommunication`\n\n### Example\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch } from '@axmit/redux-communications';\n\nexport interface ITestConnectedProps {\n  testNames: StoreBranch<string[], string>;\n  getTestNames(searchStr?: string): void;\n  clearTestNames(): void;\n}\n\nconst apiProvider = new APIProvider('get', () => axios.get('/test/names'));\nconst branches = [new Branch('names', apiProvider, new StoreBranch([]))];\n\nconst strategy = new BaseStrategy({\n  namespace: 'test',\n  branches\n});\n\nconst testCommunication = buildCommunication<ITestConnectedProps>(strategy);\n```\n\nIn this example `ITestConnectedProps` passed as generic param into `buildCommunication` for right types in injector;\n\n### Rules of IConnectedProps interfaces\n\nConnected props interface contains of 2 parts:\n\n- state branches - generates based on `Branch` amount you pass into strategy, for each branch injector will add property by following format `[namespace][BranchName]` .\n  - **Example** if namespace is `lines` and there is 2 branches: `[new Branch('model'), new Branch('collection')]` then there will be 2 properties injected by generated injector: `linesModel` and `linesCollection`\n- dispatchers - generates based on `APIProviders` amount plus `clear` dispatcher for each branch is generated automatically. For each `APIProvider` will be generated dispatcher by following format `[APIProviderType][Namespace][BranchName]`.\n  - **Example** if namespace is `lines`, branch is `new Branch('names', apiProviders)` and `apiProviders` are\n    `typescript const apiProviders = [ new APIProvider('get', handler), new APIProvider('update', handler2) ]`\n    Dispatchers to be generated will be\n    `getLinesNames clearLinesNames updateLinesNames`\n\n## Toolset\n\nThis package also contains a toolset that simplifies your life.  \nFor example you can easy generate types for actions:\n\n```\ngetStartType('users', 'model', 'get') => USERS_MODEL_GET_TRY\ngetSuccessType('users', 'model', 'get') => USERS_MODEL_GET_SUCCESS\ngetFailType('users', 'model', 'get') => USERS_MODEL_GET_FAIL\n```\n\nAlso you can easily generate names for API provider methods\n\n```\ngetAPIMethodName('users', 'model', 'GET') => getUsersModel\n```\n\nMore examples see in: ./src/helpers.spec.ts\n\n## Types of actions\n\nactionsTypes - it's enum with base set of default actions.  \nAt at the moment it supports _init_, _clear_, _add_, _get_, _update_ and _delete_ types.\n\n## Sagas combinations\n\nIf you want to add sagas you can just add them directly in communication sagas array or in the root saga.\n\n```\nfunction* getEmptyCollection(action: any) {\n // Here you can use put to generate action or call to call any async funtions ...}\n\nfunction* getEmptyCollectionSaga() {\n const successActionType = getSuccessType(namespace, 'collection', actionsTypes.get);\n yield takeEvery(successActionType, getEmptyCollection);}\n```\n\nand then\n\n```\ncommunicationLine.sagas.push(getEmptyCollectionSaga());\n\n```\n\nor\n\n```\nexport default function* rootSaga(): any {\n yield all([ getEmptyCollectionSaga(), ... ]);}\n\n```\n\n## Full example\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch, actionsTypes } from '@axmit/redux-communications';\n\nconst namespace = 'line';\n\nexport interface ILineModel {\n  id: number;\n  name: string;\n}\n\nexport interface ILinesConnectedProps {\n  lineCollection: StoreBranch<ILineModel[], any>;\n  lineModel: StoreBranch<ILineModel, any>;\n  getLineCollection(params: any): void;\n  clearLineCollection(): void;\n  getLineModel(id: number): void;\n  updateLineModel(id: number, data: ILineModel): void;\n  clearLineModel(): void;\n}\n\nconst collectionApiProvider = new APIProvider(actionsTypes.get, (): Promise<ILineModel[]> => axios.get(`/lines`));\nconst modelApiProvider = [\n  new APIProvider(actionsTypes.get, (id: number): Promise<ILineModel> => axios.get(`/lines/${id}`), {\n    responseFormatter: (response, payload, branchState, fullState) => response.map(model => model),\n    postSuccessHook: (response, payload, branchState, fullState) => console.log('post success'),\n    postFailHook: (response, payload, branchState, fullState) => console.log('post fail')\n  }),\n  new APIProvider(actionsTypes.update, (id: number, data: ILineModel): Promise<ILineModel> => axios.put(`/lines/${id}`, data))\n];\n\nconst branches = [new Branch('collection', collectionApiProvider, new StoreBranch([])), new Branch('model', modelApiProvider)];\n\nconst strategy = new BaseStrategy({\n  namespace,\n  branches\n});\n\nexport const communicationLine = buildCommunication<ILinesConnectedProps>(strategy);\n```\n\n## Troubleshooting\n\n1. Update version of saga\n","readmeFilename":"README.md","gitHead":"16936d8f138af9d529bb4feb8a40ae7f6ed57fdc","_id":"@axmit/redux-communications@4.0.3-beta.2","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"axmit-engineers","email":"engineers@axmit.com"},"dist":{"integrity":"sha512-51Vue/0Y3gXbsKJazgGcSyLD984/AE/Vn0TNt5vLg79cx6ltQfyOdOg2CyrCEJmOFHPj16n7hNv7GqHGWvNlBg==","shasum":"fc3771e846edddfb92bbc55f4c82f93c203ce1dc","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-4.0.3-beta.2.tgz","fileCount":44,"unpackedSize":152918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2x+BCRA9TVsSAnZWagAAJaMP/RbA835Jk/itLaP2HsKg\neDlE1g2cWv7qiok0ihphG30y7is0nwwEDnzjdaaIJY1b6McmGnO1pXFvuxGp\nedJnS32TyyiK6VZm21jCxGoNoyF8UG00z+BJRxWAsVzYdNkhttiK9ueSGK9s\nDa8p1kZBys7L4mEx+7l1xcDH+DhAM5YWD6LECJzrz6cQDahaIPnPc3p1Lb6j\nfARj0KeQ1RYt+LIztPZPqBj8TKGqmmh3C2orvqr9cKsoU03G1wfMUmSXQSXQ\ngHgGyD8cY2p6E+YLF+eB9YhR6kGWDmpa2Ko6YR6tV77GPDOFF+TVhm9DwQOI\npiiQV2nPT7e6f07BVMFlu43otmb/88LKahLsobwI9Axdy6j/7kQBNNjPaARb\nEIL4fpg390NV+nBH/mF+bDqGPvCBQNN01j22bGHFqEtlVMFCp/8/LCmah2St\nkrrFnz/AcDRtQiapT7dx/ocEOeT5pLxZWG4fW077gSkTEhD5OTWoafr0Oq/A\no6sOMPJpwWH8/G1qVUktuPx/BgcVryhJ2PV/rj6VP19RHnHO1G37K/H95jzU\nIwDQIwjI44ro5vx2yGN4KOxhwqpRrPzxkWBqjoeOTggd63UiJhGd2TFXjomq\nOn8Vii7faUQkfl7YZp/Ifb5evwyyxzpx3tMhzAGUF9FtWiAucmpIrCxMA3pa\nqnz5\r\n=rHXt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZu4VLu+5osD9Bd0685MARr+xlRUPIkfp1ZqIVAs324AIhALMlvE1btwYqDKOXEneIzsI1H1vEAuvpbI/r1vogWUpH"}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_4.0.3-beta.2_1557864321323_0.507578942914424"},"_hasShrinkwrap":false},"4.0.3-beta.3":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"4.0.3-beta.3","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","readme":"# Redux communications\n\nThis package provides a toolset to simplify working with redux and saga libs.\n\n## Installation\n\n`npm i @axmit/redux-communications` or `yarn add @axmit/redux-communications`\n\n## Quick start\n\nTo create a new communication you should do the following:\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch, actionsTypes } from '@axmit/redux-communications';\n\nconst namespace = 'line';\nexport interface ILinesConnectedProps {\n\tlineCollection: StoreBranches<[], any>\n\tgetLineCollection(params: any): void;\n\tclearLineCollection(): void;\n}\n\nconst apiProvider = new APIProvider(actionsTypes.get, Promise<any> => axios.get(`/lines`));\nconst branches = [new Branch('collection', apiProvider, new StoreBranch([])]\n\nconst strategy = new BaseStrategy({\n\tnamespace,\n\tbranches\n})\n\nconst communicationLine = buildCommunication<ILinesConnectedProps>(strategy);\n```\n\nAfter that you will have a communication that contains base set of reducers, actions. You can easily setup it as usual.\n\n```\n//Sagas setup\nexport default function* rootSaga(): any {\n yield all([ ...communicationLine.sagas ]);}\n\n//Reducers setup\nconst reducers = {\n ...communicationLine.reducers\n };\n```\n\nCommunication also contains `injector` for adding generated dispatchers and store branches to components\n\n```typescript\nimport React from 'react';\nimport { ILinesConnectedProps } from './linesCommunication';\n\nclass TestComponent extends React.Component<ILinesConnectedProps> {\n  //Component logic goes here\n}\n\ncommunicationLine.injector(TestComponent);\n```\n\n## Detailed explanation\n\nThe idea of this package is to provide a simple way (toolset) of generating event publishers and subscribers.\n\n### **!!! _IMPORTANT_ !!!**\n\n> If you want to understand this module completely you should be familiar with publisher-subscriber pattern (https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern).  \n> Because in fact this pattern underlies for Redux/Saga communication.\n\nIn fact we have:\n\n1. event publisher\n   - actions - common example for generating events\n2. event subscriber reducer\n   - reducer - common example for handling events and update the store\n   - saga - handlers that can be used for side effects and generating new event\n\nActually each async action consists of 3 actions:\n\n1. Start action - triggered to start execution of async call\n2. Success action - called if action finished with success\n3. Fail action - called if action finished with fail\n\nWe can use reducers to update the store depending on action type and use sagas to generate some actions depending on results of other actions.\n\nFor example we can handle _USER_MODEL_GET_SUCCESS_ action and after that generate action _TASK_COLLECTION_GET_START_ to start getting collection of tasks for current user.\n\n## Store structure:\n\nThe store consists of namespaces that are divided into branches. Each branch contains 4 fields:\n\n1. Data - data for this branch\n2. Loading - status of data loading of this branch\n3. Errors - errors for branch if there are any\n4. Params - params that are provided in the start action  \n   For more details see implementation in ./src/buildReducer.ts\n\n#### Example:\n\nNamespace - user  \nBranches - model, collection\n\n```typescript\nstore = {\n  user: {\n    model: {\n      data: {\n        data: {\n          id: 1,\n          firstName: 'Ivan',\n          lastName: 'Tershukov'\n        },\n        meta: {\n          lastLoginAt: '01.01.19 12:00'\n        }\n      },\n      params: 1, // id of current model\n      loading: false,\n      errors: null\n    },\n    collection: {\n      data: {\n        data: [\n          {\n            id: 1,\n            firstName: 'Ivan',\n            lastName: 'Tershukov'\n          },\n          {\n            id: 2,\n            firstName: 'Yana',\n            lastName: 'Banina'\n          },\n          {\n            id: 3,\n            firstName: 'Mike',\n            lastName: 'Sidorov'\n          }\n        ],\n        meta: {\n          limit: 100,\n          offset: 0,\n          q: ''\n        }\n      },\n      params: {\n        order: 'asc',\n        limit: 10,\n        offset: 50\n      },\n      loading: false,\n      errors: null\n    }\n  }\n};\n```\n\n# Inner structure\n\n## Strategies:\n\nThe strategy determines which part of communication logic will be generated.\n\nAll strategy receives config as constructor param. Every strategy has unique params set but there is common config params for all of them:\n\n- namespace: string (required) - name of store namespace to be generated\n- actions: Array (optional) - array of custom actions\n- reducers: Array (optional) - array of custom reducers\n- sagas: Array (optional) - array of custom sagas\n\n### BaseStrategy\n\nThis strategy requires direct approach in communication generation. You must specify at least `namespace` and `branches` to get communication.\n\nAvailable `BaseStrategy` methods:\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- branches: Branch[](required) - array of `Branches` see below for more information\n\n#### .buildReducers()\n\nMethod to build reducers based on strategy config\n\n#### .buildInjector()\n\nMethod to build injector based on strategy config\n\n#### .buildSagas()\n\nMethod to build sagas based on strategy config\n\n### CRUDStrategy\n\nThis strategy predefines 2 namespace branches in `Redux`:\n\n1. Model\n2. Collection\n\nIt extends `BaseStrategy` so methods are similar\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- modelApiProviders: APIProvider[](required) - array of APIProviders connected to model store branch\n- collectionApiProviders: APIProvider[](required) - array of APIProviders connected to collection store branch\n- modelInitialState: StoreBranch (optional) - initial state for model branch\n- collectionInitialState: StoreBranch (optional) - initial state for collection branch\n\n### SimpleStrategy\n\nThis strategy predefines only one namespace branch `model` in `Redux`:\nIt extends `BaseStrategy` so methods are similar\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- apiProvider: APIProvider[](required) - array of APIProviders connected to model store branch\n- initialState: StoreBranch (optional) - initial state for model branch\n\n## Class Helpers\n\nThere is an amount of classes to help you build you communication\n\n### APIProvider\n\nThis class contains provider for your API logic (request and so on)\n**NOTE!** For each API provider you defined a saga will be generated\n\n#### constructor(type, handler, hooks)\n\n- type: string - string literal indicating type of performing action (can be any string you like)\n- handler: Function - function containing provider logic (ex. API call)\n- hooks (optional) - object containing different hooks for APIProvider each hook is function with following signature (response, payload, branchState, fullState) => any:\n\n  - response - handler call result\n  - payload - action payload\n  - branchState - current branch state\n  - fullState- full application state\n\n  Available hooks:\n\n  - responseFormatter - occur just after after handler call\n  - postSuccessHooks - occur after success action is dispatched\n  - postFailHooks - occur after fail action is dispatched\n\n#### Example\n\n```typescript\nnew APIProvider('get', () => axios.get('/test'), {\n  responseFormatter: (response, payload, branchState, fullState) => response.map(item => response.test)\n});\n```\n\nThis `APIProvider` will generate a saga which send GET /test and apply `responseFormatter` to response\n\n### Branch\n\nThis class responsible for namespace branches in store\n\nAvailable `Branch` methods\n\n#### constructor(name, apiProviders, initialState)\n\n- name: string - branch name\n- apiProviders: APIProvider[] | APIProvider - array of connected to branch APIProviders\n- initialState: StoreBranch - initial state of branch\n\n#### .buildBranchReducers(namespace: string)\n\nBuilds reducers for store branch\n\n#### .buildBranchDispatchers(namespace: string)\n\nBuilds dispatchers for store branch\n\n#### .buildBranchSagas(namespace: string)\n\nBuilds sagas for store branch\n\n### StoreBranch\n\nHelper class for defining store branches, every store branch is instance of `StoreBranch`\n\nContains following fields:\n\n- data - main branch data\n- params - params for dispatchers\n- errors - branch errors\n- loading - progress of current async operation\n\n#### constructor(data, params, errors, loading)\n\n## Communication factory\n\nThis factory contains functions for communications build:\n\n### buildCommunication\n\nBuild communication based on strategy provided. Return object containing:\n\n- namespace: string - namespace\n- branches: Branches[] - store branches\n- reducers - builded reducers (must be includes into application reducers)\n- sagas - builded sagas (must be included into application sagas)\n- injector - react HOC for injecting props into components (connect())\n\n**NOTE!** To make `injector` work correctly you must define interface describing injected props and pass it into `buildCommunication`\n\n### Example\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch } from '@axmit/redux-communications';\n\nexport interface ITestConnectedProps {\n  testNames: StoreBranch<string[], string>;\n  getTestNames(searchStr?: string): void;\n  clearTestNames(): void;\n}\n\nconst apiProvider = new APIProvider('get', () => axios.get('/test/names'));\nconst branches = [new Branch('names', apiProvider, new StoreBranch([]))];\n\nconst strategy = new BaseStrategy({\n  namespace: 'test',\n  branches\n});\n\nconst testCommunication = buildCommunication<ITestConnectedProps>(strategy);\n```\n\nIn this example `ITestConnectedProps` passed as generic param into `buildCommunication` for right types in injector;\n\n### Rules of IConnectedProps interfaces\n\nConnected props interface contains of 2 parts:\n\n- state branches - generates based on `Branch` amount you pass into strategy, for each branch injector will add property by following format `[namespace][BranchName]` .\n  - **Example** if namespace is `lines` and there is 2 branches: `[new Branch('model'), new Branch('collection')]` then there will be 2 properties injected by generated injector: `linesModel` and `linesCollection`\n- dispatchers - generates based on `APIProviders` amount plus `clear` dispatcher for each branch is generated automatically. For each `APIProvider` will be generated dispatcher by following format `[APIProviderType][Namespace][BranchName]`.\n  - **Example** if namespace is `lines`, branch is `new Branch('names', apiProviders)` and `apiProviders` are\n    `typescript const apiProviders = [ new APIProvider('get', handler), new APIProvider('update', handler2) ]`\n    Dispatchers to be generated will be\n    `getLinesNames clearLinesNames updateLinesNames`\n\n## Toolset\n\nThis package also contains a toolset that simplifies your life.  \nFor example you can easy generate types for actions:\n\n```\ngetStartType('users', 'model', 'get') => USERS_MODEL_GET_TRY\ngetSuccessType('users', 'model', 'get') => USERS_MODEL_GET_SUCCESS\ngetFailType('users', 'model', 'get') => USERS_MODEL_GET_FAIL\n```\n\nAlso you can easily generate names for API provider methods\n\n```\ngetAPIMethodName('users', 'model', 'GET') => getUsersModel\n```\n\nMore examples see in: ./src/helpers.spec.ts\n\n## Types of actions\n\nactionsTypes - it's enum with base set of default actions.  \nAt at the moment it supports _init_, _clear_, _add_, _get_, _update_ and _delete_ types.\n\n## Sagas combinations\n\nIf you want to add sagas you can just add them directly in communication sagas array or in the root saga.\n\n```\nfunction* getEmptyCollection(action: any) {\n // Here you can use put to generate action or call to call any async funtions ...}\n\nfunction* getEmptyCollectionSaga() {\n const successActionType = getSuccessType(namespace, 'collection', actionsTypes.get);\n yield takeEvery(successActionType, getEmptyCollection);}\n```\n\nand then\n\n```\ncommunicationLine.sagas.push(getEmptyCollectionSaga());\n\n```\n\nor\n\n```\nexport default function* rootSaga(): any {\n yield all([ getEmptyCollectionSaga(), ... ]);}\n\n```\n\n## Full example\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch, actionsTypes } from '@axmit/redux-communications';\n\nconst namespace = 'line';\n\nexport interface ILineModel {\n  id: number;\n  name: string;\n}\n\nexport interface ILinesConnectedProps {\n  lineCollection: StoreBranch<ILineModel[], any>;\n  lineModel: StoreBranch<ILineModel, any>;\n  getLineCollection(params: any): void;\n  clearLineCollection(): void;\n  getLineModel(id: number): void;\n  updateLineModel(id: number, data: ILineModel): void;\n  clearLineModel(): void;\n}\n\nconst collectionApiProvider = new APIProvider(actionsTypes.get, (): Promise<ILineModel[]> => axios.get(`/lines`));\nconst modelApiProvider = [\n  new APIProvider(actionsTypes.get, (id: number): Promise<ILineModel> => axios.get(`/lines/${id}`), {\n    responseFormatter: (response, payload, branchState, fullState) => response.map(model => model),\n    postSuccessHook: (response, payload, branchState, fullState) => console.log('post success'),\n    postFailHook: (response, payload, branchState, fullState) => console.log('post fail')\n  }),\n  new APIProvider(actionsTypes.update, (id: number, data: ILineModel): Promise<ILineModel> => axios.put(`/lines/${id}`, data))\n];\n\nconst branches = [new Branch('collection', collectionApiProvider, new StoreBranch([])), new Branch('model', modelApiProvider)];\n\nconst strategy = new BaseStrategy({\n  namespace,\n  branches\n});\n\nexport const communicationLine = buildCommunication<ILinesConnectedProps>(strategy);\n```\n\n## Troubleshooting\n\n1. Update version of saga\n","readmeFilename":"README.md","gitHead":"a71472bb7afd825431cb74b76ac83b53bb3aca7e","_id":"@axmit/redux-communications@4.0.3-beta.3","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"axmit-engineers","email":"engineers@axmit.com"},"dist":{"integrity":"sha512-tb7ynM/DfsdDqJOSM/gNGcsCgIwqNnqVUjeNuggWWb8Twjz35ONTAFy30Y0gJbWmALC1ATsWz8rOmQs2ZVD6mg==","shasum":"1950925b3e7bc8877959a5e46213d89bd43f90fc","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-4.0.3-beta.3.tgz","fileCount":44,"unpackedSize":152944,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc210YCRA9TVsSAnZWagAACR8P/j4R5AlwqiWBt14lbEmf\n4NZh/dmgQA3U9ZO1o14iOh7RUsnZo2peWnYu41fB0FpJfPthn5KBTUirPu+V\nKWgTxxSgdhuQtEdWHk2SWE/AvLV4BCGtvuco8NdmG3eB/uM5sGpRr81X7l6Y\nEvJMJ3Wg6ZQqG9hA0MYQElp8UUgU6srxGRG9erwRxw5Fd4veO6nFUmTwaM/c\nyxf/ZDL9+SG3gScBy6XyMcWP9BUUqCBjrJeXRGgF2e3OAywdkg2AY1SX/UU/\n63xPWi71q1Z7sn6IifCNdNwNgMhQVC5iKJuSf82OSYvgyuJXvzGIT0t7umpa\nauOTDFyBb0sbImCmQ9zkI9Bp/xRJEIzBGgfX6AtWKsSM5Gwd3BrZKwRiK0we\n/huYfn9raWNTufRDamZuFzB2HgWGW9Ri4HCWE/V5HrhceDyfIYBPtj6Aj6cT\nQH88eLAAPWo81miKqNJabudLUuckQBeRd0t2weoKgB4VtJP/Pzny0Mc6q0WZ\n2Sj/zXFovcmep15UcReRtJnHXpHp7B3ygGMvxdfo7TascrIh8RwagjrKaCim\nNFlMJxf4TZobUlWDQX+GO/NFjeQGS6GnG/sgrn91vnRVzHIPuQQOGm4ckU45\nX2roMFh+x+Z9bAtuOpp5kmqgWKURQwvhkFr9xrTjl+eF3TshMqNLr0Rr8QSA\noFj6\r\n=o82f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH6PayiA8K8OtBa6eo4YRzN/C3eh7C/CkWjHa3I4bwo4AiB0KMqDwT1Ml5GGj+Us/LZVk0bUSUkmiwzAO8NUnXiRfQ=="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_4.0.3-beta.3_1557880087718_0.8693514177881365"},"_hasShrinkwrap":false},"4.0.3-beta.4":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"4.0.3-beta.4","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","readme":"# Redux communications\n\nThis package provides a toolset to simplify working with redux and saga libs.\n\n## Installation\n\n`npm i @axmit/redux-communications` or `yarn add @axmit/redux-communications`\n\n## Quick start\n\nTo create a new communication you should do the following:\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch, actionsTypes } from '@axmit/redux-communications';\n\nconst namespace = 'line';\nexport interface ILinesConnectedProps {\n\tlineCollection: StoreBranches<[], any>\n\tgetLineCollection(params: any): void;\n\tclearLineCollection(): void;\n}\n\nconst apiProvider = new APIProvider(actionsTypes.get, Promise<any> => axios.get(`/lines`));\nconst branches = [new Branch('collection', apiProvider, new StoreBranch([])]\n\nconst strategy = new BaseStrategy({\n\tnamespace,\n\tbranches\n})\n\nconst communicationLine = buildCommunication<ILinesConnectedProps>(strategy);\n```\n\nAfter that you will have a communication that contains base set of reducers, actions. You can easily setup it as usual.\n\n```\n//Sagas setup\nexport default function* rootSaga(): any {\n yield all([ ...communicationLine.sagas ]);}\n\n//Reducers setup\nconst reducers = {\n ...communicationLine.reducers\n };\n```\n\nCommunication also contains `injector` for adding generated dispatchers and store branches to components\n\n```typescript\nimport React from 'react';\nimport { ILinesConnectedProps } from './linesCommunication';\n\nclass TestComponent extends React.Component<ILinesConnectedProps> {\n  //Component logic goes here\n}\n\ncommunicationLine.injector(TestComponent);\n```\n\n## Detailed explanation\n\nThe idea of this package is to provide a simple way (toolset) of generating event publishers and subscribers.\n\n### **!!! _IMPORTANT_ !!!**\n\n> If you want to understand this module completely you should be familiar with publisher-subscriber pattern (https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern).  \n> Because in fact this pattern underlies for Redux/Saga communication.\n\nIn fact we have:\n\n1. event publisher\n   - actions - common example for generating events\n2. event subscriber reducer\n   - reducer - common example for handling events and update the store\n   - saga - handlers that can be used for side effects and generating new event\n\nActually each async action consists of 3 actions:\n\n1. Start action - triggered to start execution of async call\n2. Success action - called if action finished with success\n3. Fail action - called if action finished with fail\n\nWe can use reducers to update the store depending on action type and use sagas to generate some actions depending on results of other actions.\n\nFor example we can handle _USER_MODEL_GET_SUCCESS_ action and after that generate action _TASK_COLLECTION_GET_START_ to start getting collection of tasks for current user.\n\n## Store structure:\n\nThe store consists of namespaces that are divided into branches. Each branch contains 4 fields:\n\n1. Data - data for this branch\n2. Loading - status of data loading of this branch\n3. Errors - errors for branch if there are any\n4. Params - params that are provided in the start action  \n   For more details see implementation in ./src/buildReducer.ts\n\n#### Example:\n\nNamespace - user  \nBranches - model, collection\n\n```typescript\nstore = {\n  user: {\n    model: {\n      data: {\n        data: {\n          id: 1,\n          firstName: 'Ivan',\n          lastName: 'Tershukov'\n        },\n        meta: {\n          lastLoginAt: '01.01.19 12:00'\n        }\n      },\n      params: 1, // id of current model\n      loading: false,\n      errors: null\n    },\n    collection: {\n      data: {\n        data: [\n          {\n            id: 1,\n            firstName: 'Ivan',\n            lastName: 'Tershukov'\n          },\n          {\n            id: 2,\n            firstName: 'Yana',\n            lastName: 'Banina'\n          },\n          {\n            id: 3,\n            firstName: 'Mike',\n            lastName: 'Sidorov'\n          }\n        ],\n        meta: {\n          limit: 100,\n          offset: 0,\n          q: ''\n        }\n      },\n      params: {\n        order: 'asc',\n        limit: 10,\n        offset: 50\n      },\n      loading: false,\n      errors: null\n    }\n  }\n};\n```\n\n# Inner structure\n\n## Strategies:\n\nThe strategy determines which part of communication logic will be generated.\n\nAll strategy receives config as constructor param. Every strategy has unique params set but there is common config params for all of them:\n\n- namespace: string (required) - name of store namespace to be generated\n- actions: Array (optional) - array of custom actions\n- reducers: Array (optional) - array of custom reducers\n- sagas: Array (optional) - array of custom sagas\n\n### BaseStrategy\n\nThis strategy requires direct approach in communication generation. You must specify at least `namespace` and `branches` to get communication.\n\nAvailable `BaseStrategy` methods:\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- branches: Branch[](required) - array of `Branches` see below for more information\n\n#### .buildReducers()\n\nMethod to build reducers based on strategy config\n\n#### .buildInjector()\n\nMethod to build injector based on strategy config\n\n#### .buildSagas()\n\nMethod to build sagas based on strategy config\n\n### CRUDStrategy\n\nThis strategy predefines 2 namespace branches in `Redux`:\n\n1. Model\n2. Collection\n\nIt extends `BaseStrategy` so methods are similar\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- modelApiProviders: APIProvider[](required) - array of APIProviders connected to model store branch\n- collectionApiProviders: APIProvider[](required) - array of APIProviders connected to collection store branch\n- modelInitialState: StoreBranch (optional) - initial state for model branch\n- collectionInitialState: StoreBranch (optional) - initial state for collection branch\n\n### SimpleStrategy\n\nThis strategy predefines only one namespace branch `model` in `Redux`:\nIt extends `BaseStrategy` so methods are similar\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- apiProvider: APIProvider[](required) - array of APIProviders connected to model store branch\n- initialState: StoreBranch (optional) - initial state for model branch\n\n## Class Helpers\n\nThere is an amount of classes to help you build you communication\n\n### APIProvider\n\nThis class contains provider for your API logic (request and so on)\n**NOTE!** For each API provider you defined a saga will be generated\n\n#### constructor(type, handler, hooks)\n\n- type: string - string literal indicating type of performing action (can be any string you like)\n- handler: Function - function containing provider logic (ex. API call)\n- hooks (optional) - object containing different hooks for APIProvider each hook is function with following signature (response, payload, branchState, fullState) => any:\n\n  - response - handler call result\n  - payload - action payload\n  - branchState - current branch state\n  - fullState- full application state\n\n  Available hooks:\n\n  - responseFormatter - occur just after after handler call\n  - postSuccessHooks - occur after success action is dispatched\n  - postFailHooks - occur after fail action is dispatched\n\n#### Example\n\n```typescript\nnew APIProvider('get', () => axios.get('/test'), {\n  responseFormatter: (response, payload, branchState, fullState) => response.map(item => response.test)\n});\n```\n\nThis `APIProvider` will generate a saga which send GET /test and apply `responseFormatter` to response\n\n### Branch\n\nThis class responsible for namespace branches in store\n\nAvailable `Branch` methods\n\n#### constructor(name, apiProviders, initialState)\n\n- name: string - branch name\n- apiProviders: APIProvider[] | APIProvider - array of connected to branch APIProviders\n- initialState: StoreBranch - initial state of branch\n\n#### .buildBranchReducers(namespace: string)\n\nBuilds reducers for store branch\n\n#### .buildBranchDispatchers(namespace: string)\n\nBuilds dispatchers for store branch\n\n#### .buildBranchSagas(namespace: string)\n\nBuilds sagas for store branch\n\n### StoreBranch\n\nHelper class for defining store branches, every store branch is instance of `StoreBranch`\n\nContains following fields:\n\n- data - main branch data\n- params - params for dispatchers\n- errors - branch errors\n- loading - progress of current async operation\n\n#### constructor(data, params, errors, loading)\n\n## Communication factory\n\nThis factory contains functions for communications build:\n\n### buildCommunication\n\nBuild communication based on strategy provided. Return object containing:\n\n- namespace: string - namespace\n- branches: Branches[] - store branches\n- reducers - builded reducers (must be includes into application reducers)\n- sagas - builded sagas (must be included into application sagas)\n- injector - react HOC for injecting props into components (connect())\n\n**NOTE!** To make `injector` work correctly you must define interface describing injected props and pass it into `buildCommunication`\n\n### Example\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch } from '@axmit/redux-communications';\n\nexport interface ITestConnectedProps {\n  testNames: StoreBranch<string[], string>;\n  getTestNames(searchStr?: string): void;\n  clearTestNames(): void;\n}\n\nconst apiProvider = new APIProvider('get', () => axios.get('/test/names'));\nconst branches = [new Branch('names', apiProvider, new StoreBranch([]))];\n\nconst strategy = new BaseStrategy({\n  namespace: 'test',\n  branches\n});\n\nconst testCommunication = buildCommunication<ITestConnectedProps>(strategy);\n```\n\nIn this example `ITestConnectedProps` passed as generic param into `buildCommunication` for right types in injector;\n\n### Rules of IConnectedProps interfaces\n\nConnected props interface contains of 2 parts:\n\n- state branches - generates based on `Branch` amount you pass into strategy, for each branch injector will add property by following format `[namespace][BranchName]` .\n  - **Example** if namespace is `lines` and there is 2 branches: `[new Branch('model'), new Branch('collection')]` then there will be 2 properties injected by generated injector: `linesModel` and `linesCollection`\n- dispatchers - generates based on `APIProviders` amount plus `clear` dispatcher for each branch is generated automatically. For each `APIProvider` will be generated dispatcher by following format `[APIProviderType][Namespace][BranchName]`.\n  - **Example** if namespace is `lines`, branch is `new Branch('names', apiProviders)` and `apiProviders` are\n    `typescript const apiProviders = [ new APIProvider('get', handler), new APIProvider('update', handler2) ]`\n    Dispatchers to be generated will be\n    `getLinesNames clearLinesNames updateLinesNames`\n\n## Toolset\n\nThis package also contains a toolset that simplifies your life.  \nFor example you can easy generate types for actions:\n\n```\ngetStartType('users', 'model', 'get') => USERS_MODEL_GET_TRY\ngetSuccessType('users', 'model', 'get') => USERS_MODEL_GET_SUCCESS\ngetFailType('users', 'model', 'get') => USERS_MODEL_GET_FAIL\n```\n\nAlso you can easily generate names for API provider methods\n\n```\ngetAPIMethodName('users', 'model', 'GET') => getUsersModel\n```\n\nMore examples see in: ./src/helpers.spec.ts\n\n## Types of actions\n\nactionsTypes - it's enum with base set of default actions.  \nAt at the moment it supports _init_, _clear_, _add_, _get_, _update_ and _delete_ types.\n\n## Sagas combinations\n\nIf you want to add sagas you can just add them directly in communication sagas array or in the root saga.\n\n```\nfunction* getEmptyCollection(action: any) {\n // Here you can use put to generate action or call to call any async funtions ...}\n\nfunction* getEmptyCollectionSaga() {\n const successActionType = getSuccessType(namespace, 'collection', actionsTypes.get);\n yield takeEvery(successActionType, getEmptyCollection);}\n```\n\nand then\n\n```\ncommunicationLine.sagas.push(getEmptyCollectionSaga());\n\n```\n\nor\n\n```\nexport default function* rootSaga(): any {\n yield all([ getEmptyCollectionSaga(), ... ]);}\n\n```\n\n## Full example\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch, actionsTypes } from '@axmit/redux-communications';\n\nconst namespace = 'line';\n\nexport interface ILineModel {\n  id: number;\n  name: string;\n}\n\nexport interface ILinesConnectedProps {\n  lineCollection: StoreBranch<ILineModel[], any>;\n  lineModel: StoreBranch<ILineModel, any>;\n  getLineCollection(params: any): void;\n  clearLineCollection(): void;\n  getLineModel(id: number): void;\n  updateLineModel(id: number, data: ILineModel): void;\n  clearLineModel(): void;\n}\n\nconst collectionApiProvider = new APIProvider(actionsTypes.get, (): Promise<ILineModel[]> => axios.get(`/lines`));\nconst modelApiProvider = [\n  new APIProvider(actionsTypes.get, (id: number): Promise<ILineModel> => axios.get(`/lines/${id}`), {\n    responseFormatter: (response, payload, branchState, fullState) => response.map(model => model),\n    postSuccessHook: (response, payload, branchState, fullState) => console.log('post success'),\n    postFailHook: (response, payload, branchState, fullState) => console.log('post fail')\n  }),\n  new APIProvider(actionsTypes.update, (id: number, data: ILineModel): Promise<ILineModel> => axios.put(`/lines/${id}`, data))\n];\n\nconst branches = [new Branch('collection', collectionApiProvider, new StoreBranch([])), new Branch('model', modelApiProvider)];\n\nconst strategy = new BaseStrategy({\n  namespace,\n  branches\n});\n\nexport const communicationLine = buildCommunication<ILinesConnectedProps>(strategy);\n```\n\n## Troubleshooting\n\n1. Update version of saga\n","readmeFilename":"README.md","gitHead":"9fcd98781c168fd1bcc36f408c8ddc8e38b62803","_id":"@axmit/redux-communications@4.0.3-beta.4","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"axmit-engineers","email":"engineers@axmit.com"},"dist":{"integrity":"sha512-rUwhr/xsHAgoxrdIl680ThD2uBXL3ng8U1Z0AvwTKjL+JYpLc/BnSdACGPcdO3ceIDcc7jLbkygWRZLFZAhA6Q==","shasum":"a7343c7560a797ba68055d3134326652c47ad1ee","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-4.0.3-beta.4.tgz","fileCount":44,"unpackedSize":154292,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3Zs7CRA9TVsSAnZWagAA2g0P/ApsMEkoCHBz1YeyQJDV\ncj/swyvsQ7X8qREzBpD37/DWLE3/mYg4RTqlugU4KvtAkR3ulahv6IehDKIY\nARqtJ+Bstow9Mee8fl02No/Pqw9E+H3WbJZNTqsWVhZaBOjrz7KDXU4TAn7z\n4ABxz32ImjQsHZrIHnm2KI9u+9JsaygPcVohmE0V9smKZsCgveFA9qsiF3ne\n/Rfr/wHB/wKO5m4aIxietixeO1NcYH3QK6OGW+bIyV8xHU6cJJKBaTWQYVTx\ndbME0+tZ04s/UNP3e9rWgHObjbVdkWTINpwCMT4T9trT2Gkl9APrUB6lY6OW\nCeB8hlU1Cvhv6nMQIxYknYzYP2irxsrfCb5HGlEv4gEifiNIuKXzGxkArzHV\nABbFyA6h44ea0XyLqozPqMD2YGWm5vKzy29I4r+L/S0oIvaG0v+PLagRIomM\nY6XjIGbUqR3SLvObwLBh96XuG3uDB45a5T5zsNmZmwTIEOlrHYWheasnMU8i\n5GxPt8WX2ddc5mDiioGqnPIIF7iHJ1BTlf2feAJF0fsUqI4q5HtPMsddpM/L\nxPWAMHkNZBHeW0KgEQjQpA0noMw3IvM+UZdIJJ9FJLhvCKDT8MiZ3xjhoKOF\nRog/qwrhpnlAxykHnEDv4Ty3tNX0W6525fvFdzlYEm2F3m9S2K8/Mrncla3d\nGY8+\r\n=Qfx8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8Ub50IXxyyS5/+HifyXOeqXGPrK0z22bRrwavNL7PXwIgGrfQOo+/4wNnwiVWj4yTA279JvfTNRtg4P1s6MMhopU="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_4.0.3-beta.4_1558027066968_0.9278008771416009"},"_hasShrinkwrap":false},"4.0.3-beta.5":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"4.0.3-beta.5","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","readme":"# Redux communications\n\nThis package provides a toolset to simplify working with redux and saga libs.\n\n## Installation\n\n`npm i @axmit/redux-communications` or `yarn add @axmit/redux-communications`\n\n## Quick start\n\nTo create a new communication you should do the following:\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch, actionsTypes } from '@axmit/redux-communications';\n\nconst namespace = 'line';\nexport interface ILinesConnectedProps {\n\tlineCollection: StoreBranches<[], any>\n\tgetLineCollection(params: any): void;\n\tclearLineCollection(): void;\n}\n\nconst apiProvider = new APIProvider(actionsTypes.get, Promise<any> => axios.get(`/lines`));\nconst branches = [new Branch('collection', apiProvider, new StoreBranch([])]\n\nconst strategy = new BaseStrategy({\n\tnamespace,\n\tbranches\n})\n\nconst communicationLine = buildCommunication<ILinesConnectedProps>(strategy);\n```\n\nAfter that you will have a communication that contains base set of reducers, actions. You can easily setup it as usual.\n\n```\n//Sagas setup\nexport default function* rootSaga(): any {\n yield all([ ...communicationLine.sagas ]);}\n\n//Reducers setup\nconst reducers = {\n ...communicationLine.reducers\n };\n```\n\nCommunication also contains `injector` for adding generated dispatchers and store branches to components\n\n```typescript\nimport React from 'react';\nimport { ILinesConnectedProps } from './linesCommunication';\n\nclass TestComponent extends React.Component<ILinesConnectedProps> {\n  //Component logic goes here\n}\n\ncommunicationLine.injector(TestComponent);\n```\n\n## Detailed explanation\n\nThe idea of this package is to provide a simple way (toolset) of generating event publishers and subscribers.\n\n### **!!! _IMPORTANT_ !!!**\n\n> If you want to understand this module completely you should be familiar with publisher-subscriber pattern (https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern).  \n> Because in fact this pattern underlies for Redux/Saga communication.\n\nIn fact we have:\n\n1. event publisher\n   - actions - common example for generating events\n2. event subscriber reducer\n   - reducer - common example for handling events and update the store\n   - saga - handlers that can be used for side effects and generating new event\n\nActually each async action consists of 3 actions:\n\n1. Start action - triggered to start execution of async call\n2. Success action - called if action finished with success\n3. Fail action - called if action finished with fail\n\nWe can use reducers to update the store depending on action type and use sagas to generate some actions depending on results of other actions.\n\nFor example we can handle _USER_MODEL_GET_SUCCESS_ action and after that generate action _TASK_COLLECTION_GET_START_ to start getting collection of tasks for current user.\n\n## Store structure:\n\nThe store consists of namespaces that are divided into branches. Each branch contains 4 fields:\n\n1. Data - data for this branch\n2. Loading - status of data loading of this branch\n3. Errors - errors for branch if there are any\n4. Params - params that are provided in the start action  \n   For more details see implementation in ./src/buildReducer.ts\n\n#### Example:\n\nNamespace - user  \nBranches - model, collection\n\n```typescript\nstore = {\n  user: {\n    model: {\n      data: {\n        data: {\n          id: 1,\n          firstName: 'Ivan',\n          lastName: 'Tershukov'\n        },\n        meta: {\n          lastLoginAt: '01.01.19 12:00'\n        }\n      },\n      params: 1, // id of current model\n      loading: false,\n      errors: null\n    },\n    collection: {\n      data: {\n        data: [\n          {\n            id: 1,\n            firstName: 'Ivan',\n            lastName: 'Tershukov'\n          },\n          {\n            id: 2,\n            firstName: 'Yana',\n            lastName: 'Banina'\n          },\n          {\n            id: 3,\n            firstName: 'Mike',\n            lastName: 'Sidorov'\n          }\n        ],\n        meta: {\n          limit: 100,\n          offset: 0,\n          q: ''\n        }\n      },\n      params: {\n        order: 'asc',\n        limit: 10,\n        offset: 50\n      },\n      loading: false,\n      errors: null\n    }\n  }\n};\n```\n\n# Inner structure\n\n## Strategies:\n\nThe strategy determines which part of communication logic will be generated.\n\nAll strategy receives config as constructor param. Every strategy has unique params set but there is common config params for all of them:\n\n- namespace: string (required) - name of store namespace to be generated\n- actions: Array (optional) - array of custom actions\n- reducers: Array (optional) - array of custom reducers\n- sagas: Array (optional) - array of custom sagas\n\n### BaseStrategy\n\nThis strategy requires direct approach in communication generation. You must specify at least `namespace` and `branches` to get communication.\n\nAvailable `BaseStrategy` methods:\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- branches: Branch[](required) - array of `Branches` see below for more information\n\n#### .buildReducers()\n\nMethod to build reducers based on strategy config\n\n#### .buildInjector()\n\nMethod to build injector based on strategy config\n\n#### .buildSagas()\n\nMethod to build sagas based on strategy config\n\n### CRUDStrategy\n\nThis strategy predefines 2 namespace branches in `Redux`:\n\n1. Model\n2. Collection\n\nIt extends `BaseStrategy` so methods are similar\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- modelApiProviders: APIProvider[](required) - array of APIProviders connected to model store branch\n- collectionApiProviders: APIProvider[](required) - array of APIProviders connected to collection store branch\n- modelInitialState: StoreBranch (optional) - initial state for model branch\n- collectionInitialState: StoreBranch (optional) - initial state for collection branch\n\n### SimpleStrategy\n\nThis strategy predefines only one namespace branch `model` in `Redux`:\nIt extends `BaseStrategy` so methods are similar\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- apiProvider: APIProvider[](required) - array of APIProviders connected to model store branch\n- initialState: StoreBranch (optional) - initial state for model branch\n\n## Class Helpers\n\nThere is an amount of classes to help you build you communication\n\n### APIProvider\n\nThis class contains provider for your API logic (request and so on)\n**NOTE!** For each API provider you defined a saga will be generated\n\n#### constructor(type, handler, hooks)\n\n- type: string - string literal indicating type of performing action (can be any string you like)\n- handler: Function - function containing provider logic (ex. API call)\n- hooks (optional) - object containing different hooks for APIProvider each hook is function with following signature (response, payload, branchState, fullState) => any:\n\n  - response - handler call result\n  - payload - action payload\n  - branchState - current branch state\n  - fullState- full application state\n\n  Available hooks:\n\n  - responseFormatter - occur just after after handler call\n  - postSuccessHooks - occur after success action is dispatched\n  - postFailHooks - occur after fail action is dispatched\n\n#### Example\n\n```typescript\nnew APIProvider('get', () => axios.get('/test'), {\n  responseFormatter: (response, payload, branchState, fullState) => response.map(item => response.test)\n});\n```\n\nThis `APIProvider` will generate a saga which send GET /test and apply `responseFormatter` to response\n\n### Branch\n\nThis class responsible for namespace branches in store\n\nAvailable `Branch` methods\n\n#### constructor(name, apiProviders, initialState)\n\n- name: string - branch name\n- apiProviders: APIProvider[] | APIProvider - array of connected to branch APIProviders\n- initialState: StoreBranch - initial state of branch\n\n#### .buildBranchReducers(namespace: string)\n\nBuilds reducers for store branch\n\n#### .buildBranchDispatchers(namespace: string)\n\nBuilds dispatchers for store branch\n\n#### .buildBranchSagas(namespace: string)\n\nBuilds sagas for store branch\n\n### StoreBranch\n\nHelper class for defining store branches, every store branch is instance of `StoreBranch`\n\nContains following fields:\n\n- data - main branch data\n- params - params for dispatchers\n- errors - branch errors\n- loading - progress of current async operation\n\n#### constructor(data, params, errors, loading)\n\n## Communication factory\n\nThis factory contains functions for communications build:\n\n### buildCommunication\n\nBuild communication based on strategy provided. Return object containing:\n\n- namespace: string - namespace\n- branches: Branches[] - store branches\n- reducers - builded reducers (must be includes into application reducers)\n- sagas - builded sagas (must be included into application sagas)\n- injector - react HOC for injecting props into components (connect())\n\n**NOTE!** To make `injector` work correctly you must define interface describing injected props and pass it into `buildCommunication`\n\n### Example\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch } from '@axmit/redux-communications';\n\nexport interface ITestConnectedProps {\n  testNames: StoreBranch<string[], string>;\n  getTestNames(searchStr?: string): void;\n  clearTestNames(): void;\n}\n\nconst apiProvider = new APIProvider('get', () => axios.get('/test/names'));\nconst branches = [new Branch('names', apiProvider, new StoreBranch([]))];\n\nconst strategy = new BaseStrategy({\n  namespace: 'test',\n  branches\n});\n\nconst testCommunication = buildCommunication<ITestConnectedProps>(strategy);\n```\n\nIn this example `ITestConnectedProps` passed as generic param into `buildCommunication` for right types in injector;\n\n### Rules of IConnectedProps interfaces\n\nConnected props interface contains of 2 parts:\n\n- state branches - generates based on `Branch` amount you pass into strategy, for each branch injector will add property by following format `[namespace][BranchName]` .\n  - **Example** if namespace is `lines` and there is 2 branches: `[new Branch('model'), new Branch('collection')]` then there will be 2 properties injected by generated injector: `linesModel` and `linesCollection`\n- dispatchers - generates based on `APIProviders` amount plus `clear` dispatcher for each branch is generated automatically. For each `APIProvider` will be generated dispatcher by following format `[APIProviderType][Namespace][BranchName]`.\n  - **Example** if namespace is `lines`, branch is `new Branch('names', apiProviders)` and `apiProviders` are\n    `typescript const apiProviders = [ new APIProvider('get', handler), new APIProvider('update', handler2) ]`\n    Dispatchers to be generated will be\n    `getLinesNames clearLinesNames updateLinesNames`\n\n## Toolset\n\nThis package also contains a toolset that simplifies your life.  \nFor example you can easy generate types for actions:\n\n```\ngetStartType('users', 'model', 'get') => USERS_MODEL_GET_TRY\ngetSuccessType('users', 'model', 'get') => USERS_MODEL_GET_SUCCESS\ngetFailType('users', 'model', 'get') => USERS_MODEL_GET_FAIL\n```\n\nAlso you can easily generate names for API provider methods\n\n```\ngetAPIMethodName('users', 'model', 'GET') => getUsersModel\n```\n\nMore examples see in: ./src/helpers.spec.ts\n\n## Types of actions\n\nactionsTypes - it's enum with base set of default actions.  \nAt at the moment it supports _init_, _clear_, _add_, _get_, _update_ and _delete_ types.\n\n## Sagas combinations\n\nIf you want to add sagas you can just add them directly in communication sagas array or in the root saga.\n\n```\nfunction* getEmptyCollection(action: any) {\n // Here you can use put to generate action or call to call any async funtions ...}\n\nfunction* getEmptyCollectionSaga() {\n const successActionType = getSuccessType(namespace, 'collection', actionsTypes.get);\n yield takeEvery(successActionType, getEmptyCollection);}\n```\n\nand then\n\n```\ncommunicationLine.sagas.push(getEmptyCollectionSaga());\n\n```\n\nor\n\n```\nexport default function* rootSaga(): any {\n yield all([ getEmptyCollectionSaga(), ... ]);}\n\n```\n\n## Full example\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch, actionsTypes } from '@axmit/redux-communications';\n\nconst namespace = 'line';\n\nexport interface ILineModel {\n  id: number;\n  name: string;\n}\n\nexport interface ILinesConnectedProps {\n  lineCollection: StoreBranch<ILineModel[], any>;\n  lineModel: StoreBranch<ILineModel, any>;\n  getLineCollection(params: any): void;\n  clearLineCollection(): void;\n  getLineModel(id: number): void;\n  updateLineModel(id: number, data: ILineModel): void;\n  clearLineModel(): void;\n}\n\nconst collectionApiProvider = new APIProvider(actionsTypes.get, (): Promise<ILineModel[]> => axios.get(`/lines`));\nconst modelApiProvider = [\n  new APIProvider(actionsTypes.get, (id: number): Promise<ILineModel> => axios.get(`/lines/${id}`), {\n    responseFormatter: (response, payload, branchState, fullState) => response.map(model => model),\n    postSuccessHook: (response, payload, branchState, fullState) => console.log('post success'),\n    postFailHook: (response, payload, branchState, fullState) => console.log('post fail')\n  }),\n  new APIProvider(actionsTypes.update, (id: number, data: ILineModel): Promise<ILineModel> => axios.put(`/lines/${id}`, data))\n];\n\nconst branches = [new Branch('collection', collectionApiProvider, new StoreBranch([])), new Branch('model', modelApiProvider)];\n\nconst strategy = new BaseStrategy({\n  namespace,\n  branches\n});\n\nexport const communicationLine = buildCommunication<ILinesConnectedProps>(strategy);\n```\n\n## Troubleshooting\n\n1. Update version of saga\n","readmeFilename":"README.md","gitHead":"cddff3142bfb8ef7a23316253c3dccf99cd33a90","_id":"@axmit/redux-communications@4.0.3-beta.5","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"axmit-engineers","email":"engineers@axmit.com"},"dist":{"integrity":"sha512-xg46yn0PZILnRwy5q1rpE+spqCy0TDNgbe7bF4cTAFLwZrb+4WEb8hzrU4v3EoeXDPfmd4yPzYYl1Ii7HxC64g==","shasum":"30abd74f3c9372a9f2658da8e6e3cb6b9804004c","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-4.0.3-beta.5.tgz","fileCount":44,"unpackedSize":154677,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3n94CRA9TVsSAnZWagAAjwEP+gLE61ShGx0V5sqZE6Rq\nb2NolPykEhujIbBOxzHNBBkHzWskQHZP2fSsT6Mmf/wY5LYBZ4gRIBCuNMXC\nKvkGSLQyFVQSihm4Xc2i2e25vcOZDnb+mwnGUZE8lcv0uVjugM8q03boNJ4P\nrGaPVfmCpUkBbWcC5JSMhBSQ2aw3lpAC1Yve8B4EcCjWy4vBhEYSD1GECSJt\n0RGdZjdNigWBurrMMFscnscK9R1dn3vH2quMAilOyQ3hjtpbcONgxRu9pqEM\nHpLvd2UfQTHFb/Heq+9d9Yew98R7C0lI5zcqUH/wqtWdD5CBwhwN/VOtVdJu\n6IrvwIPL1XmBj+DZV65t6jZ5Oq+kTcwQ6vRMgiTPAZVZtPOZMATF22YdKRqm\ntVMQ85h6BcxOQ4e3tDSOdUFTuxZDjv6w1UiLtI5dmoqJ+JarjYccFSoKAwPF\nuQwR3Zzo/fJUGpbw0fuy/RqHc8BFd7KuTNlQRKZecJihFWgMbEtY9sMHwZjh\ndlIwyRGGnp/tzceVnhdj7916zPiO4kNvIkw7owl+P+t3xay8pPT1/tKzdvHq\nKfRuGlZ2+pyxJcQgb+xZek54FbuAN5t1l/GDzmX1KVN3Nf2rxnSFQ5/klfGH\nu39YEQmK7+PTz/8r7Fzo3GSub5q03c4010bHgi7U0U+vjo6FfZWxeh1GlRHT\nsJG+\r\n=Xxyb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEkqklLCWKsTCXvUEzvXrfTeqp6CepD4T2M5YoCTA9PFAiBUQF3SBZHW+oGdLpdx9Afhz0+V87/Id1LKL1TMeZ+Y+A=="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_4.0.3-beta.5_1558085495502_0.08638951467359868"},"_hasShrinkwrap":false},"4.0.3":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"4.0.3","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"d0e70fb465278ea63b84d93567c5a3e4f08770a5","_id":"@axmit/redux-communications@4.0.3","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"axmit-engineers","email":"engineers@axmit.com"},"dist":{"integrity":"sha512-WtwMUrtaPDW0rNvMKmgU5+yxdMA6AwV0SVhSpr+e2XmQ2RvIR9c4lr2GYQUivcspr0Pn2njnlOPi8sl5gH+Cuw==","shasum":"2a10fe15358a77e4e2753068986255c4a4306118","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-4.0.3.tgz","fileCount":44,"unpackedSize":154670,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3wHxCRA9TVsSAnZWagAANgUP/RZT2dOkRx2uR6OMNiLn\nvYf8Dmjvufrbt1swOCJOvBOpJ9OVvVJvN2VuIesaSypbn3YD++5eOvLRtKhu\njrH5bSt6o5MqiLaKKI/Ojl+FrVn2WgGPxNpyHqi79m0bQkBmxWOjbJ9nHVPY\nZ//IDPMZ9KYBy8WZqKtz56WqThwGjzIW4chiUrq8unwWYLmmmWrzt71p8W7G\nFKQqKN5gMXQbHg/z1jGWxNUqvf3Qhn40ofNg6a6j7n2luSDLFQEy9xeY55el\nCb4U8GpKJNjWxrYD0IGP/V6j4Pz8Dz7IWFKtYhTfiXgmTEQkPqdF5lJd3svE\namVC4IkhWIJG3Rm3FVPfY6tHu+YNX1heOCv6dfjMDiUBeWvFlEc6k8W32a1D\ndEdqbVDjnE7rIUqeBFe6ZhUPbcPDW68eUnB6igAgm7AMk/TbCige7hMlltYb\nI9kYAF/JSBa+cId8dob40l99xI+x9sc0y9VfFAf1gDT41pWzYBqJ0hBe4WID\noCWBdUA6dlolOuBeVuPjPR9MRaUZO3VFBo7Gsy0ZbToktw+wL3mJ4LKGW8bC\ncSypoNRCs1jMa2WWL1WupaXMykSADGEqV9vnY1ZeJAE+E8jvwzh46ibQMq9c\nxnGTUwVLVhahMIWl4GMkcZ/1BUZHnVPnbMEete8ObUo7lR1tDn4OwxxF1pjl\ng+3t\r\n=iF4x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnNcwOVYJ0LhP9bOAYp8mRg8qkWcL8MaVbsoecCDNZEAIgUefZLSbKA2OF9a/vydmL9ICjlDCUGqgNFu3ES7id1vU="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_4.0.3_1558118896944_0.9673127509570512"},"_hasShrinkwrap":false},"4.0.4":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"4.0.4","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"8fccba30bee65ce9b95668fc8398370eddd9683b","_id":"@axmit/redux-communications@4.0.4","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"axmit-engineers","email":"engineers@axmit.com"},"dist":{"integrity":"sha512-VWNIQoVbQlLPBjPGm3Arr9w1T9PIDJC/Ib1VFbjK2cSul0iszuaguYMGLqRIYZ2t3kmNU4hMMMpFUdH6bgcoFg==","shasum":"4987f6de37d69c2df9590e55f5db403dbe286516","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-4.0.4.tgz","fileCount":44,"unpackedSize":154344,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3xnMCRA9TVsSAnZWagAATakP/RGs84iUFtXUkM7Iv4LM\n2K02Qy1RhKtuCYQ79s+NXez01doCbU7x9MdOk4jaVY8RzIIvRv+SN+9JNNdN\ng3j0zXZ+kf88VzOpoUb/+rli/Zxbq/4juFoQJaIN5W1BPuUai1jHQkTi1MC1\nVA/IZP4HP1XUV4yKkkJu3tLfcW9tPSw0kv0YgoEZX5w6ipVhL+yDwtWu+9uU\ns+soxuL0wIRI0CzkkOc8gpCqpgD/+9LH0B7VaEcGbSDPygplFj55awLYKTSd\n8/t9hompJHqVIlCIxCxlCyw2A7nCVsBYYyV5Xr4xkjeRFHWL+1X3/89QJ9ex\nnT+2h8R12jt/CyTdNLvZDPjRGdhmE4A5mRwMdZ3RXgjck8Bl612VA9DFKJKl\nwQ2M8NW6QXenB5oeIR2FERwXo0yu0TDzBWdtuUT4bCiP15aETGTJuAFgr9Rw\nihY9PNjL30iZlbV0v0D1fIMp6DaRV+g1fcWnlwIoIcfZIYs/TrEzg7XcP2OH\nic+8YFzCPgdYPRrPuXkNeHamUlVrh8UpL3AyMf/bSQO/IlJlykuKgmygh7kz\nr3aNzm5aP0c6Nt5WyP3DCPVlFnCfkpd3WSdR0vOYGJdzra/tXsz+ZTpsz0Ky\nYgXFTGZH+Sml2FKX9AX+/e9df7t7DEC05m8qowI8WYQdW6kkOhea6kDqT3dj\nA8zq\r\n=8qdm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjmZeJKeNrnwT7C0nrwuI95Pm+4cWlgb01cNn9P67EFwIgSeV/dfpY9bbr/eAus6VYYmpkiYV32QtIcMojiFUrDLA="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_4.0.4_1558125004168_0.8424773894921798"},"_hasShrinkwrap":false},"4.1.0":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"4.1.0","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"45906b15244bb0bb12af3df79a50c963039a7d46","_id":"@axmit/redux-communications@4.1.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"axmit-engineers","email":"engineers@axmit.com"},"dist":{"integrity":"sha512-Msw89GOFyHQwYCrUSOlGQ3tY50aM9PFBDZnomRqlwCYflZGkD8+kl36Nrxgs1du6b1/Cr/4qwiFtAJgYJxLccA==","shasum":"a0dc52fe7353363e24639204db3846ee5f41b207","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-4.1.0.tgz","fileCount":44,"unpackedSize":155862,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5k8LCRA9TVsSAnZWagAA5LkP/0LJAx/JSvKOikOnk7AK\nJtp8TUHHlaLBtEatFkvFxHJSFY7rnkW/dO/y11Np8/bnZdxex5i+laOusjix\n4JhKIamK2fF4TSU5ttslR4GzxjTBPLnjQqJUU2rJrhLkpldiyUPdOkRyhoVf\ntA7CaSErtQfLlYES/pC50A6AmfVlV2Cjw/Is4+LkAAPFkuA7HKaGageUiFJB\nE3cGhUNxMwCg2JCX04TDJzP1V2X8c70dlEQ/MzRzmRNxIZe6xPb8zlkDsD4X\n572Zh2+iSenPMdqtlXOM+AeN6Hn2nxM8C2FUe82G99FQD7vIVZxCjEZyUqdz\nDGrmrc2VrQka16qypmyvltgnwxyysJWcW7CaNr6XhcXC6vzwN3bnqbrIbe5Z\ntBh7JnXffCn4aBcsEuV/1U1izAC1RxkL62a7J01fshSVRcJg2f73Qv5strbf\nGiEFQZerGI0bTlFSX0dAiaMQnCbUfeLXIbQGhQFtZNqC+QT/vMZquT/VBdp/\nzsLk6UZovIP/gtxQbczLTlLoyFBE6ooOLvtSjFxRc00wLViP4/aXqxKl4v5z\ndMeudXlt2sTikBbZE5tcWvxyUqh/kqm3METI+FLd+uERvKsIK/OqlZpHnU4z\nLrb9CFiV6AMhZkWxC8GDJgKb195FPNk5BnFdh2WI9QVFoac/U1BN+Ob3GUrj\na41O\r\n=EWcr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCd/sN9rg9PzsdzPZLMu5TPBvczB0FSKOMbZwtTOtWSoQIhAJu5UAL1Yk5RQUjj7b7iNZnzd5Y7Bx1xiTc7kfCbnonW"}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_4.1.0_1558597386418_0.7270314861942737"},"_hasShrinkwrap":false},"4.1.1-beta.0":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"4.1.1-beta.0","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","readme":"# Redux communications\n\nThis package provides a toolset to simplify working with redux and saga libs.\n\n## Installation\n\n`npm i @axmit/redux-communications` or `yarn add @axmit/redux-communications`\n\n## Quick start\n\nTo create a new communication you should do the following:\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch, actionsTypes } from '@axmit/redux-communications';\n\nconst namespace = 'line';\nexport interface ILinesConnectedProps {\n lineCollection: StoreBranches<[], any> getLineCollection(params: any): void; clearLineCollection(): void;}\n\nconst apiProvider = new APIProvider(actionsTypes.get, Promise<any> => axios.get(`/lines`));\nconst branches = [new Branch('collection', apiProvider, new StoreBranch([])]\n\nconst strategy = new BaseStrategy({\n namespace, branches})\n\nconst communicationLine = buildCommunication<ILinesConnectedProps>(strategy);\n```\n\nAfter that you will have a communication that contains base set of reducers, actions. You can easily setup it as usual.\n\n```\n//Sagas setup\nexport default function* rootSaga(): any {\n yield all([ ...communicationLine.sagas ]);}\n//Reducers setup\nconst reducers = {\n ...communicationLine.reducers };\n```\n\nCommunication also contains `injector` for adding generated dispatchers and store branches to components\n\n```typescript\nimport React from 'react';\nimport { ILinesConnectedProps } from './linesCommunication';\n\nclass TestComponent extends React.Component<ILinesConnectedProps> {\n //Component logic goes here}\n\ncommunicationLine.injector(TestComponent);\n```\n\n## Detailed explanation\n\nThe idea of this package is to provide a simple way (toolset) of generating event publishers and subscribers.\n\n### **!!! _IMPORTANT_ !!!**\n\n> If you want to understand this module completely you should be familiar with publisher-subscriber pattern (https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern). > Because in fact this pattern underlies for Redux/Saga communication.\n\nIn fact we have:\n\n1. event publisher\n   - actions - common example for generating events\n2. event subscriber reducer\n   - reducer - common example for handling events and update the store\n   - saga - handlers that can be used for side effects and generating new event\n\nActually each async action consists of 3 actions:\n\n1. Start action - triggered to start execution of async call\n2. Success action - called if action finished with success\n3. Fail action - called if action finished with fail\n\nWe can use reducers to update the store depending on action type and use sagas to generate some actions depending on results of other actions.\n\nFor example we can handle _USER_MODEL_GET_SUCCESS_ action and after that generate action _TASK_COLLECTION_GET_START_ to start getting collection of tasks for current user.\n\n## Store structure:\n\nThe store consists of namespaces that are divided into branches. Each branch contains 4 fields:\n\n1. Data - data for this branch\n2. Loading - status of data loading of this branch\n3. Errors - errors for branch if there are any\n4. Params - params that are provided in the start action  \n   For more details see implementation in ./src/buildReducer.ts\n\n#### Example:\n\nNamespace - user  \nBranches - model, collection\n\n```typescript\nstore = {\n  user: {\n    model: {\n      data: {\n        data: {\n          id: 1,\n          firstName: 'Ivan',\n          lastName: 'Tershukov'\n        },\n        meta: {\n          lastLoginAt: '01.01.19 12:00'\n        }\n      },\n      params: 1, // id of current model\n      loading: false,\n      errors: null\n    },\n    collection: {\n      data: {\n        data: [\n          {\n            id: 1,\n            firstName: 'Ivan',\n            lastName: 'Tershukov'\n          },\n          {\n            id: 2,\n            firstName: 'Yana',\n            lastName: 'Banina'\n          },\n          {\n            id: 3,\n            firstName: 'Mike',\n            lastName: 'Sidorov'\n          }\n        ],\n        meta: {\n          limit: 100,\n          offset: 0,\n          q: ''\n        }\n      },\n      params: {\n        order: 'asc',\n        limit: 10,\n        offset: 50\n      },\n      loading: false,\n      errors: null\n    }\n  }\n};\n```\n\n# Inner structure\n\n## Strategies:\n\nThe strategy determines which part of communication logic will be generated.\n\nAll strategy receives config as constructor param. Every strategy has unique params set but there is common config params for all of them:\n\n- namespace: string (required) - name of store namespace to be generated\n- actions: Array (optional) - array of custom actions\n- reducers: Array (optional) - array of custom reducers\n- sagas: Array (optional) - array of custom sagas\n\n### BaseStrategy\n\nThis strategy requires direct approach in communication generation. You must specify at least `namespace` and `branches` to get communication.\n\nAvailable `BaseStrategy` methods:\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- branches: Branch[](required) - array of `Branches` see below for more information\n\n#### .buildReducers()\n\nMethod to build reducers based on strategy config\n\n#### .buildInjector()\n\nMethod to build injector based on strategy config\n\n#### .buildSagas()\n\nMethod to build sagas based on strategy config\n\n### CRUDStrategy\n\nThis strategy predefines 2 namespace branches in `Redux`:\n\n1. Model\n2. Collection\n\nIt extends `BaseStrategy` so methods are similar\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- modelApiProviders: APIProvider[](required) - array of APIProviders connected to model store branch\n- collectionApiProviders: APIProvider[](required) - array of APIProviders connected to collection store branch\n- modelInitialState: StoreBranch (optional) - initial state for model branch\n- collectionInitialState: StoreBranch (optional) - initial state for collection branch\n\n### SimpleStrategy\n\nThis strategy predefines only one namespace branch `model` in `Redux`:  \nIt extends `BaseStrategy` so methods are similar\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- apiProvider: APIProvider[](required) - array of APIProviders connected to model store branch\n- initialState: StoreBranch (optional) - initial state for model branch\n\n## Class Helpers\n\nThere is an amount of classes to help you build you communication\n\n### APIProvider\n\nThis class contains provider for your API logic (request and so on)  \n**NOTE!** For each API provider you defined a saga will be generated\n\n#### constructor(type, handler, hooks)\n\n- type: string - string literal indicating type of performing action (can be any string you like)\n- handler: Function - function containing provider logic (ex. API call)\n- hooks (optional) - object containing different hooks for APIProvider each hook is function with following signature (response, payload, branchState, fullState) => any:\n\n  - response - handler call result\n  - payload - action payload\n  - branchState - current branch state\n  - fullState- full application state\n\n  Available hooks:\n\n  - responseFormatter - occur just after after handler call\n  - postSuccessHooks - occur after success action is dispatched\n  - postFailHooks - occur after fail action is dispatched\n  - preRequestHook - occur before API call\n  - clearParams (`boolean` flag) - if true clear StoreBranch params after success\n  - mapParams - allow you to map params to be passed into API call\n\n#### Example\n\n```typescript\nnew APIProvider('get', () => axios.get('/test'), {\n  responseFormatter: (response, payload, branchState, fullState) => response.map(item => response.test)\n});\n```\n\nThis `APIProvider` will generate a saga which send GET /test and apply `responseFormatter` to response\n\n### Branch\n\nThis class responsible for namespace branches in store\n\nAvailable `Branch` methods\n\n#### constructor(name, apiProviders, initialState)\n\n- name: string - branch name\n- apiProviders: APIProvider[] | APIProvider - array of connected to branch APIProviders\n- initialState: StoreBranch - initial state of branch\n\n#### .buildBranchReducers(namespace: string)\n\nBuilds reducers for store branch\n\n#### .buildBranchDispatchers(namespace: string)\n\nBuilds dispatchers for store branch\n\n#### .buildBranchSagas(namespace: string)\n\nBuilds sagas for store branch\n\n### StoreBranch\n\nHelper class for defining store branches, every store branch is instance of `StoreBranch`\n\nContains following fields:\n\n- data - main branch data\n- params - params for dispatchers\n- errors - branch errors\n- loading - progress of current async operation\n\n#### constructor(data, params, errors, loading)\n\n## Communication factory\n\nThis factory contains functions for communications build:\n\n### buildCommunication\n\nBuild communication based on strategy provided. Return object containing:\n\n- namespace: string - namespace\n- branches: Branches[] - store branches\n- reducers - builded reducers (must be includes into application reducers)\n- sagas - builded sagas (must be included into application sagas)\n- injector - react HOC for injecting props into components (connect())\n\n**NOTE!** To make `injector` work correctly you must define interface describing injected props and pass it into `buildCommunication`\n\n### Example\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch } from '@axmit/redux-communications';\n\nexport interface ITestConnectedProps {\n  testNames: StoreBranch<string[], string>;\n  getTestNames(searchStr?: string): void;\n  clearTestNames(): void;\n}\n\nconst apiProvider = new APIProvider('get', () => axios.get('/test/names'));\nconst branches = [new Branch('names', apiProvider, new StoreBranch([]))];\n\nconst strategy = new BaseStrategy({\n  namespace: 'test',\n  branches\n});\n\nconst testCommunication = buildCommunication<ITestConnectedProps>(strategy);\n```\n\nIn this example `ITestConnectedProps` passed as generic param into `buildCommunication` for right types in injector;\n\n## !!!IMPORTANT Rules of IConnectedProps interfaces\n\nConnected props interface contains of 2 parts:\n\n- state branches - generates based on `Branch` amount you pass into strategy, for each branch injector will add property by following format `[namespace][BranchName]` .\n  - **Example** if namespace is `lines` and there is 2 branches: `[new Branch('model'), new Branch('collection')]` then there will be 2 properties injected by generated injector: `linesModel` and `linesCollection`\n- dispatchers - generates based on `APIProviders` amount plus `clear` dispatcher for each branch is generated automatically. For each `APIProvider` will be generated dispatcher by following format `[APIProviderType][Namespace][BranchName]`.\n\n  - **Example** if namespace is `lines`, branch is `new Branch('names', apiProviders)` and `apiProviders` are  \n     `typescript const apiProviders = [ new APIProvider('get', handler), new APIProvider('update', handler2) ]`  \n    Dispatchers to be generated will be  \n     `getLinesNames clearLinesNames updateLinesNames`\n\n## Toolset\n\nThis package also contains a toolset that simplifies your life.  \nFor example you can easy generate types for actions:\n\n```\ngetStartType('users', 'model', 'get') => USERS_MODEL_GET_TRY\ngetSuccessType('users', 'model', 'get') => USERS_MODEL_GET_SUCCESS\ngetFailType('users', 'model', 'get') => USERS_MODEL_GET_FAIL\ngetUpdateParamsType('users', 'model') => USERS_MODEL_UPDATE_PARAMS\n```\n\nAlso you can easily generate names for API provider methods\n\n```\ngetAPIMethodName('users', 'model', 'GET') => getUsersModel\n```\n\nMore examples see in: ./src/helpers.spec.ts\n\n## Types of actions\n\nactionsTypes - it's enum with base set of default actions.  \nAt at the moment it supports _init_, _clear_, _add_, _get_, _update_ and _delete_ types.\n\n## Sagas combinations\n\nIf you want to add sagas you can just add them directly in communication sagas array or in the root saga.\n\n````\nfunction* getEmptyCollection(action: any) {\n // Here you can use put to generate action or call to call any async funtions ...}\nfunction* getEmptyCollectionSaga() {\n const successActionType = getSuccessType(namespace, 'collection', actionsTypes.get); yield takeEvery(successActionType, getEmptyCollection);}```\n\nand then\n\n````\n\ncommunicationLine.sagas.push(getEmptyCollectionSaga());\n\n```\n\nor\n\n```\n\nexport default function\\* rootSaga(): any {  \n yield all([ getEmptyCollectionSaga(), ... ]);}\n\n````\n\n## Full example\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch, actionsTypes } from '@axmit/redux-communications';\n\nconst namespace = 'line';\n\nexport interface ILineModel {\n id: number; name: string;}\n\nexport interface ILinesConnectedProps {\n lineCollection: StoreBranch<ILineModel[], any>; lineModel: StoreBranch<ILineModel, any>; getLineCollection(params: any): void; clearLineCollection(): void; getLineModel(id: number): void; updateLineModel(id: number, data: ILineModel): void; clearLineModel(): void;}\n\nconst collectionApiProvider = new APIProvider(actionsTypes.get, (): Promise<ILineModel[]> => axios.get(`/lines`));\nconst modelApiProvider = [\n new APIProvider(actionsTypes.get, (id: number): Promise<ILineModel> => axios.get(`/lines/${id}`), { responseFormatter: (response, payload, branchState, fullState) => response.map(model => model), postSuccessHook: (response, payload, branchState, fullState) => console.log('post success'), postFailHook: (response, payload, branchState, fullState) => console.log('post fail') }), new APIProvider(actionsTypes.update, (id: number, data: ILineModel): Promise<ILineModel> => axios.put(`/lines/${id}`, data))];\n\nconst branches = [new Branch('collection', collectionApiProvider, new StoreBranch([])), new Branch('model', modelApiProvider)];\n\nconst strategy = new BaseStrategy({\n namespace, branches});\n\nexport const communicationLine = buildCommunication<ILinesConnectedProps>(strategy);\n````\n\n## Troubleshooting\n\n1. Make sure the following dependencies match:\n\n- \"react\": \"^16.8.6\",\n- \"react-redux\": \"^6.0.1\",\n- \"redux\": \"^4.0.1\",\n- \"redux-saga\": \"^1.0.1\"\n","readmeFilename":"README.md","gitHead":"0f57d854358ec436bf59411503883b28a083ec76","_id":"@axmit/redux-communications@4.1.1-beta.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"axmit-engineers","email":"engineers@axmit.com"},"dist":{"integrity":"sha512-P2ebDHuam5gZkYyvZ+5Lw0LAAhyEasw3sTUizluDuedrJKOTOQ0iTOdJS9dzVgTjeIhoJfLrhHYDqZ4/98/0dQ==","shasum":"aebeb254fce040b3577156fa2354fcdf7cb46486","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-4.1.1-beta.0.tgz","fileCount":44,"unpackedSize":155906,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5mtmCRA9TVsSAnZWagAAObcQAKRUJhUWVoYNfwH6jLSS\nYJoG6MpSfY1XmGJoS6pzIjE2g+0NCWMuQdpIPxiugmzBfq4k56je8SF7mseg\nXzj328k223UGJAAmiB22RviGrD0NHtJK6ZCAJDEDgf6RX0F+tNJjhrnK2gX6\nuN2Hj/AUARZfOBmcDe9j1qXxz/TmT/frLQhcXILA97OitJw+d5tfNC2qQosZ\nEAp6Ul/3x/UF4+KOitbwry67TvXY4AqgAlXCqqiYJ5qxCt/XY6VH76iwx8lG\nRBRSwGCj2oBmNuEmCootX8w9PQCUC991R6nH4Oo21kkGHFaBYdEnrHSTGC3F\nYrsE8rqS+TwnmpTAlbeETgz9b+t+iP9Ys4zHrmQAwQSjauqcaPIdB1+rj7kG\n3ajj6+faTqIG4kN62UmuXF8NJxNJB/ViinQOCcofr+YXoPRpXhRhTVtGq222\nbOsjB5ufuH2zrD14A32OZHg8xtUqV99DvscigCLc1QsGGlJOpJ9TgkhHhpkm\nrE1ew4S4CcMKRYWhmCznCHOioI5lMuyuyicIFOA2Ox93wqAG0eE96/Z2MlJX\nLIPLiluN90nWnODQRIZb2ViKcsuhmgzNjueX4yx6+7vfNfHUZAwJyv2YAj6q\nNiQ2HQtKWkw21vbzxyA+x/EuwtzvLmaRbXLIKzs2IVfdp2yz0JvmXGvweWzf\nWBHJ\r\n=qW69\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCf/36TaP2Azy34eq2t1vFdibc3k5rFpJP2qprdANPKuQIgZ7wdd8+cCtGHCJJaIIYyKKNC3gsGlTywmIXUYWVKMvg="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_4.1.1-beta.0_1558604646046_0.053953011001324214"},"_hasShrinkwrap":false},"4.1.1-beta.1":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"4.1.1-beta.1","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","readme":"# Redux communications\n\nThis package provides a toolset to simplify working with redux and saga libs.\n\n## Installation\n\n`npm i @axmit/redux-communications` or `yarn add @axmit/redux-communications`\n\n## Quick start\n\nTo create a new communication you should do the following:\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch, actionsTypes } from '@axmit/redux-communications';\n\nconst namespace = 'line';\nexport interface ILinesConnectedProps {\n lineCollection: StoreBranches<[], any> getLineCollection(params: any): void; clearLineCollection(): void;}\n\nconst apiProvider = new APIProvider(actionsTypes.get, Promise<any> => axios.get(`/lines`));\nconst branches = [new Branch('collection', apiProvider, new StoreBranch([])]\n\nconst strategy = new BaseStrategy({\n namespace, branches})\n\nconst communicationLine = buildCommunication<ILinesConnectedProps>(strategy);\n```\n\nAfter that you will have a communication that contains base set of reducers, actions. You can easily setup it as usual.\n\n```\n//Sagas setup\nexport default function* rootSaga(): any {\n yield all([ ...communicationLine.sagas ]);}\n//Reducers setup\nconst reducers = {\n ...communicationLine.reducers };\n```\n\nCommunication also contains `injector` for adding generated dispatchers and store branches to components\n\n```typescript\nimport React from 'react';\nimport { ILinesConnectedProps } from './linesCommunication';\n\nclass TestComponent extends React.Component<ILinesConnectedProps> {\n //Component logic goes here}\n\ncommunicationLine.injector(TestComponent);\n```\n\n## Detailed explanation\n\nThe idea of this package is to provide a simple way (toolset) of generating event publishers and subscribers.\n\n### **!!! _IMPORTANT_ !!!**\n\n> If you want to understand this module completely you should be familiar with publisher-subscriber pattern (https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern). > Because in fact this pattern underlies for Redux/Saga communication.\n\nIn fact we have:\n\n1. event publisher\n   - actions - common example for generating events\n2. event subscriber reducer\n   - reducer - common example for handling events and update the store\n   - saga - handlers that can be used for side effects and generating new event\n\nActually each async action consists of 3 actions:\n\n1. Start action - triggered to start execution of async call\n2. Success action - called if action finished with success\n3. Fail action - called if action finished with fail\n\nWe can use reducers to update the store depending on action type and use sagas to generate some actions depending on results of other actions.\n\nFor example we can handle _USER_MODEL_GET_SUCCESS_ action and after that generate action _TASK_COLLECTION_GET_START_ to start getting collection of tasks for current user.\n\n## Store structure:\n\nThe store consists of namespaces that are divided into branches. Each branch contains 4 fields:\n\n1. Data - data for this branch\n2. Loading - status of data loading of this branch\n3. Errors - errors for branch if there are any\n4. Params - params that are provided in the start action  \n   For more details see implementation in ./src/buildReducer.ts\n\n#### Example:\n\nNamespace - user  \nBranches - model, collection\n\n```typescript\nstore = {\n  user: {\n    model: {\n      data: {\n        data: {\n          id: 1,\n          firstName: 'Ivan',\n          lastName: 'Tershukov'\n        },\n        meta: {\n          lastLoginAt: '01.01.19 12:00'\n        }\n      },\n      params: 1, // id of current model\n      loading: false,\n      errors: null\n    },\n    collection: {\n      data: {\n        data: [\n          {\n            id: 1,\n            firstName: 'Ivan',\n            lastName: 'Tershukov'\n          },\n          {\n            id: 2,\n            firstName: 'Yana',\n            lastName: 'Banina'\n          },\n          {\n            id: 3,\n            firstName: 'Mike',\n            lastName: 'Sidorov'\n          }\n        ],\n        meta: {\n          limit: 100,\n          offset: 0,\n          q: ''\n        }\n      },\n      params: {\n        order: 'asc',\n        limit: 10,\n        offset: 50\n      },\n      loading: false,\n      errors: null\n    }\n  }\n};\n```\n\n# Inner structure\n\n## Strategies:\n\nThe strategy determines which part of communication logic will be generated.\n\nAll strategy receives config as constructor param. Every strategy has unique params set but there is common config params for all of them:\n\n- namespace: string (required) - name of store namespace to be generated\n- actions: Array (optional) - array of custom actions\n- reducers: Array (optional) - array of custom reducers\n- sagas: Array (optional) - array of custom sagas\n\n### BaseStrategy\n\nThis strategy requires direct approach in communication generation. You must specify at least `namespace` and `branches` to get communication.\n\nAvailable `BaseStrategy` methods:\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- branches: Branch[](required) - array of `Branches` see below for more information\n\n#### .buildReducers()\n\nMethod to build reducers based on strategy config\n\n#### .buildInjector()\n\nMethod to build injector based on strategy config\n\n#### .buildSagas()\n\nMethod to build sagas based on strategy config\n\n### CRUDStrategy\n\nThis strategy predefines 2 namespace branches in `Redux`:\n\n1. Model\n2. Collection\n\nIt extends `BaseStrategy` so methods are similar\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- modelApiProviders: APIProvider[](required) - array of APIProviders connected to model store branch\n- collectionApiProviders: APIProvider[](required) - array of APIProviders connected to collection store branch\n- modelInitialState: StoreBranch (optional) - initial state for model branch\n- collectionInitialState: StoreBranch (optional) - initial state for collection branch\n\n### SimpleStrategy\n\nThis strategy predefines only one namespace branch `model` in `Redux`:  \nIt extends `BaseStrategy` so methods are similar\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- apiProvider: APIProvider[](required) - array of APIProviders connected to model store branch\n- initialState: StoreBranch (optional) - initial state for model branch\n\n## Class Helpers\n\nThere is an amount of classes to help you build you communication\n\n### APIProvider\n\nThis class contains provider for your API logic (request and so on)  \n**NOTE!** For each API provider you defined a saga will be generated\n\n#### constructor(type, handler, hooks)\n\n- type: string - string literal indicating type of performing action (can be any string you like)\n- handler: Function - function containing provider logic (ex. API call)\n- hooks (optional) - object containing different hooks for APIProvider each hook is function with following signature (response, payload, branchState, fullState) => any:\n\n  - response - handler call result\n  - payload - action payload\n  - branchState - current branch state\n  - fullState- full application state\n\n  Available hooks:\n\n  - responseFormatter - occur just after after handler call\n  - postSuccessHooks - occur after success action is dispatched\n  - postFailHooks - occur after fail action is dispatched\n  - preRequestHook - occur before API call\n  - clearParams (`boolean` flag) - if true clear StoreBranch params after success\n  - mapParams - allow you to map params to be passed into API call\n\n#### Example\n\n```typescript\nnew APIProvider('get', () => axios.get('/test'), {\n  responseFormatter: (response, payload, branchState, fullState) => response.map(item => response.test)\n});\n```\n\nThis `APIProvider` will generate a saga which send GET /test and apply `responseFormatter` to response\n\n### Branch\n\nThis class responsible for namespace branches in store\n\nAvailable `Branch` methods\n\n#### constructor(name, apiProviders, initialState)\n\n- name: string - branch name\n- apiProviders: APIProvider[] | APIProvider - array of connected to branch APIProviders\n- initialState: StoreBranch - initial state of branch\n\n#### .buildBranchReducers(namespace: string)\n\nBuilds reducers for store branch\n\n#### .buildBranchDispatchers(namespace: string)\n\nBuilds dispatchers for store branch\n\n#### .buildBranchSagas(namespace: string)\n\nBuilds sagas for store branch\n\n### StoreBranch\n\nHelper class for defining store branches, every store branch is instance of `StoreBranch`\n\nContains following fields:\n\n- data - main branch data\n- params - params for dispatchers\n- errors - branch errors\n- loading - progress of current async operation\n\n#### constructor(data, params, errors, loading)\n\n## Communication factory\n\nThis factory contains functions for communications build:\n\n### buildCommunication\n\nBuild communication based on strategy provided. Return object containing:\n\n- namespace: string - namespace\n- branches: Branches[] - store branches\n- reducers - builded reducers (must be includes into application reducers)\n- sagas - builded sagas (must be included into application sagas)\n- injector - react HOC for injecting props into components (connect())\n\n**NOTE!** To make `injector` work correctly you must define interface describing injected props and pass it into `buildCommunication`\n\n### Example\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch } from '@axmit/redux-communications';\n\nexport interface ITestConnectedProps {\n  testNames: StoreBranch<string[], string>;\n  getTestNames(searchStr?: string): void;\n  clearTestNames(): void;\n}\n\nconst apiProvider = new APIProvider('get', () => axios.get('/test/names'));\nconst branches = [new Branch('names', apiProvider, new StoreBranch([]))];\n\nconst strategy = new BaseStrategy({\n  namespace: 'test',\n  branches\n});\n\nconst testCommunication = buildCommunication<ITestConnectedProps>(strategy);\n```\n\nIn this example `ITestConnectedProps` passed as generic param into `buildCommunication` for right types in injector;\n\n## !!!IMPORTANT Rules of IConnectedProps interfaces\n\nConnected props interface contains of 2 parts:\n\n- state branches - generates based on `Branch` amount you pass into strategy, for each branch injector will add property by following format `[namespace][BranchName]` .\n  - **Example** if namespace is `lines` and there is 2 branches: `[new Branch('model'), new Branch('collection')]` then there will be 2 properties injected by generated injector: `linesModel` and `linesCollection`\n- dispatchers - generates based on `APIProviders` amount plus `clear` dispatcher for each branch is generated automatically. For each `APIProvider` will be generated dispatcher by following format `[APIProviderType][Namespace][BranchName]`.\n\n  - **Example** if namespace is `lines`, branch is `new Branch('names', apiProviders)` and `apiProviders` are  \n     `typescript const apiProviders = [ new APIProvider('get', handler), new APIProvider('update', handler2) ]`  \n    Dispatchers to be generated will be  \n     `getLinesNames clearLinesNames updateLinesNames`\n\n## Toolset\n\nThis package also contains a toolset that simplifies your life.  \nFor example you can easy generate types for actions:\n\n```\ngetStartType('users', 'model', 'get') => USERS_MODEL_GET_TRY\ngetSuccessType('users', 'model', 'get') => USERS_MODEL_GET_SUCCESS\ngetFailType('users', 'model', 'get') => USERS_MODEL_GET_FAIL\ngetUpdateParamsType('users', 'model') => USERS_MODEL_UPDATE_PARAMS\n```\n\nAlso you can easily generate names for API provider methods\n\n```\ngetAPIMethodName('users', 'model', 'GET') => getUsersModel\n```\n\nMore examples see in: ./src/helpers.spec.ts\n\n## Types of actions\n\nactionsTypes - it's enum with base set of default actions.  \nAt at the moment it supports _init_, _clear_, _add_, _get_, _update_ and _delete_ types.\n\n## Sagas combinations\n\nIf you want to add sagas you can just add them directly in communication sagas array or in the root saga.\n\n````\nfunction* getEmptyCollection(action: any) {\n // Here you can use put to generate action or call to call any async funtions ...}\nfunction* getEmptyCollectionSaga() {\n const successActionType = getSuccessType(namespace, 'collection', actionsTypes.get); yield takeEvery(successActionType, getEmptyCollection);}```\n\nand then\n\n````\n\ncommunicationLine.sagas.push(getEmptyCollectionSaga());\n\n```\n\nor\n\n```\n\nexport default function\\* rootSaga(): any {  \n yield all([ getEmptyCollectionSaga(), ... ]);}\n\n````\n\n## Full example\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch, actionsTypes } from '@axmit/redux-communications';\n\nconst namespace = 'line';\n\nexport interface ILineModel {\n id: number; name: string;}\n\nexport interface ILinesConnectedProps {\n lineCollection: StoreBranch<ILineModel[], any>; lineModel: StoreBranch<ILineModel, any>; getLineCollection(params: any): void; clearLineCollection(): void; getLineModel(id: number): void; updateLineModel(id: number, data: ILineModel): void; clearLineModel(): void;}\n\nconst collectionApiProvider = new APIProvider(actionsTypes.get, (): Promise<ILineModel[]> => axios.get(`/lines`));\nconst modelApiProvider = [\n new APIProvider(actionsTypes.get, (id: number): Promise<ILineModel> => axios.get(`/lines/${id}`), { responseFormatter: (response, payload, branchState, fullState) => response.map(model => model), postSuccessHook: (response, payload, branchState, fullState) => console.log('post success'), postFailHook: (response, payload, branchState, fullState) => console.log('post fail') }), new APIProvider(actionsTypes.update, (id: number, data: ILineModel): Promise<ILineModel> => axios.put(`/lines/${id}`, data))];\n\nconst branches = [new Branch('collection', collectionApiProvider, new StoreBranch([])), new Branch('model', modelApiProvider)];\n\nconst strategy = new BaseStrategy({\n namespace, branches});\n\nexport const communicationLine = buildCommunication<ILinesConnectedProps>(strategy);\n````\n\n## Troubleshooting\n\n1. Make sure the following dependencies match:\n\n- \"react\": \"^16.8.6\",\n- \"react-redux\": \"^6.0.1\",\n- \"redux\": \"^4.0.1\",\n- \"redux-saga\": \"^1.0.1\"\n","readmeFilename":"README.md","gitHead":"60e011050b7fd8ff55faa4b5e65282908518970b","_id":"@axmit/redux-communications@4.1.1-beta.1","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"axmit-engineers","email":"engineers@axmit.com"},"dist":{"integrity":"sha512-zzi4y+RwGZgao7jjhCeQPIt9PeYvLgEpvCp+PyVLrRVWZs5CjM0gjKiPz5O9TeNB3ppjcJD04d6rXGhnjwqfLw==","shasum":"3d4c265964de54fb081cafc451902df205ac2951","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-4.1.1-beta.1.tgz","fileCount":44,"unpackedSize":157463,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5nKtCRA9TVsSAnZWagAAm/0QAJWT/pjGN2Xx6WUiA6ap\nJyDYaaC5d4lvMj7KuBa+tBEzqoyrXl8iKOlGHbljewKGnSLfzyjOJPG6xa8B\nLbxUSAVOiyZY1AfAhwPhqWrJ3ZBP5wAvuYXMEH3Xsc+IpyV7jiYZm4Mzjin3\n9nMnb+uWhhIPCB1YxwDn4RByT2wFHNI51CkJ0guTzXgW3R3M+fAr1LaRhmLo\nXs9jDNm7Ekah6hCIDCJbOReODV6DhdpPtBplKbd9eDDdPElYAWBdYo3KHbQZ\n/aJaSt/rU+1qWjM0++HEcYdffV7TtguNAQyH4IGpRjsvtg3KbuIa3UsPvmxg\nLW6hAebCkr0eedQ8rwg9aqCUHRNHl6ICBn4TC24jXBdIw4HYUGx03udbIlZu\nYMmIBUuNV08rmR7Wie2Dcvt8AaHcNi+b5aC4Wp0ZxAnY0oEUtAQGu8AAtV7M\nK2YBONnMeIhGWtwlqIqZ/Gljetl7tHdlPTBjPlLQei2QpU1uKH2eyHeFhqcx\nX9JqmST0m2OVvMXU6iKA6o5ahdqgN7J3GXF2k882wJWbpzMH7LTax0LaLs0B\nuRwl9cZQU4Wq8KOnguMan0vtkbhqkxgQiHn7M8L87pn63gt1yQpyvYOqH1ls\njayp2rPZdwsogtfdglNKwg/18JSPZmodE5+Vz++O0hPajWNGmNX22VExEsac\nvygW\r\n=nICQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBfH6Rnvu/F0CdBuMK7kh87ekxkTuxZTMuhC7tQAExpyAiA2IyEgKOZxosHQWNXt4rNLMsAyqJt6TG1hHWh0RYFm2A=="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_4.1.1-beta.1_1558606507857_0.19175151186146389"},"_hasShrinkwrap":false},"4.1.1-beta.2":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"4.1.1-beta.2","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","readme":"# Redux communications\n\nThis package provides a toolset to simplify working with redux and saga libs.\n\n## Installation\n\n`npm i @axmit/redux-communications` or `yarn add @axmit/redux-communications`\n\n## Quick start\n\nTo create a new communication you should do the following:\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch, actionsTypes } from '@axmit/redux-communications';\n\nconst namespace = 'line';\nexport interface ILinesConnectedProps {\n lineCollection: StoreBranches<[], any> getLineCollection(params: any): void; clearLineCollection(): void;}\n\nconst apiProvider = new APIProvider(actionsTypes.get, Promise<any> => axios.get(`/lines`));\nconst branches = [new Branch('collection', apiProvider, new StoreBranch([])]\n\nconst strategy = new BaseStrategy({\n namespace, branches})\n\nconst communicationLine = buildCommunication<ILinesConnectedProps>(strategy);\n```\n\nAfter that you will have a communication that contains base set of reducers, actions. You can easily setup it as usual.\n\n```\n//Sagas setup\nexport default function* rootSaga(): any {\n yield all([ ...communicationLine.sagas ]);}\n//Reducers setup\nconst reducers = {\n ...communicationLine.reducers };\n```\n\nCommunication also contains `injector` for adding generated dispatchers and store branches to components\n\n```typescript\nimport React from 'react';\nimport { ILinesConnectedProps } from './linesCommunication';\n\nclass TestComponent extends React.Component<ILinesConnectedProps> {\n //Component logic goes here}\n\ncommunicationLine.injector(TestComponent);\n```\n\n## Detailed explanation\n\nThe idea of this package is to provide a simple way (toolset) of generating event publishers and subscribers.\n\n### **!!! _IMPORTANT_ !!!**\n\n> If you want to understand this module completely you should be familiar with publisher-subscriber pattern (https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern). > Because in fact this pattern underlies for Redux/Saga communication.\n\nIn fact we have:\n\n1. event publisher\n   - actions - common example for generating events\n2. event subscriber reducer\n   - reducer - common example for handling events and update the store\n   - saga - handlers that can be used for side effects and generating new event\n\nActually each async action consists of 3 actions:\n\n1. Start action - triggered to start execution of async call\n2. Success action - called if action finished with success\n3. Fail action - called if action finished with fail\n\nWe can use reducers to update the store depending on action type and use sagas to generate some actions depending on results of other actions.\n\nFor example we can handle _USER_MODEL_GET_SUCCESS_ action and after that generate action _TASK_COLLECTION_GET_START_ to start getting collection of tasks for current user.\n\n## Store structure:\n\nThe store consists of namespaces that are divided into branches. Each branch contains 4 fields:\n\n1. Data - data for this branch\n2. Loading - status of data loading of this branch\n3. Errors - errors for branch if there are any\n4. Params - params that are provided in the start action  \n   For more details see implementation in ./src/buildReducer.ts\n\n#### Example:\n\nNamespace - user  \nBranches - model, collection\n\n```typescript\nstore = {\n  user: {\n    model: {\n      data: {\n        data: {\n          id: 1,\n          firstName: 'Ivan',\n          lastName: 'Tershukov'\n        },\n        meta: {\n          lastLoginAt: '01.01.19 12:00'\n        }\n      },\n      params: 1, // id of current model\n      loading: false,\n      errors: null\n    },\n    collection: {\n      data: {\n        data: [\n          {\n            id: 1,\n            firstName: 'Ivan',\n            lastName: 'Tershukov'\n          },\n          {\n            id: 2,\n            firstName: 'Yana',\n            lastName: 'Banina'\n          },\n          {\n            id: 3,\n            firstName: 'Mike',\n            lastName: 'Sidorov'\n          }\n        ],\n        meta: {\n          limit: 100,\n          offset: 0,\n          q: ''\n        }\n      },\n      params: {\n        order: 'asc',\n        limit: 10,\n        offset: 50\n      },\n      loading: false,\n      errors: null\n    }\n  }\n};\n```\n\n# Inner structure\n\n## Strategies:\n\nThe strategy determines which part of communication logic will be generated.\n\nAll strategy receives config as constructor param. Every strategy has unique params set but there is common config params for all of them:\n\n- namespace: string (required) - name of store namespace to be generated\n- actions: Array (optional) - array of custom actions\n- reducers: Array (optional) - array of custom reducers\n- sagas: Array (optional) - array of custom sagas\n\n### BaseStrategy\n\nThis strategy requires direct approach in communication generation. You must specify at least `namespace` and `branches` to get communication.\n\nAvailable `BaseStrategy` methods:\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- branches: Branch[](required) - array of `Branches` see below for more information\n\n#### .buildReducers()\n\nMethod to build reducers based on strategy config\n\n#### .buildInjector()\n\nMethod to build injector based on strategy config\n\n#### .buildSagas()\n\nMethod to build sagas based on strategy config\n\n### CRUDStrategy\n\nThis strategy predefines 2 namespace branches in `Redux`:\n\n1. Model\n2. Collection\n\nIt extends `BaseStrategy` so methods are similar\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- modelApiProviders: APIProvider[](required) - array of APIProviders connected to model store branch\n- collectionApiProviders: APIProvider[](required) - array of APIProviders connected to collection store branch\n- modelInitialState: StoreBranch (optional) - initial state for model branch\n- collectionInitialState: StoreBranch (optional) - initial state for collection branch\n\n### SimpleStrategy\n\nThis strategy predefines only one namespace branch `model` in `Redux`:  \nIt extends `BaseStrategy` so methods are similar\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- apiProvider: APIProvider[](required) - array of APIProviders connected to model store branch\n- initialState: StoreBranch (optional) - initial state for model branch\n\n## Class Helpers\n\nThere is an amount of classes to help you build you communication\n\n### APIProvider\n\nThis class contains provider for your API logic (request and so on)  \n**NOTE!** For each API provider you defined a saga will be generated\n\n#### constructor(type, handler, hooks)\n\n- type: string - string literal indicating type of performing action (can be any string you like)\n- handler: Function - function containing provider logic (ex. API call)\n- hooks (optional) - object containing different hooks for APIProvider each hook is function with following signature (response, payload, branchState, fullState) => any:\n\n  - response - handler call result\n  - payload - action payload\n  - branchState - current branch state\n  - fullState- full application state\n\n  Available hooks:\n\n  - responseFormatter - occur just after after handler call\n  - postSuccessHooks - occur after success action is dispatched\n  - postFailHooks - occur after fail action is dispatched\n  - preRequestHook - occur before API call\n  - clearParams (`boolean` flag) - if true clear StoreBranch params after success\n  - mapParams - allow you to map params to be passed into API call\n\n#### Example\n\n```typescript\nnew APIProvider('get', () => axios.get('/test'), {\n  responseFormatter: (response, payload, branchState, fullState) => response.map(item => response.test)\n});\n```\n\nThis `APIProvider` will generate a saga which send GET /test and apply `responseFormatter` to response\n\n### Branch\n\nThis class responsible for namespace branches in store\n\nAvailable `Branch` methods\n\n#### constructor(name, apiProviders, initialState)\n\n- name: string - branch name\n- apiProviders: APIProvider[] | APIProvider - array of connected to branch APIProviders\n- initialState: StoreBranch - initial state of branch\n\n#### .buildBranchReducers(namespace: string)\n\nBuilds reducers for store branch\n\n#### .buildBranchDispatchers(namespace: string)\n\nBuilds dispatchers for store branch\n\n#### .buildBranchSagas(namespace: string)\n\nBuilds sagas for store branch\n\n### StoreBranch\n\nHelper class for defining store branches, every store branch is instance of `StoreBranch`\n\nContains following fields:\n\n- data - main branch data\n- params - params for dispatchers\n- errors - branch errors\n- loading - progress of current async operation\n\n#### constructor(data, params, errors, loading)\n\n## Communication factory\n\nThis factory contains functions for communications build:\n\n### buildCommunication\n\nBuild communication based on strategy provided. Return object containing:\n\n- namespace: string - namespace\n- branches: Branches[] - store branches\n- reducers - builded reducers (must be includes into application reducers)\n- sagas - builded sagas (must be included into application sagas)\n- injector - react HOC for injecting props into components (connect())\n\n**NOTE!** To make `injector` work correctly you must define interface describing injected props and pass it into `buildCommunication`\n\n### Example\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch } from '@axmit/redux-communications';\n\nexport interface ITestConnectedProps {\n  testNames: StoreBranch<string[], string>;\n  getTestNames(searchStr?: string): void;\n  clearTestNames(): void;\n}\n\nconst apiProvider = new APIProvider('get', () => axios.get('/test/names'));\nconst branches = [new Branch('names', apiProvider, new StoreBranch([]))];\n\nconst strategy = new BaseStrategy({\n  namespace: 'test',\n  branches\n});\n\nconst testCommunication = buildCommunication<ITestConnectedProps>(strategy);\n```\n\nIn this example `ITestConnectedProps` passed as generic param into `buildCommunication` for right types in injector;\n\n## !!!IMPORTANT Rules of IConnectedProps interfaces\n\nConnected props interface contains of 2 parts:\n\n- state branches - generates based on `Branch` amount you pass into strategy, for each branch injector will add property by following format `[namespace][BranchName]` .\n  - **Example** if namespace is `lines` and there is 2 branches: `[new Branch('model'), new Branch('collection')]` then there will be 2 properties injected by generated injector: `linesModel` and `linesCollection`\n- dispatchers - generates based on `APIProviders` amount plus `clear` dispatcher for each branch is generated automatically. For each `APIProvider` will be generated dispatcher by following format `[APIProviderType][Namespace][BranchName]`.\n\n  - **Example** if namespace is `lines`, branch is `new Branch('names', apiProviders)` and `apiProviders` are  \n     `typescript const apiProviders = [ new APIProvider('get', handler), new APIProvider('update', handler2) ]`  \n    Dispatchers to be generated will be  \n     `getLinesNames clearLinesNames updateLinesNames`\n\n## Toolset\n\nThis package also contains a toolset that simplifies your life.  \nFor example you can easy generate types for actions:\n\n```\ngetStartType('users', 'model', 'get') => USERS_MODEL_GET_TRY\ngetSuccessType('users', 'model', 'get') => USERS_MODEL_GET_SUCCESS\ngetFailType('users', 'model', 'get') => USERS_MODEL_GET_FAIL\ngetUpdateParamsType('users', 'model') => USERS_MODEL_UPDATE_PARAMS\n```\n\nAlso you can easily generate names for API provider methods\n\n```\ngetAPIMethodName('users', 'model', 'GET') => getUsersModel\n```\n\nMore examples see in: ./src/helpers.spec.ts\n\n## Types of actions\n\nactionsTypes - it's enum with base set of default actions.  \nAt at the moment it supports _init_, _clear_, _add_, _get_, _update_ and _delete_ types.\n\n## Sagas combinations\n\nIf you want to add sagas you can just add them directly in communication sagas array or in the root saga.\n\n````\nfunction* getEmptyCollection(action: any) {\n // Here you can use put to generate action or call to call any async funtions ...}\nfunction* getEmptyCollectionSaga() {\n const successActionType = getSuccessType(namespace, 'collection', actionsTypes.get); yield takeEvery(successActionType, getEmptyCollection);}```\n\nand then\n\n````\n\ncommunicationLine.sagas.push(getEmptyCollectionSaga());\n\n```\n\nor\n\n```\n\nexport default function\\* rootSaga(): any {  \n yield all([ getEmptyCollectionSaga(), ... ]);}\n\n````\n\n## Full example\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch, actionsTypes } from '@axmit/redux-communications';\n\nconst namespace = 'line';\n\nexport interface ILineModel {\n id: number; name: string;}\n\nexport interface ILinesConnectedProps {\n lineCollection: StoreBranch<ILineModel[], any>; lineModel: StoreBranch<ILineModel, any>; getLineCollection(params: any): void; clearLineCollection(): void; getLineModel(id: number): void; updateLineModel(id: number, data: ILineModel): void; clearLineModel(): void;}\n\nconst collectionApiProvider = new APIProvider(actionsTypes.get, (): Promise<ILineModel[]> => axios.get(`/lines`));\nconst modelApiProvider = [\n new APIProvider(actionsTypes.get, (id: number): Promise<ILineModel> => axios.get(`/lines/${id}`), { responseFormatter: (response, payload, branchState, fullState) => response.map(model => model), postSuccessHook: (response, payload, branchState, fullState) => console.log('post success'), postFailHook: (response, payload, branchState, fullState) => console.log('post fail') }), new APIProvider(actionsTypes.update, (id: number, data: ILineModel): Promise<ILineModel> => axios.put(`/lines/${id}`, data))];\n\nconst branches = [new Branch('collection', collectionApiProvider, new StoreBranch([])), new Branch('model', modelApiProvider)];\n\nconst strategy = new BaseStrategy({\n namespace, branches});\n\nexport const communicationLine = buildCommunication<ILinesConnectedProps>(strategy);\n````\n\n## Troubleshooting\n\n1. Make sure the following dependencies match:\n\n- \"react\": \"^16.8.6\",\n- \"react-redux\": \"^6.0.1\",\n- \"redux\": \"^4.0.1\",\n- \"redux-saga\": \"^1.0.1\"\n","readmeFilename":"README.md","gitHead":"1381c9ac0a0a869c2235180f79b46d388924e92d","_id":"@axmit/redux-communications@4.1.1-beta.2","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"axmit-engineers","email":"engineers@axmit.com"},"dist":{"integrity":"sha512-zbV7ti+DV3tk2nKesPmYzXxpC/21oOvAdGXu6wVDyonvdDvH6AA/9Bo6rxK4E0CwVsESkRxQip/R6awhq9NTww==","shasum":"47b6e4e1ef4520caae17341ca278852d0ed7c4a1","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-4.1.1-beta.2.tgz","fileCount":44,"unpackedSize":157463,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5nNECRA9TVsSAnZWagAAVzAP/2+XG96LiktrIhzcyxmM\n4KvDi+TYhVyvwjY5Ogv19j7LF/qs11DdX7CcIYVsSO6N0j3RD1uTeHg929ft\nPh9PpsdiwPzcRMyACrH/gzsiVbe+N93+pjTu6TpGKVbyoeJB2txG/4Gw+lSi\n7slexIrUYfx1WH4+0nwiDHovfVNWHYqYyR83zlDXmKfnE0PqV4RE7cAV67HQ\n+hCGptgh9JbhcW9NMpJSBXdTEZOskN9aq68s5pmtkj/z8MFFX9p/K1skQy8S\n8iRu47toVIWle3gqBg77jZQQjte9p9fkmS9cvTwQOQcmSVl/BDtLXqJnacUi\nK7rQMsakUqgnUbyavXwQSDVD6WD+DF/pQ13igQsGisKWSkdHcxi4JzFketNC\nSV2yOPRh5iQZh/zqfq0hQQRY4PfMT+M9newqBW3cU6xGL0mNJW7wW8x5yyXj\nx+sSqYJvK0NiEFMCjYl/yBES199LK7FBlyX/0SlJJ6tAa2MIhJxmXVocYh5O\nF5CZq+VYEnYf9FP2QsqTPRZHKlPMth9fnB+rhUyzgOChZvpYua+yBwVdCwbr\ny0Rz7XX8itj+EVH9A4bBSQRxo4E+1+kfACePVahiNycqrQC9jn2EJ22xliNT\n9v2BueiOXRftCv4K7azdE2pELxgJtoNB06SkkovyLtvyxcvv0ugNgozelK9W\n7Cfj\r\n=ADef\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7NsS6TVQY0qXjJ0XvE64dKeBwLIrawFMtZ/GA5veyzgIhAPTQ3v+6BEoX2rr324xgQ2xapNiaW85y3O9OBIOA3VG7"}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_4.1.1-beta.2_1558606659338_0.8097367448006132"},"_hasShrinkwrap":false},"4.1.1":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"4.1.1","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"e84d386bf0c1d7095d0fcea3d9bee3292b596e82","_id":"@axmit/redux-communications@4.1.1","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"axmit-engineers","email":"engineers@axmit.com"},"dist":{"integrity":"sha512-XvWoUC+XviVBTbQPW126MqL0KWSNHyPqIDw/DF8NDgLcsElHKOmY3Or0gUWY9GscEKY92J06oZldoFmsfV2HCw==","shasum":"882690d25fcf6bee97a52742905f3b818d50fc7f","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-4.1.1.tgz","fileCount":44,"unpackedSize":157456,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5n+5CRA9TVsSAnZWagAAC/4QAIFk41/QTw+ozEN7azc+\n3Im8n/9Hwj2NruaRmRzFhhswB06yKT+4oYmnLjvwXKn+Y0UPBj3PO0rCQayH\neD38i8tBpbtmJp2clL1rpI0whvF0HOF6kGfcyhOnga4NXFH9xRrvdjtR8Cpa\ndbjhYq8+ycycqyYd110S80w+M2oYmAK/9Fy2zSfMv7WhuM6R0ql+Apv7JbeJ\nyzFPheLnr9KX1ZNt9BNdWuS4lZUkUqLzgUEKqlBQ32YRR+/tiLEyJeWGbZug\n1a1RC59qCjmOo7r7gJFMkY/R8JDIAl5KTkDTVZE82/oNj73HWcS5kfJ3n3TB\nUeEd2T1OQVdeyNZ58PSL8/vXq6BRJLoEVHE8V/yFWAYNTyTD8zkFFvo8XqU+\n7c1wClZFK6E9pfEh6UHy5VrRyKHkk3qHHk6rx0k5RUF4n3yj8dIj32g64+RC\nC8Ta9cB+VD2fNxlTQ8PkqurTvNmFR9arYxmPJXQHE1HArKmIYzqDbzLfDMio\nP/TPNzNTCcDsgdCli+bX3yA++6eItt76b9wbu1sfrm0412E6zVDL++T8d37P\nCOQbKXUZs8ZkcRABuFCbMKqT1MNG42W8KgdkO+sreYM5JtMmlOzAKHXp1S+2\n9PQ6v94jrTZL7jNv/zOPYtOK3zSW6VJ5kpLPv6mcyFOSqyHcUVpCdRHXyZB+\nfytC\r\n=vSCE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCHlPfoBBmsNxnNB4i+aYO5qCx59WhC6Dy1Q8+x/Etv+QIhALqb3AsZ0qe9v3VB6tbGzYdsM86R9QDJrIbNAugkVod7"}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_4.1.1_1558609848030_0.7394273733991517"},"_hasShrinkwrap":false},"4.1.2":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"4.1.2","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"be25b6579660c72894883b74c951dc2916241490","_id":"@axmit/redux-communications@4.1.2","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"axmit-engineers","email":"engineers@axmit.com"},"dist":{"integrity":"sha512-2j7VV3yuAicv/3LoE8zrFLSUvKFq1ZfFQK7GC/k/NXmvsmBjPiCWN0UESGpGeW5sZJr6GfVkkIpNETSKKxsuzw==","shasum":"b1d8f4eeb721ecef5ccf3695d3560425a57663f7","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-4.1.2.tgz","fileCount":44,"unpackedSize":157444,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc8Pt2CRA9TVsSAnZWagAA7SgP+wcKFFSLItEzKSTTTxLJ\nzRXA9Pmgaa26K1Zv+3UebfEZXm6e264BqstuiXAJVb4C1JTCkXXGMDDNn31H\nE/fjV6IAw9giHSTQXO6sWHERPjlfmSPa7e54nbg+stuH1Xv93iUL2xsZf87d\nSE1/tCT1vOzqQp+lwQgfTLyBRh87IYt9mokY4DuHifCKI049rYcgroJK+n5Q\nJCDFK0ieq6IaSiPMJkTmvI0fBKhKG1JmV1UrzkzZAabuMF/Y5H7aXlDtrc5p\n1kOSoJ6C+MgX2FMTSK0emAfNnwxjTJD8TD366xPImuEnoSOQurhYPeNq38XV\nEW1m0s28MQWoZwfLz9KPBNz9CgZrWC3fjQXuxO39E28NEU2VkLncPvtIrGbw\n6XQpLD+oWYgeox5UCNUrAi+XaMofSMu3xlIi7guYft3vles1sQpjWQf3K3dK\nqU+0rm3eGO+NKLy4XD/jf88BQZKwEbEWDzkU9qNK2f2qZFr7azCFiO1jZdSW\nFoOxqvTzUMaFvrLuPg9+qI7YZLa091NAT080mOfRPwv18Srt9gaiezFHVi3o\neOVFEVKnEe3D06xN/nRq1sgbm+WWb9+KfonCFZlhuUkC7uAzdN8Z5D6z/3gR\nxdiSI+2MZ7Q/x6CMKAH7ivwEv8olvEXQQ3LycmqGQ2uKZwrWbR1TjXyFqLeC\nROKK\r\n=o+bB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBuwFMtfdvaOunj3/BDLUcEo0gYQCs8AW9ZHsw6FwIqDAiBj1Ylcpd7Cj4l2j7UWnLUHPe3IklFRKmRFdc5Om8D6Gg=="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_4.1.2_1559296885797_0.7017403916489475"},"_hasShrinkwrap":false},"3.3.6":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"3.3.6","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push && yarn build","test":"mocha -r ts-node/register  **/src/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@axmit/client-models":"^1.0.3","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"35209e1370bffac56a8a318fec83345e55b9a1b5","_id":"@axmit/redux-communications@3.3.6","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-Pmfle/UPHPY/1eG/yn2AMShY/Q0Nz6XRN31/i9GAgNCH9JF4Q4cXDmU1Js/v0V3AakQI2P0sq1i3kwMPwjmH/w==","shasum":"d7c6ce95eda65f4657c8f2a3d7dd182e12871e19","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-3.3.6.tgz","fileCount":43,"unpackedSize":165620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdO/xmCRA9TVsSAnZWagAAVTYP/0RMfappn3QQt8H08mNF\nxNMjJMXBeK45gadznnPTaB1BU1b6z/8OepR3TgzgNk2EQZ55b2B2N9hLnESE\nbXffjzee4+/J2FOGE3qQ6SsPS6OfGPP9zO4bRrF7KqAhn++KYGgcqjfJa0hD\nnrl220rG3aLHm9s2Dru29xSirVi2fTa6uIAB6Qx3qa+ZyJaIeLcsNw1an6Rn\n3hMELSNOGXTA1BD2THOM1Hmsxw1eb50+Uy81m86DGE2MvTOPAi1nKTG0/ySY\n8RIpSS8SPOdeI4LUO3XnolglO8XEOLicP28rS3Ts2Fnt6Z0uhRP7yN/Yuver\nXBW5PWwdh56LGqpxt7oSB6hMNeWsedBbWs0A5XqnyqhAoA9F6fQLq8exbNt+\nrB7T5eP7CyEqwhFEyTBH1m0RbHPOuVt8HAgR1NM9vx8B8iWZrmgTc6v3Kqou\nFlx+4YVcQuTG79L34nWqrebm1pwGTvC9/VPsKa+26gyhwK6EEqrGQQvHtM66\nqMCo4sipxgoILe54EvYbGVFkaFEA3NF2cX3pPAdGtnlmgcYKqtRGUVuSykyX\nYOW2ej9E6n8Lf+6BRae/zXFfhGMqFv6rz9KOJ4Gzeu9kDxN4vOLukvt1nyY4\n+Ojzz7Gh+l6ol7AySgonme3HtFZlAvsrSYzCLgIaqp9FSGfkoxQ40AgjHmCN\nDEwt\r\n=sXqc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAXy2k0LRYQ/lfAuKxsgJ3VJEqm47wZLnXUpyucbACMmAiB+N/D2FKji39mnig8KzN8n67W/krOHUa0hTY7gSS1gPQ=="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_3.3.6_1564212325401_0.08010951086555029"},"_hasShrinkwrap":false},"4.1.3-beta.0":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"4.1.3-beta.0","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","readme":"# Redux communications\n\nThis package provides a toolset to simplify working with redux and saga libs.\n\n## Installation\n\n`npm i @axmit/redux-communications` or `yarn add @axmit/redux-communications`\n\n## Quick start\n\nTo create a new communication you should do the following:\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch, actionsTypes } from '@axmit/redux-communications';\n\nconst namespace = 'line';\nexport interface ILinesConnectedProps {\n lineCollection: StoreBranches<[], any> getLineCollection(params: any): void; clearLineCollection(): void;}\n\nconst apiProvider = new APIProvider(actionsTypes.get, Promise<any> => axios.get(`/lines`));\nconst branches = [new Branch('collection', apiProvider, new StoreBranch([])]\n\nconst strategy = new BaseStrategy({\n namespace, branches})\n\nconst communicationLine = buildCommunication<ILinesConnectedProps>(strategy);\n```\n\nAfter that you will have a communication that contains base set of reducers, actions. You can easily setup it as usual.\n\n```\n//Sagas setup\nexport default function* rootSaga(): any {\n yield all([ ...communicationLine.sagas ]);}\n//Reducers setup\nconst reducers = {\n ...communicationLine.reducers };\n```\n\nCommunication also contains `injector` for adding generated dispatchers and store branches to components\n\n```typescript\nimport React from 'react';\nimport { ILinesConnectedProps } from './linesCommunication';\n\nclass TestComponent extends React.Component<ILinesConnectedProps> {\n //Component logic goes here}\n\ncommunicationLine.injector(TestComponent);\n```\n\n## Detailed explanation\n\nThe idea of this package is to provide a simple way (toolset) of generating event publishers and subscribers.\n\n### **!!! _IMPORTANT_ !!!**\n\n> If you want to understand this module completely you should be familiar with publisher-subscriber pattern (https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern). > Because in fact this pattern underlies for Redux/Saga communication.\n\nIn fact we have:\n\n1. event publisher\n   - actions - common example for generating events\n2. event subscriber reducer\n   - reducer - common example for handling events and update the store\n   - saga - handlers that can be used for side effects and generating new event\n\nActually each async action consists of 3 actions:\n\n1. Start action - triggered to start execution of async call\n2. Success action - called if action finished with success\n3. Fail action - called if action finished with fail\n\nWe can use reducers to update the store depending on action type and use sagas to generate some actions depending on results of other actions.\n\nFor example we can handle _USER_MODEL_GET_SUCCESS_ action and after that generate action _TASK_COLLECTION_GET_START_ to start getting collection of tasks for current user.\n\n## Store structure:\n\nThe store consists of namespaces that are divided into branches. Each branch contains 4 fields:\n\n1. Data - data for this branch\n2. Loading - status of data loading of this branch\n3. Errors - errors for branch if there are any\n4. Params - params that are provided in the start action  \n   For more details see implementation in ./src/buildReducer.ts\n\n#### Example:\n\nNamespace - user  \nBranches - model, collection\n\n```typescript\nstore = {\n  user: {\n    model: {\n      data: {\n        data: {\n          id: 1,\n          firstName: 'Ivan',\n          lastName: 'Tershukov'\n        },\n        meta: {\n          lastLoginAt: '01.01.19 12:00'\n        }\n      },\n      params: 1, // id of current model\n      loading: false,\n      errors: null\n    },\n    collection: {\n      data: {\n        data: [\n          {\n            id: 1,\n            firstName: 'Ivan',\n            lastName: 'Tershukov'\n          },\n          {\n            id: 2,\n            firstName: 'Yana',\n            lastName: 'Banina'\n          },\n          {\n            id: 3,\n            firstName: 'Mike',\n            lastName: 'Sidorov'\n          }\n        ],\n        meta: {\n          limit: 100,\n          offset: 0,\n          q: ''\n        }\n      },\n      params: {\n        order: 'asc',\n        limit: 10,\n        offset: 50\n      },\n      loading: false,\n      errors: null\n    }\n  }\n};\n```\n\n# Inner structure\n\n## Strategies:\n\nThe strategy determines which part of communication logic will be generated.\n\nAll strategy receives config as constructor param. Every strategy has unique params set but there is common config params for all of them:\n\n- namespace: string (required) - name of store namespace to be generated\n- actions: Array (optional) - array of custom actions\n- reducers: Array (optional) - array of custom reducers\n- sagas: Array (optional) - array of custom sagas\n\n### BaseStrategy\n\nThis strategy requires direct approach in communication generation. You must specify at least `namespace` and `branches` to get communication.\n\nAvailable `BaseStrategy` methods:\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- branches: Branch[](required) - array of `Branches` see below for more information\n\n#### .buildReducers()\n\nMethod to build reducers based on strategy config\n\n#### .buildInjector()\n\nMethod to build injector based on strategy config\n\n#### .buildSagas()\n\nMethod to build sagas based on strategy config\n\n### CRUDStrategy\n\nThis strategy predefines 2 namespace branches in `Redux`:\n\n1. Model\n2. Collection\n\nIt extends `BaseStrategy` so methods are similar\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- modelApiProviders: APIProvider[](required) - array of APIProviders connected to model store branch\n- collectionApiProviders: APIProvider[](required) - array of APIProviders connected to collection store branch\n- modelInitialState: StoreBranch (optional) - initial state for model branch\n- collectionInitialState: StoreBranch (optional) - initial state for collection branch\n\n### SimpleStrategy\n\nThis strategy predefines only one namespace branch `model` in `Redux`:  \nIt extends `BaseStrategy` so methods are similar\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- apiProvider: APIProvider[](required) - array of APIProviders connected to model store branch\n- initialState: StoreBranch (optional) - initial state for model branch\n\n## Class Helpers\n\nThere is an amount of classes to help you build you communication\n\n### APIProvider\n\nThis class contains provider for your API logic (request and so on)  \n**NOTE!** For each API provider you defined a saga will be generated\n\n#### constructor(type, handler, hooks)\n\n- type: string - string literal indicating type of performing action (can be any string you like)\n- handler: Function - function containing provider logic (ex. API call)\n- hooks (optional) - object containing different hooks for APIProvider each hook is function with following signature (response, payload, branchState, fullState) => any:\n\n  - response - handler call result\n  - payload - action payload\n  - branchState - current branch state\n  - fullState- full application state\n\n  Available hooks:\n\n  - responseFormatter - occur just after after handler call\n  - postSuccessHooks - occur after success action is dispatched\n  - postFailHooks - occur after fail action is dispatched\n  - preRequestHook - occur before API call\n  - clearParams (`boolean` flag) - if true clear StoreBranch params after success\n  - mapParams - allow you to map params to be passed into API call\n\n#### Example\n\n```typescript\nnew APIProvider('get', () => axios.get('/test'), {\n  responseFormatter: (response, payload, branchState, fullState) => response.map(item => response.test)\n});\n```\n\nThis `APIProvider` will generate a saga which send GET /test and apply `responseFormatter` to response\n\n### Branch\n\nThis class responsible for namespace branches in store\n\nAvailable `Branch` methods\n\n#### constructor(name, apiProviders, initialState)\n\n- name: string - branch name\n- apiProviders: APIProvider[] | APIProvider - array of connected to branch APIProviders\n- initialState: StoreBranch - initial state of branch\n\n#### .buildBranchReducers(namespace: string)\n\nBuilds reducers for store branch\n\n#### .buildBranchDispatchers(namespace: string)\n\nBuilds dispatchers for store branch\n\n#### .buildBranchSagas(namespace: string)\n\nBuilds sagas for store branch\n\n### StoreBranch\n\nHelper class for defining store branches, every store branch is instance of `StoreBranch`\n\nContains following fields:\n\n- data - main branch data\n- params - params for dispatchers\n- errors - branch errors\n- loading - progress of current async operation\n\n#### constructor(data, params, errors, loading)\n\n## Communication factory\n\nThis factory contains functions for communications build:\n\n### buildCommunication\n\nBuild communication based on strategy provided. Return object containing:\n\n- namespace: string - namespace\n- branches: Branches[] - store branches\n- reducers - builded reducers (must be includes into application reducers)\n- sagas - builded sagas (must be included into application sagas)\n- injector - react HOC for injecting props into components (connect())\n\n**NOTE!** To make `injector` work correctly you must define interface describing injected props and pass it into `buildCommunication`\n\n### Example\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch } from '@axmit/redux-communications';\n\nexport interface ITestConnectedProps {\n  testNames: StoreBranch<string[], string>;\n  getTestNames(searchStr?: string): void;\n  clearTestNames(): void;\n}\n\nconst apiProvider = new APIProvider('get', () => axios.get('/test/names'));\nconst branches = [new Branch('names', apiProvider, new StoreBranch([]))];\n\nconst strategy = new BaseStrategy({\n  namespace: 'test',\n  branches\n});\n\nconst testCommunication = buildCommunication<ITestConnectedProps>(strategy);\n```\n\nIn this example `ITestConnectedProps` passed as generic param into `buildCommunication` for right types in injector;\n\n## !!!IMPORTANT Rules of IConnectedProps interfaces\n\nConnected props interface contains of 2 parts:\n\n- state branches - generates based on `Branch` amount you pass into strategy, for each branch injector will add property by following format `[namespace][BranchName]` .\n  - **Example** if namespace is `lines` and there is 2 branches: `[new Branch('model'), new Branch('collection')]` then there will be 2 properties injected by generated injector: `linesModel` and `linesCollection`\n- dispatchers - generates based on `APIProviders` amount plus `clear` dispatcher for each branch is generated automatically. For each `APIProvider` will be generated dispatcher by following format `[APIProviderType][Namespace][BranchName]`.\n\n  - **Example** if namespace is `lines`, branch is `new Branch('names', apiProviders)` and `apiProviders` are  \n     `typescript const apiProviders = [ new APIProvider('get', handler), new APIProvider('update', handler2) ]`  \n    Dispatchers to be generated will be  \n     `getLinesNames clearLinesNames updateLinesNames`\n\n## Toolset\n\nThis package also contains a toolset that simplifies your life.  \nFor example you can easy generate types for actions:\n\n```\ngetStartType('users', 'model', 'get') => USERS_MODEL_GET_TRY\ngetSuccessType('users', 'model', 'get') => USERS_MODEL_GET_SUCCESS\ngetFailType('users', 'model', 'get') => USERS_MODEL_GET_FAIL\ngetUpdateParamsType('users', 'model') => USERS_MODEL_UPDATE_PARAMS\n```\n\nAlso you can easily generate names for API provider methods\n\n```\ngetAPIMethodName('users', 'model', 'GET') => getUsersModel\n```\n\nMore examples see in: ./src/helpers.spec.ts\n\n## Types of actions\n\nactionsTypes - it's enum with base set of default actions.  \nAt at the moment it supports _init_, _clear_, _add_, _get_, _update_ and _delete_ types.\n\n## Sagas combinations\n\nIf you want to add sagas you can just add them directly in communication sagas array or in the root saga.\n\n````\nfunction* getEmptyCollection(action: any) {\n // Here you can use put to generate action or call to call any async funtions ...}\nfunction* getEmptyCollectionSaga() {\n const successActionType = getSuccessType(namespace, 'collection', actionsTypes.get); yield takeEvery(successActionType, getEmptyCollection);}```\n\nand then\n\n````\n\ncommunicationLine.sagas.push(getEmptyCollectionSaga());\n\n```\n\nor\n\n```\n\nexport default function\\* rootSaga(): any {  \n yield all([ getEmptyCollectionSaga(), ... ]);}\n\n````\n\n## Full example\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch, actionsTypes } from '@axmit/redux-communications';\n\nconst namespace = 'line';\n\nexport interface ILineModel {\n id: number; name: string;}\n\nexport interface ILinesConnectedProps {\n lineCollection: StoreBranch<ILineModel[], any>; lineModel: StoreBranch<ILineModel, any>; getLineCollection(params: any): void; clearLineCollection(): void; getLineModel(id: number): void; updateLineModel(id: number, data: ILineModel): void; clearLineModel(): void;}\n\nconst collectionApiProvider = new APIProvider(actionsTypes.get, (): Promise<ILineModel[]> => axios.get(`/lines`));\nconst modelApiProvider = [\n new APIProvider(actionsTypes.get, (id: number): Promise<ILineModel> => axios.get(`/lines/${id}`), { responseFormatter: (response, payload, branchState, fullState) => response.map(model => model), postSuccessHook: (response, payload, branchState, fullState) => console.log('post success'), postFailHook: (response, payload, branchState, fullState) => console.log('post fail') }), new APIProvider(actionsTypes.update, (id: number, data: ILineModel): Promise<ILineModel> => axios.put(`/lines/${id}`, data))];\n\nconst branches = [new Branch('collection', collectionApiProvider, new StoreBranch([])), new Branch('model', modelApiProvider)];\n\nconst strategy = new BaseStrategy({\n namespace, branches});\n\nexport const communicationLine = buildCommunication<ILinesConnectedProps>(strategy);\n````\n\n## Troubleshooting\n\n1. Make sure the following dependencies match:\n\n- \"react\": \"^16.8.6\",\n- \"react-redux\": \"^6.0.1\",\n- \"redux\": \"^4.0.1\",\n- \"redux-saga\": \"^1.0.1\"\n","readmeFilename":"README.md","gitHead":"3d0bd86bc9a3df4e046f637a26487f8fe7a6c90d","_id":"@axmit/redux-communications@4.1.3-beta.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"axmit-engineers","email":"engineers@axmit.com"},"dist":{"integrity":"sha512-3rsGFOo+txEnklF4eApxuMVuFkAK4g4AiL82He2NLyXMnDf4ehd/R50KAAhcn74McBclfjJv8pOCkDKA3YvT3A==","shasum":"e1456b6d1114f5a1f72fe794dea8694198ac6b65","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-4.1.3-beta.0.tgz","fileCount":44,"unpackedSize":158034,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRCUcCRA9TVsSAnZWagAAHZcP/jp13e6QgO/Gl6cv4IKF\ncViiD06OGTITwgyps9zvECLi/U5ghhP+tmYRH3Jp9+souVYfWI6G4/COT5FD\nZw9aCQwHC6Gb9vKrbiQ6xt/YUhdxmrHJ97sCnvFZgu42JLMyN7FSC2/aTsjK\nrCq+iMUxkoY02pA4u4TMK1Yyqj9hUDIeYwkB6e36s71VHn/iXDHk50MtSB2a\ndSJhQe15bJ1HrQnJpFaUkhIP7gEPWihsxwvUDA5JOfRbTpFOfOL+cg3HYW90\nRivdt+dn85q9ABFWjRvQeOfmB+ph5mCAym1Ti4Nd17S0eokVdcNkE6ARexDR\nmDJ/z5pB0nmb2DzLwc/uuvOzVma2P98XjtpI8PKiLgZNVUWWKQLKYzjWawWd\nMCvE4Q5qQBunp2HTHw1qxKkGlc8mDNzWTeawDyukwijvBZpJ+lRX3PA6MzdE\njaeyDZx6U/jSxb+plu7cRa5J/eswDc+W3l19k5obNGIsA5FuK/RJDDJJpbGh\nzB9YwmJ8NyiXYlpgydDB6y5gTyNVyyS3eAmfbtmcs72j+3IzxaEhVoCq135M\nE5UC0ywa2NAXISoTLBOF+M8nGbIJHCDfkUcOEPX7SFNjxyDImn2qSnS5Yy5l\n3Bu3xyZJj8svQALO4/rbaw990+SZSqL+wsHwDmSqdhF4wSlrZQGeEmUlddtZ\nmVNw\r\n=gQzX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE/yYNEtEEDTnP9ZxHl1wPk0EPrvlNW7HaVEsqFLw9khAiEA4iqazdX0NIkwNhBHjkSgwQQIg4n4KW5pp4MW8GXP+dQ="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_4.1.3-beta.0_1564747035454_0.06501967137409204"},"_hasShrinkwrap":false},"4.1.3":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"4.1.3","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.3.3"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"214a934a65cff632324ed8cd2732a0c931022534","_id":"@axmit/redux-communications@4.1.3","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"axmit-engineers","email":"engineers@axmit.com"},"dist":{"integrity":"sha512-M25PjAVR4acXSVUpjX8gKJk3ox/O7GgZiBUI4hHf1wBmf0635awkIWObPTsKeNOSaYNp8bCbV5QcuitYmtW34g==","shasum":"d3b26cc403cf21ec36bb02967dca38986b04e693","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-4.1.3.tgz","fileCount":44,"unpackedSize":158027,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRCiQCRA9TVsSAnZWagAAwusP/3P8m/eGtgP2aZ6UXIpg\n/KWdaJUKkCt2+Udwu6u/hRkDWKbOXHsgqvO2G8dXM/vcR+ONDnAgaQhvy/2R\neRVHF/augQfRLencpbhosh81GVb9E5vJ8XRC62g6/wRtD4pybPgMaam1n0jc\n7QETTajGAutJsoPfDZsnCYfkC6SD63GyO31S1AsdPVdsOZOxBEuy18i++1MW\no4YWphWnpZy8hlwX5L3uyCYYZf9MzR+5WOsDTBf0ZWm7UAydngR98+vG/UUC\nTaAKgqu6rxPAOP0/MYN4Lzkd/8/ERcFxKCrwfjoakdv1XPFXWWvn0jtjSIHn\njwczdNKG14NR4GHo3ELyYSeoh66tZvZTVNeZGSS1OwSogqhXzYYActDl0L6o\nGUetvUHPN27eNfn2NN9zJqIq2Juy0celLq92aWyeD2O4cqRlDX/UPBPoh3Z+\nms2CFAk9XoVHbEdT6U9ycAXE2GLiHwParHJ3AUPfMOk4PO5+SB4fUfyIdVnH\niZpw7vW3CN4UKnF3nb7jghXz7UmN/5+WVTqSeSTDEgN7V3xlISgRkCHw39o0\nnfWiqFLvzAFyvTdkPWdK79vV8T0otyCkbEnXEnEghGqP4kxhLVvOQxpxyZEj\n6R5bJA3i6tG4UpTSVsc3OYO1b4g7GIJWl5drrcj6LBGvuSXAyGEc9VDHuDyV\nO0m6\r\n=Vx/d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIQC3QM90mtIyKDe4WaS55sb9r80xTIm9Qq52i7dRguD8oAIfertm7N7rVch+pWEfOVx04f9Nnuj7l+HI5jcEzcJBiw=="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_4.1.3_1564747918173_0.7754726956496456"},"_hasShrinkwrap":false},"5.0.1":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"5.0.1","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push & yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.6.2"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"0430aa7addbb6c5266a00191144d00a50d77d14f","_id":"@axmit/redux-communications@5.0.1","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-8BtNszo3UPShtxBwTrPQ7BDbTCFPL3T5o9hpybTkjs7/OjAFNi5gYQS7dhE8tVFE/LkeGVMngisff3smUNaHrw==","shasum":"a76dd62c42b28db53be5b6c6601c4bc45ce79e41","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-5.0.1.tgz","fileCount":56,"unpackedSize":176001,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdohPRCRA9TVsSAnZWagAAfPEP/0/74cEEkhUAIiEHwSg4\nz83MexRVtGgYOSroulveaKTCF5jiwBIFd5nFpTNW/IjTPGQhBUWdT2blpxjP\n+oW1ThI5AgIbgLVZ521s7YcvaBcpFdFQLoVLcKsMNUJDh7kYowJa3ZL2DG7F\nsDCu3hzoaSbalVB+BSfqcjuk1lVNjcQJ11P9XaQMeSZhG0h9SYHZJZIIuANb\n9aeHbgGbZ9vbLNHTLTKPSlxElIzTF8B6YSfWXQh+Iu4LVI3gBK+9B0p+BcOJ\nhR1LeVdwZzyl0meGzXQbh9El2gljMOIwlIgCMPFsRLTnpel+TeBvzQzLFDN7\nd2R9Fgvk5cV3+0Eqh6jSfw9GUZWPGUC2+0TGmfhgR+8Pp0GPUq7qHdn4iHjG\nvOU+knPjb3ljPwCLy/ixA1Coi2KEcx/KKiz8QH9JnhGYWjpWwPgIhTHQg8T1\nbjL/U+ArvBElyRA2eaqdsAtxwHDk9DyyAe0vGE2rwT0oz+aufnaDlZVo/sF3\nZbThBumvS7qf2n/GVqTWLePLjVQkRhyCaup+ZHyl9eRvJUd5679z8N/P/oMY\nLKC0RW4JngsFira4ToOFWWQP1+VLkgiDrcGbfU6jH7RHZ0+WXXLyOsUBIPyT\nO/L2BNYmjHy9YaMrzxL5xtSb8bSs64yvf1aLF5pNS+Uk0f7LFxLA7QK2Tpcx\nsYY9\r\n=iOZ9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD5/ZJ+FoahwVQHnLo7RXNsE5Sd3+3xgjhlKSdO8U5JqgIgftpO+cktCTZ3PhQyroozQhFRBYZ+8k8bILd1qVF8xY8="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_5.0.1_1570902992692_0.5025554814366495"},"_hasShrinkwrap":false},"1.0.0":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"1.0.0","description":"A toolset to simplify work with logging","homepage":"https://gitlab.axmit.com/axmit-npm/node-logger","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push & yarn build"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/node-logger.git"},"dependencies":{"log4js":"^5.3.0"},"devDependencies":{"typescript":"^3.6.2","tslib":"^1.10.0"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"f2a71a4508ff66b9a13b7311d4a1f25a09f5e41a","_id":"@axmit/redux-communications@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-923cqSh3hMXKHeUudUgr+04tLpCFgNX0YyOHLZ6OKYhiz7mviO9Fl2822Jzr4/reFmQCNmpoAyE67elSABK0QA==","shasum":"1a8c43e77420374664436d6e11fa238696adb919","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-1.0.0.tgz","fileCount":8,"unpackedSize":12599,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdybwTCRA9TVsSAnZWagAAqPcP/je+vfn99UGhevO5sUEi\naXLf3RAqJi6gEXkiQ6n2Mp8z2brKG7tag7xjJu8OeyPcU2HPiYh8C4WeD02d\n6wKyw1Dds75R0Fj8i6NKx3kQMKB7CyDYUjf8nnmqZZLzfX4+5RVToeSuFqfY\nhUJbtpdqmJgf9S2pKZ/uYe9A+2+O7KlTG9goM+kbxuhAn7NP6un2d+cdSc0P\nUjYxwAd+562OrVKOW2A7r1ltUQEbIb0FdeaUgt64u2z+bUxWaPWjCVf+dY9Y\noPMRSanySNeZkMu523j5F3J9FAnakPQk41KIs+AzWEsOP/yhtFRt07vnrUMJ\nmxTTYSFd1xnUZTp+OlASX8/2NLW2OKzo9WGr4WOo7Qb5BKMsx1BsDI69yWY4\nCrzsKBAykRA6YgWNpKYGUT6BqM5jDL10oyo+wfpkr7kKKet/y1PRkODcnm5Z\n9Gpm+Kyk8aCrV/OW3DLZXmrO/w+LIXguCqNIGgm/6/NPmnK73oLaCboT+2Ux\n7MbhKclpraUbmUx2F9ecU/nbVEODa+diVvLiSjUNJTIKoC03VOrt+ZJeQkIC\nGfq7fVrD7tVWVmgm/FN56OTEgyrtV61NvmT5E9S+pGetCf4guHPY3Lx2Vnuc\nhQz3dNxtTeuKnaLLvdVROPaJpJ1vJ96UOso94oO6I7Kk9HEK9QIBX24JkgVx\nyhUo\r\n=71eS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQaJidpAWWAWuO5SADxx1qCzgp+C7sxEP3TfNQ4s1NywIgbU7BI5QcCkNoVUOIKY6zJZAnG+tAy3XeI8X6grXjuVc="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_1.0.0_1573501970882_0.6462081838808236"},"_hasShrinkwrap":false},"5.0.4":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"5.0.4","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push & yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.6.2"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"2fa9632bfcee3ec96ce14fbaedee90ff7c7da60a","_id":"@axmit/redux-communications@5.0.4","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-0e3pEwmmI32rhnKdln76DweThNRmyX/mq6s4N+ppDTjCe2GfVDtCv74ViEJmyjUyE5QyOfckwM7Sn6AKpMjeOA==","shasum":"8aa81208ab535f2f9e449bab4ce28eaa011a228a","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-5.0.4.tgz","fileCount":56,"unpackedSize":176938,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzCO+CRA9TVsSAnZWagAA684P/1QTzc1daBC66zKHGnWj\njDbTkvciiOr7JjeAC4LxXqn9IaHs1WhLHRzBjWIAN76va0/A3m7Cn+fWOOWv\n4W7bUdCSUUQFqchrjX1ciLmsv+CbQ2ETYs9XwHzNiIakgLB7JiswkpQyhAwp\n/UNOR+oEaBSEehw3ubMRT8WX1/HwrE+M4dwoOSO+gNMZE/cKnkIdzTvsBtqn\ntR+byf09/rlIAio98aKDX+L39F/kwsz7e5oHu/cFtRl5MYmdWN4fx4qYGxSk\nmK5LOe3r4qXAYt3KDEzFNqiEClQpbtF104ev6J/9e5l6acitxAs23omEYC0Y\nMXMVsxiZQccyA7+sE4jQXsMMl+L4mr8fMzV0CC67v4OoxrEsbln6AVKwBz1N\nDYiZejkdkxpIUvJVFCFJDUtlQtFk2JyXFQfKWjNrH5V64cPE0yxEY8/32CoT\nJlA5R2GXfIB2uVIARuy3er7RN6RGbH1vBPFlcEyjqmCIQRD4qJOYOhX+g4jl\ngMJeo8aNFTwt8bOqWC9hwklapkCkvhtLsBG5VdtfDtuPFErPB+Cru3Q85jEk\nUlok0fgYxpPQ5K1Ie/d18H0L/lknNBIdD+A7cD+KQzqiQyx+W0qcDPW86SEh\nIePKQY6SmxCPkZnymOPSmbhLLdZCX8cfgxkgFHIEjNe3Op3kSjsDvf3zkrzT\nBTeC\r\n=7s22\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBgIC8kufuuf2slDH72ORMLrd1tkp89nCVkcH4iYVSZLAiAwLf7HnUtd+/DzMcUoAFN/sreLFl3RUUpUbPQtAg9qcg=="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_5.0.4_1573659581851_0.08298569832567537"},"_hasShrinkwrap":false},"5.1.3":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"5.1.3","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push & yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.6.2"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"b0163b05107f1d60b627f41ddcc66ea06905d060","_id":"@axmit/redux-communications@5.1.3","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-+JVPgSzvoOjUzPr7zPCiIOqxwqsI3k2sqoJ/UasertWq1EprTuRGiIHNyUXO/Ee3WuTOZNkt7Gp45Xp3EcdNtA==","shasum":"087f21ee2aa51f986e4a9aa0df99525ec2e9a53d","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-5.1.3.tgz","fileCount":56,"unpackedSize":177142,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1s45CRA9TVsSAnZWagAA9rsP/jpdWblSS3Dxfu9ciJ4v\nMJbI20cNzqJsOkJb4l/u+3psiOmRFQqnejrV+Bnq05yc8Y9Ms1+bNyLXYZV1\nYMYcx5s8uVxaKqRGOL8JEOUSAnNbEOyg8ZXoOJQvuDlRZggq4pF0SzTBHgwF\nZl2jEp5snVpl3s1caSDOmiWXac13OrrDKRBdh8AGhpJvGCTxEXmYKJ11si5H\ni6FdtnsYyZJ4jT/sQFUVxxqDQwNY6DVEEWmf77mxuTD3l2ZN37DC4bMjRtAh\nD7sYzMn3nvWkEWUzOSRtIIa0xunWkrqNoil4e0cXMCAw4gg80ZO0EpM8eJ67\n9PkiRHPOFFcgBzGvJzQNPy9/qAf2xHJ3Jdvdi0tFTPAaqhaLfrNhRaY4P+Y9\nw+WcH0+gXwBRTmJQk2z8PU7z0pZOpJ4aS0rvvVzg1KegcJqrjkvjCl0Ph8Oh\nv9jiYe14bBiBE2DMsqPYgnckdiSEJ7i8LgyCZf/sSDDWGC44pdV/tYy9GAzk\nJPAB88Na3IpvJ00yYHfVFbCkOt5IfU2V6dg5oGvfKiyNZNxwl0DCPJXhF0Fs\nKAYS4+/b1fyVDu6Kblsr1alyG7XzBSaEUXqxOxzgw09lK3Cp4n2Z5fI+JXjd\nodTm2sComCgPMQLqbCE64v1AMgbTLrkFJtNCh39vwnEjaSNaO2921XWjr420\niBWx\r\n=php6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZR6a0H8UM/x5WsUC84T6C0yza2qhjXBW6b32o46rFlAIhAJW1Y6W4TlUqLbkBourlrqzWXLGrdZc3s2XMZlrBtwcv"}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_5.1.3_1574358584835_0.19210588406148776"},"_hasShrinkwrap":false},"5.2.1":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"5.2.1","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push & yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1","@axmit/client-models":"^1.1.7"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.6.2"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"76c05e0c9d656cc5c70221632862d6c2211d2c66","_id":"@axmit/redux-communications@5.2.1","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-UJQGIFSQ1XthYZzYyMgckDl3kVrLkVXxEAChqHYEWzzG9H7VRbymj+at1ITqaSUimY3CUgYYYpQcEw2lFweHRQ==","shasum":"b9d6b6271bb08d4e1825986ef73d75c38e42f502","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-5.2.1.tgz","fileCount":59,"unpackedSize":179577,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeAdCPCRA9TVsSAnZWagAAqfAP/1ckNDjE51sKEKDzib2p\nvPELlMKT3ngVw9xxT3BjT1u9rLZ2PSmfhqt6tomHhqYaSak2s9asAZkHA8HL\nGBSwRWg+7RO1desrDCSjc1QO0SDbZx+96ieRa0rwe9a/KZBIfyVV10qnL8Bn\nhXWhjpCpPptRbcH5w1/s6Vmjzx71FO9QwgFj+pHa5e9ZhgH8OMWrwNKosP6s\nalPTbNXMu/uL1KNTHTzEpwEqvoNjrNajbkEMXPi3JVhvPlRKS0FIho0Oc0Qv\nZYrLj0B4RUuL8TVTCr0WokT3BTWOJUvD777DFslLzclwAZk+r8gPkSnjfPuO\nTri51uCoRf9h15dZemO8rmFhplOh3BIyL6Z8CIGKYJfw1PbaIhsHo3WfTPMd\ny/uGMeh+IbaJn2tEf3OKyJWTb0ciuBG+EcDdLMBItMMwEBysjVjmpnTUOibZ\n6VRUAeaFgK6DmEjblgRuN8iVJN4ABznDVYZOdAFZxDUtiKq6XhAj1ISZ0LzM\ntmEEigb3RgfzglM+P+n/H/Y7IF9R6LacZgWw/bhQUX5Pt3LYBi0n+0HKszvS\nZrtcjll75BZtKGetdrkarKLXXgio7wooKTmVj6Skanj3cy5kCSOs7Sv3F5QW\nysobqcmoj5LJfj/wiUgTBojYcJLhXsuhEOBwaSng9D1JVxfSQna7dMHt4TXh\noWuP\r\n=p4DE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAqzpFUILZkBxzkOfXuIIjPh0C8ldcodspomnliayPAWAiBZ1QeF0y9RiRaIlo9lCcEIkpL7HKfjd4plPI0NR2brhA=="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_5.2.1_1577177231012_0.33074129150146026"},"_hasShrinkwrap":false},"5.2.2":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"5.2.2","description":"A toolset to simplify work with redux and saga libs","homepage":"https://gitlab.axmit.com/axmit-npm/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push & yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git@gitlab.axmit.com:axmit-npm/redux-communications.git"},"dependencies":{"@types/react-redux":"^7.0.6","react":"^16.8.6","react-redux":"^6.0.1","redux":"^4.0.1","redux-saga":"^1.0.1","@axmit/client-models":"^1.1.7"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.6.2"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"71d228f86886c92c28f24f318d51c083d1ce386d","_id":"@axmit/redux-communications@5.2.2","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-aT64/VTDZxTTj9mxVtJ8PCOQ6JILUCeOo3o2U4+TuTM01tvSzPlaeUyUNqkHAMyo8b4fBHBs1Dsoqy4Ia/wbRw==","shasum":"bc34727dc0a8abe084e67ee143e49ebaf8ef9057","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-5.2.2.tgz","fileCount":59,"unpackedSize":179577,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeAdCqCRA9TVsSAnZWagAAHsAP/1EFaLJG5+TFpQ5Fgbrj\niama8Kal2iL4KdAJPeG31QqJDbQry7B3Xj2khYoClOQeePqj9VGktaZtyv0u\nRC327eUXhYVxq8yua8isuykilwj8DfHA/uVHcsv67jpdDqlmdIErHufzcIlh\nItm4ZsVI6b6Z0I5HcvjDtWbY0Y3DFHR/b+YXjJ2NXymvL65ECipZs8jpp+Av\nIQeKnpKQlLDtpcWsv9GmHdO8xc9I/9emc9T+buwXhwueJYea/hKg45Hgjq73\n/3GOreUDRrcpfWfruz1piCNnOD+W22f4L4x3a4voxL0ufmo2f/Tkg6C7JNU7\nfnUVlYbTETOh+/tEH9C5UB8dHAMSTyPUy5/rwdTKeKmB1XpoQ8C2v63+lG78\n39aVGqArio6T0r39MvCi8rCIHqVKXrRLOz6dzjKvec37zD7z7Ik7JljS5JSD\nhALVive1d1L9reB71ELAH3iGmK30o4wuJIQNWjckGpy1VPil2ijWOKT+grPl\njVUTq3+WbzjJB+ZzCiFZe+qZPynbfd/oBJMz7KMa7MF9fZLx3wP3J+c9WcJF\nGnHJVj7eRdkQijNwzrypSnOxl7/kV1PToaNff7u28XUBmlB0liVgFwPYbfx3\nBc8h8qewNqi9vERo9VDKUfovyhnNcBsVYf0MB2wNGpq/Js0nvZIzWd+1/Ymy\nPTIH\r\n=KwT5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBDIC1xErz/PTPI2vCi3ibq33KoSTF2VpGubQFW5NnxXAiEAnGg/staDJtQGdXxlVWUd0n3lqjI7Luqp0KsATPT3A5g="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_5.2.2_1577177257860_0.4380682479889324"},"_hasShrinkwrap":false},"6.0.0":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"6.0.0","description":"A toolset to simplify work with redux and saga libs","homepage":"https://github.com/itershukov/redux-communication","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push & yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git+ssh://git@github.com/itershukov/redux-communication.git"},"dependencies":{"react":"^16.12.0","react-redux":"^7.1.3","redux":"^4.0.5","redux-saga":"^1.1.3","@axmit/client-models":"^1.1.7"},"devDependencies":{"@types/react-redux":"^7.0.6","@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.6.2"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"c98ac8598ea1ddbbf40ad7e4064c40ed072d35eb","bugs":{"url":"https://github.com/itershukov/redux-communication/issues"},"_id":"@axmit/redux-communications@6.0.0","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-47sfhfX1MoZkCjQTnaFN6qgiRscbUnu/7xnC0/+dXwo9xsThWWzRJLIdX2sWp8edfZjFnLeKzJc7S9K5TLVfdg==","shasum":"95cdf0f0328b14667734f3e4be0dc6ef7078948f","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-6.0.0.tgz","fileCount":104,"unpackedSize":763523,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeNIcgCRA9TVsSAnZWagAAKUUQAKA8Me5jDcn1EH0yHInF\niMhrX6UPHu8XjrmANhTof7qiT6XUsuD2bC9cHQnvGLtVOJG8LJ+dxFGgm0pu\nNojCBS/EarChXSVhCs/jg1ocpD25Yqy4zIvwyDORLRDabGlUXQwR4OG+4zIu\n5oSQp7IQDQ5414McU1Qtgj/ebfuhZJFHTsm49C4NT72uGkWZT0oy4dMY+5Dg\no5PYy6Tea77rI6Q4oyCU3N0oTNGeJg8CheRJttG7Ntto/xYIWR35UO1b56xJ\noF+xE4qj/b0FILOYHEQauwY8uK/CkbFVb50wz+GhchakUexofSPVlPwv1bIo\n6QOpwrUgiZ8z5PqEbV4jmQYt2vM/XUKaI+vt2GoMWaelpG47i2+w7qLjCT9q\nClh+51Pqzpyk9VFoaDF89HIyeZzpOI+bR91zXDbBBLi0/A+nFnWQJC6v8QlE\nJJX1C/zez7DOF5v3f+TVsXTADDXa9hLMo1QF58Cf7+T6/AR5jAwWilYGmBMg\nibUrXa3PlmznER0RSkHYkW5RtUFMz0nmYfkXHakIfvqZPF4EjcOeJfR2x37i\nkRAlax0A95eKqxRi/ffHioMIcvXqWTzyajauJEhUS+eiQXER1Y1iTJoSBvs0\nyCpHhiwseyUPFDV/ZwsZ5BoquBMzJZuP0ade4n1Qvi8oNsGWeAJyhW/117zm\nIoX+\r\n=RNnx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBRxY6Aox3jriXiVuPeV8hXa6rk59eQPShaL3EJE2gJmAiEA7wsl26cMXjeJCu8IDnj1lgvcnKQ69MOIrAsdVFJzaVA="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_6.0.0_1580500767656_0.06217247830730965"},"_hasShrinkwrap":false},"6.1.2":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"6.1.2","description":"A toolset to simplify work with redux and saga libs","homepage":"https://github.com/itershukov/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push & yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git+ssh://git@github.com/itershukov/redux-communications.git"},"dependencies":{"react":"^16.12.0","react-redux":"^7.1.3","redux":"^4.0.5","redux-saga":"^1.1.3","@axmit/client-models":"^1.1.7"},"devDependencies":{"@types/react-redux":"^7.0.6","@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.6.2"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"3b7ea7fb0cddb2581547da20b7a151e5a0e4fa76","bugs":{"url":"https://github.com/itershukov/redux-communications/issues"},"_id":"@axmit/redux-communications@6.1.2","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"dist":{"integrity":"sha512-NtgDZwDAd4XNCGK1REFUGCly9s5lNkFK9EELNTu+RU/q5u+c7LMn8WkN2I20o4s7C0CvluV0SFHCVTnsME2xZA==","shasum":"7c23d74c0d45a7686f8a2a93843607100f2bf465","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-6.1.2.tgz","fileCount":104,"unpackedSize":768164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeNZ1ICRA9TVsSAnZWagAAyQoQAJqGBJOy1lZprJGbM75+\nGkPpqWz+S8b6glU61+3ltr9ekY8/9ScwI9ayq78d8p6w+xu6F8kcBctLkW1V\nNehk8ACWrrjAMIEAyFvi8+15wxpT5Jv4TJ8JENyGHItmsrqK1RYw0bfIkuia\nvxArF5X60tPesLMiY3+2znYA1k8rxYRkSY2GZpqZBcCMqJ88j5CoTqGMZmtK\ngRctBr839Dxq6el/f4hw22IUtf0JFPrheXnR82jv4y1afHPuOm2c3rHZfvOZ\noI1M5aDGJ/z72MHLgt52wI2ABXm7fj1adi5gyA1VSvnBoe/lpAS8YY8t2f5S\nK5DXuOaHmgzz9VZkVcYC7NNUlwcFEMfnbVLA3e3EkoIFxddQIjCNTpVfVlq4\ncCl53yoZ9nqa5zyzUWceP7vpazhQmcmIZ1KhRSnW1qLD1mDeQvN8S/hdEVL5\nUXqRhi7vYG2jy0OIwwIwFtrZtvhgbf8GqrV4XysWbHXMkKR7GH1TJmu50JFT\nCnyaNXlBS3iiKWK+NjxBAYcfedHkxjqOs1BuH95P1Cv/89Glgn1+tgkXkOJM\nIBbxeajDflMq3CQ4/SV71SOQ3CMJo/et1By6D34Di4Jrx8Dzu7D0VxCNIJQw\n0aM317N7BuybjRouUaHW1BfG26JgJ+yddyXlFWJodAoIcqBE/KC3B/zJpigh\nqmv+\r\n=qiGs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8MiwocBu3RFwB1MyOfqOxGrXOZMqZKS727yM49LxN7gIgRgNj99L5nGXeXGbHGCLH/kLa/DC366Sjf/hOBLV0H2s="}]},"maintainers":[{"name":"axmit-boris","email":"boris@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"itersh","email":"ivan@axmit.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_6.1.2_1580571975873_0.903631888372934"},"_hasShrinkwrap":false},"6.1.5":{"author":{"name":"itersh"},"name":"@axmit/redux-communications","version":"6.1.5","description":"A toolset to simplify work with redux and saga libs","homepage":"https://github.com/itershukov/redux-communications","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf ./dist && tsc --declaration","prepublishOnly":"npm version patch && git push & yarn build","test":"mocha -r ts-node/register  **/src/**/*spec.*"},"repository":{"type":"git","url":"git+ssh://git@github.com/itershukov/redux-communications.git"},"dependencies":{"react":"^16.12.0","react-redux":"^7.1.3","redux":"^4.0.5","redux-saga":"^1.1.3","@axmit/client-models":"^1.1.7"},"devDependencies":{"@types/react-redux":"^7.0.6","@types/chai":"^4.1.7","@types/mocha":"^5.2.6","chai":"^4.2.0","husky":"^1.3.1","lint-staged":"^8.1.0","mocha":"^6.0.2","prettier":"^1.15.3","ts-node":"^8.0.2","typescript":"^3.6.2"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{tsx,jsx,ts,js,json,css,md}":["prettier --config .prettierrc --write","git add"]},"license":"ISC","gitHead":"92949223f83ce8d7811e5e64847625a68561042b","bugs":{"url":"https://github.com/itershukov/redux-communications/issues"},"_id":"@axmit/redux-communications@6.1.5","_nodeVersion":"12.14.1","_npmVersion":"6.14.7","dist":{"integrity":"sha512-+KQ5Hdi5KZy5hhWF38G/lcHMe7K1nLJfkjEWF33KaKWv9Ngddf7yPyeLd4j0/2EH/IDtJFYbRwxCyNnw/uQIYg==","shasum":"7c5c19a86addb6f8167bac3e0edf6f5f6aaf9771","tarball":"https://registry.npmjs.org/@axmit/redux-communications/-/redux-communications-6.1.5.tgz","fileCount":149,"unpackedSize":1249901,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmC/nCRA9TVsSAnZWagAAJQMP/Asm/sM5J0LDF3kxE5z+\n6FpfECISBqji7wA52kSA0T5zR3Y8bKLwr2Nq7PiQrO0V6TgFw2oB5QxCScLY\nyq4pvh8sdz4eLnuAFA4j0HCm4wAXJ+OJxFWFhkhUu0ufLSgnX7hZPYXfEYfW\ngQyJ0lwrw9cUbWDdFqEno+1LPEFEonJalnH9Efg9wnDVDYy/a5mn2DuaGm/w\nC81IWZrVIAzXqbYO9a577L6b8qVtVnX1JxWZNfKCCwfhC75wXxjw2FMLCbne\n5ekp+Ac7jWG3mOOvS77DGW2m67chimwgshoBBnYhXL1S8imiO6yP2ah8vC0l\nT1R3eRfA0oPnFITVkRr28JG9OajRn22QZAT3tWjuBaWNsjnTRWqBh5qVaT7R\ngyruD4sSV8If+V7Q7cPnAhIntiTkEFZ2yKHMyuBoig0qmqePMx3TKCQziUTs\nRlHXkaRYD4+aaNtYrZzTfn2do0RkFnAq8sJ2gd0yme4svQt1HGfyA2gaaAHH\nwP5gz+rfmW7zNZCLA4+qa+PKYkt2I8Qqoi4d3fd15SZtAOK6WP/ZnDRb1LRB\n9SDUw1SLdEsqb8liwTl4ODVAyS3MdP4cr4YuKuoNXuy/fWS3+nL1twjgFQvV\nrsZWiOTs4dUDIYckdHpfdNBLKlvtb/4MmHmcY3YwoJ8p6knsMJx6qpCcRmXl\nFYNt\r\n=aXyd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC4d6TTqac1MSm+uLEztFxW1mTVcLFjPmbQ1IRdQ6SNdAiEA/SOnoQpnpIXQA13gp/sq4Wf22cZg0jk9hRptb0AQYoo="}]},"maintainers":[{"name":"itersh","email":"ivan@axmit.com"},{"name":"axmit-engineers","email":"engineers@axmit.com"},{"name":"axmit-boris","email":"boris@axmit.com"}],"_npmUser":{"name":"itersh","email":"ivan@axmit.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-communications_6.1.5_1603809254690_0.2600860509183289"},"_hasShrinkwrap":false}},"time":{"created":"2019-02-08T10:04:40.783Z","1.0.5":"2019-02-08T10:04:40.909Z","modified":"2023-07-14T10:57:34.168Z","2.0.0":"2019-03-01T09:56:24.885Z","2.0.2":"2019-03-01T10:51:35.571Z","2.0.3":"2019-03-01T10:57:17.428Z","2.1.6":"2019-03-05T10:22:46.293Z","2.1.7":"2019-03-05T10:27:51.417Z","2.1.8":"2019-03-05T10:32:07.159Z","2.1.9":"2019-03-05T10:50:00.274Z","2.1.10":"2019-03-05T10:59:57.157Z","2.1.11":"2019-03-05T11:03:22.728Z","2.1.12":"2019-03-05T11:12:01.426Z","2.1.14":"2019-03-05T11:32:26.607Z","2.1.15":"2019-03-05T11:38:17.786Z","2.1.16":"2019-03-05T11:53:25.594Z","2.1.17":"2019-03-05T12:01:31.054Z","2.1.18":"2019-03-05T12:22:43.778Z","2.2.1":"2019-03-06T21:09:02.090Z","2.3.1":"2019-03-07T11:15:24.828Z","2.3.2":"2019-03-07T11:52:12.502Z","2.3.3":"2019-03-07T12:12:33.700Z","2.3.4":"2019-03-07T12:16:49.427Z","2.3.7":"2019-03-07T12:26:20.324Z","3.0.2":"2019-03-12T13:54:42.290Z","3.1.2":"2019-03-14T20:29:35.528Z","3.1.3":"2019-03-14T20:30:49.684Z","3.1.4":"2019-03-15T08:58:39.338Z","3.2.1":"2019-03-28T08:31:39.785Z","3.2.2":"2019-03-28T12:47:26.836Z","3.3.1":"2019-04-02T15:02:15.265Z","3.2.2-beta.0":"2019-04-02T15:04:49.088Z","3.2.2-beta.1":"2019-04-02T15:22:42.505Z","4.0.0-beta.0":"2019-04-02T18:28:39.737Z","3.3.2":"2019-04-02T18:30:10.002Z","4.0.0-beta.1":"2019-04-02T18:40:56.467Z","4.0.0-beta.2":"2019-04-02T18:58:26.850Z","4.0.0-beta.3":"2019-04-02T21:41:00.526Z","4.0.0-beta.4":"2019-04-02T22:21:36.119Z","4.0.0-beta.5":"2019-04-02T23:05:23.432Z","4.0.0-beta.6":"2019-04-02T23:25:57.394Z","4.0.0-beta.7":"2019-04-02T23:29:22.814Z","3.3.3":"2019-04-03T11:01:00.197Z","4.0.2":"2019-04-05T05:56:58.490Z","4.0.2-beta.0":"2019-05-14T18:44:51.545Z","4.0.3-beta.0":"2019-05-14T18:56:53.946Z","4.0.3-beta.1":"2019-05-14T19:07:44.867Z","4.0.3-beta.2":"2019-05-14T20:05:21.500Z","4.0.3-beta.3":"2019-05-15T00:28:07.884Z","4.0.3-beta.4":"2019-05-16T17:17:47.117Z","4.0.3-beta.5":"2019-05-17T09:31:35.737Z","4.0.3":"2019-05-17T18:48:17.096Z","4.0.4":"2019-05-17T20:30:04.325Z","4.1.0":"2019-05-23T07:43:06.595Z","4.1.1-beta.0":"2019-05-23T09:44:06.205Z","4.1.1-beta.1":"2019-05-23T10:15:07.997Z","4.1.1-beta.2":"2019-05-23T10:17:39.564Z","4.1.1":"2019-05-23T11:10:48.198Z","4.1.2":"2019-05-31T10:01:25.948Z","3.3.6":"2019-07-27T07:25:25.515Z","4.1.3-beta.0":"2019-08-02T11:57:15.623Z","4.1.3":"2019-08-02T12:12:00.151Z","5.0.1":"2019-10-12T17:56:32.808Z","1.0.0":"2019-11-11T19:52:50.993Z","5.0.4":"2019-11-13T15:39:42.005Z","5.1.3":"2019-11-21T17:49:45.022Z","5.2.1":"2019-12-24T08:47:11.132Z","5.2.2":"2019-12-24T08:47:38.012Z","6.0.0":"2020-01-31T19:59:27.827Z","6.1.2":"2020-02-01T15:46:16.033Z","6.1.5":"2020-10-27T14:34:14.927Z"},"maintainers":[{"email":"engineers@axmit.com","name":"axmit-engineers"}],"description":"A toolset to simplify work with redux and saga libs","homepage":"https://github.com/itershukov/redux-communications","repository":{"type":"git","url":"git+ssh://git@github.com/itershukov/redux-communications.git"},"author":{"name":"itersh"},"license":"ISC","readme":"# Redux communications\n\nThis package provides a toolset to simplify working with redux and saga libs.\nIt allows to:\n\n- reduce a large amount of code by specifying only the values should to be changed instead of using templated code\n- unify and standardize the store structure\n- simplify store management\n- simplify async action management\n\n## Installation\n\n`npm i @axmit/redux-communications` or `yarn add @axmit/redux-communications`\n\n## Online DEMO\n\n### TypeScript\n\nhttps://codesandbox.io/s/misty-fast-pzjno\n\n### JavaScript\n\nhttps://codesandbox.io/s/wispy-silence-qpn0r\n\n## Quick start\n\nTo create a new communication you should do the following:\n\n### JavaScript\n\n```typescript\nimport { taskTransport } from './task.transport';\nimport { CRUDStrategy, buildCommunication, StoreBranch } from '@axmit/redux-communications';\n\nconst namespace = 'task';\n\nconst strategy = new CRUDStrategy({\n  namespace,\n  transport: taskTransport\n});\n\nexport const taskCommunication = buildCommunication(strategy);\n```\n\n### TypeScript\n\n```typescript\nimport { taskTransport } from './task.transport';\nimport { CRUDStrategy, buildCommunication, StoreBranch } from '@axmit/redux-communications';\n\nexport interface INewTask {\n  title: string;\n}\n\nexport interface ITaskModel {\n  id: number;\n  title: string;\n}\n\nexport interface ITaskConnectedProps {\n  taskModel: StoreBranch<ITaskModel>;\n  taskCollection: StoreBranch<ITaskModel[]>;\n  addTaskModel(params: INewTask): void;\n  getTaskModel(id: number): void;\n  updateTaskModel(params: { id: number; data: INewTask }): void;\n  deleteTaskModel(params: number): void;\n  getTaskCollection(): void;\n}\n\nconst namespace = 'task';\n\nconst strategy = new CRUDStrategy({\n  namespace,\n  transport: taskTransport\n});\n\nexport const taskCommunication = buildCommunication<ITaskConnectedProps>(strategy);\n```\n\nAfter that you will have a communication that contains the base set of reducers, actions. You can easily setup it as usual.\n\n```\n//Sagas setup\nexport default function* rootSaga(): any {\n yield all([\n    ...communicationLine.sagas\n ]);\n}\n\n//Reducers setup\nconst reducers = {\n    ...communicationLine.reducers\n};\n```\n\nCommunication also contains `injector` for adding generated dispatchers and store branches to components\n\n```typescript\nimport React from 'react';\nimport { ILinesConnectedProps } from './linesCommunication';\n\nclass TestComponent extends React.Component<ILinesConnectedProps> {\n  //Component logic goes here\n}\n\ncommunicationLine.injector(TestComponent);\n```\n\n## Troubleshooting\n\n1. Make sure the following dependencies are synced between lib and your project:\n\n- \"react\"\n- \"react-redux\"\n- \"redux\"\n- \"redux-saga\"\n\n## Terms\n\nThe main entity of this package is StoreBranch. StoreBranch is required to store a part of application state.\n\nNamespace - group of StoreBranches.\n\nApiProvider - tool to link some external data source to a StoreBranch.\n\nStrategy - defines behavior for creating communication.\n\nCommunication - it's a generated combination sagas, reducers and actions that can be injected in a component.\n\nCommunication factory - function to build communication based on selected strategy\n\n## Detailed explanation\n\nThe idea of this package is to provide a simple way (toolset) of generating event publishers and subscribers.\n\n### **!!! _IMPORTANT_ !!!**\n\n> If you want to understand this module completely, you should be familiar with publisher-subscriber pattern (https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern). > Because in fact this pattern underlies the Redux/Saga communication.\n\nIn fact we have:\n\n1. event publisher\n   - actions - common example for generating events\n2. event subscriber reducer\n   - reducer - common example for handling events and updating the store\n   - saga - handlers that can be used for side effects and generating new event\n\nActually each async action consists of 3 actions:\n\n1. Start action - triggered to start execution of async call\n2. Success action - called if action finished with success\n3. Fail action - called if action finished with failure\n\nWe can use reducers to update the store depending on action type. Sagas are used to generate some actions depending on results of other actions.\n\nFor example, we can handle _USER_MODEL_GET_SUCCESS_ action and after that generate action _TASK_COLLECTION_GET_START_ to start getting collection of tasks for current user.\n\n## Store structure:\n\n### StoreBranch\n\nThe store consists of namespaces that are divided into branches. Each branch contains 4 fields:\n\n1. Data - data for this branch\n2. Loading - status of data loading of this branch\n3. Errors - errors for branch if there are any\n4. Params - params that are provided in the start action  \n   For more details see implementation in ./src/buildReducer.ts\n\n#### Example:\n\nNamespace - user  \nBranches - model, collection\n\n```typescript\nstore = {\n  user: {\n    model: {\n      data: {\n        userInfo: {\n          id: 1,\n          firstName: 'Ivan',\n          lastName: 'Tershukov'\n        },\n        userMeta: {\n          lastLoginAt: '01.01.19 12:00'\n        }\n      },\n      params: 1, // id of current model\n      loading: false,\n      errors: null\n    },\n    collection: {\n      data: {\n        data: [\n          {\n            id: 1,\n            firstName: 'Ivan',\n            lastName: 'Tershukov'\n          },\n          {\n            id: 2,\n            firstName: 'Bender',\n            lastName: 'Rodríguez'\n          },\n          {\n            id: 3,\n            firstName: 'Philip',\n            lastName: 'Fry'\n          }\n        ],\n        meta: {\n          limit: 100,\n          offset: 0,\n          q: ''\n        }\n      },\n      params: {\n        order: 'asc',\n        limit: 10,\n        offset: 50\n      },\n      loading: false,\n      errors: null\n    }\n  }\n};\n```\n\n# Inner structure\n\n## Strategies:\n\nThe strategy determines which part of communication logic will be generated.\n\nAll strategy receives config as constructor param. Every strategy has unique params set but there is common config params for all of them:\n\n- namespace: string (required) - name of store namespace to be generated\n- actions: Array (optional) - array of custom actions\n- reducers: Array (optional) - array of custom reducers\n- sagas: Array (optional) - array of custom sagas\n\n### BaseStrategy\n\nThis strategy requires direct approach in communication generation. You must specify at least `namespace` and `branches` to get communication.\n\nAvailable `BaseStrategy` methods:\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- branches: Branch[](required) - array of `Branches` see below for more information\n\n#### .buildReducers()\n\nMethod to build reducers based on strategy config\n\n#### .buildInjector()\n\nMethod to build injector based on strategy config\n\n#### .buildSagas()\n\nMethod to build sagas based on strategy config\n\n### CRUDStrategy\n\nThis strategy predefines 2 namespace branches in `Redux`:\n\n1. Model\n2. Collection\n\nIt extends `BaseStrategy` so methods are similar\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- modelApiProviders: APIProvider[](required) - array of APIProviders connected to model store branch\n- collectionApiProviders: APIProvider[](required) - array of APIProviders connected to collection store branch\n- modelInitialState: StoreBranch (optional) - initial state for model branch\n- collectionInitialState: StoreBranch (optional) - initial state for collection branch\n- transport: ICRUDTransport (optional) - transport that can be used to automatically generate API providers\n- branches: Branch[](optional) - array of Branches that can be used to extend base behaviour of CRUD strategy\n\n### SimpleStrategy\n\nThis strategy can be used for keeping UI data.\n\nThis strategy predefines only one namespace branch `model` in `Redux`:  \nIt extends `BaseStrategy` so methods are similar.\n\n#### constructor(config)\n\nInits strategy with passed configuration. Available fields\n\n- apiProvider: APIProvider[](required) - array of APIProviders connected to model store branch\n- initialState: StoreBranch (optional) - initial state for model branch\n- branches: Branch[](optional) - array of Branches that can be user to extend base behaviour ot CRUD strategy\n\n## Class Helpers\n\nThere is an amount of classes to help you build your communication\n\n### APIProvider\n\nThis class contains provider for your API logic (request and so on)  \n**NOTE!** For each API provider you defined a saga will be generated\n\n**!!! _IMPORTANT_ !!!**\n\nBy default before each async call of APIProvider the store will be cleared. To prevent this behavior use:\n`preRequestDataMapper`\n\n#### constructor(type, handler, hooks)\n\n- type: string - string literal indicating type of performing action (can be any string you like)\n- handler: Function - function containing provider logic (ex. API call)\n- hooks (optional) - object containing different hooks for APIProvider each hook is function with following signature (response, payload, branchState, fullState) => any:\n\n  - response - handler call result\n  - payload - action payload\n  - branchState - current branch state\n  - fullState- full application state\n\n  Available hooks:\n\n  - onStart - occur before API call\n  - onSuccesss - occur after success action is dispatched\n  - onFail - occur after fail action is dispatched\n  - mapSuccess - occur before success handler call\n  - mapFail - occur before fail handler call\n  - clearParams (`boolean` flag) - if true clear StoreBranch params after success\n  - mapParams - allow you to map params to be passed into API call\n  - preRequestDataMapper - allow you to map data that can be passed into store before API call\n  - throwOnFail - if true, error in transport will be thrown \n  - hydrateTo - allow hydrate response to an object\n\n#### Example\n\n```typescript\nnew APIProvider('get', () => axios.get('/test'), {\n  mapSuccess: (response, payload, branchState, fullState) => response.map(item => response.test)\n});\n```\n\nThis `APIProvider` will generate a saga which sends GET /test and apply `mapSuccess` to response\n\n### Branch\n\nThis class is responsible for namespace branches in store\n\nAvailable `Branch` methods\n\n#### constructor(name, apiProviders, initialState)\n\n- name: string - branch name\n- apiProviders: APIProvider[] | APIProvider - array of APIProviders connected to branch\n- initialState: StoreBranch - initial state of branch\n\n#### .buildBranchReducers(namespace: string)\n\nBuilds reducers for store branch\n\n#### .buildBranchDispatchers(namespace: string)\n\nBuilds dispatchers for store branch\n\n#### .buildBranchSagas(namespace: string)\n\nBuilds sagas for store branch\n\n### StoreBranch\n\nHelper class for defining store branches, every store branch is instance of `StoreBranch`\n\nContains the following fields:\n\n- data - main branch data\n- params - params for dispatchers\n- errors - branch errors\n- loading - progress of current async operation\n\n#### constructor(data, params, errors, loading)\n\n## Communication factory\n\nThis factory contains functions for communications build:\n\n### buildCommunication\n\nBuild communication based on strategy provided. Return object containing:\n\n- namespace: string - namespace\n- branches: Branches[] - store branches\n- reducers - builded reducers (must be includes into application reducers)\n- sagas - builded sagas (must be included into application sagas)\n- injector - react HOC for injecting props into components (connect())\n\n**NOTE!** To make `injector` work correctly you must define interface describing injected props and pass it into `buildCommunication`\n\n### Example\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch } from '@axmit/redux-communications';\n\nexport interface ITestConnectedProps {\n  testNames: StoreBranch<string[], string>;\n  getTestNames(searchStr?: string): void;\n  clearTestNames(): void;\n}\n\nconst apiProvider = new APIProvider('get', () => axios.get('/test/names'));\nconst branches = [new Branch('names', apiProvider, new StoreBranch([]))];\n\nconst strategy = new BaseStrategy({\n  namespace: 'test',\n  branches\n});\n\nconst testCommunication = buildCommunication<ITestConnectedProps>(strategy);\n```\n\n## Async dispatching\n\nIf you need to check that action has finished in a component you can check that loading state was changed OR use async dispatcher.\n\n### Example\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch } from '@axmit/redux-communications';\n\nexport interface ITestConnectedProps {\n  testNames: StoreBranch<string[], string>;\n  getTestNames(searchStr?: string): Promise<string[]>;\n  clearTestNames(): void;\n}\n\nconst apiProvider = new APIProvider('get', () => axios.get('/test/names'));\nconst branches = [new Branch('names', apiProvider, new StoreBranch([]))];\n\nconst strategy = new BaseStrategy({\n  namespace: 'test',\n  branches\n});\n\nconst testCommunication = buildCommunication<ITestConnectedProps>(strategy);\n```\n\nand then in a component:\n\n```\n...\nasync componentDidMount(){\n  try{\n    const result = await this.props.getTestNames();\n  }  catch(e){\n    // Do something\n  }\n\n}\n...\n\n```\n\nIn this example `ITestConnectedProps` passed as generic param into `buildCommunication` for right types in injector;\n\n## !!!IMPORTANT Rules of IConnectedProps interfaces\n\nConnected props interface contains 2 parts:\n\n- state branches - generates amount you pass into strategy based on `Branch` , for each branch injector will add property by following format `[namespace][BranchName]` .\n  - **Example** if namespace is `lines` and there is 2 branches: `[new Branch('model'), new Branch('collection')]` then there will be 2 properties injected by generated injector: `linesModel` and `linesCollection`\n- dispatchers - generates based on `APIProviders` amount plus `clear` dispatcher for each branch is generated automatically. For each `APIProvider` will be generated dispatcher by following format `[APIProviderType][Namespace][BranchName]`.\n\n  - **Example** if namespace is `lines`, branch is `new Branch('names', apiProviders)` and `apiProviders` are  \n     `typescript const apiProviders = [ new APIProvider('get', handler), new APIProvider('update', handler2) ]`  \n    Dispatchers to be generated will be  \n     `getLinesNames clearLinesNames updateLinesNames`\n\n## Toolset\n\nThis package also contains a toolset that simplifies your life.  \nFor example you can easy generate types for actions:\n\n```\ngetStartType('users', 'model', 'get') => USERS_MODEL_GET_TRY\ngetSuccessType('users', 'model', 'get') => USERS_MODEL_GET_SUCCESS\ngetFailType('users', 'model', 'get') => USERS_MODEL_GET_FAIL\ngetUpdateParamsType('users', 'model') => USERS_MODEL_UPDATE_PARAMS\n```\n\nAlso you can easily generate names for API provider methods\n\n```\ngetAPIMethodName('users', 'model', 'GET') => getUsersModel\n```\n\nMore examples see in: ./src/helpers.spec.ts\n\n## Types of actions\n\nactionsTypes - it's enum with base set of default actions.  \nAt at the moment it supports _init_, _clear_, _add_, _get_, _update_ and _delete_ types.\n\n## Sagas combinations\n\nIf you want to add sagas you can just add them directly in communication sagas array or in the root saga.\n\n```\nfunction* getEmptyCollection(action: any) {\n // Here you can use put to generate action or call to call any async funtions ...}\nfunction* getEmptyCollectionSaga() {\n const successActionType = getSuccessType(namespace, 'collection', actionsTypes.get);\n\n yield takeEvery(successActionType, getEmptyCollection);\n\n}\n```\n\nand then\n\n```\ncommunicationLine.sagas.push(getEmptyCollectionSaga());\n```\n\nor\n\n```\nexport default function* rootSaga(): any {\n yield all([ getEmptyCollectionSaga(), ... ]);\n}\n```\n\n## Full example\n\n```typescript\nimport { APIProvider, Branch, BaseStrategy, buildCommunication, StoreBranch, actionsTypes } from '@axmit/redux-communications';\n\nconst namespace = 'line';\n\nexport interface ILineModel {\n  id: number;\n  name: string;\n}\n\nexport interface ILineCollectionParams {\n  limit: number;\n  offset: number;\n}\n\nexport interface ILinesConnectedProps {\n  lineCollection: StoreBranch<ILineModel[]>;\n  lineModel: StoreBranch<ILineModel>;\n  getLineCollection(params: ILineCollectionParams): void;\n  clearLineCollection(): void;\n  getLineModel(id: number): void;\n  updateLineModel(id: number, data: ILineModel): void;\n  clearLineModel(): void;\n}\n\nconst collectionApiProvider = new APIProvider(\n  actionsTypes.get,\n  (params: ILineCollectionParams): Promise<ILineModel[]> => axios.get(`/lines`)\n);\nconst modelApiProvider = [\n  new APIProvider(actionsTypes.get, (id: number): Promise<ILineModel> => axios.get(`/lines/${id}`), {\n    mapSuccess: (response, payload, branchState, fullState) => response.map(model => model),\n    onSuccess: (response, payload, branchState, fullState) => console.log('post success'),\n    onFail: (response, payload, branchState, fullState) => console.log('post fail')\n  }),\n  new APIProvider(actionsTypes.update, (id: number, data: ILineModel): Promise<ILineModel> => axios.put(`/lines/${id}`, data))\n];\n\nconst branches = [new Branch('collection', collectionApiProvider, new StoreBranch([])), new Branch('model', modelApiProvider)];\n\nconst strategy = new BaseStrategy({\n  namespace,\n  branches\n});\n\nexport const communicationLine = buildCommunication<ILinesConnectedProps>(strategy);\n```\n\n## Builders full example\n\n```\nimport { put } from 'redux-saga/effects';\nimport { StoreBranch } from '../models/StoreBranch';\nimport { getStartType } from '../helpers';\nimport { actionsTypes } from '../enums';\nimport { CommunicationBuilder } from './CommunicationBuilder';\nimport { APIProviderBuilder } from './APIProviderBuilder';\nimport { APIProviderGroup } from './APIProviderGroup';\nimport { APIProvider } from '../models/APIProvider';\n\nexport interface IAccountConnectedProps {\n  accountExternalCollection: StoreBranch<AccountWidgetCollectionModel>;\n  accountItem: StoreBranch<AccountModel>;\n  getAccountExternalCollection(collection: AccountWidgetCollectionModel): void;\n  clearAccountExternalCollection(): void;\n  getAccountItem(id: number, collections?: string[]): void;\n  updateAccountItem(data: IAccountUpdateInput): void;\n  clearAccountItem(): void;\n  accountCollection: StoreBranch<AccountListCollection>;\n  getAccountCollection(collection: AccountListCollection): void;\n  initAccountCollection(): void;\n  accountDashboard: StoreBranch<DashboardAccount[]>;\n  getAccountDashboard(entityId: number): void;\n  accountExternalItem: StoreBranch<PendingExternalAccount>;\n  getAccountExternalItem(id: number): void;\n  approveAccountExternalItem(id: number): void;\n  declineAccountExternalItem(id: number): void;\n  clearAccountExternalItem(): void;\n  approveAccountFiles(paths: string[]): void;\n}\n\nfunction* redirect() {\n  yield put(push('/#pending-external-accounts'));\n}\n\nfunction* updateExternalItem(response: any, payload: any, branchState: any, fullState: any) {\n  yield put({ type: getStartType('account', 'externalItem', actionsTypes.get), payload: fullState.account.externalItem.params });\n}\n\nconst externalItemAPIProviders = APIProviderGroup.create()\n  .afterSuccess(redirect)\n  .add(builder =>\n    builder\n      .setType('approve')\n      .setHandler(accountTransport.approveExternalAccount)\n      .hydrateTo(Test)\n      .build()\n  )\n  .add(builder =>\n    builder\n      .setType('decline')\n      .setHandler(accountTransport.declineExternalAccount)\n      .build()\n  )\n  .build();\n\nconst collectionAPIProviders = APIProviderGroup.create()\n  .add(builder =>\n    builder\n      .setType(actionsTypes.get)\n      .setHandler(accountTransport.requestList)\n      .clearBranchParams()\n      .build()\n  )\n  .add(builder =>\n    builder\n      .setType('actionsTypes.init')\n      .setHandler(async () => new AccountListCollection())\n      .build()\n  )\n  .build();\n\nconst itemAPIProviders = APIProviderGroup.create()\n  .add(builder =>\n    builder\n      .setType(actionsTypes.get)\n      .setHandler(accountTransport.requestItem)\n      .build()\n  )\n  .add(builder =>\n    builder\n      .setType(actionsTypes.update)\n      .setHandler(accountTransport.updateItem)\n      .build()\n  )\n  .build();\n\nconst { reducers: accountReducers, sagas: accountSagas, injector: accountInjector } = new CommunicationBuilder()\n  .setNamespace('account')\n  .addBranch(\n    'externalCollection',\n    APIProviderBuilder.create()\n      .setType(actionsTypes.get)\n      .setHandler(accountTransport.requestExternalAccountsCollection)\n      .clearBranchParams()\n      .build(),\n    new AccountWidgetCollectionModel(new AccountWidgetFilterModel(true))\n  )\n  .addBranch('externalItem', [\n    ...externalItemAPIProviders,\n    new APIProvider(actionsTypes.get, accountTransport.requestPendingExternalItem)\n  ])\n  .addBranch(\n    'files',\n    APIProviderBuilder.create()\n      .setType('approve')\n      .setHandler(accountTransport.approveFiles)\n      .afterSuccess(updateExternalItem)\n      .build()\n  )\n  .addBranch('item', itemAPIProviders)\n  .addBranch('collection', collectionAPIProviders, new AccountListCollection())\n  .addBranch('dashboard', new APIProvider(actionsTypes.get, accountTransport.getDashboardAccounts), [])\n  .addSaga(accountChange())\n  .addSaga(accountApplicationChange())\n  .build<IAccountConnectedProps>();\n\nexport { accountReducers, accountSagas, accountInjector };\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/itershukov/redux-communications/issues"}}