Built motion from commit (unavailable).|2.4.4
[motion2.git] / server / api / voiceCallReport / voiceCallReport.rpc.js
index 8cc0092..0085acb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x69ea=['create','body','update','where','UpdateVoiceCallReport','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/logger','rpc','jayson/promise','client','http','request','then','VoiceCallReport,\x20%s,\x20%s','request\x20sent','debug','VoiceCallReport,\x20%s,\x20%s,\x20%s','code','message','error','info','VoiceCallReport','findAll','options','raw','attributes','limit','include','map','model','GetVoiceCallReport','stringify','catch','CreateVoiceCallReport'];(function(_0x1ba024,_0x56ea6b){var _0x107d32=function(_0x4bcc21){while(--_0x4bcc21){_0x1ba024['push'](_0x1ba024['shift']());}};_0x107d32(++_0x56ea6b);}(_0x69ea,0x10f));var _0xa69e=function(_0x2c91e9,_0x2fb965){_0x2c91e9=_0x2c91e9-0x0;var _0x13f0ff=_0x69ea[_0x2c91e9];return _0x13f0ff;};'use strict';var _=require(_0xa69e('0x0'));var util=require('util');var moment=require(_0xa69e('0x1'));var BPromise=require(_0xa69e('0x2'));var rs=require(_0xa69e('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xa69e('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xa69e('0x5'))(_0xa69e('0x6'));var config=require('../../config/environment');var jayson=require(_0xa69e('0x7'));var client=jayson[_0xa69e('0x8')][_0xa69e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x61a9f7,_0x26ef6d,_0x34b967){return new BPromise(function(_0x3e5310,_0x1c75eb){return client[_0xa69e('0xa')](_0x61a9f7,_0x34b967)[_0xa69e('0xb')](function(_0x462e9f){logger['info'](_0xa69e('0xc'),_0x26ef6d,_0xa69e('0xd'));logger[_0xa69e('0xe')](_0xa69e('0xf'),_0x26ef6d,_0xa69e('0xd'),JSON['stringify'](_0x462e9f));if(_0x462e9f['error']){if(_0x462e9f['error'][_0xa69e('0x10')]===0x1f4){logger['error'](_0xa69e('0xc'),_0x26ef6d,_0x462e9f['error'][_0xa69e('0x11')]);return _0x1c75eb(_0x462e9f[_0xa69e('0x12')][_0xa69e('0x11')]);}logger[_0xa69e('0x12')]('VoiceCallReport,\x20%s,\x20%s',_0x26ef6d,_0x462e9f['error'][_0xa69e('0x11')]);return _0x3e5310(_0x462e9f[_0xa69e('0x12')]['message']);}else{logger[_0xa69e('0x13')](_0xa69e('0xc'),_0x26ef6d,_0xa69e('0xd'));_0x3e5310(_0x462e9f['result'][_0xa69e('0x11')]);}})['catch'](function(_0x33b2ef){logger[_0xa69e('0x12')](_0xa69e('0xc'),_0x26ef6d,_0x33b2ef);_0x1c75eb(_0x33b2ef);});});}exports['GetVoiceCallReport']=function(_0x5eb7fb){var _0x5b1b76=this;return new Promise(function(_0x1e01b2,_0x1e9512){return db[_0xa69e('0x14')][_0xa69e('0x15')]({'raw':_0x5eb7fb[_0xa69e('0x16')]?_0x5eb7fb[_0xa69e('0x16')][_0xa69e('0x17')]===undefined?!![]:![]:!![],'where':_0x5eb7fb[_0xa69e('0x16')]?_0x5eb7fb['options']['where']||null:null,'attributes':_0x5eb7fb['options']?_0x5eb7fb[_0xa69e('0x16')][_0xa69e('0x18')]||null:null,'limit':_0x5eb7fb[_0xa69e('0x16')]?_0x5eb7fb[_0xa69e('0x16')][_0xa69e('0x19')]||null:null,'include':_0x5eb7fb[_0xa69e('0x16')]?_0x5eb7fb[_0xa69e('0x16')][_0xa69e('0x1a')]?_[_0xa69e('0x1b')](_0x5eb7fb[_0xa69e('0x16')][_0xa69e('0x1a')],function(_0x7cc4b8){return{'model':db[_0x7cc4b8['model']],'as':_0x7cc4b8['as'],'attributes':_0x7cc4b8[_0xa69e('0x18')],'include':_0x7cc4b8['include']?_[_0xa69e('0x1b')](_0x7cc4b8[_0xa69e('0x1a')],function(_0x6c4a42){return{'model':db[_0x6c4a42[_0xa69e('0x1c')]],'as':_0x6c4a42['as'],'attributes':_0x6c4a42[_0xa69e('0x18')],'include':_0x6c4a42['include']?_[_0xa69e('0x1b')](_0x6c4a42[_0xa69e('0x1a')],function(_0x2262b0){return{'model':db[_0x2262b0[_0xa69e('0x1c')]],'as':_0x2262b0['as'],'attributes':_0x2262b0[_0xa69e('0x18')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x3df074){logger[_0xa69e('0x13')]('GetVoiceCallReport',_0x5eb7fb);logger[_0xa69e('0xe')](_0xa69e('0x1d'),_0x5eb7fb,JSON[_0xa69e('0x1e')](_0x3df074));_0x1e01b2(_0x3df074);})[_0xa69e('0x1f')](function(_0x69bb5c){logger[_0xa69e('0x12')](_0xa69e('0x1d'),_0x69bb5c[_0xa69e('0x11')],_0x5eb7fb);_0x1e9512(_0x5b1b76['error'](0x1f4,_0x69bb5c[_0xa69e('0x11')]));});});};exports[_0xa69e('0x20')]=function(_0x302a98){var _0x38f6b9=this;return new Promise(function(_0x15fa3d,_0x4cf9f7){return db[_0xa69e('0x14')][_0xa69e('0x21')](_0x302a98[_0xa69e('0x22')],{'raw':_0x302a98[_0xa69e('0x16')]?_0x302a98[_0xa69e('0x16')][_0xa69e('0x17')]===undefined?!![]:![]:!![]})[_0xa69e('0xb')](function(_0x23a851){logger[_0xa69e('0x13')]('CreateVoiceCallReport',_0x302a98);logger['debug'](_0xa69e('0x20'),_0x302a98,JSON[_0xa69e('0x1e')](_0x23a851));_0x15fa3d(_0x23a851);})['catch'](function(_0x24582e){logger[_0xa69e('0x12')](_0xa69e('0x20'),_0x24582e['message'],_0x302a98);_0x4cf9f7(_0x38f6b9[_0xa69e('0x12')](0x1f4,_0x24582e[_0xa69e('0x11')]));});});};exports['UpdateVoiceCallReport']=function(_0x5995c3){var _0x41b703=this;return new Promise(function(_0x3770be,_0x3b5405){return db[_0xa69e('0x14')][_0xa69e('0x23')](_0x5995c3[_0xa69e('0x22')],{'raw':_0x5995c3['options']?_0x5995c3[_0xa69e('0x16')][_0xa69e('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5995c3[_0xa69e('0x16')]?_0x5995c3[_0xa69e('0x16')][_0xa69e('0x24')]||null:null,'attributes':_0x5995c3[_0xa69e('0x16')]?_0x5995c3['options']['attributes']||null:null,'limit':_0x5995c3['options']?_0x5995c3[_0xa69e('0x16')][_0xa69e('0x19')]||null:null})[_0xa69e('0xb')](function(_0x2f9579){logger['info']('UpdateVoiceCallReport',_0x5995c3);logger['debug']('UpdateVoiceCallReport',_0x5995c3,JSON[_0xa69e('0x1e')](_0x2f9579));_0x3770be(_0x2f9579);})[_0xa69e('0x1f')](function(_0xc40f35){logger['error'](_0xa69e('0x25'),_0xc40f35[_0xa69e('0x11')],_0x5995c3);_0x3b5405(_0x41b703['error'](0x1f4,_0xc40f35[_0xa69e('0x11')]));});});};
\ No newline at end of file
+var _0x4f3a=['moment','bluebird','../../mysqldb','../../config/utils','rpc','../../config/environment','http','request','VoiceCallReport,\x20%s,\x20%s','request\x20sent','debug','VoiceCallReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','GetVoiceCallReport','findAll','options','raw','where','attributes','include','model','map','then','CreateVoiceCallReport','VoiceCallReport','create','body','UpdateVoiceCallReport','update','limit','util'];(function(_0x558f3b,_0x51b08d){var _0x38b565=function(_0x4454b6){while(--_0x4454b6){_0x558f3b['push'](_0x558f3b['shift']());}};_0x38b565(++_0x51b08d);}(_0x4f3a,0x6e));var _0xa4f3=function(_0x185d2a,_0x308609){_0x185d2a=_0x185d2a-0x0;var _0x4dea27=_0x4f3a[_0x185d2a];return _0x4dea27;};'use strict';var _=require('lodash');var util=require(_0xa4f3('0x0'));var moment=require(_0xa4f3('0x1'));var BPromise=require(_0xa4f3('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xa4f3('0x3'))['db'];var utils=require(_0xa4f3('0x4'));var logger=require('../../config/logger')(_0xa4f3('0x5'));var config=require(_0xa4f3('0x6'));var jayson=require('jayson/promise');var client=jayson['client'][_0xa4f3('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x42633c,_0x1d2fe7,_0x5a92ec){return new BPromise(function(_0x139873,_0x1a797f){return client[_0xa4f3('0x8')](_0x42633c,_0x5a92ec)['then'](function(_0xe379b1){logger['info'](_0xa4f3('0x9'),_0x1d2fe7,_0xa4f3('0xa'));logger[_0xa4f3('0xb')](_0xa4f3('0xc'),_0x1d2fe7,'request\x20sent',JSON[_0xa4f3('0xd')](_0xe379b1));if(_0xe379b1[_0xa4f3('0xe')]){if(_0xe379b1['error'][_0xa4f3('0xf')]===0x1f4){logger[_0xa4f3('0xe')](_0xa4f3('0x9'),_0x1d2fe7,_0xe379b1[_0xa4f3('0xe')][_0xa4f3('0x10')]);return _0x1a797f(_0xe379b1[_0xa4f3('0xe')]['message']);}logger['error'](_0xa4f3('0x9'),_0x1d2fe7,_0xe379b1[_0xa4f3('0xe')][_0xa4f3('0x10')]);return _0x139873(_0xe379b1[_0xa4f3('0xe')][_0xa4f3('0x10')]);}else{logger[_0xa4f3('0x11')](_0xa4f3('0x9'),_0x1d2fe7,_0xa4f3('0xa'));_0x139873(_0xe379b1[_0xa4f3('0x12')][_0xa4f3('0x10')]);}})[_0xa4f3('0x13')](function(_0x473d9e){logger['error'](_0xa4f3('0x9'),_0x1d2fe7,_0x473d9e);_0x1a797f(_0x473d9e);});});}exports[_0xa4f3('0x14')]=function(_0x4232c1){var _0x51ea72=this;return new Promise(function(_0x40a6e9,_0x35ff64){return db['VoiceCallReport'][_0xa4f3('0x15')]({'raw':_0x4232c1[_0xa4f3('0x16')]?_0x4232c1['options'][_0xa4f3('0x17')]===undefined?!![]:![]:!![],'where':_0x4232c1[_0xa4f3('0x16')]?_0x4232c1['options'][_0xa4f3('0x18')]||null:null,'attributes':_0x4232c1['options']?_0x4232c1['options'][_0xa4f3('0x19')]||null:null,'limit':_0x4232c1[_0xa4f3('0x16')]?_0x4232c1[_0xa4f3('0x16')]['limit']||null:null,'include':_0x4232c1['options']?_0x4232c1['options'][_0xa4f3('0x1a')]?_['map'](_0x4232c1[_0xa4f3('0x16')][_0xa4f3('0x1a')],function(_0x3d16ad){return{'model':db[_0x3d16ad[_0xa4f3('0x1b')]],'as':_0x3d16ad['as'],'attributes':_0x3d16ad['attributes'],'include':_0x3d16ad['include']?_[_0xa4f3('0x1c')](_0x3d16ad[_0xa4f3('0x1a')],function(_0x3cff6b){return{'model':db[_0x3cff6b['model']],'as':_0x3cff6b['as'],'attributes':_0x3cff6b[_0xa4f3('0x19')],'include':_0x3cff6b[_0xa4f3('0x1a')]?_['map'](_0x3cff6b['include'],function(_0x47a43f){return{'model':db[_0x47a43f[_0xa4f3('0x1b')]],'as':_0x47a43f['as'],'attributes':_0x47a43f['attributes']};}):[]};}):[]};}):[]:[]})[_0xa4f3('0x1d')](function(_0xc28a50){logger['info'](_0xa4f3('0x14'),_0x4232c1);logger[_0xa4f3('0xb')](_0xa4f3('0x14'),_0x4232c1,JSON[_0xa4f3('0xd')](_0xc28a50));_0x40a6e9(_0xc28a50);})[_0xa4f3('0x13')](function(_0x36d7aa){logger['error']('GetVoiceCallReport',_0x36d7aa[_0xa4f3('0x10')],_0x4232c1);_0x35ff64(_0x51ea72[_0xa4f3('0xe')](0x1f4,_0x36d7aa[_0xa4f3('0x10')]));});});};exports[_0xa4f3('0x1e')]=function(_0x31ca19){var _0x478bfd=this;return new Promise(function(_0x4a0eca,_0x1abc2e){return db[_0xa4f3('0x1f')][_0xa4f3('0x20')](_0x31ca19[_0xa4f3('0x21')],{'raw':_0x31ca19['options']?_0x31ca19[_0xa4f3('0x16')][_0xa4f3('0x17')]===undefined?!![]:![]:!![]})[_0xa4f3('0x1d')](function(_0x508a48){logger[_0xa4f3('0x11')](_0xa4f3('0x1e'),_0x31ca19);logger[_0xa4f3('0xb')](_0xa4f3('0x1e'),_0x31ca19,JSON[_0xa4f3('0xd')](_0x508a48));_0x4a0eca(_0x508a48);})[_0xa4f3('0x13')](function(_0xbafdd8){logger[_0xa4f3('0xe')](_0xa4f3('0x1e'),_0xbafdd8['message'],_0x31ca19);_0x1abc2e(_0x478bfd[_0xa4f3('0xe')](0x1f4,_0xbafdd8[_0xa4f3('0x10')]));});});};exports[_0xa4f3('0x22')]=function(_0x4b89ca){var _0x4ba2cb=this;return new Promise(function(_0x5567f5,_0x1eb588){return db[_0xa4f3('0x1f')][_0xa4f3('0x23')](_0x4b89ca[_0xa4f3('0x21')],{'raw':_0x4b89ca[_0xa4f3('0x16')]?_0x4b89ca[_0xa4f3('0x16')][_0xa4f3('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4b89ca['options']?_0x4b89ca[_0xa4f3('0x16')][_0xa4f3('0x18')]||null:null,'attributes':_0x4b89ca[_0xa4f3('0x16')]?_0x4b89ca['options'][_0xa4f3('0x19')]||null:null,'limit':_0x4b89ca[_0xa4f3('0x16')]?_0x4b89ca['options'][_0xa4f3('0x24')]||null:null})[_0xa4f3('0x1d')](function(_0x5970c5){logger[_0xa4f3('0x11')](_0xa4f3('0x22'),_0x4b89ca);logger[_0xa4f3('0xb')](_0xa4f3('0x22'),_0x4b89ca,JSON['stringify'](_0x5970c5));_0x5567f5(_0x5970c5);})['catch'](function(_0x4b0777){logger[_0xa4f3('0xe')]('UpdateVoiceCallReport',_0x4b0777[_0xa4f3('0x10')],_0x4b89ca);_0x1eb588(_0x4ba2cb[_0xa4f3('0xe')](0x1f4,_0x4b0777[_0xa4f3('0x10')]));});});};
\ No newline at end of file