Built motion from commit (unavailable).|2.0.75
[motion2.git] / server / api / voiceCallReport / voiceCallReport.rpc.js
index 8e77985..1598111 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2fe5=['error','code','message','info','result','catch','findAll','options','raw','where','attributes','limit','map','include','model','GetVoiceCallReport','CreateVoiceCallReport','VoiceCallReport','create','body','update','UpdateVoiceCallReport','moment','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','VoiceCallReport,\x20%s,\x20%s','request\x20sent','debug','VoiceCallReport,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x20498e,_0x512b3d){var _0x286b42=function(_0x45a8ac){while(--_0x45a8ac){_0x20498e['push'](_0x20498e['shift']());}};_0x286b42(++_0x512b3d);}(_0x2fe5,0x85));var _0x52fe=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x2fe5[_0x122ef9];return _0x42fba0;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x52fe('0x0'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var db=require(_0x52fe('0x1'))['db'];var utils=require('../../config/utils');var logger=require(_0x52fe('0x2'))(_0x52fe('0x3'));var config=require(_0x52fe('0x4'));var jayson=require(_0x52fe('0x5'));var client=jayson[_0x52fe('0x6')][_0x52fe('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x1f75b5,_0x328f8d,_0xf893b5){return new BPromise(function(_0x3b9e2d,_0x34b9ce){return client[_0x52fe('0x8')](_0x1f75b5,_0xf893b5)[_0x52fe('0x9')](function(_0x24460c){logger['info'](_0x52fe('0xa'),_0x328f8d,_0x52fe('0xb'));logger[_0x52fe('0xc')](_0x52fe('0xd'),_0x328f8d,'request\x20sent',JSON[_0x52fe('0xe')](_0x24460c));if(_0x24460c['error']){if(_0x24460c[_0x52fe('0xf')][_0x52fe('0x10')]===0x1f4){logger[_0x52fe('0xf')](_0x52fe('0xa'),_0x328f8d,_0x24460c['error'][_0x52fe('0x11')]);return _0x34b9ce(_0x24460c[_0x52fe('0xf')][_0x52fe('0x11')]);}logger[_0x52fe('0xf')]('VoiceCallReport,\x20%s,\x20%s',_0x328f8d,_0x24460c['error'][_0x52fe('0x11')]);return _0x3b9e2d(_0x24460c[_0x52fe('0xf')]['message']);}else{logger[_0x52fe('0x12')](_0x52fe('0xa'),_0x328f8d,_0x52fe('0xb'));_0x3b9e2d(_0x24460c[_0x52fe('0x13')]['message']);}})[_0x52fe('0x14')](function(_0x500812){logger['error'](_0x52fe('0xa'),_0x328f8d,_0x500812);_0x34b9ce(_0x500812);});});}exports['GetVoiceCallReport']=function(_0x327055){var _0x195504=this;return new Promise(function(_0x4069ab,_0x4aa9b3){return db['VoiceCallReport'][_0x52fe('0x15')]({'raw':_0x327055[_0x52fe('0x16')]?_0x327055[_0x52fe('0x16')][_0x52fe('0x17')]===undefined?!![]:![]:!![],'where':_0x327055[_0x52fe('0x16')]?_0x327055[_0x52fe('0x16')][_0x52fe('0x18')]||null:null,'attributes':_0x327055['options']?_0x327055[_0x52fe('0x16')][_0x52fe('0x19')]||null:null,'limit':_0x327055['options']?_0x327055['options'][_0x52fe('0x1a')]||null:null,'include':_0x327055[_0x52fe('0x16')]?_0x327055[_0x52fe('0x16')]['include']?_[_0x52fe('0x1b')](_0x327055[_0x52fe('0x16')][_0x52fe('0x1c')],function(_0x3cbe7a){return{'model':db[_0x3cbe7a[_0x52fe('0x1d')]],'as':_0x3cbe7a['as'],'attributes':_0x3cbe7a[_0x52fe('0x19')],'include':_0x3cbe7a[_0x52fe('0x1c')]?_['map'](_0x3cbe7a[_0x52fe('0x1c')],function(_0x2a0ee3){return{'model':db[_0x2a0ee3[_0x52fe('0x1d')]],'as':_0x2a0ee3['as'],'attributes':_0x2a0ee3[_0x52fe('0x19')],'include':_0x2a0ee3[_0x52fe('0x1c')]?_['map'](_0x2a0ee3[_0x52fe('0x1c')],function(_0x4f67e9){return{'model':db[_0x4f67e9[_0x52fe('0x1d')]],'as':_0x4f67e9['as'],'attributes':_0x4f67e9['attributes']};}):[]};}):[]};}):[]:[]})[_0x52fe('0x9')](function(_0xa63944){logger[_0x52fe('0x12')](_0x52fe('0x1e'),_0x327055);logger['debug'](_0x52fe('0x1e'),_0x327055,JSON[_0x52fe('0xe')](_0xa63944));_0x4069ab(_0xa63944);})[_0x52fe('0x14')](function(_0x457f19){logger[_0x52fe('0xf')]('GetVoiceCallReport',_0x457f19[_0x52fe('0x11')],_0x327055);_0x4aa9b3(_0x195504[_0x52fe('0xf')](0x1f4,_0x457f19[_0x52fe('0x11')]));});});};exports[_0x52fe('0x1f')]=function(_0x29c4e5){var _0x30bf6c=this;return new Promise(function(_0x357ad4,_0x2dd09b){return db[_0x52fe('0x20')][_0x52fe('0x21')](_0x29c4e5[_0x52fe('0x22')],{'raw':_0x29c4e5[_0x52fe('0x16')]?_0x29c4e5['options']['raw']===undefined?!![]:![]:!![]})[_0x52fe('0x9')](function(_0x403caf){logger[_0x52fe('0x12')](_0x52fe('0x1f'),_0x29c4e5);logger['debug'](_0x52fe('0x1f'),_0x29c4e5,JSON[_0x52fe('0xe')](_0x403caf));_0x357ad4(_0x403caf);})['catch'](function(_0x19855e){logger[_0x52fe('0xf')](_0x52fe('0x1f'),_0x19855e['message'],_0x29c4e5);_0x2dd09b(_0x30bf6c[_0x52fe('0xf')](0x1f4,_0x19855e[_0x52fe('0x11')]));});});};exports['UpdateVoiceCallReport']=function(_0x312881){var _0xbc79b1=this;return new Promise(function(_0x3f87a0,_0x5aaf41){return db[_0x52fe('0x20')][_0x52fe('0x23')](_0x312881[_0x52fe('0x22')],{'raw':_0x312881[_0x52fe('0x16')]?_0x312881[_0x52fe('0x16')][_0x52fe('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x312881['options']?_0x312881['options'][_0x52fe('0x18')]||null:null,'attributes':_0x312881['options']?_0x312881['options'][_0x52fe('0x19')]||null:null,'limit':_0x312881[_0x52fe('0x16')]?_0x312881[_0x52fe('0x16')]['limit']||null:null})['then'](function(_0x4803d2){logger[_0x52fe('0x12')](_0x52fe('0x24'),_0x312881);logger[_0x52fe('0xc')]('UpdateVoiceCallReport',_0x312881,JSON['stringify'](_0x4803d2));_0x3f87a0(_0x4803d2);})[_0x52fe('0x14')](function(_0x429fbd){logger[_0x52fe('0xf')](_0x52fe('0x24'),_0x429fbd[_0x52fe('0x11')],_0x312881);_0x5aaf41(_0xbc79b1[_0x52fe('0xf')](0x1f4,_0x429fbd['message']));});});};
\ No newline at end of file
+var _0xcc82=['info','VoiceCallReport,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','GetVoiceCallReport','VoiceCallReport','options','where','attributes','limit','include','CreateVoiceCallReport','create','body','raw','debug','UpdateVoiceCallReport','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','client','http','then'];(function(_0xf55e73,_0x3fecc5){var _0x116b99=function(_0x314e0c){while(--_0x314e0c){_0xf55e73['push'](_0xf55e73['shift']());}};_0x116b99(++_0x3fecc5);}(_0xcc82,0xc0));var _0x2cc8=function(_0x2b0f81,_0x3917f0){_0x2b0f81=_0x2b0f81-0x0;var _0x5ce74c=_0xcc82[_0x2b0f81];return _0x5ce74c;};'use strict';var _=require(_0x2cc8('0x0'));var util=require(_0x2cc8('0x1'));var moment=require(_0x2cc8('0x2'));var BPromise=require(_0x2cc8('0x3'));var rs=require(_0x2cc8('0x4'));var fs=require('fs');var db=require(_0x2cc8('0x5'))['db'];var utils=require(_0x2cc8('0x6'));var logger=require(_0x2cc8('0x7'))(_0x2cc8('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x2cc8('0x9')][_0x2cc8('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3f29f7,_0x2c2650,_0x5622f4){return new BPromise(function(_0x9b2720,_0x4ae065){return client['request'](_0x3f29f7,_0x5622f4)[_0x2cc8('0xb')](function(_0x9eccbc){logger[_0x2cc8('0xc')](_0x2cc8('0xd'),_0x2c2650,_0x2cc8('0xe'));logger['debug']('VoiceCallReport,\x20%s,\x20%s,\x20%s',_0x2c2650,_0x2cc8('0xe'),JSON[_0x2cc8('0xf')](_0x9eccbc));if(_0x9eccbc[_0x2cc8('0x10')]){if(_0x9eccbc[_0x2cc8('0x10')][_0x2cc8('0x11')]===0x1f4){logger[_0x2cc8('0x10')](_0x2cc8('0xd'),_0x2c2650,_0x9eccbc['error'][_0x2cc8('0x12')]);return _0x4ae065(_0x9eccbc[_0x2cc8('0x10')][_0x2cc8('0x12')]);}logger['error']('VoiceCallReport,\x20%s,\x20%s',_0x2c2650,_0x9eccbc['error'][_0x2cc8('0x12')]);return _0x9b2720(_0x9eccbc[_0x2cc8('0x10')][_0x2cc8('0x12')]);}else{logger[_0x2cc8('0xc')](_0x2cc8('0xd'),_0x2c2650,_0x2cc8('0xe'));_0x9b2720(_0x9eccbc[_0x2cc8('0x13')]['message']);}})[_0x2cc8('0x14')](function(_0x104807){logger[_0x2cc8('0x10')](_0x2cc8('0xd'),_0x2c2650,_0x104807);_0x4ae065(_0x104807);});});}exports[_0x2cc8('0x15')]=function(_0x40f441){var _0x314f00=this;return new Promise(function(_0x46d958,_0x37afe5){return db[_0x2cc8('0x16')]['findAll']({'raw':_0x40f441['options']?_0x40f441[_0x2cc8('0x17')]['raw']===undefined?!![]:![]:!![],'where':_0x40f441[_0x2cc8('0x17')]?_0x40f441[_0x2cc8('0x17')][_0x2cc8('0x18')]||null:null,'attributes':_0x40f441[_0x2cc8('0x17')]?_0x40f441['options'][_0x2cc8('0x19')]||null:null,'limit':_0x40f441['options']?_0x40f441['options'][_0x2cc8('0x1a')]||null:null,'include':_0x40f441[_0x2cc8('0x17')]?_0x40f441['options']['include']?_['map'](_0x40f441[_0x2cc8('0x17')]['include'],function(_0x319811){return{'model':db[_0x319811['model']],'as':_0x319811['as'],'attributes':_0x319811[_0x2cc8('0x19')],'include':_0x319811['include']?_['map'](_0x319811['include'],function(_0x3d5724){return{'model':db[_0x3d5724['model']],'as':_0x3d5724['as'],'attributes':_0x3d5724['attributes'],'include':_0x3d5724[_0x2cc8('0x1b')]?_['map'](_0x3d5724['include'],function(_0x2a4a51){return{'model':db[_0x2a4a51['model']],'as':_0x2a4a51['as'],'attributes':_0x2a4a51[_0x2cc8('0x19')]};}):[]};}):[]};}):[]:[]})[_0x2cc8('0xb')](function(_0x3a75f6){logger[_0x2cc8('0xc')]('GetVoiceCallReport',_0x40f441);logger['debug']('GetVoiceCallReport',_0x40f441,JSON[_0x2cc8('0xf')](_0x3a75f6));_0x46d958(_0x3a75f6);})[_0x2cc8('0x14')](function(_0xbf1b48){logger['error'](_0x2cc8('0x15'),_0xbf1b48[_0x2cc8('0x12')],_0x40f441);_0x37afe5(_0x314f00[_0x2cc8('0x10')](0x1f4,_0xbf1b48['message']));});});};exports[_0x2cc8('0x1c')]=function(_0x1e6a8a){var _0x2297c3=this;return new Promise(function(_0x311124,_0x257b28){return db[_0x2cc8('0x16')][_0x2cc8('0x1d')](_0x1e6a8a[_0x2cc8('0x1e')],{'raw':_0x1e6a8a['options']?_0x1e6a8a[_0x2cc8('0x17')][_0x2cc8('0x1f')]===undefined?!![]:![]:!![]})[_0x2cc8('0xb')](function(_0x3c0c05){logger['info'](_0x2cc8('0x1c'),_0x1e6a8a);logger[_0x2cc8('0x20')](_0x2cc8('0x1c'),_0x1e6a8a,JSON[_0x2cc8('0xf')](_0x3c0c05));_0x311124(_0x3c0c05);})[_0x2cc8('0x14')](function(_0x5e8c6b){logger['error'](_0x2cc8('0x1c'),_0x5e8c6b[_0x2cc8('0x12')],_0x1e6a8a);_0x257b28(_0x2297c3[_0x2cc8('0x10')](0x1f4,_0x5e8c6b[_0x2cc8('0x12')]));});});};exports[_0x2cc8('0x21')]=function(_0x28b04e){var _0x3b60df=this;return new Promise(function(_0x418b07,_0x4a5a6a){return db['VoiceCallReport']['update'](_0x28b04e[_0x2cc8('0x1e')],{'raw':_0x28b04e[_0x2cc8('0x17')]?_0x28b04e[_0x2cc8('0x17')][_0x2cc8('0x1f')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x28b04e[_0x2cc8('0x17')]?_0x28b04e[_0x2cc8('0x17')]['where']||null:null,'attributes':_0x28b04e['options']?_0x28b04e['options']['attributes']||null:null,'limit':_0x28b04e['options']?_0x28b04e[_0x2cc8('0x17')][_0x2cc8('0x1a')]||null:null})['then'](function(_0x2e8a9c){logger[_0x2cc8('0xc')](_0x2cc8('0x21'),_0x28b04e);logger[_0x2cc8('0x20')](_0x2cc8('0x21'),_0x28b04e,JSON[_0x2cc8('0xf')](_0x2e8a9c));_0x418b07(_0x2e8a9c);})[_0x2cc8('0x14')](function(_0x166e99){logger[_0x2cc8('0x10')](_0x2cc8('0x21'),_0x166e99[_0x2cc8('0x12')],_0x28b04e);_0x4a5a6a(_0x3b60df[_0x2cc8('0x10')](0x1f4,_0x166e99['message']));});});};
\ No newline at end of file