notification-standardizer

1.0.10 • Public • Published

Notification-Standardizer

Getting started

Make your notification standardized with a common format

Usage

const standardNotifier = require('./notification-standardizer');

const input = {
    'agentId': agentId,           // agentId is unique for each project
    'agentName': agentName,       // the project name or application's name
    'scriptOrg': scriptOrg,       // the project code name (eg: 'phantombuster', 'botscrapper', 'instagram-scraper')
    'runDuration': runDuration,   // run duration in milliseconds
    'resultObject': resultObject, // string with the response payload
    'exitMessage': exitMessage,   // the reason why the agent ended ("finished"|"killed"|"global timeout"|"org timeout"|"agent timeout"|"unknown")
    'exitCode': exitCode          // 1 on error 0 on success
};

const jsonObject = standardNotifier.generateJsonObjectAndSendWebhook(input);

Readme

Keywords

none

Package Sidebar

Install

npm i notification-standardizer

Weekly Downloads

0

Version

1.0.10

License

MIT

Unpacked Size

9.6 kB

Total Files

6

Last publish

Collaborators

  • nissimchettrit