Built motion from commit 4d4d9a88.|2.6.26
[motion2.git] / server / services / ami / rpc / cmHopper.js
index 97bf4d5..da8554e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5c91=['voicePause','resetActiveCalls','ResetActiveCalls','CmHopperHandlePreviewRecallNotifications','handlePreviewRecallNotifications','../client','moment','getContacts','Request','GetCmHopper','CmContact','Contact','getCmHopper','UpdateCmHopper','YYYY-MM-DD\x20HH:mm:ss','rescheduleContact','ContactId','CampaignId','DestroyCmHopper','getContactDialer','format','priority','DESC','scheduledat','ASC','GetContactDialer','getContactDialerIvr','GetContactDialerIvr','moveContactManagedDialer','queue','MoveContactManagedDialer','ListId','VoiceQueueId','countReScheduled','CountReScheduled','getContactPreview','GetCmHopperPreview','name','VoiceQueue','Queue','unlockContact','getContactRecallMe','GetContactRecallMe','Agent'];(function(_0x715ebc,_0xa57f8){var _0x4f2893=function(_0x486eb9){while(--_0x486eb9){_0x715ebc['push'](_0x715ebc['shift']());}};_0x4f2893(++_0xa57f8);}(_0x5c91,0x1e9));var _0x15c9=function(_0x302978,_0x1858b9){_0x302978=_0x302978-0x0;var _0x5a0737=_0x5c91[_0x302978];return _0x5a0737;};'use strict';var client=require(_0x15c9('0x0'));var moment=require(_0x15c9('0x1'));exports[_0x15c9('0x2')]=function(_0x50914e,_0x169444){return function(){return client[_0x15c9('0x3')](_0x15c9('0x4'),{'options':{'where':{'VoiceQueueId':_0x50914e},'include':[{'model':_0x15c9('0x5'),'as':_0x15c9('0x6')}],'limit':_0x169444,'raw':![]},'log':_0x15c9('0x7')});};};exports['updateContacts']=function(_0x41a4a9,_0x216469,_0x1ce11a){return function(){return client[_0x15c9('0x3')](_0x15c9('0x8'),{'body':_0x41a4a9,'options':{'where':{'VoiceQueueId':_0x216469,'scheduledat':{'$lte':moment()['format'](_0x15c9('0x9'))}},'limit':_0x1ce11a},'log':_0x15c9('0x8')});};};exports[_0x15c9('0xa')]=function(_0x5c29fc){return client[_0x15c9('0x3')](_0x15c9('0x8'),{'body':_0x5c29fc,'options':{'where':{'ContactId':_0x5c29fc[_0x15c9('0xb')],'ListId':_0x5c29fc['ListId'],'VoiceQueueId':_0x5c29fc['VoiceQueueId'],'CampaignId':_0x5c29fc[_0x15c9('0xc')]}},'log':_0x15c9('0xa')});};exports['destroyContact']=function(_0x5c1eb7,_0x538952,_0x3bec2b){return function(){return client[_0x15c9('0x3')]('DestroyCmHopper',{'options':{'where':{'VoiceQueueId':_0x5c1eb7,'ListId':_0x538952,'ContactId':_0x3bec2b}},'log':_0x15c9('0xd')});};};exports[_0x15c9('0xe')]=function(_0x317aee,_0x56fbbd,_0x4e221e,_0x9e4403){return client[_0x15c9('0x3')]('GetContactDialer',{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x317aee,'active':![],'scheduledat':{'$lte':moment()[_0x15c9('0xf')]('YYYY-MM-DD\x20HH:mm:ss')},'$or':[{'UserId':null},{'UserId':{'$in':_0x56fbbd}}]},'order':[[_0x15c9('0x10'),_0x15c9('0x11')],[_0x15c9('0x12'),_0x9e4403],['id',_0x15c9('0x13')]],'raw':!![],'limit':_0x4e221e},'log':_0x15c9('0x14')});};exports[_0x15c9('0x15')]=function(_0x5eb50e,_0x36a9ea,_0x41cdaa){return client[_0x15c9('0x3')](_0x15c9('0x14'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x5eb50e,'active':![],'scheduledat':{'$lte':moment()[_0x15c9('0xf')](_0x15c9('0x9'))}},'include':[{'model':_0x15c9('0x5'),'as':_0x15c9('0x6')}],'order':[['priority',_0x15c9('0x11')],[_0x15c9('0x12'),_0x41cdaa],['id',_0x15c9('0x13')]],'raw':!![],'limit':_0x36a9ea},'log':_0x15c9('0x16')});};exports[_0x15c9('0x17')]=function(_0x4539c0,_0x4a48fb){_0x4539c0['campaign']=_0x4539c0[_0x15c9('0x18')];return client[_0x15c9('0x3')](_0x15c9('0x19'),{'body':_0x4539c0,'options':{'where':{'ContactId':_0x4539c0[_0x15c9('0xb')],'ListId':_0x4539c0[_0x15c9('0x1a')],'VoiceQueueId':_0x4539c0[_0x15c9('0x1b')],'CampaignId':_0x4539c0[_0x15c9('0xc')],'active':_0x4a48fb?undefined:!![]}},'log':_0x15c9('0x19')});};exports[_0x15c9('0x1c')]=function(_0x45411c){return client['Request'](_0x15c9('0x1d'),{'options':{'where':{'VoiceQueueId':_0x45411c['id']?_0x45411c['id']||null:null}},'log':'countReScheduled'});};exports[_0x15c9('0x1e')]=function(_0x2a64d3){return function(){return client['Request'](_0x15c9('0x1f'),{'options':{'where':{'id':_0x2a64d3},'include':[{'model':_0x15c9('0x5'),'as':_0x15c9('0x6')},{'model':'User','as':'Agent','attributes':['id',_0x15c9('0x20')]},{'model':_0x15c9('0x21'),'as':_0x15c9('0x22'),'attributes':['id',_0x15c9('0x20')]}],'raw':!![]},'log':'getCmHopper'});};};exports[_0x15c9('0x23')]=function(_0x3d1ff5,_0x3d7b0a,_0x8d9ab0){return client[_0x15c9('0x3')](_0x15c9('0x8'),{'body':_0x3d1ff5,'options':{'where':{'id':_0x3d7b0a},'limit':_0x8d9ab0},'log':_0x15c9('0x8')});};exports[_0x15c9('0x24')]=function(_0x5ca63f,_0x29191e){return function(){return client[_0x15c9('0x3')](_0x15c9('0x25'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x5ca63f,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0x15c9('0xf')](_0x15c9('0x9'))},'UserId':{'$in':_0x29191e}},'order':[[_0x15c9('0x10'),_0x15c9('0x11')],[_0x15c9('0x12'),_0x15c9('0x11')],['id',_0x15c9('0x13')]],'include':[{'model':_0x15c9('0x5'),'as':_0x15c9('0x6')},{'model':'User','as':_0x15c9('0x26'),'attributes':['id','name',_0x15c9('0x27')]}],'group':'db.CmHopper.UserId','raw':!![]},'log':_0x15c9('0x14')});};};exports[_0x15c9('0x28')]=function(_0x2e7e43,_0x59eb97){return client[_0x15c9('0x3')](_0x15c9('0x29'),{'body':_0x2e7e43,'options':_0x59eb97||{},'log':'ResetActiveCalls'});};exports['handlePreviewRecallNotifications']=function(_0xd022c0,_0x1c0ad4,_0x4d16bf){return function(){return client[_0x15c9('0x3')](_0x15c9('0x2a'),{'body':{'where':{'voiceQueueIds':_0xd022c0,'interval':_0x1c0ad4,'availableAgentsIds':_0x4d16bf}},'log':_0x15c9('0x2b')});};};
\ No newline at end of file
+var _0x7dee=['CmContact','getCmHopper','UpdateCmHopper','format','rescheduleContact','ContactId','ListId','VoiceQueueId','CampaignId','destroyContact','DestroyCmHopper','getContactDialer','GetContactDialer','DESC','scheduledat','ASC','getContactDialerIvr','YYYY-MM-DD\x20HH:mm:ss','Contact','priority','GetContactDialerIvr','moveContactManagedDialer','queue','MoveContactManagedDialer','countReScheduled','CountReScheduled','getContactPreview','GetCmHopperPreview','User','Agent','name','VoiceQueue','Queue','getContactRecallMe','GetContactRecallMe','voicePause','db.CmHopper.UserId','resetActiveCalls','ResetActiveCalls','handlePreviewRecallNotifications','CmHopperHandlePreviewRecallNotifications','../client','getContacts','Request','GetCmHopper'];(function(_0x72c67a,_0xb3e2b8){var _0x40e05d=function(_0x2080d6){while(--_0x2080d6){_0x72c67a['push'](_0x72c67a['shift']());}};_0x40e05d(++_0xb3e2b8);}(_0x7dee,0xb0));var _0xe7de=function(_0x169b01,_0x565014){_0x169b01=_0x169b01-0x0;var _0x30d41=_0x7dee[_0x169b01];return _0x30d41;};'use strict';var client=require(_0xe7de('0x0'));var moment=require('moment');exports[_0xe7de('0x1')]=function(_0x51419e,_0x3aade6){return function(){return client[_0xe7de('0x2')](_0xe7de('0x3'),{'options':{'where':{'VoiceQueueId':_0x51419e},'include':[{'model':_0xe7de('0x4'),'as':'Contact'}],'limit':_0x3aade6,'raw':![]},'log':_0xe7de('0x5')});};};exports['updateContacts']=function(_0x38d39e,_0x19f79d,_0x26a524){return function(){return client[_0xe7de('0x2')](_0xe7de('0x6'),{'body':_0x38d39e,'options':{'where':{'VoiceQueueId':_0x19f79d,'scheduledat':{'$lte':moment()[_0xe7de('0x7')]('YYYY-MM-DD\x20HH:mm:ss')}},'limit':_0x26a524},'log':_0xe7de('0x6')});};};exports[_0xe7de('0x8')]=function(_0x27629b){return client[_0xe7de('0x2')]('UpdateCmHopper',{'body':_0x27629b,'options':{'where':{'ContactId':_0x27629b[_0xe7de('0x9')],'ListId':_0x27629b[_0xe7de('0xa')],'VoiceQueueId':_0x27629b[_0xe7de('0xb')],'CampaignId':_0x27629b[_0xe7de('0xc')]}},'log':_0xe7de('0x8')});};exports[_0xe7de('0xd')]=function(_0x358e90,_0x4d9722,_0x15b4b5){return function(){return client[_0xe7de('0x2')](_0xe7de('0xe'),{'options':{'where':{'VoiceQueueId':_0x358e90,'ListId':_0x4d9722,'ContactId':_0x15b4b5}},'log':_0xe7de('0xe')});};};exports[_0xe7de('0xf')]=function(_0x47fe72,_0x1cb4cf,_0x45f394,_0x280473){return client[_0xe7de('0x2')](_0xe7de('0x10'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x47fe72,'active':![],'scheduledat':{'$lte':moment()[_0xe7de('0x7')]('YYYY-MM-DD\x20HH:mm:ss')},'$or':[{'UserId':null},{'UserId':{'$in':_0x1cb4cf}}]},'order':[['priority',_0xe7de('0x11')],[_0xe7de('0x12'),_0x280473],['id',_0xe7de('0x13')]],'raw':!![],'limit':_0x45f394},'log':_0xe7de('0x10')});};exports[_0xe7de('0x14')]=function(_0x573cb4,_0xa16c4a,_0x4b1648){return client['Request']('GetContactDialer',{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x573cb4,'active':![],'scheduledat':{'$lte':moment()[_0xe7de('0x7')](_0xe7de('0x15'))}},'include':[{'model':'CmContact','as':_0xe7de('0x16')}],'order':[[_0xe7de('0x17'),_0xe7de('0x11')],[_0xe7de('0x12'),_0x4b1648],['id',_0xe7de('0x13')]],'raw':!![],'limit':_0xa16c4a},'log':_0xe7de('0x18')});};exports[_0xe7de('0x19')]=function(_0xfead44,_0x1c6fa6){_0xfead44['campaign']=_0xfead44[_0xe7de('0x1a')];return client[_0xe7de('0x2')](_0xe7de('0x1b'),{'body':_0xfead44,'options':{'where':{'ContactId':_0xfead44['ContactId'],'ListId':_0xfead44[_0xe7de('0xa')],'VoiceQueueId':_0xfead44['VoiceQueueId'],'CampaignId':_0xfead44[_0xe7de('0xc')],'active':_0x1c6fa6?undefined:!![]}},'log':_0xe7de('0x1b')});};exports[_0xe7de('0x1c')]=function(_0x5e97ec){return client[_0xe7de('0x2')](_0xe7de('0x1d'),{'options':{'where':{'VoiceQueueId':_0x5e97ec['id']?_0x5e97ec['id']||null:null}},'log':_0xe7de('0x1c')});};exports[_0xe7de('0x1e')]=function(_0x2c65c1){return function(){return client[_0xe7de('0x2')](_0xe7de('0x1f'),{'options':{'where':{'id':_0x2c65c1},'include':[{'model':_0xe7de('0x4'),'as':'Contact'},{'model':_0xe7de('0x20'),'as':_0xe7de('0x21'),'attributes':['id',_0xe7de('0x22')]},{'model':_0xe7de('0x23'),'as':_0xe7de('0x24'),'attributes':['id',_0xe7de('0x22')]}],'raw':!![]},'log':_0xe7de('0x5')});};};exports['unlockContact']=function(_0x917378,_0x33c364,_0x3a4666){return client[_0xe7de('0x2')](_0xe7de('0x6'),{'body':_0x917378,'options':{'where':{'id':_0x33c364},'limit':_0x3a4666},'log':'UpdateCmHopper'});};exports[_0xe7de('0x25')]=function(_0x241a37,_0x596cb2){return function(){return client['Request'](_0xe7de('0x26'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x241a37,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0xe7de('0x7')](_0xe7de('0x15'))},'UserId':{'$in':_0x596cb2}},'order':[[_0xe7de('0x17'),'DESC'],[_0xe7de('0x12'),_0xe7de('0x11')],['id',_0xe7de('0x13')]],'include':[{'model':_0xe7de('0x4'),'as':'Contact'},{'model':_0xe7de('0x20'),'as':_0xe7de('0x21'),'attributes':['id',_0xe7de('0x22'),_0xe7de('0x27')]}],'group':_0xe7de('0x28'),'raw':!![]},'log':_0xe7de('0x10')});};};exports[_0xe7de('0x29')]=function(_0x4726ff,_0x5784fa){return client[_0xe7de('0x2')](_0xe7de('0x2a'),{'body':_0x4726ff,'options':_0x5784fa||{},'log':_0xe7de('0x2a')});};exports[_0xe7de('0x2b')]=function(_0x2255ef,_0xbcab4a,_0x4740e2){return function(){return client[_0xe7de('0x2')](_0xe7de('0x2c'),{'body':{'where':{'voiceQueueIds':_0x2255ef,'interval':_0xbcab4a,'availableAgentsIds':_0x4740e2}},'log':_0xe7de('0x2b')});};};
\ No newline at end of file