{"_id":"@aryans_web/backend-toolkit","_rev":"3-47f632d3d3248aeaab40cc143fb6428f","name":"@aryans_web/backend-toolkit","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.1":{"name":"@aryans_web/backend-toolkit","version":"0.0.1","keywords":["toolkit","backend toolkit"],"author":{"name":"Aryan Maurya"},"license":"MIT","_id":"@aryans_web/backend-toolkit@0.0.1","maintainers":[{"name":"aryanmaurya314","email":"aryanmaurya314@gmail.com"}],"contributors":[{"url":"aryanmaurya@intugine.com","name":"Aryan Maurya"}],"homepage":"https://github.com/aryanmaurya314","dist":{"shasum":"bb9e2a08bf3b36f54c58ccd5ce7cab531bd4ff65","tarball":"https://registry.npmjs.org/@aryans_web/backend-toolkit/-/backend-toolkit-0.0.1.tgz","fileCount":6,"integrity":"sha512-8/SDUhsabE1buxuUtFT1M3nRdYD6IgyR7cBUW+NbyjQmd2SKBFD74+Go2x0LlSnSEPTsjO84ABT4/OxXdEQxiA==","signatures":[{"sig":"MEYCIQCUMqHLRWYtnubq8kFM7KM49G0KZGPm6EZA5GIldZPrgQIhALt3zK7zqyf7uSAYvKRXq8wK8dicp2NaX2RZU15h7PSx","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13027},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"7ff13059b8e3533b7831b6c2d6be6b9dfec75a90","scripts":{"build":"tsup"},"_npmUser":{"name":"aryanmaurya314","email":"aryanmaurya314@gmail.com"},"repository":{"url":"https://github.com/aryanmaurya314"},"_npmVersion":"10.9.2","description":"Essential backend toolkit.","directories":{},"lint-staged":{"**/*.{js,ts,json,mjs}":["eslint --fix","prettier --write"]},"_nodeVersion":"22.13.1","dependencies":{"axios":"^1.7.9","@aws-sdk/client-sns":"^3.744.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.6","husky":"^9.1.7","eslint":"^9.20.1","rimraf":"^6.0.1","globals":"^15.15.0","ts-node":"^10.9.2","prettier":"^3.5.0","@eslint/js":"^9.20.0","typescript":"^5.7.3","@types/node":"^22.13.2","lint-staged":"^15.4.3","@tsconfig/node22":"^22.0.0","typescript-eslint":"^8.24.0","eslint-config-prettier":"^10.0.1","eslint-plugin-prettier":"^5.2.3"},"_npmOperationalInternal":{"tmp":"tmp/backend-toolkit_0.0.1_1739465509016_0.5968797953034826","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@aryans_web/backend-toolkit","version":"0.0.2","keywords":["toolkit","backend toolkit"],"author":{"name":"Aryan Maurya"},"license":"MIT","_id":"@aryans_web/backend-toolkit@0.0.2","maintainers":[{"name":"aryanmaurya314","email":"aryanmaurya314@gmail.com"}],"contributors":[{"url":"aryanmaurya@intugine.com","name":"Aryan Maurya"}],"homepage":"https://github.com/aryanmaurya314","dist":{"shasum":"8604d1ed4027c0a79c7f08ef8e0bec5b2052fedc","tarball":"https://registry.npmjs.org/@aryans_web/backend-toolkit/-/backend-toolkit-0.0.2.tgz","fileCount":6,"integrity":"sha512-lg8jWeT67dIl/V8t6grKTN5z6hKWKtMFMQkdM+hSp2RVjGf8DB1d+3mIVi2pTLIP2pUC5m5fCsjJKKBkEIfhQQ==","signatures":[{"sig":"MEYCIQCMDQ9pRubJRMU55rhGf6z45LlFpFuByK8byB4k5ByZTwIhAKkQdPcRQBVbNOAAQBY42ZTmjnXvCOfCZhKKmggYDPwY","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":28525},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"0a3a02988e969916480b73f5ed58acf8eb57504f","scripts":{"test":"ts-node src/test.ts","build":"tsup","prepare":"husky"},"_npmUser":{"name":"aryanmaurya314","email":"aryanmaurya314@gmail.com"},"repository":{"url":"https://github.com/aryanmaurya314"},"_npmVersion":"10.9.2","description":"A list of useful functions.","directories":{},"lint-staged":{"**/*.{js,ts,json,mjs}":["eslint --fix","prettier --write"]},"_nodeVersion":"22.13.1","dependencies":{"axios":"^1.7.9","@aws-sdk/client-sns":"^3.744.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.6","husky":"^9.1.7","eslint":"^9.20.1","globals":"^15.15.0","ts-node":"^10.9.2","prettier":"^3.5.0","@eslint/js":"^9.20.0","typescript":"^5.7.3","@types/node":"^22.13.2","lint-staged":"^15.4.3","@tsconfig/node22":"^22.0.0","typescript-eslint":"^8.24.0","eslint-config-prettier":"^10.0.1","eslint-plugin-prettier":"^5.2.3"},"_npmOperationalInternal":{"tmp":"tmp/backend-toolkit_0.0.2_1739537808279_0.8619999387630832","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@aryans_web/backend-toolkit","version":"0.0.3","keywords":["toolkit","backend toolkit","axios best practice","send alert service via sms email whatsapp"],"author":{"name":"Aryan Maurya"},"license":"MIT","_id":"@aryans_web/backend-toolkit@0.0.3","maintainers":[{"name":"aryanmaurya314","email":"aryanmaurya314@gmail.com"}],"contributors":[{"url":"aryanmaurya@intugine.com","name":"Aryan Maurya"}],"homepage":"https://github.com/aryanmaurya314","dist":{"shasum":"eccba9334d215d486a9c3d55069ecf838d3700a7","tarball":"https://registry.npmjs.org/@aryans_web/backend-toolkit/-/backend-toolkit-0.0.3.tgz","fileCount":7,"integrity":"sha512-KN9xbfB9MqO47rAkB9WgceM2iBByh9/TSkmgFPhGSwSBf67oPJzdA/BQlZ04BOzhc7/GAIn6FlhmbNw+3RMclA==","signatures":[{"sig":"MEYCIQCZP5ovPCGqcfGyqJnrqM9ljz0a7Vn3OVpZzOhV1lRA2gIhAKb5eWO+FH2iO642kjinQddmHs+yCctTJ8BhiKDrZAR/","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31105},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"7c29240f941b87353de8b82f5daf841fd5d8a52c","scripts":{"test":"ts-node src/test.ts","build":"tsup","prepare":"husky"},"_npmUser":{"name":"aryanmaurya314","email":"aryanmaurya314@gmail.com"},"repository":{"url":"https://github.com/aryanmaurya314"},"_npmVersion":"10.9.2","description":"A list of useful functions.","directories":{},"lint-staged":{"**/*.{js,ts,json,mjs}":["eslint --fix","prettier --write"]},"_nodeVersion":"22.13.1","dependencies":{"axios":"^1.7.9","@aws-sdk/client-sns":"^3.744.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.6","husky":"^9.1.7","eslint":"^9.20.1","globals":"^15.15.0","ts-node":"^10.9.2","prettier":"^3.5.0","@eslint/js":"^9.20.0","typescript":"^5.7.3","@types/node":"^22.13.2","lint-staged":"^15.4.3","@tsconfig/node22":"^22.0.0","typescript-eslint":"^8.24.0","eslint-config-prettier":"^10.0.1","eslint-plugin-prettier":"^5.2.3"},"_npmOperationalInternal":{"tmp":"tmp/backend-toolkit_0.0.3_1739538712984_0.38105341137101867","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@aryans_web/backend-toolkit","version":"0.0.4","description":"A list of useful functions.","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","scripts":{"test":"ts-node src/test.ts","build":"tsup","prepare":"husky"},"dependencies":{"@aws-sdk/client-sns":"^3.744.0","@hokify/agenda":"^6.3.0","axios":"^1.7.9","mongodb":"^6.13.0"},"devDependencies":{"@eslint/js":"^9.20.0","@tsconfig/node22":"^22.0.0","@types/node":"^22.13.2","eslint":"^9.20.1","eslint-config-prettier":"^10.0.1","eslint-plugin-prettier":"^5.2.3","globals":"^15.15.0","husky":"^9.1.7","lint-staged":"^15.4.3","prettier":"^3.5.0","ts-node":"^10.9.2","tsup":"^8.3.6","typescript":"^5.7.3","typescript-eslint":"^8.24.0"},"lint-staged":{"**/*.{js,ts,json,mjs}":["eslint --fix","prettier --write"]},"keywords":["toolkit","backend toolkit","axios best practice","send alert service via sms email whatsapp"],"author":{"name":"Aryan Maurya"},"contributors":[{"name":"Aryan Maurya","url":"aryanmaurya@intugine.com"}],"homepage":"https://github.com/aryanmaurya314","repository":{"url":"https://github.com/aryanmaurya314"},"license":"MIT","_id":"@aryans_web/backend-toolkit@0.0.4","gitHead":"df31a0a4947eb7e8110addd0e3223dea7d960397","_nodeVersion":"22.13.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-zrUomE/1iVafb26kKDe2LPpFtf2NP59En8Zg3PS6ML4CjzF9o4ABKZCQd5DueA+LDy+XgOBE+b5ASGn31sbYvA==","shasum":"42f708f828282f232562b24057d516cb305122b5","tarball":"https://registry.npmjs.org/@aryans_web/backend-toolkit/-/backend-toolkit-0.0.4.tgz","fileCount":7,"unpackedSize":55460,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHpnaQWuwDBdSxLZQh5kmMJSho6swxB9I/EKQPZfiA/SAiBZwLhHgZkleS2UPpWHTbi4YkbNuPUqpEs7aVHcH/UXCA=="}]},"_npmUser":{"name":"aryanmaurya314","email":"aryanmaurya314@gmail.com"},"directories":{},"maintainers":[{"name":"aryanmaurya314","email":"aryanmaurya314@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/backend-toolkit_0.0.4_1739568074227_0.5003033442951821"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-13T16:51:48.887Z","modified":"2025-02-14T21:21:14.627Z","0.0.1":"2025-02-13T16:51:49.204Z","0.0.2":"2025-02-14T12:56:48.456Z","0.0.3":"2025-02-14T13:11:53.302Z","0.0.4":"2025-02-14T21:21:14.381Z"},"author":{"name":"Aryan Maurya"},"license":"MIT","homepage":"https://github.com/aryanmaurya314","keywords":["toolkit","backend toolkit","axios best practice","send alert service via sms email whatsapp"],"repository":{"url":"https://github.com/aryanmaurya314"},"description":"A list of useful functions.","contributors":[{"name":"Aryan Maurya","url":"aryanmaurya@intugine.com"}],"maintainers":[{"name":"aryanmaurya314","email":"aryanmaurya314@gmail.com"}],"readme":"# AlertClient\n\nA TypeScript-based alert client for sending notifications via **SMS, Email, and WhatsApp** using different providers.\n\n## 🚀 Features\n\n- Supports multiple providers for **SMS, Email, and WhatsApp**.\n- Fully **typed with TypeScript** for safety and autocompletion.\n- Uses a **provider map** for extensibility.\n- Works with **Exotel, AWS SES, and VFirst** (easily extendable).\n\n## 📦 Installation\n\n```sh\nnpm install @aryans_web/alert-client\n```\n\nor\n\n```sh\nyarn add @aryans_web/alert-client\n```\n\n## 🛠️ Usage\n\n### 1️⃣ **Initialize the Alert Client**\n\n```ts\nimport AlertClient from '@aryans_web/alert-client'\n\nconst client = AlertClient<'sms' | 'email' | 'whatsapp'>({\n\tsms: { provider: 'exotel', publishKey: 'your-key' },\n\temail: {\n\t\tprovider: 'SES',\n\t\tapiKey: 'your-api-key',\n\t\turl: 'https://email-api.com'\n\t},\n\twhatsapp: { provider: 'vfirst', publishKey: 'your-key' }\n})\n```\n\n### 2️⃣ **Send Alerts**\n\n#### **Send an SMS**\n\n```ts\nclient.sms({ numbers: ['1234567890'], message: 'Hello!' }).then(console.log)\n```\n\n#### **Send an Email**\n\n```ts\nclient\n\t.email({\n\t\tfrom: 'no-reply@example.com',\n\t\tto: ['recipient@example.com'],\n\t\tsubject: 'Test Email',\n\t\thtml: '<h1>Hello</h1>'\n\t})\n\t.then(console.log)\n```\n\n#### **Send a WhatsApp Message**\n\n```ts\nclient\n\t.whatsapp({ numbers: ['1234567890'], message: 'Hello on WhatsApp!' })\n\t.then(console.log)\n```\n\n### 3️⃣ **AWS SNS Publisher**\n\n#### **Publish an SNS Message**\n\n```ts\nimport { snsPublisher } from '@aryans_web/alert-client'\n\nsnsPublisher({\n\ttopicArn: 'arn:aws:sns:us-east-1:123456789012:MyTopic',\n\tmessage: 'Hello, this is an SNS message!'\n}).then(console.log)\n```\n\n### 4️⃣ **Make HTTP Requests**\n\n#### **Send a Custom HTTP Request**\n\n```ts\nimport { makeRequest } from '@aryans_web/alert-client'\n\nmakeRequest({\n\turl: 'https://api.example.com/data',\n\tmethod: 'POST',\n\theaders: { 'Content-Type': 'application/json' },\n\tbody: JSON.stringify({ key: 'value' })\n}).then(console.log)\n```\n\n## 🤝 Contributing\n\n1. Fork the repo\n2. Create a new branch (`git checkout -b feature-name`)\n3. Make changes and commit (`git commit -m 'Add new feature'`)\n4. Push to the branch (`git push origin feature-name`)\n5. Open a Pull Request\n\n## 📜 License\n\nMIT License © [Aryan Maurya]\n","readmeFilename":"README.md"}