{"_id":"@apifonica/notifier","_rev":"8-0201ee06c7b56d9f56b5354e34171845","name":"@apifonica/notifier","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@apifonica/notifier","version":"1.0.0","keywords":["telegram","slack","send","post","message"],"author":{"name":"Apifonica","email":"https://www.apifonica.com"},"license":"MIT","_id":"@apifonica/notifier@1.0.0","maintainers":[{"name":"oberst47","email":"oberst47@gmail.com"},{"name":"alexpod","email":"alexpoddubnyy@gmail.com"},{"name":"almvasiliev","email":"vasiliev@apifonica.com"}],"dist":{"shasum":"fcc84e2c45d8e8b0042f777c6c22454b17c5ce8b","tarball":"https://registry.npmjs.org/@apifonica/notifier/-/notifier-1.0.0.tgz","fileCount":24,"integrity":"sha512-WELcSmpUDwU4k4/ajzlAKuOmU1pRzJluksl/rEAsGaYZn7G1ryUvHZMkRiHJ5U4eRnI+UZfFiMw0rVCKgHHwuw==","signatures":[{"sig":"MEQCIALl+byDNGSoBGH+k6nO4Y/LFjyMh4/d7zcooEJpEnCjAiA2YNzrdE9j1nIPgnTdCTepsC91Or7lpwasih9NIA63eg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14372,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj0tyuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqHxA//YUB1WNWRtj5vZqIF+g67XDvaKUDkRcF8L/JkKEk71rj81I2C\r\ngf0FhQrzwdS2dXkgSrD2pdftBe2Hje/iO4HJ6Mrs4s8C9JHU/rIUou3FwivC\r\n7qe20LNdW4O7qHw0irBLZCKiPVmDw/Vbyi38b0UPQHiJQK/ioQvy4NemzEnx\r\n4TLybCkFPVGQWCwNGsyrAAK2+YPDOBKFtE8adApc3Wn3TL9ymYLVu2r/yuSH\r\nEnvguoCQkxYYL1lldCUMBKLatZsE3i0P0mYpa7Xk0O0IRXs5qiqP/MwOWYQI\r\nXitMeYXYYng4AtuLCjvw954SBwQmYHRMtnpAMJqiNBnvjFWpGgJEDmL5aW1L\r\nz+RwTkZG49aWCnWfuXTYcu0skxbC/z17wf34e8NLPJpN9qMBuDg7aHy9J0Oc\r\nN46XHK7U5gQ2q2xuLaG4HuF5Pxv9Rg3bCE50gF+qPBQUtiiLLpREviS8qrSK\r\nwXW72KNsxjgWh3slw2cKj1VeBWBlUQMI+naHDm0+iBqMvxbf6WBVNpF2brJe\r\niL6clyNVQ/aJm/MWVtDT6SaA8LSRYtYUQkW5i3CiiUfH7dwzrHe0zPFe/Ip4\r\nimAEM0lp2FtLd4WzKzClLlusGWRw5X9ghkwngVH4514PMDCZow6jAiBSAnPt\r\nclYH8FKQybsaPgG2styTxb/cJL35jCL8IFA=\r\n=aYjM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","gitHead":"9a959623628668e626d3546b0d1880ce7f58f565","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"almvasiliev","email":"vasiliev@apifonica.com"},"_npmVersion":"8.1.2","description":"Send messages to Telegram and Slack","directories":{},"_nodeVersion":"16.13.2","dependencies":{"node-fetch":"^3.3.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^4.9.4","@types/node":"^18.11.18"},"_npmOperationalInternal":{"tmp":"tmp/notifier_1.0.0_1674763438259_0.47763916572159504","host":"s3://npm-registry-packages"}}},"time":{"created":"2023-01-26T20:03:58.203Z","modified":"2025-07-31T16:27:56.129Z","1.0.0":"2023-01-26T20:03:58.402Z"},"author":{"name":"Apifonica","email":"https://www.apifonica.com"},"license":"MIT","keywords":["telegram","slack","send","post","message"],"description":"Send messages to Telegram and Slack","maintainers":[{"email":"oberst47@gmail.com","name":"oberst47"},{"email":"Aobraztsov@apifonica.com","name":"aobraztsov"},{"email":"nkorolev@apifonica.com","name":"nkorolev"},{"email":"administrator+npm@apifonica.com","name":"smarttel"}],"readme":"### Example usage:\n\n##### Initialize\n\n```javascript\nimport { Telegram, Slack } from \"@apifonica/notifier\"\n\n// initialize with authorization access token for telegram bot\nconst telegram = new Telegram({\n  accessToken: '123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11',\n})\n// initialize with authorization access token for slack app\nconst slack = new Slack({\n  accessToken: 'xoxb-123456789101-1234567891011-ABCDEFghijklmnoPQr1stuvw',\n})\n```\n\nHow to create and setup bot for Telegram see here <https://core.telegram.org/bots/api#authorizing-your-bot>.\n\nHow to create and setup app for Slack see here <https://api.slack.com/authentication/basics>.\n\n##### Send message\n\n```javascript\n// for sending messages to Telegram required options are \"chat_id\" and \"text\"\n// other options which provide to use Telegram API are optional\n\nconst telegramMessage = await telegram.sendMessage({\n  chat_id: '-123456789',\n  text: 'Hello World',\n  parse_mode: 'HTML',\n  disable_web_page_preview: true,\n})\n\nconsole.log(`telegramMessage: ${JSON.stringify(telegramMessage)}`)\n\n// for sending messages to Slack required options are \"channel\" and \"text\"\n// other options which provide to use Slack API are optional\n\nconst slackMessage = await slack.postMessage({\n  channel: 'ABC12345XYZ',\n  text: 'Hello World',\n  blocks: [\n    {\n      type: 'section',\n      text: {\n        type: 'mrkdwn',\n        text: 'Hey, nice to meet you'\n      }\n    },\n  ]\n})\n\nconsole.log(`slackMessage: ${JSON.stringify(slackMessage)}`)\n\n```\n","readmeFilename":"README.md"}