Built motion from commit 7158bc59.|2.5.42
[motion2.git] / server / services / ami / rpc / cmHopper.js
index e44d750..7b7f49d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x788d=['lodash','getContacts','Request','GetCmHopper','CmContact','Contact','getCmHopper','updateContacts','UpdateCmHopper','format','rescheduleContact','ContactId','ListId','YYYY-MM-DD\x20HH:mm:ss','priority','DESC','getContactDialerIvr','GetContactDialer','scheduledat','ASC','queue','VoiceQueueId','CampaignId','MoveContactManagedDialer','CountReScheduled','countReScheduled','getContactPreview','GetCmHopperPreview','Agent','name','VoiceQueue','Queue','unlockContact','getContactRecallMe','User','resetActiveCalls','ResetActiveCalls','handlePreviewRecallNotifications','../client','moment'];(function(_0x4fbefb,_0x116ef7){var _0x2955c4=function(_0xf06ac6){while(--_0xf06ac6){_0x4fbefb['push'](_0x4fbefb['shift']());}};_0x2955c4(++_0x116ef7);}(_0x788d,0x1b6));var _0xd788=function(_0x19e094,_0x123213){_0x19e094=_0x19e094-0x0;var _0x37b0d2=_0x788d[_0x19e094];return _0x37b0d2;};'use strict';var client=require(_0xd788('0x0'));var moment=require(_0xd788('0x1'));var _=require(_0xd788('0x2'));exports[_0xd788('0x3')]=function(_0x380a63,_0x2ac036){return function(){return client[_0xd788('0x4')](_0xd788('0x5'),{'options':{'where':{'VoiceQueueId':_0x380a63},'include':[{'model':_0xd788('0x6'),'as':_0xd788('0x7')}],'limit':_0x2ac036,'raw':![]},'log':_0xd788('0x8')});};};exports[_0xd788('0x9')]=function(_0x40f72,_0x29b03b,_0xfdf6f){return function(){return client[_0xd788('0x4')](_0xd788('0xa'),{'body':_0x40f72,'options':{'where':{'VoiceQueueId':_0x29b03b,'scheduledat':{'$lte':moment()[_0xd788('0xb')]('YYYY-MM-DD\x20HH:mm:ss')}},'limit':_0xfdf6f},'log':_0xd788('0xa')});};};exports[_0xd788('0xc')]=function(_0x58c8a2){return function(){return client[_0xd788('0x4')]('UpdateCmHopper',{'body':_0x58c8a2,'options':{'where':{'ContactId':_0x58c8a2[_0xd788('0xd')],'ListId':_0x58c8a2[_0xd788('0xe')],'VoiceQueueId':_0x58c8a2['VoiceQueueId'],'CampaignId':_0x58c8a2['CampaignId']}},'log':'rescheduleContact'});};};exports['destroyContact']=function(_0x9cafe4,_0x46e5b5,_0x50d0ed){return function(){return client[_0xd788('0x4')]('DestroyCmHopper',{'options':{'where':{'VoiceQueueId':_0x9cafe4,'ListId':_0x46e5b5,'ContactId':_0x50d0ed}},'log':'DestroyCmHopper'});};};exports['getContactDialer']=function(_0x2dd7a7,_0x2b8690,_0x552ec2,_0x30949d){return function(){return client[_0xd788('0x4')]('GetContactDialer',{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x2dd7a7,'active':![],'scheduledat':{'$lte':moment()[_0xd788('0xb')](_0xd788('0xf'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x2b8690}}]},'order':[[_0xd788('0x10'),_0xd788('0x11')],['scheduledat',_0x30949d],['id','ASC']],'raw':!![],'limit':_0x552ec2},'log':'GetContactDialer'});};};exports[_0xd788('0x12')]=function(_0x254185,_0x217b3b,_0x2ed554){return function(){return client[_0xd788('0x4')](_0xd788('0x13'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x254185,'active':![],'scheduledat':{'$lte':moment()[_0xd788('0xb')](_0xd788('0xf'))}},'include':[{'model':_0xd788('0x6'),'as':'Contact'}],'order':[[_0xd788('0x10'),'DESC'],[_0xd788('0x14'),_0x2ed554],['id',_0xd788('0x15')]],'raw':!![],'limit':_0x217b3b},'log':'GetContactDialerIvr'});};};exports['moveContactManagedDialer']=function(_0x1f0ea4,_0x383301){return function(){_0x1f0ea4['campaign']=_0x1f0ea4[_0xd788('0x16')];return client[_0xd788('0x4')]('MoveContactManagedDialer',{'body':_0x1f0ea4,'options':{'where':{'ContactId':_0x1f0ea4[_0xd788('0xd')],'ListId':_0x1f0ea4[_0xd788('0xe')],'VoiceQueueId':_0x1f0ea4[_0xd788('0x17')],'CampaignId':_0x1f0ea4[_0xd788('0x18')],'active':_0x383301?undefined:!![]}},'log':_0xd788('0x19')});};};exports['countReScheduled']=function(_0xf55879){return function(){return client[_0xd788('0x4')](_0xd788('0x1a'),{'options':{'where':{'VoiceQueueId':_0xf55879['id']?_0xf55879['id']||null:null}},'log':_0xd788('0x1b')});};};exports[_0xd788('0x1c')]=function(_0x19aa96){return function(){return client[_0xd788('0x4')](_0xd788('0x1d'),{'options':{'where':{'id':_0x19aa96},'include':[{'model':_0xd788('0x6'),'as':'Contact'},{'model':'User','as':_0xd788('0x1e'),'attributes':['id',_0xd788('0x1f')]},{'model':_0xd788('0x20'),'as':_0xd788('0x21'),'attributes':['id','name']}],'raw':!![]},'log':_0xd788('0x8')});};};exports[_0xd788('0x22')]=function(_0x45dbfc,_0x408c4d,_0x4c4403){return function(){return client[_0xd788('0x4')](_0xd788('0xa'),{'body':_0x45dbfc,'options':{'where':{'id':_0x408c4d},'limit':_0x4c4403},'log':_0xd788('0xa')});};};exports[_0xd788('0x23')]=function(_0x5b7598,_0x174c2c){return function(){return client[_0xd788('0x4')]('GetContactRecallMe',{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x5b7598,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()['format'](_0xd788('0xf'))},'UserId':{'$in':_0x174c2c}},'order':[[_0xd788('0x10'),_0xd788('0x11')],[_0xd788('0x14'),_0xd788('0x11')],['id',_0xd788('0x15')]],'include':[{'model':_0xd788('0x6'),'as':_0xd788('0x7')},{'model':_0xd788('0x24'),'as':'Agent','attributes':['id',_0xd788('0x1f'),'voicePause']}],'group':'db.CmHopper.UserId','raw':!![]},'log':_0xd788('0x13')});};};exports[_0xd788('0x25')]=function(_0x4b8f7b){return function(){return client[_0xd788('0x4')](_0xd788('0x26'),{'body':_0x4b8f7b,'options':{},'log':'ResetActiveCalls'});};};exports[_0xd788('0x27')]=function(_0x1c65d8,_0x20799e){return function(){return client[_0xd788('0x4')]('CmHopperHandlePreviewRecallNotifications',{'body':{'where':{'voiceQueueId':_0x1c65d8,'interval':_0x20799e}},'log':_0xd788('0x27')});};};
\ No newline at end of file
+var _0xd3f3=['DESC','ASC','getContactDialerIvr','scheduledat','GetContactDialerIvr','campaign','queue','ListId','VoiceQueueId','CampaignId','countReScheduled','CountReScheduled','getContactPreview','GetCmHopperPreview','User','Agent','name','VoiceQueue','Queue','getContactRecallMe','GetContactRecallMe','CmContact','ResetActiveCalls','handlePreviewRecallNotifications','../client','Contact','getCmHopper','updateContacts','UpdateCmHopper','format','rescheduleContact','Request','ContactId','destroyContact','DestroyCmHopper','getContactDialer','GetContactDialer','YYYY-MM-DD\x20HH:mm:ss','priority'];(function(_0x17d723,_0x642bb){var _0x53b8c6=function(_0x312382){while(--_0x312382){_0x17d723['push'](_0x17d723['shift']());}};_0x53b8c6(++_0x642bb);}(_0xd3f3,0x129));var _0x3d3f=function(_0x337e78,_0x8e74ca){_0x337e78=_0x337e78-0x0;var _0x301b0f=_0xd3f3[_0x337e78];return _0x301b0f;};'use strict';var client=require(_0x3d3f('0x0'));var moment=require('moment');var _=require('lodash');exports['getContacts']=function(_0x1e32b3,_0x3840b9){return function(){return client['Request']('GetCmHopper',{'options':{'where':{'VoiceQueueId':_0x1e32b3},'include':[{'model':'CmContact','as':_0x3d3f('0x1')}],'limit':_0x3840b9,'raw':![]},'log':_0x3d3f('0x2')});};};exports[_0x3d3f('0x3')]=function(_0x22afdc,_0x49d451,_0x55d848){return function(){return client['Request'](_0x3d3f('0x4'),{'body':_0x22afdc,'options':{'where':{'VoiceQueueId':_0x49d451,'scheduledat':{'$lte':moment()[_0x3d3f('0x5')]('YYYY-MM-DD\x20HH:mm:ss')}},'limit':_0x55d848},'log':'UpdateCmHopper'});};};exports[_0x3d3f('0x6')]=function(_0x8a6875){return function(){return client[_0x3d3f('0x7')]('UpdateCmHopper',{'body':_0x8a6875,'options':{'where':{'ContactId':_0x8a6875[_0x3d3f('0x8')],'ListId':_0x8a6875['ListId'],'VoiceQueueId':_0x8a6875['VoiceQueueId'],'CampaignId':_0x8a6875['CampaignId']}},'log':_0x3d3f('0x6')});};};exports[_0x3d3f('0x9')]=function(_0x51bec4,_0x372ffb,_0xf3446b){return function(){return client[_0x3d3f('0x7')](_0x3d3f('0xa'),{'options':{'where':{'VoiceQueueId':_0x51bec4,'ListId':_0x372ffb,'ContactId':_0xf3446b}},'log':_0x3d3f('0xa')});};};exports[_0x3d3f('0xb')]=function(_0x16b037,_0x2a9d00,_0xfc7255,_0x41e36e){return function(){return client[_0x3d3f('0x7')](_0x3d3f('0xc'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x16b037,'active':![],'scheduledat':{'$lte':moment()[_0x3d3f('0x5')](_0x3d3f('0xd'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x2a9d00}}]},'order':[[_0x3d3f('0xe'),_0x3d3f('0xf')],['scheduledat',_0x41e36e],['id',_0x3d3f('0x10')]],'raw':!![],'limit':_0xfc7255},'log':_0x3d3f('0xc')});};};exports[_0x3d3f('0x11')]=function(_0x5447f4,_0x2b9937,_0x23f75d){return function(){return client[_0x3d3f('0x7')](_0x3d3f('0xc'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x5447f4,'active':![],'scheduledat':{'$lte':moment()[_0x3d3f('0x5')](_0x3d3f('0xd'))}},'include':[{'model':'CmContact','as':'Contact'}],'order':[['priority',_0x3d3f('0xf')],[_0x3d3f('0x12'),_0x23f75d],['id','ASC']],'raw':!![],'limit':_0x2b9937},'log':_0x3d3f('0x13')});};};exports['moveContactManagedDialer']=function(_0x51e08d,_0x1c1afa){return function(){_0x51e08d[_0x3d3f('0x14')]=_0x51e08d[_0x3d3f('0x15')];return client[_0x3d3f('0x7')]('MoveContactManagedDialer',{'body':_0x51e08d,'options':{'where':{'ContactId':_0x51e08d[_0x3d3f('0x8')],'ListId':_0x51e08d[_0x3d3f('0x16')],'VoiceQueueId':_0x51e08d[_0x3d3f('0x17')],'CampaignId':_0x51e08d[_0x3d3f('0x18')],'active':_0x1c1afa?undefined:!![]}},'log':'MoveContactManagedDialer'});};};exports[_0x3d3f('0x19')]=function(_0x5afb80){return function(){return client[_0x3d3f('0x7')](_0x3d3f('0x1a'),{'options':{'where':{'VoiceQueueId':_0x5afb80['id']?_0x5afb80['id']||null:null}},'log':_0x3d3f('0x19')});};};exports[_0x3d3f('0x1b')]=function(_0x3fcc03){return function(){return client[_0x3d3f('0x7')](_0x3d3f('0x1c'),{'options':{'where':{'id':_0x3fcc03},'include':[{'model':'CmContact','as':_0x3d3f('0x1')},{'model':_0x3d3f('0x1d'),'as':_0x3d3f('0x1e'),'attributes':['id',_0x3d3f('0x1f')]},{'model':_0x3d3f('0x20'),'as':_0x3d3f('0x21'),'attributes':['id',_0x3d3f('0x1f')]}],'raw':!![]},'log':_0x3d3f('0x2')});};};exports['unlockContact']=function(_0x55d779,_0x253db1,_0x5452d6){return function(){return client[_0x3d3f('0x7')](_0x3d3f('0x4'),{'body':_0x55d779,'options':{'where':{'id':_0x253db1},'limit':_0x5452d6},'log':'UpdateCmHopper'});};};exports[_0x3d3f('0x22')]=function(_0x5007a3,_0xd9f5be){return function(){return client['Request'](_0x3d3f('0x23'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x5007a3,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0x3d3f('0x5')](_0x3d3f('0xd'))},'UserId':{'$in':_0xd9f5be}},'order':[[_0x3d3f('0xe'),_0x3d3f('0xf')],[_0x3d3f('0x12'),'DESC'],['id',_0x3d3f('0x10')]],'include':[{'model':_0x3d3f('0x24'),'as':_0x3d3f('0x1')},{'model':_0x3d3f('0x1d'),'as':_0x3d3f('0x1e'),'attributes':['id',_0x3d3f('0x1f'),'voicePause']}],'group':'db.CmHopper.UserId','raw':!![]},'log':_0x3d3f('0xc')});};};exports['resetActiveCalls']=function(_0x23495c){return function(){return client[_0x3d3f('0x7')](_0x3d3f('0x25'),{'body':_0x23495c,'options':{},'log':_0x3d3f('0x25')});};};exports[_0x3d3f('0x26')]=function(_0x4d7e84,_0x13e34c){return function(){return client[_0x3d3f('0x7')]('CmHopperHandlePreviewRecallNotifications',{'body':{'where':{'voiceQueueId':_0x4d7e84,'interval':_0x13e34c}},'log':_0x3d3f('0x26')});};};
\ No newline at end of file