Built motion from commit (unavailable).|2.5.26
[motion2.git] / server / api / voiceAgentReport / voiceAgentReport.rpc.js
index a0a72dc..540e4cd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x404e=['../../config/logger','rpc','jayson/promise','client','http','request','then','VoiceAgentReport,\x20%s,\x20%s','debug','VoiceAgentReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','catch','create','body','options','info','CreateVoiceAgentReport','UpdateVoiceAgentReport','update','raw','where','attributes','lodash','util','moment','bluebird','ioredis','../../config/utils'];(function(_0x1250fa,_0x3ac79f){var _0x2f4a44=function(_0x2c2a5c){while(--_0x2c2a5c){_0x1250fa['push'](_0x1250fa['shift']());}};_0x2f4a44(++_0x3ac79f);}(_0x404e,0x1ea));var _0xe404=function(_0x3299d1,_0x545733){_0x3299d1=_0x3299d1-0x0;var _0x44356e=_0x404e[_0x3299d1];return _0x44356e;};'use strict';var _=require(_0xe404('0x0'));var util=require(_0xe404('0x1'));var moment=require(_0xe404('0x2'));var BPromise=require(_0xe404('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xe404('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xe404('0x5'));var logger=require(_0xe404('0x6'))(_0xe404('0x7'));var config=require('../../config/environment');var jayson=require(_0xe404('0x8'));var client=jayson[_0xe404('0x9')][_0xe404('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x260581,_0x15fdb6,_0x263ff8){return new BPromise(function(_0x264582,_0x2c8c11){return client[_0xe404('0xb')](_0x260581,_0x263ff8)[_0xe404('0xc')](function(_0x166458){logger['info'](_0xe404('0xd'),_0x15fdb6,'request\x20sent');logger[_0xe404('0xe')](_0xe404('0xf'),_0x15fdb6,_0xe404('0x10'),JSON[_0xe404('0x11')](_0x166458));if(_0x166458['error']){if(_0x166458[_0xe404('0x12')]['code']===0x1f4){logger[_0xe404('0x12')](_0xe404('0xd'),_0x15fdb6,_0x166458[_0xe404('0x12')]['message']);return _0x2c8c11(_0x166458[_0xe404('0x12')][_0xe404('0x13')]);}logger['error']('VoiceAgentReport,\x20%s,\x20%s',_0x15fdb6,_0x166458['error'][_0xe404('0x13')]);return _0x264582(_0x166458['error'][_0xe404('0x13')]);}else{logger['info'](_0xe404('0xd'),_0x15fdb6,'request\x20sent');_0x264582(_0x166458['result'][_0xe404('0x13')]);}})[_0xe404('0x14')](function(_0x406d5b){logger['error']('VoiceAgentReport,\x20%s,\x20%s',_0x15fdb6,_0x406d5b);_0x2c8c11(_0x406d5b);});});}exports['CreateVoiceAgentReport']=function(_0x3adbdb){var _0x1935b8=this;return new Promise(function(_0xc46f53,_0x2c3807){return db['VoiceAgentReport'][_0xe404('0x15')](_0x3adbdb[_0xe404('0x16')],{'raw':_0x3adbdb[_0xe404('0x17')]?_0x3adbdb[_0xe404('0x17')]['raw']===undefined?!![]:![]:!![]})[_0xe404('0xc')](function(_0x3a7cb5){logger[_0xe404('0x18')](_0xe404('0x19'),_0x3adbdb);logger['debug'](_0xe404('0x19'),_0x3adbdb,JSON[_0xe404('0x11')](_0x3a7cb5));_0xc46f53(_0x3a7cb5);})[_0xe404('0x14')](function(_0x4b957e){logger[_0xe404('0x12')](_0xe404('0x19'),_0x4b957e[_0xe404('0x13')],_0x3adbdb);_0x2c3807(_0x1935b8[_0xe404('0x12')](0x1f4,_0x4b957e[_0xe404('0x13')]));});});};exports[_0xe404('0x1a')]=function(_0x148aea){var _0x5e6261=this;return new Promise(function(_0x336e1d,_0x246488){return db['VoiceAgentReport'][_0xe404('0x1b')](_0x148aea['body'],{'raw':_0x148aea[_0xe404('0x17')]?_0x148aea[_0xe404('0x17')][_0xe404('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x148aea[_0xe404('0x17')]?_0x148aea[_0xe404('0x17')][_0xe404('0x1d')]||null:null,'attributes':_0x148aea[_0xe404('0x17')]?_0x148aea[_0xe404('0x17')][_0xe404('0x1e')]||null:null,'limit':_0x148aea[_0xe404('0x17')]?_0x148aea[_0xe404('0x17')]['limit']||null:null})['then'](function(_0x3846b9){logger[_0xe404('0x18')](_0xe404('0x1a'),_0x148aea);logger[_0xe404('0xe')](_0xe404('0x1a'),_0x148aea,JSON[_0xe404('0x11')](_0x3846b9));_0x336e1d(_0x3846b9);})[_0xe404('0x14')](function(_0xe7513c){logger[_0xe404('0x12')](_0xe404('0x1a'),_0xe7513c[_0xe404('0x13')],_0x148aea);_0x246488(_0x5e6261[_0xe404('0x12')](0x1f4,_0xe7513c[_0xe404('0x13')]));});});};
\ No newline at end of file
+var _0x4f50=['limit','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','VoiceAgentReport,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','VoiceAgentReport,\x20%s,\x20%s','message','result','CreateVoiceAgentReport','create','body','options','raw','debug','stringify','UpdateVoiceAgentReport','VoiceAgentReport','where'];(function(_0x18b344,_0x271f68){var _0x5ef6bb=function(_0x3345b3){while(--_0x3345b3){_0x18b344['push'](_0x18b344['shift']());}};_0x5ef6bb(++_0x271f68);}(_0x4f50,0xac));var _0x04f5=function(_0x1919cc,_0x4ab36e){_0x1919cc=_0x1919cc-0x0;var _0x1d8134=_0x4f50[_0x1919cc];return _0x1d8134;};'use strict';var _=require(_0x04f5('0x0'));var util=require(_0x04f5('0x1'));var moment=require('moment');var BPromise=require(_0x04f5('0x2'));var rs=require(_0x04f5('0x3'));var fs=require('fs');var Redis=require(_0x04f5('0x4'));var db=require(_0x04f5('0x5'))['db'];var utils=require(_0x04f5('0x6'));var logger=require(_0x04f5('0x7'))('rpc');var config=require(_0x04f5('0x8'));var jayson=require(_0x04f5('0x9'));var client=jayson[_0x04f5('0xa')][_0x04f5('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x562361,_0x253f59,_0x23d7c4){return new BPromise(function(_0x3a468e,_0x5976f7){return client[_0x04f5('0xc')](_0x562361,_0x23d7c4)[_0x04f5('0xd')](function(_0x38662a){logger[_0x04f5('0xe')]('VoiceAgentReport,\x20%s,\x20%s',_0x253f59,'request\x20sent');logger['debug'](_0x04f5('0xf'),_0x253f59,_0x04f5('0x10'),JSON['stringify'](_0x38662a));if(_0x38662a[_0x04f5('0x11')]){if(_0x38662a['error'][_0x04f5('0x12')]===0x1f4){logger[_0x04f5('0x11')](_0x04f5('0x13'),_0x253f59,_0x38662a['error']['message']);return _0x5976f7(_0x38662a[_0x04f5('0x11')]['message']);}logger[_0x04f5('0x11')](_0x04f5('0x13'),_0x253f59,_0x38662a[_0x04f5('0x11')][_0x04f5('0x14')]);return _0x3a468e(_0x38662a['error'][_0x04f5('0x14')]);}else{logger['info'](_0x04f5('0x13'),_0x253f59,_0x04f5('0x10'));_0x3a468e(_0x38662a[_0x04f5('0x15')][_0x04f5('0x14')]);}})['catch'](function(_0x2715e4){logger[_0x04f5('0x11')]('VoiceAgentReport,\x20%s,\x20%s',_0x253f59,_0x2715e4);_0x5976f7(_0x2715e4);});});}exports[_0x04f5('0x16')]=function(_0xb9b5df){var _0x2e9092=this;return new Promise(function(_0x126533,_0x2c8721){return db['VoiceAgentReport'][_0x04f5('0x17')](_0xb9b5df[_0x04f5('0x18')],{'raw':_0xb9b5df['options']?_0xb9b5df[_0x04f5('0x19')][_0x04f5('0x1a')]===undefined?!![]:![]:!![]})[_0x04f5('0xd')](function(_0x55f0c1){logger[_0x04f5('0xe')](_0x04f5('0x16'),_0xb9b5df);logger[_0x04f5('0x1b')](_0x04f5('0x16'),_0xb9b5df,JSON[_0x04f5('0x1c')](_0x55f0c1));_0x126533(_0x55f0c1);})['catch'](function(_0xcc1887){logger['error'](_0x04f5('0x16'),_0xcc1887[_0x04f5('0x14')],_0xb9b5df);_0x2c8721(_0x2e9092[_0x04f5('0x11')](0x1f4,_0xcc1887[_0x04f5('0x14')]));});});};exports[_0x04f5('0x1d')]=function(_0x4031ce){var _0x51b1dc=this;return new Promise(function(_0x5e67f4,_0x3f093e){return db[_0x04f5('0x1e')]['update'](_0x4031ce[_0x04f5('0x18')],{'raw':_0x4031ce['options']?_0x4031ce['options'][_0x04f5('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4031ce[_0x04f5('0x19')]?_0x4031ce['options'][_0x04f5('0x1f')]||null:null,'attributes':_0x4031ce['options']?_0x4031ce['options']['attributes']||null:null,'limit':_0x4031ce['options']?_0x4031ce['options'][_0x04f5('0x20')]||null:null})['then'](function(_0x4c8826){logger[_0x04f5('0xe')]('UpdateVoiceAgentReport',_0x4031ce);logger[_0x04f5('0x1b')]('UpdateVoiceAgentReport',_0x4031ce,JSON[_0x04f5('0x1c')](_0x4c8826));_0x5e67f4(_0x4c8826);})[_0x04f5('0x21')](function(_0x331028){logger[_0x04f5('0x11')](_0x04f5('0x1d'),_0x331028[_0x04f5('0x14')],_0x4031ce);_0x3f093e(_0x51b1dc[_0x04f5('0x11')](0x1f4,_0x331028[_0x04f5('0x14')]));});});};
\ No newline at end of file