Built motion from commit 5293bb2a.|2.6.30
[motion2.git] / server / services / ami / preview / rpcDb.js
index 777be49..1199742 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4943=['type','uniqueid','calleridname','queue','answertime','queuecallerleaveAt','queuecallercomplete','queuecallercompleteAt','endtime','connectedlinename','context','from-sip','holdtime','lastAssignedTo','membername','queuecallerexitreason','create','[voiceQueueReport]\x20','getContactRecallMe','[GetContactRecallMe]\x20','[rescheduleContactInQueue]\x20','bluebird','../../../config/logger','../rpc/cmHopper','../rpc/cmHopperHistory','../rpc/cmHopperBlack','../rpc/agentReportPreview','../rpc/voiceQueueReport','error','inspect','catch','[createHistory]\x20','resolve','then','moveContactManagedDialer','[moveContactManagedDialer]\x20','checkIsBlackList','getContactPreview','[getContactPreview]\x20','createAgentHistory','createCustomerHistory','createCustomerFinal','rescheduleContact','UserId','active','[rescheduleContact]\x20','countReScheduled','[countReScheduled]\x20','unlockContact','[unlockContact]\x20','disableContact','[activeContact]\x20','crateCustomerReportQueue'];(function(_0x5abb7e,_0x4fc56e){var _0xee3848=function(_0x350d8e){while(--_0x350d8e){_0x5abb7e['push'](_0x5abb7e['shift']());}};_0xee3848(++_0x4fc56e);}(_0x4943,0x11e));var _0x3494=function(_0x5bf6f1,_0x5ab5b5){_0x5bf6f1=_0x5bf6f1-0x0;var _0x1488a3=_0x4943[_0x5bf6f1];return _0x1488a3;};'use strict';var util=require('util');var BPromise=require(_0x3494('0x0'));var logger=require(_0x3494('0x1'))('preview');var cmHopper=require(_0x3494('0x2'));var cmHopperHistory=require(_0x3494('0x3'));var cmHopperBlack=require(_0x3494('0x4'));var agentReportPreview=require(_0x3494('0x5'));var voiceQueueReport=require(_0x3494('0x6'));function loggerCatch(_0x345a10){return function(_0x2eefe6){logger[_0x3494('0x7')](_0x345a10,util[_0x3494('0x8')](_0x2eefe6,{'showHidden':![],'depth':null}));};}function create(_0x4e207c){return cmHopperHistory['createHistory'](_0x4e207c)[_0x3494('0x9')](loggerCatch(_0x3494('0xa')));}function createAgent(_0x1cd9b5){return BPromise[_0x3494('0xb')]()[_0x3494('0xc')](agentReportPreview['createHistory'](_0x1cd9b5))[_0x3494('0x9')](loggerCatch('[createHistory]\x20'));}function moveContact(_0x555f7b){return cmHopper[_0x3494('0xd')](_0x555f7b,!![])[_0x3494('0x9')](loggerCatch(_0x3494('0xe')));}exports[_0x3494('0xf')]=function(_0x414af2){return cmHopperBlack['checkIsBlackList'](_0x414af2)[_0x3494('0x9')](loggerCatch('[checkIsBlackList]\x20'));};exports[_0x3494('0x10')]=function(_0xd822ba){return BPromise[_0x3494('0xb')]()[_0x3494('0xc')](cmHopper[_0x3494('0x10')](_0xd822ba))[_0x3494('0x9')](loggerCatch(_0x3494('0x11')));};exports['createHistory']=function(_0x1cec9e,_0x4d7810){create(_0x1cec9e)[_0x3494('0x9')](loggerCatch(_0x4d7810));moveContact(_0x1cec9e)['catch'](loggerCatch(_0x4d7810));};exports[_0x3494('0x12')]=function(_0x21ae34,_0x2a76fd){createAgent(_0x21ae34)[_0x3494('0x9')](loggerCatch(_0x2a76fd));};exports[_0x3494('0x13')]=function(_0x2cdec6,_0x4c8083){create(_0x2cdec6)[_0x3494('0x9')](loggerCatch(_0x4c8083));};exports[_0x3494('0x14')]=function(_0x3ca2fa,_0x2611b1){moveContact(_0x3ca2fa)[_0x3494('0x9')](loggerCatch(_0x2611b1));};exports[_0x3494('0x15')]=function(_0x243c74,_0x18ac6f,_0x38f936){if(_0x18ac6f){_0x243c74[_0x3494('0x16')]=null;}if(_0x38f936){_0x243c74[_0x3494('0x17')]=![];}return cmHopper['rescheduleContact'](_0x243c74)['catch'](loggerCatch(_0x3494('0x18')));};exports[_0x3494('0x19')]=function(_0x14ba4b){return cmHopper[_0x3494('0x19')](_0x14ba4b)[_0x3494('0x9')](loggerCatch(_0x3494('0x1a')));};exports[_0x3494('0x1b')]=function(_0x478fab){return cmHopper[_0x3494('0x1b')]({'UserId':null},_0x478fab,0x1)[_0x3494('0x9')](loggerCatch(_0x3494('0x1c')));};exports[_0x3494('0x1d')]=function(_0x168d50){return cmHopper[_0x3494('0x1b')]({'active':![]},_0x168d50,0x1)[_0x3494('0x9')](loggerCatch(_0x3494('0x1e')));};exports[_0x3494('0x1f')]=function(_0x463d61){var _0x26e35f={};_0x26e35f[_0x3494('0x20')]=_0x463d61[_0x3494('0x20')];_0x26e35f[_0x3494('0x21')]=_0x463d61[_0x3494('0x21')];_0x26e35f['calleridnum']=_0x463d61['calleridnum'];_0x26e35f['calleridname']=_0x463d61[_0x3494('0x22')];_0x26e35f[_0x3494('0x23')]=_0x463d61[_0x3494('0x23')];_0x26e35f['queuecallerjoinAt']=_0x463d61[_0x3494('0x24')];_0x26e35f[_0x3494('0x25')]=_0x463d61[_0x3494('0x24')];_0x26e35f[_0x3494('0x26')]=0x1;_0x26e35f[_0x3494('0x27')]=_0x463d61[_0x3494('0x28')];_0x26e35f[_0x3494('0x29')]=_0x463d61['membername'];_0x26e35f[_0x3494('0x2a')]=_0x3494('0x2b');_0x26e35f['exten']='xcally-motion-preview';_0x26e35f[_0x3494('0x2c')]=0x0;_0x26e35f['assigned']=0x1;_0x26e35f[_0x3494('0x2d')]=_0x463d61[_0x3494('0x2e')];_0x26e35f[_0x3494('0x2f')]='COMPLETED';return BPromise[_0x3494('0xb')]()[_0x3494('0xc')](voiceQueueReport[_0x3494('0x30')](_0x26e35f))['catch'](loggerCatch(_0x3494('0x31')));};exports[_0x3494('0x32')]=function(_0x40f5cd,_0x72dea2){return BPromise[_0x3494('0xb')]()[_0x3494('0xc')](cmHopper[_0x3494('0x32')](_0x40f5cd,_0x72dea2))[_0x3494('0x9')](loggerCatch(_0x3494('0x33')));};exports['rescheduleContactInQueue']=function(_0x71254d){return cmHopper[_0x3494('0x15')](_0x71254d,!![],!![])[_0x3494('0x9')](loggerCatch(_0x3494('0x34')));};
\ No newline at end of file
+var _0xfec3=['connectedlinename','membername','context','from-sip','exten','xcally-motion-preview','holdtime','assigned','lastAssignedTo','queuecallerexitreason','COMPLETED','[voiceQueueReport]\x20','getContactRecallMe','rescheduleContactInQueue','[rescheduleContactInQueue]\x20','util','bluebird','../../../config/logger','../rpc/cmHopper','../rpc/cmHopperHistory','../rpc/cmHopperBlack','../rpc/agentReportPreview','../rpc/voiceQueueReport','createHistory','catch','[createHistory]\x20','resolve','then','[checkIsBlackList]\x20','getContactPreview','[getContactPreview]\x20','createAgentHistory','createCustomerFinal','rescheduleContact','UserId','active','[rescheduleContact]\x20','countReScheduled','[countReScheduled]\x20','unlockContact','disableContact','[activeContact]\x20','type','uniqueid','calleridnum','calleridname','queue','queuecallerleaveAt','queuecallercompleteAt'];(function(_0x5e9018,_0x5d3a28){var _0x2062e2=function(_0x4aa0d8){while(--_0x4aa0d8){_0x5e9018['push'](_0x5e9018['shift']());}};_0x2062e2(++_0x5d3a28);}(_0xfec3,0xd3));var _0x3fec=function(_0x167cc1,_0x56ef5a){_0x167cc1=_0x167cc1-0x0;var _0x10bc4b=_0xfec3[_0x167cc1];return _0x10bc4b;};'use strict';var util=require(_0x3fec('0x0'));var BPromise=require(_0x3fec('0x1'));var logger=require(_0x3fec('0x2'))('preview');var cmHopper=require(_0x3fec('0x3'));var cmHopperHistory=require(_0x3fec('0x4'));var cmHopperBlack=require(_0x3fec('0x5'));var agentReportPreview=require(_0x3fec('0x6'));var voiceQueueReport=require(_0x3fec('0x7'));function loggerCatch(_0x895ac9){return function(_0x1fc792){logger['error'](_0x895ac9,util['inspect'](_0x1fc792,{'showHidden':![],'depth':null}));};}function create(_0x2f03e9){return cmHopperHistory[_0x3fec('0x8')](_0x2f03e9)[_0x3fec('0x9')](loggerCatch(_0x3fec('0xa')));}function createAgent(_0x58f1ae){return BPromise[_0x3fec('0xb')]()[_0x3fec('0xc')](agentReportPreview[_0x3fec('0x8')](_0x58f1ae))['catch'](loggerCatch('[createHistory]\x20'));}function moveContact(_0x57f2e4){return cmHopper['moveContactManagedDialer'](_0x57f2e4,!![])['catch'](loggerCatch('[moveContactManagedDialer]\x20'));}exports['checkIsBlackList']=function(_0x3fbe08){return cmHopperBlack['checkIsBlackList'](_0x3fbe08)[_0x3fec('0x9')](loggerCatch(_0x3fec('0xd')));};exports[_0x3fec('0xe')]=function(_0x38dd14){return BPromise[_0x3fec('0xb')]()[_0x3fec('0xc')](cmHopper[_0x3fec('0xe')](_0x38dd14))[_0x3fec('0x9')](loggerCatch(_0x3fec('0xf')));};exports['createHistory']=function(_0x2c49cc,_0x5a2282){create(_0x2c49cc)[_0x3fec('0x9')](loggerCatch(_0x5a2282));moveContact(_0x2c49cc)[_0x3fec('0x9')](loggerCatch(_0x5a2282));};exports[_0x3fec('0x10')]=function(_0x395cf8,_0x335197){createAgent(_0x395cf8)[_0x3fec('0x9')](loggerCatch(_0x335197));};exports['createCustomerHistory']=function(_0x3937bb,_0x47ded8){create(_0x3937bb)[_0x3fec('0x9')](loggerCatch(_0x47ded8));};exports[_0x3fec('0x11')]=function(_0x5c7059,_0x4d5fd2){moveContact(_0x5c7059)[_0x3fec('0x9')](loggerCatch(_0x4d5fd2));};exports[_0x3fec('0x12')]=function(_0x9fc1c9,_0x17f350,_0x3adc0a){if(_0x17f350){_0x9fc1c9[_0x3fec('0x13')]=null;}if(_0x3adc0a){_0x9fc1c9[_0x3fec('0x14')]=![];}return cmHopper[_0x3fec('0x12')](_0x9fc1c9)[_0x3fec('0x9')](loggerCatch(_0x3fec('0x15')));};exports[_0x3fec('0x16')]=function(_0xf46776){return cmHopper['countReScheduled'](_0xf46776)['catch'](loggerCatch(_0x3fec('0x17')));};exports[_0x3fec('0x18')]=function(_0x8f1b07){return cmHopper[_0x3fec('0x18')]({'UserId':null},_0x8f1b07,0x1)[_0x3fec('0x9')](loggerCatch('[unlockContact]\x20'));};exports[_0x3fec('0x19')]=function(_0x1a117e){return cmHopper['unlockContact']({'active':![]},_0x1a117e,0x1)['catch'](loggerCatch(_0x3fec('0x1a')));};exports['crateCustomerReportQueue']=function(_0x498598){var _0x1732c2={};_0x1732c2[_0x3fec('0x1b')]=_0x498598[_0x3fec('0x1b')];_0x1732c2['uniqueid']=_0x498598[_0x3fec('0x1c')];_0x1732c2[_0x3fec('0x1d')]=_0x498598[_0x3fec('0x1d')];_0x1732c2[_0x3fec('0x1e')]=_0x498598[_0x3fec('0x1e')];_0x1732c2[_0x3fec('0x1f')]=_0x498598[_0x3fec('0x1f')];_0x1732c2['queuecallerjoinAt']=_0x498598['answertime'];_0x1732c2[_0x3fec('0x20')]=_0x498598['answertime'];_0x1732c2['queuecallercomplete']=0x1;_0x1732c2[_0x3fec('0x21')]=_0x498598['endtime'];_0x1732c2[_0x3fec('0x22')]=_0x498598[_0x3fec('0x23')];_0x1732c2[_0x3fec('0x24')]=_0x3fec('0x25');_0x1732c2[_0x3fec('0x26')]=_0x3fec('0x27');_0x1732c2[_0x3fec('0x28')]=0x0;_0x1732c2[_0x3fec('0x29')]=0x1;_0x1732c2[_0x3fec('0x2a')]=_0x498598[_0x3fec('0x23')];_0x1732c2[_0x3fec('0x2b')]=_0x3fec('0x2c');return BPromise[_0x3fec('0xb')]()[_0x3fec('0xc')](voiceQueueReport['create'](_0x1732c2))[_0x3fec('0x9')](loggerCatch(_0x3fec('0x2d')));};exports['getContactRecallMe']=function(_0x38ceed,_0x271b6b){return BPromise[_0x3fec('0xb')]()[_0x3fec('0xc')](cmHopper[_0x3fec('0x2e')](_0x38ceed,_0x271b6b))[_0x3fec('0x9')](loggerCatch('[GetContactRecallMe]\x20'));};exports[_0x3fec('0x2f')]=function(_0x534e85){return cmHopper['rescheduleContact'](_0x534e85,!![],!![])[_0x3fec('0x9')](loggerCatch(_0x3fec('0x30')));};
\ No newline at end of file