Built motion from commit c738b9ac.|2.6.25
[motion2.git] / server / services / ami / rpc / cmHopper.js
index de1401a..837323b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5e8d=['MoveContactManagedDialer','VoiceQueueId','countReScheduled','getContactPreview','GetCmHopperPreview','User','Agent','name','VoiceQueue','Queue','unlockContact','getContactRecallMe','GetContactRecallMe','db.CmHopper.UserId','resetActiveCalls','ResetActiveCalls','CmHopperHandlePreviewRecallNotifications','handlePreviewRecallNotifications','../client','moment','getContacts','Request','GetCmHopper','Contact','getCmHopper','UpdateCmHopper','format','YYYY-MM-DD\x20HH:mm:ss','ContactId','ListId','CampaignId','rescheduleContact','DestroyCmHopper','getContactDialer','GetContactDialer','priority','DESC','ASC','getContactDialerIvr','CmContact','scheduledat','moveContactManagedDialer','campaign','queue'];(function(_0x4cce81,_0x252735){var _0xad14bc=function(_0x53bc1e){while(--_0x53bc1e){_0x4cce81['push'](_0x4cce81['shift']());}};_0xad14bc(++_0x252735);}(_0x5e8d,0x11a));var _0xd5e8=function(_0xf82ca5,_0x33f821){_0xf82ca5=_0xf82ca5-0x0;var _0x4bd293=_0x5e8d[_0xf82ca5];return _0x4bd293;};'use strict';var client=require(_0xd5e8('0x0'));var moment=require(_0xd5e8('0x1'));exports[_0xd5e8('0x2')]=function(_0x40174f,_0x16c915){return function(){return client[_0xd5e8('0x3')](_0xd5e8('0x4'),{'options':{'where':{'VoiceQueueId':_0x40174f},'include':[{'model':'CmContact','as':_0xd5e8('0x5')}],'limit':_0x16c915,'raw':![]},'log':_0xd5e8('0x6')});};};exports['updateContacts']=function(_0x3d6e42,_0x2ea3be,_0x195f41){return function(){return client['Request'](_0xd5e8('0x7'),{'body':_0x3d6e42,'options':{'where':{'VoiceQueueId':_0x2ea3be,'scheduledat':{'$lte':moment()[_0xd5e8('0x8')](_0xd5e8('0x9'))}},'limit':_0x195f41},'log':_0xd5e8('0x7')});};};exports['rescheduleContact']=function(_0x55bdd1){return client[_0xd5e8('0x3')](_0xd5e8('0x7'),{'body':_0x55bdd1,'options':{'where':{'ContactId':_0x55bdd1[_0xd5e8('0xa')],'ListId':_0x55bdd1[_0xd5e8('0xb')],'VoiceQueueId':_0x55bdd1['VoiceQueueId'],'CampaignId':_0x55bdd1[_0xd5e8('0xc')]}},'log':_0xd5e8('0xd')});};exports['destroyContact']=function(_0x4c6cba,_0x11f7d2,_0xe54a9a){return function(){return client[_0xd5e8('0x3')](_0xd5e8('0xe'),{'options':{'where':{'VoiceQueueId':_0x4c6cba,'ListId':_0x11f7d2,'ContactId':_0xe54a9a}},'log':_0xd5e8('0xe')});};};exports[_0xd5e8('0xf')]=function(_0x344b5b,_0x12d39a,_0x5df4fb,_0x5a6665){return client[_0xd5e8('0x3')](_0xd5e8('0x10'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x344b5b,'active':![],'scheduledat':{'$lte':moment()[_0xd5e8('0x8')](_0xd5e8('0x9'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x12d39a}}]},'order':[[_0xd5e8('0x11'),_0xd5e8('0x12')],['scheduledat',_0x5a6665],['id',_0xd5e8('0x13')]],'raw':!![],'limit':_0x5df4fb},'log':_0xd5e8('0x10')});};exports[_0xd5e8('0x14')]=function(_0x2dfd4a,_0x5dc327,_0x3daf6a){return client[_0xd5e8('0x3')]('GetContactDialer',{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x2dfd4a,'active':![],'scheduledat':{'$lte':moment()[_0xd5e8('0x8')](_0xd5e8('0x9'))}},'include':[{'model':_0xd5e8('0x15'),'as':_0xd5e8('0x5')}],'order':[[_0xd5e8('0x11'),_0xd5e8('0x12')],[_0xd5e8('0x16'),_0x3daf6a],['id',_0xd5e8('0x13')]],'raw':!![],'limit':_0x5dc327},'log':'GetContactDialerIvr'});};exports[_0xd5e8('0x17')]=function(_0x1b1631,_0x2c4fde){_0x1b1631[_0xd5e8('0x18')]=_0x1b1631[_0xd5e8('0x19')];return client[_0xd5e8('0x3')](_0xd5e8('0x1a'),{'body':_0x1b1631,'options':{'where':{'ContactId':_0x1b1631[_0xd5e8('0xa')],'ListId':_0x1b1631[_0xd5e8('0xb')],'VoiceQueueId':_0x1b1631[_0xd5e8('0x1b')],'CampaignId':_0x1b1631[_0xd5e8('0xc')],'active':_0x2c4fde?undefined:!![]}},'log':_0xd5e8('0x1a')});};exports[_0xd5e8('0x1c')]=function(_0x5bfbb2){return client['Request']('CountReScheduled',{'options':{'where':{'VoiceQueueId':_0x5bfbb2['id']?_0x5bfbb2['id']||null:null}},'log':'countReScheduled'});};exports[_0xd5e8('0x1d')]=function(_0x5620cb){return function(){return client[_0xd5e8('0x3')](_0xd5e8('0x1e'),{'options':{'where':{'id':_0x5620cb},'include':[{'model':'CmContact','as':'Contact'},{'model':_0xd5e8('0x1f'),'as':_0xd5e8('0x20'),'attributes':['id',_0xd5e8('0x21')]},{'model':_0xd5e8('0x22'),'as':_0xd5e8('0x23'),'attributes':['id',_0xd5e8('0x21')]}],'raw':!![]},'log':_0xd5e8('0x6')});};};exports[_0xd5e8('0x24')]=function(_0x45bf59,_0x583ea1,_0x46b78d){return client['Request'](_0xd5e8('0x7'),{'body':_0x45bf59,'options':{'where':{'id':_0x583ea1},'limit':_0x46b78d},'log':_0xd5e8('0x7')});};exports[_0xd5e8('0x25')]=function(_0x180d1f,_0x1bbcb7){return function(){return client['Request'](_0xd5e8('0x26'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x180d1f,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0xd5e8('0x8')]('YYYY-MM-DD\x20HH:mm:ss')},'UserId':{'$in':_0x1bbcb7}},'order':[[_0xd5e8('0x11'),'DESC'],[_0xd5e8('0x16'),_0xd5e8('0x12')],['id',_0xd5e8('0x13')]],'include':[{'model':_0xd5e8('0x15'),'as':_0xd5e8('0x5')},{'model':_0xd5e8('0x1f'),'as':_0xd5e8('0x20'),'attributes':['id',_0xd5e8('0x21'),'voicePause']}],'group':_0xd5e8('0x27'),'raw':!![]},'log':_0xd5e8('0x10')});};};exports[_0xd5e8('0x28')]=function(_0x22a9c1,_0x2932ae){return client[_0xd5e8('0x3')](_0xd5e8('0x29'),{'body':_0x22a9c1,'options':_0x2932ae||{},'log':_0xd5e8('0x29')});};exports['handlePreviewRecallNotifications']=function(_0x5d5b86,_0x50bbd4,_0x306593){return function(){return client[_0xd5e8('0x3')](_0xd5e8('0x2a'),{'body':{'where':{'voiceQueueIds':_0x5d5b86,'interval':_0x50bbd4,'availableAgentsIds':_0x306593}},'log':_0xd5e8('0x2b')});};};
\ No newline at end of file
+var _0x5a2a=['User','Agent','name','Queue','unlockContact','GetContactRecallMe','voicePause','db.CmHopper.UserId','resetActiveCalls','handlePreviewRecallNotifications','CmHopperHandlePreviewRecallNotifications','../client','moment','getContacts','CmContact','Contact','updateContacts','Request','format','YYYY-MM-DD\x20HH:mm:ss','UpdateCmHopper','ContactId','ListId','VoiceQueueId','rescheduleContact','destroyContact','DestroyCmHopper','DESC','scheduledat','GetContactDialer','getContactDialerIvr','priority','ASC','GetContactDialerIvr','campaign','queue','MoveContactManagedDialer','CampaignId','countReScheduled','GetCmHopperPreview'];(function(_0x16076a,_0x3cc440){var _0x45f4e6=function(_0xfd0e42){while(--_0xfd0e42){_0x16076a['push'](_0x16076a['shift']());}};_0x45f4e6(++_0x3cc440);}(_0x5a2a,0x1c3));var _0xa5a2=function(_0x529f2b,_0x49ca89){_0x529f2b=_0x529f2b-0x0;var _0x26967f=_0x5a2a[_0x529f2b];return _0x26967f;};'use strict';var client=require(_0xa5a2('0x0'));var moment=require(_0xa5a2('0x1'));exports[_0xa5a2('0x2')]=function(_0x1c932a,_0x5d3456){return function(){return client['Request']('GetCmHopper',{'options':{'where':{'VoiceQueueId':_0x1c932a},'include':[{'model':_0xa5a2('0x3'),'as':_0xa5a2('0x4')}],'limit':_0x5d3456,'raw':![]},'log':'getCmHopper'});};};exports[_0xa5a2('0x5')]=function(_0x14aac8,_0x2e97d3,_0x55728b){return function(){return client[_0xa5a2('0x6')]('UpdateCmHopper',{'body':_0x14aac8,'options':{'where':{'VoiceQueueId':_0x2e97d3,'scheduledat':{'$lte':moment()[_0xa5a2('0x7')](_0xa5a2('0x8'))}},'limit':_0x55728b},'log':_0xa5a2('0x9')});};};exports['rescheduleContact']=function(_0x5c254b){return client[_0xa5a2('0x6')](_0xa5a2('0x9'),{'body':_0x5c254b,'options':{'where':{'ContactId':_0x5c254b[_0xa5a2('0xa')],'ListId':_0x5c254b[_0xa5a2('0xb')],'VoiceQueueId':_0x5c254b[_0xa5a2('0xc')],'CampaignId':_0x5c254b['CampaignId']}},'log':_0xa5a2('0xd')});};exports[_0xa5a2('0xe')]=function(_0x28f227,_0x288f31,_0x323527){return function(){return client[_0xa5a2('0x6')](_0xa5a2('0xf'),{'options':{'where':{'VoiceQueueId':_0x28f227,'ListId':_0x288f31,'ContactId':_0x323527}},'log':'DestroyCmHopper'});};};exports['getContactDialer']=function(_0x121b17,_0x3e058b,_0x5704b7,_0x29174b){return client[_0xa5a2('0x6')]('GetContactDialer',{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x121b17,'active':![],'scheduledat':{'$lte':moment()[_0xa5a2('0x7')](_0xa5a2('0x8'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x3e058b}}]},'order':[['priority',_0xa5a2('0x10')],[_0xa5a2('0x11'),_0x29174b],['id','ASC']],'raw':!![],'limit':_0x5704b7},'log':_0xa5a2('0x12')});};exports[_0xa5a2('0x13')]=function(_0x599599,_0x15e36b,_0x996384){return client[_0xa5a2('0x6')](_0xa5a2('0x12'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x599599,'active':![],'scheduledat':{'$lte':moment()[_0xa5a2('0x7')](_0xa5a2('0x8'))}},'include':[{'model':'CmContact','as':_0xa5a2('0x4')}],'order':[[_0xa5a2('0x14'),_0xa5a2('0x10')],[_0xa5a2('0x11'),_0x996384],['id',_0xa5a2('0x15')]],'raw':!![],'limit':_0x15e36b},'log':_0xa5a2('0x16')});};exports['moveContactManagedDialer']=function(_0x299208,_0x2fa65d){_0x299208[_0xa5a2('0x17')]=_0x299208[_0xa5a2('0x18')];return client[_0xa5a2('0x6')](_0xa5a2('0x19'),{'body':_0x299208,'options':{'where':{'ContactId':_0x299208[_0xa5a2('0xa')],'ListId':_0x299208[_0xa5a2('0xb')],'VoiceQueueId':_0x299208[_0xa5a2('0xc')],'CampaignId':_0x299208[_0xa5a2('0x1a')],'active':_0x2fa65d?undefined:!![]}},'log':_0xa5a2('0x19')});};exports[_0xa5a2('0x1b')]=function(_0x9a6e53){return client[_0xa5a2('0x6')]('CountReScheduled',{'options':{'where':{'VoiceQueueId':_0x9a6e53['id']?_0x9a6e53['id']||null:null}},'log':'countReScheduled'});};exports['getContactPreview']=function(_0x33954c){return function(){return client[_0xa5a2('0x6')](_0xa5a2('0x1c'),{'options':{'where':{'id':_0x33954c},'include':[{'model':_0xa5a2('0x3'),'as':_0xa5a2('0x4')},{'model':_0xa5a2('0x1d'),'as':_0xa5a2('0x1e'),'attributes':['id',_0xa5a2('0x1f')]},{'model':'VoiceQueue','as':_0xa5a2('0x20'),'attributes':['id',_0xa5a2('0x1f')]}],'raw':!![]},'log':'getCmHopper'});};};exports[_0xa5a2('0x21')]=function(_0x402c58,_0x493912,_0xe02093){return client[_0xa5a2('0x6')](_0xa5a2('0x9'),{'body':_0x402c58,'options':{'where':{'id':_0x493912},'limit':_0xe02093},'log':_0xa5a2('0x9')});};exports['getContactRecallMe']=function(_0x41eae4,_0x25b806){return function(){return client[_0xa5a2('0x6')](_0xa5a2('0x22'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x41eae4,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0xa5a2('0x7')](_0xa5a2('0x8'))},'UserId':{'$in':_0x25b806}},'order':[[_0xa5a2('0x14'),_0xa5a2('0x10')],[_0xa5a2('0x11'),_0xa5a2('0x10')],['id',_0xa5a2('0x15')]],'include':[{'model':_0xa5a2('0x3'),'as':_0xa5a2('0x4')},{'model':'User','as':_0xa5a2('0x1e'),'attributes':['id','name',_0xa5a2('0x23')]}],'group':_0xa5a2('0x24'),'raw':!![]},'log':_0xa5a2('0x12')});};};exports[_0xa5a2('0x25')]=function(_0x5ed1ee,_0x551e1a){return client[_0xa5a2('0x6')]('ResetActiveCalls',{'body':_0x5ed1ee,'options':_0x551e1a||{},'log':'ResetActiveCalls'});};exports[_0xa5a2('0x26')]=function(_0x41e3b1,_0x58a49b,_0x533175){return function(){return client[_0xa5a2('0x6')](_0xa5a2('0x27'),{'body':{'where':{'voiceQueueIds':_0x41e3b1,'interval':_0x58a49b,'availableAgentsIds':_0x533175}},'log':'handlePreviewRecallNotifications'});};};
\ No newline at end of file