Built motion from commit 87cd5f02.|2.5.48
[motion2.git] / server / services / ami / preview / rpcDb.js
index 2ee56d3..c9da6b2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8d0e=['../rpc/cmHopperFinal','../rpc/cmHopperHistory','../rpc/cmHopperBlack','../rpc/agentReportPreview','error','inspect','resolve','then','createHistory','catch','[createHistory]\x20','moveContactManagedDialer','checkIsBlackList','[checkIsBlackList]\x20','getContactPreview','[getContactPreview]\x20','createCustomerHistory','createCustomerFinal','UserId','active','rescheduleContact','countReScheduled','[countReScheduled]\x20','unlockContact','[unlockContact]\x20','[activeContact]\x20','type','uniqueid','calleridnum','queue','queuecallerjoinAt','answertime','queuecallercompleteAt','endtime','connectedlinename','membername','context','exten','xcally-motion-preview','holdtime','assigned','queuecallerexitreason','create','[voiceQueueReport]\x20','[GetContactRecallMe]\x20','rescheduleContactInQueue','[rescheduleContactInQueue]\x20','util','bluebird','../../../config/logger','preview','lodash','../rpc/cmHopper'];(function(_0x442d25,_0x53c66b){var _0x14fb3d=function(_0x9cd927){while(--_0x9cd927){_0x442d25['push'](_0x442d25['shift']());}};_0x14fb3d(++_0x53c66b);}(_0x8d0e,0x1d7));var _0xe8d0=function(_0x3e7d87,_0x4ae065){_0x3e7d87=_0x3e7d87-0x0;var _0x92fed6=_0x8d0e[_0x3e7d87];return _0x92fed6;};'use strict';var util=require(_0xe8d0('0x0'));var BPromise=require(_0xe8d0('0x1'));var logger=require(_0xe8d0('0x2'))(_0xe8d0('0x3'));var _=require(_0xe8d0('0x4'));var cmHopper=require(_0xe8d0('0x5'));var cmHopperFinal=require(_0xe8d0('0x6'));var cmHopperHistory=require(_0xe8d0('0x7'));var cmHopperBlack=require(_0xe8d0('0x8'));var voiceQueueRt=require('../rpc/voiceQueueRt');var agentReportPreview=require(_0xe8d0('0x9'));var voiceQueueReport=require('../rpc/voiceQueueReport');function loggerCatch(_0x560dab){return function(_0x2e2985){logger[_0xe8d0('0xa')](_0x560dab,util[_0xe8d0('0xb')](_0x2e2985,{'showHidden':![],'depth':null}));};}function create(_0xcc03d0){return BPromise[_0xe8d0('0xc')]()[_0xe8d0('0xd')](cmHopperHistory[_0xe8d0('0xe')](_0xcc03d0))[_0xe8d0('0xf')](loggerCatch('[createHistory]\x20'));}function createAgent(_0x10e56c){return BPromise[_0xe8d0('0xc')]()[_0xe8d0('0xd')](agentReportPreview['createHistory'](_0x10e56c))['catch'](loggerCatch(_0xe8d0('0x10')));}function moveContact(_0x25e6b8){return BPromise[_0xe8d0('0xc')]()[_0xe8d0('0xd')](cmHopper[_0xe8d0('0x11')](_0x25e6b8,!![]))[_0xe8d0('0xf')](loggerCatch('[moveContactManagedDialer]\x20'));}exports[_0xe8d0('0x12')]=function(_0x15b9e5){return BPromise['resolve']()[_0xe8d0('0xd')](cmHopperBlack['checkIsBlackList'](_0x15b9e5))['catch'](loggerCatch(_0xe8d0('0x13')));};exports[_0xe8d0('0x14')]=function(_0x1aa725){return BPromise[_0xe8d0('0xc')]()[_0xe8d0('0xd')](cmHopper[_0xe8d0('0x14')](_0x1aa725))['catch'](loggerCatch(_0xe8d0('0x15')));};exports['createHistory']=function(_0x6d932b,_0x3c526c){create(_0x6d932b)[_0xe8d0('0xf')](loggerCatch(_0x3c526c));moveContact(_0x6d932b)['catch'](loggerCatch(_0x3c526c));};exports['createAgentHistory']=function(_0x47c67a,_0x1bdd94){createAgent(_0x47c67a)[_0xe8d0('0xf')](loggerCatch(_0x1bdd94));};exports[_0xe8d0('0x16')]=function(_0x44bbe4,_0x83177b){create(_0x44bbe4)['catch'](loggerCatch(_0x83177b));};exports[_0xe8d0('0x17')]=function(_0x12ebf4,_0x524b00){moveContact(_0x12ebf4)['catch'](loggerCatch(_0x524b00));};exports['rescheduleContact']=function(_0x384a60,_0x35d131,_0x25363b){if(_0x35d131){_0x384a60[_0xe8d0('0x18')]=null;}if(_0x25363b){_0x384a60[_0xe8d0('0x19')]=![];}return BPromise[_0xe8d0('0xc')]()[_0xe8d0('0xd')](cmHopper[_0xe8d0('0x1a')](_0x384a60))[_0xe8d0('0xf')](loggerCatch('[rescheduleContact]\x20'));};exports[_0xe8d0('0x1b')]=function(_0x9f747){return BPromise['resolve']()[_0xe8d0('0xd')](cmHopper[_0xe8d0('0x1b')](_0x9f747))[_0xe8d0('0xf')](loggerCatch(_0xe8d0('0x1c')));};exports[_0xe8d0('0x1d')]=function(_0x149dfd){return BPromise[_0xe8d0('0xc')]()[_0xe8d0('0xd')](cmHopper[_0xe8d0('0x1d')]({'UserId':null},_0x149dfd,0x1))[_0xe8d0('0xf')](loggerCatch(_0xe8d0('0x1e')));};exports['disableContact']=function(_0x24982c){return BPromise[_0xe8d0('0xc')]()[_0xe8d0('0xd')](cmHopper['unlockContact']({'active':![]},_0x24982c,0x1))[_0xe8d0('0xf')](loggerCatch(_0xe8d0('0x1f')));};exports['crateCustomerReportQueue']=function(_0x1519e2){var _0x3ffcb7={};_0x3ffcb7[_0xe8d0('0x20')]=_0x1519e2[_0xe8d0('0x20')];_0x3ffcb7[_0xe8d0('0x21')]=_0x1519e2['uniqueid'];_0x3ffcb7[_0xe8d0('0x22')]=_0x1519e2['calleridnum'];_0x3ffcb7['calleridname']=_0x1519e2['calleridname'];_0x3ffcb7[_0xe8d0('0x23')]=_0x1519e2[_0xe8d0('0x23')];_0x3ffcb7[_0xe8d0('0x24')]=_0x1519e2['answertime'];_0x3ffcb7['queuecallerleaveAt']=_0x1519e2[_0xe8d0('0x25')];_0x3ffcb7['queuecallercomplete']=0x1;_0x3ffcb7[_0xe8d0('0x26')]=_0x1519e2[_0xe8d0('0x27')];_0x3ffcb7[_0xe8d0('0x28')]=_0x1519e2[_0xe8d0('0x29')];_0x3ffcb7[_0xe8d0('0x2a')]='from-sip';_0x3ffcb7[_0xe8d0('0x2b')]=_0xe8d0('0x2c');_0x3ffcb7[_0xe8d0('0x2d')]=0x0;_0x3ffcb7[_0xe8d0('0x2e')]=0x1;_0x3ffcb7['lastAssignedTo']=_0x1519e2[_0xe8d0('0x29')];_0x3ffcb7[_0xe8d0('0x2f')]='COMPLETED';return BPromise[_0xe8d0('0xc')]()['then'](voiceQueueReport[_0xe8d0('0x30')](_0x3ffcb7))['catch'](loggerCatch(_0xe8d0('0x31')));};exports['getContactRecallMe']=function(_0x3a0f03,_0xb2cdbf){return BPromise[_0xe8d0('0xc')]()[_0xe8d0('0xd')](cmHopper['getContactRecallMe'](_0x3a0f03,_0xb2cdbf))[_0xe8d0('0xf')](loggerCatch(_0xe8d0('0x32')));};exports[_0xe8d0('0x33')]=function(_0x516243){return BPromise[_0xe8d0('0xc')]()[_0xe8d0('0xd')](cmHopper[_0xe8d0('0x1a')](_0x516243,!![],!![]))[_0xe8d0('0xf')](loggerCatch(_0xe8d0('0x34')));};
\ No newline at end of file
+var _0x4d3a=['create','[voiceQueueReport]\x20','getContactRecallMe','[GetContactRecallMe]\x20','rescheduleContactInQueue','[rescheduleContactInQueue]\x20','bluebird','../../../config/logger','preview','../rpc/cmHopper','../rpc/cmHopperFinal','../rpc/cmHopperHistory','../rpc/cmHopperBlack','../rpc/voiceQueueRt','../rpc/agentReportPreview','../rpc/voiceQueueReport','inspect','then','catch','[createHistory]\x20','createHistory','resolve','moveContactManagedDialer','checkIsBlackList','getContactPreview','[getContactPreview]\x20','createAgentHistory','createCustomerHistory','createCustomerFinal','UserId','active','rescheduleContact','[rescheduleContact]\x20','countReScheduled','[countReScheduled]\x20','unlockContact','[unlockContact]\x20','disableContact','[activeContact]\x20','crateCustomerReportQueue','type','uniqueid','calleridnum','calleridname','queue','queuecallerjoinAt','answertime','queuecallerleaveAt','queuecallercompleteAt','connectedlinename','membername','context','exten','holdtime'];(function(_0x2d5289,_0x2464ee){var _0x2b1a7c=function(_0x5b69a6){while(--_0x5b69a6){_0x2d5289['push'](_0x2d5289['shift']());}};_0x2b1a7c(++_0x2464ee);}(_0x4d3a,0x114));var _0xa4d3=function(_0x4a0c33,_0x5686bb){_0x4a0c33=_0x4a0c33-0x0;var _0x6488f9=_0x4d3a[_0x4a0c33];return _0x6488f9;};'use strict';var util=require('util');var BPromise=require(_0xa4d3('0x0'));var logger=require(_0xa4d3('0x1'))(_0xa4d3('0x2'));var _=require('lodash');var cmHopper=require(_0xa4d3('0x3'));var cmHopperFinal=require(_0xa4d3('0x4'));var cmHopperHistory=require(_0xa4d3('0x5'));var cmHopperBlack=require(_0xa4d3('0x6'));var voiceQueueRt=require(_0xa4d3('0x7'));var agentReportPreview=require(_0xa4d3('0x8'));var voiceQueueReport=require(_0xa4d3('0x9'));function loggerCatch(_0xf3882b){return function(_0x371435){logger['error'](_0xf3882b,util[_0xa4d3('0xa')](_0x371435,{'showHidden':![],'depth':null}));};}function create(_0x2af1bd){return BPromise['resolve']()[_0xa4d3('0xb')](cmHopperHistory['createHistory'](_0x2af1bd))[_0xa4d3('0xc')](loggerCatch(_0xa4d3('0xd')));}function createAgent(_0x12dca2){return BPromise['resolve']()[_0xa4d3('0xb')](agentReportPreview[_0xa4d3('0xe')](_0x12dca2))[_0xa4d3('0xc')](loggerCatch(_0xa4d3('0xd')));}function moveContact(_0xe99a0){return BPromise[_0xa4d3('0xf')]()[_0xa4d3('0xb')](cmHopper[_0xa4d3('0x10')](_0xe99a0,!![]))[_0xa4d3('0xc')](loggerCatch('[moveContactManagedDialer]\x20'));}exports[_0xa4d3('0x11')]=function(_0x245340){return BPromise['resolve']()['then'](cmHopperBlack['checkIsBlackList'](_0x245340))[_0xa4d3('0xc')](loggerCatch('[checkIsBlackList]\x20'));};exports['getContactPreview']=function(_0x3db7e0){return BPromise[_0xa4d3('0xf')]()[_0xa4d3('0xb')](cmHopper[_0xa4d3('0x12')](_0x3db7e0))[_0xa4d3('0xc')](loggerCatch(_0xa4d3('0x13')));};exports[_0xa4d3('0xe')]=function(_0x2f8628,_0x383105){create(_0x2f8628)[_0xa4d3('0xc')](loggerCatch(_0x383105));moveContact(_0x2f8628)[_0xa4d3('0xc')](loggerCatch(_0x383105));};exports[_0xa4d3('0x14')]=function(_0x5bbc59,_0x158f08){createAgent(_0x5bbc59)[_0xa4d3('0xc')](loggerCatch(_0x158f08));};exports[_0xa4d3('0x15')]=function(_0x3d50fa,_0x12b309){create(_0x3d50fa)[_0xa4d3('0xc')](loggerCatch(_0x12b309));};exports[_0xa4d3('0x16')]=function(_0x5da173,_0x5dedcf){moveContact(_0x5da173)[_0xa4d3('0xc')](loggerCatch(_0x5dedcf));};exports['rescheduleContact']=function(_0x1266eb,_0x1349c7,_0x85a64b){if(_0x1349c7){_0x1266eb[_0xa4d3('0x17')]=null;}if(_0x85a64b){_0x1266eb[_0xa4d3('0x18')]=![];}return BPromise[_0xa4d3('0xf')]()[_0xa4d3('0xb')](cmHopper[_0xa4d3('0x19')](_0x1266eb))[_0xa4d3('0xc')](loggerCatch(_0xa4d3('0x1a')));};exports[_0xa4d3('0x1b')]=function(_0x4a75f1){return BPromise[_0xa4d3('0xf')]()[_0xa4d3('0xb')](cmHopper['countReScheduled'](_0x4a75f1))[_0xa4d3('0xc')](loggerCatch(_0xa4d3('0x1c')));};exports['unlockContact']=function(_0x11bd6b){return BPromise[_0xa4d3('0xf')]()[_0xa4d3('0xb')](cmHopper[_0xa4d3('0x1d')]({'UserId':null},_0x11bd6b,0x1))[_0xa4d3('0xc')](loggerCatch(_0xa4d3('0x1e')));};exports[_0xa4d3('0x1f')]=function(_0x23ae6a){return BPromise[_0xa4d3('0xf')]()[_0xa4d3('0xb')](cmHopper['unlockContact']({'active':![]},_0x23ae6a,0x1))[_0xa4d3('0xc')](loggerCatch(_0xa4d3('0x20')));};exports[_0xa4d3('0x21')]=function(_0x237c35){var _0x15795c={};_0x15795c['type']=_0x237c35[_0xa4d3('0x22')];_0x15795c[_0xa4d3('0x23')]=_0x237c35['uniqueid'];_0x15795c[_0xa4d3('0x24')]=_0x237c35[_0xa4d3('0x24')];_0x15795c[_0xa4d3('0x25')]=_0x237c35['calleridname'];_0x15795c[_0xa4d3('0x26')]=_0x237c35['queue'];_0x15795c[_0xa4d3('0x27')]=_0x237c35[_0xa4d3('0x28')];_0x15795c[_0xa4d3('0x29')]=_0x237c35['answertime'];_0x15795c['queuecallercomplete']=0x1;_0x15795c[_0xa4d3('0x2a')]=_0x237c35['endtime'];_0x15795c[_0xa4d3('0x2b')]=_0x237c35[_0xa4d3('0x2c')];_0x15795c[_0xa4d3('0x2d')]='from-sip';_0x15795c[_0xa4d3('0x2e')]='xcally-motion-preview';_0x15795c[_0xa4d3('0x2f')]=0x0;_0x15795c['assigned']=0x1;_0x15795c['lastAssignedTo']=_0x237c35['membername'];_0x15795c['queuecallerexitreason']='COMPLETED';return BPromise['resolve']()['then'](voiceQueueReport[_0xa4d3('0x30')](_0x15795c))['catch'](loggerCatch(_0xa4d3('0x31')));};exports[_0xa4d3('0x32')]=function(_0x47202b,_0x2f7c1f){return BPromise[_0xa4d3('0xf')]()[_0xa4d3('0xb')](cmHopper[_0xa4d3('0x32')](_0x47202b,_0x2f7c1f))[_0xa4d3('0xc')](loggerCatch(_0xa4d3('0x33')));};exports[_0xa4d3('0x34')]=function(_0x353c2f){return BPromise[_0xa4d3('0xf')]()[_0xa4d3('0xb')](cmHopper[_0xa4d3('0x19')](_0x353c2f,!![],!![]))[_0xa4d3('0xc')](loggerCatch(_0xa4d3('0x35')));};
\ No newline at end of file