Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / services / agi / rpc / index.js
index 5109657..9d00278 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf958=['util','jayson/promise','client','http','request','then','error','message','result','catch','production','getMailAccountById','ShowMailAccount','Smtp','name','getSquareProjectById','ShowSquareProject','ShowVariable','getSquareOdbcById','ShowSquareOdbc','getUserById','ShowUser','log','rpcreq','GetContactByPhone','getTrunkById','getSoundById','ShowSound','save_name','getIntervalById','ShowInterval','Interval','getSmsAccountById','ShowSmsAccount','createSmsMessage','CreateSmsMessage','createSquareDetailsReport','CreateSquareDetailsReport','createSquareReport','CreateSquareReport','merge','arg_2','YYYY-MM-DD\x20HH:mm:ss','createSquareMessage','CreateSquareMessage','createCmContact','ShowCmHopper','ListId','getPauseById','ShowPause','LoginUser','PauseUser','agentUnpause','UnpauseUser','agentLogout','LogoutUser'];(function(_0x249e5c,_0x35cf37){var _0x59a706=function(_0x14b673){while(--_0x14b673){_0x249e5c['push'](_0x249e5c['shift']());}};_0x59a706(++_0x35cf37);}(_0xf958,0x1c0));var _0x8f95=function(_0x5e7617,_0x3a10e1){_0x5e7617=_0x5e7617-0x0;var _0x341f5d=_0xf958[_0x5e7617];return _0x341f5d;};'use strict';var BPromise=require('bluebird');var moment=require('moment');var _=require('lodash');var util=require(_0x8f95('0x0'));var jayson=require(_0x8f95('0x1'));var client=jayson[_0x8f95('0x2')][_0x8f95('0x3')]({'port':0x2329});function request(_0x375fac,_0x37eb35){return new BPromise(function(_0x5e82fc,_0x2a4dcd){return client[_0x8f95('0x4')](_0x375fac,_0x37eb35)[_0x8f95('0x5')](function(_0x25f498){if(_0x25f498[_0x8f95('0x6')]){return _0x2a4dcd(_0x25f498[_0x8f95('0x6')][_0x8f95('0x7')]);}else{return _0x5e82fc(_0x25f498[_0x8f95('0x8')]);}})[_0x8f95('0x9')](function(_0x29055f){return _0x2a4dcd(_0x29055f);});});}exports['getSquareProject']=function(_0x2cce47){return request('ShowSquareProject',{'options':{'raw':![],'where':{'name':_0x2cce47},'attributes':[_0x8f95('0xa')]}});};exports[_0x8f95('0xb')]=function(_0x21ad34){return request(_0x8f95('0xc'),{'options':{'raw':![],'where':{'id':_0x21ad34},'include':[{'model':'MailServerOut','as':_0x8f95('0xd')}],'attributes':['id',_0x8f95('0xe'),'email']}});};exports[_0x8f95('0xf')]=function(_0x95ece9){return request(_0x8f95('0x10'),{'options':{'where':{'id':_0x95ece9},'attributes':[_0x8f95('0xe')]}});};exports['getVoiceQueueById']=function(_0x381fa2){return request('ShowVoiceQueue',{'options':{'where':{'id':_0x381fa2},'attributes':[_0x8f95('0xe')]}});};exports['getVariableById']=function(_0x19d0fc){return request(_0x8f95('0x11'),{'options':{'where':{'id':_0x19d0fc},'attributes':['name']}});};exports[_0x8f95('0x12')]=function(_0x4af84f){return request(_0x8f95('0x13'),{'options':{'where':{'id':_0x4af84f},'attributes':['dsn']}});};exports[_0x8f95('0x14')]=function(_0xe7a992){return request(_0x8f95('0x15'),{'options':{'where':{'id':_0xe7a992},'attributes':[_0x8f95('0xe')]}});};exports['getContactByPhone']=function(_0x242b26){console[_0x8f95('0x16')](_0x8f95('0x17'),_0x242b26);return request(_0x8f95('0x18'),{'options':{'where':{'phone':_0x242b26['phone']},'attributes':['id']}});};exports[_0x8f95('0x19')]=function(_0x216e53){return request('ShowTrunk',{'options':{'where':{'id':_0x216e53},'attributes':[_0x8f95('0xe')]}});};exports[_0x8f95('0x1a')]=function(_0x5e4deb){return request(_0x8f95('0x1b'),{'options':{'where':{'id':_0x5e4deb},'attributes':[_0x8f95('0x1c')]}});};exports[_0x8f95('0x1d')]=function(_0x353c14){return request(_0x8f95('0x1e'),{'options':{'raw':![],'where':{'id':_0x353c14},'include':[{'model':_0x8f95('0x1f'),'as':'Intervals'}]}});};exports[_0x8f95('0x20')]=function(_0xc99d55){return request(_0x8f95('0x21'),{'options':{'where':{'id':_0xc99d55},'attributes':['id',_0x8f95('0xe')]}});};exports[_0x8f95('0x22')]=function(_0x587520){return request(_0x8f95('0x23'),{'body':_0x587520});};exports[_0x8f95('0x24')]=function(_0x3f083d){return request(_0x8f95('0x25'),{'body':_0x3f083d});};exports[_0x8f95('0x26')]=function(_0x32b4b7){return request(_0x8f95('0x27'),{'body':_[_0x8f95('0x28')](_0x32b4b7,{'project_name':_0x32b4b7['arg_1'],'prev_project_name':_0x32b4b7[_0x8f95('0x29')]||'','is_subproject':_0x32b4b7[_0x8f95('0x29')]?!![]:![],'leaveAt':moment()['format'](_0x8f95('0x2a'))})});};exports['createSquareRecording']=function(_0x2df6bd){return request('CreateSquareRecording',{'body':_0x2df6bd});};exports[_0x8f95('0x2b')]=function(_0x65a61d){return request(_0x8f95('0x2c'),{'body':_0x65a61d});};exports[_0x8f95('0x2d')]=function(_0x129117){return request(_0x8f95('0x2e'),{'options':{'raw':![],'where':{'phone':_0x129117['phone'],'ListId':_0x129117[_0x8f95('0x2f')]}}})[_0x8f95('0x5')](function(_0x3062d8){if(_0x3062d8){return _0x3062d8;}return request('CreateCmContact',{'body':_0x129117});});};exports[_0x8f95('0x30')]=function(_0x243adc){return request(_0x8f95('0x31'),{'options':{'where':{'id':_0x243adc},'attributes':['name']}});};exports['agentLogin']=function(_0x4958b3,_0x3c5589){return request(_0x8f95('0x32'),{'body':{'interface':_0x3c5589},'options':{'where':_0x4958b3}});};exports['agentPause']=function(_0x3fb7db,_0x4eb2a7,_0x267a30){return request(_0x8f95('0x33'),{'body':{'type':_0x4eb2a7,'uniqueid':_0x267a30},'options':{'where':_0x3fb7db}});};exports[_0x8f95('0x34')]=function(_0xf9ecd){return request(_0x8f95('0x35'),{'body':{},'options':{'where':_0xf9ecd}});};exports[_0x8f95('0x36')]=function(_0x6c75b5){return request(_0x8f95('0x37'),{'body':{},'options':{'where':_0x6c75b5}});};
\ No newline at end of file
+var _0x2ea9=['arg_1','arg_2','format','YYYY-MM-DD\x20HH:mm:ss','createSquareRecording','CreateSquareRecording','createSquareMessage','CreateSquareMessage','createCmContact','ShowCmHopper','ListId','then','CreateCmContact','getPauseById','ShowPause','agentPause','PauseUser','agentUnpause','UnpauseUser','bluebird','moment','lodash','util','jayson/promise','request','error','message','catch','getSquareProject','ShowSquareProject','production','ShowMailAccount','Smtp','name','email','getSquareProjectById','ShowVoiceQueue','getVariableById','ShowVariable','getSquareOdbcById','dsn','ShowUser','getContactByPhone','log','rpcreq','GetContactByPhone','phone','getTrunkById','ShowTrunk','ShowSound','getIntervalById','Interval','Intervals','getSmsAccountById','ShowSmsAccount','createSmsMessage','createSquareDetailsReport','CreateSquareReport','merge'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x2ea9,0xc4));var _0x92ea=function(_0xf8fe4e,_0x9afe40){_0xf8fe4e=_0xf8fe4e-0x0;var _0x370bd3=_0x2ea9[_0xf8fe4e];return _0x370bd3;};'use strict';var BPromise=require(_0x92ea('0x0'));var moment=require(_0x92ea('0x1'));var _=require(_0x92ea('0x2'));var util=require(_0x92ea('0x3'));var jayson=require(_0x92ea('0x4'));var client=jayson['client']['http']({'port':0x2329});function request(_0x1785d6,_0x3fb2a1){return new BPromise(function(_0x42b23a,_0x1d9de1){return client[_0x92ea('0x5')](_0x1785d6,_0x3fb2a1)['then'](function(_0x450009){if(_0x450009[_0x92ea('0x6')]){return _0x1d9de1(_0x450009[_0x92ea('0x6')][_0x92ea('0x7')]);}else{return _0x42b23a(_0x450009['result']);}})[_0x92ea('0x8')](function(_0x16b8aa){return _0x1d9de1(_0x16b8aa);});});}exports[_0x92ea('0x9')]=function(_0x3adb71){return request(_0x92ea('0xa'),{'options':{'raw':![],'where':{'name':_0x3adb71},'attributes':[_0x92ea('0xb')]}});};exports['getMailAccountById']=function(_0x46bf5f){return request(_0x92ea('0xc'),{'options':{'raw':![],'where':{'id':_0x46bf5f},'include':[{'model':'MailServerOut','as':_0x92ea('0xd')}],'attributes':['id',_0x92ea('0xe'),_0x92ea('0xf')]}});};exports[_0x92ea('0x10')]=function(_0x3e65b9){return request(_0x92ea('0xa'),{'options':{'where':{'id':_0x3e65b9},'attributes':[_0x92ea('0xe')]}});};exports['getVoiceQueueById']=function(_0x2715d0){return request(_0x92ea('0x11'),{'options':{'where':{'id':_0x2715d0},'attributes':[_0x92ea('0xe')]}});};exports[_0x92ea('0x12')]=function(_0x143936){return request(_0x92ea('0x13'),{'options':{'where':{'id':_0x143936},'attributes':[_0x92ea('0xe')]}});};exports[_0x92ea('0x14')]=function(_0x2437f6){return request('ShowSquareOdbc',{'options':{'where':{'id':_0x2437f6},'attributes':[_0x92ea('0x15')]}});};exports['getUserById']=function(_0x96cde7){return request(_0x92ea('0x16'),{'options':{'where':{'id':_0x96cde7},'attributes':[_0x92ea('0xe')]}});};exports[_0x92ea('0x17')]=function(_0x2c1c3b){console[_0x92ea('0x18')](_0x92ea('0x19'),_0x2c1c3b);return request(_0x92ea('0x1a'),{'options':{'where':{'phone':_0x2c1c3b[_0x92ea('0x1b')]},'attributes':['id']}});};exports[_0x92ea('0x1c')]=function(_0x1034e8){return request(_0x92ea('0x1d'),{'options':{'where':{'id':_0x1034e8},'attributes':[_0x92ea('0xe')]}});};exports['getSoundById']=function(_0x5d15cf){return request(_0x92ea('0x1e'),{'options':{'where':{'id':_0x5d15cf},'attributes':['save_name']}});};exports[_0x92ea('0x1f')]=function(_0x45d562){return request('ShowInterval',{'options':{'raw':![],'where':{'id':_0x45d562},'include':[{'model':_0x92ea('0x20'),'as':_0x92ea('0x21')}]}});};exports[_0x92ea('0x22')]=function(_0x336c58){return request(_0x92ea('0x23'),{'options':{'where':{'id':_0x336c58},'attributes':['id','name']}});};exports[_0x92ea('0x24')]=function(_0x503cbe){return request('CreateSmsMessage',{'body':_0x503cbe});};exports[_0x92ea('0x25')]=function(_0xc1124){return request('CreateSquareDetailsReport',{'body':_0xc1124});};exports['createSquareReport']=function(_0x3721d1){return request(_0x92ea('0x26'),{'body':_[_0x92ea('0x27')](_0x3721d1,{'project_name':_0x3721d1[_0x92ea('0x28')],'prev_project_name':_0x3721d1[_0x92ea('0x29')]||'','is_subproject':_0x3721d1[_0x92ea('0x29')]?!![]:![],'leaveAt':moment()[_0x92ea('0x2a')](_0x92ea('0x2b'))})});};exports[_0x92ea('0x2c')]=function(_0xdc05d2){return request(_0x92ea('0x2d'),{'body':_0xdc05d2});};exports[_0x92ea('0x2e')]=function(_0x286304){return request(_0x92ea('0x2f'),{'body':_0x286304});};exports[_0x92ea('0x30')]=function(_0x27b467){return request(_0x92ea('0x31'),{'options':{'raw':![],'where':{'phone':_0x27b467[_0x92ea('0x1b')],'ListId':_0x27b467[_0x92ea('0x32')]}}})[_0x92ea('0x33')](function(_0x1a0939){if(_0x1a0939){return _0x1a0939;}return request(_0x92ea('0x34'),{'body':_0x27b467});});};exports[_0x92ea('0x35')]=function(_0x17ef39){return request(_0x92ea('0x36'),{'options':{'where':{'id':_0x17ef39},'attributes':[_0x92ea('0xe')]}});};exports['agentLogin']=function(_0x45d3b6,_0x4b25c0){return request('LoginUser',{'body':{'interface':_0x4b25c0},'options':{'where':_0x45d3b6}});};exports[_0x92ea('0x37')]=function(_0x34fc10,_0x32ffac,_0x1a7aed){return request(_0x92ea('0x38'),{'body':{'type':_0x32ffac,'uniqueid':_0x1a7aed},'options':{'where':_0x34fc10}});};exports[_0x92ea('0x39')]=function(_0x47ab6f){return request(_0x92ea('0x3a'),{'body':{},'options':{'where':_0x47ab6f}});};exports['agentLogout']=function(_0x308f23){return request('LogoutUser',{'body':{},'options':{'where':_0x308f23}});};
\ No newline at end of file