Built motion from commit c738b9ac.|2.6.25
[motion2.git] / server / services / ami / preview / rpcDb.js
index 3535771..2f91798 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaeba=['bluebird','../../../config/logger','../rpc/cmHopper','../rpc/cmHopperHistory','../rpc/cmHopperBlack','../rpc/agentReportPreview','error','inspect','createHistory','catch','[createHistory]\x20','resolve','then','[moveContactManagedDialer]\x20','checkIsBlackList','getContactPreview','[getContactPreview]\x20','createCustomerHistory','createCustomerFinal','rescheduleContact','active','[rescheduleContact]\x20','countReScheduled','unlockContact','[unlockContact]\x20','disableContact','[activeContact]\x20','crateCustomerReportQueue','type','uniqueid','calleridnum','calleridname','queue','queuecallerjoinAt','queuecallerleaveAt','answertime','queuecallercomplete','queuecallercompleteAt','endtime','connectedlinename','membername','exten','holdtime','assigned','lastAssignedTo','queuecallerexitreason','COMPLETED','create','[voiceQueueReport]\x20','getContactRecallMe','[GetContactRecallMe]\x20','rescheduleContactInQueue','[rescheduleContactInQueue]\x20','util'];(function(_0x9d639c,_0x524dbe){var _0x1671de=function(_0x27888e){while(--_0x27888e){_0x9d639c['push'](_0x9d639c['shift']());}};_0x1671de(++_0x524dbe);}(_0xaeba,0x1e5));var _0xaaeb=function(_0x86ac62,_0x311ef0){_0x86ac62=_0x86ac62-0x0;var _0x4c9b95=_0xaeba[_0x86ac62];return _0x4c9b95;};'use strict';var util=require(_0xaaeb('0x0'));var BPromise=require(_0xaaeb('0x1'));var logger=require(_0xaaeb('0x2'))('preview');var cmHopper=require(_0xaaeb('0x3'));var cmHopperHistory=require(_0xaaeb('0x4'));var cmHopperBlack=require(_0xaaeb('0x5'));var agentReportPreview=require(_0xaaeb('0x6'));var voiceQueueReport=require('../rpc/voiceQueueReport');function loggerCatch(_0x20a62b){return function(_0x1e566a){logger[_0xaaeb('0x7')](_0x20a62b,util[_0xaaeb('0x8')](_0x1e566a,{'showHidden':![],'depth':null}));};}function create(_0x4f60a6){return cmHopperHistory[_0xaaeb('0x9')](_0x4f60a6)[_0xaaeb('0xa')](loggerCatch(_0xaaeb('0xb')));}function createAgent(_0x5cb398){return BPromise[_0xaaeb('0xc')]()[_0xaaeb('0xd')](agentReportPreview[_0xaaeb('0x9')](_0x5cb398))[_0xaaeb('0xa')](loggerCatch(_0xaaeb('0xb')));}function moveContact(_0x2e34fd){return cmHopper['moveContactManagedDialer'](_0x2e34fd,!![])[_0xaaeb('0xa')](loggerCatch(_0xaaeb('0xe')));}exports[_0xaaeb('0xf')]=function(_0x12a2b2){return cmHopperBlack[_0xaaeb('0xf')](_0x12a2b2)['catch'](loggerCatch('[checkIsBlackList]\x20'));};exports[_0xaaeb('0x10')]=function(_0x5253c8){return BPromise[_0xaaeb('0xc')]()['then'](cmHopper[_0xaaeb('0x10')](_0x5253c8))['catch'](loggerCatch(_0xaaeb('0x11')));};exports[_0xaaeb('0x9')]=function(_0x31b862,_0x4720f3){create(_0x31b862)[_0xaaeb('0xa')](loggerCatch(_0x4720f3));moveContact(_0x31b862)[_0xaaeb('0xa')](loggerCatch(_0x4720f3));};exports['createAgentHistory']=function(_0x2bd40d,_0x43b6b6){createAgent(_0x2bd40d)['catch'](loggerCatch(_0x43b6b6));};exports[_0xaaeb('0x12')]=function(_0x56c23d,_0x538f0f){create(_0x56c23d)[_0xaaeb('0xa')](loggerCatch(_0x538f0f));};exports[_0xaaeb('0x13')]=function(_0x3bf25b,_0x4ec19a){moveContact(_0x3bf25b)[_0xaaeb('0xa')](loggerCatch(_0x4ec19a));};exports[_0xaaeb('0x14')]=function(_0x127848,_0x102f14,_0x4f7887){if(_0x102f14){_0x127848['UserId']=null;}if(_0x4f7887){_0x127848[_0xaaeb('0x15')]=![];}return cmHopper[_0xaaeb('0x14')](_0x127848)['catch'](loggerCatch(_0xaaeb('0x16')));};exports[_0xaaeb('0x17')]=function(_0x498e3a){return cmHopper[_0xaaeb('0x17')](_0x498e3a)[_0xaaeb('0xa')](loggerCatch('[countReScheduled]\x20'));};exports['unlockContact']=function(_0x4ba9cf){return cmHopper[_0xaaeb('0x18')]({'UserId':null},_0x4ba9cf,0x1)['catch'](loggerCatch(_0xaaeb('0x19')));};exports[_0xaaeb('0x1a')]=function(_0x44513c){return cmHopper['unlockContact']({'active':![]},_0x44513c,0x1)[_0xaaeb('0xa')](loggerCatch(_0xaaeb('0x1b')));};exports[_0xaaeb('0x1c')]=function(_0x32c072){var _0xb9784b={};_0xb9784b['type']=_0x32c072[_0xaaeb('0x1d')];_0xb9784b[_0xaaeb('0x1e')]=_0x32c072['uniqueid'];_0xb9784b[_0xaaeb('0x1f')]=_0x32c072[_0xaaeb('0x1f')];_0xb9784b[_0xaaeb('0x20')]=_0x32c072[_0xaaeb('0x20')];_0xb9784b[_0xaaeb('0x21')]=_0x32c072[_0xaaeb('0x21')];_0xb9784b[_0xaaeb('0x22')]=_0x32c072['answertime'];_0xb9784b[_0xaaeb('0x23')]=_0x32c072[_0xaaeb('0x24')];_0xb9784b[_0xaaeb('0x25')]=0x1;_0xb9784b[_0xaaeb('0x26')]=_0x32c072[_0xaaeb('0x27')];_0xb9784b[_0xaaeb('0x28')]=_0x32c072[_0xaaeb('0x29')];_0xb9784b['context']='from-sip';_0xb9784b[_0xaaeb('0x2a')]='xcally-motion-preview';_0xb9784b[_0xaaeb('0x2b')]=0x0;_0xb9784b[_0xaaeb('0x2c')]=0x1;_0xb9784b[_0xaaeb('0x2d')]=_0x32c072[_0xaaeb('0x29')];_0xb9784b[_0xaaeb('0x2e')]=_0xaaeb('0x2f');return BPromise[_0xaaeb('0xc')]()[_0xaaeb('0xd')](voiceQueueReport[_0xaaeb('0x30')](_0xb9784b))[_0xaaeb('0xa')](loggerCatch(_0xaaeb('0x31')));};exports[_0xaaeb('0x32')]=function(_0x42ce40,_0x10e3a5){return BPromise[_0xaaeb('0xc')]()['then'](cmHopper['getContactRecallMe'](_0x42ce40,_0x10e3a5))[_0xaaeb('0xa')](loggerCatch(_0xaaeb('0x33')));};exports[_0xaaeb('0x34')]=function(_0x4ed7f6){return cmHopper[_0xaaeb('0x14')](_0x4ed7f6,!![],!![])['catch'](loggerCatch(_0xaaeb('0x35')));};
\ No newline at end of file
+var _0x9bb0=['[checkIsBlackList]\x20','then','getContactPreview','[getContactPreview]\x20','createAgentHistory','createCustomerHistory','createCustomerFinal','rescheduleContact','UserId','active','[rescheduleContact]\x20','countReScheduled','[unlockContact]\x20','disableContact','unlockContact','[activeContact]\x20','crateCustomerReportQueue','type','uniqueid','calleridname','queue','queuecallerjoinAt','answertime','queuecallercompleteAt','endtime','connectedlinename','from-sip','xcally-motion-preview','holdtime','assigned','lastAssignedTo','membername','queuecallerexitreason','create','[voiceQueueReport]\x20','getContactRecallMe','[GetContactRecallMe]\x20','rescheduleContactInQueue','[rescheduleContactInQueue]\x20','preview','../rpc/cmHopper','../rpc/agentReportPreview','error','createHistory','catch','[createHistory]\x20','resolve','moveContactManagedDialer','[moveContactManagedDialer]\x20','checkIsBlackList'];(function(_0x47c28c,_0x2e333a){var _0x42337b=function(_0x481125){while(--_0x481125){_0x47c28c['push'](_0x47c28c['shift']());}};_0x42337b(++_0x2e333a);}(_0x9bb0,0x1b7));var _0x09bb=function(_0x331b08,_0x2c5937){_0x331b08=_0x331b08-0x0;var _0x5034d9=_0x9bb0[_0x331b08];return _0x5034d9;};'use strict';var util=require('util');var BPromise=require('bluebird');var logger=require('../../../config/logger')(_0x09bb('0x0'));var cmHopper=require(_0x09bb('0x1'));var cmHopperHistory=require('../rpc/cmHopperHistory');var cmHopperBlack=require('../rpc/cmHopperBlack');var agentReportPreview=require(_0x09bb('0x2'));var voiceQueueReport=require('../rpc/voiceQueueReport');function loggerCatch(_0xa67bd8){return function(_0x2ff9a0){logger[_0x09bb('0x3')](_0xa67bd8,util['inspect'](_0x2ff9a0,{'showHidden':![],'depth':null}));};}function create(_0x3f907f){return cmHopperHistory[_0x09bb('0x4')](_0x3f907f)[_0x09bb('0x5')](loggerCatch(_0x09bb('0x6')));}function createAgent(_0x143d74){return BPromise[_0x09bb('0x7')]()['then'](agentReportPreview[_0x09bb('0x4')](_0x143d74))['catch'](loggerCatch('[createHistory]\x20'));}function moveContact(_0xcfd4b9){return cmHopper[_0x09bb('0x8')](_0xcfd4b9,!![])['catch'](loggerCatch(_0x09bb('0x9')));}exports[_0x09bb('0xa')]=function(_0x58747e){return cmHopperBlack[_0x09bb('0xa')](_0x58747e)[_0x09bb('0x5')](loggerCatch(_0x09bb('0xb')));};exports['getContactPreview']=function(_0x2935b3){return BPromise['resolve']()[_0x09bb('0xc')](cmHopper[_0x09bb('0xd')](_0x2935b3))[_0x09bb('0x5')](loggerCatch(_0x09bb('0xe')));};exports['createHistory']=function(_0x370669,_0x4a10f2){create(_0x370669)[_0x09bb('0x5')](loggerCatch(_0x4a10f2));moveContact(_0x370669)[_0x09bb('0x5')](loggerCatch(_0x4a10f2));};exports[_0x09bb('0xf')]=function(_0x2eb595,_0x4b4508){createAgent(_0x2eb595)[_0x09bb('0x5')](loggerCatch(_0x4b4508));};exports[_0x09bb('0x10')]=function(_0x4ecc88,_0x103309){create(_0x4ecc88)[_0x09bb('0x5')](loggerCatch(_0x103309));};exports[_0x09bb('0x11')]=function(_0x2bc415,_0x32b306){moveContact(_0x2bc415)[_0x09bb('0x5')](loggerCatch(_0x32b306));};exports[_0x09bb('0x12')]=function(_0x427574,_0x1a6bda,_0x2dc686){if(_0x1a6bda){_0x427574[_0x09bb('0x13')]=null;}if(_0x2dc686){_0x427574[_0x09bb('0x14')]=![];}return cmHopper['rescheduleContact'](_0x427574)[_0x09bb('0x5')](loggerCatch(_0x09bb('0x15')));};exports['countReScheduled']=function(_0xe67f02){return cmHopper[_0x09bb('0x16')](_0xe67f02)['catch'](loggerCatch('[countReScheduled]\x20'));};exports['unlockContact']=function(_0x2f5ef7){return cmHopper['unlockContact']({'UserId':null},_0x2f5ef7,0x1)[_0x09bb('0x5')](loggerCatch(_0x09bb('0x17')));};exports[_0x09bb('0x18')]=function(_0x39d42a){return cmHopper[_0x09bb('0x19')]({'active':![]},_0x39d42a,0x1)['catch'](loggerCatch(_0x09bb('0x1a')));};exports[_0x09bb('0x1b')]=function(_0x6df545){var _0x532350={};_0x532350[_0x09bb('0x1c')]=_0x6df545[_0x09bb('0x1c')];_0x532350[_0x09bb('0x1d')]=_0x6df545['uniqueid'];_0x532350['calleridnum']=_0x6df545['calleridnum'];_0x532350[_0x09bb('0x1e')]=_0x6df545['calleridname'];_0x532350['queue']=_0x6df545[_0x09bb('0x1f')];_0x532350[_0x09bb('0x20')]=_0x6df545[_0x09bb('0x21')];_0x532350['queuecallerleaveAt']=_0x6df545[_0x09bb('0x21')];_0x532350['queuecallercomplete']=0x1;_0x532350[_0x09bb('0x22')]=_0x6df545[_0x09bb('0x23')];_0x532350[_0x09bb('0x24')]=_0x6df545['membername'];_0x532350['context']=_0x09bb('0x25');_0x532350['exten']=_0x09bb('0x26');_0x532350[_0x09bb('0x27')]=0x0;_0x532350[_0x09bb('0x28')]=0x1;_0x532350[_0x09bb('0x29')]=_0x6df545[_0x09bb('0x2a')];_0x532350[_0x09bb('0x2b')]='COMPLETED';return BPromise[_0x09bb('0x7')]()[_0x09bb('0xc')](voiceQueueReport[_0x09bb('0x2c')](_0x532350))[_0x09bb('0x5')](loggerCatch(_0x09bb('0x2d')));};exports['getContactRecallMe']=function(_0x19ffdd,_0x5eabfa){return BPromise[_0x09bb('0x7')]()['then'](cmHopper[_0x09bb('0x2e')](_0x19ffdd,_0x5eabfa))['catch'](loggerCatch(_0x09bb('0x2f')));};exports[_0x09bb('0x30')]=function(_0x55da0e){return cmHopper[_0x09bb('0x12')](_0x55da0e,!![],!![])['catch'](loggerCatch(_0x09bb('0x31')));};
\ No newline at end of file