Built motion from commit 4a18b36e645f5fa4a517d36f9783bde259878164. Version 3.0.0...
[motion-next.git] / server / services / ami / rpc / cmHopper.js
1 const a1103_0x2561=['GetContactDialerIvr','CampaignId','GetContactDialer','Agent','getContactRecallMe','CountReScheduled','ListId','campaign','countReScheduled','getContactPreview','db.CmHopper.UserId','ASC','getContacts','YYYY-MM-DD\x20HH:mm:ss','getContactDialer','MoveContactManagedDialer','voicePause','GetCmHopper','Request','sequelize','../client','Contact','queue','priority','CmContact','VoiceQueue','format','getCmHopper','destroyContact','name','scheduledat','DESC','Queue','VoiceQueueId','rescheduleContact','moment','moveContactManagedDialer','GetCmHopperPreview','lte','UpdateCmHopper','DestroyCmHopper'];(function(_0x2e0db9,_0x2561c7){const _0x2fd6f3=function(_0x30c4c7){while(--_0x30c4c7){_0x2e0db9['push'](_0x2e0db9['shift']());}};_0x2fd6f3(++_0x2561c7);}(a1103_0x2561,0x1cb));const a1103_0x2fd6=function(_0x2e0db9,_0x2561c7){_0x2e0db9=_0x2e0db9-0x0;let _0x2fd6f3=a1103_0x2561[_0x2e0db9];return _0x2fd6f3;};const _0xa4226c=a1103_0x2fd6;'use strict';const client=require(_0xa4226c('0xc')),moment=require(_0xa4226c('0x1b')),{Op}=require(_0xa4226c('0xb'));exports[_0xa4226c('0x4')]=function(_0x30c4c7,_0x58970f){return function(){const _0x1ac221=a1103_0x2fd6;return client['Request'](_0x1ac221('0x9'),{'options':{'where':{'VoiceQueueId':_0x30c4c7},'include':[{'model':_0x1ac221('0x10'),'as':'Contact'}],'limit':_0x58970f,'raw':![]},'log':'getCmHopper'});};},exports['updateContacts']=function(_0x3ac5fd,_0x267fe9,_0x2b4fa7){return function(){const _0xe5c6be=a1103_0x2fd6;return client['Request'](_0xe5c6be('0x1f'),{'body':_0x3ac5fd,'options':{'where':{'VoiceQueueId':_0x267fe9,'scheduledat':{[Op[_0xe5c6be('0x1e')]]:moment()[_0xe5c6be('0x12')](_0xe5c6be('0x5'))}},'limit':_0x2b4fa7},'log':'UpdateCmHopper'});};},exports['rescheduleContact']=function(_0x41a9ee){return function(){const _0x1355d3=a1103_0x2fd6;return client[_0x1355d3('0xa')](_0x1355d3('0x1f'),{'body':_0x41a9ee,'options':{'where':{'ContactId':_0x41a9ee['ContactId'],'ListId':_0x41a9ee[_0x1355d3('0x27')],'VoiceQueueId':_0x41a9ee['VoiceQueueId'],'CampaignId':_0x41a9ee['CampaignId']}},'log':_0x1355d3('0x1a')});};},exports[_0xa4226c('0x14')]=function(_0x2eea00,_0x3633e9,_0x1b52e6){return function(){const _0x316c7b=a1103_0x2fd6;return client['Request']('DestroyCmHopper',{'options':{'where':{'VoiceQueueId':_0x2eea00,'ListId':_0x3633e9,'ContactId':_0x1b52e6}},'log':_0x316c7b('0x20')});};},exports[_0xa4226c('0x6')]=function(_0x214ce7,_0xb2bbc1,_0x3154b6,_0x6c5dd2){return function(){const _0x45fd04=a1103_0x2fd6;return client[_0x45fd04('0xa')](_0x45fd04('0x23'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x214ce7,'active':![],'scheduledat':{[Op[_0x45fd04('0x1e')]]:moment()['format'](_0x45fd04('0x5'))},[Op['or']]:[{'UserId':null},{'UserId':{[Op['in']]:_0xb2bbc1}}]},'order':[[_0x45fd04('0xf'),'DESC'],[_0x45fd04('0x16'),_0x6c5dd2],['id','ASC']],'raw':!![],'limit':_0x3154b6},'log':'GetContactDialer'});};},exports['getContactDialerIvr']=function(_0x57b52c,_0x5bd86b,_0x51b436){return function(){const _0xb9f90c=a1103_0x2fd6;return client[_0xb9f90c('0xa')]('GetContactDialer',{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x57b52c,'active':![],'scheduledat':{[Op['lte']]:moment()[_0xb9f90c('0x12')]('YYYY-MM-DD\x20HH:mm:ss')}},'include':[{'model':_0xb9f90c('0x10'),'as':'Contact'}],'order':[[_0xb9f90c('0xf'),'DESC'],['scheduledat',_0x51b436],['id',_0xb9f90c('0x3')]],'raw':!![],'limit':_0x5bd86b},'log':_0xb9f90c('0x21')});};},exports[_0xa4226c('0x1c')]=function(_0x5bb7ea,_0x5f0769){return function(){const _0x1ca7fd=a1103_0x2fd6;return _0x5bb7ea[_0x1ca7fd('0x28')]=_0x5bb7ea[_0x1ca7fd('0xe')],client[_0x1ca7fd('0xa')](_0x1ca7fd('0x7'),{'body':_0x5bb7ea,'options':{'where':{'ContactId':_0x5bb7ea['ContactId'],'ListId':_0x5bb7ea[_0x1ca7fd('0x27')],'VoiceQueueId':_0x5bb7ea[_0x1ca7fd('0x19')],'CampaignId':_0x5bb7ea[_0x1ca7fd('0x22')],'active':_0x5f0769?undefined:!![]}},'log':_0x1ca7fd('0x7')});};},exports[_0xa4226c('0x0')]=function(_0xc058f4){return function(){const _0x4aaed2=a1103_0x2fd6;return client[_0x4aaed2('0xa')](_0x4aaed2('0x26'),{'options':{'where':{'VoiceQueueId':_0xc058f4['id']?_0xc058f4['id']||null:null}},'log':_0x4aaed2('0x0')});};},exports[_0xa4226c('0x1')]=function(_0x424c7b){return function(){const _0x321696=a1103_0x2fd6;return client['Request'](_0x321696('0x1d'),{'options':{'where':{'id':_0x424c7b},'include':[{'model':_0x321696('0x10'),'as':_0x321696('0xd')},{'model':'User','as':'Agent','attributes':['id',_0x321696('0x15')]},{'model':_0x321696('0x11'),'as':_0x321696('0x18'),'attributes':['id',_0x321696('0x15')]}],'raw':!![]},'log':_0x321696('0x13')});};},exports['unlockContact']=function(_0x318bc2,_0x4d1ccb,_0x1e903d){return function(){const _0xa14515=a1103_0x2fd6;return client[_0xa14515('0xa')](_0xa14515('0x1f'),{'body':_0x318bc2,'options':{'where':{'id':_0x4d1ccb},'limit':_0x1e903d},'log':_0xa14515('0x1f')});};},exports[_0xa4226c('0x25')]=function(_0xa64137,_0x2f8419){return function(){const _0xcc12dd=a1103_0x2fd6;return client[_0xcc12dd('0xa')]('GetContactRecallMe',{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0xa64137,'active':![],'recallme':!![],'scheduledat':{[Op[_0xcc12dd('0x1e')]]:moment()[_0xcc12dd('0x12')]('YYYY-MM-DD\x20HH:mm:ss')},'UserId':{[Op['in']]:_0x2f8419}},'order':[['priority',_0xcc12dd('0x17')],[_0xcc12dd('0x16'),_0xcc12dd('0x17')],['id',_0xcc12dd('0x3')]],'include':[{'model':'CmContact','as':_0xcc12dd('0xd')},{'model':'User','as':_0xcc12dd('0x24'),'attributes':['id','name',_0xcc12dd('0x8')]}],'group':_0xcc12dd('0x2'),'raw':!![]},'log':'GetContactDialer'});};};