Built motion from commit ce97982f.|2.6.29
[motion2.git] / server / services / ami / rpc / cmHopper.js
index 31acc22..0f39334 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa381=['Request','GetCmHopper','Contact','getCmHopper','updateContacts','format','UpdateCmHopper','rescheduleContact','ContactId','ListId','VoiceQueueId','CampaignId','destroyContact','DestroyCmHopper','getContactDialer','GetContactDialer','YYYY-MM-DD\x20HH:mm:ss','priority','DESC','CmContact','ASC','GetContactDialerIvr','queue','MoveContactManagedDialer','CountReScheduled','countReScheduled','getContactPreview','GetCmHopperPreview','Agent','VoiceQueue','Queue','getContactRecallMe','GetContactRecallMe','scheduledat','User','voicePause','resetActiveCalls','ResetActiveCalls','handlePreviewRecallNotifications','../client','moment'];(function(_0x46bd09,_0x397ffd){var _0xfce5a9=function(_0x7e6028){while(--_0x7e6028){_0x46bd09['push'](_0x46bd09['shift']());}};_0xfce5a9(++_0x397ffd);}(_0xa381,0x79));var _0x1a38=function(_0x34bb03,_0x3c4f28){_0x34bb03=_0x34bb03-0x0;var _0x165928=_0xa381[_0x34bb03];return _0x165928;};'use strict';var client=require(_0x1a38('0x0'));var moment=require(_0x1a38('0x1'));exports['getContacts']=function(_0x5ba201,_0x41cdc2){return function(){return client[_0x1a38('0x2')](_0x1a38('0x3'),{'options':{'where':{'VoiceQueueId':_0x5ba201},'include':[{'model':'CmContact','as':_0x1a38('0x4')}],'limit':_0x41cdc2,'raw':![]},'log':_0x1a38('0x5')});};};exports[_0x1a38('0x6')]=function(_0x473480,_0x4bb44f,_0x411f6a){return function(){return client['Request']('UpdateCmHopper',{'body':_0x473480,'options':{'where':{'VoiceQueueId':_0x4bb44f,'scheduledat':{'$lte':moment()[_0x1a38('0x7')]('YYYY-MM-DD\x20HH:mm:ss')}},'limit':_0x411f6a},'log':_0x1a38('0x8')});};};exports[_0x1a38('0x9')]=function(_0x50698a){return client[_0x1a38('0x2')]('UpdateCmHopper',{'body':_0x50698a,'options':{'where':{'ContactId':_0x50698a[_0x1a38('0xa')],'ListId':_0x50698a[_0x1a38('0xb')],'VoiceQueueId':_0x50698a[_0x1a38('0xc')],'CampaignId':_0x50698a[_0x1a38('0xd')]}},'log':_0x1a38('0x9')});};exports[_0x1a38('0xe')]=function(_0x2c474f,_0x222bde,_0x41294a){return function(){return client[_0x1a38('0x2')](_0x1a38('0xf'),{'options':{'where':{'VoiceQueueId':_0x2c474f,'ListId':_0x222bde,'ContactId':_0x41294a}},'log':_0x1a38('0xf')});};};exports[_0x1a38('0x10')]=function(_0x43321f,_0x20d88b,_0xcc3d38,_0x3177ec){return client[_0x1a38('0x2')](_0x1a38('0x11'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x43321f,'active':![],'scheduledat':{'$lte':moment()[_0x1a38('0x7')](_0x1a38('0x12'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x20d88b}}]},'order':[[_0x1a38('0x13'),_0x1a38('0x14')],['scheduledat',_0x3177ec],['id','ASC']],'raw':!![],'limit':_0xcc3d38},'log':_0x1a38('0x11')});};exports['getContactDialerIvr']=function(_0x424d27,_0x9c6bbf,_0x44a325){return client[_0x1a38('0x2')](_0x1a38('0x11'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x424d27,'active':![],'scheduledat':{'$lte':moment()[_0x1a38('0x7')](_0x1a38('0x12'))}},'include':[{'model':_0x1a38('0x15'),'as':_0x1a38('0x4')}],'order':[['priority',_0x1a38('0x14')],['scheduledat',_0x44a325],['id',_0x1a38('0x16')]],'raw':!![],'limit':_0x9c6bbf},'log':_0x1a38('0x17')});};exports['moveContactManagedDialer']=function(_0x45272f,_0x50fccb){_0x45272f['campaign']=_0x45272f[_0x1a38('0x18')];return client[_0x1a38('0x2')](_0x1a38('0x19'),{'body':_0x45272f,'options':{'where':{'ContactId':_0x45272f[_0x1a38('0xa')],'ListId':_0x45272f['ListId'],'VoiceQueueId':_0x45272f[_0x1a38('0xc')],'CampaignId':_0x45272f[_0x1a38('0xd')],'active':_0x50fccb?undefined:!![]}},'log':_0x1a38('0x19')});};exports['countReScheduled']=function(_0x18912c){return client[_0x1a38('0x2')](_0x1a38('0x1a'),{'options':{'where':{'VoiceQueueId':_0x18912c['id']?_0x18912c['id']||null:null}},'log':_0x1a38('0x1b')});};exports[_0x1a38('0x1c')]=function(_0x356ce9){return function(){return client[_0x1a38('0x2')](_0x1a38('0x1d'),{'options':{'where':{'id':_0x356ce9},'include':[{'model':_0x1a38('0x15'),'as':_0x1a38('0x4')},{'model':'User','as':_0x1a38('0x1e'),'attributes':['id','name']},{'model':_0x1a38('0x1f'),'as':_0x1a38('0x20'),'attributes':['id','name']}],'raw':!![]},'log':_0x1a38('0x5')});};};exports['unlockContact']=function(_0x445d22,_0x36e79d,_0x2d0a2c){return client['Request']('UpdateCmHopper',{'body':_0x445d22,'options':{'where':{'id':_0x36e79d},'limit':_0x2d0a2c},'log':_0x1a38('0x8')});};exports[_0x1a38('0x21')]=function(_0xd81ee6,_0x45f54e){return function(){return client[_0x1a38('0x2')](_0x1a38('0x22'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0xd81ee6,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0x1a38('0x7')](_0x1a38('0x12'))},'UserId':{'$in':_0x45f54e}},'order':[['priority','DESC'],[_0x1a38('0x23'),_0x1a38('0x14')],['id',_0x1a38('0x16')]],'include':[{'model':_0x1a38('0x15'),'as':_0x1a38('0x4')},{'model':_0x1a38('0x24'),'as':_0x1a38('0x1e'),'attributes':['id','name',_0x1a38('0x25')]}],'group':'db.CmHopper.UserId','raw':!![]},'log':_0x1a38('0x11')});};};exports[_0x1a38('0x26')]=function(_0x6a0e99,_0x347b06){return client[_0x1a38('0x2')]('ResetActiveCalls',{'body':_0x6a0e99,'options':_0x347b06||{},'log':_0x1a38('0x27')});};exports[_0x1a38('0x28')]=function(_0x451b41,_0x2255fc,_0xc7fe67){return function(){return client[_0x1a38('0x2')]('CmHopperHandlePreviewRecallNotifications',{'body':{'where':{'voiceQueueIds':_0x451b41,'interval':_0x2255fc,'availableAgentsIds':_0xc7fe67}},'log':_0x1a38('0x28')});};};
\ No newline at end of file
+var _0xc4f5=['DESC','db.CmHopper.UserId','resetActiveCalls','ResetActiveCalls','handlePreviewRecallNotifications','moment','getContacts','Request','GetCmHopper','CmContact','Contact','getCmHopper','UpdateCmHopper','YYYY-MM-DD\x20HH:mm:ss','rescheduleContact','ContactId','ListId','VoiceQueueId','CampaignId','DestroyCmHopper','getContactDialer','GetContactDialer','format','scheduledat','getContactDialerIvr','priority','ASC','GetContactDialerIvr','moveContactManagedDialer','campaign','queue','MoveContactManagedDialer','CountReScheduled','countReScheduled','GetCmHopperPreview','Agent','name','VoiceQueue','Queue','GetContactRecallMe'];(function(_0x47bc5e,_0x6fc500){var _0x323a59=function(_0x32df89){while(--_0x32df89){_0x47bc5e['push'](_0x47bc5e['shift']());}};_0x323a59(++_0x6fc500);}(_0xc4f5,0xa5));var _0x5c4f=function(_0x1b4c04,_0x8d961d){_0x1b4c04=_0x1b4c04-0x0;var _0x374f5d=_0xc4f5[_0x1b4c04];return _0x374f5d;};'use strict';var client=require('../client');var moment=require(_0x5c4f('0x0'));exports[_0x5c4f('0x1')]=function(_0x37e15c,_0x515f4c){return function(){return client[_0x5c4f('0x2')](_0x5c4f('0x3'),{'options':{'where':{'VoiceQueueId':_0x37e15c},'include':[{'model':_0x5c4f('0x4'),'as':_0x5c4f('0x5')}],'limit':_0x515f4c,'raw':![]},'log':_0x5c4f('0x6')});};};exports['updateContacts']=function(_0x18c3f9,_0x299b8b,_0x3fd7bb){return function(){return client[_0x5c4f('0x2')](_0x5c4f('0x7'),{'body':_0x18c3f9,'options':{'where':{'VoiceQueueId':_0x299b8b,'scheduledat':{'$lte':moment()['format'](_0x5c4f('0x8'))}},'limit':_0x3fd7bb},'log':'UpdateCmHopper'});};};exports[_0x5c4f('0x9')]=function(_0x4d03b1){return client[_0x5c4f('0x2')](_0x5c4f('0x7'),{'body':_0x4d03b1,'options':{'where':{'ContactId':_0x4d03b1[_0x5c4f('0xa')],'ListId':_0x4d03b1[_0x5c4f('0xb')],'VoiceQueueId':_0x4d03b1[_0x5c4f('0xc')],'CampaignId':_0x4d03b1[_0x5c4f('0xd')]}},'log':_0x5c4f('0x9')});};exports['destroyContact']=function(_0x255e5d,_0x16cbfc,_0x5b77ab){return function(){return client[_0x5c4f('0x2')](_0x5c4f('0xe'),{'options':{'where':{'VoiceQueueId':_0x255e5d,'ListId':_0x16cbfc,'ContactId':_0x5b77ab}},'log':_0x5c4f('0xe')});};};exports[_0x5c4f('0xf')]=function(_0x376452,_0x5e6085,_0x48c4dc,_0x2cb7ff){return client[_0x5c4f('0x2')](_0x5c4f('0x10'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x376452,'active':![],'scheduledat':{'$lte':moment()[_0x5c4f('0x11')](_0x5c4f('0x8'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x5e6085}}]},'order':[['priority','DESC'],[_0x5c4f('0x12'),_0x2cb7ff],['id','ASC']],'raw':!![],'limit':_0x48c4dc},'log':'GetContactDialer'});};exports[_0x5c4f('0x13')]=function(_0x5154eb,_0x3824b0,_0x2cff0f){return client[_0x5c4f('0x2')](_0x5c4f('0x10'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x5154eb,'active':![],'scheduledat':{'$lte':moment()[_0x5c4f('0x11')](_0x5c4f('0x8'))}},'include':[{'model':_0x5c4f('0x4'),'as':_0x5c4f('0x5')}],'order':[[_0x5c4f('0x14'),'DESC'],[_0x5c4f('0x12'),_0x2cff0f],['id',_0x5c4f('0x15')]],'raw':!![],'limit':_0x3824b0},'log':_0x5c4f('0x16')});};exports[_0x5c4f('0x17')]=function(_0x5170e0,_0x4ac510){_0x5170e0[_0x5c4f('0x18')]=_0x5170e0[_0x5c4f('0x19')];return client[_0x5c4f('0x2')](_0x5c4f('0x1a'),{'body':_0x5170e0,'options':{'where':{'ContactId':_0x5170e0[_0x5c4f('0xa')],'ListId':_0x5170e0[_0x5c4f('0xb')],'VoiceQueueId':_0x5170e0[_0x5c4f('0xc')],'CampaignId':_0x5170e0[_0x5c4f('0xd')],'active':_0x4ac510?undefined:!![]}},'log':'MoveContactManagedDialer'});};exports['countReScheduled']=function(_0x111110){return client[_0x5c4f('0x2')](_0x5c4f('0x1b'),{'options':{'where':{'VoiceQueueId':_0x111110['id']?_0x111110['id']||null:null}},'log':_0x5c4f('0x1c')});};exports['getContactPreview']=function(_0x2fc5f8){return function(){return client[_0x5c4f('0x2')](_0x5c4f('0x1d'),{'options':{'where':{'id':_0x2fc5f8},'include':[{'model':_0x5c4f('0x4'),'as':_0x5c4f('0x5')},{'model':'User','as':_0x5c4f('0x1e'),'attributes':['id',_0x5c4f('0x1f')]},{'model':_0x5c4f('0x20'),'as':_0x5c4f('0x21'),'attributes':['id',_0x5c4f('0x1f')]}],'raw':!![]},'log':_0x5c4f('0x6')});};};exports['unlockContact']=function(_0xea0a11,_0xc6b796,_0x22bcff){return client[_0x5c4f('0x2')]('UpdateCmHopper',{'body':_0xea0a11,'options':{'where':{'id':_0xc6b796},'limit':_0x22bcff},'log':'UpdateCmHopper'});};exports['getContactRecallMe']=function(_0x2e0b87,_0x12f415){return function(){return client[_0x5c4f('0x2')](_0x5c4f('0x22'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x2e0b87,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0x5c4f('0x11')](_0x5c4f('0x8'))},'UserId':{'$in':_0x12f415}},'order':[[_0x5c4f('0x14'),_0x5c4f('0x23')],[_0x5c4f('0x12'),_0x5c4f('0x23')],['id',_0x5c4f('0x15')]],'include':[{'model':_0x5c4f('0x4'),'as':_0x5c4f('0x5')},{'model':'User','as':'Agent','attributes':['id',_0x5c4f('0x1f'),'voicePause']}],'group':_0x5c4f('0x24'),'raw':!![]},'log':_0x5c4f('0x10')});};};exports[_0x5c4f('0x25')]=function(_0x31b63b,_0x20052a){return client[_0x5c4f('0x2')](_0x5c4f('0x26'),{'body':_0x31b63b,'options':_0x20052a||{},'log':'ResetActiveCalls'});};exports[_0x5c4f('0x27')]=function(_0xea1a32,_0xeac050,_0x512bd3){return function(){return client['Request']('CmHopperHandlePreviewRecallNotifications',{'body':{'where':{'voiceQueueIds':_0xea1a32,'interval':_0xeac050,'availableAgentsIds':_0x512bd3}},'log':_0x5c4f('0x27')});};};
\ No newline at end of file