0.0.2-alpha8 • Published 1 year ago

@ikonintegration/mod-auditing-client v0.0.2-alpha8

Weekly downloads
1
License
-
Repository
-
Last release
1 year ago

module-auditing-client Node.js Package

Auditing module nodejs API client

Overall

  • npm npm npm (tag) Libraries.io dependency status for latest release, scoped npm package
  • GitHub commit activity
  • GitHub last commit

How to Use

import SMAuditing from '@ikonintegration/mod-auditing-client';

const API = new SMAuditing({
  port: 9090, //isOptional
  endpoint: SharedModules_AuditingEndpoint,
 //Must be specified when using service routes
  apiKey: config.examProvider.key, //API token on IDM.AppID format (generate from APIKey at https://runkit.com/gwdp/idm-appid-v1)
  //Must be specified when using admin or user routes
  authorizationToken: '', -- optional, IDM JWT for shared module admins -- Accepts a function to be called async and return the tokenroutes
  namespace: '' 
});

//Create audit trail
const resp = await API.trail.createTrail({
  'userID': 'string',
  'transactionDate': 'number',
  'eventLevel': 'any',
  'eventType': 'any',
  //Optionals
  'description': 'any?',
  'eventData': 'any?',
  //Externals IDs
  'auditKey': 'any',
  'auditSubKey': 'any?',
  //Identifiers
  'requesterID': 'string'
});
if (!resp || resp.statusCode != 200) {
  return ERROR:
} return SUCCESS;

Headers

The following header must be specified in every request!

  • Authorization

Available API methods

Trail:

  • API.trail.createOrUpdateUser(userObj) - Admin and services
  • API.trail.listTrailByID(trailID) - Admin and services
  • API.trail.listTrailByIDs(trailID, trailSubID) - Admin and services

Client:

  • API.client.createClient(clientName) - Admin only
  • API.client.updateClient(clientName, clientID) - Admin only
  • API.client.deleteClient(clientID) - Admin only
  • API.client.getClient(clientID) - Admin only
  • API.client.getAllClient() - Admin only
0.0.2-alpha8

1 year ago

0.3.0-alpha6

2 years ago

0.3.0-alpha4

2 years ago

0.3.0-alpha5

2 years ago

0.3.0-alpha2

2 years ago

0.3.0-alpha3

2 years ago

0.3.0-alpha1

2 years ago

0.0.2-alpha7

2 years ago

0.0.1-alpha7

2 years ago

0.2.3

2 years ago

0.2.2

3 years ago

0.2.1

4 years ago

0.2.0

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.4

5 years ago

0.1.5

5 years ago

0.1.1

5 years ago

0.1.3

5 years ago

0.1.0

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago