Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / services / ami / preview / rpcDb.js
index 6b77ea5..e85613f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x277c=['endtime','connectedlinename','membername','from-sip','exten','holdtime','lastAssignedTo','queuecallerexitreason','COMPLETED','create','[voiceQueueReport]\x20','getContactRecallMe','[GetContactRecallMe]\x20','rescheduleContactInQueue','[rescheduleContactInQueue]\x20','util','../../../config/logger','preview','lodash','../rpc/cmHopper','../rpc/cmHopperFinal','../rpc/cmHopperHistory','../rpc/cmHopperBlack','../rpc/voiceQueueRt','error','resolve','createHistory','catch','[createHistory]\x20','then','checkIsBlackList','[checkIsBlackList]\x20','getContactPreview','createAgentHistory','createCustomerHistory','createCustomerFinal','rescheduleContact','UserId','active','[rescheduleContact]\x20','countReScheduled','unlockContact','[unlockContact]\x20','disableContact','[activeContact]\x20','crateCustomerReportQueue','type','uniqueid','calleridnum','calleridname','queue','queuecallerjoinAt','answertime','queuecallercompleteAt'];(function(_0x176e12,_0x180e8a){var _0x4bef6d=function(_0x1e895a){while(--_0x1e895a){_0x176e12['push'](_0x176e12['shift']());}};_0x4bef6d(++_0x180e8a);}(_0x277c,0x153));var _0xc277=function(_0x3bf7b3,_0x305a6f){_0x3bf7b3=_0x3bf7b3-0x0;var _0x15157d=_0x277c[_0x3bf7b3];return _0x15157d;};'use strict';var util=require(_0xc277('0x0'));var BPromise=require('bluebird');var logger=require(_0xc277('0x1'))(_0xc277('0x2'));var _=require(_0xc277('0x3'));var cmHopper=require(_0xc277('0x4'));var cmHopperFinal=require(_0xc277('0x5'));var cmHopperHistory=require(_0xc277('0x6'));var cmHopperBlack=require(_0xc277('0x7'));var voiceQueueRt=require(_0xc277('0x8'));var agentReportPreview=require('../rpc/agentReportPreview');var voiceQueueReport=require('../rpc/voiceQueueReport');function loggerCatch(_0x1a6582){return function(_0x5a4f03){logger[_0xc277('0x9')](_0x1a6582,util['inspect'](_0x5a4f03,{'showHidden':![],'depth':null}));};}function create(_0x378158){return BPromise[_0xc277('0xa')]()['then'](cmHopperHistory[_0xc277('0xb')](_0x378158))[_0xc277('0xc')](loggerCatch(_0xc277('0xd')));}function createAgent(_0x1b1db0){return BPromise[_0xc277('0xa')]()[_0xc277('0xe')](agentReportPreview['createHistory'](_0x1b1db0))['catch'](loggerCatch(_0xc277('0xd')));}function moveContact(_0x1632bb){return BPromise[_0xc277('0xa')]()[_0xc277('0xe')](cmHopper['moveContactManagedDialer'](_0x1632bb,!![]))[_0xc277('0xc')](loggerCatch('[moveContactManagedDialer]\x20'));}exports[_0xc277('0xf')]=function(_0x2bba87){return BPromise[_0xc277('0xa')]()[_0xc277('0xe')](cmHopperBlack['checkIsBlackList'](_0x2bba87))[_0xc277('0xc')](loggerCatch(_0xc277('0x10')));};exports[_0xc277('0x11')]=function(_0x4de960){return BPromise['resolve']()[_0xc277('0xe')](cmHopper['getContactPreview'](_0x4de960))[_0xc277('0xc')](loggerCatch('[getContactPreview]\x20'));};exports[_0xc277('0xb')]=function(_0x1162b9,_0x15f560){create(_0x1162b9)['catch'](loggerCatch(_0x15f560));moveContact(_0x1162b9)['catch'](loggerCatch(_0x15f560));};exports[_0xc277('0x12')]=function(_0x4d23a7,_0x4d8351){createAgent(_0x4d23a7)[_0xc277('0xc')](loggerCatch(_0x4d8351));};exports[_0xc277('0x13')]=function(_0x3b247e,_0x176dfb){create(_0x3b247e)[_0xc277('0xc')](loggerCatch(_0x176dfb));};exports[_0xc277('0x14')]=function(_0x391cc3,_0x4a7a79){moveContact(_0x391cc3)['catch'](loggerCatch(_0x4a7a79));};exports[_0xc277('0x15')]=function(_0x28900e,_0x2bdc25,_0x28b7b1){if(_0x2bdc25){_0x28900e[_0xc277('0x16')]=null;}if(_0x28b7b1){_0x28900e[_0xc277('0x17')]=![];}return BPromise[_0xc277('0xa')]()[_0xc277('0xe')](cmHopper[_0xc277('0x15')](_0x28900e))[_0xc277('0xc')](loggerCatch(_0xc277('0x18')));};exports['countReScheduled']=function(_0x2b9936){return BPromise[_0xc277('0xa')]()['then'](cmHopper[_0xc277('0x19')](_0x2b9936))['catch'](loggerCatch('[countReScheduled]\x20'));};exports[_0xc277('0x1a')]=function(_0x57b03){return BPromise[_0xc277('0xa')]()[_0xc277('0xe')](cmHopper[_0xc277('0x1a')]({'UserId':null},_0x57b03,0x1))[_0xc277('0xc')](loggerCatch(_0xc277('0x1b')));};exports[_0xc277('0x1c')]=function(_0xf903ea){return BPromise[_0xc277('0xa')]()[_0xc277('0xe')](cmHopper['unlockContact']({'active':![]},_0xf903ea,0x1))['catch'](loggerCatch(_0xc277('0x1d')));};exports[_0xc277('0x1e')]=function(_0x4ebb0f){var _0x4efc1e={};_0x4efc1e[_0xc277('0x1f')]=_0x4ebb0f[_0xc277('0x1f')];_0x4efc1e[_0xc277('0x20')]=_0x4ebb0f[_0xc277('0x20')];_0x4efc1e[_0xc277('0x21')]=_0x4ebb0f['calleridnum'];_0x4efc1e[_0xc277('0x22')]=_0x4ebb0f['calleridname'];_0x4efc1e[_0xc277('0x23')]=_0x4ebb0f[_0xc277('0x23')];_0x4efc1e[_0xc277('0x24')]=_0x4ebb0f[_0xc277('0x25')];_0x4efc1e['queuecallerleaveAt']=_0x4ebb0f[_0xc277('0x25')];_0x4efc1e['queuecallercomplete']=0x1;_0x4efc1e[_0xc277('0x26')]=_0x4ebb0f[_0xc277('0x27')];_0x4efc1e[_0xc277('0x28')]=_0x4ebb0f[_0xc277('0x29')];_0x4efc1e['context']=_0xc277('0x2a');_0x4efc1e[_0xc277('0x2b')]='xcally-motion-preview';_0x4efc1e[_0xc277('0x2c')]=0x0;_0x4efc1e['assigned']=0x1;_0x4efc1e[_0xc277('0x2d')]=_0x4ebb0f[_0xc277('0x29')];_0x4efc1e[_0xc277('0x2e')]=_0xc277('0x2f');return BPromise[_0xc277('0xa')]()[_0xc277('0xe')](voiceQueueReport[_0xc277('0x30')](_0x4efc1e))[_0xc277('0xc')](loggerCatch(_0xc277('0x31')));};exports[_0xc277('0x32')]=function(_0xdc94a1,_0x5b2329){return BPromise[_0xc277('0xa')]()[_0xc277('0xe')](cmHopper[_0xc277('0x32')](_0xdc94a1,_0x5b2329))['catch'](loggerCatch(_0xc277('0x33')));};exports[_0xc277('0x34')]=function(_0x18986b){return BPromise[_0xc277('0xa')]()[_0xc277('0xe')](cmHopper['rescheduleContact'](_0x18986b,!![],!![]))['catch'](loggerCatch(_0xc277('0x35')));};
\ No newline at end of file
+var _0x56e7=['xcally-motion-preview','holdtime','assigned','lastAssignedTo','queuecallerexitreason','create','[voiceQueueReport]\x20','getContactRecallMe','[GetContactRecallMe]\x20','rescheduleContactInQueue','[rescheduleContactInQueue]\x20','bluebird','../../../config/logger','lodash','../rpc/cmHopper','../rpc/cmHopperFinal','../rpc/cmHopperHistory','../rpc/cmHopperBlack','../rpc/voiceQueueRt','../rpc/agentReportPreview','error','inspect','resolve','createHistory','catch','[createHistory]\x20','then','[moveContactManagedDialer]\x20','checkIsBlackList','[getContactPreview]\x20','createAgentHistory','createCustomerHistory','createCustomerFinal','rescheduleContact','UserId','active','[rescheduleContact]\x20','countReScheduled','[countReScheduled]\x20','[unlockContact]\x20','disableContact','[activeContact]\x20','crateCustomerReportQueue','type','uniqueid','calleridnum','calleridname','queue','answertime','queuecallercomplete','endtime','connectedlinename','membername','context','from-sip','exten'];(function(_0x284a61,_0x231686){var _0x220e3c=function(_0x104496){while(--_0x104496){_0x284a61['push'](_0x284a61['shift']());}};_0x220e3c(++_0x231686);}(_0x56e7,0x7b));var _0x756e=function(_0x465ef6,_0x8adf2a){_0x465ef6=_0x465ef6-0x0;var _0x5cf599=_0x56e7[_0x465ef6];return _0x5cf599;};'use strict';var util=require('util');var BPromise=require(_0x756e('0x0'));var logger=require(_0x756e('0x1'))('preview');var _=require(_0x756e('0x2'));var cmHopper=require(_0x756e('0x3'));var cmHopperFinal=require(_0x756e('0x4'));var cmHopperHistory=require(_0x756e('0x5'));var cmHopperBlack=require(_0x756e('0x6'));var voiceQueueRt=require(_0x756e('0x7'));var agentReportPreview=require(_0x756e('0x8'));var voiceQueueReport=require('../rpc/voiceQueueReport');function loggerCatch(_0x3b3b8f){return function(_0x404189){logger[_0x756e('0x9')](_0x3b3b8f,util[_0x756e('0xa')](_0x404189,{'showHidden':![],'depth':null}));};}function create(_0x5c8589){return BPromise[_0x756e('0xb')]()['then'](cmHopperHistory[_0x756e('0xc')](_0x5c8589))[_0x756e('0xd')](loggerCatch(_0x756e('0xe')));}function createAgent(_0x4738dc){return BPromise['resolve']()['then'](agentReportPreview[_0x756e('0xc')](_0x4738dc))[_0x756e('0xd')](loggerCatch(_0x756e('0xe')));}function moveContact(_0x4c4d7c){return BPromise[_0x756e('0xb')]()[_0x756e('0xf')](cmHopper['moveContactManagedDialer'](_0x4c4d7c,!![]))['catch'](loggerCatch(_0x756e('0x10')));}exports['checkIsBlackList']=function(_0x459237){return BPromise[_0x756e('0xb')]()[_0x756e('0xf')](cmHopperBlack[_0x756e('0x11')](_0x459237))[_0x756e('0xd')](loggerCatch('[checkIsBlackList]\x20'));};exports['getContactPreview']=function(_0x36de2a){return BPromise[_0x756e('0xb')]()[_0x756e('0xf')](cmHopper['getContactPreview'](_0x36de2a))['catch'](loggerCatch(_0x756e('0x12')));};exports[_0x756e('0xc')]=function(_0x1cf73d,_0x296b14){create(_0x1cf73d)[_0x756e('0xd')](loggerCatch(_0x296b14));moveContact(_0x1cf73d)[_0x756e('0xd')](loggerCatch(_0x296b14));};exports[_0x756e('0x13')]=function(_0x1a8614,_0xb17214){createAgent(_0x1a8614)['catch'](loggerCatch(_0xb17214));};exports[_0x756e('0x14')]=function(_0x47c3c4,_0x4d7581){create(_0x47c3c4)[_0x756e('0xd')](loggerCatch(_0x4d7581));};exports[_0x756e('0x15')]=function(_0x30bc11,_0xe26ae){moveContact(_0x30bc11)[_0x756e('0xd')](loggerCatch(_0xe26ae));};exports[_0x756e('0x16')]=function(_0xb00195,_0x27e1eb,_0x88787d){if(_0x27e1eb){_0xb00195[_0x756e('0x17')]=null;}if(_0x88787d){_0xb00195[_0x756e('0x18')]=![];}return BPromise[_0x756e('0xb')]()[_0x756e('0xf')](cmHopper[_0x756e('0x16')](_0xb00195))[_0x756e('0xd')](loggerCatch(_0x756e('0x19')));};exports['countReScheduled']=function(_0x335523){return BPromise['resolve']()[_0x756e('0xf')](cmHopper[_0x756e('0x1a')](_0x335523))[_0x756e('0xd')](loggerCatch(_0x756e('0x1b')));};exports['unlockContact']=function(_0x3ef5ef){return BPromise[_0x756e('0xb')]()[_0x756e('0xf')](cmHopper['unlockContact']({'UserId':null},_0x3ef5ef,0x1))[_0x756e('0xd')](loggerCatch(_0x756e('0x1c')));};exports[_0x756e('0x1d')]=function(_0x555912){return BPromise[_0x756e('0xb')]()[_0x756e('0xf')](cmHopper['unlockContact']({'active':![]},_0x555912,0x1))[_0x756e('0xd')](loggerCatch(_0x756e('0x1e')));};exports[_0x756e('0x1f')]=function(_0x5a1cf0){var _0x3c332e={};_0x3c332e[_0x756e('0x20')]=_0x5a1cf0['type'];_0x3c332e[_0x756e('0x21')]=_0x5a1cf0[_0x756e('0x21')];_0x3c332e['calleridnum']=_0x5a1cf0[_0x756e('0x22')];_0x3c332e[_0x756e('0x23')]=_0x5a1cf0[_0x756e('0x23')];_0x3c332e[_0x756e('0x24')]=_0x5a1cf0[_0x756e('0x24')];_0x3c332e['queuecallerjoinAt']=_0x5a1cf0[_0x756e('0x25')];_0x3c332e['queuecallerleaveAt']=_0x5a1cf0['answertime'];_0x3c332e[_0x756e('0x26')]=0x1;_0x3c332e['queuecallercompleteAt']=_0x5a1cf0[_0x756e('0x27')];_0x3c332e[_0x756e('0x28')]=_0x5a1cf0[_0x756e('0x29')];_0x3c332e[_0x756e('0x2a')]=_0x756e('0x2b');_0x3c332e[_0x756e('0x2c')]=_0x756e('0x2d');_0x3c332e[_0x756e('0x2e')]=0x0;_0x3c332e[_0x756e('0x2f')]=0x1;_0x3c332e[_0x756e('0x30')]=_0x5a1cf0[_0x756e('0x29')];_0x3c332e[_0x756e('0x31')]='COMPLETED';return BPromise['resolve']()[_0x756e('0xf')](voiceQueueReport[_0x756e('0x32')](_0x3c332e))[_0x756e('0xd')](loggerCatch(_0x756e('0x33')));};exports[_0x756e('0x34')]=function(_0x31a507,_0x1e977a){return BPromise['resolve']()['then'](cmHopper['getContactRecallMe'](_0x31a507,_0x1e977a))[_0x756e('0xd')](loggerCatch(_0x756e('0x35')));};exports[_0x756e('0x36')]=function(_0x4fadda){return BPromise[_0x756e('0xb')]()[_0x756e('0xf')](cmHopper['rescheduleContact'](_0x4fadda,!![],!![]))[_0x756e('0xd')](loggerCatch(_0x756e('0x37')));};
\ No newline at end of file