@bumiresourcesminerals/approval-easy-connect
v1.2.1
Published
Library for integration to approval system
Downloads
178
Readme
@bumiresourcesminerals/approval-system
A Node.js module that provides API integration and utility functions for internal use at Bumi Resources Minerals.
Features
- Seamless integration with internal approval systems.
- Token-based authentication via Microsoft Graph.
- User management and approval workflow handling.
ENV
- Need ENV Variable
MSGRAPH_ENDPOINT=https://graph.microsoft.com/v1.0/me/
APPROVAL_SYSTEM_ENDPOINT=http://${approvalsystemendpoint}/
Import Module
const ApprovalSystemAPI = require('@bumiresourcesminerals/approval-system');
app.use(ApprovalSystemAPI.authenticateToken);
get Record ID
const ApprovalSystemAPI = require('@bumiresourcesminerals/approval-system');
const api = new ApprovalSystemAPI(request.token);
const FormIdRecord = await api.GetRecordId({
model: MODEL_OBJECT,
type_record: CODE_FORM,
business_code: BRANCH_NICKNAME,
department: DEPARTMENT_NICKNAME,
document_name: DOCUMENT_NICKNAME,
column_name: COLUMN_NAME_RECORD_ID,
session: SESSION_TRANSACTION_DB,
});