Built motion from commit 4c281f94.|2.6.31
[motion2.git] / server / api / voiceAgentReport / voiceAgentReport.rpc.js
index 5ceac1a..d0be1ae 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6b80=['VoiceAgentReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','VoiceAgentReport,\x20%s,\x20%s','message','info','result','catch','CreateVoiceAgentReport','VoiceAgentReport','create','body','options','raw','UpdateVoiceAgentReport','where','attributes','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','client','http','request','then','debug'];(function(_0x3dee92,_0x55e1eb){var _0x44d36e=function(_0x34de1a){while(--_0x34de1a){_0x3dee92['push'](_0x3dee92['shift']());}};_0x44d36e(++_0x55e1eb);}(_0x6b80,0x17e));var _0x06b8=function(_0x46efd7,_0x43f84d){_0x46efd7=_0x46efd7-0x0;var _0x5637e4=_0x6b80[_0x46efd7];return _0x5637e4;};'use strict';var _=require(_0x06b8('0x0'));var util=require('util');var moment=require(_0x06b8('0x1'));var BPromise=require(_0x06b8('0x2'));var rs=require(_0x06b8('0x3'));var fs=require('fs');var Redis=require(_0x06b8('0x4'));var db=require(_0x06b8('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x06b8('0x6'))(_0x06b8('0x7'));var config=require(_0x06b8('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x06b8('0x9')][_0x06b8('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x16f90c,_0x5008ea,_0x335c72){return new BPromise(function(_0x168f21,_0xbe267b){return client[_0x06b8('0xb')](_0x16f90c,_0x335c72)[_0x06b8('0xc')](function(_0x4afd21){logger['info']('VoiceAgentReport,\x20%s,\x20%s',_0x5008ea,'request\x20sent');logger[_0x06b8('0xd')](_0x06b8('0xe'),_0x5008ea,_0x06b8('0xf'),JSON[_0x06b8('0x10')](_0x4afd21));if(_0x4afd21['error']){if(_0x4afd21[_0x06b8('0x11')][_0x06b8('0x12')]===0x1f4){logger['error'](_0x06b8('0x13'),_0x5008ea,_0x4afd21[_0x06b8('0x11')][_0x06b8('0x14')]);return _0xbe267b(_0x4afd21[_0x06b8('0x11')][_0x06b8('0x14')]);}logger['error'](_0x06b8('0x13'),_0x5008ea,_0x4afd21[_0x06b8('0x11')][_0x06b8('0x14')]);return _0x168f21(_0x4afd21[_0x06b8('0x11')][_0x06b8('0x14')]);}else{logger[_0x06b8('0x15')](_0x06b8('0x13'),_0x5008ea,_0x06b8('0xf'));_0x168f21(_0x4afd21[_0x06b8('0x16')]['message']);}})[_0x06b8('0x17')](function(_0x1b9ad6){logger[_0x06b8('0x11')](_0x06b8('0x13'),_0x5008ea,_0x1b9ad6);_0xbe267b(_0x1b9ad6);});});}exports[_0x06b8('0x18')]=function(_0x19f0a8){var _0x46adf2=this;return new Promise(function(_0x10bca4,_0x407e0a){return db[_0x06b8('0x19')][_0x06b8('0x1a')](_0x19f0a8[_0x06b8('0x1b')],{'raw':_0x19f0a8['options']?_0x19f0a8[_0x06b8('0x1c')][_0x06b8('0x1d')]===undefined?!![]:![]:!![]})[_0x06b8('0xc')](function(_0x54e9a0){logger['info'](_0x06b8('0x18'),_0x19f0a8);logger[_0x06b8('0xd')](_0x06b8('0x18'),_0x19f0a8,JSON[_0x06b8('0x10')](_0x54e9a0));_0x10bca4(_0x54e9a0);})[_0x06b8('0x17')](function(_0x4aa485){logger[_0x06b8('0x11')](_0x06b8('0x18'),_0x4aa485[_0x06b8('0x14')],_0x19f0a8);_0x407e0a(_0x46adf2['error'](0x1f4,_0x4aa485[_0x06b8('0x14')]));});});};exports[_0x06b8('0x1e')]=function(_0x5b162c){var _0x56f5da=this;return new Promise(function(_0x34c304,_0x555b6f){return db['VoiceAgentReport']['update'](_0x5b162c[_0x06b8('0x1b')],{'raw':_0x5b162c['options']?_0x5b162c[_0x06b8('0x1c')][_0x06b8('0x1d')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5b162c[_0x06b8('0x1c')]?_0x5b162c[_0x06b8('0x1c')][_0x06b8('0x1f')]||null:null,'attributes':_0x5b162c[_0x06b8('0x1c')]?_0x5b162c[_0x06b8('0x1c')][_0x06b8('0x20')]||null:null,'limit':_0x5b162c[_0x06b8('0x1c')]?_0x5b162c[_0x06b8('0x1c')]['limit']||null:null})[_0x06b8('0xc')](function(_0x31a4af){logger[_0x06b8('0x15')](_0x06b8('0x1e'),_0x5b162c);logger[_0x06b8('0xd')](_0x06b8('0x1e'),_0x5b162c,JSON[_0x06b8('0x10')](_0x31a4af));_0x34c304(_0x31a4af);})['catch'](function(_0x5ac6d2){logger[_0x06b8('0x11')]('UpdateVoiceAgentReport',_0x5ac6d2[_0x06b8('0x14')],_0x5b162c);_0x555b6f(_0x56f5da[_0x06b8('0x11')](0x1f4,_0x5ac6d2[_0x06b8('0x14')]));});});};
\ No newline at end of file
+var _0x7f45=['../../config/environment','jayson/promise','client','http','request','then','VoiceAgentReport,\x20%s,\x20%s','debug','stringify','error','message','request\x20sent','result','CreateVoiceAgentReport','VoiceAgentReport','create','options','raw','info','catch','UpdateVoiceAgentReport','update','body','where','attributes','limit','lodash','moment','bluebird','randomstring','ioredis','../../config/logger','rpc'];(function(_0x229e80,_0x414425){var _0x30c4a4=function(_0x249225){while(--_0x249225){_0x229e80['push'](_0x229e80['shift']());}};_0x30c4a4(++_0x414425);}(_0x7f45,0x7d));var _0x57f4=function(_0x1e2a22,_0x582948){_0x1e2a22=_0x1e2a22-0x0;var _0x3dd61c=_0x7f45[_0x1e2a22];return _0x3dd61c;};'use strict';var _=require(_0x57f4('0x0'));var util=require('util');var moment=require(_0x57f4('0x1'));var BPromise=require(_0x57f4('0x2'));var rs=require(_0x57f4('0x3'));var fs=require('fs');var Redis=require(_0x57f4('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x57f4('0x5'))(_0x57f4('0x6'));var config=require(_0x57f4('0x7'));var jayson=require(_0x57f4('0x8'));var client=jayson[_0x57f4('0x9')][_0x57f4('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2f633d,_0x4863f1,_0x2f734a){return new BPromise(function(_0xa760e,_0x48dfc5){return client[_0x57f4('0xb')](_0x2f633d,_0x2f734a)[_0x57f4('0xc')](function(_0xef39e2){logger['info'](_0x57f4('0xd'),_0x4863f1,'request\x20sent');logger[_0x57f4('0xe')]('VoiceAgentReport,\x20%s,\x20%s,\x20%s',_0x4863f1,'request\x20sent',JSON[_0x57f4('0xf')](_0xef39e2));if(_0xef39e2['error']){if(_0xef39e2[_0x57f4('0x10')]['code']===0x1f4){logger['error'](_0x57f4('0xd'),_0x4863f1,_0xef39e2[_0x57f4('0x10')][_0x57f4('0x11')]);return _0x48dfc5(_0xef39e2[_0x57f4('0x10')][_0x57f4('0x11')]);}logger[_0x57f4('0x10')](_0x57f4('0xd'),_0x4863f1,_0xef39e2[_0x57f4('0x10')][_0x57f4('0x11')]);return _0xa760e(_0xef39e2[_0x57f4('0x10')]['message']);}else{logger['info'](_0x57f4('0xd'),_0x4863f1,_0x57f4('0x12'));_0xa760e(_0xef39e2[_0x57f4('0x13')][_0x57f4('0x11')]);}})['catch'](function(_0x41c281){logger[_0x57f4('0x10')](_0x57f4('0xd'),_0x4863f1,_0x41c281);_0x48dfc5(_0x41c281);});});}exports[_0x57f4('0x14')]=function(_0x4a96a4){var _0x4e2826=this;return new Promise(function(_0x4ed2a9,_0x492a28){return db[_0x57f4('0x15')][_0x57f4('0x16')](_0x4a96a4['body'],{'raw':_0x4a96a4[_0x57f4('0x17')]?_0x4a96a4[_0x57f4('0x17')][_0x57f4('0x18')]===undefined?!![]:![]:!![]})['then'](function(_0x2640b0){logger[_0x57f4('0x19')](_0x57f4('0x14'),_0x4a96a4);logger[_0x57f4('0xe')](_0x57f4('0x14'),_0x4a96a4,JSON[_0x57f4('0xf')](_0x2640b0));_0x4ed2a9(_0x2640b0);})[_0x57f4('0x1a')](function(_0x4bd12a){logger[_0x57f4('0x10')]('CreateVoiceAgentReport',_0x4bd12a[_0x57f4('0x11')],_0x4a96a4);_0x492a28(_0x4e2826[_0x57f4('0x10')](0x1f4,_0x4bd12a[_0x57f4('0x11')]));});});};exports[_0x57f4('0x1b')]=function(_0x3b4318){var _0x161747=this;return new Promise(function(_0x5e3aef,_0x40a77a){return db[_0x57f4('0x15')][_0x57f4('0x1c')](_0x3b4318[_0x57f4('0x1d')],{'raw':_0x3b4318['options']?_0x3b4318[_0x57f4('0x17')][_0x57f4('0x18')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3b4318['options']?_0x3b4318[_0x57f4('0x17')][_0x57f4('0x1e')]||null:null,'attributes':_0x3b4318['options']?_0x3b4318['options'][_0x57f4('0x1f')]||null:null,'limit':_0x3b4318[_0x57f4('0x17')]?_0x3b4318['options'][_0x57f4('0x20')]||null:null})[_0x57f4('0xc')](function(_0x27fc8c){logger['info'](_0x57f4('0x1b'),_0x3b4318);logger[_0x57f4('0xe')](_0x57f4('0x1b'),_0x3b4318,JSON[_0x57f4('0xf')](_0x27fc8c));_0x5e3aef(_0x27fc8c);})[_0x57f4('0x1a')](function(_0x397a54){logger['error']('UpdateVoiceAgentReport',_0x397a54[_0x57f4('0x11')],_0x3b4318);_0x40a77a(_0x161747[_0x57f4('0x10')](0x1f4,_0x397a54[_0x57f4('0x11')]));});});};
\ No newline at end of file