0.0.2-alpha8 • Published 4 months ago

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

Weekly downloads
1
License
-
Repository
-
Last release
4 months 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

4 months ago

0.3.0-alpha6

6 months ago

0.3.0-alpha4

6 months ago

0.3.0-alpha5

6 months ago

0.3.0-alpha2

10 months ago

0.3.0-alpha3

10 months ago

0.3.0-alpha1

10 months ago

0.0.2-alpha7

6 months ago

0.0.1-alpha7

6 months ago

0.2.3

8 months ago

0.2.2

2 years ago

0.2.1

3 years ago

0.2.0

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.4

4 years ago

0.1.5

4 years ago

0.1.1

4 years ago

0.1.3

4 years ago

0.1.0

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago