@seabaas/shared-backend

v1.0.3

Published

Package for managing reusable code across all nodejs microservices

Downloads

12

Readme

node-shared-backend

re-usable packages used across all our node services

Send audit log request

Installation

Simply run npm install @seabass/shared-backend

Usage

To use, simply import the function and pass in the necessary body parameters: Also, pass in AUDIT_LOG_API_URL as part of your environment variable.

const {sendAPILogRequest} = require('audit-log')

async function doSomething() {
    await someRequest()
    sendAPILogRequest({})
    return someValue
}

Possible list of parameters to be passed in are:

{
  "auditID": "uuid",
  "action": "string",
  "sourceIP": "string",
  "roleId": "string",
  "fullName": "string",
  "userActivityType": "string",
  "microserviceName": "string",
  "endpointName": "string",
  "oldValuesJson": "string",
  "payloadCreatedDate": "string",
  "newValuesJson": "string",
  "affectedColumns": "string",
  "role": "string",
  "userName": "string",
  "userID": "string",
  "createdDate": "string",
  "ipAddress": "string",
  "startDate": "string",
  "endDate": "string",
  "branchCode": "string",
  "location": "string",
  "branchName": "string",
  "clientInfo": "string",
  "actionStatus": "string",
  "lastLogin": "string",
  "sessionID": "string",
  "module": "string",
  "moduleID": "string",
  "timestamp": "string"
}

NOTE: timestamp and lastLogin are required.