Built motion from commit 42801a18.|2.6.28
[motion2.git] / server / api / voiceAgentReport / voiceAgentReport.rpc.js
index 4858428..c48d197 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x21f0=['result','VoiceAgentReport','body','options','CreateVoiceAgentReport','catch','raw','attributes','limit','UpdateVoiceAgentReport','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','request','then','VoiceAgentReport,\x20%s,\x20%s','request\x20sent','debug','VoiceAgentReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info'];(function(_0x3cf8a2,_0x274643){var _0xed3b07=function(_0x29b517){while(--_0x29b517){_0x3cf8a2['push'](_0x3cf8a2['shift']());}};_0xed3b07(++_0x274643);}(_0x21f0,0x1da));var _0x021f=function(_0x7287a3,_0x12dd92){_0x7287a3=_0x7287a3-0x0;var _0xc22b00=_0x21f0[_0x7287a3];return _0xc22b00;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0x021f('0x0'));var rs=require(_0x021f('0x1'));var fs=require('fs');var Redis=require(_0x021f('0x2'));var db=require(_0x021f('0x3'))['db'];var utils=require(_0x021f('0x4'));var logger=require(_0x021f('0x5'))('rpc');var config=require(_0x021f('0x6'));var jayson=require(_0x021f('0x7'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x3984a1,_0x160977,_0x23287d){return new BPromise(function(_0x230457,_0x4f4b34){return client[_0x021f('0x8')](_0x3984a1,_0x23287d)[_0x021f('0x9')](function(_0x3304b5){logger['info'](_0x021f('0xa'),_0x160977,_0x021f('0xb'));logger[_0x021f('0xc')](_0x021f('0xd'),_0x160977,_0x021f('0xb'),JSON[_0x021f('0xe')](_0x3304b5));if(_0x3304b5['error']){if(_0x3304b5[_0x021f('0xf')][_0x021f('0x10')]===0x1f4){logger[_0x021f('0xf')](_0x021f('0xa'),_0x160977,_0x3304b5['error'][_0x021f('0x11')]);return _0x4f4b34(_0x3304b5[_0x021f('0xf')][_0x021f('0x11')]);}logger[_0x021f('0xf')]('VoiceAgentReport,\x20%s,\x20%s',_0x160977,_0x3304b5['error'][_0x021f('0x11')]);return _0x230457(_0x3304b5[_0x021f('0xf')][_0x021f('0x11')]);}else{logger[_0x021f('0x12')](_0x021f('0xa'),_0x160977,'request\x20sent');_0x230457(_0x3304b5[_0x021f('0x13')]['message']);}})['catch'](function(_0x5749c4){logger['error'](_0x021f('0xa'),_0x160977,_0x5749c4);_0x4f4b34(_0x5749c4);});});}exports['CreateVoiceAgentReport']=function(_0x39d9b7){var _0x419b63=this;return new Promise(function(_0x1b5084,_0x1af63d){return db[_0x021f('0x14')]['create'](_0x39d9b7[_0x021f('0x15')],{'raw':_0x39d9b7[_0x021f('0x16')]?_0x39d9b7[_0x021f('0x16')]['raw']===undefined?!![]:![]:!![]})[_0x021f('0x9')](function(_0xfa22ab){logger[_0x021f('0x12')]('CreateVoiceAgentReport',_0x39d9b7);logger[_0x021f('0xc')](_0x021f('0x17'),_0x39d9b7,JSON['stringify'](_0xfa22ab));_0x1b5084(_0xfa22ab);})[_0x021f('0x18')](function(_0x4e6e8a){logger[_0x021f('0xf')](_0x021f('0x17'),_0x4e6e8a[_0x021f('0x11')],_0x39d9b7);_0x1af63d(_0x419b63[_0x021f('0xf')](0x1f4,_0x4e6e8a[_0x021f('0x11')]));});});};exports['UpdateVoiceAgentReport']=function(_0x462dcc){var _0x430307=this;return new Promise(function(_0x1d069a,_0x2fc2f0){return db[_0x021f('0x14')]['update'](_0x462dcc[_0x021f('0x15')],{'raw':_0x462dcc[_0x021f('0x16')]?_0x462dcc[_0x021f('0x16')][_0x021f('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x462dcc[_0x021f('0x16')]?_0x462dcc[_0x021f('0x16')]['where']||null:null,'attributes':_0x462dcc['options']?_0x462dcc[_0x021f('0x16')][_0x021f('0x1a')]||null:null,'limit':_0x462dcc[_0x021f('0x16')]?_0x462dcc[_0x021f('0x16')][_0x021f('0x1b')]||null:null})[_0x021f('0x9')](function(_0x222028){logger[_0x021f('0x12')](_0x021f('0x1c'),_0x462dcc);logger[_0x021f('0xc')](_0x021f('0x1c'),_0x462dcc,JSON[_0x021f('0xe')](_0x222028));_0x1d069a(_0x222028);})['catch'](function(_0x45e200){logger[_0x021f('0xf')](_0x021f('0x1c'),_0x45e200[_0x021f('0x11')],_0x462dcc);_0x2fc2f0(_0x430307[_0x021f('0xf')](0x1f4,_0x45e200['message']));});});};
\ No newline at end of file
+var _0x76da=['request','then','info','VoiceAgentReport,\x20%s,\x20%s','request\x20sent','debug','VoiceAgentReport,\x20%s,\x20%s,\x20%s','stringify','code','error','message','result','catch','VoiceAgentReport','create','body','options','raw','CreateVoiceAgentReport','update','where','attributes','limit','UpdateVoiceAgentReport','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','client','http'];(function(_0x5c1313,_0x298d41){var _0x11ad57=function(_0x24dde7){while(--_0x24dde7){_0x5c1313['push'](_0x5c1313['shift']());}};_0x11ad57(++_0x298d41);}(_0x76da,0xc7));var _0xa76d=function(_0x19b70f,_0x3fdbe9){_0x19b70f=_0x19b70f-0x0;var _0x4bce32=_0x76da[_0x19b70f];return _0x4bce32;};'use strict';var _=require('lodash');var util=require(_0xa76d('0x0'));var moment=require(_0xa76d('0x1'));var BPromise=require(_0xa76d('0x2'));var rs=require(_0xa76d('0x3'));var fs=require('fs');var Redis=require(_0xa76d('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xa76d('0x5'));var logger=require(_0xa76d('0x6'))(_0xa76d('0x7'));var config=require(_0xa76d('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xa76d('0x9')][_0xa76d('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x5b5a4e,_0x44862f,_0x22bc25){return new BPromise(function(_0x3de231,_0x27c5c1){return client[_0xa76d('0xb')](_0x5b5a4e,_0x22bc25)[_0xa76d('0xc')](function(_0x23d796){logger[_0xa76d('0xd')](_0xa76d('0xe'),_0x44862f,_0xa76d('0xf'));logger[_0xa76d('0x10')](_0xa76d('0x11'),_0x44862f,'request\x20sent',JSON[_0xa76d('0x12')](_0x23d796));if(_0x23d796['error']){if(_0x23d796['error'][_0xa76d('0x13')]===0x1f4){logger[_0xa76d('0x14')]('VoiceAgentReport,\x20%s,\x20%s',_0x44862f,_0x23d796['error']['message']);return _0x27c5c1(_0x23d796[_0xa76d('0x14')]['message']);}logger[_0xa76d('0x14')](_0xa76d('0xe'),_0x44862f,_0x23d796['error'][_0xa76d('0x15')]);return _0x3de231(_0x23d796[_0xa76d('0x14')][_0xa76d('0x15')]);}else{logger[_0xa76d('0xd')](_0xa76d('0xe'),_0x44862f,'request\x20sent');_0x3de231(_0x23d796[_0xa76d('0x16')][_0xa76d('0x15')]);}})[_0xa76d('0x17')](function(_0xa73685){logger['error']('VoiceAgentReport,\x20%s,\x20%s',_0x44862f,_0xa73685);_0x27c5c1(_0xa73685);});});}exports['CreateVoiceAgentReport']=function(_0x59afcb){var _0x55717c=this;return new Promise(function(_0xa460bc,_0x3ebf9c){return db[_0xa76d('0x18')][_0xa76d('0x19')](_0x59afcb[_0xa76d('0x1a')],{'raw':_0x59afcb[_0xa76d('0x1b')]?_0x59afcb[_0xa76d('0x1b')][_0xa76d('0x1c')]===undefined?!![]:![]:!![]})['then'](function(_0x2bd70e){logger[_0xa76d('0xd')](_0xa76d('0x1d'),_0x59afcb);logger['debug'](_0xa76d('0x1d'),_0x59afcb,JSON[_0xa76d('0x12')](_0x2bd70e));_0xa460bc(_0x2bd70e);})[_0xa76d('0x17')](function(_0x2f302e){logger[_0xa76d('0x14')](_0xa76d('0x1d'),_0x2f302e['message'],_0x59afcb);_0x3ebf9c(_0x55717c[_0xa76d('0x14')](0x1f4,_0x2f302e[_0xa76d('0x15')]));});});};exports['UpdateVoiceAgentReport']=function(_0x2a5540){var _0xa6e28a=this;return new Promise(function(_0x55d43d,_0x4b4f51){return db[_0xa76d('0x18')][_0xa76d('0x1e')](_0x2a5540[_0xa76d('0x1a')],{'raw':_0x2a5540[_0xa76d('0x1b')]?_0x2a5540[_0xa76d('0x1b')][_0xa76d('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2a5540[_0xa76d('0x1b')]?_0x2a5540[_0xa76d('0x1b')][_0xa76d('0x1f')]||null:null,'attributes':_0x2a5540[_0xa76d('0x1b')]?_0x2a5540['options'][_0xa76d('0x20')]||null:null,'limit':_0x2a5540[_0xa76d('0x1b')]?_0x2a5540[_0xa76d('0x1b')][_0xa76d('0x21')]||null:null})[_0xa76d('0xc')](function(_0x48397b){logger[_0xa76d('0xd')]('UpdateVoiceAgentReport',_0x2a5540);logger[_0xa76d('0x10')](_0xa76d('0x22'),_0x2a5540,JSON[_0xa76d('0x12')](_0x48397b));_0x55d43d(_0x48397b);})[_0xa76d('0x17')](function(_0x4d2946){logger[_0xa76d('0x14')](_0xa76d('0x22'),_0x4d2946[_0xa76d('0x15')],_0x2a5540);_0x4b4f51(_0xa6e28a[_0xa76d('0x14')](0x1f4,_0x4d2946[_0xa76d('0x15')]));});});};
\ No newline at end of file