Built motion from commit (unavailable).|2.4.4
[motion2.git] / server / api / intFreshdeskAccount / intFreshdeskAccount.rpc.js
index 66ad3d1..25f40ac 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0a68=['FreshdeskAccount','options','raw','where','attributes','limit','include','map','model','GetFreshdeskAccount','stringify','ShowFreshdeskAccount','find','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','request','then','info','FreshdeskAccount,\x20%s,\x20%s','request\x20sent','debug','error','code','message','catch'];(function(_0x1872fa,_0x4517bb){var _0x164eb2=function(_0x3e53f7){while(--_0x3e53f7){_0x1872fa['push'](_0x1872fa['shift']());}};_0x164eb2(++_0x4517bb);}(_0x0a68,0x115));var _0x80a6=function(_0x3848d6,_0x9ada9e){_0x3848d6=_0x3848d6-0x0;var _0x501ae5=_0x0a68[_0x3848d6];return _0x501ae5;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x80a6('0x0'));var BPromise=require(_0x80a6('0x1'));var rs=require(_0x80a6('0x2'));var fs=require('fs');var Redis=require(_0x80a6('0x3'));var db=require(_0x80a6('0x4'))['db'];var utils=require(_0x80a6('0x5'));var logger=require(_0x80a6('0x6'))('rpc');var config=require(_0x80a6('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x80a6('0x8')][_0x80a6('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x4f021c,_0xb271f5,_0x4b33a0){return new BPromise(function(_0x40e89f,_0x2ef932){return client[_0x80a6('0xa')](_0x4f021c,_0x4b33a0)[_0x80a6('0xb')](function(_0x3f08d8){logger[_0x80a6('0xc')](_0x80a6('0xd'),_0xb271f5,_0x80a6('0xe'));logger[_0x80a6('0xf')]('FreshdeskAccount,\x20%s,\x20%s,\x20%s',_0xb271f5,_0x80a6('0xe'),JSON['stringify'](_0x3f08d8));if(_0x3f08d8['error']){if(_0x3f08d8[_0x80a6('0x10')][_0x80a6('0x11')]===0x1f4){logger[_0x80a6('0x10')](_0x80a6('0xd'),_0xb271f5,_0x3f08d8[_0x80a6('0x10')][_0x80a6('0x12')]);return _0x2ef932(_0x3f08d8[_0x80a6('0x10')]['message']);}logger[_0x80a6('0x10')](_0x80a6('0xd'),_0xb271f5,_0x3f08d8['error'][_0x80a6('0x12')]);return _0x40e89f(_0x3f08d8[_0x80a6('0x10')]['message']);}else{logger[_0x80a6('0xc')]('FreshdeskAccount,\x20%s,\x20%s',_0xb271f5,'request\x20sent');_0x40e89f(_0x3f08d8['result'][_0x80a6('0x12')]);}})[_0x80a6('0x13')](function(_0x2e8554){logger['error']('FreshdeskAccount,\x20%s,\x20%s',_0xb271f5,_0x2e8554);_0x2ef932(_0x2e8554);});});}exports['GetFreshdeskAccount']=function(_0x4febe3){var _0x169f3c=this;return new Promise(function(_0xef624a,_0x11239e){return db[_0x80a6('0x14')]['findAll']({'raw':_0x4febe3[_0x80a6('0x15')]?_0x4febe3[_0x80a6('0x15')][_0x80a6('0x16')]===undefined?!![]:![]:!![],'where':_0x4febe3[_0x80a6('0x15')]?_0x4febe3[_0x80a6('0x15')][_0x80a6('0x17')]||null:null,'attributes':_0x4febe3['options']?_0x4febe3['options'][_0x80a6('0x18')]||null:null,'limit':_0x4febe3[_0x80a6('0x15')]?_0x4febe3[_0x80a6('0x15')][_0x80a6('0x19')]||null:null,'include':_0x4febe3[_0x80a6('0x15')]?_0x4febe3['options'][_0x80a6('0x1a')]?_[_0x80a6('0x1b')](_0x4febe3[_0x80a6('0x15')][_0x80a6('0x1a')],function(_0x281c89){return{'model':db[_0x281c89[_0x80a6('0x1c')]],'as':_0x281c89['as'],'attributes':_0x281c89[_0x80a6('0x18')],'include':_0x281c89[_0x80a6('0x1a')]?_[_0x80a6('0x1b')](_0x281c89[_0x80a6('0x1a')],function(_0x3c7a38){return{'model':db[_0x3c7a38[_0x80a6('0x1c')]],'as':_0x3c7a38['as'],'attributes':_0x3c7a38[_0x80a6('0x18')],'include':_0x3c7a38[_0x80a6('0x1a')]?_[_0x80a6('0x1b')](_0x3c7a38['include'],function(_0x4cf8f1){return{'model':db[_0x4cf8f1[_0x80a6('0x1c')]],'as':_0x4cf8f1['as'],'attributes':_0x4cf8f1[_0x80a6('0x18')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x24da93){logger[_0x80a6('0xc')](_0x80a6('0x1d'),_0x4febe3);logger[_0x80a6('0xf')](_0x80a6('0x1d'),_0x4febe3,JSON[_0x80a6('0x1e')](_0x24da93));_0xef624a(_0x24da93);})[_0x80a6('0x13')](function(_0x3d3daf){logger[_0x80a6('0x10')](_0x80a6('0x1d'),_0x3d3daf[_0x80a6('0x12')],_0x4febe3);_0x11239e(_0x169f3c[_0x80a6('0x10')](0x1f4,_0x3d3daf[_0x80a6('0x12')]));});});};exports[_0x80a6('0x1f')]=function(_0x2bc139){var _0x17dbcd=this;return new Promise(function(_0x15b155,_0x1684e7){return db[_0x80a6('0x14')][_0x80a6('0x20')]({'raw':_0x2bc139[_0x80a6('0x15')]?_0x2bc139[_0x80a6('0x15')]['raw']===undefined?!![]:![]:!![],'where':_0x2bc139[_0x80a6('0x15')]?_0x2bc139['options'][_0x80a6('0x17')]||null:null,'attributes':_0x2bc139[_0x80a6('0x15')]?_0x2bc139[_0x80a6('0x15')][_0x80a6('0x18')]||null:null,'include':_0x2bc139[_0x80a6('0x15')]?_0x2bc139[_0x80a6('0x15')][_0x80a6('0x1a')]?_[_0x80a6('0x1b')](_0x2bc139[_0x80a6('0x15')][_0x80a6('0x1a')],function(_0x52c202){return{'model':db[_0x52c202[_0x80a6('0x1c')]],'as':_0x52c202['as'],'attributes':_0x52c202['attributes'],'include':_0x52c202[_0x80a6('0x1a')]?_[_0x80a6('0x1b')](_0x52c202[_0x80a6('0x1a')],function(_0x5dd287){return{'model':db[_0x5dd287[_0x80a6('0x1c')]],'as':_0x5dd287['as'],'attributes':_0x5dd287[_0x80a6('0x18')],'include':_0x5dd287['include']?_[_0x80a6('0x1b')](_0x5dd287[_0x80a6('0x1a')],function(_0x3ddd33){return{'model':db[_0x3ddd33[_0x80a6('0x1c')]],'as':_0x3ddd33['as'],'attributes':_0x3ddd33[_0x80a6('0x18')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x5ed493){logger[_0x80a6('0xc')](_0x80a6('0x1f'),_0x2bc139);logger['debug']('ShowFreshdeskAccount',_0x2bc139,JSON[_0x80a6('0x1e')](_0x5ed493));_0x15b155(_0x5ed493);})['catch'](function(_0x7a254c){logger[_0x80a6('0x10')](_0x80a6('0x1f'),_0x7a254c['message'],_0x2bc139);_0x1684e7(_0x17dbcd[_0x80a6('0x10')](0x1f4,_0x7a254c[_0x80a6('0x12')]));});});};
\ No newline at end of file
+var _0xe6dc=['request','info','FreshdeskAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','GetFreshdeskAccount','findAll','options','raw','where','include','map','model','attributes','catch','ShowFreshdeskAccount','FreshdeskAccount','then','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client'];(function(_0x141661,_0x106354){var _0xbe6d6a=function(_0x2171be){while(--_0x2171be){_0x141661['push'](_0x141661['shift']());}};_0xbe6d6a(++_0x106354);}(_0xe6dc,0x1de));var _0xce6d=function(_0x1d0668,_0x2f2f1d){_0x1d0668=_0x1d0668-0x0;var _0x7fa863=_0xe6dc[_0x1d0668];return _0x7fa863;};'use strict';var _=require(_0xce6d('0x0'));var util=require(_0xce6d('0x1'));var moment=require(_0xce6d('0x2'));var BPromise=require(_0xce6d('0x3'));var rs=require(_0xce6d('0x4'));var fs=require('fs');var Redis=require(_0xce6d('0x5'));var db=require(_0xce6d('0x6'))['db'];var utils=require(_0xce6d('0x7'));var logger=require(_0xce6d('0x8'))(_0xce6d('0x9'));var config=require('../../config/environment');var jayson=require(_0xce6d('0xa'));var client=jayson[_0xce6d('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x13277b,_0x44062e,_0x169346){return new BPromise(function(_0x56e3ca,_0x2a61a4){return client[_0xce6d('0xc')](_0x13277b,_0x169346)['then'](function(_0xf1485c){logger[_0xce6d('0xd')](_0xce6d('0xe'),_0x44062e,_0xce6d('0xf'));logger[_0xce6d('0x10')]('FreshdeskAccount,\x20%s,\x20%s,\x20%s',_0x44062e,_0xce6d('0xf'),JSON[_0xce6d('0x11')](_0xf1485c));if(_0xf1485c[_0xce6d('0x12')]){if(_0xf1485c['error'][_0xce6d('0x13')]===0x1f4){logger['error'](_0xce6d('0xe'),_0x44062e,_0xf1485c[_0xce6d('0x12')][_0xce6d('0x14')]);return _0x2a61a4(_0xf1485c[_0xce6d('0x12')][_0xce6d('0x14')]);}logger[_0xce6d('0x12')](_0xce6d('0xe'),_0x44062e,_0xf1485c[_0xce6d('0x12')][_0xce6d('0x14')]);return _0x56e3ca(_0xf1485c[_0xce6d('0x12')]['message']);}else{logger[_0xce6d('0xd')](_0xce6d('0xe'),_0x44062e,_0xce6d('0xf'));_0x56e3ca(_0xf1485c[_0xce6d('0x15')][_0xce6d('0x14')]);}})['catch'](function(_0x47a3f9){logger[_0xce6d('0x12')](_0xce6d('0xe'),_0x44062e,_0x47a3f9);_0x2a61a4(_0x47a3f9);});});}exports[_0xce6d('0x16')]=function(_0x256198){var _0x37214d=this;return new Promise(function(_0x39e586,_0xa5ee27){return db['FreshdeskAccount'][_0xce6d('0x17')]({'raw':_0x256198['options']?_0x256198[_0xce6d('0x18')][_0xce6d('0x19')]===undefined?!![]:![]:!![],'where':_0x256198[_0xce6d('0x18')]?_0x256198[_0xce6d('0x18')][_0xce6d('0x1a')]||null:null,'attributes':_0x256198['options']?_0x256198[_0xce6d('0x18')]['attributes']||null:null,'limit':_0x256198[_0xce6d('0x18')]?_0x256198[_0xce6d('0x18')]['limit']||null:null,'include':_0x256198[_0xce6d('0x18')]?_0x256198['options'][_0xce6d('0x1b')]?_[_0xce6d('0x1c')](_0x256198['options'][_0xce6d('0x1b')],function(_0x3ff9e9){return{'model':db[_0x3ff9e9[_0xce6d('0x1d')]],'as':_0x3ff9e9['as'],'attributes':_0x3ff9e9[_0xce6d('0x1e')],'include':_0x3ff9e9[_0xce6d('0x1b')]?_[_0xce6d('0x1c')](_0x3ff9e9[_0xce6d('0x1b')],function(_0x40a603){return{'model':db[_0x40a603[_0xce6d('0x1d')]],'as':_0x40a603['as'],'attributes':_0x40a603['attributes'],'include':_0x40a603[_0xce6d('0x1b')]?_[_0xce6d('0x1c')](_0x40a603[_0xce6d('0x1b')],function(_0x58b7a5){return{'model':db[_0x58b7a5[_0xce6d('0x1d')]],'as':_0x58b7a5['as'],'attributes':_0x58b7a5[_0xce6d('0x1e')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x412e97){logger[_0xce6d('0xd')](_0xce6d('0x16'),_0x256198);logger[_0xce6d('0x10')]('GetFreshdeskAccount',_0x256198,JSON[_0xce6d('0x11')](_0x412e97));_0x39e586(_0x412e97);})[_0xce6d('0x1f')](function(_0x17682d){logger[_0xce6d('0x12')](_0xce6d('0x16'),_0x17682d[_0xce6d('0x14')],_0x256198);_0xa5ee27(_0x37214d['error'](0x1f4,_0x17682d[_0xce6d('0x14')]));});});};exports[_0xce6d('0x20')]=function(_0x484d26){var _0x5a9e49=this;return new Promise(function(_0x274479,_0x17976f){return db[_0xce6d('0x21')]['find']({'raw':_0x484d26[_0xce6d('0x18')]?_0x484d26[_0xce6d('0x18')][_0xce6d('0x19')]===undefined?!![]:![]:!![],'where':_0x484d26['options']?_0x484d26[_0xce6d('0x18')][_0xce6d('0x1a')]||null:null,'attributes':_0x484d26[_0xce6d('0x18')]?_0x484d26[_0xce6d('0x18')][_0xce6d('0x1e')]||null:null,'include':_0x484d26['options']?_0x484d26[_0xce6d('0x18')][_0xce6d('0x1b')]?_[_0xce6d('0x1c')](_0x484d26['options'][_0xce6d('0x1b')],function(_0x57b811){return{'model':db[_0x57b811[_0xce6d('0x1d')]],'as':_0x57b811['as'],'attributes':_0x57b811[_0xce6d('0x1e')],'include':_0x57b811[_0xce6d('0x1b')]?_[_0xce6d('0x1c')](_0x57b811[_0xce6d('0x1b')],function(_0x1ac7f3){return{'model':db[_0x1ac7f3[_0xce6d('0x1d')]],'as':_0x1ac7f3['as'],'attributes':_0x1ac7f3[_0xce6d('0x1e')],'include':_0x1ac7f3[_0xce6d('0x1b')]?_[_0xce6d('0x1c')](_0x1ac7f3[_0xce6d('0x1b')],function(_0x2a3156){return{'model':db[_0x2a3156[_0xce6d('0x1d')]],'as':_0x2a3156['as'],'attributes':_0x2a3156['attributes']};}):[]};}):[]};}):[]:[]})[_0xce6d('0x22')](function(_0x3021fd){logger['info'](_0xce6d('0x20'),_0x484d26);logger[_0xce6d('0x10')](_0xce6d('0x20'),_0x484d26,JSON[_0xce6d('0x11')](_0x3021fd));_0x274479(_0x3021fd);})[_0xce6d('0x1f')](function(_0x37d666){logger[_0xce6d('0x12')]('ShowFreshdeskAccount',_0x37d666[_0xce6d('0x14')],_0x484d26);_0x17976f(_0x5a9e49['error'](0x1f4,_0x37d666['message']));});});};
\ No newline at end of file