{"_id":"@condor-labs/ec-events-gateway","_rev":"13-a3e6905017edbb4b5b59134de8ecd1be","name":"@condor-labs/ec-events-gateway","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"@condor-labs/ec-events-gateway","version":"1.0.0","description":"Client to send events to events gateway API","main":"index.js","scripts":{"test":"jest --watch ./src ./","coverage":"jest --env=jsdom --coverage"},"repository":{"type":"git","url":"git+https://github.com/cebroker/ec-applications.git"},"author":{"name":"Condorlabs"},"license":"ISC","bugs":{"url":"https://github.com/cebroker/ec-applications/issues"},"homepage":"https://github.com/cebroker/ec-applications/tree/master/ec-events-gateway-client#readme","keywords":["helpers","condorlabs"],"dependencies":{"@hapi/joi":"15.0.3","axios":"0.19.0","date-fns":"1.30.1","dotenv":"8.0.0","joi":"14.3.1","winston":"3.2.1"},"devDependencies":{"chai":"4.2.0","jest":"24.8.0","sinon":"7.3.2"},"_id":"@condor-labs/ec-events-gateway@1.0.0","_nodeVersion":"8.11.2","_npmVersion":"6.9.0","dist":{"integrity":"sha512-mu3iHnhrEORjzEXmvrchb0AyJiR9bun1VZrmFeemCqLRUKQgWVyLLRBx32apAvjkI0l3yGc6vLj+VmtneN7E8w==","shasum":"3b7ba223b1ab91293f883522448296dc0e36b65d","tarball":"https://registry.npmjs.org/@condor-labs/ec-events-gateway/-/ec-events-gateway-1.0.0.tgz","fileCount":27,"unpackedSize":73578,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdEnz8CRA9TVsSAnZWagAAHCQP/jxRHxncqub1z2yvJ1oR\nh4D9Qj8rtdeXD7XCLu5RlYA/0Kgyfq2ZwM1GdhCaL8Zafh202CzIq4mdPzsB\n+rZmDUESIChSzQpyADWZlrXT/a9MNmbvk+37JoHhJDI/YCGbAsloDV1qZjT5\nYh2QJ6/qiZDvqdkrmJuARfX2GcX/n61oJxfHOpRFweItKewnBTLObakgXlVh\nnnfGLPg0oSHs2vAY1Pf46hyfJI+NYEUYo4YUobbMIyBKwoak4lm0LDKLfxmq\nXReizifk2OgcfNpbG92e0YHdTLvvZHp+EURq1fXRa7yAzv/PPjtlyIBw27B9\nxrMFpywj3HX4+WqADAO+t7hpm729ATHo71FEi4YrkjDbz/hZbL8N49epw+vw\nXTgTwwVgph6Q5FxffsKLa9wCwf/rhauEqXASnhCTXl7duMyRmzL/pcxuLuaD\n3mUA/x+UGfLPFkvrgwWg8G4UHnMo2LBn9atDsM7FaPE64nhkkTmxBIjlY7Kg\n+AIe35gd/ONs5WnsGNulc8nQ98vsNezee/JT15dbzRfloQXRN3LqX4YNy0PR\n0sTMD8iTflgZGTACLsy+rcrY6NSWXsI3Mdv+HExKRrVcicdWmB1BtNwQs8lr\nwi0y9PFpaFBhWXrqFL0AMJJr84S72/6/S4ifL2ApT5MAUkApGKqB+Cx6Tq9P\nA9Ao\r\n=Lmio\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDsa6sfemBTW6JD5d5d9Vlmkjusu7Fxyo2NqHChyfi2bAiEAwd7C1ZCfN1cfLwkVL/ZUcOiJxlugb2jHbwVv/nLO6zw="}]},"maintainers":[{"name":"awilches","email":"alvaro.jose.w@gmail.com"},{"name":"hjimenez-condorlabs","email":"hjimenez@condorlabs.io"},{"name":"pjimenez","email":"pjimenez@condorlabs.io"},{"name":"federico-garcia","email":"federico.v.garcia@gmail.com"},{"name":"jorgesanes","email":"jorgesanes10@gmail.com"}],"_npmUser":{"name":"hjimenez-condorlabs","email":"hjimenez@condorlabs.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ec-events-gateway_1.0.0_1561492731594_0.6245902115566038"},"_hasShrinkwrap":false},"1.1.0":{"name":"@condor-labs/ec-events-gateway","version":"1.1.0","description":"Client to send events to events gateway API","main":"index.js","scripts":{"test":"jest --watch ./src ./","coverage":"jest --env=jsdom --coverage"},"repository":{"type":"git","url":"git+https://github.com/cebroker/ec-applications.git"},"author":{"name":"Condorlabs"},"license":"ISC","bugs":{"url":"https://github.com/cebroker/ec-applications/issues"},"homepage":"https://github.com/cebroker/ec-applications/tree/master/ec-events-gateway-client#readme","keywords":["helpers","condorlabs"],"dependencies":{"@hapi/joi":"15.0.3","axios":"0.19.0","date-fns":"1.30.1","dotenv":"8.0.0","joi":"14.3.1","winston":"3.2.1"},"devDependencies":{"chai":"4.2.0","jest":"24.8.0","sinon":"7.3.2"},"_id":"@condor-labs/ec-events-gateway@1.1.0","_nodeVersion":"8.11.2","_npmVersion":"6.9.0","dist":{"integrity":"sha512-aEGsAbebY+v2VnIMhQHnsOXal15LzubdFEPxyJb0sGPOkee+8DjBhrwMf2iGNvkQb+wSwSYeXQ5ZMjzJcnsrDQ==","shasum":"788df9fdea20eb232b9a215938e18b2ef919efe0","tarball":"https://registry.npmjs.org/@condor-labs/ec-events-gateway/-/ec-events-gateway-1.1.0.tgz","fileCount":35,"unpackedSize":168366,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdG6hjCRA9TVsSAnZWagAAypwP/0MYPEC1TwtqoWYUSxpV\nH9u13SNVXnKv1Az29gcLjE74HcI96vJH7zufbOPGB29zCMtQHkCgTrgL52Ms\n03GgZNTUd/lt4Bheb7dPwv4438mASMm7pNGo1p9bJcyVczlpx3vDl1cZv3LX\n+EGmvpjeKMnu0+YFEZcsQRFdzaIucM/COY6aI+fIVvlMxwyHlCuv3pYWZY1Y\n/BoxV2r46ojaIq4BbEIZ15vSmyN9T6junfvkoTUHMXSd3dQgRML80TxqqwTa\ngtS657wIoiuG9nNErvSnp9MbjABXhZ7/o6rAAOJVnSLcjLwaWFpUjiSuumSi\nOLNLelt9+JLF9dhrD0RVrVxEAvPKSIWWw14SfuYXeLavXa/G1t1e1ks9N9bm\nJpSiTv8cVFcegt+p7cCIRx0R3GkBuDDjG15kNb3X00BLhefKaYe8NcqVnkTx\nrozM5NshpWfW8qcxCzA35iVkBIKI6yO8627KdcL0kEmPcNVZ/IQm8iVGTPPY\nD2MFGT2bAaWiSLC7ZUcwb3V2GOnojDuxSi3hiQ3z3KwQCDSxad90G8Geb1Ck\n/gpOgyeDLuIni6en2nZRG/PUnYb6IiFe8L+xAv8m5rMT5kkYtJQcBf5nUwPt\nASjcxwOsVK9AT7oMo3rgHUOV7M8HGwVkkNHGsvTZp6gx/Jdg1Tjb0t5ymR1l\nmfW/\r\n=SgHl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID6JjEvN+Oa4t1OmvXDG2tvmKRWzN3ixYghlqpH/d4JnAiEAwg/Tgc8AnqG/EY80ebOcfQXcbPsjaIQgS5pY2sflzrI="}]},"maintainers":[{"name":"awilches","email":"alvaro.jose.w@gmail.com"},{"name":"federico-garcia","email":"federico.v.garcia@gmail.com"},{"name":"hjimenez-condorlabs","email":"hjimenez@condorlabs.io"},{"name":"jorgesanes","email":"jorgesanes10@gmail.com"},{"name":"pjimenez","email":"pjimenez@condorlabs.io"}],"_npmUser":{"name":"hjimenez-condorlabs","email":"hjimenez@condorlabs.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ec-events-gateway_1.1.0_1562093666740_0.9584432058091448"},"_hasShrinkwrap":false},"1.2.0":{"name":"@condor-labs/ec-events-gateway","version":"1.2.0","description":"Client to send events to events gateway API","main":"index.js","scripts":{"test":"jest --watch ./src ./","coverage":"jest --env=jsdom --coverage"},"repository":{"type":"git","url":"git+https://github.com/cebroker/ec-applications.git"},"author":{"name":"Condorlabs"},"license":"ISC","bugs":{"url":"https://github.com/cebroker/ec-applications/issues"},"homepage":"https://github.com/cebroker/ec-applications/tree/master/ec-events-gateway-client#readme","keywords":["helpers","condorlabs"],"dependencies":{"@hapi/joi":"15.0.3","axios":"0.19.0","date-fns":"1.30.1","dotenv":"8.0.0","joi":"14.3.1","winston":"3.2.1"},"devDependencies":{"chai":"4.2.0","jest":"24.8.0","sinon":"7.3.2"},"_id":"@condor-labs/ec-events-gateway@1.2.0","_nodeVersion":"8.11.2","_npmVersion":"6.9.0","dist":{"integrity":"sha512-xzxgCZGRhjZuxlYhSMKbYV2EyXnwrPsvoJ86LVbyykfon9Kj8KBIiMdeiEwET/1zSGI+t5znNPzqzHnJOyrTRg==","shasum":"0cacb5843caaa6fa14f7e7708a4b154109195250","tarball":"https://registry.npmjs.org/@condor-labs/ec-events-gateway/-/ec-events-gateway-1.2.0.tgz","fileCount":35,"unpackedSize":168386,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2DRkCRA9TVsSAnZWagAATIIQAIPDtXRyFqNY+vWR+JKM\nTTcLq+cQu/z51qTsitD33GklZCo0vVLWzW22BVQOX2b1+PO+cSibeweHw177\n9uog8tmn9GJ3JZW8kEJ8KSFqtVrTrmwxBkfHHsaT/brfna7s+1Rw9IAPKR5Y\nz2M1YmhD/V79r+1bi0v+gEPZSUpjcJMTcS/J1fSZyjT0fbYu1hyyYVzfuPTU\nyGAK0vCae109M/+PYTHG0CBrY7KAwbbOj0szURiOkTiw1ruCERAtB2HqJXoJ\nJHgBnEjCXdxm6lP453Dwxk85+mkAdUHfUnfq4a9+pR3LMHCPmpyyLrYUxZ99\nq7uAHavseRC2Jj9cpTtn68tfbW8e4GW4SEm0S1EVmqGgn577fzsGpQaL15fd\nPSXbPzZStqK5v+pTE79MYCATMRCIU0kbpgRToZhCigMgtN9HbAIDJX3B4fci\neR5QqoZw57idvXasaA9Hy97jVMNkwBxsyxs7vrpnghAlDIbeSOFdykYoJRMu\nyNPbhpfEh7TlFpNFPlSgt+B1HE1LBKdq9/fFeePcpjuGRtMoYMApCaG8XzHL\nizD0j67MdJtnj86PsBxSVVwgbnbbIfYuQqPB3hfRkwTcplwPTRaQXFC1jZmP\nrbXdhNabhnqblutzHFlZ4PgtOiCrydJjbdl0AX8DIGqM2uBuvE20PduHrWks\nRZ5T\r\n=+TCI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAgk0v+BCDpzO7vO1GWAR3GTiM4cF8as6TCO+loloUsBAiBtDMkTIb2T49X4j5em9lsBjDJ+6tnmM3ryey4jWf6x/g=="}]},"maintainers":[{"name":"awilches","email":"alvaro.jose.w@gmail.com"},{"name":"federico-garcia","email":"federico.v.garcia@gmail.com"},{"name":"hjimenez-condorlabs","email":"hjimenez@condorlabs.io"},{"name":"jorgesanes","email":"jorgesanes10@gmail.com"},{"name":"pjimenez","email":"pjimenez@condorlabs.io"}],"_npmUser":{"name":"hjimenez-condorlabs","email":"hjimenez@condorlabs.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ec-events-gateway_1.2.0_1562180072017_0.984492953602432"},"_hasShrinkwrap":false},"2.0.0":{"name":"@condor-labs/ec-events-gateway","version":"2.0.0","description":"Client to send events to events gateway API","main":"index.js","scripts":{"test":"jest --watch ./src ./","coverage":"jest --env=jsdom --coverage"},"repository":{"type":"git","url":"git+https://github.com/cebroker/ec-applications.git"},"author":{"name":"Condorlabs"},"license":"ISC","bugs":{"url":"https://github.com/cebroker/ec-applications/issues"},"homepage":"https://github.com/cebroker/ec-applications/tree/master/ec-events-gateway-client#readme","keywords":["helpers","condorlabs"],"dependencies":{"@condor-labs/axios":"1.2.3","date-fns":"1.30.1","dotenv":"16.3.1","joi":"17.9.2","winston":"3.9.0"},"devDependencies":{"chai":"4.3.7","jest":"29.5.0","mockdate":"3.0.5","sinon":"15.2.0"},"gitHead":"c7ab4c5445474973313d3ef6574ac4792b5bdb61","_id":"@condor-labs/ec-events-gateway@2.0.0","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-tK3dMLGvEJHGyNyyYadWzwmsmeKd2E5QrdFSrwscLSUIvdH1cI+qjRMpS1t/YTIC/nUGF9bBmvRrValmzqkraQ==","shasum":"378c261a7641500c59b988e6765875f337a0f956","tarball":"https://registry.npmjs.org/@condor-labs/ec-events-gateway/-/ec-events-gateway-2.0.0.tgz","fileCount":15,"unpackedSize":34259,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDs37PTEeZP95zvYWGcUD8GGLEzORuxQrySBXZy6doT0AIhAOnPHzee8RbmlPsEJxub1zUaanAO0XvZWGKh1e4EgPPL"}]},"_npmUser":{"name":"kevin.pedroza_condorlabs.io","email":"kevin.pedroza@condorlabs.io"},"directories":{},"maintainers":[{"name":"daniel.castillo","email":"daniel.castillo@condorlabs.io"},{"name":"kevin.pedroza_condorlabs.io","email":"kevin.pedroza@condorlabs.io"},{"name":"federico-garcia","email":"federico.v.garcia@gmail.com"},{"name":"jorgesanes","email":"jorgesanes10@gmail.com"},{"name":"hjimenez-condorlabs","email":"hjimenez@condorlabs.io"},{"name":"awilches","email":"alvaro.jose.w@gmail.com"},{"name":"jorgelozano95","email":"jlozano@condorlabs.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ec-events-gateway_2.0.0_1688745353360_0.8108362136762475"},"_hasShrinkwrap":false}},"time":{"created":"2019-06-25T19:58:51.400Z","1.0.0":"2019-06-25T19:58:51.763Z","modified":"2023-07-07T15:55:53.853Z","1.1.0":"2019-07-02T18:54:26.888Z","1.2.0":"2019-07-03T18:54:32.178Z","2.0.0":"2023-07-07T15:55:53.536Z"},"maintainers":[{"name":"daniel.castillo","email":"daniel.castillo@condorlabs.io"},{"name":"kevin.pedroza_condorlabs.io","email":"kevin.pedroza@condorlabs.io"},{"name":"federico-garcia","email":"federico.v.garcia@gmail.com"},{"name":"jorgesanes","email":"jorgesanes10@gmail.com"},{"name":"hjimenez-condorlabs","email":"hjimenez@condorlabs.io"},{"name":"awilches","email":"alvaro.jose.w@gmail.com"},{"name":"jorgelozano95","email":"jlozano@condorlabs.io"}],"description":"Client to send events to events gateway API","homepage":"https://github.com/cebroker/ec-applications/tree/master/ec-events-gateway-client#readme","keywords":["helpers","condorlabs"],"repository":{"type":"git","url":"git+https://github.com/cebroker/ec-applications.git"},"author":{"name":"Condorlabs"},"bugs":{"url":"https://github.com/cebroker/ec-applications/issues"},"license":"ISC","readme":" # Events Gateway Client\nLibrary to send messages through the events gateway service.\n\n## How to use it\nTo use the library you just need to follow the following steps Install the library with npm\n\n```npm install @condor-labs/ec-events-gateway```\n\nImport the library\n\n```const { events } = require('@condor-labs/ec-events-gateway');```\n\nwith ES6:\n\n``` import { events } from '@condor-labs/ec-events-gateway': ```\n\n### Enviroment variable\nDefine a variable in you **.env** file with the events gateway api URL with the following name:\n\n```EVENTS_GATEWAY_URL```\n\nThat's all you need to start to send data to the events gateway api.\n\nAs an alternative you can pass a events gateway api url as parameter:\n\n```events.save({payload, type, topic, schema, headers, url: 'http://localhost'});```\n\n### Required data\nTo send events through the events gateway client you must send some required fields:\n\n- type: string,\n- topic: string, \n- payload: object\n\n### Client Schema\n\n> @hapi/joi is not valid any more use [Joi](https://www.npmjs.com/package/joi) instead\n\nYou could define a valid Joi (Joi >= 17.9.2) schema to validate the events data you are sending to the events gateway service.\n\n**Example**\n```\nconst schema = {\n    firstName: Joi.number().required()\n};\n```\n\nYou can see more examples on the Joi API Documentation [Website](https://github.com/hapijs/joi/blob/v17.9.2/API.md).\n\nAnd then send this schema through the **save** function as parameter.\n\n```events.save({payload, type, topic, schema, headers, url: 'http://localhost'});```\n\n### Headers:\nYou should define headers to pass the apikey to the amazon services:\n```\nheaders: {\n    'x-api-key': 'value'\n}\n```\n\n### Payload max size\nPlease, be sure the payload data is less than **250kb**\n\n\n\n\n","readmeFilename":"Readme.md"}