Built motion from commit b0a9a629.|2.6.33
[motion2.git] / server / api / intFreshdeskAccount / intFreshdeskAccount.rpc.js
index a8c0072..64b37c7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xedc0=['../../config/logger','../../config/environment','http','request','then','info','FreshdeskAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','GetFreshdeskAccount','FreshdeskAccount','findAll','options','attributes','limit','map','include','model','ShowFreshdeskAccount','find','raw','where','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x43222c,_0xcc1e44){var _0x3dbcfc=function(_0xe9072e){while(--_0xe9072e){_0x43222c['push'](_0x43222c['shift']());}};_0x3dbcfc(++_0xcc1e44);}(_0xedc0,0x12c));var _0x0edc=function(_0x4a2193,_0x312076){_0x4a2193=_0x4a2193-0x0;var _0x634e78=_0xedc0[_0x4a2193];return _0x634e78;};'use strict';var _=require(_0x0edc('0x0'));var util=require('util');var moment=require(_0x0edc('0x1'));var BPromise=require(_0x0edc('0x2'));var rs=require(_0x0edc('0x3'));var fs=require('fs');var Redis=require(_0x0edc('0x4'));var db=require(_0x0edc('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x0edc('0x6'))('rpc');var config=require(_0x0edc('0x7'));var jayson=require('jayson/promise');var client=jayson['client'][_0x0edc('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x561102,_0x5f756,_0x27ff01){return new BPromise(function(_0x3f9e3f,_0x21a100){return client[_0x0edc('0x9')](_0x561102,_0x27ff01)[_0x0edc('0xa')](function(_0x587cb1){logger[_0x0edc('0xb')](_0x0edc('0xc'),_0x5f756,_0x0edc('0xd'));logger[_0x0edc('0xe')]('FreshdeskAccount,\x20%s,\x20%s,\x20%s',_0x5f756,_0x0edc('0xd'),JSON[_0x0edc('0xf')](_0x587cb1));if(_0x587cb1[_0x0edc('0x10')]){if(_0x587cb1[_0x0edc('0x10')][_0x0edc('0x11')]===0x1f4){logger['error'](_0x0edc('0xc'),_0x5f756,_0x587cb1[_0x0edc('0x10')][_0x0edc('0x12')]);return _0x21a100(_0x587cb1['error'][_0x0edc('0x12')]);}logger[_0x0edc('0x10')]('FreshdeskAccount,\x20%s,\x20%s',_0x5f756,_0x587cb1[_0x0edc('0x10')][_0x0edc('0x12')]);return _0x3f9e3f(_0x587cb1['error']['message']);}else{logger[_0x0edc('0xb')](_0x0edc('0xc'),_0x5f756,_0x0edc('0xd'));_0x3f9e3f(_0x587cb1[_0x0edc('0x13')][_0x0edc('0x12')]);}})[_0x0edc('0x14')](function(_0x27794e){logger[_0x0edc('0x10')](_0x0edc('0xc'),_0x5f756,_0x27794e);_0x21a100(_0x27794e);});});}exports[_0x0edc('0x15')]=function(_0x5446e7){var _0x264c8b=this;return new Promise(function(_0xe232e5,_0xee6a0a){return db[_0x0edc('0x16')][_0x0edc('0x17')]({'raw':_0x5446e7[_0x0edc('0x18')]?_0x5446e7[_0x0edc('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x5446e7[_0x0edc('0x18')]?_0x5446e7['options']['where']||null:null,'attributes':_0x5446e7[_0x0edc('0x18')]?_0x5446e7['options'][_0x0edc('0x19')]||null:null,'limit':_0x5446e7[_0x0edc('0x18')]?_0x5446e7[_0x0edc('0x18')][_0x0edc('0x1a')]||null:null,'include':_0x5446e7[_0x0edc('0x18')]?_0x5446e7[_0x0edc('0x18')]['include']?_[_0x0edc('0x1b')](_0x5446e7[_0x0edc('0x18')][_0x0edc('0x1c')],function(_0x424ede){return{'model':db[_0x424ede[_0x0edc('0x1d')]],'as':_0x424ede['as'],'attributes':_0x424ede[_0x0edc('0x19')],'include':_0x424ede[_0x0edc('0x1c')]?_[_0x0edc('0x1b')](_0x424ede['include'],function(_0x2708c9){return{'model':db[_0x2708c9[_0x0edc('0x1d')]],'as':_0x2708c9['as'],'attributes':_0x2708c9[_0x0edc('0x19')],'include':_0x2708c9[_0x0edc('0x1c')]?_[_0x0edc('0x1b')](_0x2708c9[_0x0edc('0x1c')],function(_0x24bd32){return{'model':db[_0x24bd32['model']],'as':_0x24bd32['as'],'attributes':_0x24bd32[_0x0edc('0x19')]};}):[]};}):[]};}):[]:[]})[_0x0edc('0xa')](function(_0x2c84bd){logger['info'](_0x0edc('0x15'),_0x5446e7);logger[_0x0edc('0xe')](_0x0edc('0x15'),_0x5446e7,JSON['stringify'](_0x2c84bd));_0xe232e5(_0x2c84bd);})[_0x0edc('0x14')](function(_0x104fb2){logger[_0x0edc('0x10')](_0x0edc('0x15'),_0x104fb2[_0x0edc('0x12')],_0x5446e7);_0xee6a0a(_0x264c8b[_0x0edc('0x10')](0x1f4,_0x104fb2[_0x0edc('0x12')]));});});};exports[_0x0edc('0x1e')]=function(_0x219c7a){var _0x309a5a=this;return new Promise(function(_0x3beef9,_0x2ceb65){return db[_0x0edc('0x16')][_0x0edc('0x1f')]({'raw':_0x219c7a[_0x0edc('0x18')]?_0x219c7a[_0x0edc('0x18')][_0x0edc('0x20')]===undefined?!![]:![]:!![],'where':_0x219c7a[_0x0edc('0x18')]?_0x219c7a[_0x0edc('0x18')][_0x0edc('0x21')]||null:null,'attributes':_0x219c7a[_0x0edc('0x18')]?_0x219c7a[_0x0edc('0x18')][_0x0edc('0x19')]||null:null,'include':_0x219c7a[_0x0edc('0x18')]?_0x219c7a[_0x0edc('0x18')][_0x0edc('0x1c')]?_[_0x0edc('0x1b')](_0x219c7a['options']['include'],function(_0x56c7d3){return{'model':db[_0x56c7d3['model']],'as':_0x56c7d3['as'],'attributes':_0x56c7d3[_0x0edc('0x19')],'include':_0x56c7d3[_0x0edc('0x1c')]?_[_0x0edc('0x1b')](_0x56c7d3[_0x0edc('0x1c')],function(_0x3331c2){return{'model':db[_0x3331c2[_0x0edc('0x1d')]],'as':_0x3331c2['as'],'attributes':_0x3331c2[_0x0edc('0x19')],'include':_0x3331c2[_0x0edc('0x1c')]?_[_0x0edc('0x1b')](_0x3331c2['include'],function(_0x3d7752){return{'model':db[_0x3d7752[_0x0edc('0x1d')]],'as':_0x3d7752['as'],'attributes':_0x3d7752[_0x0edc('0x19')]};}):[]};}):[]};}):[]:[]})[_0x0edc('0xa')](function(_0x18da92){logger[_0x0edc('0xb')](_0x0edc('0x1e'),_0x219c7a);logger[_0x0edc('0xe')](_0x0edc('0x1e'),_0x219c7a,JSON[_0x0edc('0xf')](_0x18da92));_0x3beef9(_0x18da92);})[_0x0edc('0x14')](function(_0x36349b){logger[_0x0edc('0x10')]('ShowFreshdeskAccount',_0x36349b[_0x0edc('0x12')],_0x219c7a);_0x2ceb65(_0x309a5a[_0x0edc('0x10')](0x1f4,_0x36349b[_0x0edc('0x12')]));});});};
\ No newline at end of file
+var _0x3aca=['attributes','ShowFreshdeskAccount','raw','lodash','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','request\x20sent','debug','FreshdeskAccount,\x20%s,\x20%s,\x20%s','stringify','error','FreshdeskAccount,\x20%s,\x20%s','message','catch','GetFreshdeskAccount','FreshdeskAccount','options','where','limit','map','include','model'];(function(_0x142412,_0x189a3b){var _0x3274b3=function(_0xd6e26f){while(--_0xd6e26f){_0x142412['push'](_0x142412['shift']());}};_0x3274b3(++_0x189a3b);}(_0x3aca,0x83));var _0xa3ac=function(_0x3fba9f,_0x3b7b9b){_0x3fba9f=_0x3fba9f-0x0;var _0x192cf1=_0x3aca[_0x3fba9f];return _0x192cf1;};'use strict';var _=require(_0xa3ac('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xa3ac('0x1'));var rs=require(_0xa3ac('0x2'));var fs=require('fs');var Redis=require(_0xa3ac('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xa3ac('0x4'));var logger=require(_0xa3ac('0x5'))(_0xa3ac('0x6'));var config=require(_0xa3ac('0x7'));var jayson=require(_0xa3ac('0x8'));var client=jayson['client'][_0xa3ac('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5d9b73,_0x4fd108,_0x389abc){return new BPromise(function(_0x4da43d,_0x423126){return client[_0xa3ac('0xa')](_0x5d9b73,_0x389abc)[_0xa3ac('0xb')](function(_0xd5985e){logger[_0xa3ac('0xc')]('FreshdeskAccount,\x20%s,\x20%s',_0x4fd108,_0xa3ac('0xd'));logger[_0xa3ac('0xe')](_0xa3ac('0xf'),_0x4fd108,'request\x20sent',JSON[_0xa3ac('0x10')](_0xd5985e));if(_0xd5985e[_0xa3ac('0x11')]){if(_0xd5985e[_0xa3ac('0x11')]['code']===0x1f4){logger[_0xa3ac('0x11')](_0xa3ac('0x12'),_0x4fd108,_0xd5985e[_0xa3ac('0x11')][_0xa3ac('0x13')]);return _0x423126(_0xd5985e[_0xa3ac('0x11')][_0xa3ac('0x13')]);}logger[_0xa3ac('0x11')]('FreshdeskAccount,\x20%s,\x20%s',_0x4fd108,_0xd5985e[_0xa3ac('0x11')]['message']);return _0x4da43d(_0xd5985e['error']['message']);}else{logger[_0xa3ac('0xc')](_0xa3ac('0x12'),_0x4fd108,_0xa3ac('0xd'));_0x4da43d(_0xd5985e['result'][_0xa3ac('0x13')]);}})[_0xa3ac('0x14')](function(_0x4ee54e){logger[_0xa3ac('0x11')](_0xa3ac('0x12'),_0x4fd108,_0x4ee54e);_0x423126(_0x4ee54e);});});}exports[_0xa3ac('0x15')]=function(_0x40d38a){var _0xf7521d=this;return new Promise(function(_0x5d1ab4,_0x48c8c7){return db[_0xa3ac('0x16')]['findAll']({'raw':_0x40d38a['options']?_0x40d38a[_0xa3ac('0x17')]['raw']===undefined?!![]:![]:!![],'where':_0x40d38a['options']?_0x40d38a['options'][_0xa3ac('0x18')]||null:null,'attributes':_0x40d38a[_0xa3ac('0x17')]?_0x40d38a[_0xa3ac('0x17')]['attributes']||null:null,'limit':_0x40d38a[_0xa3ac('0x17')]?_0x40d38a[_0xa3ac('0x17')][_0xa3ac('0x19')]||null:null,'include':_0x40d38a[_0xa3ac('0x17')]?_0x40d38a['options']['include']?_[_0xa3ac('0x1a')](_0x40d38a[_0xa3ac('0x17')][_0xa3ac('0x1b')],function(_0x331aba){return{'model':db[_0x331aba[_0xa3ac('0x1c')]],'as':_0x331aba['as'],'attributes':_0x331aba[_0xa3ac('0x1d')],'include':_0x331aba[_0xa3ac('0x1b')]?_[_0xa3ac('0x1a')](_0x331aba[_0xa3ac('0x1b')],function(_0x23b644){return{'model':db[_0x23b644['model']],'as':_0x23b644['as'],'attributes':_0x23b644['attributes'],'include':_0x23b644[_0xa3ac('0x1b')]?_[_0xa3ac('0x1a')](_0x23b644[_0xa3ac('0x1b')],function(_0x2a8dec){return{'model':db[_0x2a8dec[_0xa3ac('0x1c')]],'as':_0x2a8dec['as'],'attributes':_0x2a8dec[_0xa3ac('0x1d')]};}):[]};}):[]};}):[]:[]})[_0xa3ac('0xb')](function(_0x189801){logger['info'](_0xa3ac('0x15'),_0x40d38a);logger[_0xa3ac('0xe')](_0xa3ac('0x15'),_0x40d38a,JSON[_0xa3ac('0x10')](_0x189801));_0x5d1ab4(_0x189801);})[_0xa3ac('0x14')](function(_0x4c1a2f){logger[_0xa3ac('0x11')]('GetFreshdeskAccount',_0x4c1a2f[_0xa3ac('0x13')],_0x40d38a);_0x48c8c7(_0xf7521d[_0xa3ac('0x11')](0x1f4,_0x4c1a2f[_0xa3ac('0x13')]));});});};exports[_0xa3ac('0x1e')]=function(_0x47f852){var _0x195845=this;return new Promise(function(_0x5a5847,_0x5e7d9b){return db[_0xa3ac('0x16')]['find']({'raw':_0x47f852[_0xa3ac('0x17')]?_0x47f852[_0xa3ac('0x17')][_0xa3ac('0x1f')]===undefined?!![]:![]:!![],'where':_0x47f852['options']?_0x47f852['options']['where']||null:null,'attributes':_0x47f852[_0xa3ac('0x17')]?_0x47f852[_0xa3ac('0x17')]['attributes']||null:null,'include':_0x47f852[_0xa3ac('0x17')]?_0x47f852[_0xa3ac('0x17')]['include']?_[_0xa3ac('0x1a')](_0x47f852[_0xa3ac('0x17')]['include'],function(_0x9ca2ca){return{'model':db[_0x9ca2ca[_0xa3ac('0x1c')]],'as':_0x9ca2ca['as'],'attributes':_0x9ca2ca['attributes'],'include':_0x9ca2ca['include']?_[_0xa3ac('0x1a')](_0x9ca2ca[_0xa3ac('0x1b')],function(_0x5bef2b){return{'model':db[_0x5bef2b[_0xa3ac('0x1c')]],'as':_0x5bef2b['as'],'attributes':_0x5bef2b[_0xa3ac('0x1d')],'include':_0x5bef2b['include']?_['map'](_0x5bef2b[_0xa3ac('0x1b')],function(_0x4ac44e){return{'model':db[_0x4ac44e[_0xa3ac('0x1c')]],'as':_0x4ac44e['as'],'attributes':_0x4ac44e[_0xa3ac('0x1d')]};}):[]};}):[]};}):[]:[]})[_0xa3ac('0xb')](function(_0x2dd735){logger[_0xa3ac('0xc')]('ShowFreshdeskAccount',_0x47f852);logger[_0xa3ac('0xe')](_0xa3ac('0x1e'),_0x47f852,JSON[_0xa3ac('0x10')](_0x2dd735));_0x5a5847(_0x2dd735);})[_0xa3ac('0x14')](function(_0x4f66c6){logger[_0xa3ac('0x11')]('ShowFreshdeskAccount',_0x4f66c6[_0xa3ac('0x13')],_0x47f852);_0x5e7d9b(_0x195845[_0xa3ac('0x11')](0x1f4,_0x4f66c6['message']));});});};
\ No newline at end of file