Built motion from commit 0c5f406c.|2.6.29
[motion2.git] / server / services / ami / preview / rpcDb.js
index 51b3080..6ae363a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x536f=['createCustomerHistory','createCustomerFinal','rescheduleContact','active','[rescheduleContact]\x20','countReScheduled','[countReScheduled]\x20','unlockContact','[unlockContact]\x20','[activeContact]\x20','crateCustomerReportQueue','type','uniqueid','calleridnum','calleridname','queue','queuecallerjoinAt','answertime','queuecallercomplete','queuecallercompleteAt','endtime','connectedlinename','membername','context','from-sip','exten','xcally-motion-preview','holdtime','lastAssignedTo','queuecallerexitreason','COMPLETED','getContactRecallMe','[GetContactRecallMe]\x20','[rescheduleContactInQueue]\x20','util','bluebird','../../../config/logger','preview','../rpc/cmHopperHistory','../rpc/cmHopperBlack','error','inspect','createHistory','catch','[createHistory]\x20','resolve','[moveContactManagedDialer]\x20','checkIsBlackList','[checkIsBlackList]\x20','then','getContactPreview','[getContactPreview]\x20','createAgentHistory'];(function(_0x5d15d2,_0x51cd88){var _0x304bc0=function(_0x5eed0d){while(--_0x5eed0d){_0x5d15d2['push'](_0x5d15d2['shift']());}};_0x304bc0(++_0x51cd88);}(_0x536f,0x160));var _0xf536=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x536f[_0x20a584];return _0x4b41a8;};'use strict';var util=require(_0xf536('0x0'));var BPromise=require(_0xf536('0x1'));var logger=require(_0xf536('0x2'))(_0xf536('0x3'));var cmHopper=require('../rpc/cmHopper');var cmHopperHistory=require(_0xf536('0x4'));var cmHopperBlack=require(_0xf536('0x5'));var agentReportPreview=require('../rpc/agentReportPreview');var voiceQueueReport=require('../rpc/voiceQueueReport');function loggerCatch(_0x116d97){return function(_0x409d87){logger[_0xf536('0x6')](_0x116d97,util[_0xf536('0x7')](_0x409d87,{'showHidden':![],'depth':null}));};}function create(_0xfa66cc){return cmHopperHistory[_0xf536('0x8')](_0xfa66cc)[_0xf536('0x9')](loggerCatch(_0xf536('0xa')));}function createAgent(_0x408f38){return BPromise[_0xf536('0xb')]()['then'](agentReportPreview[_0xf536('0x8')](_0x408f38))[_0xf536('0x9')](loggerCatch(_0xf536('0xa')));}function moveContact(_0x37e2ee){return cmHopper['moveContactManagedDialer'](_0x37e2ee,!![])['catch'](loggerCatch(_0xf536('0xc')));}exports[_0xf536('0xd')]=function(_0x2ea866){return cmHopperBlack['checkIsBlackList'](_0x2ea866)[_0xf536('0x9')](loggerCatch(_0xf536('0xe')));};exports['getContactPreview']=function(_0x15210d){return BPromise['resolve']()[_0xf536('0xf')](cmHopper[_0xf536('0x10')](_0x15210d))[_0xf536('0x9')](loggerCatch(_0xf536('0x11')));};exports[_0xf536('0x8')]=function(_0x116994,_0x30d1ee){create(_0x116994)[_0xf536('0x9')](loggerCatch(_0x30d1ee));moveContact(_0x116994)[_0xf536('0x9')](loggerCatch(_0x30d1ee));};exports[_0xf536('0x12')]=function(_0x125535,_0x3417cb){createAgent(_0x125535)['catch'](loggerCatch(_0x3417cb));};exports[_0xf536('0x13')]=function(_0x3852d0,_0x5d63c9){create(_0x3852d0)[_0xf536('0x9')](loggerCatch(_0x5d63c9));};exports[_0xf536('0x14')]=function(_0x174863,_0x104d07){moveContact(_0x174863)[_0xf536('0x9')](loggerCatch(_0x104d07));};exports[_0xf536('0x15')]=function(_0x30edff,_0x52c938,_0x1e1086){if(_0x52c938){_0x30edff['UserId']=null;}if(_0x1e1086){_0x30edff[_0xf536('0x16')]=![];}return cmHopper[_0xf536('0x15')](_0x30edff)[_0xf536('0x9')](loggerCatch(_0xf536('0x17')));};exports[_0xf536('0x18')]=function(_0x7141ae){return cmHopper[_0xf536('0x18')](_0x7141ae)[_0xf536('0x9')](loggerCatch(_0xf536('0x19')));};exports[_0xf536('0x1a')]=function(_0xc70578){return cmHopper[_0xf536('0x1a')]({'UserId':null},_0xc70578,0x1)[_0xf536('0x9')](loggerCatch(_0xf536('0x1b')));};exports['disableContact']=function(_0x119046){return cmHopper[_0xf536('0x1a')]({'active':![]},_0x119046,0x1)[_0xf536('0x9')](loggerCatch(_0xf536('0x1c')));};exports[_0xf536('0x1d')]=function(_0x102c6f){var _0x16e8e8={};_0x16e8e8[_0xf536('0x1e')]=_0x102c6f[_0xf536('0x1e')];_0x16e8e8[_0xf536('0x1f')]=_0x102c6f[_0xf536('0x1f')];_0x16e8e8[_0xf536('0x20')]=_0x102c6f[_0xf536('0x20')];_0x16e8e8['calleridname']=_0x102c6f[_0xf536('0x21')];_0x16e8e8[_0xf536('0x22')]=_0x102c6f[_0xf536('0x22')];_0x16e8e8[_0xf536('0x23')]=_0x102c6f[_0xf536('0x24')];_0x16e8e8['queuecallerleaveAt']=_0x102c6f[_0xf536('0x24')];_0x16e8e8[_0xf536('0x25')]=0x1;_0x16e8e8[_0xf536('0x26')]=_0x102c6f[_0xf536('0x27')];_0x16e8e8[_0xf536('0x28')]=_0x102c6f[_0xf536('0x29')];_0x16e8e8[_0xf536('0x2a')]=_0xf536('0x2b');_0x16e8e8[_0xf536('0x2c')]=_0xf536('0x2d');_0x16e8e8[_0xf536('0x2e')]=0x0;_0x16e8e8['assigned']=0x1;_0x16e8e8[_0xf536('0x2f')]=_0x102c6f[_0xf536('0x29')];_0x16e8e8[_0xf536('0x30')]=_0xf536('0x31');return BPromise['resolve']()[_0xf536('0xf')](voiceQueueReport['create'](_0x16e8e8))[_0xf536('0x9')](loggerCatch('[voiceQueueReport]\x20'));};exports['getContactRecallMe']=function(_0x24be54,_0x36a545){return BPromise[_0xf536('0xb')]()[_0xf536('0xf')](cmHopper[_0xf536('0x32')](_0x24be54,_0x36a545))[_0xf536('0x9')](loggerCatch(_0xf536('0x33')));};exports['rescheduleContactInQueue']=function(_0x322ce0){return cmHopper[_0xf536('0x15')](_0x322ce0,!![],!![])['catch'](loggerCatch(_0xf536('0x34')));};
\ No newline at end of file
+var _0x59b9=['[rescheduleContactInQueue]\x20','util','bluebird','../../../config/logger','../rpc/cmHopper','../rpc/cmHopperHistory','../rpc/cmHopperBlack','../rpc/agentReportPreview','../rpc/voiceQueueReport','inspect','createHistory','resolve','then','catch','[createHistory]\x20','[moveContactManagedDialer]\x20','checkIsBlackList','[checkIsBlackList]\x20','getContactPreview','[getContactPreview]\x20','createAgentHistory','createCustomerHistory','createCustomerFinal','rescheduleContact','active','[rescheduleContact]\x20','countReScheduled','[countReScheduled]\x20','[unlockContact]\x20','disableContact','unlockContact','crateCustomerReportQueue','type','uniqueid','calleridnum','calleridname','queue','queuecallerjoinAt','answertime','queuecallerleaveAt','queuecallercomplete','queuecallercompleteAt','endtime','from-sip','exten','holdtime','assigned','lastAssignedTo','membername','queuecallerexitreason','COMPLETED','create','[voiceQueueReport]\x20','getContactRecallMe','[GetContactRecallMe]\x20'];(function(_0x3d64e6,_0x419925){var _0x542087=function(_0x4d899d){while(--_0x4d899d){_0x3d64e6['push'](_0x3d64e6['shift']());}};_0x542087(++_0x419925);}(_0x59b9,0x1f0));var _0x959b=function(_0x17d9e3,_0x1f969c){_0x17d9e3=_0x17d9e3-0x0;var _0x14192d=_0x59b9[_0x17d9e3];return _0x14192d;};'use strict';var util=require(_0x959b('0x0'));var BPromise=require(_0x959b('0x1'));var logger=require(_0x959b('0x2'))('preview');var cmHopper=require(_0x959b('0x3'));var cmHopperHistory=require(_0x959b('0x4'));var cmHopperBlack=require(_0x959b('0x5'));var agentReportPreview=require(_0x959b('0x6'));var voiceQueueReport=require(_0x959b('0x7'));function loggerCatch(_0x158fc7){return function(_0x5efea7){logger['error'](_0x158fc7,util[_0x959b('0x8')](_0x5efea7,{'showHidden':![],'depth':null}));};}function create(_0x22b9af){return cmHopperHistory[_0x959b('0x9')](_0x22b9af)['catch'](loggerCatch('[createHistory]\x20'));}function createAgent(_0x3cc0d2){return BPromise[_0x959b('0xa')]()[_0x959b('0xb')](agentReportPreview['createHistory'](_0x3cc0d2))[_0x959b('0xc')](loggerCatch(_0x959b('0xd')));}function moveContact(_0x31915e){return cmHopper['moveContactManagedDialer'](_0x31915e,!![])[_0x959b('0xc')](loggerCatch(_0x959b('0xe')));}exports[_0x959b('0xf')]=function(_0x444fa9){return cmHopperBlack[_0x959b('0xf')](_0x444fa9)[_0x959b('0xc')](loggerCatch(_0x959b('0x10')));};exports[_0x959b('0x11')]=function(_0x1337f3){return BPromise['resolve']()[_0x959b('0xb')](cmHopper[_0x959b('0x11')](_0x1337f3))[_0x959b('0xc')](loggerCatch(_0x959b('0x12')));};exports[_0x959b('0x9')]=function(_0x554ca,_0x321d02){create(_0x554ca)[_0x959b('0xc')](loggerCatch(_0x321d02));moveContact(_0x554ca)[_0x959b('0xc')](loggerCatch(_0x321d02));};exports[_0x959b('0x13')]=function(_0x408b65,_0x3d304d){createAgent(_0x408b65)[_0x959b('0xc')](loggerCatch(_0x3d304d));};exports[_0x959b('0x14')]=function(_0x3c9eb3,_0xbfbc5c){create(_0x3c9eb3)[_0x959b('0xc')](loggerCatch(_0xbfbc5c));};exports[_0x959b('0x15')]=function(_0x44db06,_0x1a94a6){moveContact(_0x44db06)[_0x959b('0xc')](loggerCatch(_0x1a94a6));};exports[_0x959b('0x16')]=function(_0x69e255,_0x1f919f,_0x315518){if(_0x1f919f){_0x69e255['UserId']=null;}if(_0x315518){_0x69e255[_0x959b('0x17')]=![];}return cmHopper[_0x959b('0x16')](_0x69e255)[_0x959b('0xc')](loggerCatch(_0x959b('0x18')));};exports[_0x959b('0x19')]=function(_0x5842fd){return cmHopper['countReScheduled'](_0x5842fd)['catch'](loggerCatch(_0x959b('0x1a')));};exports['unlockContact']=function(_0x255c41){return cmHopper['unlockContact']({'UserId':null},_0x255c41,0x1)[_0x959b('0xc')](loggerCatch(_0x959b('0x1b')));};exports[_0x959b('0x1c')]=function(_0x3f1598){return cmHopper[_0x959b('0x1d')]({'active':![]},_0x3f1598,0x1)[_0x959b('0xc')](loggerCatch('[activeContact]\x20'));};exports[_0x959b('0x1e')]=function(_0x20b067){var _0x3e82da={};_0x3e82da[_0x959b('0x1f')]=_0x20b067['type'];_0x3e82da[_0x959b('0x20')]=_0x20b067[_0x959b('0x20')];_0x3e82da['calleridnum']=_0x20b067[_0x959b('0x21')];_0x3e82da[_0x959b('0x22')]=_0x20b067['calleridname'];_0x3e82da[_0x959b('0x23')]=_0x20b067[_0x959b('0x23')];_0x3e82da[_0x959b('0x24')]=_0x20b067[_0x959b('0x25')];_0x3e82da[_0x959b('0x26')]=_0x20b067['answertime'];_0x3e82da[_0x959b('0x27')]=0x1;_0x3e82da[_0x959b('0x28')]=_0x20b067[_0x959b('0x29')];_0x3e82da['connectedlinename']=_0x20b067['membername'];_0x3e82da['context']=_0x959b('0x2a');_0x3e82da[_0x959b('0x2b')]='xcally-motion-preview';_0x3e82da[_0x959b('0x2c')]=0x0;_0x3e82da[_0x959b('0x2d')]=0x1;_0x3e82da[_0x959b('0x2e')]=_0x20b067[_0x959b('0x2f')];_0x3e82da[_0x959b('0x30')]=_0x959b('0x31');return BPromise['resolve']()[_0x959b('0xb')](voiceQueueReport[_0x959b('0x32')](_0x3e82da))[_0x959b('0xc')](loggerCatch(_0x959b('0x33')));};exports[_0x959b('0x34')]=function(_0x216bc0,_0x174998){return BPromise[_0x959b('0xa')]()[_0x959b('0xb')](cmHopper['getContactRecallMe'](_0x216bc0,_0x174998))[_0x959b('0xc')](loggerCatch(_0x959b('0x35')));};exports['rescheduleContactInQueue']=function(_0x28cf21){return cmHopper['rescheduleContact'](_0x28cf21,!![],!![])[_0x959b('0xc')](loggerCatch(_0x959b('0x36')));};
\ No newline at end of file