Built motion from commit be44e1e4d16f8b29d243415b03d27262d8601e0e. Version 3.0.0...
[motion-next.git] / server / services / agi / rpc / index.js
1 const a1031_0x2745=['getVariableById','agentLogout','createSquareMessage','CreateCmContact','ShowSmsAccount','LogoutUser','error','ListId','createSquareReport','createSmsMessage','name','Smtp','ShowTrunk','LoginUser','Intervals','createSquareDetailsReport','merge','CreateSquareReport','catch','client','arg_1','message','getSquareOdbcById','http','getSquareProject','request','CreateSquareDetailsReport','result','getPauseById','jayson/promise','save_name','arg_2','getMailAccountById','moment','then','ShowSquareOdbc','getIntervalById','format','ShowPause','agentLogin','Interval','PauseUser','getSoundById','getSquareProjectById','ShowUser','agentUnpause','production','ShowVariable','getUserById','phone','CreateSquareRecording','ShowSound','getSmsAccountById','ShowSquareProject','UnpauseUser','CreateSquareMessage'];(function(_0x105ef4,_0x27454f){const _0xf04514=function(_0x434ab4){while(--_0x434ab4){_0x105ef4['push'](_0x105ef4['shift']());}};_0xf04514(++_0x27454f);}(a1031_0x2745,0x163));const a1031_0xf045=function(_0x105ef4,_0x27454f){_0x105ef4=_0x105ef4-0x0;let _0xf04514=a1031_0x2745[_0x105ef4];return _0xf04514;};const _0x4cf5bc=a1031_0xf045;'use strict';const moment=require(_0x4cf5bc('0xe')),_=require('lodash'),jayson=require(_0x4cf5bc('0xa')),client=jayson[_0x4cf5bc('0x0')][_0x4cf5bc('0x4')]({'port':0x2329});function request(_0x434ab4,_0x4df28d){return new Promise(function(_0x105132,_0x7fd5ec){const _0xdaaca1=a1031_0xf045;return client[_0xdaaca1('0x6')](_0x434ab4,_0x4df28d)[_0xdaaca1('0xf')](function(_0x1dab1f){const _0x3e0c7f=_0xdaaca1;return _0x1dab1f['error']?_0x7fd5ec(_0x1dab1f[_0x3e0c7f('0x2b')][_0x3e0c7f('0x2')]):_0x105132(_0x1dab1f[_0x3e0c7f('0x8')]);})[_0xdaaca1('0x37')](function(_0x20e37d){return _0x7fd5ec(_0x20e37d);});});}exports[_0x4cf5bc('0x5')]=function(_0x573780){const _0xa97169=_0x4cf5bc;return request(_0xa97169('0x22'),{'options':{'raw':![],'where':{'name':_0x573780},'attributes':[_0xa97169('0x1b')]}});},exports[_0x4cf5bc('0xd')]=function(_0x4b9fb9){const _0x28345f=_0x4cf5bc;return request('ShowMailAccount',{'options':{'raw':![],'where':{'id':_0x4b9fb9},'include':[{'model':'MailServerOut','as':_0x28345f('0x30')}],'attributes':['id',_0x28345f('0x2f'),'email']}});},exports[_0x4cf5bc('0x18')]=function(_0x3a828b){const _0x485f7a=_0x4cf5bc;return request(_0x485f7a('0x22'),{'options':{'where':{'id':_0x3a828b},'attributes':[_0x485f7a('0x2f')]}});},exports['getVoiceQueueById']=function(_0x3ffc5a){return request('ShowVoiceQueue',{'options':{'where':{'id':_0x3ffc5a},'attributes':['name']}});},exports[_0x4cf5bc('0x25')]=function(_0x1cc495){const _0xc578c9=_0x4cf5bc;return request(_0xc578c9('0x1c'),{'options':{'where':{'id':_0x1cc495},'attributes':[_0xc578c9('0x2f')]}});},exports[_0x4cf5bc('0x3')]=function(_0x558631){const _0x2d70a3=_0x4cf5bc;return request(_0x2d70a3('0x10'),{'options':{'where':{'id':_0x558631},'attributes':['dsn']}});},exports[_0x4cf5bc('0x1d')]=function(_0x76b9b6){const _0x56bd88=_0x4cf5bc;return request(_0x56bd88('0x19'),{'options':{'where':{'id':_0x76b9b6},'attributes':[_0x56bd88('0x2f')]}});},exports['getTrunkById']=function(_0x31cbfc){const _0x2ef14d=_0x4cf5bc;return request(_0x2ef14d('0x31'),{'options':{'where':{'id':_0x31cbfc},'attributes':[_0x2ef14d('0x2f')]}});},exports[_0x4cf5bc('0x17')]=function(_0x3fafaf){const _0x2afd1e=_0x4cf5bc;return request(_0x2afd1e('0x20'),{'options':{'where':{'id':_0x3fafaf},'attributes':[_0x2afd1e('0xb')]}});},exports[_0x4cf5bc('0x11')]=function(_0x3a7ded){const _0x39ebc6=_0x4cf5bc;return request('ShowInterval',{'options':{'raw':![],'where':{'id':_0x3a7ded},'include':[{'model':_0x39ebc6('0x15'),'as':_0x39ebc6('0x33')}]}});},exports[_0x4cf5bc('0x21')]=function(_0x36540d){const _0x3a4de8=_0x4cf5bc;return request(_0x3a4de8('0x29'),{'options':{'where':{'id':_0x36540d},'attributes':['id',_0x3a4de8('0x2f')]}});},exports[_0x4cf5bc('0x2e')]=function(_0x3dc779){return request('CreateSmsMessage',{'body':_0x3dc779});},exports[_0x4cf5bc('0x34')]=function(_0x19fd54){const _0x23824c=_0x4cf5bc;return request(_0x23824c('0x7'),{'body':_0x19fd54});},exports[_0x4cf5bc('0x2d')]=function(_0x4b3d45){const _0x3bd640=_0x4cf5bc;return request(_0x3bd640('0x36'),{'body':_[_0x3bd640('0x35')](_0x4b3d45,{'project_name':_0x4b3d45[_0x3bd640('0x1')],'prev_project_name':_0x4b3d45['arg_2']||'','is_subproject':_0x4b3d45[_0x3bd640('0xc')]?!![]:![],'leaveAt':moment()[_0x3bd640('0x12')]('YYYY-MM-DD\x20HH:mm:ss')})});},exports['createSquareRecording']=function(_0x5da2be){const _0x3443b7=_0x4cf5bc;return request(_0x3443b7('0x1f'),{'body':_0x5da2be});},exports[_0x4cf5bc('0x27')]=function(_0x1f1c67){const _0x1222ea=_0x4cf5bc;return request(_0x1222ea('0x24'),{'body':_0x1f1c67});},exports['createCmContact']=function(_0x3c27d4){const _0x481b4e=_0x4cf5bc;return request('ShowCmHopper',{'options':{'raw':![],'where':{'phone':_0x3c27d4[_0x481b4e('0x1e')],'ListId':_0x3c27d4[_0x481b4e('0x2c')]}}})['then'](function(_0x2db7bd){const _0xf87c6c=_0x481b4e;if(_0x2db7bd)return _0x2db7bd;return request(_0xf87c6c('0x28'),{'body':_0x3c27d4});});},exports[_0x4cf5bc('0x9')]=function(_0x1dd8c0){const _0x4d2fca=_0x4cf5bc;return request(_0x4d2fca('0x13'),{'options':{'where':{'id':_0x1dd8c0},'attributes':[_0x4d2fca('0x2f')]}});},exports[_0x4cf5bc('0x14')]=function(_0x45f98f,_0x36505c){const _0x36ddd5=_0x4cf5bc;return request(_0x36ddd5('0x32'),{'body':{'interface':_0x36505c},'options':{'where':_0x45f98f}});},exports['agentPause']=function(_0x5397a7,_0x2650b1,_0x5452ab){const _0x1651ff=_0x4cf5bc;return request(_0x1651ff('0x16'),{'body':{'type':_0x2650b1,'uniqueid':_0x5452ab},'options':{'where':_0x5397a7}});},exports[_0x4cf5bc('0x1a')]=function(_0x27b95e){const _0x8c1f11=_0x4cf5bc;return request(_0x8c1f11('0x23'),{'body':{},'options':{'where':_0x27b95e}});},exports[_0x4cf5bc('0x26')]=function(_0x3ab44f){const _0xb0cdc0=_0x4cf5bc;return request(_0xb0cdc0('0x2a'),{'body':{},'options':{'where':_0x3ab44f}});};