Built motion from commit cb845558.|2.6.34
[motion2.git] / server / services / ami / rpc / cmHopper.js
index d462074..84dc1c9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x029b=['countReScheduled','getContactPreview','GetCmHopperPreview','User','Agent','name','Queue','getContactRecallMe','GetContactRecallMe','YYYY-MM-DD\x20HH:mm:ss','voicePause','db.CmHopper.UserId','resetActiveCalls','ResetActiveCalls','handlePreviewRecallNotifications','CmHopperHandlePreviewRecallNotifications','../client','moment','GetCmHopper','CmContact','updateContacts','Request','format','UpdateCmHopper','ListId','VoiceQueueId','rescheduleContact','destroyContact','DestroyCmHopper','getContactDialer','GetContactDialer','priority','DESC','scheduledat','ASC','getContactDialerIvr','Contact','GetContactDialerIvr','moveContactManagedDialer','campaign','CampaignId','MoveContactManagedDialer','CountReScheduled'];(function(_0x23829c,_0x504b88){var _0x5b99e3=function(_0x38cf5a){while(--_0x38cf5a){_0x23829c['push'](_0x23829c['shift']());}};_0x5b99e3(++_0x504b88);}(_0x029b,0x66));var _0xb029=function(_0x472987,_0x4e9c48){_0x472987=_0x472987-0x0;var _0x340103=_0x029b[_0x472987];return _0x340103;};'use strict';var client=require(_0xb029('0x0'));var moment=require(_0xb029('0x1'));exports['getContacts']=function(_0x27c0b6,_0x2e71f6){return function(){return client['Request'](_0xb029('0x2'),{'options':{'where':{'VoiceQueueId':_0x27c0b6},'include':[{'model':_0xb029('0x3'),'as':'Contact'}],'limit':_0x2e71f6,'raw':![]},'log':'getCmHopper'});};};exports[_0xb029('0x4')]=function(_0x3f8fe4,_0x7836f0,_0x448fc5){return function(){return client[_0xb029('0x5')]('UpdateCmHopper',{'body':_0x3f8fe4,'options':{'where':{'VoiceQueueId':_0x7836f0,'scheduledat':{'$lte':moment()[_0xb029('0x6')]('YYYY-MM-DD\x20HH:mm:ss')}},'limit':_0x448fc5},'log':_0xb029('0x7')});};};exports['rescheduleContact']=function(_0x2c3772){return client['Request'](_0xb029('0x7'),{'body':_0x2c3772,'options':{'where':{'ContactId':_0x2c3772['ContactId'],'ListId':_0x2c3772[_0xb029('0x8')],'VoiceQueueId':_0x2c3772[_0xb029('0x9')],'CampaignId':_0x2c3772['CampaignId']}},'log':_0xb029('0xa')});};exports[_0xb029('0xb')]=function(_0x2532d4,_0x3abf90,_0x4399d2){return function(){return client['Request'](_0xb029('0xc'),{'options':{'where':{'VoiceQueueId':_0x2532d4,'ListId':_0x3abf90,'ContactId':_0x4399d2}},'log':'DestroyCmHopper'});};};exports[_0xb029('0xd')]=function(_0x3d9ed9,_0x18e228,_0x8dfbf1,_0x5ce391){return client[_0xb029('0x5')](_0xb029('0xe'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x3d9ed9,'active':![],'scheduledat':{'$lte':moment()[_0xb029('0x6')]('YYYY-MM-DD\x20HH:mm:ss')},'$or':[{'UserId':null},{'UserId':{'$in':_0x18e228}}]},'order':[[_0xb029('0xf'),_0xb029('0x10')],[_0xb029('0x11'),_0x5ce391],['id',_0xb029('0x12')]],'raw':!![],'limit':_0x8dfbf1},'log':_0xb029('0xe')});};exports[_0xb029('0x13')]=function(_0x185292,_0x1d54ff,_0x3f91cb){return client['Request']('GetContactDialer',{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x185292,'active':![],'scheduledat':{'$lte':moment()[_0xb029('0x6')]('YYYY-MM-DD\x20HH:mm:ss')}},'include':[{'model':_0xb029('0x3'),'as':_0xb029('0x14')}],'order':[[_0xb029('0xf'),'DESC'],['scheduledat',_0x3f91cb],['id',_0xb029('0x12')]],'raw':!![],'limit':_0x1d54ff},'log':_0xb029('0x15')});};exports[_0xb029('0x16')]=function(_0x3381b2,_0x3c4396){_0x3381b2[_0xb029('0x17')]=_0x3381b2['queue'];return client['Request']('MoveContactManagedDialer',{'body':_0x3381b2,'options':{'where':{'ContactId':_0x3381b2['ContactId'],'ListId':_0x3381b2[_0xb029('0x8')],'VoiceQueueId':_0x3381b2[_0xb029('0x9')],'CampaignId':_0x3381b2[_0xb029('0x18')],'active':_0x3c4396?undefined:!![]}},'log':_0xb029('0x19')});};exports['countReScheduled']=function(_0x3642b5){return client[_0xb029('0x5')](_0xb029('0x1a'),{'options':{'where':{'VoiceQueueId':_0x3642b5['id']?_0x3642b5['id']||null:null}},'log':_0xb029('0x1b')});};exports[_0xb029('0x1c')]=function(_0x26bb54){return function(){return client[_0xb029('0x5')](_0xb029('0x1d'),{'options':{'where':{'id':_0x26bb54},'include':[{'model':_0xb029('0x3'),'as':_0xb029('0x14')},{'model':_0xb029('0x1e'),'as':_0xb029('0x1f'),'attributes':['id',_0xb029('0x20')]},{'model':'VoiceQueue','as':_0xb029('0x21'),'attributes':['id',_0xb029('0x20')]}],'raw':!![]},'log':'getCmHopper'});};};exports['unlockContact']=function(_0x112ce9,_0x3b030a,_0x334ce6){return client[_0xb029('0x5')](_0xb029('0x7'),{'body':_0x112ce9,'options':{'where':{'id':_0x3b030a},'limit':_0x334ce6},'log':'UpdateCmHopper'});};exports[_0xb029('0x22')]=function(_0x4a4100,_0x2b2d98){return function(){return client[_0xb029('0x5')](_0xb029('0x23'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x4a4100,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()['format'](_0xb029('0x24'))},'UserId':{'$in':_0x2b2d98}},'order':[[_0xb029('0xf'),'DESC'],[_0xb029('0x11'),'DESC'],['id',_0xb029('0x12')]],'include':[{'model':'CmContact','as':_0xb029('0x14')},{'model':_0xb029('0x1e'),'as':_0xb029('0x1f'),'attributes':['id',_0xb029('0x20'),_0xb029('0x25')]}],'group':_0xb029('0x26'),'raw':!![]},'log':_0xb029('0xe')});};};exports[_0xb029('0x27')]=function(_0x4d5271,_0x2d87c1){return client[_0xb029('0x5')](_0xb029('0x28'),{'body':_0x4d5271,'options':_0x2d87c1||{},'log':'ResetActiveCalls'});};exports[_0xb029('0x29')]=function(_0x2b0f6b,_0x5f4688,_0x2f17b0){return function(){return client['Request'](_0xb029('0x2a'),{'body':{'where':{'voiceQueueIds':_0x2b0f6b,'interval':_0x5f4688,'availableAgentsIds':_0x2f17b0}},'log':'handlePreviewRecallNotifications'});};};
\ No newline at end of file
+var _0x3c17=['GetCmHopper','Contact','getCmHopper','updateContacts','UpdateCmHopper','format','YYYY-MM-DD\x20HH:mm:ss','ContactId','ListId','VoiceQueueId','CampaignId','DestroyCmHopper','priority','scheduledat','GetContactDialer','getContactDialerIvr','DESC','GetContactDialerIvr','moveContactManagedDialer','campaign','queue','MoveContactManagedDialer','countReScheduled','CountReScheduled','CmContact','User','Agent','name','VoiceQueue','Queue','unlockContact','getContactRecallMe','GetContactRecallMe','ASC','voicePause','resetActiveCalls','ResetActiveCalls','handlePreviewRecallNotifications','CmHopperHandlePreviewRecallNotifications','../client','getContacts','Request'];(function(_0x5c568e,_0x47fcc3){var _0x5cd62c=function(_0x519739){while(--_0x519739){_0x5c568e['push'](_0x5c568e['shift']());}};_0x5cd62c(++_0x47fcc3);}(_0x3c17,0x1a1));var _0x73c1=function(_0x4d07cc,_0x587613){_0x4d07cc=_0x4d07cc-0x0;var _0x42de3b=_0x3c17[_0x4d07cc];return _0x42de3b;};'use strict';var client=require(_0x73c1('0x0'));var moment=require('moment');exports[_0x73c1('0x1')]=function(_0x58a810,_0x1a088c){return function(){return client[_0x73c1('0x2')](_0x73c1('0x3'),{'options':{'where':{'VoiceQueueId':_0x58a810},'include':[{'model':'CmContact','as':_0x73c1('0x4')}],'limit':_0x1a088c,'raw':![]},'log':_0x73c1('0x5')});};};exports[_0x73c1('0x6')]=function(_0x64f862,_0x48c943,_0x382f82){return function(){return client['Request'](_0x73c1('0x7'),{'body':_0x64f862,'options':{'where':{'VoiceQueueId':_0x48c943,'scheduledat':{'$lte':moment()[_0x73c1('0x8')](_0x73c1('0x9'))}},'limit':_0x382f82},'log':'UpdateCmHopper'});};};exports['rescheduleContact']=function(_0x176227){return client[_0x73c1('0x2')](_0x73c1('0x7'),{'body':_0x176227,'options':{'where':{'ContactId':_0x176227[_0x73c1('0xa')],'ListId':_0x176227[_0x73c1('0xb')],'VoiceQueueId':_0x176227[_0x73c1('0xc')],'CampaignId':_0x176227[_0x73c1('0xd')]}},'log':'rescheduleContact'});};exports['destroyContact']=function(_0x1c712c,_0x81a06d,_0x16c616){return function(){return client[_0x73c1('0x2')]('DestroyCmHopper',{'options':{'where':{'VoiceQueueId':_0x1c712c,'ListId':_0x81a06d,'ContactId':_0x16c616}},'log':_0x73c1('0xe')});};};exports['getContactDialer']=function(_0x296ff0,_0x5f3799,_0x3a83ae,_0x3ecf5a){return client['Request']('GetContactDialer',{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x296ff0,'active':![],'scheduledat':{'$lte':moment()[_0x73c1('0x8')]('YYYY-MM-DD\x20HH:mm:ss')},'$or':[{'UserId':null},{'UserId':{'$in':_0x5f3799}}]},'order':[[_0x73c1('0xf'),'DESC'],[_0x73c1('0x10'),_0x3ecf5a],['id','ASC']],'raw':!![],'limit':_0x3a83ae},'log':_0x73c1('0x11')});};exports[_0x73c1('0x12')]=function(_0x39256e,_0x211c17,_0x8c0803){return client[_0x73c1('0x2')](_0x73c1('0x11'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x39256e,'active':![],'scheduledat':{'$lte':moment()[_0x73c1('0x8')](_0x73c1('0x9'))}},'include':[{'model':'CmContact','as':_0x73c1('0x4')}],'order':[[_0x73c1('0xf'),_0x73c1('0x13')],[_0x73c1('0x10'),_0x8c0803],['id','ASC']],'raw':!![],'limit':_0x211c17},'log':_0x73c1('0x14')});};exports[_0x73c1('0x15')]=function(_0x344fb5,_0x2e17e5){_0x344fb5[_0x73c1('0x16')]=_0x344fb5[_0x73c1('0x17')];return client[_0x73c1('0x2')](_0x73c1('0x18'),{'body':_0x344fb5,'options':{'where':{'ContactId':_0x344fb5['ContactId'],'ListId':_0x344fb5[_0x73c1('0xb')],'VoiceQueueId':_0x344fb5[_0x73c1('0xc')],'CampaignId':_0x344fb5[_0x73c1('0xd')],'active':_0x2e17e5?undefined:!![]}},'log':'MoveContactManagedDialer'});};exports[_0x73c1('0x19')]=function(_0x2ebfda){return client[_0x73c1('0x2')](_0x73c1('0x1a'),{'options':{'where':{'VoiceQueueId':_0x2ebfda['id']?_0x2ebfda['id']||null:null}},'log':_0x73c1('0x19')});};exports['getContactPreview']=function(_0x2b61bb){return function(){return client['Request']('GetCmHopperPreview',{'options':{'where':{'id':_0x2b61bb},'include':[{'model':_0x73c1('0x1b'),'as':_0x73c1('0x4')},{'model':_0x73c1('0x1c'),'as':_0x73c1('0x1d'),'attributes':['id',_0x73c1('0x1e')]},{'model':_0x73c1('0x1f'),'as':_0x73c1('0x20'),'attributes':['id',_0x73c1('0x1e')]}],'raw':!![]},'log':_0x73c1('0x5')});};};exports[_0x73c1('0x21')]=function(_0x22cc4f,_0x460b69,_0xf2bf43){return client[_0x73c1('0x2')]('UpdateCmHopper',{'body':_0x22cc4f,'options':{'where':{'id':_0x460b69},'limit':_0xf2bf43},'log':_0x73c1('0x7')});};exports[_0x73c1('0x22')]=function(_0x33b5bc,_0x153141){return function(){return client[_0x73c1('0x2')](_0x73c1('0x23'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x33b5bc,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0x73c1('0x8')](_0x73c1('0x9'))},'UserId':{'$in':_0x153141}},'order':[[_0x73c1('0xf'),'DESC'],['scheduledat',_0x73c1('0x13')],['id',_0x73c1('0x24')]],'include':[{'model':_0x73c1('0x1b'),'as':_0x73c1('0x4')},{'model':'User','as':_0x73c1('0x1d'),'attributes':['id',_0x73c1('0x1e'),_0x73c1('0x25')]}],'group':'db.CmHopper.UserId','raw':!![]},'log':_0x73c1('0x11')});};};exports[_0x73c1('0x26')]=function(_0x5d0a84,_0x270f63){return client[_0x73c1('0x2')](_0x73c1('0x27'),{'body':_0x5d0a84,'options':_0x270f63||{},'log':'ResetActiveCalls'});};exports[_0x73c1('0x28')]=function(_0x407090,_0x359b2c,_0x770875){return function(){return client[_0x73c1('0x2')](_0x73c1('0x29'),{'body':{'where':{'voiceQueueIds':_0x407090,'interval':_0x359b2c,'availableAgentsIds':_0x770875}},'log':_0x73c1('0x28')});};};
\ No newline at end of file