Built motion from commit c116dc8b.|2.6.30
[motion2.git] / server / services / agi / rpc / index.js
index eaa1805..387ad97 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbe22=['MailServerOut','CloudProvider','getSquareProjectById','getVoiceQueueById','getVariableById','ShowVariable','dsn','getUserById','ShowUser','getContactByPhone','GetContactByPhone','phone','getTrunkById','ShowSound','save_name','getIntervalById','getSmsAccountById','ShowSmsAccount','createSmsMessage','CreateSmsMessage','createSquareDetailsReport','CreateSquareDetailsReport','createSquareReport','CreateSquareReport','merge','arg_1','format','YYYY-MM-DD\x20HH:mm:ss','CreateSquareRecording','createSquareMessage','CreateSquareMessage','createCmContact','ShowCmHopper','ListId','getPauseById','ShowPause','agentLogin','LoginUser','agentPause','PauseUser','agentUnpause','UnpauseUser','LogoutUser','lodash','moment','http','request','then','error','result','catch','GetSquareProjects','name','production','getSquareProject','ShowSquareProject','getMailAccountById','ShowMailAccount'];(function(_0x657e67,_0x518f58){var _0x29e86d=function(_0x3afc81){while(--_0x3afc81){_0x657e67['push'](_0x657e67['shift']());}};_0x29e86d(++_0x518f58);}(_0xbe22,0x1c1));var _0x2be2=function(_0xd930b0,_0x29ce84){_0xd930b0=_0xd930b0-0x0;var _0x5d435d=_0xbe22[_0xd930b0];return _0x5d435d;};'use strict';var _=require(_0x2be2('0x0'));var moment=require(_0x2be2('0x1'));var jayson=require('jayson/promise');var client=jayson['client'][_0x2be2('0x2')]({'port':0x2329});function request(_0x20a08c,_0xf16dc5){return new Promise(function(_0x409a41,_0x1729d7){return client[_0x2be2('0x3')](_0x20a08c,_0xf16dc5)[_0x2be2('0x4')](function(_0x2030e3){if(_0x2030e3[_0x2be2('0x5')]){return _0x1729d7(_0x2030e3[_0x2be2('0x5')]['message']);}else{return _0x409a41(_0x2030e3[_0x2be2('0x6')]);}})[_0x2be2('0x7')](function(_0x12d9b4){return _0x1729d7(_0x12d9b4);});});}exports['getSquareProjects']=function(){return request(_0x2be2('0x8'),{'options':{'raw':![],'attributes':['id',_0x2be2('0x9'),_0x2be2('0xa')]}});};exports[_0x2be2('0xb')]=function(_0x40d8b2){return request(_0x2be2('0xc'),{'options':{'raw':![],'where':{'name':_0x40d8b2},'attributes':[_0x2be2('0xa')]}});};exports[_0x2be2('0xd')]=function(_0x4f3ec4){return request(_0x2be2('0xe'),{'options':{'raw':![],'where':{'id':_0x4f3ec4},'include':[{'model':_0x2be2('0xf'),'as':'Smtp','include':[{'model':_0x2be2('0x10'),'as':_0x2be2('0x10')}]}],'attributes':['id',_0x2be2('0x9'),'email'],'smtp':!![]}});};exports[_0x2be2('0x11')]=function(_0xaacc53){return request('ShowSquareProject',{'options':{'where':{'id':_0xaacc53},'attributes':[_0x2be2('0x9')]}});};exports[_0x2be2('0x12')]=function(_0x1a3ae0){return request('ShowVoiceQueue',{'options':{'where':{'id':_0x1a3ae0},'attributes':[_0x2be2('0x9')]}});};exports[_0x2be2('0x13')]=function(_0x528d4e){return request(_0x2be2('0x14'),{'options':{'where':{'id':_0x528d4e},'attributes':[_0x2be2('0x9')]}});};exports['getSquareOdbcById']=function(_0x2fd029){return request('ShowSquareOdbc',{'options':{'where':{'id':_0x2fd029},'attributes':[_0x2be2('0x15')]}});};exports[_0x2be2('0x16')]=function(_0x564371){return request(_0x2be2('0x17'),{'options':{'where':{'id':_0x564371},'attributes':[_0x2be2('0x9')]}});};exports[_0x2be2('0x18')]=function(_0x504b07){return request(_0x2be2('0x19'),{'options':{'where':{'phone':_0x504b07[_0x2be2('0x1a')]},'attributes':['id']}});};exports[_0x2be2('0x1b')]=function(_0x59e2c6){return request('ShowTrunk',{'options':{'where':{'id':_0x59e2c6},'attributes':[_0x2be2('0x9')]}});};exports['getSoundById']=function(_0x1bb818){return request(_0x2be2('0x1c'),{'options':{'where':{'id':_0x1bb818},'attributes':[_0x2be2('0x1d')]}});};exports[_0x2be2('0x1e')]=function(_0x173862){return request('ShowInterval',{'options':{'raw':![],'where':{'id':_0x173862},'include':[{'model':'Interval','as':'Intervals'}]}});};exports[_0x2be2('0x1f')]=function(_0x155755){return request(_0x2be2('0x20'),{'options':{'where':{'id':_0x155755},'attributes':['id',_0x2be2('0x9')]}});};exports[_0x2be2('0x21')]=function(_0x16a512){return request(_0x2be2('0x22'),{'body':_0x16a512});};exports[_0x2be2('0x23')]=function(_0x4ef62c){return request(_0x2be2('0x24'),{'body':_0x4ef62c});};exports[_0x2be2('0x25')]=function(_0x55fd4c){return request(_0x2be2('0x26'),{'body':_[_0x2be2('0x27')](_0x55fd4c,{'project_name':_0x55fd4c[_0x2be2('0x28')],'prev_project_name':_0x55fd4c['arg_2']||'','is_subproject':_0x55fd4c['arg_2']?!![]:![],'leaveAt':moment()[_0x2be2('0x29')](_0x2be2('0x2a'))})});};exports['createSquareRecording']=function(_0x4ccee6){return request(_0x2be2('0x2b'),{'body':_0x4ccee6});};exports[_0x2be2('0x2c')]=function(_0x594b05){return request(_0x2be2('0x2d'),{'body':_0x594b05});};exports[_0x2be2('0x2e')]=function(_0x42015b){return request(_0x2be2('0x2f'),{'options':{'raw':![],'where':{'phone':_0x42015b[_0x2be2('0x1a')],'ListId':_0x42015b[_0x2be2('0x30')]}}})[_0x2be2('0x4')](function(_0x26658d){if(_0x26658d){return _0x26658d;}return request('CreateCmContact',{'body':_0x42015b});});};exports[_0x2be2('0x31')]=function(_0x36dc2d){return request(_0x2be2('0x32'),{'options':{'where':{'id':_0x36dc2d},'attributes':['name']}});};exports[_0x2be2('0x33')]=function(_0x4fb592,_0x25c01c){return request(_0x2be2('0x34'),{'body':{'interface':_0x25c01c},'options':{'where':_0x4fb592}});};exports[_0x2be2('0x35')]=function(_0x397429,_0x273696,_0x3cb4f3){return request(_0x2be2('0x36'),{'body':{'type':_0x273696,'uniqueid':_0x3cb4f3},'options':{'where':_0x397429}});};exports[_0x2be2('0x37')]=function(_0x4ac200){return request(_0x2be2('0x38'),{'body':{},'options':{'where':_0x4ac200}});};exports['agentLogout']=function(_0x2bc93f){return request(_0x2be2('0x39'),{'body':{},'options':{'where':_0x2bc93f}});};
\ No newline at end of file
+var _0x6fad=['phone','CreateCmContact','getPauseById','ShowPause','agentLogin','LoginUser','agentPause','PauseUser','agentUnpause','UnpauseUser','agentLogout','LogoutUser','lodash','moment','jayson/promise','client','request','then','error','message','result','GetSquareProjects','name','production','getSquareProject','getMailAccountById','ShowMailAccount','MailServerOut','Smtp','ShowSquareProject','getVoiceQueueById','ShowVoiceQueue','getVariableById','getSquareOdbcById','ShowSquareOdbc','getContactByPhone','GetContactByPhone','getTrunkById','ShowTrunk','getSoundById','ShowSound','save_name','getIntervalById','ShowInterval','Interval','Intervals','getSmsAccountById','ShowSmsAccount','createSmsMessage','CreateSquareDetailsReport','createSquareReport','CreateSquareReport','merge','arg_2','YYYY-MM-DD\x20HH:mm:ss','createSquareRecording','createSquareMessage','CreateSquareMessage','createCmContact','ShowCmHopper'];(function(_0x1a9fac,_0x50bad7){var _0x3183ba=function(_0x30e727){while(--_0x30e727){_0x1a9fac['push'](_0x1a9fac['shift']());}};_0x3183ba(++_0x50bad7);}(_0x6fad,0x174));var _0xd6fa=function(_0x4b4865,_0xb43449){_0x4b4865=_0x4b4865-0x0;var _0x190dc2=_0x6fad[_0x4b4865];return _0x190dc2;};'use strict';var _=require(_0xd6fa('0x0'));var moment=require(_0xd6fa('0x1'));var jayson=require(_0xd6fa('0x2'));var client=jayson[_0xd6fa('0x3')]['http']({'port':0x2329});function request(_0x2f5f9b,_0x4ae415){return new Promise(function(_0x3e08a3,_0x48f433){return client[_0xd6fa('0x4')](_0x2f5f9b,_0x4ae415)[_0xd6fa('0x5')](function(_0x58325c){if(_0x58325c[_0xd6fa('0x6')]){return _0x48f433(_0x58325c[_0xd6fa('0x6')][_0xd6fa('0x7')]);}else{return _0x3e08a3(_0x58325c[_0xd6fa('0x8')]);}})['catch'](function(_0x1d2aaa){return _0x48f433(_0x1d2aaa);});});}exports['getSquareProjects']=function(){return request(_0xd6fa('0x9'),{'options':{'raw':![],'attributes':['id',_0xd6fa('0xa'),_0xd6fa('0xb')]}});};exports[_0xd6fa('0xc')]=function(_0x331241){return request('ShowSquareProject',{'options':{'raw':![],'where':{'name':_0x331241},'attributes':['production']}});};exports[_0xd6fa('0xd')]=function(_0xd093ff){return request(_0xd6fa('0xe'),{'options':{'raw':![],'where':{'id':_0xd093ff},'include':[{'model':_0xd6fa('0xf'),'as':_0xd6fa('0x10'),'include':[{'model':'CloudProvider','as':'CloudProvider'}]}],'attributes':['id',_0xd6fa('0xa'),'email'],'smtp':!![]}});};exports['getSquareProjectById']=function(_0x33ee61){return request(_0xd6fa('0x11'),{'options':{'where':{'id':_0x33ee61},'attributes':[_0xd6fa('0xa')]}});};exports[_0xd6fa('0x12')]=function(_0x3cd6fa){return request(_0xd6fa('0x13'),{'options':{'where':{'id':_0x3cd6fa},'attributes':[_0xd6fa('0xa')]}});};exports[_0xd6fa('0x14')]=function(_0x45f777){return request('ShowVariable',{'options':{'where':{'id':_0x45f777},'attributes':[_0xd6fa('0xa')]}});};exports[_0xd6fa('0x15')]=function(_0x3651ed){return request(_0xd6fa('0x16'),{'options':{'where':{'id':_0x3651ed},'attributes':['dsn']}});};exports['getUserById']=function(_0x59a501){return request('ShowUser',{'options':{'where':{'id':_0x59a501},'attributes':['name']}});};exports[_0xd6fa('0x17')]=function(_0x51fbd0){return request(_0xd6fa('0x18'),{'options':{'where':{'phone':_0x51fbd0['phone']},'attributes':['id']}});};exports[_0xd6fa('0x19')]=function(_0x133069){return request(_0xd6fa('0x1a'),{'options':{'where':{'id':_0x133069},'attributes':[_0xd6fa('0xa')]}});};exports[_0xd6fa('0x1b')]=function(_0x1b1b8d){return request(_0xd6fa('0x1c'),{'options':{'where':{'id':_0x1b1b8d},'attributes':[_0xd6fa('0x1d')]}});};exports[_0xd6fa('0x1e')]=function(_0x814130){return request(_0xd6fa('0x1f'),{'options':{'raw':![],'where':{'id':_0x814130},'include':[{'model':_0xd6fa('0x20'),'as':_0xd6fa('0x21')}]}});};exports[_0xd6fa('0x22')]=function(_0x2f1f4e){return request(_0xd6fa('0x23'),{'options':{'where':{'id':_0x2f1f4e},'attributes':['id',_0xd6fa('0xa')]}});};exports[_0xd6fa('0x24')]=function(_0x3fbab3){return request('CreateSmsMessage',{'body':_0x3fbab3});};exports['createSquareDetailsReport']=function(_0x3d3d7b){return request(_0xd6fa('0x25'),{'body':_0x3d3d7b});};exports[_0xd6fa('0x26')]=function(_0x1eaf9a){return request(_0xd6fa('0x27'),{'body':_[_0xd6fa('0x28')](_0x1eaf9a,{'project_name':_0x1eaf9a['arg_1'],'prev_project_name':_0x1eaf9a[_0xd6fa('0x29')]||'','is_subproject':_0x1eaf9a[_0xd6fa('0x29')]?!![]:![],'leaveAt':moment()['format'](_0xd6fa('0x2a'))})});};exports[_0xd6fa('0x2b')]=function(_0x44d8a7){return request('CreateSquareRecording',{'body':_0x44d8a7});};exports[_0xd6fa('0x2c')]=function(_0x1be5fd){return request(_0xd6fa('0x2d'),{'body':_0x1be5fd});};exports[_0xd6fa('0x2e')]=function(_0x3c7a9e){return request(_0xd6fa('0x2f'),{'options':{'raw':![],'where':{'phone':_0x3c7a9e[_0xd6fa('0x30')],'ListId':_0x3c7a9e['ListId']}}})[_0xd6fa('0x5')](function(_0x4c1104){if(_0x4c1104){return _0x4c1104;}return request(_0xd6fa('0x31'),{'body':_0x3c7a9e});});};exports[_0xd6fa('0x32')]=function(_0x4be120){return request(_0xd6fa('0x33'),{'options':{'where':{'id':_0x4be120},'attributes':[_0xd6fa('0xa')]}});};exports[_0xd6fa('0x34')]=function(_0x3a2c56,_0x36e1e6){return request(_0xd6fa('0x35'),{'body':{'interface':_0x36e1e6},'options':{'where':_0x3a2c56}});};exports[_0xd6fa('0x36')]=function(_0x1e3de4,_0x3d7886,_0x578ee2){return request(_0xd6fa('0x37'),{'body':{'type':_0x3d7886,'uniqueid':_0x578ee2},'options':{'where':_0x1e3de4}});};exports[_0xd6fa('0x38')]=function(_0x581bf2){return request(_0xd6fa('0x39'),{'body':{},'options':{'where':_0x581bf2}});};exports[_0xd6fa('0x3a')]=function(_0x2dd14e){return request(_0xd6fa('0x3b'),{'body':{},'options':{'where':_0x2dd14e}});};
\ No newline at end of file