@go-mailer/vertebra 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,2 +1,7 @@
1
- const Broker = require('./lib/queue/rabbit')
2
- module.exports.default = Broker
1
+ const Broker = require("./lib/queue/rabbit");
2
+ const queues = require("./lib/constants/queues");
3
+
4
+ module.exports = {
5
+ queues,
6
+ Broker,
7
+ };
@@ -1,12 +1,12 @@
1
1
  module.exports = {
2
- queue: {
3
- AUDIT: 'audit_event',
4
- SEND_EMAIL: "emails_to_be_sent",
5
- NOTIFICATION: "new_notification",
6
- EMPTY_WALLET: "insufficient_wallet_balance",
7
- CAMPAIGN_PROCESSED: "campaign_processed",
8
- TRANSACTIONAL_SENT: "transactional_sent",
9
- NEW_TENANT: "new_account_created",
10
- WALLET_TOPUP: "wallet_topup",
11
- },
2
+ AUDIT: "audit_event",
3
+ SEND_EMAIL: "emails_to_be_sent",
4
+ EMAIL_SENT: "successful_emails_sent",
5
+ EMAIL_FAILED: "failed_email_sends",
6
+ NOTIFICATION: "new_notification",
7
+ EMPTY_WALLET: "insufficient_wallet_balance",
8
+ CAMPAIGN_PROCESSED: "campaign_processed",
9
+ TRANSACTIONAL_SENT: "transactional_sent",
10
+ NEW_TENANT: "new_account_created",
11
+ WALLET_TOPUP: "wallet_topup",
12
12
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-mailer/vertebra",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Go-Mailer vertebra",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/test/index.js CHANGED
@@ -1,6 +1,6 @@
1
- const Broker = require('../lib/queue/rabbit')
1
+ const { queues, Broker} = require('../index')
2
2
 
3
3
  Broker({}).then((channel) => {
4
- channel.publish('test_event', 'This is a test event')
5
- channel.subscribe('test_event')
4
+ channel.publish(queues.SEND_EMAIL, 'This is a test event')
5
+ channel.subscribe(queues.SEND_EMAIL)
6
6
  })