2.1.1 • Published 4 months ago

btrz-webhooks-emitter v2.1.1

Weekly downloads
120
License
MIT
Repository
github
Last release
4 months ago

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.1.1

4 months ago

2.1.0

6 months ago

2.0.0

2 years ago

1.0.0

6 years ago

0.3.12

6 years ago

0.3.11

7 years ago

0.3.10

7 years ago

0.3.9

7 years ago

0.3.8

7 years ago

0.3.7

7 years ago

0.3.6

7 years ago

0.3.5

7 years ago

0.3.4

7 years ago

0.3.3

7 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago