Built motion from commit d9028345.|2.5.43
[motion2.git] / server / services / ami / rpc / cmHopper.js
index 03e323b..5f95311 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x896e=['destroyContact','DestroyCmHopper','getContactDialer','GetContactDialer','priority','DESC','scheduledat','ASC','getContactDialerIvr','moveContactManagedDialer','campaign','queue','MoveContactManagedDialer','VoiceQueueId','countReScheduled','CountReScheduled','GetCmHopperPreview','Agent','name','unlockContact','GetContactRecallMe','User','voicePause','resetActiveCalls','ResetActiveCalls','handlePreviewRecallNotifications','CmHopperHandlePreviewRecallNotifications','../client','moment','getContacts','CmContact','Contact','getCmHopper','updateContacts','format','YYYY-MM-DD\x20HH:mm:ss','UpdateCmHopper','rescheduleContact','Request','ContactId','ListId','CampaignId'];(function(_0x3a7d5e,_0x4843c7){var _0x34ab97=function(_0x270294){while(--_0x270294){_0x3a7d5e['push'](_0x3a7d5e['shift']());}};_0x34ab97(++_0x4843c7);}(_0x896e,0xed));var _0xe896=function(_0xf0dfbd,_0x354385){_0xf0dfbd=_0xf0dfbd-0x0;var _0x4a01c1=_0x896e[_0xf0dfbd];return _0x4a01c1;};'use strict';var client=require(_0xe896('0x0'));var moment=require(_0xe896('0x1'));var _=require('lodash');exports[_0xe896('0x2')]=function(_0x28726d,_0xfab7f8){return function(){return client['Request']('GetCmHopper',{'options':{'where':{'VoiceQueueId':_0x28726d},'include':[{'model':_0xe896('0x3'),'as':_0xe896('0x4')}],'limit':_0xfab7f8,'raw':![]},'log':_0xe896('0x5')});};};exports[_0xe896('0x6')]=function(_0x46f625,_0x1982da,_0x560226){return function(){return client['Request']('UpdateCmHopper',{'body':_0x46f625,'options':{'where':{'VoiceQueueId':_0x1982da,'scheduledat':{'$lte':moment()[_0xe896('0x7')](_0xe896('0x8'))}},'limit':_0x560226},'log':_0xe896('0x9')});};};exports[_0xe896('0xa')]=function(_0x2b0b2a){return function(){return client[_0xe896('0xb')](_0xe896('0x9'),{'body':_0x2b0b2a,'options':{'where':{'ContactId':_0x2b0b2a[_0xe896('0xc')],'ListId':_0x2b0b2a[_0xe896('0xd')],'VoiceQueueId':_0x2b0b2a['VoiceQueueId'],'CampaignId':_0x2b0b2a[_0xe896('0xe')]}},'log':_0xe896('0xa')});};};exports[_0xe896('0xf')]=function(_0x42cf01,_0x4127ce,_0x42117a){return function(){return client[_0xe896('0xb')]('DestroyCmHopper',{'options':{'where':{'VoiceQueueId':_0x42cf01,'ListId':_0x4127ce,'ContactId':_0x42117a}},'log':_0xe896('0x10')});};};exports[_0xe896('0x11')]=function(_0x740eea,_0x4f9b46,_0x1ad60a,_0x5a8a3e){return function(){return client[_0xe896('0xb')](_0xe896('0x12'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x740eea,'active':![],'scheduledat':{'$lte':moment()[_0xe896('0x7')](_0xe896('0x8'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x4f9b46}}]},'order':[[_0xe896('0x13'),_0xe896('0x14')],[_0xe896('0x15'),_0x5a8a3e],['id',_0xe896('0x16')]],'raw':!![],'limit':_0x1ad60a},'log':_0xe896('0x12')});};};exports[_0xe896('0x17')]=function(_0x5cad5e,_0x182792,_0x3e849e){return function(){return client['Request'](_0xe896('0x12'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x5cad5e,'active':![],'scheduledat':{'$lte':moment()[_0xe896('0x7')](_0xe896('0x8'))}},'include':[{'model':_0xe896('0x3'),'as':'Contact'}],'order':[[_0xe896('0x13'),_0xe896('0x14')],[_0xe896('0x15'),_0x3e849e],['id',_0xe896('0x16')]],'raw':!![],'limit':_0x182792},'log':'GetContactDialerIvr'});};};exports[_0xe896('0x18')]=function(_0x281ebb,_0x50a60d){return function(){_0x281ebb[_0xe896('0x19')]=_0x281ebb[_0xe896('0x1a')];return client[_0xe896('0xb')](_0xe896('0x1b'),{'body':_0x281ebb,'options':{'where':{'ContactId':_0x281ebb[_0xe896('0xc')],'ListId':_0x281ebb[_0xe896('0xd')],'VoiceQueueId':_0x281ebb[_0xe896('0x1c')],'CampaignId':_0x281ebb[_0xe896('0xe')],'active':_0x50a60d?undefined:!![]}},'log':_0xe896('0x1b')});};};exports[_0xe896('0x1d')]=function(_0x30c4d4){return function(){return client[_0xe896('0xb')](_0xe896('0x1e'),{'options':{'where':{'VoiceQueueId':_0x30c4d4['id']?_0x30c4d4['id']||null:null}},'log':'countReScheduled'});};};exports['getContactPreview']=function(_0x532a98){return function(){return client[_0xe896('0xb')](_0xe896('0x1f'),{'options':{'where':{'id':_0x532a98},'include':[{'model':'CmContact','as':_0xe896('0x4')},{'model':'User','as':_0xe896('0x20'),'attributes':['id',_0xe896('0x21')]},{'model':'VoiceQueue','as':'Queue','attributes':['id',_0xe896('0x21')]}],'raw':!![]},'log':'getCmHopper'});};};exports[_0xe896('0x22')]=function(_0x239bf1,_0xfff0d2,_0x55063a){return function(){return client[_0xe896('0xb')](_0xe896('0x9'),{'body':_0x239bf1,'options':{'where':{'id':_0xfff0d2},'limit':_0x55063a},'log':'UpdateCmHopper'});};};exports['getContactRecallMe']=function(_0x63c73d,_0x4bfa25){return function(){return client[_0xe896('0xb')](_0xe896('0x23'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x63c73d,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()['format']('YYYY-MM-DD\x20HH:mm:ss')},'UserId':{'$in':_0x4bfa25}},'order':[[_0xe896('0x13'),_0xe896('0x14')],[_0xe896('0x15'),_0xe896('0x14')],['id',_0xe896('0x16')]],'include':[{'model':_0xe896('0x3'),'as':'Contact'},{'model':_0xe896('0x24'),'as':'Agent','attributes':['id',_0xe896('0x21'),_0xe896('0x25')]}],'group':'db.CmHopper.UserId','raw':!![]},'log':_0xe896('0x12')});};};exports[_0xe896('0x26')]=function(_0x3f0a60){return function(){return client[_0xe896('0xb')]('ResetActiveCalls',{'body':_0x3f0a60,'options':{},'log':_0xe896('0x27')});};};exports[_0xe896('0x28')]=function(_0x28cc93,_0x19de2b){return function(){return client[_0xe896('0xb')](_0xe896('0x29'),{'body':{'where':{'voiceQueueId':_0x28cc93,'interval':_0x19de2b}},'log':'handlePreviewRecallNotifications'});};};
\ No newline at end of file
+var _0x2f0a=['ListId','VoiceQueueId','CampaignId','destroyContact','DestroyCmHopper','getContactDialer','DESC','scheduledat','ASC','GetContactDialer','CmContact','Contact','priority','GetContactDialerIvr','moveContactManagedDialer','MoveContactManagedDialer','countReScheduled','CountReScheduled','getContactPreview','User','name','VoiceQueue','Queue','getContactRecallMe','GetContactRecallMe','db.CmHopper.UserId','resetActiveCalls','ResetActiveCalls','handlePreviewRecallNotifications','../client','moment','lodash','getContacts','GetCmHopper','getCmHopper','updateContacts','UpdateCmHopper','format','rescheduleContact','Request','ContactId'];(function(_0x1290c5,_0x39106e){var _0x74284c=function(_0x326bd8){while(--_0x326bd8){_0x1290c5['push'](_0x1290c5['shift']());}};_0x74284c(++_0x39106e);}(_0x2f0a,0x98));var _0xa2f0=function(_0xb3a824,_0x2ee7a8){_0xb3a824=_0xb3a824-0x0;var _0x542804=_0x2f0a[_0xb3a824];return _0x542804;};'use strict';var client=require(_0xa2f0('0x0'));var moment=require(_0xa2f0('0x1'));var _=require(_0xa2f0('0x2'));exports[_0xa2f0('0x3')]=function(_0x58bee4,_0x5d8763){return function(){return client['Request'](_0xa2f0('0x4'),{'options':{'where':{'VoiceQueueId':_0x58bee4},'include':[{'model':'CmContact','as':'Contact'}],'limit':_0x5d8763,'raw':![]},'log':_0xa2f0('0x5')});};};exports[_0xa2f0('0x6')]=function(_0x30e17f,_0x3ed2f8,_0x9b3ea0){return function(){return client['Request'](_0xa2f0('0x7'),{'body':_0x30e17f,'options':{'where':{'VoiceQueueId':_0x3ed2f8,'scheduledat':{'$lte':moment()[_0xa2f0('0x8')]('YYYY-MM-DD\x20HH:mm:ss')}},'limit':_0x9b3ea0},'log':_0xa2f0('0x7')});};};exports[_0xa2f0('0x9')]=function(_0x14fe82){return function(){return client[_0xa2f0('0xa')](_0xa2f0('0x7'),{'body':_0x14fe82,'options':{'where':{'ContactId':_0x14fe82[_0xa2f0('0xb')],'ListId':_0x14fe82[_0xa2f0('0xc')],'VoiceQueueId':_0x14fe82[_0xa2f0('0xd')],'CampaignId':_0x14fe82[_0xa2f0('0xe')]}},'log':_0xa2f0('0x9')});};};exports[_0xa2f0('0xf')]=function(_0x26c6b3,_0x325a0e,_0x3bee3f){return function(){return client[_0xa2f0('0xa')](_0xa2f0('0x10'),{'options':{'where':{'VoiceQueueId':_0x26c6b3,'ListId':_0x325a0e,'ContactId':_0x3bee3f}},'log':_0xa2f0('0x10')});};};exports[_0xa2f0('0x11')]=function(_0x5caee1,_0x56fb00,_0x4411db,_0x320aad){return function(){return client[_0xa2f0('0xa')]('GetContactDialer',{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x5caee1,'active':![],'scheduledat':{'$lte':moment()['format']('YYYY-MM-DD\x20HH:mm:ss')},'$or':[{'UserId':null},{'UserId':{'$in':_0x56fb00}}]},'order':[['priority',_0xa2f0('0x12')],[_0xa2f0('0x13'),_0x320aad],['id',_0xa2f0('0x14')]],'raw':!![],'limit':_0x4411db},'log':'GetContactDialer'});};};exports['getContactDialerIvr']=function(_0x4b0c4b,_0xe74cbd,_0x17565){return function(){return client[_0xa2f0('0xa')](_0xa2f0('0x15'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x4b0c4b,'active':![],'scheduledat':{'$lte':moment()[_0xa2f0('0x8')]('YYYY-MM-DD\x20HH:mm:ss')}},'include':[{'model':_0xa2f0('0x16'),'as':_0xa2f0('0x17')}],'order':[[_0xa2f0('0x18'),_0xa2f0('0x12')],['scheduledat',_0x17565],['id','ASC']],'raw':!![],'limit':_0xe74cbd},'log':_0xa2f0('0x19')});};};exports[_0xa2f0('0x1a')]=function(_0x381607,_0x5040f6){return function(){_0x381607['campaign']=_0x381607['queue'];return client['Request'](_0xa2f0('0x1b'),{'body':_0x381607,'options':{'where':{'ContactId':_0x381607[_0xa2f0('0xb')],'ListId':_0x381607['ListId'],'VoiceQueueId':_0x381607[_0xa2f0('0xd')],'CampaignId':_0x381607['CampaignId'],'active':_0x5040f6?undefined:!![]}},'log':_0xa2f0('0x1b')});};};exports[_0xa2f0('0x1c')]=function(_0x14a9e4){return function(){return client[_0xa2f0('0xa')](_0xa2f0('0x1d'),{'options':{'where':{'VoiceQueueId':_0x14a9e4['id']?_0x14a9e4['id']||null:null}},'log':_0xa2f0('0x1c')});};};exports[_0xa2f0('0x1e')]=function(_0x2c5f91){return function(){return client[_0xa2f0('0xa')]('GetCmHopperPreview',{'options':{'where':{'id':_0x2c5f91},'include':[{'model':'CmContact','as':_0xa2f0('0x17')},{'model':_0xa2f0('0x1f'),'as':'Agent','attributes':['id',_0xa2f0('0x20')]},{'model':_0xa2f0('0x21'),'as':_0xa2f0('0x22'),'attributes':['id','name']}],'raw':!![]},'log':_0xa2f0('0x5')});};};exports['unlockContact']=function(_0x10510c,_0x2b62ca,_0x5c9468){return function(){return client[_0xa2f0('0xa')](_0xa2f0('0x7'),{'body':_0x10510c,'options':{'where':{'id':_0x2b62ca},'limit':_0x5c9468},'log':'UpdateCmHopper'});};};exports[_0xa2f0('0x23')]=function(_0x2a41d9,_0x51e10a){return function(){return client['Request'](_0xa2f0('0x24'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x2a41d9,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0xa2f0('0x8')]('YYYY-MM-DD\x20HH:mm:ss')},'UserId':{'$in':_0x51e10a}},'order':[[_0xa2f0('0x18'),'DESC'],[_0xa2f0('0x13'),_0xa2f0('0x12')],['id',_0xa2f0('0x14')]],'include':[{'model':_0xa2f0('0x16'),'as':_0xa2f0('0x17')},{'model':_0xa2f0('0x1f'),'as':'Agent','attributes':['id',_0xa2f0('0x20'),'voicePause']}],'group':_0xa2f0('0x25'),'raw':!![]},'log':_0xa2f0('0x15')});};};exports[_0xa2f0('0x26')]=function(_0x1e90d0){return function(){return client[_0xa2f0('0xa')](_0xa2f0('0x27'),{'body':_0x1e90d0,'options':{},'log':_0xa2f0('0x27')});};};exports[_0xa2f0('0x28')]=function(_0x10c893,_0x31cfc3){return function(){return client['Request']('CmHopperHandlePreviewRecallNotifications',{'body':{'where':{'voiceQueueId':_0x10c893,'interval':_0x31cfc3}},'log':_0xa2f0('0x28')});};};
\ No newline at end of file