agilite
Advanced tools
Comparing version 6.7.0 to 6.7.1
@@ -19,7 +19,13 @@ 'use strict' | ||
postData (data = {}) { | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_BATCH_ACTIONS, Enums.METHOD_POST, data) | ||
postData (data = {}, logProcessId = null) { | ||
let headers = {} | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_BATCH_ACTIONS, Enums.METHOD_POST, data, headers) | ||
} | ||
getData (profileKeys = [], recordIds = [], slimResult = true) { | ||
getData (profileKeys = [], recordIds = [], slimResult = true, logProcessId = null) { | ||
const headers = {} | ||
@@ -31,20 +37,32 @@ | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_BATCH_ACTIONS, Enums.METHOD_GET, null, headers) | ||
} | ||
putData (recordId = '', data = {}) { | ||
putData (recordId = '', data = {}, logProcessId = null) { | ||
const headers = {} | ||
headers[Enums.HEADER_RECORD_ID] = recordId | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_BATCH_ACTIONS, Enums.METHOD_PUT, data, headers) | ||
} | ||
deleteData (recordId = '') { | ||
deleteData (recordId = '', logProcessId = null) { | ||
const headers = {} | ||
headers[Enums.HEADER_RECORD_ID] = recordId | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_BATCH_ACTIONS, Enums.METHOD_DELETE, null, headers) | ||
} | ||
execute (profileKey = '', data = {}) { | ||
execute (profileKey = '', data = {}, logProcessId = null) { | ||
const config = { | ||
@@ -59,2 +77,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_BATCH_ACTIONS}/execute`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (profileKey !== undefined && profileKey !== null) { | ||
@@ -61,0 +83,0 @@ config.headers[Enums.HEADER_PROFILE_KEY] = profileKey |
@@ -24,7 +24,13 @@ 'use strict' | ||
postData (data = {}) { | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_BATCH_LOGGING, Enums.METHOD_POST, data) | ||
postData (data = {}, logProcessId = null) { | ||
let headers = {} | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_BATCH_LOGGING, Enums.METHOD_POST, data, headers) | ||
} | ||
getData (profileKeys = [], recordIds = [], slimResult = true) { | ||
getData (profileKeys = [], recordIds = [], slimResult = true, logProcessId = null) { | ||
let headers = {} | ||
@@ -36,20 +42,32 @@ | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_BATCH_LOGGING, Enums.METHOD_GET, null, headers) | ||
} | ||
putData (recordId = '', data = {}) { | ||
putData (recordId = '', data = {}, logProcessId = null) { | ||
let headers = {} | ||
headers[Enums.HEADER_RECORD_ID] = recordId | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_BATCH_LOGGING, Enums.METHOD_PUT, data, headers) | ||
} | ||
deleteData (recordId = '') { | ||
deleteData (recordId = '', logProcessId = null) { | ||
let headers = {} | ||
headers[Enums.HEADER_RECORD_ID] = recordId | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_BATCH_LOGGING, Enums.METHOD_DELETE, null, headers) | ||
} | ||
getByProfileKey (profileKey = '') { | ||
getByProfileKey (profileKey = '', logProcessId = null) { | ||
let config = { | ||
@@ -61,2 +79,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_BATCH_LOGGING}/getByProfileKey`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (profileKey !== undefined && profileKey !== null) { | ||
@@ -77,5 +99,5 @@ config.headers[Enums.HEADER_PROFILE_KEY] = profileKey | ||
initProcess (profileKey = '') { | ||
initLogProcess (profileKey = '', logProcessId = null) { | ||
let config = { | ||
url: `${this.apiServerUrl}/${Enums.MODULE_KEY_BATCH_LOGGING}/initProcess`, | ||
url: `${this.apiServerUrl}/${Enums.MODULE_KEY_BATCH_LOGGING}/initLogProcess`, | ||
method: Enums.METHOD_POST, | ||
@@ -85,2 +107,6 @@ headers: {} | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (profileKey !== undefined && profileKey !== null) { | ||
@@ -101,5 +127,5 @@ config.headers[Enums.HEADER_PROFILE_KEY] = profileKey | ||
completeProcess (logProcessId = '') { | ||
completeLogProcess (logProcessId = '') { | ||
let config = { | ||
url: `${this.apiServerUrl}/${Enums.MODULE_KEY_BATCH_LOGGING}/completeProcess`, | ||
url: `${this.apiServerUrl}/${Enums.MODULE_KEY_BATCH_LOGGING}/completeLogProcess`, | ||
method: Enums.METHOD_POST, | ||
@@ -145,4 +171,26 @@ headers: {} | ||
} | ||
generateLogProcessReport (logProcessId = '') { | ||
let config = { | ||
url: `${this.apiServerUrl}/${Enums.MODULE_KEY_BATCH_LOGGING}/report`, | ||
method: Enums.METHOD_GET, | ||
headers: {} | ||
} | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers['log-process-id'] = logProcessId | ||
} | ||
if (this.apiKey !== undefined && this.apiKey !== null) { | ||
config.headers[Enums.HEADER_API_KEY] = this.apiKey | ||
} | ||
if (this.teamId !== undefined && this.teamId !== null) { | ||
config.headers[Enums.HEADER_TEAM_NAME] = this.teamId | ||
} | ||
return Utils.executeRequest(config) | ||
} | ||
} | ||
module.exports = BatchLogging |
@@ -19,7 +19,13 @@ 'use strict' | ||
postData (data = {}) { | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_BPM, Enums.METHOD_POST, data) | ||
postData (data = {}, logProcessId = null) { | ||
let headers = {} | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_BPM, Enums.METHOD_POST, data, headers) | ||
} | ||
getData (profileKeys = [], recordIds = [], slimResult = true) { | ||
getData (profileKeys = [], recordIds = [], slimResult = true, logProcessId = null) { | ||
let headers = {} | ||
@@ -31,20 +37,32 @@ | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_BPM, Enums.METHOD_GET, null, headers) | ||
} | ||
putData (recordId = '', data = {}) { | ||
putData (recordId = '', data = {}, logProcessId = null) { | ||
let headers = {} | ||
headers[Enums.HEADER_RECORD_ID] = recordId | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_BPM, Enums.METHOD_PUT, data, headers) | ||
} | ||
deleteData (recordId = '') { | ||
deleteData (recordId = '', logProcessId = null) { | ||
let headers = {} | ||
headers[Enums.HEADER_RECORD_ID] = recordId | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_BPM, Enums.METHOD_DELETE, null, headers) | ||
} | ||
registerBPMRecord (processKey = '', currentUser = '') { | ||
registerBPMRecord (processKey = '', currentUser = '', logProcessId = null) { | ||
let config = { | ||
@@ -56,2 +74,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_BPM}/registerBPMRecord`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (processKey !== undefined && processKey !== null) { | ||
@@ -76,3 +98,3 @@ config.headers[Enums.HEADER_PROCESS_KEY] = processKey | ||
execute (processKey = '', bpmRecordId = '', optionSelected = '', currentUser = '', comments = '', data = {}) { | ||
execute (processKey = '', bpmRecordId = '', optionSelected = '', currentUser = '', comments = '', data = {}, logProcessId = null) { | ||
let config = { | ||
@@ -87,2 +109,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_BPM}/execute`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (processKey !== undefined && processKey !== null) { | ||
@@ -119,3 +145,3 @@ config.headers[Enums.HEADER_PROCESS_KEY] = processKey | ||
getRecordState (processKeys = [], bpmRecordIds = [], stepNames = [], responsibleUsers = [], relevantUsers = [], includeHistory = true, includeStepOptions = true, includeVisibleObjects = true, page = undefined, pageLimit = undefined) { | ||
getRecordState (processKeys = [], bpmRecordIds = [], stepNames = [], responsibleUsers = [], relevantUsers = [], includeHistory = true, includeStepOptions = true, includeVisibleObjects = true, page = undefined, pageLimit = undefined, logProcessId = null) { | ||
let config = { | ||
@@ -127,2 +153,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_BPM}/getRecordState`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (processKeys !== undefined && processKeys !== null) { | ||
@@ -179,3 +209,3 @@ config.headers[Enums.HEADER_PROCESS_KEYS] = processKeys.join(Enums.SEPARATOR_COMMA) | ||
getByProfileKey (profileKey = '') { | ||
getByProfileKey (profileKey = '', logProcessId = null) { | ||
let config = { | ||
@@ -187,2 +217,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_BPM}/getByProfileKey`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (profileKey !== undefined && profileKey !== null) { | ||
@@ -203,3 +237,3 @@ config.headers[Enums.HEADER_PROFILE_KEY] = profileKey | ||
clearHistoryData (profileKey = '') { | ||
clearHistoryData (profileKey = '', logProcessId = null) { | ||
let config = { | ||
@@ -211,2 +245,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_BPM}/clearHistoryData`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (profileKey !== undefined && profileKey !== null) { | ||
@@ -227,3 +265,3 @@ config.headers[Enums.HEADER_PROFILE_KEY] = profileKey | ||
getActiveSteps (processKey = '') { | ||
getActiveSteps (processKey = '', logProcessId = null) { | ||
let config = { | ||
@@ -235,2 +273,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_BPM}/getActiveSteps`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (processKey !== undefined && processKey !== null) { | ||
@@ -251,3 +293,3 @@ config.headers[Enums.HEADER_PROCESS_KEY] = processKey | ||
getActiveUsers (processKey = '') { | ||
getActiveUsers (processKey = '', logProcessId = null) { | ||
let config = { | ||
@@ -259,2 +301,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_BPM}/getActiveUsers`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (processKey !== undefined && processKey !== null) { | ||
@@ -261,0 +307,0 @@ config.headers[Enums.HEADER_PROCESS_KEY] = processKey |
@@ -19,9 +19,19 @@ 'use strict' | ||
postData (data = {}) { | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_CONNECTORS, Enums.METHOD_POST, data) | ||
postData (data = {}, logProcessId = null) { | ||
let headers = {} | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_CONNECTORS, Enums.METHOD_POST, data, headers) | ||
} | ||
getData (profileKeys = [], recordIds = [], slimResult = true) { | ||
getData (profileKeys = [], recordIds = [], slimResult = true, logProcessId = null) { | ||
let headers = {} | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
headers[Enums.HEADER_PROFILE_KEYS] = profileKeys.join(Enums.SEPARATOR_COMMA) | ||
@@ -34,4 +44,9 @@ headers[Enums.HEADER_RECORD_IDS] = recordIds.join(Enums.SEPARATOR_COMMA) | ||
putData (recordId = '', data = {}, resetService = false) { | ||
putData (recordId = '', data = {}, resetService = false, logProcessId = null) { | ||
let headers = {} | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
headers[Enums.HEADER_RECORD_ID] = recordId | ||
@@ -43,4 +58,9 @@ headers[Enums.HEADER_RESET_SERVICE] = resetService | ||
deleteData (recordId = '') { | ||
deleteData (recordId = '', logProcessId = null) { | ||
let headers = {} | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
headers[Enums.HEADER_RECORD_ID] = recordId | ||
@@ -51,3 +71,3 @@ | ||
execute (profileKey = '', routeKey = '', data = {}) { | ||
execute (profileKey = '', routeKey = '', data = {}, logProcessId = null) { | ||
let config = { | ||
@@ -62,2 +82,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_CONNECTORS}/execute`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (profileKey !== undefined && profileKey !== null) { | ||
@@ -64,0 +88,0 @@ config.headers[Enums.HEADER_PROFILE_KEY] = profileKey |
@@ -19,9 +19,19 @@ 'use strict' | ||
postData (data = {}) { | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_DATA_MAPPING, Enums.METHOD_POST, data) | ||
postData (data = {}, logProcessId = null) { | ||
let headers = {} | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_DATA_MAPPING, Enums.METHOD_POST, data, headers) | ||
} | ||
getData (profileKeys = [], recordIds = [], slimResult = true) { | ||
getData (profileKeys = [], recordIds = [], slimResult = true, logProcessId = null) { | ||
let headers = {} | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
headers[Enums.HEADER_PROFILE_KEYS] = profileKeys.join(Enums.SEPARATOR_COMMA) | ||
@@ -34,17 +44,27 @@ headers[Enums.HEADER_RECORD_IDS] = recordIds.join(Enums.SEPARATOR_COMMA) | ||
putData (recordId = '', data = {}) { | ||
putData (recordId = '', data = {}, logProcessId = null) { | ||
let headers = {} | ||
headers[Enums.HEADER_RECORD_ID] = recordId | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_DATA_MAPPING, Enums.METHOD_PUT, data, headers) | ||
} | ||
deleteData (recordId = '') { | ||
deleteData (recordId = '', logProcessId = null) { | ||
let headers = {} | ||
headers[Enums.HEADER_RECORD_ID] = recordId | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_DATA_MAPPING, Enums.METHOD_DELETE, null, headers) | ||
} | ||
execute (profileKey = '', data = {}) { | ||
execute (profileKey = '', data = {}, logProcessId = null) { | ||
let config = { | ||
@@ -59,2 +79,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_DATA_MAPPING}/execute`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (profileKey !== undefined && profileKey !== null) { | ||
@@ -61,0 +85,0 @@ config.headers[Enums.HEADER_PROFILE_KEY] = profileKey |
@@ -19,7 +19,13 @@ 'use strict' | ||
postData (data = {}) { | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_EVENTS, Enums.METHOD_POST, data) | ||
postData (data = {}, logProcessId = null) { | ||
let headers = {} | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_EVENTS, Enums.METHOD_POST, data, headers) | ||
} | ||
getData (profileKeys = [], recordIds = [], slimResult = true) { | ||
getData (profileKeys = [], recordIds = [], slimResult = true, logProcessId = null) { | ||
const headers = {} | ||
@@ -31,20 +37,34 @@ | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_EVENTS, Enums.METHOD_GET, null, headers) | ||
} | ||
putData (recordId = '', data = {}) { | ||
putData (recordId = '', data = {}, logProcessId = null) { | ||
const headers = {} | ||
headers[Enums.HEADER_RECORD_ID] = recordId | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_EVENTS, Enums.METHOD_PUT, data, headers) | ||
} | ||
deleteData (recordId = '') { | ||
deleteData (recordId = '', logProcessId = null) { | ||
const headers = {} | ||
headers[Enums.HEADER_RECORD_ID] = recordId | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_EVENTS, Enums.METHOD_DELETE, null, headers) | ||
} | ||
execute (profileKey = '', data = {}) { | ||
execute (profileKey = '', data = {}, logProcessId = null) { | ||
const config = { | ||
@@ -59,2 +79,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_EVENTS}/execute`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (profileKey !== undefined && profileKey !== null) { | ||
@@ -75,3 +99,3 @@ config.headers[Enums.HEADER_PROFILE_KEY] = profileKey | ||
subscribe (profileKey = '', data = {}) { | ||
subscribe (profileKey = '', data = {}, logProcessId = null) { | ||
const config = { | ||
@@ -86,2 +110,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_EVENTS}/subscribe`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (profileKey !== undefined && profileKey !== null) { | ||
@@ -88,0 +116,0 @@ config.headers[Enums.HEADER_PROFILE_KEY] = profileKey |
@@ -28,3 +28,3 @@ 'use strict' | ||
getFile (recordId = '', responseType = this.responseType.ARRAY_BUFFER) { | ||
getFile (recordId = '', responseType = this.responseType.ARRAY_BUFFER, logProcessId = null) { | ||
let config = { | ||
@@ -37,2 +37,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_FILES}`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (recordId !== undefined && recordId !== null) { | ||
@@ -53,3 +57,3 @@ config.headers[Enums.HEADER_RECORD_ID] = recordId | ||
uploadFile (fileName = '', contentType = '', data = {}) { | ||
uploadFile (fileName = '', contentType = '', data = {}, logProcessId = null) { | ||
let config = { | ||
@@ -62,2 +66,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_FILES}`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (fileName && fileName !== '') { | ||
@@ -82,3 +90,3 @@ config.headers[Enums.HEADER_FILE_NAME] = fileName | ||
deleteFile (recordId = '') { | ||
deleteFile (recordId = '', logProcessId = null) { | ||
let config = { | ||
@@ -90,2 +98,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_FILES}`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (recordId !== undefined && recordId !== null) { | ||
@@ -106,3 +118,3 @@ config.headers[Enums.HEADER_RECORD_ID] = recordId | ||
getFileName (recordId = '') { | ||
getFileName (recordId = '', logProcessId = null) { | ||
let config = { | ||
@@ -114,2 +126,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_FILES}/getFileName`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (recordId !== undefined && recordId !== null) { | ||
@@ -130,3 +146,3 @@ config.headers[Enums.HEADER_RECORD_ID] = recordId | ||
unzip (recordId = '') { | ||
unzip (recordId = '', logProcessId = null) { | ||
let config = { | ||
@@ -138,2 +154,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_FILES}/unzip`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (recordId !== undefined && recordId !== null) { | ||
@@ -140,0 +160,0 @@ config.headers[Enums.HEADER_RECORD_ID] = recordId |
@@ -32,9 +32,19 @@ 'use strict' | ||
postData (data = {}) { | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_KEYWORDS, Enums.METHOD_POST, data) | ||
postData (data = {}, logProcessId = null) { | ||
let headers = {} | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_KEYWORDS, Enums.METHOD_POST, data, headers) | ||
} | ||
getData (profileKeys = [], recordIds = [], slimResult = true) { | ||
getData (profileKeys = [], recordIds = [], slimResult = true, logProcessId = null) { | ||
let headers = {} | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
headers[Enums.HEADER_PROFILE_KEYS] = profileKeys.join(Enums.SEPARATOR_COMMA) | ||
@@ -47,4 +57,9 @@ headers[Enums.HEADER_RECORD_IDS] = recordIds.join(Enums.SEPARATOR_COMMA) | ||
putData (recordId = '', data = {}) { | ||
putData (recordId = '', data = {}, logProcessId = null) { | ||
let headers = {} | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
headers[Enums.HEADER_RECORD_ID] = recordId | ||
@@ -55,4 +70,9 @@ | ||
deleteData (recordId = '') { | ||
deleteData (recordId = '', logProcessId = null) { | ||
let headers = {} | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
headers[Enums.HEADER_RECORD_ID] = recordId | ||
@@ -63,3 +83,3 @@ | ||
getByProfileKey (profileKey = '', sort = '', outputFormat = '') { | ||
getByProfileKey (profileKey = '', sort = '', outputFormat = '', logProcessId = null) { | ||
let config = { | ||
@@ -71,2 +91,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_KEYWORDS}/getByProfileKey`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (profileKey !== undefined && profileKey !== null) { | ||
@@ -95,3 +119,3 @@ config.headers[Enums.HEADER_PROFILE_KEY] = profileKey | ||
getProfileKeysByGroup (groupName = '', sort = '') { | ||
getProfileKeysByGroup (groupName = '', sort = '', logProcessId = null) { | ||
let config = { | ||
@@ -103,2 +127,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_KEYWORDS}/getProfileKeysByGroup`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (groupName !== undefined && groupName !== null) { | ||
@@ -123,3 +151,3 @@ config.headers[Enums.HEADER_GROUP_NAME] = groupName | ||
getLabelByValue (profileKey = '', value = '', outputFormat = '') { | ||
getLabelByValue (profileKey = '', value = '', outputFormat = '', logProcessId = null) { | ||
let config = { | ||
@@ -131,2 +159,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_KEYWORDS}/getLabelByValue`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (profileKey !== undefined && profileKey !== null) { | ||
@@ -155,3 +187,3 @@ config.headers[Enums.HEADER_PROFILE_KEY] = profileKey | ||
getValueByLabel (profileKey = '', label = '', outputFormat = '') { | ||
getValueByLabel (profileKey = '', label = '', outputFormat = '', logProcessId = null) { | ||
let config = { | ||
@@ -163,2 +195,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_KEYWORDS}/getValueByLabel`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (profileKey !== undefined && profileKey !== null) { | ||
@@ -165,0 +201,0 @@ config.headers[Enums.HEADER_PROFILE_KEY] = profileKey |
@@ -24,9 +24,19 @@ 'use strict' | ||
postData (data = {}) { | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_NUMBERING, Enums.METHOD_POST, data) | ||
postData (data = {}, logProcessId = null) { | ||
let headers = {} | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_NUMBERING, Enums.METHOD_POST, data, headers) | ||
} | ||
getData (profileKeys = [], recordIds = [], slimResult = true) { | ||
getData (profileKeys = [], recordIds = [], slimResult = true, logProcessId = null) { | ||
let headers = {} | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
headers[Enums.HEADER_PROFILE_KEYS] = profileKeys.join(Enums.SEPARATOR_COMMA) | ||
@@ -39,4 +49,9 @@ headers[Enums.HEADER_RECORD_IDS] = recordIds.join(Enums.SEPARATOR_COMMA) | ||
putData (recordId = '', data = {}) { | ||
putData (recordId = '', data = {}, logProcessId = null) { | ||
let headers = {} | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
headers[Enums.HEADER_RECORD_ID] = recordId | ||
@@ -47,4 +62,9 @@ | ||
deleteData (recordId = '') { | ||
deleteData (recordId = '', logProcessId = null) { | ||
let headers = {} | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
headers[Enums.HEADER_RECORD_ID] = recordId | ||
@@ -55,3 +75,3 @@ | ||
generate (profileKey = '', outputFormat = '', data = {}) { | ||
generate (profileKey = '', outputFormat = '', data = {}, logProcessId = null) { | ||
let config = { | ||
@@ -66,2 +86,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_NUMBERING}/generate`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (profileKey !== undefined && profileKey !== null) { | ||
@@ -86,3 +110,3 @@ config.headers[Enums.HEADER_PROFILE_KEY] = profileKey | ||
resetCounters (recordId = '') { | ||
resetCounters (recordId = '', logProcessId = null) { | ||
let config = { | ||
@@ -94,2 +118,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_NUMBERING}/resetCounters`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (recordId !== undefined && recordId !== null) { | ||
@@ -96,0 +124,0 @@ config.headers[Enums.HEADER_RECORD_ID] = recordId |
@@ -19,7 +19,13 @@ 'use strict' | ||
postData (data = {}) { | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_ROLES, Enums.METHOD_POST, data) | ||
postData (data = {}, logProcessId = null) { | ||
let headers = {} | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_ROLES, Enums.METHOD_POST, data, headers) | ||
} | ||
getData (profileKeys = [], recordIds = [], slimResult = true) { | ||
getData (profileKeys = [], recordIds = [], slimResult = true, logProcessId = null) { | ||
let headers = {} | ||
@@ -31,20 +37,32 @@ | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_ROLES, Enums.METHOD_GET, null, headers) | ||
} | ||
putData (recordId = '', data = {}) { | ||
putData (recordId = '', data = {}, logProcessId = null) { | ||
let headers = {} | ||
headers[Enums.HEADER_RECORD_ID] = recordId | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_ROLES, Enums.METHOD_PUT, data, headers) | ||
} | ||
deleteData (recordId = '') { | ||
deleteData (recordId = '', logProcessId = null) { | ||
let headers = {} | ||
headers[Enums.HEADER_RECORD_ID] = recordId | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_ROLES, Enums.METHOD_DELETE, null, headers) | ||
} | ||
getRole (roleNames = [], conditionalLevels = [], data = {}) { | ||
getRole (roleNames = [], conditionalLevels = [], data = {}, logProcessId = null) { | ||
let config = { | ||
@@ -59,2 +77,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_ROLES}/getRole`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (roleNames !== undefined && roleNames !== null) { | ||
@@ -79,3 +101,3 @@ config.headers[Enums.HEADER_ROLE_NAMES] = roleNames.join(Enums.SEPARATOR_COMMA) | ||
assignRole (processKey = '', bpmRecordId = '', roleName = '', currentUser = '', responsibleUsers = []) { | ||
assignRole (processKey = '', bpmRecordId = '', roleName = '', currentUser = '', responsibleUsers = [], logProcessId = null) { | ||
let config = { | ||
@@ -87,2 +109,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_ROLES}/assignRole`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (processKey !== undefined && processKey !== null) { | ||
@@ -119,3 +145,3 @@ config.headers[Enums.HEADER_PROCESS_KEY] = processKey | ||
getAssignedRoles (processKey = '', bpmRecordId = '', roleNames = []) { | ||
getAssignedRoles (processKey = '', bpmRecordId = '', roleNames = [], logProcessId = null) { | ||
let config = { | ||
@@ -127,2 +153,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_ROLES}/getAssignedRoles`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (processKey !== undefined && processKey !== null) { | ||
@@ -151,3 +181,3 @@ config.headers[Enums.HEADER_PROCESS_KEY] = processKey | ||
changeConditionalLevels (recordId = '', conditionalLevels = []) { | ||
changeConditionalLevels (recordId = '', conditionalLevels = [], logProcessId = null) { | ||
let config = { | ||
@@ -159,2 +189,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_ROLES}/changeConditionalLevels`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (recordId !== undefined && recordId !== null) { | ||
@@ -179,3 +213,3 @@ config.headers[Enums.HEADER_RECORD_ID] = recordId | ||
reAssignResponsibleUser (recordId = '', responsibleUser = '') { | ||
reAssignResponsibleUser (recordId = '', responsibleUser = '', logProcessId = null) { | ||
let config = { | ||
@@ -187,2 +221,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_ROLES}/reAssignResponsibleUser`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (recordId !== undefined && recordId !== null) { | ||
@@ -189,0 +227,0 @@ config.headers[Enums.HEADER_RECORD_ID] = recordId |
@@ -19,7 +19,13 @@ 'use strict' | ||
postData (data = {}) { | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_TEMPLATES, Enums.METHOD_POST, data) | ||
postData (data = {}, logProcessId = null) { | ||
let headers = {} | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_TEMPLATES, Enums.METHOD_POST, data, headers) | ||
} | ||
getData (profileKeys = [], recordIds = [], slimResult = true) { | ||
getData (profileKeys = [], recordIds = [], slimResult = true, logProcessId = null) { | ||
let headers = {} | ||
@@ -31,20 +37,34 @@ | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_TEMPLATES, Enums.METHOD_GET, null, headers) | ||
} | ||
putData (recordId = '', data = {}) { | ||
putData (recordId = '', data = {}, logProcessId = null) { | ||
let headers = {} | ||
headers[Enums.HEADER_RECORD_ID] = recordId | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_TEMPLATES, Enums.METHOD_PUT, data, headers) | ||
} | ||
deleteData (recordId = '') { | ||
deleteData (recordId = '', logProcessId = null) { | ||
let headers = {} | ||
headers[Enums.HEADER_RECORD_ID] = recordId | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_TEMPLATES, Enums.METHOD_DELETE, null, headers) | ||
} | ||
execute (profileKey = '', data = {}) { | ||
execute (profileKey = '', data = {}, logProcessId = null) { | ||
let config = { | ||
@@ -59,2 +79,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_TEMPLATES}/execute`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (profileKey !== undefined && profileKey !== null) { | ||
@@ -61,0 +85,0 @@ config.headers[Enums.HEADER_PROFILE_KEY] = profileKey |
@@ -32,9 +32,19 @@ 'use strict' | ||
postData (data = {}) { | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_TIER_STRUCTURES, Enums.METHOD_POST, data) | ||
postData (data = {}, logProcessId = null) { | ||
let headers = {} | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
return Utils.executeCRUDRequest(this.apiServerUrl, this.apiKey, this.teamId, Enums.MODULE_KEY_TIER_STRUCTURES, Enums.METHOD_POST, data, headers) | ||
} | ||
getData (profileKeys = [], recordIds = [], slimResult = true) { | ||
getData (profileKeys = [], recordIds = [], slimResult = true, logProcessId = null) { | ||
let headers = {} | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
headers[Enums.HEADER_PROFILE_KEYS] = profileKeys.join(Enums.SEPARATOR_COMMA) | ||
@@ -47,4 +57,9 @@ headers[Enums.HEADER_RECORD_IDS] = recordIds.join(Enums.SEPARATOR_COMMA) | ||
putData (recordId = '', data = {}) { | ||
putData (recordId = '', data = {}, logProcessId = null) { | ||
let headers = {} | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
headers[Enums.HEADER_RECORD_ID] = recordId | ||
@@ -55,4 +70,9 @@ | ||
deleteData (recordId = '') { | ||
deleteData (recordId = '', logProcessId = null) { | ||
let headers = {} | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
headers[Enums.HEADER_RECORD_ID] = recordId | ||
@@ -63,3 +83,3 @@ | ||
getTierByKey (tierKeys = [], includeValues = true, includeMetaData = false, includeTierEntries = false, sortValues = '', valuesOutputFormat = '') { | ||
getTierByKey (tierKeys = [], includeValues = true, includeMetaData = false, includeTierEntries = false, sortValues = '', valuesOutputFormat = '', logProcessId = null) { | ||
let config = { | ||
@@ -71,2 +91,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_TIER_STRUCTURES}/getTierByKey`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (tierKeys !== undefined && tierKeys !== null) { | ||
@@ -73,0 +97,0 @@ config.headers[Enums.HEADER_TIER_KEYS] = tierKeys.join(Enums.SEPARATOR_COMMA) |
@@ -28,3 +28,3 @@ 'use strict' | ||
encodeXML (data = '') { | ||
encodeXML (data = '', logProcessId = null) { | ||
let config = { | ||
@@ -39,2 +39,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_UTILS}/encodeXML`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (this.apiKey !== undefined && this.apiKey !== null) { | ||
@@ -51,3 +55,3 @@ config.headers[Enums.HEADER_API_KEY] = this.apiKey | ||
decodeXML (data = '') { | ||
decodeXML (data = '', logProcessId = null) { | ||
let config = { | ||
@@ -62,2 +66,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_UTILS}/decodeXML`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (this.apiKey !== undefined && this.apiKey !== null) { | ||
@@ -74,3 +82,3 @@ config.headers[Enums.HEADER_API_KEY] = this.apiKey | ||
XMLToJS (data = '') { | ||
XMLToJS (data = '', logProcessId = null) { | ||
let config = { | ||
@@ -85,2 +93,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_UTILS}/XMLToJS`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (this.apiKey !== undefined && this.apiKey !== null) { | ||
@@ -97,3 +109,3 @@ config.headers[Enums.HEADER_API_KEY] = this.apiKey | ||
JSToXML (data = {}) { | ||
JSToXML (data = {}, logProcessId = null) { | ||
let config = { | ||
@@ -108,2 +120,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_UTILS}/JSToXML`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (this.apiKey !== undefined && this.apiKey !== null) { | ||
@@ -120,3 +136,3 @@ config.headers[Enums.HEADER_API_KEY] = this.apiKey | ||
html2json (data = '') { | ||
html2json (data = '', logProcessId = null) { | ||
let config = { | ||
@@ -131,2 +147,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_UTILS}/html2json`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (this.apiKey !== undefined && this.apiKey !== null) { | ||
@@ -143,3 +163,3 @@ config.headers[Enums.HEADER_API_KEY] = this.apiKey | ||
jsonDiff (data = '') { | ||
jsonDiff (data = '', logProcessId = null) { | ||
let config = { | ||
@@ -154,2 +174,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_UTILS}/jsonDiff`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (this.apiKey !== undefined && this.apiKey !== null) { | ||
@@ -166,4 +190,61 @@ config.headers[Enums.HEADER_API_KEY] = this.apiKey | ||
generatePDF (data = {}) { | ||
generateOCR (recordId, logProcessId = null) { | ||
let config = { | ||
url: `${this.apiServerUrl}/${Enums.MODULE_KEY_UTILS}/generateOCR`, | ||
method: Enums.METHOD_POST, | ||
headers: {} | ||
} | ||
config.headers[Enums.HEADER_CONTENT_TYPE] = Enums.HEADER_APPLICATION_JSON | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (this.apiKey !== undefined && this.apiKey !== null) { | ||
config.headers[Enums.HEADER_API_KEY] = this.apiKey | ||
} | ||
if (this.teamId !== undefined && this.teamId !== null) { | ||
config.headers[Enums.HEADER_TEAM_NAME] = this.teamId | ||
} | ||
if (recordId !== undefined && recordId !== null) { | ||
config.headers[Enums.HEADER_RECORD_ID] = recordId | ||
} | ||
return Utilities.executeRequest(config) | ||
} | ||
generateUsername (fullName, data = [], logProcessId = null) { | ||
let config = { | ||
url: `${this.apiServerUrl}/${Enums.MODULE_KEY_UTILS}/generateUsername`, | ||
method: Enums.METHOD_POST, | ||
headers: {}, | ||
data | ||
} | ||
config.headers[Enums.HEADER_CONTENT_TYPE] = Enums.HEADER_APPLICATION_JSON | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (this.apiKey !== undefined && this.apiKey !== null) { | ||
config.headers[Enums.HEADER_API_KEY] = this.apiKey | ||
} | ||
if (this.teamId !== undefined && this.teamId !== null) { | ||
config.headers[Enums.HEADER_TEAM_NAME] = this.teamId | ||
} | ||
if (fullName !== undefined && fullName !== null) { | ||
config.headers[Enums.HEADER_FULL_NAME] = fullName | ||
} | ||
return Utilities.executeRequest(config) | ||
} | ||
generatePDF (data = {}, logProcessId = null) { | ||
let config = { | ||
url: `${this.apiServerUrl}/${Enums.MODULE_KEY_UTILS}/generatePDF`, | ||
@@ -177,2 +258,6 @@ method: Enums.METHOD_POST, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (this.apiKey !== undefined && this.apiKey !== null) { | ||
@@ -189,3 +274,3 @@ config.headers[Enums.HEADER_API_KEY] = this.apiKey | ||
generateUUID () { | ||
generateUUID (logProcessId = null) { | ||
let config = { | ||
@@ -197,2 +282,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_UTILS}/generateUUID`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (this.apiKey !== undefined && this.apiKey !== null) { | ||
@@ -209,3 +298,3 @@ config.headers[Enums.HEADER_API_KEY] = this.apiKey | ||
formatDateTime (dateTimeValue = '', formatKey = '') { | ||
formatDateTime (dateTimeValue = '', formatKey = '', logProcessId = null) { | ||
let config = { | ||
@@ -217,2 +306,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_UTILS}/formatDateTime`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (dateTimeValue !== undefined && dateTimeValue !== null) { | ||
@@ -237,3 +330,3 @@ config.headers[Enums.HEADER_DATE_TIME_VALUE] = dateTimeValue | ||
account () { | ||
account (logProcessId = null) { | ||
let config = { | ||
@@ -245,2 +338,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_ADMIN}/account`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (this.apiKey !== undefined && this.apiKey !== null) { | ||
@@ -257,3 +354,3 @@ config.headers[Enums.HEADER_API_KEY] = this.apiKey | ||
dashboardReports (startDate, endDate) { | ||
dashboardReports (startDate, endDate, logProcessId = null) { | ||
let config = { | ||
@@ -265,2 +362,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_REPORTS}/dashboard`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (startDate !== undefined && startDate !== null) { | ||
@@ -285,3 +386,3 @@ config.headers[Enums.HEADER_START_DATE] = startDate | ||
exportData (includeModules) { | ||
exportData (includeModules, logProcessId = null) { | ||
let config = { | ||
@@ -294,2 +395,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_UTILS}/exportAllData`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (includeModules !== undefined && includeModules !== null) { | ||
@@ -310,3 +415,3 @@ config.headers[Enums.HEADER_INCLUDE_MODULES] = includeModules | ||
importData (fileId) { | ||
importData (fileId, logProcessId = null) { | ||
let config = { | ||
@@ -318,2 +423,6 @@ url: `${this.apiServerUrl}/${Enums.MODULE_KEY_UTILS}/importData`, | ||
if (logProcessId !== undefined && logProcessId !== null) { | ||
config.headers[Enums.HEADER_LOG_PROCESS_ID] = logProcessId | ||
} | ||
if (fileId !== undefined && fileId !== null) { | ||
@@ -320,0 +429,0 @@ config.headers[Enums.HEADER_FILE_ID] = fileId |
{ | ||
"name": "agilite", | ||
"license": "MIT", | ||
"version": "6.7.0", | ||
"version": "6.7.1", | ||
"description": "A NodeJS module that provides seamless interactions with Agilit-e APIs", | ||
@@ -6,0 +6,0 @@ "homepage": "https://agilite.io", |
@@ -120,2 +120,41 @@ 'use strict' | ||
}) | ||
it('Generate Username - No Username List', () => { | ||
agilite.Utils.generateUsername('John Doe') | ||
.then((response) => { | ||
expect(TypeDetect(response.data)).to.equal(EnumsTypeDetect.STRING) | ||
expect(response.data).to.equal('jdoe') | ||
}) | ||
}) | ||
it('Generate Username - Username List', () => { | ||
agilite.Utils.generateUsername('John Doe', ['jdoe', 'jdoe1']) | ||
.then((response) => { | ||
expect(TypeDetect(response.data)).to.equal(EnumsTypeDetect.STRING) | ||
expect(response.data).to.equal('jdoe2') | ||
}) | ||
}) | ||
it('Generate Username - Name with middle name', () => { | ||
agilite.Utils.generateUsername('John Mike Doe') | ||
.then((response) => { | ||
expect(TypeDetect(response.data)).to.equal(EnumsTypeDetect.STRING) | ||
expect(response.data).to.equal('jdoe') | ||
}) | ||
}) | ||
it('Generate Username - Full Name including middle name and User List', () => { | ||
agilite.Utils.generateUsername('John Mike Doe', ['jdoe']) | ||
.then((response) => { | ||
expect(TypeDetect(response.data)).to.equal(EnumsTypeDetect.STRING) | ||
expect(response.data).to.equal('jmdoe') | ||
}) | ||
}) | ||
it('Generate Username - Invalid', () => { | ||
agilite.Utils.generateUsername() | ||
.catch((err) => { | ||
expect(err.response.data.errorMessage).to.equal('Please provide a \'full-name\' in the Header Parameter') | ||
}) | ||
}) | ||
}) |
@@ -286,3 +286,3 @@ 'use strict' | ||
it('Init Process - No Params (Negative)', (done) => { | ||
agilite.BatchLogging.initProcess() | ||
agilite.BatchLogging.initLogProcess() | ||
.catch((err) => { | ||
@@ -302,3 +302,3 @@ expect(err).to.haveOwnProperty('response') | ||
it('Complete Process - No Params (Negative)', (done) => { | ||
agilite.BatchLogging.completeProcess() | ||
agilite.BatchLogging.completeLogProcess() | ||
.catch((err) => { | ||
@@ -318,3 +318,3 @@ expect(err).to.haveOwnProperty('response') | ||
it('Complete Process - Invalid Key (Negative)', (done) => { | ||
agilite.BatchLogging.completeProcess('invalid') | ||
agilite.BatchLogging.completeLogProcess('invalid') | ||
.catch((err) => { | ||
@@ -321,0 +321,0 @@ expect(err).to.haveOwnProperty('response') |
@@ -49,2 +49,3 @@ const Enums = { | ||
HEADER_FILE_NAME: 'file-name', | ||
HEADER_FULL_NAME: 'full-name', | ||
HEADER_TIER_KEYS: 'tier-keys', | ||
@@ -56,2 +57,3 @@ HEADER_INCLUDE_VALUES: 'include-values', | ||
HEADER_VALUES_OUTPUT_FORMAT: 'values-output-format', | ||
HEADER_LOG_PROCESS_ID: 'log-process-id', | ||
METHOD_DELETE: 'delete', | ||
@@ -58,0 +60,0 @@ METHOD_GET: 'get', |
324897
7125