Built motion from commit 3c2ce842.|2.6.31
[motion2.git] / server / api / voiceAgentReport / voiceAgentReport.rpc.js
index a7596d4..f987e78 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-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
+var _0x4c69=['lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','request','then','VoiceAgentReport,\x20%s,\x20%s','request\x20sent','debug','VoiceAgentReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','catch','CreateVoiceAgentReport','create','body','options','raw','UpdateVoiceAgentReport','VoiceAgentReport','update','where','attributes','limit'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x4c69,0xd2));var _0x94c6=function(_0x3b26f9,_0x1b8421){_0x3b26f9=_0x3b26f9-0x0;var _0x1e6efc=_0x4c69[_0x3b26f9];return _0x1e6efc;};'use strict';var _=require(_0x94c6('0x0'));var util=require(_0x94c6('0x1'));var moment=require(_0x94c6('0x2'));var BPromise=require(_0x94c6('0x3'));var rs=require(_0x94c6('0x4'));var fs=require('fs');var Redis=require(_0x94c6('0x5'));var db=require(_0x94c6('0x6'))['db'];var utils=require(_0x94c6('0x7'));var logger=require(_0x94c6('0x8'))(_0x94c6('0x9'));var config=require(_0x94c6('0xa'));var jayson=require('jayson/promise');var client=jayson[_0x94c6('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x316273,_0x4618f3,_0x52ac87){return new BPromise(function(_0xe98376,_0x4d3ea4){return client[_0x94c6('0xc')](_0x316273,_0x52ac87)[_0x94c6('0xd')](function(_0x63364a){logger['info'](_0x94c6('0xe'),_0x4618f3,_0x94c6('0xf'));logger[_0x94c6('0x10')](_0x94c6('0x11'),_0x4618f3,_0x94c6('0xf'),JSON[_0x94c6('0x12')](_0x63364a));if(_0x63364a['error']){if(_0x63364a[_0x94c6('0x13')][_0x94c6('0x14')]===0x1f4){logger['error'](_0x94c6('0xe'),_0x4618f3,_0x63364a[_0x94c6('0x13')][_0x94c6('0x15')]);return _0x4d3ea4(_0x63364a[_0x94c6('0x13')][_0x94c6('0x15')]);}logger[_0x94c6('0x13')]('VoiceAgentReport,\x20%s,\x20%s',_0x4618f3,_0x63364a[_0x94c6('0x13')]['message']);return _0xe98376(_0x63364a[_0x94c6('0x13')][_0x94c6('0x15')]);}else{logger[_0x94c6('0x16')](_0x94c6('0xe'),_0x4618f3,_0x94c6('0xf'));_0xe98376(_0x63364a['result'][_0x94c6('0x15')]);}})[_0x94c6('0x17')](function(_0x32b4bf){logger[_0x94c6('0x13')](_0x94c6('0xe'),_0x4618f3,_0x32b4bf);_0x4d3ea4(_0x32b4bf);});});}exports[_0x94c6('0x18')]=function(_0x348c18){var _0x547c07=this;return new Promise(function(_0x549545,_0x72f3ab){return db['VoiceAgentReport'][_0x94c6('0x19')](_0x348c18[_0x94c6('0x1a')],{'raw':_0x348c18[_0x94c6('0x1b')]?_0x348c18[_0x94c6('0x1b')][_0x94c6('0x1c')]===undefined?!![]:![]:!![]})[_0x94c6('0xd')](function(_0x48e944){logger[_0x94c6('0x16')](_0x94c6('0x18'),_0x348c18);logger[_0x94c6('0x10')]('CreateVoiceAgentReport',_0x348c18,JSON[_0x94c6('0x12')](_0x48e944));_0x549545(_0x48e944);})[_0x94c6('0x17')](function(_0x5998d1){logger[_0x94c6('0x13')](_0x94c6('0x18'),_0x5998d1['message'],_0x348c18);_0x72f3ab(_0x547c07[_0x94c6('0x13')](0x1f4,_0x5998d1[_0x94c6('0x15')]));});});};exports[_0x94c6('0x1d')]=function(_0x39ba2a){var _0xec6409=this;return new Promise(function(_0x415ad8,_0x3d1dea){return db[_0x94c6('0x1e')][_0x94c6('0x1f')](_0x39ba2a[_0x94c6('0x1a')],{'raw':_0x39ba2a[_0x94c6('0x1b')]?_0x39ba2a[_0x94c6('0x1b')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x39ba2a[_0x94c6('0x1b')]?_0x39ba2a['options'][_0x94c6('0x20')]||null:null,'attributes':_0x39ba2a[_0x94c6('0x1b')]?_0x39ba2a[_0x94c6('0x1b')][_0x94c6('0x21')]||null:null,'limit':_0x39ba2a[_0x94c6('0x1b')]?_0x39ba2a[_0x94c6('0x1b')][_0x94c6('0x22')]||null:null})[_0x94c6('0xd')](function(_0x2c9046){logger[_0x94c6('0x16')](_0x94c6('0x1d'),_0x39ba2a);logger['debug'](_0x94c6('0x1d'),_0x39ba2a,JSON['stringify'](_0x2c9046));_0x415ad8(_0x2c9046);})[_0x94c6('0x17')](function(_0x1b4665){logger['error'](_0x94c6('0x1d'),_0x1b4665['message'],_0x39ba2a);_0x3d1dea(_0xec6409[_0x94c6('0x13')](0x1f4,_0x1b4665[_0x94c6('0x15')]));});});};
\ No newline at end of file