80c37e829f6cbcc2ef70312309f1a11f3259dd9e
[motion-next.git] / server / services / agi / rpc / index.js
1 const a1200_0x42d7=['ShowVariable','message','getSmsAccountById','ShowSmsAccount','CreateSquareDetailsReport','agentUnpause','createSquareReport','LogoutUser','ShowVoiceQueue','ListId','error','arg_2','getUserById','YYYY-MM-DD\x20HH:mm:ss','merge','moment','ShowSquareOdbc','CreateSquareRecording','ShowMailAccount','createSquareDetailsReport','agentLogout','LoginUser','Intervals','lodash','Interval','getTrunkById','getPauseById','getVoiceQueueById','ShowCmHopper','production','then','ShowPause','getVariableById','createCmContact','createSquareMessage','http','ShowSound','name','agentLogin','ShowTrunk','CreateSquareMessage','PauseUser','UnpauseUser','CreateCmContact','dsn','email','agentPause','getIntervalById','CreateSquareReport','catch','getSquareProject','jayson/promise','getSquareOdbcById','ShowSquareProject','getSquareProjectById'];(function(_0x1536c8,_0x56acce){const _0x42d707=function(_0x14d7f6){while(--_0x14d7f6){_0x1536c8['push'](_0x1536c8['shift']());}};_0x42d707(++_0x56acce);}(a1200_0x42d7,0xe2));const a1200_0x14d7=function(_0x1536c8,_0x56acce){_0x1536c8=_0x1536c8-0x1c0;let _0x42d707=a1200_0x42d7[_0x1536c8];return _0x42d707;};const a1200_0x5084c5=a1200_0x14d7;'use strict';const moment=require(a1200_0x5084c5(0x1c9)),_=require(a1200_0x5084c5(0x1d1)),jayson=require(a1200_0x5084c5(0x1ed)),client=jayson['client'][a1200_0x5084c5(0x1dd)]({'port':0x2329});function request(_0xc9a0ed,_0x385a74){return new Promise(function(_0x1a846b,_0x17e3a1){const _0x128463=a1200_0x14d7;return client['request'](_0xc9a0ed,_0x385a74)[_0x128463(0x1d8)](function(_0x4d23f8){const _0x2144cc=_0x128463;return _0x4d23f8[_0x2144cc(0x1c4)]?_0x17e3a1(_0x4d23f8['error'][_0x2144cc(0x1f2)]):_0x1a846b(_0x4d23f8['result']);})[_0x128463(0x1eb)](function(_0x5006a8){return _0x17e3a1(_0x5006a8);});});}exports[a1200_0x5084c5(0x1ec)]=function(_0x474daf){const _0x24e799=a1200_0x5084c5;return request('ShowSquareProject',{'options':{'raw':![],'where':{'name':_0x474daf},'attributes':[_0x24e799(0x1d7)]}});},exports['getMailAccountById']=function(_0x42b343){const _0x340b37=a1200_0x5084c5;return request(_0x340b37(0x1cc),{'options':{'raw':![],'where':{'id':_0x42b343},'include':[{'model':'MailServerOut','as':'Smtp'}],'attributes':['id',_0x340b37(0x1df),_0x340b37(0x1e7)]}});},exports[a1200_0x5084c5(0x1f0)]=function(_0x4646c3){const _0x528eae=a1200_0x5084c5;return request(_0x528eae(0x1ef),{'options':{'where':{'id':_0x4646c3},'attributes':[_0x528eae(0x1df)]}});},exports[a1200_0x5084c5(0x1d5)]=function(_0x5887af){const _0x1864f9=a1200_0x5084c5;return request(_0x1864f9(0x1c2),{'options':{'where':{'id':_0x5887af},'attributes':[_0x1864f9(0x1df)]}});},exports[a1200_0x5084c5(0x1da)]=function(_0x58fcbc){const _0x6c7c62=a1200_0x5084c5;return request(_0x6c7c62(0x1f1),{'options':{'where':{'id':_0x58fcbc},'attributes':[_0x6c7c62(0x1df)]}});},exports[a1200_0x5084c5(0x1ee)]=function(_0xaf1053){const _0x21c9cc=a1200_0x5084c5;return request(_0x21c9cc(0x1ca),{'options':{'where':{'id':_0xaf1053},'attributes':[_0x21c9cc(0x1e6)]}});},exports[a1200_0x5084c5(0x1c6)]=function(_0xe3eeff){const _0x7f4b6a=a1200_0x5084c5;return request('ShowUser',{'options':{'where':{'id':_0xe3eeff},'attributes':[_0x7f4b6a(0x1df)]}});},exports[a1200_0x5084c5(0x1d3)]=function(_0x5a6b1c){const _0x2ab9ce=a1200_0x5084c5;return request(_0x2ab9ce(0x1e1),{'options':{'where':{'id':_0x5a6b1c},'attributes':[_0x2ab9ce(0x1df)]}});},exports['getSoundById']=function(_0x11bca4){const _0x157462=a1200_0x5084c5;return request(_0x157462(0x1de),{'options':{'where':{'id':_0x11bca4},'attributes':['save_name']}});},exports[a1200_0x5084c5(0x1e9)]=function(_0x315d16){const _0x4ef002=a1200_0x5084c5;return request('ShowInterval',{'options':{'raw':![],'where':{'id':_0x315d16},'include':[{'model':_0x4ef002(0x1d2),'as':_0x4ef002(0x1d0)}]}});},exports[a1200_0x5084c5(0x1f3)]=function(_0x37908e){const _0x1f5ab9=a1200_0x5084c5;return request(_0x1f5ab9(0x1f4),{'options':{'where':{'id':_0x37908e},'attributes':['id',_0x1f5ab9(0x1df)]}});},exports['createSmsMessage']=function(_0x23fc55){return request('CreateSmsMessage',{'body':_0x23fc55});},exports[a1200_0x5084c5(0x1cd)]=function(_0x205402){const _0x3fefc3=a1200_0x5084c5;return request(_0x3fefc3(0x1f5),{'body':_0x205402});},exports[a1200_0x5084c5(0x1c0)]=function(_0x547cb2){const _0x25ed13=a1200_0x5084c5;return request(_0x25ed13(0x1ea),{'body':_[_0x25ed13(0x1c8)](_0x547cb2,{'project_name':_0x547cb2['arg_1'],'prev_project_name':_0x547cb2[_0x25ed13(0x1c5)]||'','is_subproject':_0x547cb2[_0x25ed13(0x1c5)]?!![]:![],'leaveAt':moment()['format'](_0x25ed13(0x1c7))})});},exports['createSquareRecording']=function(_0x55f3ed){const _0x8dec9=a1200_0x5084c5;return request(_0x8dec9(0x1cb),{'body':_0x55f3ed});},exports[a1200_0x5084c5(0x1dc)]=function(_0x159368){const _0x5486a0=a1200_0x5084c5;return request(_0x5486a0(0x1e2),{'body':_0x159368});},exports[a1200_0x5084c5(0x1db)]=function(_0x1db136){const _0x6cc9ab=a1200_0x5084c5;return request(_0x6cc9ab(0x1d6),{'options':{'raw':![],'where':{'phone':_0x1db136['phone'],'ListId':_0x1db136[_0x6cc9ab(0x1c3)]}}})[_0x6cc9ab(0x1d8)](function(_0xd8d90e){const _0x214cd4=_0x6cc9ab;if(_0xd8d90e)return _0xd8d90e;return request(_0x214cd4(0x1e5),{'body':_0x1db136});});},exports[a1200_0x5084c5(0x1d4)]=function(_0x24c57e){const _0x2f8134=a1200_0x5084c5;return request(_0x2f8134(0x1d9),{'options':{'where':{'id':_0x24c57e},'attributes':[_0x2f8134(0x1df)]}});},exports[a1200_0x5084c5(0x1e0)]=function(_0x351e6b,_0x1e99d0){const _0x439098=a1200_0x5084c5;return request(_0x439098(0x1cf),{'body':{'interface':_0x1e99d0},'options':{'where':_0x351e6b}});},exports[a1200_0x5084c5(0x1e8)]=function(_0x304963,_0x49c2c7,_0x4cc7a3){const _0x552373=a1200_0x5084c5;return request(_0x552373(0x1e3),{'body':{'type':_0x49c2c7,'uniqueid':_0x4cc7a3},'options':{'where':_0x304963}});},exports[a1200_0x5084c5(0x1f6)]=function(_0x3c947e){const _0x42e546=a1200_0x5084c5;return request(_0x42e546(0x1e4),{'body':{},'options':{'where':_0x3c947e}});},exports[a1200_0x5084c5(0x1ce)]=function(_0xfab477){const _0x4c9a38=a1200_0x5084c5;return request(_0x4c9a38(0x1c1),{'body':{},'options':{'where':_0xfab477}});};