169a690dd6637fcfebb6a876033c0f71730895ac
[motion-next.git] / server / services / agi / rpc / index.js
1 const a1032_0x1208=['getMailAccountById','createCmContact','moment','MailServerOut','LogoutUser','ShowTrunk','email','YYYY-MM-DD\x20HH:mm:ss','save_name','CreateSquareReport','getTrunkById','CreateSquareRecording','agentLogin','createSquareRecording','phone','arg_1','getSmsAccountById','ShowPause','name','UnpauseUser','getSquareProject','getVariableById','message','getSquareOdbcById','merge','ShowSmsAccount','http','arg_2','dsn','catch','ShowVoiceQueue','jayson/promise','client','getSoundById','result','getVoiceQueueById','getPauseById','CreateSquareDetailsReport','production','ShowUser','agentUnpause','ShowCmHopper','ShowMailAccount','agentLogout','createSmsMessage','getIntervalById','error','Smtp','ShowSquareProject','format','CreateSmsMessage','createSquareReport','ShowVariable','getSquareProjectById'];(function(_0x3e1905,_0x1208dd){const _0xc764e5=function(_0x132b1b){while(--_0x132b1b){_0x3e1905['push'](_0x3e1905['shift']());}};_0xc764e5(++_0x1208dd);}(a1032_0x1208,0x16f));const a1032_0xc764=function(_0x3e1905,_0x1208dd){_0x3e1905=_0x3e1905-0x0;let _0xc764e5=a1032_0x1208[_0x3e1905];return _0xc764e5;};const _0x38e6dd=a1032_0xc764;'use strict';const moment=require(_0x38e6dd('0xd')),_=require('lodash'),jayson=require(_0x38e6dd('0x2a')),client=jayson[_0x38e6dd('0x2b')][_0x38e6dd('0x25')]({'port':0x2329});function request(_0x132b1b,_0x4faa5a){return new Promise(function(_0x2888ef,_0xca0d2){const _0x5b2da8=a1032_0xc764;return client['request'](_0x132b1b,_0x4faa5a)['then'](function(_0xe0dd1f){const _0x48f180=a1032_0xc764;return _0xe0dd1f['error']?_0xca0d2(_0xe0dd1f[_0x48f180('0x3')][_0x48f180('0x21')]):_0x2888ef(_0xe0dd1f[_0x48f180('0x2d')]);})[_0x5b2da8('0x28')](function(_0x30652a){return _0xca0d2(_0x30652a);});});}exports[_0x38e6dd('0x1f')]=function(_0x199f33){const _0x5add3a=_0x38e6dd;return request('ShowSquareProject',{'options':{'raw':![],'where':{'name':_0x199f33},'attributes':[_0x5add3a('0x31')]}});},exports[_0x38e6dd('0xb')]=function(_0x176100){const _0x11f00c=_0x38e6dd;return request(_0x11f00c('0x35'),{'options':{'raw':![],'where':{'id':_0x176100},'include':[{'model':_0x11f00c('0xe'),'as':_0x11f00c('0x4')}],'attributes':['id','name',_0x11f00c('0x11')]}});},exports[_0x38e6dd('0xa')]=function(_0x3171a0){const _0x3964e9=_0x38e6dd;return request(_0x3964e9('0x5'),{'options':{'where':{'id':_0x3171a0},'attributes':[_0x3964e9('0x1d')]}});},exports[_0x38e6dd('0x2e')]=function(_0x757e00){const _0x4a9f24=_0x38e6dd;return request(_0x4a9f24('0x29'),{'options':{'where':{'id':_0x757e00},'attributes':[_0x4a9f24('0x1d')]}});},exports[_0x38e6dd('0x20')]=function(_0x558027){const _0x5e1690=_0x38e6dd;return request(_0x5e1690('0x9'),{'options':{'where':{'id':_0x558027},'attributes':[_0x5e1690('0x1d')]}});},exports[_0x38e6dd('0x22')]=function(_0x39b49a){const _0xbb8882=_0x38e6dd;return request('ShowSquareOdbc',{'options':{'where':{'id':_0x39b49a},'attributes':[_0xbb8882('0x27')]}});},exports['getUserById']=function(_0x5694e7){const _0x5b4c1c=_0x38e6dd;return request(_0x5b4c1c('0x32'),{'options':{'where':{'id':_0x5694e7},'attributes':[_0x5b4c1c('0x1d')]}});},exports[_0x38e6dd('0x15')]=function(_0x59983b){const _0x48f3cc=_0x38e6dd;return request(_0x48f3cc('0x10'),{'options':{'where':{'id':_0x59983b},'attributes':[_0x48f3cc('0x1d')]}});},exports[_0x38e6dd('0x2c')]=function(_0x5104c8){const _0x5e8cca=_0x38e6dd;return request('ShowSound',{'options':{'where':{'id':_0x5104c8},'attributes':[_0x5e8cca('0x13')]}});},exports[_0x38e6dd('0x2')]=function(_0x5092b3){return request('ShowInterval',{'options':{'raw':![],'where':{'id':_0x5092b3},'include':[{'model':'Interval','as':'Intervals'}]}});},exports[_0x38e6dd('0x1b')]=function(_0x18833e){const _0x59b0e3=_0x38e6dd;return request(_0x59b0e3('0x24'),{'options':{'where':{'id':_0x18833e},'attributes':['id','name']}});},exports[_0x38e6dd('0x1')]=function(_0x1c196c){const _0x4ceece=_0x38e6dd;return request(_0x4ceece('0x7'),{'body':_0x1c196c});},exports['createSquareDetailsReport']=function(_0x15ce5f){const _0x36525d=_0x38e6dd;return request(_0x36525d('0x30'),{'body':_0x15ce5f});},exports[_0x38e6dd('0x8')]=function(_0x4e0166){const _0x40720d=_0x38e6dd;return request(_0x40720d('0x14'),{'body':_[_0x40720d('0x23')](_0x4e0166,{'project_name':_0x4e0166[_0x40720d('0x1a')],'prev_project_name':_0x4e0166['arg_2']||'','is_subproject':_0x4e0166[_0x40720d('0x26')]?!![]:![],'leaveAt':moment()[_0x40720d('0x6')](_0x40720d('0x12'))})});},exports[_0x38e6dd('0x18')]=function(_0x43a106){const _0x28692a=_0x38e6dd;return request(_0x28692a('0x16'),{'body':_0x43a106});},exports['createSquareMessage']=function(_0x2f16b8){return request('CreateSquareMessage',{'body':_0x2f16b8});},exports[_0x38e6dd('0xc')]=function(_0x312a27){const _0xe51616=_0x38e6dd;return request(_0xe51616('0x34'),{'options':{'raw':![],'where':{'phone':_0x312a27[_0xe51616('0x19')],'ListId':_0x312a27['ListId']}}})['then'](function(_0x2470e6){if(_0x2470e6)return _0x2470e6;return request('CreateCmContact',{'body':_0x312a27});});},exports[_0x38e6dd('0x2f')]=function(_0x1ca360){const _0x3c5d41=_0x38e6dd;return request(_0x3c5d41('0x1c'),{'options':{'where':{'id':_0x1ca360},'attributes':[_0x3c5d41('0x1d')]}});},exports[_0x38e6dd('0x17')]=function(_0x63107e,_0x1d8fb7){return request('LoginUser',{'body':{'interface':_0x1d8fb7},'options':{'where':_0x63107e}});},exports['agentPause']=function(_0x597d61,_0x3e5ee8,_0x41dbbe){return request('PauseUser',{'body':{'type':_0x3e5ee8,'uniqueid':_0x41dbbe},'options':{'where':_0x597d61}});},exports[_0x38e6dd('0x33')]=function(_0x220832){const _0x202c4d=_0x38e6dd;return request(_0x202c4d('0x1e'),{'body':{},'options':{'where':_0x220832}});},exports[_0x38e6dd('0x0')]=function(_0x3a7ffd){const _0x5a4e63=_0x38e6dd;return request(_0x5a4e63('0xf'),{'body':{},'options':{'where':_0x3a7ffd}});};