Built motion from commit (unavailable).|2.5.6
[motion2.git] / server / services / ami / rpc / cmHopper.js
index d054dbe..4b87c9b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x05a0=['Agent','name','VoiceQueue','Queue','getContactRecallMe','GetContactRecallMe','User','db.CmHopper.UserId','moment','lodash','Request','GetCmHopper','CmContact','Contact','getCmHopper','updateContacts','format','YYYY-MM-DD\x20HH:mm:ss','UpdateCmHopper','rescheduleContact','ListId','VoiceQueueId','CampaignId','DestroyCmHopper','GetContactDialer','priority','DESC','ASC','getContactDialerIvr','scheduledat','GetContactDialerIvr','moveContactManagedDialer','queue','ContactId','MoveContactManagedDialer','countReScheduled','CountReScheduled','getContactPreview','GetCmHopperPreview'];(function(_0x215e65,_0x183f97){var _0xa85842=function(_0x43bf45){while(--_0x43bf45){_0x215e65['push'](_0x215e65['shift']());}};_0xa85842(++_0x183f97);}(_0x05a0,0x1b5));var _0x005a=function(_0x1a4be4,_0x4a8ebc){_0x1a4be4=_0x1a4be4-0x0;var _0x227ded=_0x05a0[_0x1a4be4];return _0x227ded;};'use strict';var client=require('../client');var moment=require(_0x005a('0x0'));var _=require(_0x005a('0x1'));exports['getContacts']=function(_0x2a916c,_0x4e8d38){return function(){return client[_0x005a('0x2')](_0x005a('0x3'),{'options':{'where':{'VoiceQueueId':_0x2a916c},'include':[{'model':_0x005a('0x4'),'as':_0x005a('0x5')}],'limit':_0x4e8d38,'raw':![]},'log':_0x005a('0x6')});};};exports[_0x005a('0x7')]=function(_0x2295ae,_0x5b5c99,_0x4146d2){return function(){return client['Request']('UpdateCmHopper',{'body':_0x2295ae,'options':{'where':{'VoiceQueueId':_0x5b5c99,'scheduledat':{'$lte':moment()[_0x005a('0x8')](_0x005a('0x9'))}},'limit':_0x4146d2},'log':_0x005a('0xa')});};};exports[_0x005a('0xb')]=function(_0x5bd7da){return function(){return client['Request'](_0x005a('0xa'),{'body':_0x5bd7da,'options':{'where':{'ContactId':_0x5bd7da['ContactId'],'ListId':_0x5bd7da[_0x005a('0xc')],'VoiceQueueId':_0x5bd7da[_0x005a('0xd')],'CampaignId':_0x5bd7da[_0x005a('0xe')]}},'log':_0x005a('0xb')});};};exports['destroyContact']=function(_0xd810db,_0x375c2d,_0x40f328){return function(){return client['Request'](_0x005a('0xf'),{'options':{'where':{'VoiceQueueId':_0xd810db,'ListId':_0x375c2d,'ContactId':_0x40f328}},'log':_0x005a('0xf')});};};exports['getContactDialer']=function(_0x5088c3,_0x1eda97,_0x293e2b,_0x543067){return function(){return client[_0x005a('0x2')](_0x005a('0x10'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x5088c3,'active':![],'scheduledat':{'$lte':moment()[_0x005a('0x8')](_0x005a('0x9'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x1eda97}}]},'order':[[_0x005a('0x11'),_0x005a('0x12')],['scheduledat',_0x543067],['id',_0x005a('0x13')]],'raw':!![],'limit':_0x293e2b},'log':_0x005a('0x10')});};};exports[_0x005a('0x14')]=function(_0x2c9428,_0x548e66,_0xb28485){return function(){return client[_0x005a('0x2')](_0x005a('0x10'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x2c9428,'active':![],'scheduledat':{'$lte':moment()[_0x005a('0x8')]('YYYY-MM-DD\x20HH:mm:ss')}},'include':[{'model':_0x005a('0x4'),'as':_0x005a('0x5')}],'order':[[_0x005a('0x11'),_0x005a('0x12')],[_0x005a('0x15'),_0xb28485],['id',_0x005a('0x13')]],'raw':!![],'limit':_0x548e66},'log':_0x005a('0x16')});};};exports[_0x005a('0x17')]=function(_0x32c8d4,_0x236f3a){return function(){_0x32c8d4['campaign']=_0x32c8d4[_0x005a('0x18')];return client[_0x005a('0x2')]('MoveContactManagedDialer',{'body':_0x32c8d4,'options':{'where':{'ContactId':_0x32c8d4[_0x005a('0x19')],'ListId':_0x32c8d4[_0x005a('0xc')],'VoiceQueueId':_0x32c8d4[_0x005a('0xd')],'CampaignId':_0x32c8d4[_0x005a('0xe')],'active':_0x236f3a?undefined:!![]}},'log':_0x005a('0x1a')});};};exports[_0x005a('0x1b')]=function(_0x58c085){return function(){return client[_0x005a('0x2')](_0x005a('0x1c'),{'options':{'where':{'VoiceQueueId':_0x58c085['id']?_0x58c085['id']||null:null}},'log':'countReScheduled'});};};exports[_0x005a('0x1d')]=function(_0x29573b){return function(){return client['Request'](_0x005a('0x1e'),{'options':{'where':{'id':_0x29573b},'include':[{'model':_0x005a('0x4'),'as':'Contact'},{'model':'User','as':_0x005a('0x1f'),'attributes':['id',_0x005a('0x20')]},{'model':_0x005a('0x21'),'as':_0x005a('0x22'),'attributes':['id',_0x005a('0x20')]}],'raw':!![]},'log':_0x005a('0x6')});};};exports['unlockContact']=function(_0x36faff,_0x42f866,_0x529417){return function(){return client[_0x005a('0x2')](_0x005a('0xa'),{'body':_0x36faff,'options':{'where':{'id':_0x42f866},'limit':_0x529417},'log':_0x005a('0xa')});};};exports[_0x005a('0x23')]=function(_0x5dae32,_0x159594){return function(){return client[_0x005a('0x2')](_0x005a('0x24'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x5dae32,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0x005a('0x8')](_0x005a('0x9'))},'UserId':{'$in':_0x159594}},'order':[[_0x005a('0x11'),_0x005a('0x12')],[_0x005a('0x15'),_0x005a('0x12')],['id',_0x005a('0x13')]],'include':[{'model':_0x005a('0x4'),'as':'Contact'},{'model':_0x005a('0x25'),'as':_0x005a('0x1f'),'attributes':['id',_0x005a('0x20'),'voicePause']}],'group':_0x005a('0x26'),'raw':!![]},'log':_0x005a('0x10')});};};
\ No newline at end of file
+var _0x0383=['VoiceQueue','Queue','unlockContact','getContactRecallMe','GetContactRecallMe','User','db.CmHopper.UserId','../client','lodash','getContacts','Request','Contact','getCmHopper','updateContacts','UpdateCmHopper','format','YYYY-MM-DD\x20HH:mm:ss','rescheduleContact','ContactId','ListId','VoiceQueueId','CampaignId','destroyContact','DestroyCmHopper','getContactDialer','scheduledat','ASC','GetContactDialer','getContactDialerIvr','CmContact','priority','DESC','GetContactDialerIvr','countReScheduled','CountReScheduled','getContactPreview','GetCmHopperPreview','Agent','name'];(function(_0x4b444f,_0x3bf87c){var _0x5da49c=function(_0x64f034){while(--_0x64f034){_0x4b444f['push'](_0x4b444f['shift']());}};_0x5da49c(++_0x3bf87c);}(_0x0383,0x166));var _0x3038=function(_0x446970,_0x2e8abc){_0x446970=_0x446970-0x0;var _0xccb49a=_0x0383[_0x446970];return _0xccb49a;};'use strict';var client=require(_0x3038('0x0'));var moment=require('moment');var _=require(_0x3038('0x1'));exports[_0x3038('0x2')]=function(_0x3a6ba4,_0x57b903){return function(){return client[_0x3038('0x3')]('GetCmHopper',{'options':{'where':{'VoiceQueueId':_0x3a6ba4},'include':[{'model':'CmContact','as':_0x3038('0x4')}],'limit':_0x57b903,'raw':![]},'log':_0x3038('0x5')});};};exports[_0x3038('0x6')]=function(_0x2bf5e5,_0x5ed84f,_0x43604c){return function(){return client[_0x3038('0x3')](_0x3038('0x7'),{'body':_0x2bf5e5,'options':{'where':{'VoiceQueueId':_0x5ed84f,'scheduledat':{'$lte':moment()[_0x3038('0x8')](_0x3038('0x9'))}},'limit':_0x43604c},'log':_0x3038('0x7')});};};exports[_0x3038('0xa')]=function(_0x4aa58e){return function(){return client[_0x3038('0x3')](_0x3038('0x7'),{'body':_0x4aa58e,'options':{'where':{'ContactId':_0x4aa58e[_0x3038('0xb')],'ListId':_0x4aa58e[_0x3038('0xc')],'VoiceQueueId':_0x4aa58e[_0x3038('0xd')],'CampaignId':_0x4aa58e[_0x3038('0xe')]}},'log':'rescheduleContact'});};};exports[_0x3038('0xf')]=function(_0x1c4673,_0x13ce08,_0xc418e8){return function(){return client[_0x3038('0x3')]('DestroyCmHopper',{'options':{'where':{'VoiceQueueId':_0x1c4673,'ListId':_0x13ce08,'ContactId':_0xc418e8}},'log':_0x3038('0x10')});};};exports[_0x3038('0x11')]=function(_0x11beda,_0x1cdfdd,_0x4adfd5,_0x550307){return function(){return client[_0x3038('0x3')]('GetContactDialer',{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x11beda,'active':![],'scheduledat':{'$lte':moment()[_0x3038('0x8')](_0x3038('0x9'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x1cdfdd}}]},'order':[['priority','DESC'],[_0x3038('0x12'),_0x550307],['id',_0x3038('0x13')]],'raw':!![],'limit':_0x4adfd5},'log':_0x3038('0x14')});};};exports[_0x3038('0x15')]=function(_0xd75f7,_0x499271,_0x2c8545){return function(){return client[_0x3038('0x3')](_0x3038('0x14'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0xd75f7,'active':![],'scheduledat':{'$lte':moment()[_0x3038('0x8')](_0x3038('0x9'))}},'include':[{'model':_0x3038('0x16'),'as':_0x3038('0x4')}],'order':[[_0x3038('0x17'),_0x3038('0x18')],[_0x3038('0x12'),_0x2c8545],['id','ASC']],'raw':!![],'limit':_0x499271},'log':_0x3038('0x19')});};};exports['moveContactManagedDialer']=function(_0x3b0dcf,_0x3b9528){return function(){_0x3b0dcf['campaign']=_0x3b0dcf['queue'];return client[_0x3038('0x3')]('MoveContactManagedDialer',{'body':_0x3b0dcf,'options':{'where':{'ContactId':_0x3b0dcf['ContactId'],'ListId':_0x3b0dcf[_0x3038('0xc')],'VoiceQueueId':_0x3b0dcf[_0x3038('0xd')],'CampaignId':_0x3b0dcf['CampaignId'],'active':_0x3b9528?undefined:!![]}},'log':'MoveContactManagedDialer'});};};exports[_0x3038('0x1a')]=function(_0x164369){return function(){return client[_0x3038('0x3')](_0x3038('0x1b'),{'options':{'where':{'VoiceQueueId':_0x164369['id']?_0x164369['id']||null:null}},'log':_0x3038('0x1a')});};};exports[_0x3038('0x1c')]=function(_0x3abd6d){return function(){return client['Request'](_0x3038('0x1d'),{'options':{'where':{'id':_0x3abd6d},'include':[{'model':_0x3038('0x16'),'as':_0x3038('0x4')},{'model':'User','as':_0x3038('0x1e'),'attributes':['id',_0x3038('0x1f')]},{'model':_0x3038('0x20'),'as':_0x3038('0x21'),'attributes':['id','name']}],'raw':!![]},'log':'getCmHopper'});};};exports[_0x3038('0x22')]=function(_0x2c0346,_0x59681f,_0x4a10f9){return function(){return client[_0x3038('0x3')]('UpdateCmHopper',{'body':_0x2c0346,'options':{'where':{'id':_0x59681f},'limit':_0x4a10f9},'log':'UpdateCmHopper'});};};exports[_0x3038('0x23')]=function(_0x49b52d,_0x125584){return function(){return client[_0x3038('0x3')](_0x3038('0x24'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x49b52d,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0x3038('0x8')](_0x3038('0x9'))},'UserId':{'$in':_0x125584}},'order':[[_0x3038('0x17'),_0x3038('0x18')],[_0x3038('0x12'),_0x3038('0x18')],['id',_0x3038('0x13')]],'include':[{'model':_0x3038('0x16'),'as':_0x3038('0x4')},{'model':_0x3038('0x25'),'as':_0x3038('0x1e'),'attributes':['id','name','voicePause']}],'group':_0x3038('0x26'),'raw':!![]},'log':_0x3038('0x14')});};};
\ No newline at end of file