Built motion from commit f67b3b02.|2.6.31
[motion2.git] / server / services / ami / preview / rpcDb.js
index bb694a8..28bd398 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5f4d=['queue','answertime','queuecallerleaveAt','endtime','connectedlinename','membername','context','exten','xcally-motion-preview','COMPLETED','create','getContactRecallMe','[GetContactRecallMe]\x20','rescheduleContactInQueue','[rescheduleContactInQueue]\x20','util','../../../config/logger','preview','../rpc/cmHopperHistory','../rpc/cmHopperBlack','../rpc/voiceQueueReport','error','inspect','createHistory','catch','[createHistory]\x20','resolve','then','moveContactManagedDialer','[moveContactManagedDialer]\x20','checkIsBlackList','[checkIsBlackList]\x20','getContactPreview','createAgentHistory','createCustomerFinal','rescheduleContact','UserId','active','[rescheduleContact]\x20','countReScheduled','unlockContact','disableContact','type','uniqueid','calleridnum','calleridname'];(function(_0xcd0918,_0x56bdf9){var _0x250704=function(_0x56788e){while(--_0x56788e){_0xcd0918['push'](_0xcd0918['shift']());}};_0x250704(++_0x56bdf9);}(_0x5f4d,0x1db));var _0xd5f4=function(_0x244a49,_0x22a349){_0x244a49=_0x244a49-0x0;var _0x2519c2=_0x5f4d[_0x244a49];return _0x2519c2;};'use strict';var util=require(_0xd5f4('0x0'));var BPromise=require('bluebird');var logger=require(_0xd5f4('0x1'))(_0xd5f4('0x2'));var cmHopper=require('../rpc/cmHopper');var cmHopperHistory=require(_0xd5f4('0x3'));var cmHopperBlack=require(_0xd5f4('0x4'));var agentReportPreview=require('../rpc/agentReportPreview');var voiceQueueReport=require(_0xd5f4('0x5'));function loggerCatch(_0x424f62){return function(_0x5ceebf){logger[_0xd5f4('0x6')](_0x424f62,util[_0xd5f4('0x7')](_0x5ceebf,{'showHidden':![],'depth':null}));};}function create(_0x599250){return cmHopperHistory[_0xd5f4('0x8')](_0x599250)[_0xd5f4('0x9')](loggerCatch(_0xd5f4('0xa')));}function createAgent(_0x22d613){return BPromise[_0xd5f4('0xb')]()[_0xd5f4('0xc')](agentReportPreview[_0xd5f4('0x8')](_0x22d613))[_0xd5f4('0x9')](loggerCatch('[createHistory]\x20'));}function moveContact(_0xaeac66){return cmHopper[_0xd5f4('0xd')](_0xaeac66,!![])[_0xd5f4('0x9')](loggerCatch(_0xd5f4('0xe')));}exports[_0xd5f4('0xf')]=function(_0x2b3894){return cmHopperBlack[_0xd5f4('0xf')](_0x2b3894)[_0xd5f4('0x9')](loggerCatch(_0xd5f4('0x10')));};exports[_0xd5f4('0x11')]=function(_0x17f36){return BPromise[_0xd5f4('0xb')]()['then'](cmHopper[_0xd5f4('0x11')](_0x17f36))[_0xd5f4('0x9')](loggerCatch('[getContactPreview]\x20'));};exports[_0xd5f4('0x8')]=function(_0x25b8da,_0x59e786){create(_0x25b8da)['catch'](loggerCatch(_0x59e786));moveContact(_0x25b8da)[_0xd5f4('0x9')](loggerCatch(_0x59e786));};exports[_0xd5f4('0x12')]=function(_0x11e7a4,_0x379949){createAgent(_0x11e7a4)[_0xd5f4('0x9')](loggerCatch(_0x379949));};exports['createCustomerHistory']=function(_0x72ea97,_0x4ccba1){create(_0x72ea97)[_0xd5f4('0x9')](loggerCatch(_0x4ccba1));};exports[_0xd5f4('0x13')]=function(_0x5d866c,_0x3b8682){moveContact(_0x5d866c)[_0xd5f4('0x9')](loggerCatch(_0x3b8682));};exports[_0xd5f4('0x14')]=function(_0xdc9d29,_0x1f4a2a,_0x509e5c){if(_0x1f4a2a){_0xdc9d29[_0xd5f4('0x15')]=null;}if(_0x509e5c){_0xdc9d29[_0xd5f4('0x16')]=![];}return cmHopper[_0xd5f4('0x14')](_0xdc9d29)[_0xd5f4('0x9')](loggerCatch(_0xd5f4('0x17')));};exports[_0xd5f4('0x18')]=function(_0x467256){return cmHopper[_0xd5f4('0x18')](_0x467256)[_0xd5f4('0x9')](loggerCatch('[countReScheduled]\x20'));};exports[_0xd5f4('0x19')]=function(_0x72a20b){return cmHopper[_0xd5f4('0x19')]({'UserId':null},_0x72a20b,0x1)['catch'](loggerCatch('[unlockContact]\x20'));};exports[_0xd5f4('0x1a')]=function(_0x492595){return cmHopper[_0xd5f4('0x19')]({'active':![]},_0x492595,0x1)[_0xd5f4('0x9')](loggerCatch('[activeContact]\x20'));};exports['crateCustomerReportQueue']=function(_0x3a154a){var _0x29a946={};_0x29a946[_0xd5f4('0x1b')]=_0x3a154a[_0xd5f4('0x1b')];_0x29a946['uniqueid']=_0x3a154a[_0xd5f4('0x1c')];_0x29a946[_0xd5f4('0x1d')]=_0x3a154a[_0xd5f4('0x1d')];_0x29a946[_0xd5f4('0x1e')]=_0x3a154a[_0xd5f4('0x1e')];_0x29a946[_0xd5f4('0x1f')]=_0x3a154a[_0xd5f4('0x1f')];_0x29a946['queuecallerjoinAt']=_0x3a154a[_0xd5f4('0x20')];_0x29a946[_0xd5f4('0x21')]=_0x3a154a[_0xd5f4('0x20')];_0x29a946['queuecallercomplete']=0x1;_0x29a946['queuecallercompleteAt']=_0x3a154a[_0xd5f4('0x22')];_0x29a946[_0xd5f4('0x23')]=_0x3a154a[_0xd5f4('0x24')];_0x29a946[_0xd5f4('0x25')]='from-sip';_0x29a946[_0xd5f4('0x26')]=_0xd5f4('0x27');_0x29a946['holdtime']=0x0;_0x29a946['assigned']=0x1;_0x29a946['lastAssignedTo']=_0x3a154a[_0xd5f4('0x24')];_0x29a946['queuecallerexitreason']=_0xd5f4('0x28');return BPromise[_0xd5f4('0xb')]()[_0xd5f4('0xc')](voiceQueueReport[_0xd5f4('0x29')](_0x29a946))[_0xd5f4('0x9')](loggerCatch('[voiceQueueReport]\x20'));};exports[_0xd5f4('0x2a')]=function(_0x3943fa,_0x36fbb0){return BPromise['resolve']()[_0xd5f4('0xc')](cmHopper[_0xd5f4('0x2a')](_0x3943fa,_0x36fbb0))['catch'](loggerCatch(_0xd5f4('0x2b')));};exports[_0xd5f4('0x2c')]=function(_0x1ec4cd){return cmHopper[_0xd5f4('0x14')](_0x1ec4cd,!![],!![])[_0xd5f4('0x9')](loggerCatch(_0xd5f4('0x2d')));};
\ No newline at end of file
+var _0x68f3=['[checkIsBlackList]\x20','getContactPreview','[getContactPreview]\x20','createAgentHistory','createCustomerFinal','rescheduleContact','UserId','active','[rescheduleContact]\x20','countReScheduled','unlockContact','[unlockContact]\x20','disableContact','[activeContact]\x20','crateCustomerReportQueue','type','uniqueid','calleridnum','calleridname','queue','answertime','queuecallerleaveAt','queuecallercomplete','endtime','membername','context','exten','xcally-motion-preview','holdtime','assigned','lastAssignedTo','queuecallerexitreason','create','[voiceQueueReport]\x20','getContactRecallMe','[GetContactRecallMe]\x20','[rescheduleContactInQueue]\x20','util','bluebird','../rpc/cmHopper','../rpc/cmHopperHistory','inspect','createHistory','catch','[createHistory]\x20','resolve','then','moveContactManagedDialer','[moveContactManagedDialer]\x20','checkIsBlackList'];(function(_0x41d1f7,_0x25e948){var _0x11b601=function(_0x217ae9){while(--_0x217ae9){_0x41d1f7['push'](_0x41d1f7['shift']());}};_0x11b601(++_0x25e948);}(_0x68f3,0x89));var _0x368f=function(_0x567689,_0x1aaf91){_0x567689=_0x567689-0x0;var _0xd30613=_0x68f3[_0x567689];return _0xd30613;};'use strict';var util=require(_0x368f('0x0'));var BPromise=require(_0x368f('0x1'));var logger=require('../../../config/logger')('preview');var cmHopper=require(_0x368f('0x2'));var cmHopperHistory=require(_0x368f('0x3'));var cmHopperBlack=require('../rpc/cmHopperBlack');var agentReportPreview=require('../rpc/agentReportPreview');var voiceQueueReport=require('../rpc/voiceQueueReport');function loggerCatch(_0x595e18){return function(_0x3265ec){logger['error'](_0x595e18,util[_0x368f('0x4')](_0x3265ec,{'showHidden':![],'depth':null}));};}function create(_0xb9ab5a){return cmHopperHistory[_0x368f('0x5')](_0xb9ab5a)[_0x368f('0x6')](loggerCatch(_0x368f('0x7')));}function createAgent(_0x1edbbf){return BPromise[_0x368f('0x8')]()[_0x368f('0x9')](agentReportPreview[_0x368f('0x5')](_0x1edbbf))['catch'](loggerCatch(_0x368f('0x7')));}function moveContact(_0x177dbc){return cmHopper[_0x368f('0xa')](_0x177dbc,!![])['catch'](loggerCatch(_0x368f('0xb')));}exports[_0x368f('0xc')]=function(_0x415154){return cmHopperBlack[_0x368f('0xc')](_0x415154)['catch'](loggerCatch(_0x368f('0xd')));};exports[_0x368f('0xe')]=function(_0x402f42){return BPromise[_0x368f('0x8')]()[_0x368f('0x9')](cmHopper[_0x368f('0xe')](_0x402f42))[_0x368f('0x6')](loggerCatch(_0x368f('0xf')));};exports['createHistory']=function(_0x5e1d8c,_0x17a25e){create(_0x5e1d8c)[_0x368f('0x6')](loggerCatch(_0x17a25e));moveContact(_0x5e1d8c)['catch'](loggerCatch(_0x17a25e));};exports[_0x368f('0x10')]=function(_0xb080a,_0x20fa70){createAgent(_0xb080a)[_0x368f('0x6')](loggerCatch(_0x20fa70));};exports['createCustomerHistory']=function(_0x136c8a,_0x50d64c){create(_0x136c8a)[_0x368f('0x6')](loggerCatch(_0x50d64c));};exports[_0x368f('0x11')]=function(_0xb371f4,_0x3a013d){moveContact(_0xb371f4)[_0x368f('0x6')](loggerCatch(_0x3a013d));};exports[_0x368f('0x12')]=function(_0x160eba,_0x430e97,_0x1773d9){if(_0x430e97){_0x160eba[_0x368f('0x13')]=null;}if(_0x1773d9){_0x160eba[_0x368f('0x14')]=![];}return cmHopper[_0x368f('0x12')](_0x160eba)[_0x368f('0x6')](loggerCatch(_0x368f('0x15')));};exports[_0x368f('0x16')]=function(_0x5905dd){return cmHopper[_0x368f('0x16')](_0x5905dd)[_0x368f('0x6')](loggerCatch('[countReScheduled]\x20'));};exports['unlockContact']=function(_0x2cd10c){return cmHopper[_0x368f('0x17')]({'UserId':null},_0x2cd10c,0x1)['catch'](loggerCatch(_0x368f('0x18')));};exports[_0x368f('0x19')]=function(_0x4e0712){return cmHopper[_0x368f('0x17')]({'active':![]},_0x4e0712,0x1)[_0x368f('0x6')](loggerCatch(_0x368f('0x1a')));};exports[_0x368f('0x1b')]=function(_0x3c5cc4){var _0x54a813={};_0x54a813[_0x368f('0x1c')]=_0x3c5cc4['type'];_0x54a813['uniqueid']=_0x3c5cc4[_0x368f('0x1d')];_0x54a813[_0x368f('0x1e')]=_0x3c5cc4[_0x368f('0x1e')];_0x54a813[_0x368f('0x1f')]=_0x3c5cc4[_0x368f('0x1f')];_0x54a813[_0x368f('0x20')]=_0x3c5cc4[_0x368f('0x20')];_0x54a813['queuecallerjoinAt']=_0x3c5cc4[_0x368f('0x21')];_0x54a813[_0x368f('0x22')]=_0x3c5cc4[_0x368f('0x21')];_0x54a813[_0x368f('0x23')]=0x1;_0x54a813['queuecallercompleteAt']=_0x3c5cc4[_0x368f('0x24')];_0x54a813['connectedlinename']=_0x3c5cc4[_0x368f('0x25')];_0x54a813[_0x368f('0x26')]='from-sip';_0x54a813[_0x368f('0x27')]=_0x368f('0x28');_0x54a813[_0x368f('0x29')]=0x0;_0x54a813[_0x368f('0x2a')]=0x1;_0x54a813[_0x368f('0x2b')]=_0x3c5cc4['membername'];_0x54a813[_0x368f('0x2c')]='COMPLETED';return BPromise[_0x368f('0x8')]()[_0x368f('0x9')](voiceQueueReport[_0x368f('0x2d')](_0x54a813))[_0x368f('0x6')](loggerCatch(_0x368f('0x2e')));};exports[_0x368f('0x2f')]=function(_0x25f30a,_0xb1aad){return BPromise['resolve']()['then'](cmHopper[_0x368f('0x2f')](_0x25f30a,_0xb1aad))[_0x368f('0x6')](loggerCatch(_0x368f('0x30')));};exports['rescheduleContactInQueue']=function(_0x979437){return cmHopper[_0x368f('0x12')](_0x979437,!![],!![])[_0x368f('0x6')](loggerCatch(_0x368f('0x31')));};
\ No newline at end of file