Built motion from commit (unavailable).|2.4.4
[motion2.git] / server / services / ami / rpc / cmHopper.js
index c9fe964..8131bd9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xabce=['getContactDialerIvr','DESC','scheduledat','GetContactDialerIvr','moveContactManagedDialer','campaign','MoveContactManagedDialer','countReScheduled','User','Agent','Queue','getCmHopper','unlockContact','getContactRecallMe','../client','moment','lodash','getContacts','GetCmHopper','CmContact','Contact','UpdateCmHopper','format','YYYY-MM-DD\x20HH:mm:ss','rescheduleContact','Request','ContactId','ListId','VoiceQueueId','CampaignId','destroyContact','DestroyCmHopper','GetContactDialer','priority','ASC'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xabce,0x103));var _0xeabc=function(_0x5ddb1c,_0x5ea4df){_0x5ddb1c=_0x5ddb1c-0x0;var _0x354adc=_0xabce[_0x5ddb1c];return _0x354adc;};'use strict';var client=require(_0xeabc('0x0'));var moment=require(_0xeabc('0x1'));var _=require(_0xeabc('0x2'));exports[_0xeabc('0x3')]=function(_0x49dbcc,_0x5bd1a4){return function(){return client['Request'](_0xeabc('0x4'),{'options':{'where':{'VoiceQueueId':_0x49dbcc},'include':[{'model':_0xeabc('0x5'),'as':_0xeabc('0x6')}],'limit':_0x5bd1a4,'raw':![]},'log':'getCmHopper'});};};exports['updateContacts']=function(_0x1b07a8,_0x52a4d7,_0x229ba4){return function(){return client['Request'](_0xeabc('0x7'),{'body':_0x1b07a8,'options':{'where':{'VoiceQueueId':_0x52a4d7,'scheduledat':{'$lte':moment()[_0xeabc('0x8')](_0xeabc('0x9'))}},'limit':_0x229ba4},'log':'UpdateCmHopper'});};};exports[_0xeabc('0xa')]=function(_0x341f16){return function(){return client[_0xeabc('0xb')](_0xeabc('0x7'),{'body':_0x341f16,'options':{'where':{'ContactId':_0x341f16[_0xeabc('0xc')],'ListId':_0x341f16[_0xeabc('0xd')],'VoiceQueueId':_0x341f16[_0xeabc('0xe')],'CampaignId':_0x341f16[_0xeabc('0xf')]}},'log':_0xeabc('0xa')});};};exports[_0xeabc('0x10')]=function(_0x7be90,_0x1c7eb0,_0x435ea7){return function(){return client[_0xeabc('0xb')](_0xeabc('0x11'),{'options':{'where':{'VoiceQueueId':_0x7be90,'ListId':_0x1c7eb0,'ContactId':_0x435ea7}},'log':_0xeabc('0x11')});};};exports['getContactDialer']=function(_0x235c2d,_0x1319f3,_0x3251c6,_0x55f0de){return function(){return client['Request'](_0xeabc('0x12'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x235c2d,'active':![],'scheduledat':{'$lte':moment()[_0xeabc('0x8')](_0xeabc('0x9'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x1319f3}}]},'include':[{'model':'CmContact','as':_0xeabc('0x6')}],'order':[[_0xeabc('0x13'),'DESC'],['scheduledat',_0x55f0de],['id',_0xeabc('0x14')]],'raw':!![],'limit':_0x3251c6},'log':'GetContactDialer'});};};exports[_0xeabc('0x15')]=function(_0x1b64b9,_0x58a3c0,_0x16f08b){return function(){return client[_0xeabc('0xb')](_0xeabc('0x12'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x1b64b9,'active':![],'scheduledat':{'$lte':moment()[_0xeabc('0x8')](_0xeabc('0x9'))}},'include':[{'model':'CmContact','as':_0xeabc('0x6')}],'order':[['priority',_0xeabc('0x16')],[_0xeabc('0x17'),_0x16f08b],['id','ASC']],'raw':!![],'limit':_0x58a3c0},'log':_0xeabc('0x18')});};};exports[_0xeabc('0x19')]=function(_0x254590,_0x184e60){return function(){_0x254590[_0xeabc('0x1a')]=_0x254590['queue'];return client[_0xeabc('0xb')](_0xeabc('0x1b'),{'body':_0x254590,'options':{'where':{'ContactId':_0x254590[_0xeabc('0xc')],'ListId':_0x254590['ListId'],'VoiceQueueId':_0x254590[_0xeabc('0xe')],'CampaignId':_0x254590[_0xeabc('0xf')],'active':_0x184e60?undefined:!![]}},'log':_0xeabc('0x1b')});};};exports[_0xeabc('0x1c')]=function(_0x5b8838){return function(){return client[_0xeabc('0xb')]('CountReScheduled',{'options':{'where':{'VoiceQueueId':_0x5b8838['id']?_0x5b8838['id']||null:null}},'log':_0xeabc('0x1c')});};};exports['getContactPreview']=function(_0x811f0d){return function(){return client[_0xeabc('0xb')](_0xeabc('0x4'),{'options':{'where':{'id':_0x811f0d},'include':[{'model':_0xeabc('0x5'),'as':_0xeabc('0x6')},{'model':_0xeabc('0x1d'),'as':_0xeabc('0x1e'),'attributes':['id','name']},{'model':'VoiceQueue','as':_0xeabc('0x1f'),'attributes':['id','name']}],'raw':!![]},'log':_0xeabc('0x20')});};};exports[_0xeabc('0x21')]=function(_0x48fb52,_0x2163e6,_0x38572d){return function(){return client[_0xeabc('0xb')](_0xeabc('0x7'),{'body':_0x48fb52,'options':{'where':{'id':_0x2163e6},'limit':_0x38572d},'log':_0xeabc('0x7')});};};exports[_0xeabc('0x22')]=function(_0x2c62fe,_0x38dc0a){return function(){return client[_0xeabc('0xb')]('GetContactRecallMe',{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x2c62fe,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0xeabc('0x8')]('YYYY-MM-DD\x20HH:mm:ss')},'UserId':{'$in':_0x38dc0a}},'order':[[_0xeabc('0x13'),_0xeabc('0x16')],[_0xeabc('0x17'),_0xeabc('0x16')],['id',_0xeabc('0x14')]],'include':[{'model':_0xeabc('0x5'),'as':_0xeabc('0x6')}],'group':'db.CmHopper.UserId','raw':!![]},'log':_0xeabc('0x12')});};};
\ No newline at end of file
+var _0x4819=['CmContact','Contact','getCmHopper','UpdateCmHopper','format','YYYY-MM-DD\x20HH:mm:ss','ListId','VoiceQueueId','CampaignId','rescheduleContact','destroyContact','getContactDialer','GetContactDialer','priority','scheduledat','ASC','getContactDialerIvr','DESC','GetContactDialerIvr','moveContactManagedDialer','queue','ContactId','MoveContactManagedDialer','getContactPreview','User','name','VoiceQueue','Queue','getContactRecallMe','db.CmHopper.UserId','moment','lodash','getContacts','Request','GetCmHopper'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x4819,0xcd));var _0x9481=function(_0xf4050f,_0xefc6bb){_0xf4050f=_0xf4050f-0x0;var _0x42baab=_0x4819[_0xf4050f];return _0x42baab;};'use strict';var client=require('../client');var moment=require(_0x9481('0x0'));var _=require(_0x9481('0x1'));exports[_0x9481('0x2')]=function(_0x12a70c,_0x273a32){return function(){return client[_0x9481('0x3')](_0x9481('0x4'),{'options':{'where':{'VoiceQueueId':_0x12a70c},'include':[{'model':_0x9481('0x5'),'as':_0x9481('0x6')}],'limit':_0x273a32,'raw':![]},'log':_0x9481('0x7')});};};exports['updateContacts']=function(_0x4d9e3a,_0x5def07,_0x54cc78){return function(){return client[_0x9481('0x3')](_0x9481('0x8'),{'body':_0x4d9e3a,'options':{'where':{'VoiceQueueId':_0x5def07,'scheduledat':{'$lte':moment()[_0x9481('0x9')](_0x9481('0xa'))}},'limit':_0x54cc78},'log':_0x9481('0x8')});};};exports['rescheduleContact']=function(_0x1818cf){return function(){return client['Request'](_0x9481('0x8'),{'body':_0x1818cf,'options':{'where':{'ContactId':_0x1818cf['ContactId'],'ListId':_0x1818cf[_0x9481('0xb')],'VoiceQueueId':_0x1818cf[_0x9481('0xc')],'CampaignId':_0x1818cf[_0x9481('0xd')]}},'log':_0x9481('0xe')});};};exports[_0x9481('0xf')]=function(_0x29515a,_0xa38c93,_0xe410c3){return function(){return client[_0x9481('0x3')]('DestroyCmHopper',{'options':{'where':{'VoiceQueueId':_0x29515a,'ListId':_0xa38c93,'ContactId':_0xe410c3}},'log':'DestroyCmHopper'});};};exports[_0x9481('0x10')]=function(_0x150276,_0x2f0032,_0x28fcb6,_0x3d23c2){return function(){return client[_0x9481('0x3')](_0x9481('0x11'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x150276,'active':![],'scheduledat':{'$lte':moment()['format'](_0x9481('0xa'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x2f0032}}]},'include':[{'model':_0x9481('0x5'),'as':'Contact'}],'order':[[_0x9481('0x12'),'DESC'],[_0x9481('0x13'),_0x3d23c2],['id',_0x9481('0x14')]],'raw':!![],'limit':_0x28fcb6},'log':_0x9481('0x11')});};};exports[_0x9481('0x15')]=function(_0x546fce,_0x5eda66,_0x20473d){return function(){return client['Request']('GetContactDialer',{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x546fce,'active':![],'scheduledat':{'$lte':moment()[_0x9481('0x9')](_0x9481('0xa'))}},'include':[{'model':_0x9481('0x5'),'as':_0x9481('0x6')}],'order':[[_0x9481('0x12'),_0x9481('0x16')],['scheduledat',_0x20473d],['id',_0x9481('0x14')]],'raw':!![],'limit':_0x5eda66},'log':_0x9481('0x17')});};};exports[_0x9481('0x18')]=function(_0x615e02,_0xb5cd2c){return function(){_0x615e02['campaign']=_0x615e02[_0x9481('0x19')];return client[_0x9481('0x3')]('MoveContactManagedDialer',{'body':_0x615e02,'options':{'where':{'ContactId':_0x615e02[_0x9481('0x1a')],'ListId':_0x615e02[_0x9481('0xb')],'VoiceQueueId':_0x615e02[_0x9481('0xc')],'CampaignId':_0x615e02[_0x9481('0xd')],'active':_0xb5cd2c?undefined:!![]}},'log':_0x9481('0x1b')});};};exports['countReScheduled']=function(_0x91e3d9){return function(){return client[_0x9481('0x3')]('CountReScheduled',{'options':{'where':{'VoiceQueueId':_0x91e3d9['id']?_0x91e3d9['id']||null:null}},'log':'countReScheduled'});};};exports[_0x9481('0x1c')]=function(_0x299e28){return function(){return client['Request'](_0x9481('0x4'),{'options':{'where':{'id':_0x299e28},'include':[{'model':_0x9481('0x5'),'as':_0x9481('0x6')},{'model':_0x9481('0x1d'),'as':'Agent','attributes':['id',_0x9481('0x1e')]},{'model':_0x9481('0x1f'),'as':_0x9481('0x20'),'attributes':['id','name']}],'raw':!![]},'log':_0x9481('0x7')});};};exports['unlockContact']=function(_0x2e1eff,_0xe153ab,_0x22ab26){return function(){return client[_0x9481('0x3')](_0x9481('0x8'),{'body':_0x2e1eff,'options':{'where':{'id':_0xe153ab},'limit':_0x22ab26},'log':'UpdateCmHopper'});};};exports[_0x9481('0x21')]=function(_0x469a80,_0x46e4ab){return function(){return client['Request']('GetContactRecallMe',{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x469a80,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0x9481('0x9')](_0x9481('0xa'))},'UserId':{'$in':_0x46e4ab}},'order':[[_0x9481('0x12'),_0x9481('0x16')],['scheduledat','DESC'],['id','ASC']],'include':[{'model':_0x9481('0x5'),'as':'Contact'}],'group':_0x9481('0x22'),'raw':!![]},'log':'GetContactDialer'});};};
\ No newline at end of file