Built motion from commit 20b39a97.|2.6.29
[motion2.git] / server / services / ami / dialer / utils / hopper.js
index 9f73b92..30419d7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa6b0=['[getContactDialer]','getContactDialerIvr','[getContactDialerIvr]','countReScheduled','[countReScheduled]','rescheduleContact','[rescheduleContact]','unlockContact','moveContactManagedDialer','checkIsBlackList','checkIsBlackListIvr','[checkIsBlackListIvr]','verifyAdditionalPhones','[verifyAdditionalPhone]','swapAdditionalPhones','[swapAdditionalPhone]','avgHandleTime','[avgHandleTime]','createHistory','[createHistory]','util','../../../../config/logger','../../rpc/cmHopperAdditionalPhone','../../rpc/cmHopperBlack','../../rpc/cmHopperHistory','inspect','getContactDialer','dialOrderByScheduledAt','catch','temp','error'];(function(_0x2b6600,_0x24c497){var _0x912ee2=function(_0x5d6484){while(--_0x5d6484){_0x2b6600['push'](_0x2b6600['shift']());}};_0x912ee2(++_0x24c497);}(_0xa6b0,0xaf));var _0x0a6b=function(_0x16d87d,_0x3393f5){_0x16d87d=_0x16d87d-0x0;var _0xd2774=_0xa6b0[_0x16d87d];return _0xd2774;};'use strict';var util=require(_0x0a6b('0x0'));var logger=require(_0x0a6b('0x1'))('dialer');var cmHopper=require('../../rpc/cmHopper');var cmHopperAdditionalPhone=require(_0x0a6b('0x2'));var cmHopperBlack=require(_0x0a6b('0x3'));var cmHopperHistory=require(_0x0a6b('0x4'));function inspectError(_0x4c9a84){return util[_0x0a6b('0x5')](_0x4c9a84,{'showHidden':![],'depth':null});}function getContactDialer(_0x33e8c3,_0x195697,_0xc7140c){return cmHopper[_0x0a6b('0x6')](_0x33e8c3['id'],_0x195697,_0xc7140c,_0x33e8c3[_0x0a6b('0x7')])[_0x0a6b('0x8')](function(_0xa908dd){_0x33e8c3[_0x0a6b('0x9')]=0x0;logger[_0x0a6b('0xa')](_0x0a6b('0xb'),inspectError(_0xa908dd));});}exports[_0x0a6b('0x6')]=getContactDialer;function getContactDialerIvr(_0x5046d8,_0x493948){return cmHopper[_0x0a6b('0xc')](_0x5046d8['id'],_0x493948,_0x5046d8[_0x0a6b('0x7')])[_0x0a6b('0x8')](function(_0x25ad47){_0x5046d8[_0x0a6b('0x9')]=0x0;logger[_0x0a6b('0xa')](_0x0a6b('0xd'),inspectError(_0x25ad47));});}exports[_0x0a6b('0xc')]=getContactDialerIvr;function countReScheduled(_0x8bbed9){return cmHopper[_0x0a6b('0xe')](_0x8bbed9)[_0x0a6b('0x8')](function(_0x890493){logger[_0x0a6b('0xa')](_0x0a6b('0xf'),inspectError(_0x890493));});}exports['countReScheduled']=countReScheduled;function rescheduleContact(_0x5e59a5){return cmHopper[_0x0a6b('0x10')](_0x5e59a5)[_0x0a6b('0x8')](function(_0x2abc4e){logger[_0x0a6b('0xa')](_0x0a6b('0x11'),inspectError(_0x2abc4e));});}exports[_0x0a6b('0x10')]=rescheduleContact;function unlockContact(_0x9bb98e,_0x19e84c,_0x1205a3){return cmHopper[_0x0a6b('0x12')](_0x9bb98e,_0x19e84c,_0x1205a3)['catch'](function(_0xa36d75){logger[_0x0a6b('0xa')]('[unlockContact]',inspectError(_0xa36d75));});}exports[_0x0a6b('0x12')]=unlockContact;function moveContactManagedDialer(_0x4d0e3b){return cmHopper[_0x0a6b('0x13')](_0x4d0e3b)[_0x0a6b('0x8')](function(_0x2cb10b){logger[_0x0a6b('0xa')]('[moveContactManagedDialer]',inspectError(_0x2cb10b));});}exports[_0x0a6b('0x13')]=moveContactManagedDialer;function checkIsBlackList(_0x296162){return cmHopperBlack['checkIsBlackList'](_0x296162)[_0x0a6b('0x8')](function(_0x3f23b4){logger[_0x0a6b('0xa')]('[checkIsBlackList]',inspectError(_0x3f23b4));});}exports[_0x0a6b('0x14')]=checkIsBlackList;function checkIsBlackListIvr(_0x93a465){return cmHopperBlack[_0x0a6b('0x15')](_0x93a465)['catch'](function(_0x220d3e){logger[_0x0a6b('0xa')](_0x0a6b('0x16'),inspectError(_0x220d3e));});}exports[_0x0a6b('0x15')]=checkIsBlackListIvr;function verifyAdditionalPhones(_0x122c19,_0x53848c,_0x1e5065){return cmHopperAdditionalPhone[_0x0a6b('0x17')](_0x122c19,_0x53848c,_0x1e5065)[_0x0a6b('0x8')](function(_0x5c77fb){logger[_0x0a6b('0xa')](_0x0a6b('0x18'),inspectError(_0x5c77fb));});}exports[_0x0a6b('0x17')]=verifyAdditionalPhones;function swapAdditionalPhones(_0x1b8b78,_0x3b12a2,_0x5b2229){return cmHopperAdditionalPhone[_0x0a6b('0x19')](_0x1b8b78,_0x3b12a2,_0x5b2229)[_0x0a6b('0x8')](function(_0x19a653){logger['error'](_0x0a6b('0x1a'),inspectError(_0x19a653));});}exports['swapAdditionalPhones']=swapAdditionalPhones;function avgHandleTime(_0xecbf0c){return cmHopperHistory[_0x0a6b('0x1b')](_0xecbf0c)[_0x0a6b('0x8')](function(_0x4884a1){logger['error'](_0x0a6b('0x1c'),inspectError(_0x4884a1));});}exports[_0x0a6b('0x1b')]=avgHandleTime;function createHistory(_0x1aecc7){return cmHopperHistory[_0x0a6b('0x1d')](_0x1aecc7)[_0x0a6b('0x8')](function(_0x2bbcb1){logger['error'](_0x0a6b('0x1e'),inspectError(_0x2bbcb1));});}exports[_0x0a6b('0x1d')]=createHistory;
\ No newline at end of file
+var _0x71ab=['[avgHandleTime]','avgHandleTime','createHistory','[createHistory]','../../../../config/logger','../../rpc/cmHopper','../../rpc/cmHopperBlack','../../rpc/cmHopperHistory','inspect','getContactDialer','dialOrderByScheduledAt','catch','temp','error','[getContactDialer]','getContactDialerIvr','[getContactDialerIvr]','[countReScheduled]','countReScheduled','rescheduleContact','[rescheduleContact]','unlockContact','moveContactManagedDialer','[moveContactManagedDialer]','checkIsBlackList','[checkIsBlackList]','[checkIsBlackListIvr]','checkIsBlackListIvr','verifyAdditionalPhones','[verifyAdditionalPhone]','swapAdditionalPhones','[swapAdditionalPhone]'];(function(_0x3db300,_0x3fcc99){var _0x5150cb=function(_0x3a5514){while(--_0x3a5514){_0x3db300['push'](_0x3db300['shift']());}};_0x5150cb(++_0x3fcc99);}(_0x71ab,0x64));var _0xb71a=function(_0x502c7d,_0x2f1285){_0x502c7d=_0x502c7d-0x0;var _0x30b7ed=_0x71ab[_0x502c7d];return _0x30b7ed;};'use strict';var util=require('util');var logger=require(_0xb71a('0x0'))('dialer');var cmHopper=require(_0xb71a('0x1'));var cmHopperAdditionalPhone=require('../../rpc/cmHopperAdditionalPhone');var cmHopperBlack=require(_0xb71a('0x2'));var cmHopperHistory=require(_0xb71a('0x3'));function inspectError(_0x20fd9c){return util[_0xb71a('0x4')](_0x20fd9c,{'showHidden':![],'depth':null});}function getContactDialer(_0x37ce74,_0x3c6438,_0x2192e8){return cmHopper[_0xb71a('0x5')](_0x37ce74['id'],_0x3c6438,_0x2192e8,_0x37ce74[_0xb71a('0x6')])[_0xb71a('0x7')](function(_0x4358ce){_0x37ce74[_0xb71a('0x8')]=0x0;logger[_0xb71a('0x9')](_0xb71a('0xa'),inspectError(_0x4358ce));});}exports[_0xb71a('0x5')]=getContactDialer;function getContactDialerIvr(_0xbfef18,_0x378c96){return cmHopper[_0xb71a('0xb')](_0xbfef18['id'],_0x378c96,_0xbfef18['dialOrderByScheduledAt'])[_0xb71a('0x7')](function(_0x58956d){_0xbfef18[_0xb71a('0x8')]=0x0;logger[_0xb71a('0x9')](_0xb71a('0xc'),inspectError(_0x58956d));});}exports['getContactDialerIvr']=getContactDialerIvr;function countReScheduled(_0x3909b4){return cmHopper['countReScheduled'](_0x3909b4)[_0xb71a('0x7')](function(_0x50030d){logger['error'](_0xb71a('0xd'),inspectError(_0x50030d));});}exports[_0xb71a('0xe')]=countReScheduled;function rescheduleContact(_0x315ca8){return cmHopper[_0xb71a('0xf')](_0x315ca8)['catch'](function(_0x47ee48){logger['error'](_0xb71a('0x10'),inspectError(_0x47ee48));});}exports[_0xb71a('0xf')]=rescheduleContact;function unlockContact(_0x15252a,_0x42fc55,_0x3cd0f0){return cmHopper[_0xb71a('0x11')](_0x15252a,_0x42fc55,_0x3cd0f0)[_0xb71a('0x7')](function(_0x2ec64a){logger[_0xb71a('0x9')]('[unlockContact]',inspectError(_0x2ec64a));});}exports[_0xb71a('0x11')]=unlockContact;function moveContactManagedDialer(_0x2d6369){return cmHopper[_0xb71a('0x12')](_0x2d6369)[_0xb71a('0x7')](function(_0x2bdb61){logger[_0xb71a('0x9')](_0xb71a('0x13'),inspectError(_0x2bdb61));});}exports[_0xb71a('0x12')]=moveContactManagedDialer;function checkIsBlackList(_0x20bdfe){return cmHopperBlack[_0xb71a('0x14')](_0x20bdfe)[_0xb71a('0x7')](function(_0x494899){logger['error'](_0xb71a('0x15'),inspectError(_0x494899));});}exports[_0xb71a('0x14')]=checkIsBlackList;function checkIsBlackListIvr(_0x4a4f4e){return cmHopperBlack['checkIsBlackListIvr'](_0x4a4f4e)[_0xb71a('0x7')](function(_0x4fe4fb){logger[_0xb71a('0x9')](_0xb71a('0x16'),inspectError(_0x4fe4fb));});}exports[_0xb71a('0x17')]=checkIsBlackListIvr;function verifyAdditionalPhones(_0x18fa8d,_0x38a728,_0x14b2a1){return cmHopperAdditionalPhone[_0xb71a('0x18')](_0x18fa8d,_0x38a728,_0x14b2a1)[_0xb71a('0x7')](function(_0x5f3f19){logger[_0xb71a('0x9')](_0xb71a('0x19'),inspectError(_0x5f3f19));});}exports[_0xb71a('0x18')]=verifyAdditionalPhones;function swapAdditionalPhones(_0xa0743a,_0x3401f7,_0x1a010d){return cmHopperAdditionalPhone[_0xb71a('0x1a')](_0xa0743a,_0x3401f7,_0x1a010d)[_0xb71a('0x7')](function(_0x31085b){logger[_0xb71a('0x9')](_0xb71a('0x1b'),inspectError(_0x31085b));});}exports[_0xb71a('0x1a')]=swapAdditionalPhones;function avgHandleTime(_0x160f0f){return cmHopperHistory['avgHandleTime'](_0x160f0f)[_0xb71a('0x7')](function(_0x39d874){logger[_0xb71a('0x9')](_0xb71a('0x1c'),inspectError(_0x39d874));});}exports[_0xb71a('0x1d')]=avgHandleTime;function createHistory(_0x38178c){return cmHopperHistory[_0xb71a('0x1e')](_0x38178c)[_0xb71a('0x7')](function(_0x42c086){logger[_0xb71a('0x9')](_0xb71a('0x1f'),inspectError(_0x42c086));});}exports['createHistory']=createHistory;
\ No newline at end of file