Built motion from commit cb845558.|2.6.34
[motion2.git] / server / api / intZendeskAccount / intZendeskAccount.rpc.js
index d8faeec..ef6561f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6a10=['then','info','ZendeskAccount,\x20%s,\x20%s','debug','ZendeskAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','request\x20sent','result','catch','GetZendeskAccount','findAll','options','attributes','limit','include','map','model','ShowZendeskAccount','ZendeskAccount','find','raw','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','request'];(function(_0x3da938,_0x25797d){var _0x2b2768=function(_0x58d079){while(--_0x58d079){_0x3da938['push'](_0x3da938['shift']());}};_0x2b2768(++_0x25797d);}(_0x6a10,0xe3));var _0x06a1=function(_0x5cb1af,_0x4bdc8c){_0x5cb1af=_0x5cb1af-0x0;var _0x8d7940=_0x6a10[_0x5cb1af];return _0x8d7940;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x06a1('0x0'));var BPromise=require(_0x06a1('0x1'));var rs=require(_0x06a1('0x2'));var fs=require('fs');var Redis=require(_0x06a1('0x3'));var db=require(_0x06a1('0x4'))['db'];var utils=require(_0x06a1('0x5'));var logger=require(_0x06a1('0x6'))(_0x06a1('0x7'));var config=require(_0x06a1('0x8'));var jayson=require(_0x06a1('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x5259a9,_0x2d3577,_0x3451cb){return new BPromise(function(_0x3fdf82,_0x1cbc29){return client[_0x06a1('0xa')](_0x5259a9,_0x3451cb)[_0x06a1('0xb')](function(_0x186c96){logger[_0x06a1('0xc')](_0x06a1('0xd'),_0x2d3577,'request\x20sent');logger[_0x06a1('0xe')](_0x06a1('0xf'),_0x2d3577,'request\x20sent',JSON[_0x06a1('0x10')](_0x186c96));if(_0x186c96['error']){if(_0x186c96[_0x06a1('0x11')]['code']===0x1f4){logger[_0x06a1('0x11')](_0x06a1('0xd'),_0x2d3577,_0x186c96['error']['message']);return _0x1cbc29(_0x186c96[_0x06a1('0x11')][_0x06a1('0x12')]);}logger[_0x06a1('0x11')]('ZendeskAccount,\x20%s,\x20%s',_0x2d3577,_0x186c96[_0x06a1('0x11')][_0x06a1('0x12')]);return _0x3fdf82(_0x186c96[_0x06a1('0x11')][_0x06a1('0x12')]);}else{logger[_0x06a1('0xc')](_0x06a1('0xd'),_0x2d3577,_0x06a1('0x13'));_0x3fdf82(_0x186c96[_0x06a1('0x14')][_0x06a1('0x12')]);}})[_0x06a1('0x15')](function(_0x519b47){logger[_0x06a1('0x11')](_0x06a1('0xd'),_0x2d3577,_0x519b47);_0x1cbc29(_0x519b47);});});}exports[_0x06a1('0x16')]=function(_0x274814){var _0x10f1bd=this;return new Promise(function(_0x3c5e71,_0x54cc57){return db['ZendeskAccount'][_0x06a1('0x17')]({'raw':_0x274814[_0x06a1('0x18')]?_0x274814[_0x06a1('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x274814[_0x06a1('0x18')]?_0x274814[_0x06a1('0x18')]['where']||null:null,'attributes':_0x274814[_0x06a1('0x18')]?_0x274814[_0x06a1('0x18')][_0x06a1('0x19')]||null:null,'limit':_0x274814[_0x06a1('0x18')]?_0x274814[_0x06a1('0x18')][_0x06a1('0x1a')]||null:null,'include':_0x274814['options']?_0x274814[_0x06a1('0x18')][_0x06a1('0x1b')]?_[_0x06a1('0x1c')](_0x274814['options'][_0x06a1('0x1b')],function(_0x1a2462){return{'model':db[_0x1a2462['model']],'as':_0x1a2462['as'],'attributes':_0x1a2462[_0x06a1('0x19')],'include':_0x1a2462[_0x06a1('0x1b')]?_['map'](_0x1a2462['include'],function(_0x344bff){return{'model':db[_0x344bff[_0x06a1('0x1d')]],'as':_0x344bff['as'],'attributes':_0x344bff['attributes'],'include':_0x344bff[_0x06a1('0x1b')]?_['map'](_0x344bff[_0x06a1('0x1b')],function(_0x350894){return{'model':db[_0x350894[_0x06a1('0x1d')]],'as':_0x350894['as'],'attributes':_0x350894[_0x06a1('0x19')]};}):[]};}):[]};}):[]:[]})[_0x06a1('0xb')](function(_0x4e583f){logger[_0x06a1('0xc')](_0x06a1('0x16'),_0x274814);logger[_0x06a1('0xe')]('GetZendeskAccount',_0x274814,JSON[_0x06a1('0x10')](_0x4e583f));_0x3c5e71(_0x4e583f);})[_0x06a1('0x15')](function(_0x22819e){logger[_0x06a1('0x11')](_0x06a1('0x16'),_0x22819e[_0x06a1('0x12')],_0x274814);_0x54cc57(_0x10f1bd[_0x06a1('0x11')](0x1f4,_0x22819e['message']));});});};exports[_0x06a1('0x1e')]=function(_0x2732fd){var _0x58bcc6=this;return new Promise(function(_0x23ade6,_0x45adb4){return db[_0x06a1('0x1f')][_0x06a1('0x20')]({'raw':_0x2732fd['options']?_0x2732fd[_0x06a1('0x18')][_0x06a1('0x21')]===undefined?!![]:![]:!![],'where':_0x2732fd[_0x06a1('0x18')]?_0x2732fd[_0x06a1('0x18')]['where']||null:null,'attributes':_0x2732fd[_0x06a1('0x18')]?_0x2732fd[_0x06a1('0x18')][_0x06a1('0x19')]||null:null,'include':_0x2732fd['options']?_0x2732fd['options'][_0x06a1('0x1b')]?_[_0x06a1('0x1c')](_0x2732fd[_0x06a1('0x18')][_0x06a1('0x1b')],function(_0x117ac7){return{'model':db[_0x117ac7['model']],'as':_0x117ac7['as'],'attributes':_0x117ac7[_0x06a1('0x19')],'include':_0x117ac7['include']?_[_0x06a1('0x1c')](_0x117ac7[_0x06a1('0x1b')],function(_0x46343d){return{'model':db[_0x46343d[_0x06a1('0x1d')]],'as':_0x46343d['as'],'attributes':_0x46343d[_0x06a1('0x19')],'include':_0x46343d['include']?_[_0x06a1('0x1c')](_0x46343d[_0x06a1('0x1b')],function(_0x51fc13){return{'model':db[_0x51fc13[_0x06a1('0x1d')]],'as':_0x51fc13['as'],'attributes':_0x51fc13[_0x06a1('0x19')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x1639c4){logger[_0x06a1('0xc')]('ShowZendeskAccount',_0x2732fd);logger[_0x06a1('0xe')](_0x06a1('0x1e'),_0x2732fd,JSON[_0x06a1('0x10')](_0x1639c4));_0x23ade6(_0x1639c4);})[_0x06a1('0x15')](function(_0x12462d){logger[_0x06a1('0x11')](_0x06a1('0x1e'),_0x12462d[_0x06a1('0x12')],_0x2732fd);_0x45adb4(_0x58bcc6[_0x06a1('0x11')](0x1f4,_0x12462d[_0x06a1('0x12')]));});});};
\ No newline at end of file
+var _0xce1a=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','request','info','ZendeskAccount,\x20%s,\x20%s','request\x20sent','ZendeskAccount,\x20%s,\x20%s,\x20%s','error','message','result','GetZendeskAccount','options','raw','limit','include','map','model','attributes','then','debug','stringify','catch','ShowZendeskAccount','ZendeskAccount','find','where','lodash'];(function(_0x8c43de,_0x90ff31){var _0xa6591b=function(_0x469716){while(--_0x469716){_0x8c43de['push'](_0x8c43de['shift']());}};_0xa6591b(++_0x90ff31);}(_0xce1a,0xbf));var _0xace1=function(_0x391476,_0xa2bc64){_0x391476=_0x391476-0x0;var _0x44ace8=_0xce1a[_0x391476];return _0x44ace8;};'use strict';var _=require(_0xace1('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xace1('0x1'));var fs=require('fs');var Redis=require(_0xace1('0x2'));var db=require(_0xace1('0x3'))['db'];var utils=require(_0xace1('0x4'));var logger=require(_0xace1('0x5'))('rpc');var config=require(_0xace1('0x6'));var jayson=require('jayson/promise');var client=jayson[_0xace1('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x7c8f64,_0x2203ef,_0x7f3613){return new BPromise(function(_0x576b34,_0x495cff){return client[_0xace1('0x8')](_0x7c8f64,_0x7f3613)['then'](function(_0x3c8579){logger[_0xace1('0x9')](_0xace1('0xa'),_0x2203ef,_0xace1('0xb'));logger['debug'](_0xace1('0xc'),_0x2203ef,_0xace1('0xb'),JSON['stringify'](_0x3c8579));if(_0x3c8579[_0xace1('0xd')]){if(_0x3c8579[_0xace1('0xd')]['code']===0x1f4){logger['error']('ZendeskAccount,\x20%s,\x20%s',_0x2203ef,_0x3c8579[_0xace1('0xd')][_0xace1('0xe')]);return _0x495cff(_0x3c8579[_0xace1('0xd')]['message']);}logger['error']('ZendeskAccount,\x20%s,\x20%s',_0x2203ef,_0x3c8579[_0xace1('0xd')][_0xace1('0xe')]);return _0x576b34(_0x3c8579[_0xace1('0xd')][_0xace1('0xe')]);}else{logger[_0xace1('0x9')](_0xace1('0xa'),_0x2203ef,_0xace1('0xb'));_0x576b34(_0x3c8579[_0xace1('0xf')]['message']);}})['catch'](function(_0x42dd0e){logger[_0xace1('0xd')]('ZendeskAccount,\x20%s,\x20%s',_0x2203ef,_0x42dd0e);_0x495cff(_0x42dd0e);});});}exports[_0xace1('0x10')]=function(_0x162a79){var _0x377507=this;return new Promise(function(_0x45541e,_0x28ab49){return db['ZendeskAccount']['findAll']({'raw':_0x162a79[_0xace1('0x11')]?_0x162a79['options'][_0xace1('0x12')]===undefined?!![]:![]:!![],'where':_0x162a79[_0xace1('0x11')]?_0x162a79[_0xace1('0x11')]['where']||null:null,'attributes':_0x162a79[_0xace1('0x11')]?_0x162a79[_0xace1('0x11')]['attributes']||null:null,'limit':_0x162a79[_0xace1('0x11')]?_0x162a79[_0xace1('0x11')][_0xace1('0x13')]||null:null,'include':_0x162a79[_0xace1('0x11')]?_0x162a79[_0xace1('0x11')][_0xace1('0x14')]?_[_0xace1('0x15')](_0x162a79[_0xace1('0x11')][_0xace1('0x14')],function(_0x120c33){return{'model':db[_0x120c33[_0xace1('0x16')]],'as':_0x120c33['as'],'attributes':_0x120c33[_0xace1('0x17')],'include':_0x120c33[_0xace1('0x14')]?_[_0xace1('0x15')](_0x120c33['include'],function(_0x5e99f5){return{'model':db[_0x5e99f5[_0xace1('0x16')]],'as':_0x5e99f5['as'],'attributes':_0x5e99f5[_0xace1('0x17')],'include':_0x5e99f5[_0xace1('0x14')]?_['map'](_0x5e99f5[_0xace1('0x14')],function(_0x51ab2c){return{'model':db[_0x51ab2c[_0xace1('0x16')]],'as':_0x51ab2c['as'],'attributes':_0x51ab2c[_0xace1('0x17')]};}):[]};}):[]};}):[]:[]})[_0xace1('0x18')](function(_0x15ca0d){logger['info']('GetZendeskAccount',_0x162a79);logger[_0xace1('0x19')](_0xace1('0x10'),_0x162a79,JSON[_0xace1('0x1a')](_0x15ca0d));_0x45541e(_0x15ca0d);})[_0xace1('0x1b')](function(_0x4f52a9){logger['error'](_0xace1('0x10'),_0x4f52a9[_0xace1('0xe')],_0x162a79);_0x28ab49(_0x377507[_0xace1('0xd')](0x1f4,_0x4f52a9[_0xace1('0xe')]));});});};exports[_0xace1('0x1c')]=function(_0xca9f7d){var _0x356a8e=this;return new Promise(function(_0x9b5560,_0xf78389){return db[_0xace1('0x1d')][_0xace1('0x1e')]({'raw':_0xca9f7d[_0xace1('0x11')]?_0xca9f7d[_0xace1('0x11')][_0xace1('0x12')]===undefined?!![]:![]:!![],'where':_0xca9f7d['options']?_0xca9f7d['options'][_0xace1('0x1f')]||null:null,'attributes':_0xca9f7d['options']?_0xca9f7d[_0xace1('0x11')][_0xace1('0x17')]||null:null,'include':_0xca9f7d[_0xace1('0x11')]?_0xca9f7d[_0xace1('0x11')][_0xace1('0x14')]?_[_0xace1('0x15')](_0xca9f7d['options'][_0xace1('0x14')],function(_0x3182a4){return{'model':db[_0x3182a4[_0xace1('0x16')]],'as':_0x3182a4['as'],'attributes':_0x3182a4['attributes'],'include':_0x3182a4['include']?_[_0xace1('0x15')](_0x3182a4[_0xace1('0x14')],function(_0x28b8e6){return{'model':db[_0x28b8e6[_0xace1('0x16')]],'as':_0x28b8e6['as'],'attributes':_0x28b8e6[_0xace1('0x17')],'include':_0x28b8e6[_0xace1('0x14')]?_[_0xace1('0x15')](_0x28b8e6[_0xace1('0x14')],function(_0x3c81bb){return{'model':db[_0x3c81bb[_0xace1('0x16')]],'as':_0x3c81bb['as'],'attributes':_0x3c81bb[_0xace1('0x17')]};}):[]};}):[]};}):[]:[]})[_0xace1('0x18')](function(_0x374a11){logger['info']('ShowZendeskAccount',_0xca9f7d);logger['debug'](_0xace1('0x1c'),_0xca9f7d,JSON[_0xace1('0x1a')](_0x374a11));_0x9b5560(_0x374a11);})['catch'](function(_0x3aee99){logger[_0xace1('0xd')](_0xace1('0x1c'),_0x3aee99[_0xace1('0xe')],_0xca9f7d);_0xf78389(_0x356a8e[_0xace1('0xd')](0x1f4,_0x3aee99['message']));});});};
\ No newline at end of file