Built motion from commit 1ea47bf4.|2.6.34
[motion2.git] / server / services / ami / rpc / cmHopper.js
index aeb713b..683d2d4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdc0d=['GetCmHopperPreview','User','Agent','name','VoiceQueue','Queue','getContactRecallMe','GetContactRecallMe','priority','db.CmHopper.UserId','resetActiveCalls','ResetActiveCalls','handlePreviewRecallNotifications','../client','moment','Request','GetCmHopper','CmContact','Contact','getCmHopper','updateContacts','UpdateCmHopper','format','YYYY-MM-DD\x20HH:mm:ss','rescheduleContact','ContactId','ListId','VoiceQueueId','CampaignId','destroyContact','DestroyCmHopper','getContactDialer','GetContactDialer','DESC','scheduledat','ASC','moveContactManagedDialer','campaign','MoveContactManagedDialer','CountReScheduled','countReScheduled','getContactPreview'];(function(_0x144d33,_0x3168cf){var _0x34c16c=function(_0x12e8f3){while(--_0x12e8f3){_0x144d33['push'](_0x144d33['shift']());}};_0x34c16c(++_0x3168cf);}(_0xdc0d,0x1db));var _0xddc0=function(_0x5f203f,_0x58f982){_0x5f203f=_0x5f203f-0x0;var _0x328803=_0xdc0d[_0x5f203f];return _0x328803;};'use strict';var client=require(_0xddc0('0x0'));var moment=require(_0xddc0('0x1'));exports['getContacts']=function(_0x3b6966,_0x558a1a){return function(){return client[_0xddc0('0x2')](_0xddc0('0x3'),{'options':{'where':{'VoiceQueueId':_0x3b6966},'include':[{'model':_0xddc0('0x4'),'as':_0xddc0('0x5')}],'limit':_0x558a1a,'raw':![]},'log':_0xddc0('0x6')});};};exports[_0xddc0('0x7')]=function(_0x2d915c,_0x39a8da,_0x20f5a9){return function(){return client['Request'](_0xddc0('0x8'),{'body':_0x2d915c,'options':{'where':{'VoiceQueueId':_0x39a8da,'scheduledat':{'$lte':moment()[_0xddc0('0x9')](_0xddc0('0xa'))}},'limit':_0x20f5a9},'log':_0xddc0('0x8')});};};exports[_0xddc0('0xb')]=function(_0x3aad0e){return client['Request'](_0xddc0('0x8'),{'body':_0x3aad0e,'options':{'where':{'ContactId':_0x3aad0e[_0xddc0('0xc')],'ListId':_0x3aad0e[_0xddc0('0xd')],'VoiceQueueId':_0x3aad0e[_0xddc0('0xe')],'CampaignId':_0x3aad0e[_0xddc0('0xf')]}},'log':_0xddc0('0xb')});};exports[_0xddc0('0x10')]=function(_0x36cf5e,_0x53075e,_0x142874){return function(){return client[_0xddc0('0x2')]('DestroyCmHopper',{'options':{'where':{'VoiceQueueId':_0x36cf5e,'ListId':_0x53075e,'ContactId':_0x142874}},'log':_0xddc0('0x11')});};};exports[_0xddc0('0x12')]=function(_0xde1081,_0x39d44c,_0x2faa0d,_0x53fb88){return client[_0xddc0('0x2')](_0xddc0('0x13'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0xde1081,'active':![],'scheduledat':{'$lte':moment()['format'](_0xddc0('0xa'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x39d44c}}]},'order':[['priority',_0xddc0('0x14')],[_0xddc0('0x15'),_0x53fb88],['id',_0xddc0('0x16')]],'raw':!![],'limit':_0x2faa0d},'log':'GetContactDialer'});};exports['getContactDialerIvr']=function(_0x22cf96,_0x367bff,_0x39b837){return client[_0xddc0('0x2')]('GetContactDialer',{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x22cf96,'active':![],'scheduledat':{'$lte':moment()[_0xddc0('0x9')](_0xddc0('0xa'))}},'include':[{'model':_0xddc0('0x4'),'as':_0xddc0('0x5')}],'order':[['priority',_0xddc0('0x14')],[_0xddc0('0x15'),_0x39b837],['id',_0xddc0('0x16')]],'raw':!![],'limit':_0x367bff},'log':'GetContactDialerIvr'});};exports[_0xddc0('0x17')]=function(_0x530b02,_0x2accad){_0x530b02[_0xddc0('0x18')]=_0x530b02['queue'];return client[_0xddc0('0x2')](_0xddc0('0x19'),{'body':_0x530b02,'options':{'where':{'ContactId':_0x530b02[_0xddc0('0xc')],'ListId':_0x530b02['ListId'],'VoiceQueueId':_0x530b02[_0xddc0('0xe')],'CampaignId':_0x530b02['CampaignId'],'active':_0x2accad?undefined:!![]}},'log':_0xddc0('0x19')});};exports['countReScheduled']=function(_0x1f08f4){return client['Request'](_0xddc0('0x1a'),{'options':{'where':{'VoiceQueueId':_0x1f08f4['id']?_0x1f08f4['id']||null:null}},'log':_0xddc0('0x1b')});};exports[_0xddc0('0x1c')]=function(_0x552614){return function(){return client[_0xddc0('0x2')](_0xddc0('0x1d'),{'options':{'where':{'id':_0x552614},'include':[{'model':_0xddc0('0x4'),'as':'Contact'},{'model':_0xddc0('0x1e'),'as':_0xddc0('0x1f'),'attributes':['id',_0xddc0('0x20')]},{'model':_0xddc0('0x21'),'as':_0xddc0('0x22'),'attributes':['id','name']}],'raw':!![]},'log':_0xddc0('0x6')});};};exports['unlockContact']=function(_0x5387cc,_0x5a8429,_0x2ac8bb){return client[_0xddc0('0x2')](_0xddc0('0x8'),{'body':_0x5387cc,'options':{'where':{'id':_0x5a8429},'limit':_0x2ac8bb},'log':_0xddc0('0x8')});};exports[_0xddc0('0x23')]=function(_0x410d9b,_0x279ac2){return function(){return client[_0xddc0('0x2')](_0xddc0('0x24'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x410d9b,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0xddc0('0x9')](_0xddc0('0xa'))},'UserId':{'$in':_0x279ac2}},'order':[[_0xddc0('0x25'),'DESC'],[_0xddc0('0x15'),_0xddc0('0x14')],['id',_0xddc0('0x16')]],'include':[{'model':_0xddc0('0x4'),'as':_0xddc0('0x5')},{'model':_0xddc0('0x1e'),'as':_0xddc0('0x1f'),'attributes':['id',_0xddc0('0x20'),'voicePause']}],'group':_0xddc0('0x26'),'raw':!![]},'log':_0xddc0('0x13')});};};exports[_0xddc0('0x27')]=function(_0x401278,_0x162512){return client['Request']('ResetActiveCalls',{'body':_0x401278,'options':_0x162512||{},'log':_0xddc0('0x28')});};exports[_0xddc0('0x29')]=function(_0x56e1cb,_0xe784e,_0x614f06){return function(){return client['Request']('CmHopperHandlePreviewRecallNotifications',{'body':{'where':{'voiceQueueIds':_0x56e1cb,'interval':_0xe784e,'availableAgentsIds':_0x614f06}},'log':_0xddc0('0x29')});};};
\ No newline at end of file
+var _0xf23b=['Contact','updateContacts','Request','YYYY-MM-DD\x20HH:mm:ss','rescheduleContact','UpdateCmHopper','ContactId','VoiceQueueId','CampaignId','destroyContact','DestroyCmHopper','format','scheduledat','GetContactDialer','getContactDialerIvr','DESC','ASC','moveContactManagedDialer','campaign','MoveContactManagedDialer','countReScheduled','getContactPreview','GetCmHopperPreview','User','Agent','name','VoiceQueue','Queue','getCmHopper','unlockContact','GetContactRecallMe','priority','ResetActiveCalls','handlePreviewRecallNotifications','../client','moment','getContacts','GetCmHopper','CmContact'];(function(_0x5db89b,_0x248bb2){var _0x26a090=function(_0x31334e){while(--_0x31334e){_0x5db89b['push'](_0x5db89b['shift']());}};_0x26a090(++_0x248bb2);}(_0xf23b,0x133));var _0xbf23=function(_0x370fac,_0x5a6b26){_0x370fac=_0x370fac-0x0;var _0x3b983c=_0xf23b[_0x370fac];return _0x3b983c;};'use strict';var client=require(_0xbf23('0x0'));var moment=require(_0xbf23('0x1'));exports[_0xbf23('0x2')]=function(_0x1c8f27,_0x38d9e0){return function(){return client['Request'](_0xbf23('0x3'),{'options':{'where':{'VoiceQueueId':_0x1c8f27},'include':[{'model':_0xbf23('0x4'),'as':_0xbf23('0x5')}],'limit':_0x38d9e0,'raw':![]},'log':'getCmHopper'});};};exports[_0xbf23('0x6')]=function(_0x20d420,_0xc5e7dd,_0x393a52){return function(){return client[_0xbf23('0x7')]('UpdateCmHopper',{'body':_0x20d420,'options':{'where':{'VoiceQueueId':_0xc5e7dd,'scheduledat':{'$lte':moment()['format'](_0xbf23('0x8'))}},'limit':_0x393a52},'log':'UpdateCmHopper'});};};exports[_0xbf23('0x9')]=function(_0x1b45f1){return client[_0xbf23('0x7')](_0xbf23('0xa'),{'body':_0x1b45f1,'options':{'where':{'ContactId':_0x1b45f1[_0xbf23('0xb')],'ListId':_0x1b45f1['ListId'],'VoiceQueueId':_0x1b45f1[_0xbf23('0xc')],'CampaignId':_0x1b45f1[_0xbf23('0xd')]}},'log':_0xbf23('0x9')});};exports[_0xbf23('0xe')]=function(_0xf6fa46,_0x41b016,_0x5d8b88){return function(){return client[_0xbf23('0x7')]('DestroyCmHopper',{'options':{'where':{'VoiceQueueId':_0xf6fa46,'ListId':_0x41b016,'ContactId':_0x5d8b88}},'log':_0xbf23('0xf')});};};exports['getContactDialer']=function(_0xc31cc,_0x2ed737,_0x4deb64,_0xb6880){return client['Request']('GetContactDialer',{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0xc31cc,'active':![],'scheduledat':{'$lte':moment()[_0xbf23('0x10')](_0xbf23('0x8'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x2ed737}}]},'order':[['priority','DESC'],[_0xbf23('0x11'),_0xb6880],['id','ASC']],'raw':!![],'limit':_0x4deb64},'log':_0xbf23('0x12')});};exports[_0xbf23('0x13')]=function(_0x3e3575,_0xa68e7c,_0x4c1cca){return client['Request']('GetContactDialer',{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x3e3575,'active':![],'scheduledat':{'$lte':moment()[_0xbf23('0x10')](_0xbf23('0x8'))}},'include':[{'model':_0xbf23('0x4'),'as':_0xbf23('0x5')}],'order':[['priority',_0xbf23('0x14')],[_0xbf23('0x11'),_0x4c1cca],['id',_0xbf23('0x15')]],'raw':!![],'limit':_0xa68e7c},'log':'GetContactDialerIvr'});};exports[_0xbf23('0x16')]=function(_0x3b6f7e,_0x2bc340){_0x3b6f7e[_0xbf23('0x17')]=_0x3b6f7e['queue'];return client[_0xbf23('0x7')]('MoveContactManagedDialer',{'body':_0x3b6f7e,'options':{'where':{'ContactId':_0x3b6f7e[_0xbf23('0xb')],'ListId':_0x3b6f7e['ListId'],'VoiceQueueId':_0x3b6f7e[_0xbf23('0xc')],'CampaignId':_0x3b6f7e[_0xbf23('0xd')],'active':_0x2bc340?undefined:!![]}},'log':_0xbf23('0x18')});};exports[_0xbf23('0x19')]=function(_0x5a4852){return client['Request']('CountReScheduled',{'options':{'where':{'VoiceQueueId':_0x5a4852['id']?_0x5a4852['id']||null:null}},'log':_0xbf23('0x19')});};exports[_0xbf23('0x1a')]=function(_0x5195bd){return function(){return client['Request'](_0xbf23('0x1b'),{'options':{'where':{'id':_0x5195bd},'include':[{'model':_0xbf23('0x4'),'as':_0xbf23('0x5')},{'model':_0xbf23('0x1c'),'as':_0xbf23('0x1d'),'attributes':['id',_0xbf23('0x1e')]},{'model':_0xbf23('0x1f'),'as':_0xbf23('0x20'),'attributes':['id',_0xbf23('0x1e')]}],'raw':!![]},'log':_0xbf23('0x21')});};};exports[_0xbf23('0x22')]=function(_0x489a2e,_0x5d3f5b,_0x207cbd){return client['Request'](_0xbf23('0xa'),{'body':_0x489a2e,'options':{'where':{'id':_0x5d3f5b},'limit':_0x207cbd},'log':_0xbf23('0xa')});};exports['getContactRecallMe']=function(_0x9e2440,_0x55b1e2){return function(){return client['Request'](_0xbf23('0x23'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x9e2440,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()['format'](_0xbf23('0x8'))},'UserId':{'$in':_0x55b1e2}},'order':[[_0xbf23('0x24'),_0xbf23('0x14')],[_0xbf23('0x11'),_0xbf23('0x14')],['id',_0xbf23('0x15')]],'include':[{'model':_0xbf23('0x4'),'as':_0xbf23('0x5')},{'model':'User','as':_0xbf23('0x1d'),'attributes':['id',_0xbf23('0x1e'),'voicePause']}],'group':'db.CmHopper.UserId','raw':!![]},'log':_0xbf23('0x12')});};};exports['resetActiveCalls']=function(_0x24a448,_0x27ae70){return client[_0xbf23('0x7')](_0xbf23('0x25'),{'body':_0x24a448,'options':_0x27ae70||{},'log':_0xbf23('0x25')});};exports[_0xbf23('0x26')]=function(_0x4b0de5,_0x51e858,_0x866838){return function(){return client[_0xbf23('0x7')]('CmHopperHandlePreviewRecallNotifications',{'body':{'where':{'voiceQueueIds':_0x4b0de5,'interval':_0x51e858,'availableAgentsIds':_0x866838}},'log':_0xbf23('0x26')});};};
\ No newline at end of file