2.4.6 • Published 7 months ago

@spottabl/notification-package v2.4.6

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
7 months ago

NOTIFICATION LIBRARY

This library is used by b2bserver and mgmtserver for formatting notifications for email/slack/whatsapp and conecting it to echonotifier python server.

currennt version: 2.4.5

Main packages used: -> NestJs (as the framework) -> mongoose (for getting notification data) -> typescript-string-operations (for replacing {dynamic Fields}) -> jsonschema (verify schema i.e the required and optional params from notificationinfos)

Prerequisite: This package needs mongourl for echoNotifier and URL for echonotifier service as the argument of NotificationService constructor.

working steps:

calling generate function: This is the entry and completition point to the service that: a. gets the template from the type provided b. verify if all the required data is part of the notificationContent c. Loop over all the chaneels in received from notificationinfos and format data for each of them d. Finally call th echonotifier and pass the data for it to handle.

Build: To build the package run: npm run build

Test: To test the flows: a. cd testlib (this is one more service in the same project to test the package) b. Install the local package: npm install ./echonotificationslib. got to app.controller and update sendNotification API based on the required test passing all the required params in the notification_data d. Run the project: npm run start:dev e. goto: http://localhost:3000 (the notification should be sent) or take a cup of coffee and be the investgitor of the crime you committed.

Deploy: This packages is deployed on npm for our private use accross different service. To deploy you shoud have access to npmjs.com/ and the organisation there Then follow this steps: -> npm login (you will be promted for password/otp complete that) -> npm publish

THATS IT FOR THE PACKAGE. GO THROUGH THE SERVICES AND YOU WILL GET IT BETTER. NEED SOME HELP ? email: suman@spottabl.com

2.4.5

10 months ago

2.4.4

10 months ago

2.4.6

7 months ago

2.4.3

1 year ago

2.4.2

1 year ago

2.4.1

2 years ago

2.3.0

2 years ago

2.4.0

2 years ago

2.2.0

2 years ago

2.1.0

2 years ago

2.0.0

2 years ago

1.0.9

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago