Built motion from commit 1fd437e9.|2.6.19
[motion2.git] / server / services / ami / dialer / utils / hopper.js
index 3ed4acd..b8f2f26 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xffd6=['[getContactDialerIvr]','getContactDialerIvr','countReScheduled','[countReScheduled]','rescheduleContact','unlockContact','[unlockContact]','moveContactManagedDialer','checkIsBlackList','checkIsBlackListIvr','verifyAdditionalPhones','[verifyAdditionalPhone]','[swapAdditionalPhone]','avgHandleTime','createHistory','[createHistory]','util','../../../../config/logger','dialer','../../rpc/cmHopperBlack','../../rpc/cmHopperHistory','getContactDialer','catch','temp','error','[getContactDialer]','dialOrderByScheduledAt'];(function(_0x2ace90,_0x16f0b5){var _0x557d70=function(_0x32e122){while(--_0x32e122){_0x2ace90['push'](_0x2ace90['shift']());}};_0x557d70(++_0x16f0b5);}(_0xffd6,0x97));var _0x6ffd=function(_0xa3c06b,_0x490f99){_0xa3c06b=_0xa3c06b-0x0;var _0x33aa1d=_0xffd6[_0xa3c06b];return _0x33aa1d;};'use strict';var util=require(_0x6ffd('0x0'));var logger=require(_0x6ffd('0x1'))(_0x6ffd('0x2'));var cmHopper=require('../../rpc/cmHopper');var cmHopperAdditionalPhone=require('../../rpc/cmHopperAdditionalPhone');var cmHopperBlack=require(_0x6ffd('0x3'));var cmHopperHistory=require(_0x6ffd('0x4'));function inspectError(_0x39fd49){return util['inspect'](_0x39fd49,{'showHidden':![],'depth':null});}function getContactDialer(_0x1d12e3,_0x173979,_0x3b8a46){return cmHopper[_0x6ffd('0x5')](_0x1d12e3['id'],_0x173979,_0x3b8a46,_0x1d12e3['dialOrderByScheduledAt'])[_0x6ffd('0x6')](function(_0xeefe34){_0x1d12e3[_0x6ffd('0x7')]=0x0;logger[_0x6ffd('0x8')](_0x6ffd('0x9'),inspectError(_0xeefe34));});}exports['getContactDialer']=getContactDialer;function getContactDialerIvr(_0x455dda,_0x417f34){return cmHopper['getContactDialerIvr'](_0x455dda['id'],_0x417f34,_0x455dda[_0x6ffd('0xa')])[_0x6ffd('0x6')](function(_0x23f7f2){_0x455dda[_0x6ffd('0x7')]=0x0;logger[_0x6ffd('0x8')](_0x6ffd('0xb'),inspectError(_0x23f7f2));});}exports[_0x6ffd('0xc')]=getContactDialerIvr;function countReScheduled(_0x5892e1){return cmHopper[_0x6ffd('0xd')](_0x5892e1)[_0x6ffd('0x6')](function(_0x5e8d6d){logger[_0x6ffd('0x8')](_0x6ffd('0xe'),inspectError(_0x5e8d6d));});}exports[_0x6ffd('0xd')]=countReScheduled;function rescheduleContact(_0x1a00d9){return cmHopper['rescheduleContact'](_0x1a00d9)[_0x6ffd('0x6')](function(_0x594cb3){logger[_0x6ffd('0x8')]('[rescheduleContact]',inspectError(_0x594cb3));});}exports[_0x6ffd('0xf')]=rescheduleContact;function unlockContact(_0x261ed7,_0x45db49,_0x5d8aff){return cmHopper[_0x6ffd('0x10')](_0x261ed7,_0x45db49,_0x5d8aff)[_0x6ffd('0x6')](function(_0x350c94){logger[_0x6ffd('0x8')](_0x6ffd('0x11'),inspectError(_0x350c94));});}exports[_0x6ffd('0x10')]=unlockContact;function moveContactManagedDialer(_0x3f38e7){return cmHopper[_0x6ffd('0x12')](_0x3f38e7)['catch'](function(_0x11a609){logger['error']('[moveContactManagedDialer]',inspectError(_0x11a609));});}exports[_0x6ffd('0x12')]=moveContactManagedDialer;function checkIsBlackList(_0x359d09){return cmHopperBlack['checkIsBlackList'](_0x359d09)[_0x6ffd('0x6')](function(_0x4612a3){logger['error']('[checkIsBlackList]',inspectError(_0x4612a3));});}exports[_0x6ffd('0x13')]=checkIsBlackList;function checkIsBlackListIvr(_0x1c9d19){return cmHopperBlack['checkIsBlackListIvr'](_0x1c9d19)[_0x6ffd('0x6')](function(_0x39f25c){logger[_0x6ffd('0x8')]('[checkIsBlackListIvr]',inspectError(_0x39f25c));});}exports[_0x6ffd('0x14')]=checkIsBlackListIvr;function verifyAdditionalPhones(_0x2efeb5,_0x50896b,_0x356c9c){return cmHopperAdditionalPhone[_0x6ffd('0x15')](_0x2efeb5,_0x50896b,_0x356c9c)['catch'](function(_0x31fb22){logger[_0x6ffd('0x8')](_0x6ffd('0x16'),inspectError(_0x31fb22));});}exports['verifyAdditionalPhones']=verifyAdditionalPhones;function swapAdditionalPhones(_0x46631e,_0x3e5726,_0x46b03f){return cmHopperAdditionalPhone['swapAdditionalPhones'](_0x46631e,_0x3e5726,_0x46b03f)[_0x6ffd('0x6')](function(_0x5a55e2){logger[_0x6ffd('0x8')](_0x6ffd('0x17'),inspectError(_0x5a55e2));});}exports['swapAdditionalPhones']=swapAdditionalPhones;function avgHandleTime(_0x520258){return cmHopperHistory[_0x6ffd('0x18')](_0x520258)[_0x6ffd('0x6')](function(_0x1934d4){logger['error']('[avgHandleTime]',inspectError(_0x1934d4));});}exports[_0x6ffd('0x18')]=avgHandleTime;function createHistory(_0x48feb4){return cmHopperHistory[_0x6ffd('0x19')](_0x48feb4)[_0x6ffd('0x6')](function(_0x51fdb6){logger[_0x6ffd('0x8')](_0x6ffd('0x1a'),inspectError(_0x51fdb6));});}exports[_0x6ffd('0x19')]=createHistory;
\ No newline at end of file
+var _0x8f9d=['[createHistory]','createHistory','util','dialer','../../rpc/cmHopperAdditionalPhone','../../rpc/cmHopperBlack','../../rpc/cmHopperHistory','inspect','getContactDialer','dialOrderByScheduledAt','catch','temp','[getContactDialer]','error','[getContactDialerIvr]','getContactDialerIvr','[countReScheduled]','countReScheduled','rescheduleContact','unlockContact','checkIsBlackList','[checkIsBlackList]','checkIsBlackListIvr','[checkIsBlackListIvr]','verifyAdditionalPhones','[verifyAdditionalPhone]','swapAdditionalPhones','[swapAdditionalPhone]','avgHandleTime'];(function(_0x397a8b,_0x5438ca){var _0x54054f=function(_0x21f8c8){while(--_0x21f8c8){_0x397a8b['push'](_0x397a8b['shift']());}};_0x54054f(++_0x5438ca);}(_0x8f9d,0x93));var _0xd8f9=function(_0x19950b,_0x53d0d7){_0x19950b=_0x19950b-0x0;var _0x3c6b41=_0x8f9d[_0x19950b];return _0x3c6b41;};'use strict';var util=require(_0xd8f9('0x0'));var logger=require('../../../../config/logger')(_0xd8f9('0x1'));var cmHopper=require('../../rpc/cmHopper');var cmHopperAdditionalPhone=require(_0xd8f9('0x2'));var cmHopperBlack=require(_0xd8f9('0x3'));var cmHopperHistory=require(_0xd8f9('0x4'));function inspectError(_0x354c26){return util[_0xd8f9('0x5')](_0x354c26,{'showHidden':![],'depth':null});}function getContactDialer(_0x1b82b8,_0x1d6420,_0x5941ce){return cmHopper[_0xd8f9('0x6')](_0x1b82b8['id'],_0x1d6420,_0x5941ce,_0x1b82b8[_0xd8f9('0x7')])[_0xd8f9('0x8')](function(_0x241aaa){_0x1b82b8[_0xd8f9('0x9')]=0x0;logger['error'](_0xd8f9('0xa'),inspectError(_0x241aaa));});}exports[_0xd8f9('0x6')]=getContactDialer;function getContactDialerIvr(_0x4957ae,_0x33c31e){return cmHopper['getContactDialerIvr'](_0x4957ae['id'],_0x33c31e,_0x4957ae['dialOrderByScheduledAt'])[_0xd8f9('0x8')](function(_0x3d0bea){_0x4957ae[_0xd8f9('0x9')]=0x0;logger[_0xd8f9('0xb')](_0xd8f9('0xc'),inspectError(_0x3d0bea));});}exports[_0xd8f9('0xd')]=getContactDialerIvr;function countReScheduled(_0x14c630){return cmHopper['countReScheduled'](_0x14c630)[_0xd8f9('0x8')](function(_0x56e0d6){logger[_0xd8f9('0xb')](_0xd8f9('0xe'),inspectError(_0x56e0d6));});}exports[_0xd8f9('0xf')]=countReScheduled;function rescheduleContact(_0x5b01ce){return cmHopper[_0xd8f9('0x10')](_0x5b01ce)[_0xd8f9('0x8')](function(_0x4cfebf){logger[_0xd8f9('0xb')]('[rescheduleContact]',inspectError(_0x4cfebf));});}exports[_0xd8f9('0x10')]=rescheduleContact;function unlockContact(_0x1525d6,_0x234901,_0x10369c){return cmHopper[_0xd8f9('0x11')](_0x1525d6,_0x234901,_0x10369c)[_0xd8f9('0x8')](function(_0x566448){logger['error']('[unlockContact]',inspectError(_0x566448));});}exports[_0xd8f9('0x11')]=unlockContact;function moveContactManagedDialer(_0xc6a825){return cmHopper['moveContactManagedDialer'](_0xc6a825)[_0xd8f9('0x8')](function(_0x47bdea){logger[_0xd8f9('0xb')]('[moveContactManagedDialer]',inspectError(_0x47bdea));});}exports['moveContactManagedDialer']=moveContactManagedDialer;function checkIsBlackList(_0x58956e){return cmHopperBlack[_0xd8f9('0x12')](_0x58956e)['catch'](function(_0x37a252){logger[_0xd8f9('0xb')](_0xd8f9('0x13'),inspectError(_0x37a252));});}exports[_0xd8f9('0x12')]=checkIsBlackList;function checkIsBlackListIvr(_0x3b141a){return cmHopperBlack[_0xd8f9('0x14')](_0x3b141a)['catch'](function(_0x1de3cc){logger[_0xd8f9('0xb')](_0xd8f9('0x15'),inspectError(_0x1de3cc));});}exports[_0xd8f9('0x14')]=checkIsBlackListIvr;function verifyAdditionalPhones(_0x1bf210,_0x318d6a,_0x4c5808){return cmHopperAdditionalPhone[_0xd8f9('0x16')](_0x1bf210,_0x318d6a,_0x4c5808)[_0xd8f9('0x8')](function(_0x1fcd45){logger[_0xd8f9('0xb')](_0xd8f9('0x17'),inspectError(_0x1fcd45));});}exports['verifyAdditionalPhones']=verifyAdditionalPhones;function swapAdditionalPhones(_0xcc9b18,_0x1d6796,_0x28854a){return cmHopperAdditionalPhone[_0xd8f9('0x18')](_0xcc9b18,_0x1d6796,_0x28854a)[_0xd8f9('0x8')](function(_0x9e1d6d){logger[_0xd8f9('0xb')](_0xd8f9('0x19'),inspectError(_0x9e1d6d));});}exports['swapAdditionalPhones']=swapAdditionalPhones;function avgHandleTime(_0x464a6a){return cmHopperHistory[_0xd8f9('0x1a')](_0x464a6a)[_0xd8f9('0x8')](function(_0x58a3ca){logger['error']('[avgHandleTime]',inspectError(_0x58a3ca));});}exports[_0xd8f9('0x1a')]=avgHandleTime;function createHistory(_0x2c25c2){return cmHopperHistory['createHistory'](_0x2c25c2)[_0xd8f9('0x8')](function(_0x210cd1){logger['error'](_0xd8f9('0x1b'),inspectError(_0x210cd1));});}exports[_0xd8f9('0x1c')]=createHistory;
\ No newline at end of file