Built motion from commit 3c2ce842.|2.6.31
[motion2.git] / server / api / voiceAgentReport / voiceAgentReport.rpc.js
index 76b1f02..a7596d4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x33a4=['create','options','raw','UpdateVoiceAgentReport','update','attributes','limit','util','moment','bluebird','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','VoiceAgentReport,\x20%s,\x20%s','request\x20sent','debug','VoiceAgentReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','CreateVoiceAgentReport','VoiceAgentReport'];(function(_0x2c0dc0,_0x19900d){var _0x4c0990=function(_0x530791){while(--_0x530791){_0x2c0dc0['push'](_0x2c0dc0['shift']());}};_0x4c0990(++_0x19900d);}(_0x33a4,0xf7));var _0x433a=function(_0x2c935b,_0x5e4857){_0x2c935b=_0x2c935b-0x0;var _0x4829a6=_0x33a4[_0x2c935b];return _0x4829a6;};'use strict';var _=require('lodash');var util=require(_0x433a('0x0'));var moment=require(_0x433a('0x1'));var BPromise=require(_0x433a('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x433a('0x3'))(_0x433a('0x4'));var config=require(_0x433a('0x5'));var jayson=require(_0x433a('0x6'));var client=jayson[_0x433a('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1ba5c7,_0x2b5396,_0x2c8d6c){return new BPromise(function(_0x256d94,_0x326321){return client[_0x433a('0x8')](_0x1ba5c7,_0x2c8d6c)[_0x433a('0x9')](function(_0x4d38e4){logger[_0x433a('0xa')](_0x433a('0xb'),_0x2b5396,_0x433a('0xc'));logger[_0x433a('0xd')](_0x433a('0xe'),_0x2b5396,_0x433a('0xc'),JSON[_0x433a('0xf')](_0x4d38e4));if(_0x4d38e4[_0x433a('0x10')]){if(_0x4d38e4['error'][_0x433a('0x11')]===0x1f4){logger[_0x433a('0x10')](_0x433a('0xb'),_0x2b5396,_0x4d38e4[_0x433a('0x10')][_0x433a('0x12')]);return _0x326321(_0x4d38e4[_0x433a('0x10')][_0x433a('0x12')]);}logger[_0x433a('0x10')]('VoiceAgentReport,\x20%s,\x20%s',_0x2b5396,_0x4d38e4[_0x433a('0x10')][_0x433a('0x12')]);return _0x256d94(_0x4d38e4[_0x433a('0x10')]['message']);}else{logger[_0x433a('0xa')](_0x433a('0xb'),_0x2b5396,_0x433a('0xc'));_0x256d94(_0x4d38e4[_0x433a('0x13')][_0x433a('0x12')]);}})[_0x433a('0x14')](function(_0x3c39e9){logger[_0x433a('0x10')]('VoiceAgentReport,\x20%s,\x20%s',_0x2b5396,_0x3c39e9);_0x326321(_0x3c39e9);});});}exports[_0x433a('0x15')]=function(_0xfad8fb){var _0x412600=this;return new Promise(function(_0x3a2dbd,_0x23db71){return db[_0x433a('0x16')][_0x433a('0x17')](_0xfad8fb['body'],{'raw':_0xfad8fb[_0x433a('0x18')]?_0xfad8fb[_0x433a('0x18')][_0x433a('0x19')]===undefined?!![]:![]:!![]})[_0x433a('0x9')](function(_0x15bc46){logger[_0x433a('0xa')]('CreateVoiceAgentReport',_0xfad8fb);logger[_0x433a('0xd')](_0x433a('0x15'),_0xfad8fb,JSON['stringify'](_0x15bc46));_0x3a2dbd(_0x15bc46);})[_0x433a('0x14')](function(_0x251cc1){logger[_0x433a('0x10')](_0x433a('0x15'),_0x251cc1[_0x433a('0x12')],_0xfad8fb);_0x23db71(_0x412600[_0x433a('0x10')](0x1f4,_0x251cc1[_0x433a('0x12')]));});});};exports[_0x433a('0x1a')]=function(_0x839594){var _0x1769c3=this;return new Promise(function(_0x2d74dc,_0x51c99d){return db[_0x433a('0x16')][_0x433a('0x1b')](_0x839594['body'],{'raw':_0x839594[_0x433a('0x18')]?_0x839594[_0x433a('0x18')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x839594['options']?_0x839594['options']['where']||null:null,'attributes':_0x839594['options']?_0x839594[_0x433a('0x18')][_0x433a('0x1c')]||null:null,'limit':_0x839594['options']?_0x839594[_0x433a('0x18')][_0x433a('0x1d')]||null:null})[_0x433a('0x9')](function(_0x45c15c){logger[_0x433a('0xa')](_0x433a('0x1a'),_0x839594);logger[_0x433a('0xd')](_0x433a('0x1a'),_0x839594,JSON['stringify'](_0x45c15c));_0x2d74dc(_0x45c15c);})[_0x433a('0x14')](function(_0x34b6a7){logger['error'](_0x433a('0x1a'),_0x34b6a7[_0x433a('0x12')],_0x839594);_0x51c99d(_0x1769c3[_0x433a('0x10')](0x1f4,_0x34b6a7[_0x433a('0x12')]));});});};
\ No newline at end of file
+var _0x8d3a=['error','code','message','result','CreateVoiceAgentReport','VoiceAgentReport','create','options','raw','catch','update','body','attributes','UpdateVoiceAgentReport','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','http','then','info','VoiceAgentReport,\x20%s,\x20%s','request\x20sent','debug','stringify'];(function(_0x56fbf6,_0x14fa32){var _0x33722b=function(_0x3b34c3){while(--_0x3b34c3){_0x56fbf6['push'](_0x56fbf6['shift']());}};_0x33722b(++_0x14fa32);}(_0x8d3a,0x1df));var _0xa8d3=function(_0x368c75,_0x386385){_0x368c75=_0x368c75-0x0;var _0x2d7a2b=_0x8d3a[_0x368c75];return _0x2d7a2b;};'use strict';var _=require(_0xa8d3('0x0'));var util=require(_0xa8d3('0x1'));var moment=require('moment');var BPromise=require(_0xa8d3('0x2'));var rs=require(_0xa8d3('0x3'));var fs=require('fs');var Redis=require(_0xa8d3('0x4'));var db=require(_0xa8d3('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xa8d3('0x6'))('rpc');var config=require(_0xa8d3('0x7'));var jayson=require(_0xa8d3('0x8'));var client=jayson[_0xa8d3('0x9')][_0xa8d3('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x49904a,_0x4e2fa8,_0x54e948){return new BPromise(function(_0xbb0371,_0x2eeed7){return client['request'](_0x49904a,_0x54e948)[_0xa8d3('0xb')](function(_0x16d924){logger[_0xa8d3('0xc')](_0xa8d3('0xd'),_0x4e2fa8,_0xa8d3('0xe'));logger[_0xa8d3('0xf')]('VoiceAgentReport,\x20%s,\x20%s,\x20%s',_0x4e2fa8,_0xa8d3('0xe'),JSON[_0xa8d3('0x10')](_0x16d924));if(_0x16d924['error']){if(_0x16d924[_0xa8d3('0x11')][_0xa8d3('0x12')]===0x1f4){logger[_0xa8d3('0x11')](_0xa8d3('0xd'),_0x4e2fa8,_0x16d924['error'][_0xa8d3('0x13')]);return _0x2eeed7(_0x16d924[_0xa8d3('0x11')][_0xa8d3('0x13')]);}logger[_0xa8d3('0x11')](_0xa8d3('0xd'),_0x4e2fa8,_0x16d924[_0xa8d3('0x11')]['message']);return _0xbb0371(_0x16d924[_0xa8d3('0x11')]['message']);}else{logger['info'](_0xa8d3('0xd'),_0x4e2fa8,_0xa8d3('0xe'));_0xbb0371(_0x16d924[_0xa8d3('0x14')][_0xa8d3('0x13')]);}})['catch'](function(_0xa7b9a5){logger[_0xa8d3('0x11')](_0xa8d3('0xd'),_0x4e2fa8,_0xa7b9a5);_0x2eeed7(_0xa7b9a5);});});}exports[_0xa8d3('0x15')]=function(_0x20b500){var _0x1c4cae=this;return new Promise(function(_0x626b4c,_0xe951cf){return db[_0xa8d3('0x16')][_0xa8d3('0x17')](_0x20b500['body'],{'raw':_0x20b500[_0xa8d3('0x18')]?_0x20b500['options'][_0xa8d3('0x19')]===undefined?!![]:![]:!![]})[_0xa8d3('0xb')](function(_0x5c452c){logger[_0xa8d3('0xc')]('CreateVoiceAgentReport',_0x20b500);logger[_0xa8d3('0xf')](_0xa8d3('0x15'),_0x20b500,JSON[_0xa8d3('0x10')](_0x5c452c));_0x626b4c(_0x5c452c);})[_0xa8d3('0x1a')](function(_0x2a0bb5){logger[_0xa8d3('0x11')]('CreateVoiceAgentReport',_0x2a0bb5['message'],_0x20b500);_0xe951cf(_0x1c4cae[_0xa8d3('0x11')](0x1f4,_0x2a0bb5['message']));});});};exports['UpdateVoiceAgentReport']=function(_0x353ff9){var _0x37a9a1=this;return new Promise(function(_0x2fc25c,_0x2c1b7f){return db[_0xa8d3('0x16')][_0xa8d3('0x1b')](_0x353ff9[_0xa8d3('0x1c')],{'raw':_0x353ff9[_0xa8d3('0x18')]?_0x353ff9[_0xa8d3('0x18')][_0xa8d3('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x353ff9[_0xa8d3('0x18')]?_0x353ff9['options']['where']||null:null,'attributes':_0x353ff9[_0xa8d3('0x18')]?_0x353ff9[_0xa8d3('0x18')][_0xa8d3('0x1d')]||null:null,'limit':_0x353ff9[_0xa8d3('0x18')]?_0x353ff9[_0xa8d3('0x18')]['limit']||null:null})[_0xa8d3('0xb')](function(_0x2e09a1){logger[_0xa8d3('0xc')](_0xa8d3('0x1e'),_0x353ff9);logger[_0xa8d3('0xf')](_0xa8d3('0x1e'),_0x353ff9,JSON[_0xa8d3('0x10')](_0x2e09a1));_0x2fc25c(_0x2e09a1);})[_0xa8d3('0x1a')](function(_0x2725e1){logger['error'](_0xa8d3('0x1e'),_0x2725e1[_0xa8d3('0x13')],_0x353ff9);_0x2c1b7f(_0x37a9a1['error'](0x1f4,_0x2725e1[_0xa8d3('0x13')]));});});};
\ No newline at end of file