Built motion from commit (unavailable).|2.5.21
[motion2.git] / server / api / voiceAgentReport / voiceAgentReport.rpc.js
index 540e4cd..e8185b8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-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
+var _0x9b84=['UpdateVoiceAgentReport','body','where','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','request','then','info','VoiceAgentReport,\x20%s,\x20%s','VoiceAgentReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','VoiceAgentReport','create','options','raw','CreateVoiceAgentReport','debug'];(function(_0x243b59,_0x3f9495){var _0x3e1676=function(_0x354052){while(--_0x354052){_0x243b59['push'](_0x243b59['shift']());}};_0x3e1676(++_0x3f9495);}(_0x9b84,0x158));var _0x49b8=function(_0x97c6ea,_0x4cffce){_0x97c6ea=_0x97c6ea-0x0;var _0x2d7f50=_0x9b84[_0x97c6ea];return _0x2d7f50;};'use strict';var _=require(_0x49b8('0x0'));var util=require(_0x49b8('0x1'));var moment=require(_0x49b8('0x2'));var BPromise=require('bluebird');var rs=require(_0x49b8('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x49b8('0x4'))['db'];var utils=require(_0x49b8('0x5'));var logger=require(_0x49b8('0x6'))(_0x49b8('0x7'));var config=require(_0x49b8('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x49b8('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0xafd4cc,_0x2315b7,_0x482281){return new BPromise(function(_0x1be8e0,_0x291bca){return client[_0x49b8('0xa')](_0xafd4cc,_0x482281)[_0x49b8('0xb')](function(_0x43072c){logger[_0x49b8('0xc')](_0x49b8('0xd'),_0x2315b7,'request\x20sent');logger['debug'](_0x49b8('0xe'),_0x2315b7,_0x49b8('0xf'),JSON[_0x49b8('0x10')](_0x43072c));if(_0x43072c[_0x49b8('0x11')]){if(_0x43072c['error'][_0x49b8('0x12')]===0x1f4){logger[_0x49b8('0x11')](_0x49b8('0xd'),_0x2315b7,_0x43072c['error'][_0x49b8('0x13')]);return _0x291bca(_0x43072c[_0x49b8('0x11')][_0x49b8('0x13')]);}logger[_0x49b8('0x11')]('VoiceAgentReport,\x20%s,\x20%s',_0x2315b7,_0x43072c[_0x49b8('0x11')]['message']);return _0x1be8e0(_0x43072c[_0x49b8('0x11')][_0x49b8('0x13')]);}else{logger[_0x49b8('0xc')]('VoiceAgentReport,\x20%s,\x20%s',_0x2315b7,_0x49b8('0xf'));_0x1be8e0(_0x43072c[_0x49b8('0x14')][_0x49b8('0x13')]);}})[_0x49b8('0x15')](function(_0x3065db){logger[_0x49b8('0x11')](_0x49b8('0xd'),_0x2315b7,_0x3065db);_0x291bca(_0x3065db);});});}exports['CreateVoiceAgentReport']=function(_0x538e78){var _0x59f279=this;return new Promise(function(_0x49572e,_0x3a4c0a){return db[_0x49b8('0x16')][_0x49b8('0x17')](_0x538e78['body'],{'raw':_0x538e78[_0x49b8('0x18')]?_0x538e78[_0x49b8('0x18')][_0x49b8('0x19')]===undefined?!![]:![]:!![]})[_0x49b8('0xb')](function(_0x51b665){logger[_0x49b8('0xc')](_0x49b8('0x1a'),_0x538e78);logger[_0x49b8('0x1b')](_0x49b8('0x1a'),_0x538e78,JSON[_0x49b8('0x10')](_0x51b665));_0x49572e(_0x51b665);})['catch'](function(_0x46322f){logger[_0x49b8('0x11')](_0x49b8('0x1a'),_0x46322f[_0x49b8('0x13')],_0x538e78);_0x3a4c0a(_0x59f279['error'](0x1f4,_0x46322f[_0x49b8('0x13')]));});});};exports[_0x49b8('0x1c')]=function(_0x18fa4a){var _0x21c856=this;return new Promise(function(_0x5dfb6e,_0x92a8ba){return db['VoiceAgentReport']['update'](_0x18fa4a[_0x49b8('0x1d')],{'raw':_0x18fa4a[_0x49b8('0x18')]?_0x18fa4a[_0x49b8('0x18')][_0x49b8('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x18fa4a['options']?_0x18fa4a[_0x49b8('0x18')][_0x49b8('0x1e')]||null:null,'attributes':_0x18fa4a[_0x49b8('0x18')]?_0x18fa4a['options']['attributes']||null:null,'limit':_0x18fa4a['options']?_0x18fa4a['options']['limit']||null:null})[_0x49b8('0xb')](function(_0x158371){logger[_0x49b8('0xc')](_0x49b8('0x1c'),_0x18fa4a);logger[_0x49b8('0x1b')](_0x49b8('0x1c'),_0x18fa4a,JSON[_0x49b8('0x10')](_0x158371));_0x5dfb6e(_0x158371);})[_0x49b8('0x15')](function(_0x11cad9){logger[_0x49b8('0x11')]('UpdateVoiceAgentReport',_0x11cad9[_0x49b8('0x13')],_0x18fa4a);_0x92a8ba(_0x21c856[_0x49b8('0x11')](0x1f4,_0x11cad9[_0x49b8('0x13')]));});});};
\ No newline at end of file