Built motion from commit (unavailable).|2.6.0
[motion2.git] / server / services / agi / rpc / index.js
index 15bf979..52d2d3f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdf0e=['util','jayson/promise','client','http','then','error','message','result','getSquareProject','ShowSquareProject','getMailAccountById','ShowMailAccount','MailServerOut','Smtp','name','email','getSquareProjectById','getVariableById','getSquareOdbcById','ShowSquareOdbc','dsn','getUserById','ShowUser','getTrunkById','ShowTrunk','getSoundById','ShowSound','ShowInterval','getSmsAccountById','ShowSmsAccount','createSmsMessage','createSquareReport','CreateSquareReport','merge','arg_2','YYYY-MM-DD\x20HH:mm:ss','createSquareRecording','CreateSquareRecording','createSquareMessage','CreateSquareMessage','createCmContact','ShowCmHopper','phone','ListId','CreateCmContact','getPauseById','LoginUser','agentPause','agentUnpause','UnpauseUser','LogoutUser','bluebird','moment','lodash'];(function(_0x9aada2,_0xd2d349){var _0x196dff=function(_0x5ad061){while(--_0x5ad061){_0x9aada2['push'](_0x9aada2['shift']());}};_0x196dff(++_0xd2d349);}(_0xdf0e,0xd5));var _0xedf0=function(_0x2d0ef5,_0x5621a4){_0x2d0ef5=_0x2d0ef5-0x0;var _0x550979=_0xdf0e[_0x2d0ef5];return _0x550979;};'use strict';var BPromise=require(_0xedf0('0x0'));var moment=require(_0xedf0('0x1'));var _=require(_0xedf0('0x2'));var util=require(_0xedf0('0x3'));var jayson=require(_0xedf0('0x4'));var client=jayson[_0xedf0('0x5')][_0xedf0('0x6')]({'port':0x2329});function request(_0x4b6d7c,_0x596ffb){return new BPromise(function(_0x2e482a,_0x1e773e){return client['request'](_0x4b6d7c,_0x596ffb)[_0xedf0('0x7')](function(_0x43e15d){if(_0x43e15d[_0xedf0('0x8')]){return _0x1e773e(_0x43e15d['error'][_0xedf0('0x9')]);}else{return _0x2e482a(_0x43e15d[_0xedf0('0xa')]);}})['catch'](function(_0x5a5017){return _0x1e773e(_0x5a5017);});});}exports[_0xedf0('0xb')]=function(_0x2bda57){return request(_0xedf0('0xc'),{'options':{'raw':![],'where':{'name':_0x2bda57},'attributes':['production']}});};exports[_0xedf0('0xd')]=function(_0x594841){return request(_0xedf0('0xe'),{'options':{'raw':![],'where':{'id':_0x594841},'include':[{'model':_0xedf0('0xf'),'as':_0xedf0('0x10')}],'attributes':['id',_0xedf0('0x11'),_0xedf0('0x12')]}});};exports[_0xedf0('0x13')]=function(_0x25c21a){return request(_0xedf0('0xc'),{'options':{'where':{'id':_0x25c21a},'attributes':[_0xedf0('0x11')]}});};exports['getVoiceQueueById']=function(_0x29bc75){return request('ShowVoiceQueue',{'options':{'where':{'id':_0x29bc75},'attributes':['name']}});};exports[_0xedf0('0x14')]=function(_0x38e90a){return request('ShowVariable',{'options':{'where':{'id':_0x38e90a},'attributes':[_0xedf0('0x11')]}});};exports[_0xedf0('0x15')]=function(_0x27d053){return request(_0xedf0('0x16'),{'options':{'where':{'id':_0x27d053},'attributes':[_0xedf0('0x17')]}});};exports[_0xedf0('0x18')]=function(_0x95f879){return request(_0xedf0('0x19'),{'options':{'where':{'id':_0x95f879},'attributes':[_0xedf0('0x11')]}});};exports[_0xedf0('0x1a')]=function(_0x51a824){return request(_0xedf0('0x1b'),{'options':{'where':{'id':_0x51a824},'attributes':['name']}});};exports[_0xedf0('0x1c')]=function(_0x5c5081){return request(_0xedf0('0x1d'),{'options':{'where':{'id':_0x5c5081},'attributes':['save_name']}});};exports['getIntervalById']=function(_0x3cfb84){return request(_0xedf0('0x1e'),{'options':{'raw':![],'where':{'id':_0x3cfb84},'include':[{'model':'Interval','as':'Intervals'}]}});};exports[_0xedf0('0x1f')]=function(_0x3f0845){return request(_0xedf0('0x20'),{'options':{'where':{'id':_0x3f0845},'attributes':['id',_0xedf0('0x11')]}});};exports[_0xedf0('0x21')]=function(_0x238d3e){return request('CreateSmsMessage',{'body':_0x238d3e});};exports['createSquareDetailsReport']=function(_0x42fb7b){return request('CreateSquareDetailsReport',{'body':_0x42fb7b});};exports[_0xedf0('0x22')]=function(_0x164509){return request(_0xedf0('0x23'),{'body':_[_0xedf0('0x24')](_0x164509,{'project_name':_0x164509['arg_1'],'prev_project_name':_0x164509[_0xedf0('0x25')]||'','is_subproject':_0x164509[_0xedf0('0x25')]?!![]:![],'leaveAt':moment()['format'](_0xedf0('0x26'))})});};exports[_0xedf0('0x27')]=function(_0x42e0ce){return request(_0xedf0('0x28'),{'body':_0x42e0ce});};exports[_0xedf0('0x29')]=function(_0x2afe79){return request(_0xedf0('0x2a'),{'body':_0x2afe79});};exports[_0xedf0('0x2b')]=function(_0x40fc2c){return request(_0xedf0('0x2c'),{'options':{'raw':![],'where':{'phone':_0x40fc2c[_0xedf0('0x2d')],'ListId':_0x40fc2c[_0xedf0('0x2e')]}}})['then'](function(_0xae9e0d){if(_0xae9e0d){return _0xae9e0d;}return request(_0xedf0('0x2f'),{'body':_0x40fc2c});});};exports[_0xedf0('0x30')]=function(_0x104b0f){return request('ShowPause',{'options':{'where':{'id':_0x104b0f},'attributes':[_0xedf0('0x11')]}});};exports['agentLogin']=function(_0x3b4f5c,_0xf41fe1){return request(_0xedf0('0x31'),{'body':{'interface':_0xf41fe1},'options':{'where':_0x3b4f5c}});};exports[_0xedf0('0x32')]=function(_0x308f78,_0x8abd32,_0x2b2966){return request('PauseUser',{'body':{'type':_0x8abd32,'uniqueid':_0x2b2966},'options':{'where':_0x308f78}});};exports[_0xedf0('0x33')]=function(_0x25620b){return request(_0xedf0('0x34'),{'body':{},'options':{'where':_0x25620b}});};exports['agentLogout']=function(_0x81eb2){return request(_0xedf0('0x35'),{'body':{},'options':{'where':_0x81eb2}});};
\ No newline at end of file
+var _0x40a3=['createSquareDetailsReport','CreateSquareDetailsReport','createSquareReport','arg_1','arg_2','format','YYYY-MM-DD\x20HH:mm:ss','createSquareRecording','CreateSquareRecording','createSquareMessage','CreateSquareMessage','createCmContact','ShowCmHopper','ListId','ShowPause','agentPause','PauseUser','agentUnpause','UnpauseUser','agentLogout','LogoutUser','bluebird','jayson/promise','http','request','then','error','result','catch','getSquareProject','production','getMailAccountById','MailServerOut','name','email','ShowSquareProject','getVoiceQueueById','ShowVoiceQueue','getVariableById','ShowVariable','getSquareOdbcById','ShowSquareOdbc','dsn','getTrunkById','ShowTrunk','getSoundById','ShowSound','save_name','getIntervalById','Interval','getSmsAccountById','ShowSmsAccount','CreateSmsMessage'];(function(_0x3e5086,_0x48f4a2){var _0xfeb102=function(_0x5a945f){while(--_0x5a945f){_0x3e5086['push'](_0x3e5086['shift']());}};_0xfeb102(++_0x48f4a2);}(_0x40a3,0x153));var _0x340a=function(_0x2874d5,_0x1012b1){_0x2874d5=_0x2874d5-0x0;var _0x34b789=_0x40a3[_0x2874d5];return _0x34b789;};'use strict';var BPromise=require(_0x340a('0x0'));var moment=require('moment');var _=require('lodash');var util=require('util');var jayson=require(_0x340a('0x1'));var client=jayson['client'][_0x340a('0x2')]({'port':0x2329});function request(_0x371ee7,_0x21f3fc){return new BPromise(function(_0x316f2f,_0x1a5fd4){return client[_0x340a('0x3')](_0x371ee7,_0x21f3fc)[_0x340a('0x4')](function(_0x5932f8){if(_0x5932f8[_0x340a('0x5')]){return _0x1a5fd4(_0x5932f8[_0x340a('0x5')]['message']);}else{return _0x316f2f(_0x5932f8[_0x340a('0x6')]);}})[_0x340a('0x7')](function(_0x241cf8){return _0x1a5fd4(_0x241cf8);});});}exports[_0x340a('0x8')]=function(_0x120fb2){return request('ShowSquareProject',{'options':{'raw':![],'where':{'name':_0x120fb2},'attributes':[_0x340a('0x9')]}});};exports[_0x340a('0xa')]=function(_0x7eb940){return request('ShowMailAccount',{'options':{'raw':![],'where':{'id':_0x7eb940},'include':[{'model':_0x340a('0xb'),'as':'Smtp'}],'attributes':['id',_0x340a('0xc'),_0x340a('0xd')]}});};exports['getSquareProjectById']=function(_0x11c3c6){return request(_0x340a('0xe'),{'options':{'where':{'id':_0x11c3c6},'attributes':[_0x340a('0xc')]}});};exports[_0x340a('0xf')]=function(_0x30b835){return request(_0x340a('0x10'),{'options':{'where':{'id':_0x30b835},'attributes':[_0x340a('0xc')]}});};exports[_0x340a('0x11')]=function(_0x2f9105){return request(_0x340a('0x12'),{'options':{'where':{'id':_0x2f9105},'attributes':[_0x340a('0xc')]}});};exports[_0x340a('0x13')]=function(_0xa1b711){return request(_0x340a('0x14'),{'options':{'where':{'id':_0xa1b711},'attributes':[_0x340a('0x15')]}});};exports['getUserById']=function(_0x266140){return request('ShowUser',{'options':{'where':{'id':_0x266140},'attributes':['name']}});};exports[_0x340a('0x16')]=function(_0x1a2ab1){return request(_0x340a('0x17'),{'options':{'where':{'id':_0x1a2ab1},'attributes':[_0x340a('0xc')]}});};exports[_0x340a('0x18')]=function(_0x4587f7){return request(_0x340a('0x19'),{'options':{'where':{'id':_0x4587f7},'attributes':[_0x340a('0x1a')]}});};exports[_0x340a('0x1b')]=function(_0x29da7e){return request('ShowInterval',{'options':{'raw':![],'where':{'id':_0x29da7e},'include':[{'model':_0x340a('0x1c'),'as':'Intervals'}]}});};exports[_0x340a('0x1d')]=function(_0x30f383){return request(_0x340a('0x1e'),{'options':{'where':{'id':_0x30f383},'attributes':['id',_0x340a('0xc')]}});};exports['createSmsMessage']=function(_0x50d80a){return request(_0x340a('0x1f'),{'body':_0x50d80a});};exports[_0x340a('0x20')]=function(_0x4a8c22){return request(_0x340a('0x21'),{'body':_0x4a8c22});};exports[_0x340a('0x22')]=function(_0x30f8c3){return request('CreateSquareReport',{'body':_['merge'](_0x30f8c3,{'project_name':_0x30f8c3[_0x340a('0x23')],'prev_project_name':_0x30f8c3[_0x340a('0x24')]||'','is_subproject':_0x30f8c3['arg_2']?!![]:![],'leaveAt':moment()[_0x340a('0x25')](_0x340a('0x26'))})});};exports[_0x340a('0x27')]=function(_0x12bb94){return request(_0x340a('0x28'),{'body':_0x12bb94});};exports[_0x340a('0x29')]=function(_0x38c643){return request(_0x340a('0x2a'),{'body':_0x38c643});};exports[_0x340a('0x2b')]=function(_0x48497d){return request(_0x340a('0x2c'),{'options':{'raw':![],'where':{'phone':_0x48497d['phone'],'ListId':_0x48497d[_0x340a('0x2d')]}}})[_0x340a('0x4')](function(_0x5e3f90){if(_0x5e3f90){return _0x5e3f90;}return request('CreateCmContact',{'body':_0x48497d});});};exports['getPauseById']=function(_0x151a15){return request(_0x340a('0x2e'),{'options':{'where':{'id':_0x151a15},'attributes':[_0x340a('0xc')]}});};exports['agentLogin']=function(_0x29c4c0,_0x16d831){return request('LoginUser',{'body':{'interface':_0x16d831},'options':{'where':_0x29c4c0}});};exports[_0x340a('0x2f')]=function(_0x3f2157,_0x233f65,_0x31cc57){return request(_0x340a('0x30'),{'body':{'type':_0x233f65,'uniqueid':_0x31cc57},'options':{'where':_0x3f2157}});};exports[_0x340a('0x31')]=function(_0x50646e){return request(_0x340a('0x32'),{'body':{},'options':{'where':_0x50646e}});};exports[_0x340a('0x33')]=function(_0x41669e){return request(_0x340a('0x34'),{'body':{},'options':{'where':_0x41669e}});};
\ No newline at end of file