Built motion from commit 1cfc41f6.|2.5.41
[motion2.git] / server / api / voiceAgentReport / voiceAgentReport.rpc.js
index 770068a..904b6f1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb715=['request','then','info','VoiceAgentReport,\x20%s,\x20%s','debug','VoiceAgentReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','CreateVoiceAgentReport','VoiceAgentReport','create','options','raw','catch','UpdateVoiceAgentReport','update','attributes','limit','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http'];(function(_0x13419e,_0x3e04e9){var _0x112be5=function(_0x3c07bf){while(--_0x3c07bf){_0x13419e['push'](_0x13419e['shift']());}};_0x112be5(++_0x3e04e9);}(_0xb715,0x9e));var _0x5b71=function(_0x22812c,_0x374b12){_0x22812c=_0x22812c-0x0;var _0x238717=_0xb715[_0x22812c];return _0x238717;};'use strict';var _=require(_0x5b71('0x0'));var util=require(_0x5b71('0x1'));var moment=require(_0x5b71('0x2'));var BPromise=require(_0x5b71('0x3'));var rs=require(_0x5b71('0x4'));var fs=require('fs');var Redis=require(_0x5b71('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x5b71('0x6'));var logger=require(_0x5b71('0x7'))(_0x5b71('0x8'));var config=require(_0x5b71('0x9'));var jayson=require(_0x5b71('0xa'));var client=jayson['client'][_0x5b71('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x472e18,_0x1439ec,_0x36cc3c){return new BPromise(function(_0x36aa7d,_0xfe67c3){return client[_0x5b71('0xc')](_0x472e18,_0x36cc3c)[_0x5b71('0xd')](function(_0x2a33af){logger[_0x5b71('0xe')](_0x5b71('0xf'),_0x1439ec,'request\x20sent');logger[_0x5b71('0x10')](_0x5b71('0x11'),_0x1439ec,_0x5b71('0x12'),JSON[_0x5b71('0x13')](_0x2a33af));if(_0x2a33af[_0x5b71('0x14')]){if(_0x2a33af[_0x5b71('0x14')][_0x5b71('0x15')]===0x1f4){logger[_0x5b71('0x14')](_0x5b71('0xf'),_0x1439ec,_0x2a33af['error'][_0x5b71('0x16')]);return _0xfe67c3(_0x2a33af['error'][_0x5b71('0x16')]);}logger[_0x5b71('0x14')](_0x5b71('0xf'),_0x1439ec,_0x2a33af['error'][_0x5b71('0x16')]);return _0x36aa7d(_0x2a33af[_0x5b71('0x14')][_0x5b71('0x16')]);}else{logger[_0x5b71('0xe')]('VoiceAgentReport,\x20%s,\x20%s',_0x1439ec,_0x5b71('0x12'));_0x36aa7d(_0x2a33af[_0x5b71('0x17')]['message']);}})['catch'](function(_0x12c0af){logger[_0x5b71('0x14')](_0x5b71('0xf'),_0x1439ec,_0x12c0af);_0xfe67c3(_0x12c0af);});});}exports[_0x5b71('0x18')]=function(_0x1a96ef){var _0x46a234=this;return new Promise(function(_0x583b0b,_0x43bfd8){return db[_0x5b71('0x19')][_0x5b71('0x1a')](_0x1a96ef['body'],{'raw':_0x1a96ef[_0x5b71('0x1b')]?_0x1a96ef[_0x5b71('0x1b')][_0x5b71('0x1c')]===undefined?!![]:![]:!![]})[_0x5b71('0xd')](function(_0x177247){logger['info']('CreateVoiceAgentReport',_0x1a96ef);logger[_0x5b71('0x10')](_0x5b71('0x18'),_0x1a96ef,JSON['stringify'](_0x177247));_0x583b0b(_0x177247);})[_0x5b71('0x1d')](function(_0x54ef7e){logger[_0x5b71('0x14')](_0x5b71('0x18'),_0x54ef7e['message'],_0x1a96ef);_0x43bfd8(_0x46a234[_0x5b71('0x14')](0x1f4,_0x54ef7e[_0x5b71('0x16')]));});});};exports[_0x5b71('0x1e')]=function(_0x236c47){var _0x3354c3=this;return new Promise(function(_0x5df8a8,_0x4e6951){return db[_0x5b71('0x19')][_0x5b71('0x1f')](_0x236c47['body'],{'raw':_0x236c47['options']?_0x236c47[_0x5b71('0x1b')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x236c47['options']?_0x236c47[_0x5b71('0x1b')]['where']||null:null,'attributes':_0x236c47[_0x5b71('0x1b')]?_0x236c47[_0x5b71('0x1b')][_0x5b71('0x20')]||null:null,'limit':_0x236c47[_0x5b71('0x1b')]?_0x236c47[_0x5b71('0x1b')][_0x5b71('0x21')]||null:null})[_0x5b71('0xd')](function(_0x1373a3){logger[_0x5b71('0xe')](_0x5b71('0x1e'),_0x236c47);logger['debug'](_0x5b71('0x1e'),_0x236c47,JSON['stringify'](_0x1373a3));_0x5df8a8(_0x1373a3);})[_0x5b71('0x1d')](function(_0x3910b1){logger[_0x5b71('0x14')](_0x5b71('0x1e'),_0x3910b1[_0x5b71('0x16')],_0x236c47);_0x4e6951(_0x3354c3[_0x5b71('0x14')](0x1f4,_0x3910b1['message']));});});};
\ No newline at end of file
+var _0xffc6=['moment','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','VoiceAgentReport,\x20%s,\x20%s','request\x20sent','VoiceAgentReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','CreateVoiceAgentReport','create','body','options','info','debug','UpdateVoiceAgentReport','VoiceAgentReport','raw','where','lodash'];(function(_0x18b849,_0x41691b){var _0x16b367=function(_0x2296c3){while(--_0x2296c3){_0x18b849['push'](_0x18b849['shift']());}};_0x16b367(++_0x41691b);}(_0xffc6,0x95));var _0x6ffc=function(_0x279faa,_0x3fa70a){_0x279faa=_0x279faa-0x0;var _0x5bd685=_0xffc6[_0x279faa];return _0x5bd685;};'use strict';var _=require(_0x6ffc('0x0'));var util=require('util');var moment=require(_0x6ffc('0x1'));var BPromise=require('bluebird');var rs=require(_0x6ffc('0x2'));var fs=require('fs');var Redis=require(_0x6ffc('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x6ffc('0x4'));var logger=require(_0x6ffc('0x5'))('rpc');var config=require(_0x6ffc('0x6'));var jayson=require(_0x6ffc('0x7'));var client=jayson[_0x6ffc('0x8')][_0x6ffc('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x337e9c,_0xfceeea,_0x395178){return new BPromise(function(_0x10600e,_0x4f82bc){return client[_0x6ffc('0xa')](_0x337e9c,_0x395178)[_0x6ffc('0xb')](function(_0x703a56){logger['info'](_0x6ffc('0xc'),_0xfceeea,_0x6ffc('0xd'));logger['debug'](_0x6ffc('0xe'),_0xfceeea,_0x6ffc('0xd'),JSON[_0x6ffc('0xf')](_0x703a56));if(_0x703a56[_0x6ffc('0x10')]){if(_0x703a56[_0x6ffc('0x10')][_0x6ffc('0x11')]===0x1f4){logger['error'](_0x6ffc('0xc'),_0xfceeea,_0x703a56['error'][_0x6ffc('0x12')]);return _0x4f82bc(_0x703a56[_0x6ffc('0x10')][_0x6ffc('0x12')]);}logger[_0x6ffc('0x10')](_0x6ffc('0xc'),_0xfceeea,_0x703a56[_0x6ffc('0x10')][_0x6ffc('0x12')]);return _0x10600e(_0x703a56[_0x6ffc('0x10')][_0x6ffc('0x12')]);}else{logger['info'](_0x6ffc('0xc'),_0xfceeea,_0x6ffc('0xd'));_0x10600e(_0x703a56['result'][_0x6ffc('0x12')]);}})[_0x6ffc('0x13')](function(_0x4e15ff){logger['error'](_0x6ffc('0xc'),_0xfceeea,_0x4e15ff);_0x4f82bc(_0x4e15ff);});});}exports[_0x6ffc('0x14')]=function(_0x2e4fc4){var _0x307a6c=this;return new Promise(function(_0x55c629,_0x256339){return db['VoiceAgentReport'][_0x6ffc('0x15')](_0x2e4fc4[_0x6ffc('0x16')],{'raw':_0x2e4fc4[_0x6ffc('0x17')]?_0x2e4fc4['options']['raw']===undefined?!![]:![]:!![]})['then'](function(_0x57cffc){logger[_0x6ffc('0x18')](_0x6ffc('0x14'),_0x2e4fc4);logger[_0x6ffc('0x19')](_0x6ffc('0x14'),_0x2e4fc4,JSON['stringify'](_0x57cffc));_0x55c629(_0x57cffc);})['catch'](function(_0x1a85b8){logger[_0x6ffc('0x10')](_0x6ffc('0x14'),_0x1a85b8[_0x6ffc('0x12')],_0x2e4fc4);_0x256339(_0x307a6c['error'](0x1f4,_0x1a85b8[_0x6ffc('0x12')]));});});};exports[_0x6ffc('0x1a')]=function(_0x10511b){var _0x30f9f5=this;return new Promise(function(_0x2f818f,_0xc2cea8){return db[_0x6ffc('0x1b')]['update'](_0x10511b[_0x6ffc('0x16')],{'raw':_0x10511b[_0x6ffc('0x17')]?_0x10511b[_0x6ffc('0x17')][_0x6ffc('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x10511b[_0x6ffc('0x17')]?_0x10511b[_0x6ffc('0x17')][_0x6ffc('0x1d')]||null:null,'attributes':_0x10511b[_0x6ffc('0x17')]?_0x10511b['options']['attributes']||null:null,'limit':_0x10511b[_0x6ffc('0x17')]?_0x10511b['options']['limit']||null:null})['then'](function(_0x591099){logger[_0x6ffc('0x18')](_0x6ffc('0x1a'),_0x10511b);logger['debug']('UpdateVoiceAgentReport',_0x10511b,JSON[_0x6ffc('0xf')](_0x591099));_0x2f818f(_0x591099);})[_0x6ffc('0x13')](function(_0x45ff07){logger[_0x6ffc('0x10')](_0x6ffc('0x1a'),_0x45ff07[_0x6ffc('0x12')],_0x10511b);_0xc2cea8(_0x30f9f5[_0x6ffc('0x10')](0x1f4,_0x45ff07[_0x6ffc('0x12')]));});});};
\ No newline at end of file