Built motion from commit ecb45b58.|2.6.31
[motion2.git] / server / services / agi / rpc / index.js
index 8a8c434..a9a49df 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9099=['getSoundById','ShowSound','save_name','getIntervalById','ShowInterval','Intervals','getSmsAccountById','createSmsMessage','CreateSmsMessage','createSquareDetailsReport','createSquareReport','CreateSquareReport','merge','arg_2','format','YYYY-MM-DD\x20HH:mm:ss','CreateSquareRecording','createSquareMessage','createCmContact','ShowCmHopper','ListId','getPauseById','ShowPause','agentLogin','LoginUser','agentPause','PauseUser','agentUnpause','agentLogout','lodash','jayson/promise','client','http','request','then','error','message','result','getSquareProject','ShowSquareProject','production','getMailAccountById','ShowMailAccount','Smtp','CloudProvider','name','email','getSquareProjectById','getVoiceQueueById','ShowVoiceQueue','ShowSquareOdbc','dsn','ShowUser','getContactByPhone','GetContactByPhone','phone','ShowTrunk'];(function(_0x2cfa09,_0x1ffa9a){var _0x5eafc4=function(_0x5c46f3){while(--_0x5c46f3){_0x2cfa09['push'](_0x2cfa09['shift']());}};_0x5eafc4(++_0x1ffa9a);}(_0x9099,0x1ac));var _0x9909=function(_0x2d344f,_0x25fa84){_0x2d344f=_0x2d344f-0x0;var _0x2e796b=_0x9099[_0x2d344f];return _0x2e796b;};'use strict';var _=require(_0x9909('0x0'));var moment=require('moment');var jayson=require(_0x9909('0x1'));var client=jayson[_0x9909('0x2')][_0x9909('0x3')]({'port':0x2329});function request(_0x2524d3,_0x3fd4b4){return new Promise(function(_0x34aabc,_0x2168ff){return client[_0x9909('0x4')](_0x2524d3,_0x3fd4b4)[_0x9909('0x5')](function(_0x25cf23){if(_0x25cf23[_0x9909('0x6')]){return _0x2168ff(_0x25cf23[_0x9909('0x6')][_0x9909('0x7')]);}else{return _0x34aabc(_0x25cf23[_0x9909('0x8')]);}})['catch'](function(_0x6d755a){return _0x2168ff(_0x6d755a);});});}exports['getSquareProjects']=function(){return request('GetSquareProjects',{'options':{'raw':![],'attributes':['id','name','production']}});};exports[_0x9909('0x9')]=function(_0x592725){return request(_0x9909('0xa'),{'options':{'raw':![],'where':{'name':_0x592725},'attributes':[_0x9909('0xb')]}});};exports[_0x9909('0xc')]=function(_0x514573){return request(_0x9909('0xd'),{'options':{'raw':![],'where':{'id':_0x514573},'include':[{'model':'MailServerOut','as':_0x9909('0xe'),'include':[{'model':_0x9909('0xf'),'as':_0x9909('0xf')}]}],'attributes':['id',_0x9909('0x10'),_0x9909('0x11')],'smtp':!![]}});};exports[_0x9909('0x12')]=function(_0x22224a){return request(_0x9909('0xa'),{'options':{'where':{'id':_0x22224a},'attributes':[_0x9909('0x10')]}});};exports[_0x9909('0x13')]=function(_0x1c2668){return request(_0x9909('0x14'),{'options':{'where':{'id':_0x1c2668},'attributes':[_0x9909('0x10')]}});};exports['getVariableById']=function(_0x33a8e3){return request('ShowVariable',{'options':{'where':{'id':_0x33a8e3},'attributes':[_0x9909('0x10')]}});};exports['getSquareOdbcById']=function(_0x1a9c97){return request(_0x9909('0x15'),{'options':{'where':{'id':_0x1a9c97},'attributes':[_0x9909('0x16')]}});};exports['getUserById']=function(_0x9a16a6){return request(_0x9909('0x17'),{'options':{'where':{'id':_0x9a16a6},'attributes':[_0x9909('0x10')]}});};exports[_0x9909('0x18')]=function(_0x1106e5){return request(_0x9909('0x19'),{'options':{'where':{'phone':_0x1106e5[_0x9909('0x1a')]},'attributes':['id']}});};exports['getTrunkById']=function(_0x1b038f){return request(_0x9909('0x1b'),{'options':{'where':{'id':_0x1b038f},'attributes':['name']}});};exports[_0x9909('0x1c')]=function(_0x446ebb){return request(_0x9909('0x1d'),{'options':{'where':{'id':_0x446ebb},'attributes':[_0x9909('0x1e')]}});};exports[_0x9909('0x1f')]=function(_0x222cd9){return request(_0x9909('0x20'),{'options':{'raw':![],'where':{'id':_0x222cd9},'include':[{'model':'Interval','as':_0x9909('0x21')}]}});};exports[_0x9909('0x22')]=function(_0x4a626b){return request('ShowSmsAccount',{'options':{'where':{'id':_0x4a626b},'attributes':['id',_0x9909('0x10')]}});};exports[_0x9909('0x23')]=function(_0xdd5088){return request(_0x9909('0x24'),{'body':_0xdd5088});};exports[_0x9909('0x25')]=function(_0x59c5c9){return request('CreateSquareDetailsReport',{'body':_0x59c5c9});};exports[_0x9909('0x26')]=function(_0x25007c){return request(_0x9909('0x27'),{'body':_[_0x9909('0x28')](_0x25007c,{'project_name':_0x25007c['arg_1'],'prev_project_name':_0x25007c[_0x9909('0x29')]||'','is_subproject':_0x25007c[_0x9909('0x29')]?!![]:![],'leaveAt':moment()[_0x9909('0x2a')](_0x9909('0x2b'))})});};exports['createSquareRecording']=function(_0x405c5e){return request(_0x9909('0x2c'),{'body':_0x405c5e});};exports[_0x9909('0x2d')]=function(_0x14ec4b){return request('CreateSquareMessage',{'body':_0x14ec4b});};exports[_0x9909('0x2e')]=function(_0x175d52){return request(_0x9909('0x2f'),{'options':{'raw':![],'where':{'phone':_0x175d52[_0x9909('0x1a')],'ListId':_0x175d52[_0x9909('0x30')]}}})[_0x9909('0x5')](function(_0x427530){if(_0x427530){return _0x427530;}return request('CreateCmContact',{'body':_0x175d52});});};exports[_0x9909('0x31')]=function(_0x3a3f4f){return request(_0x9909('0x32'),{'options':{'where':{'id':_0x3a3f4f},'attributes':[_0x9909('0x10')]}});};exports[_0x9909('0x33')]=function(_0x519066,_0x4245eb){return request(_0x9909('0x34'),{'body':{'interface':_0x4245eb},'options':{'where':_0x519066}});};exports[_0x9909('0x35')]=function(_0x3e599a,_0xc1bd06,_0x222dd1){return request(_0x9909('0x36'),{'body':{'type':_0xc1bd06,'uniqueid':_0x222dd1},'options':{'where':_0x3e599a}});};exports[_0x9909('0x37')]=function(_0x59886b){return request('UnpauseUser',{'body':{},'options':{'where':_0x59886b}});};exports[_0x9909('0x38')]=function(_0x1afb2f){return request('LogoutUser',{'body':{},'options':{'where':_0x1afb2f}});};
\ No newline at end of file
+var _0x5fd1=['MailServerOut','Smtp','CloudProvider','name','email','getSquareProjectById','ShowVoiceQueue','getVariableById','ShowVariable','getSquareOdbcById','dsn','getContactByPhone','phone','getTrunkById','ShowTrunk','getSoundById','ShowSound','save_name','getIntervalById','Intervals','getSmsAccountById','ShowSmsAccount','createSmsMessage','createSquareDetailsReport','CreateSquareDetailsReport','merge','arg_1','arg_2','format','YYYY-MM-DD\x20HH:mm:ss','createSquareRecording','CreateSquareRecording','CreateSquareMessage','createCmContact','ShowCmHopper','ListId','then','CreateCmContact','getPauseById','ShowPause','agentPause','PauseUser','agentUnpause','UnpauseUser','agentLogout','LogoutUser','lodash','jayson/promise','client','http','request','error','message','result','getSquareProjects','GetSquareProjects','production','ShowSquareProject','ShowMailAccount'];(function(_0x4f5843,_0x19fd24){var _0x3627e5=function(_0x5e6272){while(--_0x5e6272){_0x4f5843['push'](_0x4f5843['shift']());}};_0x3627e5(++_0x19fd24);}(_0x5fd1,0x155));var _0x15fd=function(_0x4cc97a,_0x3665fc){_0x4cc97a=_0x4cc97a-0x0;var _0x941ddd=_0x5fd1[_0x4cc97a];return _0x941ddd;};'use strict';var _=require(_0x15fd('0x0'));var moment=require('moment');var jayson=require(_0x15fd('0x1'));var client=jayson[_0x15fd('0x2')][_0x15fd('0x3')]({'port':0x2329});function request(_0x50fc5a,_0x5d2d77){return new Promise(function(_0x370d34,_0x3138f3){return client[_0x15fd('0x4')](_0x50fc5a,_0x5d2d77)['then'](function(_0x1e3b97){if(_0x1e3b97[_0x15fd('0x5')]){return _0x3138f3(_0x1e3b97[_0x15fd('0x5')][_0x15fd('0x6')]);}else{return _0x370d34(_0x1e3b97[_0x15fd('0x7')]);}})['catch'](function(_0x210e90){return _0x3138f3(_0x210e90);});});}exports[_0x15fd('0x8')]=function(){return request(_0x15fd('0x9'),{'options':{'raw':![],'attributes':['id','name',_0x15fd('0xa')]}});};exports['getSquareProject']=function(_0x3dfdbb){return request(_0x15fd('0xb'),{'options':{'raw':![],'where':{'name':_0x3dfdbb},'attributes':['production']}});};exports['getMailAccountById']=function(_0x4ebde5){return request(_0x15fd('0xc'),{'options':{'raw':![],'where':{'id':_0x4ebde5},'include':[{'model':_0x15fd('0xd'),'as':_0x15fd('0xe'),'include':[{'model':_0x15fd('0xf'),'as':_0x15fd('0xf')}]}],'attributes':['id',_0x15fd('0x10'),_0x15fd('0x11')],'smtp':!![]}});};exports[_0x15fd('0x12')]=function(_0x459fa4){return request('ShowSquareProject',{'options':{'where':{'id':_0x459fa4},'attributes':['name']}});};exports['getVoiceQueueById']=function(_0x3fda60){return request(_0x15fd('0x13'),{'options':{'where':{'id':_0x3fda60},'attributes':[_0x15fd('0x10')]}});};exports[_0x15fd('0x14')]=function(_0x44eae6){return request(_0x15fd('0x15'),{'options':{'where':{'id':_0x44eae6},'attributes':[_0x15fd('0x10')]}});};exports[_0x15fd('0x16')]=function(_0x5aae13){return request('ShowSquareOdbc',{'options':{'where':{'id':_0x5aae13},'attributes':[_0x15fd('0x17')]}});};exports['getUserById']=function(_0x7afe9c){return request('ShowUser',{'options':{'where':{'id':_0x7afe9c},'attributes':[_0x15fd('0x10')]}});};exports[_0x15fd('0x18')]=function(_0x855bae){return request('GetContactByPhone',{'options':{'where':{'phone':_0x855bae[_0x15fd('0x19')]},'attributes':['id']}});};exports[_0x15fd('0x1a')]=function(_0x8b7b9e){return request(_0x15fd('0x1b'),{'options':{'where':{'id':_0x8b7b9e},'attributes':[_0x15fd('0x10')]}});};exports[_0x15fd('0x1c')]=function(_0x3761db){return request(_0x15fd('0x1d'),{'options':{'where':{'id':_0x3761db},'attributes':[_0x15fd('0x1e')]}});};exports[_0x15fd('0x1f')]=function(_0x3ff307){return request('ShowInterval',{'options':{'raw':![],'where':{'id':_0x3ff307},'include':[{'model':'Interval','as':_0x15fd('0x20')}]}});};exports[_0x15fd('0x21')]=function(_0x252a1c){return request(_0x15fd('0x22'),{'options':{'where':{'id':_0x252a1c},'attributes':['id',_0x15fd('0x10')]}});};exports[_0x15fd('0x23')]=function(_0x2073da){return request('CreateSmsMessage',{'body':_0x2073da});};exports[_0x15fd('0x24')]=function(_0x2d19ac){return request(_0x15fd('0x25'),{'body':_0x2d19ac});};exports['createSquareReport']=function(_0x27528f){return request('CreateSquareReport',{'body':_[_0x15fd('0x26')](_0x27528f,{'project_name':_0x27528f[_0x15fd('0x27')],'prev_project_name':_0x27528f[_0x15fd('0x28')]||'','is_subproject':_0x27528f['arg_2']?!![]:![],'leaveAt':moment()[_0x15fd('0x29')](_0x15fd('0x2a'))})});};exports[_0x15fd('0x2b')]=function(_0x5d4789){return request(_0x15fd('0x2c'),{'body':_0x5d4789});};exports['createSquareMessage']=function(_0x3d33cd){return request(_0x15fd('0x2d'),{'body':_0x3d33cd});};exports[_0x15fd('0x2e')]=function(_0x27d2c4){return request(_0x15fd('0x2f'),{'options':{'raw':![],'where':{'phone':_0x27d2c4[_0x15fd('0x19')],'ListId':_0x27d2c4[_0x15fd('0x30')]}}})[_0x15fd('0x31')](function(_0x4590a1){if(_0x4590a1){return _0x4590a1;}return request(_0x15fd('0x32'),{'body':_0x27d2c4});});};exports[_0x15fd('0x33')]=function(_0x5ca676){return request(_0x15fd('0x34'),{'options':{'where':{'id':_0x5ca676},'attributes':[_0x15fd('0x10')]}});};exports['agentLogin']=function(_0x39e744,_0xf6ddbe){return request('LoginUser',{'body':{'interface':_0xf6ddbe},'options':{'where':_0x39e744}});};exports[_0x15fd('0x35')]=function(_0x197d15,_0x5dc5fe,_0x104fbd){return request(_0x15fd('0x36'),{'body':{'type':_0x5dc5fe,'uniqueid':_0x104fbd},'options':{'where':_0x197d15}});};exports[_0x15fd('0x37')]=function(_0x476828){return request(_0x15fd('0x38'),{'body':{},'options':{'where':_0x476828}});};exports[_0x15fd('0x39')]=function(_0x49cb6a){return request(_0x15fd('0x3a'),{'body':{},'options':{'where':_0x49cb6a}});};
\ No newline at end of file