@innofulfill/core-node-library
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

CORE-NODE-LIBRARY

This is an NPM package which provides some features like sending the slack notifications, custom exception handlers, class validators and much more..

What is this repository for?

  • This is to provide a pre defined set of functions that can be used wherever needed

How do I get set up?

  • To set up this NPM package on your node project, you'll need to follow this steps

First Install this package using

npm i @innofulfill/core-node-library
or
yarn add @innofulfill/core-node-library
  • Configuration

There are some required env variable that needs to be set up on your project to use this package.

configure these env variables on your project

SLACK_TOKEN=  - this will the slack token for your organiation
SLACK_CHANNEL_ID=. - this will be the channel's unique id. 
  • Use Case
Here's an example payload to send notifications in slack channels

sendSlackMessage({
  title: 'Hello, world!',
  details: {
    message: 'Hello, world!',
    method: 'GET',
    url: 'https://example.com',
    responseStatus: 200,
    trace: {
      key: 'domain',
      value: 'example.com',
      link: 'https://example.com',
    },
  },
  metadata: {
    user: 'John Doe',
  },
  trace: {
    key: 'domain',
    value: 'example.com',
    link: 'https://example.com',
  },
  traces: [
    {
      key: 'domain',
      value: 'example.com',
      link: 'https://example.com',
    },
  ],
  threads: {
    threadMessage: {
      message: 'Hello, world!',
    },
  },
});

title       -   represents the title of the slack notifications (Bold in nature)
details     -   represents the basic details that will be visible in the block
metadata    -   represents the metadata informations (optional)
trace       -   represents the block including some kind of tracable links in it
traces      -   usefull in case of need to add multiple links in the payload
threads     -   represents the thread block, any data passed in this will be treated as thread message

Who do I talk to?

In case of any questions or queries you can reach out to

  • Repo owner or admin
  • Other community or team contact

Readme

Keywords

none

Package Sidebar

Install

npm i @innofulfill/core-node-library

Weekly Downloads

32

Version

0.0.2

License

UNLICENSED

Unpacked Size

323 kB

Total Files

91

Last publish

Collaborators

  • robin.yadav
  • pavan_smile
  • sachin-smile
  • shankarsingh2025
  • smile-innofulfill