Built motion from commit c116dc8b.|2.6.30
[motion2.git] / server / services / ami / rpc / cmHopper.js
index 245ce6a..f6a6682 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7b27=['getContactDialerIvr','GetContactDialerIvr','campaign','queue','MoveContactManagedDialer','countReScheduled','CountReScheduled','getContactPreview','GetCmHopperPreview','User','Agent','name','VoiceQueue','Queue','unlockContact','getContactRecallMe','GetContactRecallMe','resetActiveCalls','ResetActiveCalls','CmHopperHandlePreviewRecallNotifications','handlePreviewRecallNotifications','../client','getContacts','Request','CmContact','Contact','updateContacts','UpdateCmHopper','format','YYYY-MM-DD\x20HH:mm:ss','rescheduleContact','ContactId','ListId','VoiceQueueId','CampaignId','destroyContact','DestroyCmHopper','GetContactDialer','priority','DESC','scheduledat'];(function(_0x113cc4,_0x256958){var _0x4171c2=function(_0x480229){while(--_0x480229){_0x113cc4['push'](_0x113cc4['shift']());}};_0x4171c2(++_0x256958);}(_0x7b27,0x186));var _0x77b2=function(_0x3024d3,_0xdf7bcb){_0x3024d3=_0x3024d3-0x0;var _0x539bc8=_0x7b27[_0x3024d3];return _0x539bc8;};'use strict';var client=require(_0x77b2('0x0'));var moment=require('moment');exports[_0x77b2('0x1')]=function(_0x424f18,_0x4000dd){return function(){return client[_0x77b2('0x2')]('GetCmHopper',{'options':{'where':{'VoiceQueueId':_0x424f18},'include':[{'model':_0x77b2('0x3'),'as':_0x77b2('0x4')}],'limit':_0x4000dd,'raw':![]},'log':'getCmHopper'});};};exports[_0x77b2('0x5')]=function(_0x26538a,_0x243b61,_0x569bce){return function(){return client[_0x77b2('0x2')](_0x77b2('0x6'),{'body':_0x26538a,'options':{'where':{'VoiceQueueId':_0x243b61,'scheduledat':{'$lte':moment()[_0x77b2('0x7')](_0x77b2('0x8'))}},'limit':_0x569bce},'log':'UpdateCmHopper'});};};exports[_0x77b2('0x9')]=function(_0x27a03d){return client[_0x77b2('0x2')](_0x77b2('0x6'),{'body':_0x27a03d,'options':{'where':{'ContactId':_0x27a03d[_0x77b2('0xa')],'ListId':_0x27a03d[_0x77b2('0xb')],'VoiceQueueId':_0x27a03d[_0x77b2('0xc')],'CampaignId':_0x27a03d[_0x77b2('0xd')]}},'log':'rescheduleContact'});};exports[_0x77b2('0xe')]=function(_0x1f5006,_0x51d4ea,_0xfbadc6){return function(){return client['Request'](_0x77b2('0xf'),{'options':{'where':{'VoiceQueueId':_0x1f5006,'ListId':_0x51d4ea,'ContactId':_0xfbadc6}},'log':_0x77b2('0xf')});};};exports['getContactDialer']=function(_0x2a14ba,_0x512412,_0x2f1dd8,_0x14cd9f){return client[_0x77b2('0x2')](_0x77b2('0x10'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x2a14ba,'active':![],'scheduledat':{'$lte':moment()[_0x77b2('0x7')](_0x77b2('0x8'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x512412}}]},'order':[[_0x77b2('0x11'),_0x77b2('0x12')],[_0x77b2('0x13'),_0x14cd9f],['id','ASC']],'raw':!![],'limit':_0x2f1dd8},'log':'GetContactDialer'});};exports[_0x77b2('0x14')]=function(_0x2a85a3,_0x21d169,_0x68c16e){return client[_0x77b2('0x2')](_0x77b2('0x10'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x2a85a3,'active':![],'scheduledat':{'$lte':moment()[_0x77b2('0x7')]('YYYY-MM-DD\x20HH:mm:ss')}},'include':[{'model':_0x77b2('0x3'),'as':_0x77b2('0x4')}],'order':[[_0x77b2('0x11'),_0x77b2('0x12')],[_0x77b2('0x13'),_0x68c16e],['id','ASC']],'raw':!![],'limit':_0x21d169},'log':_0x77b2('0x15')});};exports['moveContactManagedDialer']=function(_0x298871,_0x1d8132){_0x298871[_0x77b2('0x16')]=_0x298871[_0x77b2('0x17')];return client[_0x77b2('0x2')](_0x77b2('0x18'),{'body':_0x298871,'options':{'where':{'ContactId':_0x298871[_0x77b2('0xa')],'ListId':_0x298871['ListId'],'VoiceQueueId':_0x298871['VoiceQueueId'],'CampaignId':_0x298871['CampaignId'],'active':_0x1d8132?undefined:!![]}},'log':_0x77b2('0x18')});};exports[_0x77b2('0x19')]=function(_0x11f7d1){return client[_0x77b2('0x2')](_0x77b2('0x1a'),{'options':{'where':{'VoiceQueueId':_0x11f7d1['id']?_0x11f7d1['id']||null:null}},'log':_0x77b2('0x19')});};exports[_0x77b2('0x1b')]=function(_0x506eb4){return function(){return client[_0x77b2('0x2')](_0x77b2('0x1c'),{'options':{'where':{'id':_0x506eb4},'include':[{'model':_0x77b2('0x3'),'as':_0x77b2('0x4')},{'model':_0x77b2('0x1d'),'as':_0x77b2('0x1e'),'attributes':['id',_0x77b2('0x1f')]},{'model':_0x77b2('0x20'),'as':_0x77b2('0x21'),'attributes':['id',_0x77b2('0x1f')]}],'raw':!![]},'log':'getCmHopper'});};};exports[_0x77b2('0x22')]=function(_0x3af0ef,_0x20cbcc,_0x1df3ce){return client[_0x77b2('0x2')]('UpdateCmHopper',{'body':_0x3af0ef,'options':{'where':{'id':_0x20cbcc},'limit':_0x1df3ce},'log':_0x77b2('0x6')});};exports[_0x77b2('0x23')]=function(_0x3b7f85,_0x334366){return function(){return client[_0x77b2('0x2')](_0x77b2('0x24'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x3b7f85,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0x77b2('0x7')](_0x77b2('0x8'))},'UserId':{'$in':_0x334366}},'order':[[_0x77b2('0x11'),_0x77b2('0x12')],[_0x77b2('0x13'),_0x77b2('0x12')],['id','ASC']],'include':[{'model':'CmContact','as':'Contact'},{'model':'User','as':_0x77b2('0x1e'),'attributes':['id',_0x77b2('0x1f'),'voicePause']}],'group':'db.CmHopper.UserId','raw':!![]},'log':'GetContactDialer'});};};exports[_0x77b2('0x25')]=function(_0x29680b,_0x46bc7c){return client[_0x77b2('0x2')]('ResetActiveCalls',{'body':_0x29680b,'options':_0x46bc7c||{},'log':_0x77b2('0x26')});};exports['handlePreviewRecallNotifications']=function(_0x28c29c,_0x3ea3d2,_0x3ffec9){return function(){return client[_0x77b2('0x2')](_0x77b2('0x27'),{'body':{'where':{'voiceQueueIds':_0x28c29c,'interval':_0x3ea3d2,'availableAgentsIds':_0x3ffec9}},'log':_0x77b2('0x28')});};};
\ No newline at end of file
+var _0xd5b2=['ContactId','ListId','VoiceQueueId','CampaignId','destroyContact','getContactDialer','format','priority','DESC','ASC','GetContactDialer','scheduledat','GetContactDialerIvr','moveContactManagedDialer','queue','MoveContactManagedDialer','CountReScheduled','GetCmHopperPreview','User','Agent','name','unlockContact','getContactRecallMe','GetContactRecallMe','voicePause','db.CmHopper.UserId','resetActiveCalls','ResetActiveCalls','CmHopperHandlePreviewRecallNotifications','handlePreviewRecallNotifications','moment','getContacts','Request','GetCmHopper','CmContact','Contact','getCmHopper','UpdateCmHopper','YYYY-MM-DD\x20HH:mm:ss','rescheduleContact'];(function(_0x4519d0,_0x58d60a){var _0x14d95e=function(_0x3b0eb9){while(--_0x3b0eb9){_0x4519d0['push'](_0x4519d0['shift']());}};_0x14d95e(++_0x58d60a);}(_0xd5b2,0x10e));var _0x2d5b=function(_0x24061a,_0x1c9f4d){_0x24061a=_0x24061a-0x0;var _0x82054e=_0xd5b2[_0x24061a];return _0x82054e;};'use strict';var client=require('../client');var moment=require(_0x2d5b('0x0'));exports[_0x2d5b('0x1')]=function(_0x5c9f7a,_0x42b9d5){return function(){return client[_0x2d5b('0x2')](_0x2d5b('0x3'),{'options':{'where':{'VoiceQueueId':_0x5c9f7a},'include':[{'model':_0x2d5b('0x4'),'as':_0x2d5b('0x5')}],'limit':_0x42b9d5,'raw':![]},'log':_0x2d5b('0x6')});};};exports['updateContacts']=function(_0x5c6eba,_0x58cff9,_0x2e1867){return function(){return client['Request'](_0x2d5b('0x7'),{'body':_0x5c6eba,'options':{'where':{'VoiceQueueId':_0x58cff9,'scheduledat':{'$lte':moment()['format'](_0x2d5b('0x8'))}},'limit':_0x2e1867},'log':'UpdateCmHopper'});};};exports[_0x2d5b('0x9')]=function(_0x15b736){return client[_0x2d5b('0x2')](_0x2d5b('0x7'),{'body':_0x15b736,'options':{'where':{'ContactId':_0x15b736[_0x2d5b('0xa')],'ListId':_0x15b736[_0x2d5b('0xb')],'VoiceQueueId':_0x15b736[_0x2d5b('0xc')],'CampaignId':_0x15b736[_0x2d5b('0xd')]}},'log':_0x2d5b('0x9')});};exports[_0x2d5b('0xe')]=function(_0x141e69,_0x5aa39f,_0x426aad){return function(){return client[_0x2d5b('0x2')]('DestroyCmHopper',{'options':{'where':{'VoiceQueueId':_0x141e69,'ListId':_0x5aa39f,'ContactId':_0x426aad}},'log':'DestroyCmHopper'});};};exports[_0x2d5b('0xf')]=function(_0x3dee67,_0x38a7c1,_0x21c6e2,_0x40ec2c){return client[_0x2d5b('0x2')]('GetContactDialer',{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x3dee67,'active':![],'scheduledat':{'$lte':moment()[_0x2d5b('0x10')]('YYYY-MM-DD\x20HH:mm:ss')},'$or':[{'UserId':null},{'UserId':{'$in':_0x38a7c1}}]},'order':[[_0x2d5b('0x11'),_0x2d5b('0x12')],['scheduledat',_0x40ec2c],['id',_0x2d5b('0x13')]],'raw':!![],'limit':_0x21c6e2},'log':_0x2d5b('0x14')});};exports['getContactDialerIvr']=function(_0x10652d,_0x29fb39,_0x4cecb5){return client[_0x2d5b('0x2')](_0x2d5b('0x14'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x10652d,'active':![],'scheduledat':{'$lte':moment()[_0x2d5b('0x10')](_0x2d5b('0x8'))}},'include':[{'model':_0x2d5b('0x4'),'as':_0x2d5b('0x5')}],'order':[[_0x2d5b('0x11'),'DESC'],[_0x2d5b('0x15'),_0x4cecb5],['id',_0x2d5b('0x13')]],'raw':!![],'limit':_0x29fb39},'log':_0x2d5b('0x16')});};exports[_0x2d5b('0x17')]=function(_0x4a5201,_0x13a713){_0x4a5201['campaign']=_0x4a5201[_0x2d5b('0x18')];return client[_0x2d5b('0x2')](_0x2d5b('0x19'),{'body':_0x4a5201,'options':{'where':{'ContactId':_0x4a5201[_0x2d5b('0xa')],'ListId':_0x4a5201[_0x2d5b('0xb')],'VoiceQueueId':_0x4a5201['VoiceQueueId'],'CampaignId':_0x4a5201[_0x2d5b('0xd')],'active':_0x13a713?undefined:!![]}},'log':_0x2d5b('0x19')});};exports['countReScheduled']=function(_0x4e8372){return client[_0x2d5b('0x2')](_0x2d5b('0x1a'),{'options':{'where':{'VoiceQueueId':_0x4e8372['id']?_0x4e8372['id']||null:null}},'log':'countReScheduled'});};exports['getContactPreview']=function(_0x214067){return function(){return client[_0x2d5b('0x2')](_0x2d5b('0x1b'),{'options':{'where':{'id':_0x214067},'include':[{'model':_0x2d5b('0x4'),'as':_0x2d5b('0x5')},{'model':_0x2d5b('0x1c'),'as':_0x2d5b('0x1d'),'attributes':['id',_0x2d5b('0x1e')]},{'model':'VoiceQueue','as':'Queue','attributes':['id',_0x2d5b('0x1e')]}],'raw':!![]},'log':_0x2d5b('0x6')});};};exports[_0x2d5b('0x1f')]=function(_0x2aa2cf,_0x3cacd5,_0x560ee1){return client[_0x2d5b('0x2')](_0x2d5b('0x7'),{'body':_0x2aa2cf,'options':{'where':{'id':_0x3cacd5},'limit':_0x560ee1},'log':_0x2d5b('0x7')});};exports[_0x2d5b('0x20')]=function(_0x57a897,_0x4c95ee){return function(){return client[_0x2d5b('0x2')](_0x2d5b('0x21'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x57a897,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0x2d5b('0x10')](_0x2d5b('0x8'))},'UserId':{'$in':_0x4c95ee}},'order':[[_0x2d5b('0x11'),_0x2d5b('0x12')],[_0x2d5b('0x15'),_0x2d5b('0x12')],['id','ASC']],'include':[{'model':_0x2d5b('0x4'),'as':'Contact'},{'model':_0x2d5b('0x1c'),'as':_0x2d5b('0x1d'),'attributes':['id','name',_0x2d5b('0x22')]}],'group':_0x2d5b('0x23'),'raw':!![]},'log':_0x2d5b('0x14')});};};exports[_0x2d5b('0x24')]=function(_0xb970e8,_0x3e03ba){return client['Request'](_0x2d5b('0x25'),{'body':_0xb970e8,'options':_0x3e03ba||{},'log':'ResetActiveCalls'});};exports['handlePreviewRecallNotifications']=function(_0x4c2031,_0xc63424,_0x1d7b7f){return function(){return client[_0x2d5b('0x2')](_0x2d5b('0x26'),{'body':{'where':{'voiceQueueIds':_0x4c2031,'interval':_0xc63424,'availableAgentsIds':_0x1d7b7f}},'log':_0x2d5b('0x27')});};};
\ No newline at end of file