{"_id":"@abdouhugo/autoresponders","_rev":"5-b3ac4dbb949ced248ee514859c6c51c1","time":{"created":"2022-11-16T17:38:31.912Z","0.0.1":"2022-11-14T11:45:26.083Z","modified":"2022-11-22T11:01:34.117Z","0.0.2":"2022-11-16T17:38:32.208Z","0.0.3":"2022-11-17T09:21:32.658Z","1.0.0":"2022-11-21T11:34:09.577Z","1.1.0":"2022-11-22T11:01:33.980Z"},"name":"@abdouhugo/autoresponders","dist-tags":{"latest":"1.1.0"},"versions":{"0.0.2":{"name":"@abdouhugo/autoresponders","version":"0.0.2","author":{"name":"hugo abdou"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/hugo-abdou/autoresponders.git"},"type":"commonjs","main":"./dist/src/index.js","types":"./dist/src/index.d.ts","scripts":{"clean":"shx rm -rf dist/*","build":"tsc","watch":"tsc --watch","test":"mocha --ui qunit","testall":"mocha --ui qunit dist/test","prepack":"npm run clean && npm run build"},"devDependencies":{"@types/lodash":"^4.14.149","@types/mocha":"^7.0.2","@types/node":"^13.11.1","mocha":"^7.1.1","shx":"^0.3.2"},"dependencies":{"axios":"^1.1.3","lodash":"^4.17.15","tsc":"^2.0.4","typescript":"^4.8.4"},"gitHead":"d1295d9d63ed7a0302f72c4c6e6441776955e364","description":"## Install","bugs":{"url":"https://github.com/hugo-abdou/autoresponders/issues"},"homepage":"https://github.com/hugo-abdou/autoresponders#readme","_id":"@abdouhugo/autoresponders@0.0.2","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-ZfYa3zhmTlPDYUosiQJYgp1sfrObx65UWBfab0AMsZjjgC/neMVl9K839/AGNmVrMGUKLMG+LqOm1qnuT+nRww==","shasum":"9ede34d525aeab075e58ddac2d88839331a19fe9","tarball":"https://registry.npmjs.org/@abdouhugo/autoresponders/-/autoresponders-0.0.2.tgz","fileCount":41,"unpackedSize":56350,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCesL7RlDNm/YBhRvmM0sPR8VpIYs/74tlKef8+w4m9CgIhAL1bQaoBFDjN25PaUYkVBhY4uFaKRkLfL8sL92yRJZNH"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdSAYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrP8hAAigbmYQTRz7DcVL81TCpffXzzZrUtTziL3JL2ihdvW9whlzC4\r\nq32RLvcdnDK4FWj5xE/C8KNPrfuUCyws2vfuWhwZqTuC1EWDELkZthcu/xkG\r\nKGikBMANZ2pOqAnPwF+QWevZG88b8u/2E2Env3QiVXuF6G3n20K2QxwLqSVx\r\nxlQOr+/hgI7oQrQ+LVH3T3oeOA/MvKukPq48ciPsYeVMeBJpo6cCdgCFz0Rf\r\nC1NO//lFPYkgBHBPFVlkQR7YiWKlVryXmD0tTMtLGU1+tSASzEkMDXAKrL9h\r\not3TEusBHaN7Ad5VQBxQ1nwsnyEt2dDUmwKQyWs8qNezkq+s6Bl5nd6lByFn\r\nTg3rARbpJJQfTSskiRj1jC/HPnM+SAv2D3uIHTl+oVoPnekuxEEaw5hrAX04\r\njGuTMq1C3kYs52/m7yrkJnTcutleZLh/ed0MIRfgamDujw3RGbzZnhJVORre\r\nW5748fK55MzJJIJyca50w17M6zXd12mhgpMOARUOGzqmHtzG4F6Bopad5rea\r\nS1WdxSJP7yLR3lggVx8KMujGrAIHsZe7wRqfW8kxJGwqSHhNb6XBJTmHOl6/\r\nLQ8qdk/lbZztE8DT/f+VMkIFqZi0ajel+IvDGUi24buTURcQZ9K68eWVT9gI\r\nXGPW95jAe20hdu9VnMi5hzIXEoawuhYj8xg=\r\n=k7yW\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"abdouhugo","email":"moikinge3@gmail.com"},"directories":{},"maintainers":[{"name":"abdouhugo","email":"moikinge3@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/autoresponders_0.0.2_1668620311991_0.2774218895397784"},"_hasShrinkwrap":false},"0.0.3":{"name":"@abdouhugo/autoresponders","version":"0.0.3","author":{"name":"hugo abdou"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/hugo-abdou/autoresponders.git"},"type":"commonjs","main":"./dist/src/index.js","types":"./dist/src/index.d.ts","scripts":{"clean":"shx rm -rf dist/*","build":"tsc","watch":"tsc --watch","test":"mocha --ui qunit","testall":"mocha --ui qunit dist/test","prepack":"npm run clean && npm run build"},"devDependencies":{"@types/lodash":"^4.14.149","@types/mocha":"^7.0.2","@types/node":"^13.11.1","mocha":"^7.1.1","shx":"^0.3.2"},"dependencies":{"axios":"^1.1.3","lodash":"^4.17.15","tsc":"^2.0.4","typescript":"^4.8.4"},"gitHead":"d1295d9d63ed7a0302f72c4c6e6441776955e364","description":"## Install","bugs":{"url":"https://github.com/hugo-abdou/autoresponders/issues"},"homepage":"https://github.com/hugo-abdou/autoresponders#readme","_id":"@abdouhugo/autoresponders@0.0.3","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-84gdtzn8aQkgheo8lgSUyyPs9zBokulm9BR+/Bot2IeT5rI2+6qA5+2rBz36XlmMMXOxyf5+NCsqij95HJADLw==","shasum":"f2f47eeed5e5ef926ac978a6e709d0abb9921701","tarball":"https://registry.npmjs.org/@abdouhugo/autoresponders/-/autoresponders-0.0.3.tgz","fileCount":41,"unpackedSize":56467,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAXi8RuHCkFPeR8SY23uKRX9EqMtEuUVCaVaODzSqgyQAiBjYLYaNYhYvBgRnnVApRLkSLF397eAUqylBug9VDpVdw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdf0cACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo3hA//b1J6XBWS2CBVolLOPm6wTP7bNjRvFrECONfSubD1cEElCxr2\r\nIc5JlaHvJqBo9ZmQYQiAWhFZ+M97ka2z7yyqM/iniPdwYtbwfsaxQ4G25hW8\r\nZKalmp9z/2R+NNC6xCY69yb884y4QpnUiivKfJOTytiE1W8O4fI7zorXinXK\r\nfGE6MQEc8MSHK4ES9tcfP+p5KdJJVh0yeXjASgSxiqAr4squxknt3JmcXcHN\r\nlbd6TeM4NGD1HaFySB3l3IsqBNCd6iWeqiFSWcCBwsWkZguQaaMsUehcrK91\r\nzurhAQHV6KHPlbbspdw3RLwDRdKjAR+K8XcQujEA0rHJXRjy9KDeLqY4e4nm\r\nUpfl82N5fROAEHnA1SlMzGAKTH2KthTxh9WD8kLnAft6SJ8MlHu3N+u/hD1A\r\n1lcl0AIf3rmpUA51uaKOXeo9Bh2tBfvZFZB5H5KCcUOd9r1hIua4hgSF2Qz8\r\nfPDsnBuBSKrq/h3SXATH2Jpz+WmiRwe+hYsWVj7tT5Sc+mwHrs1i2T0GTa6D\r\nBwRNTSHfdzhGsaSNjXxa51OEunuOSq67ZR9r5MwZ82K7VXOEwEqXDYrtjJwh\r\nvN99bvJCrqWasvPaKW/nDbSo7nT+3QRgo4kAgjlng3y072idUuP/63ukgiQ8\r\nnBlcsZfvoUs3anewZZVInrCpkibCNOPwPbw=\r\n=bB1q\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"abdouhugo","email":"moikinge3@gmail.com"},"directories":{},"maintainers":[{"name":"abdouhugo","email":"moikinge3@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/autoresponders_0.0.3_1668676892421_0.636920995487896"},"_hasShrinkwrap":false},"1.0.0":{"name":"@abdouhugo/autoresponders","version":"1.0.0","author":{"name":"hugo abdou"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/hugo-abdou/autoresponders.git"},"registry":"https://npm.pkg.github.com","type":"commonjs","main":"./dist/src/index.js","types":"./dist/src/index.d.ts","scripts":{"clean":"shx rm -rf dist/*","build":"tsc","watch":"tsc --watch","test":"mocha --ui qunit","testall":"mocha --ui qunit dist/test","prepack":"npm run clean && npm run build"},"devDependencies":{"@types/lodash":"^4.14.149","@types/mocha":"^7.0.2","@types/node":"^13.11.1","mocha":"^7.1.1","shx":"^0.3.2"},"dependencies":{"axios":"^1.1.3","lodash":"^4.17.15","tsc":"^2.0.4","typescript":"^4.8.4"},"gitHead":"3097b2d9bdc11401f40e4ff460b8c90ef382465b","description":"# Install","bugs":{"url":"https://github.com/hugo-abdou/autoresponders/issues"},"homepage":"https://github.com/hugo-abdou/autoresponders#readme","_id":"@abdouhugo/autoresponders@1.0.0","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-oyyGvjBuj7eFWfLG5dIRizSG20/cM3KPC4wCmQyauMlJvx+pzIziLeJ2ZpvvPjAMkq+XyCF8WiEvmnli95rZQA==","shasum":"60ce5f125b6ba254873f43b2e793b5a4b540b562","tarball":"https://registry.npmjs.org/@abdouhugo/autoresponders/-/autoresponders-1.0.0.tgz","fileCount":41,"unpackedSize":58319,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCL9JsbKvKo7Gs7zaqe87sgovv/USui83UG19Sz7UnBxwIgbGI9DKTdjm38VJZOR5FwCA7aTKOUi1i7G6+/Fum5wu8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJje2IxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmobSA//WtkBxKlfyiWiYmBSux5MvCcTxmlqaLMVzh/U+cUsS5Hxq6oq\r\nPONU/wT0NaKxIl1k3Np6rZQh5nxH/+6bHNZWAkQbeZHyRJw98IjhHO9bHrN8\r\nRiK1Uil2+ezMWhSUZQpSoMgAOR/caBm1tfiC1d4E0mqFmChw9raofpvc9+yW\r\nz7tbtKEWQX9GkFzcwvSzdCWNc7c0jCMVDrUUhTApIlWWKWNo7xBzARrgP50D\r\nLZLKDduj/ETxxjFDRUu46fXBbNHMZ5T+i6Jf+eLS4Mk8eho4HrQddVrowJma\r\nTtyXlL15NYHLEZ3k7mbEtnU2lmcD+ajby7WLtDe0FJH4cp4YVQBMvy6CF1oD\r\n8kGb5V6W9Fr9M7SWnUXkv1Sxk8wi42tq08L0yUwbNdVzs3ZYxbwYvtZ37WBm\r\nlQgfN6hFAjn864eDrve/xLYgz3F/9ddf9RYhNf/4pdXxNU3pF3GMe7nbS4yt\r\nI9H9h9SGX0tdlbRG1Hbr5z02tIsqODlwx5jCtILLDxkrSgoUTa8p0OwU9+Lf\r\npOSx5nn+gYxBvOXplbAT51ha9retS/rEHdN3zZ1ewtn86SCzl0LzTY1wca57\r\naBJcPxZwAikBuG81TVJofAkoerpoo0NN+WJIebs6Cz9q2T7WcHT5Kf7a4qWO\r\nd2xzPqjHxRjQSPKUtTCIfgX1RFcWJHlBL/w=\r\n=q4X5\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"abdouhugo","email":"moikinge3@gmail.com"},"directories":{},"maintainers":[{"name":"abdouhugo","email":"moikinge3@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/autoresponders_1.0.0_1669030449406_0.4194527821966356"},"_hasShrinkwrap":false},"1.1.0":{"name":"@abdouhugo/autoresponders","version":"1.1.0","author":{"name":"hugo abdou"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/hugo-abdou/autoresponders.git"},"registry":"https://npm.pkg.github.com","type":"commonjs","main":"./dist/src/index.js","types":"./dist/src/index.d.ts","scripts":{"clean":"shx rm -rf dist/*","build":"tsc","watch":"tsc --watch","test":"mocha --ui qunit","testall":"mocha --ui qunit dist/test","prepack":"npm run clean && npm run build"},"devDependencies":{"@types/lodash":"^4.14.149","@types/mocha":"^7.0.2","@types/node":"^13.11.1","mocha":"^7.1.1","shx":"^0.3.2"},"dependencies":{"axios":"^1.1.3","lodash":"^4.17.15","tsc":"^2.0.4","typescript":"^4.8.4"},"gitHead":"20b2587bbf7caa90b4ec835cec3f72a12cbbb393","description":"# Install","bugs":{"url":"https://github.com/hugo-abdou/autoresponders/issues"},"homepage":"https://github.com/hugo-abdou/autoresponders#readme","_id":"@abdouhugo/autoresponders@1.1.0","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-aB8cvzVYo4VKtUbkd9Bdn/qFtWDjEXs/lP+0+NZda6qXP4cEH7un8molUYcF00s3Nt0XrvD3Aa5RLlqtWK+geQ==","shasum":"a721b6d47c94b4008caf96c844447a593055c7d9","tarball":"https://registry.npmjs.org/@abdouhugo/autoresponders/-/autoresponders-1.1.0.tgz","fileCount":41,"unpackedSize":60056,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCP+JLQMnGUKzh6Hg2Wpml81lBJR/JI1ZH1RUDnJHXYfwIhAOcdH3/vkjaFxPDM2ZIyMWZnSHexXVB/wI7qDN5VCvYa"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfKwOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr4Hw//f/TQug2ktnbDFZZ9JWZVsIB7MtuPoFfk1hDVsGZhsnNmDj9R\r\nU/G/Yorek+I+pRFsTrqrf9WaiPhBWrxYjODF/CCrljkA+NJ2HGCweQ2rR4Yh\r\nnxU9gx7Lb3VXPDgMC5jR638ffZZzRNK/2+lAsALBgBA90R7RVAHatBSadi7M\r\nec8nV6cl5E50Wgqq5Qfm6UP0DAeguw6zBhcWX6diu7VoNW3rCQM5DHTB3TIL\r\nBilj1FEdXjaHK9N739rqU7irrtulY2aJpcw86xBjQfGgfQUsFQZyBEkfigfs\r\n6djuRg+vlnaBTp88WiVFX7lb58P3teRg08dY3zdS49rDDmvX8rC0wT9vyE/V\r\nJg4IF8hTrBzqQmxy4JaV/WOeAH0Q1FxudETqo5VBiqqItZkKFLRaJIVWuZUf\r\nnyExoZQfVV7zpzlwGQgwA44vsFv51/SQeOMUaAhmHXntmfUOD9t8rEiQCGIK\r\nmlprXV/OB0Do1f7gW98LgEENBzu+59FXAMXcTTe9hTlR78V4kMAvwJ8i8czj\r\n15QJbXSNI0oXfk5zMSjxQF2EZcR6VTLui/W8hujsbV3J/MY6/1ByXo5AxhFi\r\nwcswdwZM/kqegb3KiZHKTaPbtORXhwAWC5M4l3iNCGxrklIexZdVEwftmDso\r\nTX52bWrm900x3ZQyNTQ5K2D0BwpsRGfxXxI=\r\n=xCTq\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"abdouhugo","email":"moikinge3@gmail.com"},"directories":{},"maintainers":[{"name":"abdouhugo","email":"moikinge3@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/autoresponders_1.1.0_1669114893776_0.11449092474876621"},"_hasShrinkwrap":false}},"maintainers":[{"name":"abdouhugo","email":"moikinge3@gmail.com"}],"description":"# Install","homepage":"https://github.com/hugo-abdou/autoresponders#readme","repository":{"type":"git","url":"git+https://github.com/hugo-abdou/autoresponders.git"},"author":{"name":"hugo abdou"},"bugs":{"url":"https://github.com/hugo-abdou/autoresponders/issues"},"license":"MIT","readme":"# Autoresponders\n\n# Install\n\n## create Autoresponder instance\n\n```js\n// npm install --save https://github.com/hugo-abdou/autoresponder\n\n// 1, create file called autoresponder.{js,ts} on your project\n// 2, and initialize  the Autoresponder instance\n// 3, pass the config\nconst autoresponder = require(\"@abdouhugo/autoresponders\").default;\nconst autoresponder = new Autoresponder({\n    aweber: {\n        endpoint: \"https://api.aweber.com/1.0\",\n        oauth_endpoint: \"https://auth.aweber.com\",\n        scopes: \"account.read list.read subscriber.write\",\n        client_id: \"your_aweber_client_id\",\n        client_secret: \"your_aweber_client_secret\",\n        redirect_uri: \"your_project_url/aweber\",\n    },\n    mailchimp: {\n        endpoint: \"https://<dc>.api.mailchimp.com/3.0\",\n    },\n    getresponse: {\n        endpoint: \"https://api.getresponse.com/v3\",\n    },\n    sendinblue: {\n        endpoint: \"https://api.sendinblue.com/v3\",\n    },\n    // this two options is required if you are using pabbly or zapier even if empty\n    pabbly: {},\n    zapier: {},\n});\n\n// export the instance\nexports.modules = autoresponder;\n```\n\n## Available drivers\n\ngetresponse , sendinblue , mailchimp , aweber , zapier , pabbly\n\n## Check if Autoresponder need OAuth\n\n```js\n// import the instance from the file you create befor ( autoresponder.{js,ts} )\nconst autoresponder = require(\"autoresponder.{js,ts}\");\n// no params needed if you whant to check withOAuth\nconst driver = autoresponder.create();\n\nif (driver.withOAuth()) {\n    // OAuth logic  login or get tocken ext...\n} else {\n    // normal code\n}\n\n// you can change the requests timeout by calling the setTimout function on the driver before you call the apis\ndriver.setTimeout(500);\n```\n\n## Getresponse And Sendinblue\n\n```js\n// import the instance from the file you create befor ( autoresponder.{js,ts} )\nconst autoresponder = require(\"autoresponder.{js,ts}\");\nconst driver = autoresponder.create(\"getresponse or sendinblue\", {\n    apiKey: user_key,\n});\n\n// test the api\nawait driver.testApi();\n\n// get the list of categories from autoresponder\nawait driver.getList();\n\n//  add subscriber to list (category)\nawait driver.addSubscriber(\n    \"list_id\",\n    \"exampl@email.com\",\n    \"user_first_name\",\n    \"user_last_name\"\n);\n```\n\n## Mailchimp\n\n```js\nconst autoresponder = require(\"autoresponder.{js,ts}\");\nconst driver = autoresponder.create(\"mailchimp\", {\n    apiKey: user_key,\n    datacenter: api_datacenter,\n});\n\n// test the api\nawait driver.testApi();\n\n// get the list of categories from autoresponder\nawait driver.getList();\n\n//  add subscriber to list (category)\nawait driver.addSubscriber(\n    \"list_id\",\n    \"exampl@email.com\",\n    \"user_first_name\",\n    \"user_last_name\"\n);\n```\n\n## Aweber\n\n```js\nconst autoresponder = require(\"autoresponder.{js,ts}\");\nconst driver = autoresponder.create(\"aweber\", {\n    access_token: user_token,\n    refresh_token: user_refresh_token,\n    expires_in: user_expires_in,\n});\n\n// return the login url of aweber you nead to redirect the user to this url\n// and you nead a webhook to catch the code from aweber when user login successfuly\nawait driver.getAuthorizationUrl();\n\n//return access token from aweber its need the code from aweber webhook\n//you need to save the returned data on databas\nawait driver.getAccessToken(code);\n\n//test the api\nawait driver.testApi();\n\n// get the list of categories from autoresponder\nawait driver.getList();\n\n// add subscriber to list (category)\nawait driver.addSubscriber(\n    \"list_id\",\n    \"exampl@email.com\",\n    \"user_first_name\",\n    \"user_last_name\"\n);\n```\n\n## Zapier Pabbly\n\n```js\nconst autoresponder = require(\"autoresponder.{js,ts}\");\nconst driver = autoresponder.create(\"zapier or pabbly\", {\n    url: webhook_url,\n});\n\n// send your data  to autoresponder\nawait driver.post(\n    email:string,\n    firstName:string,\n    lasName:string,\n);\n```\n","readmeFilename":"README.md"}