2.0.0 • Published 1 year ago
btrz-webhooks-emitter v2.0.0
btrz-webhooks-emitter
Betterez library for emitting webhooks to the SQS queue.
Configuration
This lib will use the following ENV variables:
- AWS_SERVICE_KEY
- AWS_SERVICE_SECRET
- SQS_QUEUE_URL
How to use
const btrzEmitter = require("btrz-webhooks-emitter");
const attrs = {
providerId: "123",
data: {foo: "bar"}
};
btrzEmitter.emitEvent("transaction.created", attrs);
btrzEmitter.emitEvent()
will send asynchronously a message to SQS and no response, it will log an error if exists.
It's recommendable to send a third param with the logger you are using:
btrzEmitter.emitEvent("transaction.created", attrs, logger);
Denied fields
btrz-webhooks-denied-fields
library will be consumed to filter off the possible denied fields.
Test
AWS_SERVICE_KEY=YOUR_KEY AWS_SERVICE_SECRET=YOUR_SECRET_KEY SQS_QUEUE_URL=YOUR_QUEUE_URL npm test
2.0.0
1 year ago
1.0.0
5 years ago
0.3.12
5 years ago
0.3.11
6 years ago
0.3.10
6 years ago
0.3.9
6 years ago
0.3.8
6 years ago
0.3.7
6 years ago
0.3.6
6 years ago
0.3.5
6 years ago
0.3.4
6 years ago
0.3.3
6 years ago
0.3.2
6 years ago
0.3.1
6 years ago
0.3.0
6 years ago
0.2.3
6 years ago
0.2.2
6 years ago
0.2.1
6 years ago
0.2.0
6 years ago
0.1.2
6 years ago
0.1.1
6 years ago