Built motion from commit 97153652.|2.6.26
[motion2.git] / server / api / intFreshdeskAccount / intFreshdeskAccount.rpc.js
index 1aa077f..a8c0072 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x486a=['GetFreshdeskAccount','FreshdeskAccount','findAll','options','raw','where','attributes','limit','map','include','model','find','ShowFreshdeskAccount','lodash','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','then','info','FreshdeskAccount,\x20%s,\x20%s','request\x20sent','debug','FreshdeskAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x486a,0x1d4));var _0xa486=function(_0x455eed,_0x822290){_0x455eed=_0x455eed-0x0;var _0x31cb46=_0x486a[_0x455eed];return _0x31cb46;};'use strict';var _=require(_0xa486('0x0'));var util=require(_0xa486('0x1'));var moment=require('moment');var BPromise=require(_0xa486('0x2'));var rs=require(_0xa486('0x3'));var fs=require('fs');var Redis=require(_0xa486('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xa486('0x5'));var logger=require(_0xa486('0x6'))(_0xa486('0x7'));var config=require('../../config/environment');var jayson=require(_0xa486('0x8'));var client=jayson[_0xa486('0x9')][_0xa486('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4740a5,_0x2a9e2a,_0x5d3508){return new BPromise(function(_0x33a4d6,_0x270bbc){return client['request'](_0x4740a5,_0x5d3508)[_0xa486('0xb')](function(_0x4a11ae){logger[_0xa486('0xc')](_0xa486('0xd'),_0x2a9e2a,_0xa486('0xe'));logger[_0xa486('0xf')](_0xa486('0x10'),_0x2a9e2a,_0xa486('0xe'),JSON[_0xa486('0x11')](_0x4a11ae));if(_0x4a11ae[_0xa486('0x12')]){if(_0x4a11ae[_0xa486('0x12')][_0xa486('0x13')]===0x1f4){logger[_0xa486('0x12')](_0xa486('0xd'),_0x2a9e2a,_0x4a11ae[_0xa486('0x12')][_0xa486('0x14')]);return _0x270bbc(_0x4a11ae[_0xa486('0x12')][_0xa486('0x14')]);}logger[_0xa486('0x12')]('FreshdeskAccount,\x20%s,\x20%s',_0x2a9e2a,_0x4a11ae[_0xa486('0x12')][_0xa486('0x14')]);return _0x33a4d6(_0x4a11ae[_0xa486('0x12')][_0xa486('0x14')]);}else{logger[_0xa486('0xc')](_0xa486('0xd'),_0x2a9e2a,_0xa486('0xe'));_0x33a4d6(_0x4a11ae['result'][_0xa486('0x14')]);}})[_0xa486('0x15')](function(_0x1f150e){logger['error'](_0xa486('0xd'),_0x2a9e2a,_0x1f150e);_0x270bbc(_0x1f150e);});});}exports[_0xa486('0x16')]=function(_0x2abc1d){var _0xe802b8=this;return new Promise(function(_0x450b31,_0x15d989){return db[_0xa486('0x17')][_0xa486('0x18')]({'raw':_0x2abc1d[_0xa486('0x19')]?_0x2abc1d[_0xa486('0x19')][_0xa486('0x1a')]===undefined?!![]:![]:!![],'where':_0x2abc1d['options']?_0x2abc1d[_0xa486('0x19')][_0xa486('0x1b')]||null:null,'attributes':_0x2abc1d[_0xa486('0x19')]?_0x2abc1d[_0xa486('0x19')][_0xa486('0x1c')]||null:null,'limit':_0x2abc1d[_0xa486('0x19')]?_0x2abc1d['options'][_0xa486('0x1d')]||null:null,'include':_0x2abc1d[_0xa486('0x19')]?_0x2abc1d[_0xa486('0x19')]['include']?_[_0xa486('0x1e')](_0x2abc1d[_0xa486('0x19')][_0xa486('0x1f')],function(_0x25d19f){return{'model':db[_0x25d19f[_0xa486('0x20')]],'as':_0x25d19f['as'],'attributes':_0x25d19f[_0xa486('0x1c')],'include':_0x25d19f[_0xa486('0x1f')]?_[_0xa486('0x1e')](_0x25d19f[_0xa486('0x1f')],function(_0x4c35d8){return{'model':db[_0x4c35d8[_0xa486('0x20')]],'as':_0x4c35d8['as'],'attributes':_0x4c35d8[_0xa486('0x1c')],'include':_0x4c35d8[_0xa486('0x1f')]?_[_0xa486('0x1e')](_0x4c35d8[_0xa486('0x1f')],function(_0x3e13b9){return{'model':db[_0x3e13b9[_0xa486('0x20')]],'as':_0x3e13b9['as'],'attributes':_0x3e13b9[_0xa486('0x1c')]};}):[]};}):[]};}):[]:[]})[_0xa486('0xb')](function(_0x465556){logger['info'](_0xa486('0x16'),_0x2abc1d);logger[_0xa486('0xf')]('GetFreshdeskAccount',_0x2abc1d,JSON['stringify'](_0x465556));_0x450b31(_0x465556);})[_0xa486('0x15')](function(_0x2e3dfa){logger[_0xa486('0x12')](_0xa486('0x16'),_0x2e3dfa[_0xa486('0x14')],_0x2abc1d);_0x15d989(_0xe802b8[_0xa486('0x12')](0x1f4,_0x2e3dfa[_0xa486('0x14')]));});});};exports['ShowFreshdeskAccount']=function(_0x2e577c){var _0x25a7c8=this;return new Promise(function(_0x5a993c,_0x4ac874){return db[_0xa486('0x17')][_0xa486('0x21')]({'raw':_0x2e577c[_0xa486('0x19')]?_0x2e577c[_0xa486('0x19')][_0xa486('0x1a')]===undefined?!![]:![]:!![],'where':_0x2e577c[_0xa486('0x19')]?_0x2e577c['options'][_0xa486('0x1b')]||null:null,'attributes':_0x2e577c['options']?_0x2e577c['options'][_0xa486('0x1c')]||null:null,'include':_0x2e577c[_0xa486('0x19')]?_0x2e577c['options']['include']?_[_0xa486('0x1e')](_0x2e577c[_0xa486('0x19')][_0xa486('0x1f')],function(_0x5abeef){return{'model':db[_0x5abeef[_0xa486('0x20')]],'as':_0x5abeef['as'],'attributes':_0x5abeef[_0xa486('0x1c')],'include':_0x5abeef[_0xa486('0x1f')]?_[_0xa486('0x1e')](_0x5abeef['include'],function(_0x2bd74e){return{'model':db[_0x2bd74e[_0xa486('0x20')]],'as':_0x2bd74e['as'],'attributes':_0x2bd74e[_0xa486('0x1c')],'include':_0x2bd74e['include']?_['map'](_0x2bd74e[_0xa486('0x1f')],function(_0x3848fa){return{'model':db[_0x3848fa[_0xa486('0x20')]],'as':_0x3848fa['as'],'attributes':_0x3848fa[_0xa486('0x1c')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x3f1963){logger[_0xa486('0xc')](_0xa486('0x22'),_0x2e577c);logger['debug'](_0xa486('0x22'),_0x2e577c,JSON[_0xa486('0x11')](_0x3f1963));_0x5a993c(_0x3f1963);})['catch'](function(_0x564f4a){logger['error'](_0xa486('0x22'),_0x564f4a[_0xa486('0x14')],_0x2e577c);_0x4ac874(_0x25a7c8[_0xa486('0x12')](0x1f4,_0x564f4a[_0xa486('0x14')]));});});};
\ No newline at end of file
+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