# RTS2003-SO

[![NPM version](https://img.shields.io/npm/v/rts2003-so.svg)](https://www.npmjs.com/package/aws-sdk)
[![NPM downloads](https://img.shields.io/npm/dm/rts2003-so)](https://www.npmjs.com/package/aws-sdk)

RTS2003 SO is service order, manage user, like register, update, delete.

## Install

Install with [npm](https://www.npmjs.com/):

```sh
$ npm install --save rts2003-so
```

## Usage

```js
const { SingleSignOn, RTS2003_SO_ENDPOINT, RTS2003_SO_SECRET_KEY } = require('rts2003-so');

process.env.RTS2003_SO_ENDPOINT = 'custom-endpoint';
process.env.RTS2003_SO_SECRET_KEY = 'custom-secret-key';

// show env
console.log('ENDPOINT Key:', RTS2003_SO_ENDPOINT);
console.log('SECRET_KEY Key:', RTS2003_SO_SECRET_KEY);

// use new class
const sso = new SingleSignOn();

// user register
const result = sso.userRegister({ 
  "email": "string",
  "first_name": "string",
  "last_name": "string",
  "is_active": 0,
  "created_by": 0
});

// user update
const result = sso.userUpdate({ 
  "id": 0,
  "email": "string",
  "first_name": "string",
  "last_name": "string",
  "is_active": 0,
  "updated_by": 0
});

// user delete
const result = sso.userDelete({ 
  "id": 0,
  "deleted_by": 0
});

// user refresh token
const result = sso.userRefreshToken({ 
  "token": "string"
});

// user logout
const result = sso.userLogout({ 
  "token": "string"
});
```