Built motion from commit 53172ac8.|2.6.30
[motion2.git] / server / api / intFreshdeskAccount / intFreshdeskAccount.rpc.js
index 45e3094..cf3616b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfc38=['FreshdeskAccount','findAll','options','raw','where','limit','include','map','model','attributes','ShowFreshdeskAccount','find','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','FreshdeskAccount,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','result','catch','GetFreshdeskAccount'];(function(_0x80ab9e,_0x32c636){var _0x7605e6=function(_0x207f0d){while(--_0x207f0d){_0x80ab9e['push'](_0x80ab9e['shift']());}};_0x7605e6(++_0x32c636);}(_0xfc38,0x98));var _0x8fc3=function(_0x7d12ad,_0x3fd692){_0x7d12ad=_0x7d12ad-0x0;var _0x238278=_0xfc38[_0x7d12ad];return _0x238278;};'use strict';var _=require('lodash');var util=require(_0x8fc3('0x0'));var moment=require('moment');var BPromise=require(_0x8fc3('0x1'));var rs=require(_0x8fc3('0x2'));var fs=require('fs');var Redis=require(_0x8fc3('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x8fc3('0x4'));var logger=require(_0x8fc3('0x5'))(_0x8fc3('0x6'));var config=require(_0x8fc3('0x7'));var jayson=require(_0x8fc3('0x8'));var client=jayson['client'][_0x8fc3('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x370c4f,_0x596b83,_0x2feb74){return new BPromise(function(_0x3e89d7,_0x26a101){return client[_0x8fc3('0xa')](_0x370c4f,_0x2feb74)[_0x8fc3('0xb')](function(_0x3f30d2){logger[_0x8fc3('0xc')](_0x8fc3('0xd'),_0x596b83,'request\x20sent');logger[_0x8fc3('0xe')]('FreshdeskAccount,\x20%s,\x20%s,\x20%s',_0x596b83,_0x8fc3('0xf'),JSON[_0x8fc3('0x10')](_0x3f30d2));if(_0x3f30d2[_0x8fc3('0x11')]){if(_0x3f30d2[_0x8fc3('0x11')][_0x8fc3('0x12')]===0x1f4){logger['error'](_0x8fc3('0xd'),_0x596b83,_0x3f30d2[_0x8fc3('0x11')]['message']);return _0x26a101(_0x3f30d2[_0x8fc3('0x11')][_0x8fc3('0x13')]);}logger['error']('FreshdeskAccount,\x20%s,\x20%s',_0x596b83,_0x3f30d2[_0x8fc3('0x11')]['message']);return _0x3e89d7(_0x3f30d2['error'][_0x8fc3('0x13')]);}else{logger[_0x8fc3('0xc')](_0x8fc3('0xd'),_0x596b83,_0x8fc3('0xf'));_0x3e89d7(_0x3f30d2[_0x8fc3('0x14')]['message']);}})[_0x8fc3('0x15')](function(_0x302d3b){logger['error']('FreshdeskAccount,\x20%s,\x20%s',_0x596b83,_0x302d3b);_0x26a101(_0x302d3b);});});}exports[_0x8fc3('0x16')]=function(_0xe5fdef){var _0x5092c6=this;return new Promise(function(_0x4ad916,_0x237169){return db[_0x8fc3('0x17')][_0x8fc3('0x18')]({'raw':_0xe5fdef[_0x8fc3('0x19')]?_0xe5fdef['options'][_0x8fc3('0x1a')]===undefined?!![]:![]:!![],'where':_0xe5fdef[_0x8fc3('0x19')]?_0xe5fdef[_0x8fc3('0x19')][_0x8fc3('0x1b')]||null:null,'attributes':_0xe5fdef['options']?_0xe5fdef['options']['attributes']||null:null,'limit':_0xe5fdef[_0x8fc3('0x19')]?_0xe5fdef[_0x8fc3('0x19')][_0x8fc3('0x1c')]||null:null,'include':_0xe5fdef[_0x8fc3('0x19')]?_0xe5fdef[_0x8fc3('0x19')][_0x8fc3('0x1d')]?_[_0x8fc3('0x1e')](_0xe5fdef[_0x8fc3('0x19')][_0x8fc3('0x1d')],function(_0x16485b){return{'model':db[_0x16485b[_0x8fc3('0x1f')]],'as':_0x16485b['as'],'attributes':_0x16485b['attributes'],'include':_0x16485b['include']?_[_0x8fc3('0x1e')](_0x16485b[_0x8fc3('0x1d')],function(_0x57c13d){return{'model':db[_0x57c13d['model']],'as':_0x57c13d['as'],'attributes':_0x57c13d[_0x8fc3('0x20')],'include':_0x57c13d[_0x8fc3('0x1d')]?_['map'](_0x57c13d[_0x8fc3('0x1d')],function(_0x5b4c2e){return{'model':db[_0x5b4c2e[_0x8fc3('0x1f')]],'as':_0x5b4c2e['as'],'attributes':_0x5b4c2e[_0x8fc3('0x20')]};}):[]};}):[]};}):[]:[]})[_0x8fc3('0xb')](function(_0x48b5c4){logger[_0x8fc3('0xc')](_0x8fc3('0x16'),_0xe5fdef);logger[_0x8fc3('0xe')]('GetFreshdeskAccount',_0xe5fdef,JSON[_0x8fc3('0x10')](_0x48b5c4));_0x4ad916(_0x48b5c4);})['catch'](function(_0x26da4e){logger[_0x8fc3('0x11')](_0x8fc3('0x16'),_0x26da4e[_0x8fc3('0x13')],_0xe5fdef);_0x237169(_0x5092c6['error'](0x1f4,_0x26da4e[_0x8fc3('0x13')]));});});};exports[_0x8fc3('0x21')]=function(_0x128a6e){var _0x5a096d=this;return new Promise(function(_0x49687c,_0x421ca5){return db[_0x8fc3('0x17')][_0x8fc3('0x22')]({'raw':_0x128a6e[_0x8fc3('0x19')]?_0x128a6e[_0x8fc3('0x19')][_0x8fc3('0x1a')]===undefined?!![]:![]:!![],'where':_0x128a6e[_0x8fc3('0x19')]?_0x128a6e[_0x8fc3('0x19')][_0x8fc3('0x1b')]||null:null,'attributes':_0x128a6e[_0x8fc3('0x19')]?_0x128a6e[_0x8fc3('0x19')][_0x8fc3('0x20')]||null:null,'include':_0x128a6e[_0x8fc3('0x19')]?_0x128a6e[_0x8fc3('0x19')]['include']?_[_0x8fc3('0x1e')](_0x128a6e[_0x8fc3('0x19')][_0x8fc3('0x1d')],function(_0x200250){return{'model':db[_0x200250[_0x8fc3('0x1f')]],'as':_0x200250['as'],'attributes':_0x200250['attributes'],'include':_0x200250['include']?_[_0x8fc3('0x1e')](_0x200250[_0x8fc3('0x1d')],function(_0x11d1c6){return{'model':db[_0x11d1c6[_0x8fc3('0x1f')]],'as':_0x11d1c6['as'],'attributes':_0x11d1c6['attributes'],'include':_0x11d1c6['include']?_['map'](_0x11d1c6[_0x8fc3('0x1d')],function(_0x22128f){return{'model':db[_0x22128f['model']],'as':_0x22128f['as'],'attributes':_0x22128f[_0x8fc3('0x20')]};}):[]};}):[]};}):[]:[]})[_0x8fc3('0xb')](function(_0x5b9631){logger[_0x8fc3('0xc')](_0x8fc3('0x21'),_0x128a6e);logger['debug'](_0x8fc3('0x21'),_0x128a6e,JSON[_0x8fc3('0x10')](_0x5b9631));_0x49687c(_0x5b9631);})[_0x8fc3('0x15')](function(_0x4d074c){logger['error'](_0x8fc3('0x21'),_0x4d074c[_0x8fc3('0x13')],_0x128a6e);_0x421ca5(_0x5a096d[_0x8fc3('0x11')](0x1f4,_0x4d074c['message']));});});};
\ No newline at end of file
+var _0xdbb3=['error','code','FreshdeskAccount,\x20%s,\x20%s','message','result','GetFreshdeskAccount','FreshdeskAccount','options','where','limit','include','model','attributes','map','ShowFreshdeskAccount','find','raw','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','request','then','info','request\x20sent','debug','FreshdeskAccount,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x156696,_0x3a9a2e){var _0x5ab7c4=function(_0x26179a){while(--_0x26179a){_0x156696['push'](_0x156696['shift']());}};_0x5ab7c4(++_0x3a9a2e);}(_0xdbb3,0x1c2));var _0x3dbb=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xdbb3[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x3dbb('0x0'));var util=require(_0x3dbb('0x1'));var moment=require(_0x3dbb('0x2'));var BPromise=require(_0x3dbb('0x3'));var rs=require(_0x3dbb('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x3dbb('0x5'))['db'];var utils=require(_0x3dbb('0x6'));var logger=require(_0x3dbb('0x7'))('rpc');var config=require(_0x3dbb('0x8'));var jayson=require(_0x3dbb('0x9'));var client=jayson[_0x3dbb('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1b72b0,_0x380291,_0x48e970){return new BPromise(function(_0x440257,_0x4dd7bf){return client[_0x3dbb('0xb')](_0x1b72b0,_0x48e970)[_0x3dbb('0xc')](function(_0xa185b4){logger[_0x3dbb('0xd')]('FreshdeskAccount,\x20%s,\x20%s',_0x380291,_0x3dbb('0xe'));logger[_0x3dbb('0xf')](_0x3dbb('0x10'),_0x380291,_0x3dbb('0xe'),JSON[_0x3dbb('0x11')](_0xa185b4));if(_0xa185b4['error']){if(_0xa185b4[_0x3dbb('0x12')][_0x3dbb('0x13')]===0x1f4){logger['error'](_0x3dbb('0x14'),_0x380291,_0xa185b4['error'][_0x3dbb('0x15')]);return _0x4dd7bf(_0xa185b4[_0x3dbb('0x12')][_0x3dbb('0x15')]);}logger[_0x3dbb('0x12')](_0x3dbb('0x14'),_0x380291,_0xa185b4[_0x3dbb('0x12')][_0x3dbb('0x15')]);return _0x440257(_0xa185b4[_0x3dbb('0x12')][_0x3dbb('0x15')]);}else{logger[_0x3dbb('0xd')]('FreshdeskAccount,\x20%s,\x20%s',_0x380291,_0x3dbb('0xe'));_0x440257(_0xa185b4[_0x3dbb('0x16')][_0x3dbb('0x15')]);}})['catch'](function(_0x108028){logger[_0x3dbb('0x12')](_0x3dbb('0x14'),_0x380291,_0x108028);_0x4dd7bf(_0x108028);});});}exports[_0x3dbb('0x17')]=function(_0x3a5c81){var _0x21c12a=this;return new Promise(function(_0x3050c1,_0x313bfd){return db[_0x3dbb('0x18')]['findAll']({'raw':_0x3a5c81[_0x3dbb('0x19')]?_0x3a5c81[_0x3dbb('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0x3a5c81[_0x3dbb('0x19')]?_0x3a5c81[_0x3dbb('0x19')][_0x3dbb('0x1a')]||null:null,'attributes':_0x3a5c81['options']?_0x3a5c81[_0x3dbb('0x19')]['attributes']||null:null,'limit':_0x3a5c81[_0x3dbb('0x19')]?_0x3a5c81[_0x3dbb('0x19')][_0x3dbb('0x1b')]||null:null,'include':_0x3a5c81['options']?_0x3a5c81[_0x3dbb('0x19')][_0x3dbb('0x1c')]?_['map'](_0x3a5c81[_0x3dbb('0x19')][_0x3dbb('0x1c')],function(_0xa5862d){return{'model':db[_0xa5862d[_0x3dbb('0x1d')]],'as':_0xa5862d['as'],'attributes':_0xa5862d[_0x3dbb('0x1e')],'include':_0xa5862d[_0x3dbb('0x1c')]?_[_0x3dbb('0x1f')](_0xa5862d['include'],function(_0x8a0fca){return{'model':db[_0x8a0fca['model']],'as':_0x8a0fca['as'],'attributes':_0x8a0fca[_0x3dbb('0x1e')],'include':_0x8a0fca[_0x3dbb('0x1c')]?_[_0x3dbb('0x1f')](_0x8a0fca['include'],function(_0x27f38b){return{'model':db[_0x27f38b['model']],'as':_0x27f38b['as'],'attributes':_0x27f38b['attributes']};}):[]};}):[]};}):[]:[]})[_0x3dbb('0xc')](function(_0x49da3a){logger[_0x3dbb('0xd')]('GetFreshdeskAccount',_0x3a5c81);logger[_0x3dbb('0xf')](_0x3dbb('0x17'),_0x3a5c81,JSON[_0x3dbb('0x11')](_0x49da3a));_0x3050c1(_0x49da3a);})['catch'](function(_0x2e9731){logger[_0x3dbb('0x12')](_0x3dbb('0x17'),_0x2e9731[_0x3dbb('0x15')],_0x3a5c81);_0x313bfd(_0x21c12a[_0x3dbb('0x12')](0x1f4,_0x2e9731[_0x3dbb('0x15')]));});});};exports[_0x3dbb('0x20')]=function(_0xf09e4d){var _0x333d0e=this;return new Promise(function(_0x166b60,_0x58566c){return db[_0x3dbb('0x18')][_0x3dbb('0x21')]({'raw':_0xf09e4d[_0x3dbb('0x19')]?_0xf09e4d[_0x3dbb('0x19')][_0x3dbb('0x22')]===undefined?!![]:![]:!![],'where':_0xf09e4d[_0x3dbb('0x19')]?_0xf09e4d[_0x3dbb('0x19')][_0x3dbb('0x1a')]||null:null,'attributes':_0xf09e4d['options']?_0xf09e4d[_0x3dbb('0x19')]['attributes']||null:null,'include':_0xf09e4d['options']?_0xf09e4d['options'][_0x3dbb('0x1c')]?_[_0x3dbb('0x1f')](_0xf09e4d[_0x3dbb('0x19')][_0x3dbb('0x1c')],function(_0x1672ed){return{'model':db[_0x1672ed[_0x3dbb('0x1d')]],'as':_0x1672ed['as'],'attributes':_0x1672ed[_0x3dbb('0x1e')],'include':_0x1672ed[_0x3dbb('0x1c')]?_[_0x3dbb('0x1f')](_0x1672ed[_0x3dbb('0x1c')],function(_0x4ad106){return{'model':db[_0x4ad106[_0x3dbb('0x1d')]],'as':_0x4ad106['as'],'attributes':_0x4ad106[_0x3dbb('0x1e')],'include':_0x4ad106['include']?_[_0x3dbb('0x1f')](_0x4ad106[_0x3dbb('0x1c')],function(_0x401ea7){return{'model':db[_0x401ea7[_0x3dbb('0x1d')]],'as':_0x401ea7['as'],'attributes':_0x401ea7['attributes']};}):[]};}):[]};}):[]:[]})[_0x3dbb('0xc')](function(_0x1dcbe2){logger[_0x3dbb('0xd')](_0x3dbb('0x20'),_0xf09e4d);logger[_0x3dbb('0xf')](_0x3dbb('0x20'),_0xf09e4d,JSON['stringify'](_0x1dcbe2));_0x166b60(_0x1dcbe2);})[_0x3dbb('0x23')](function(_0xf2856d){logger['error'](_0x3dbb('0x20'),_0xf2856d[_0x3dbb('0x15')],_0xf09e4d);_0x58566c(_0x333d0e[_0x3dbb('0x12')](0x1f4,_0xf2856d['message']));});});};
\ No newline at end of file