Built motion from commit 14588770.|2.5.38
[motion2.git] / server / api / intZendeskAccount / intZendeskAccount.rpc.js
index 08daeb5..4ee2e05 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x64c7=['../../mysqldb','../../config/utils','jayson/promise','client','http','request','info','ZendeskAccount,\x20%s,\x20%s','request\x20sent','debug','ZendeskAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','GetZendeskAccount','ZendeskAccount','findAll','options','raw','where','attributes','limit','map','include','model','then','ShowZendeskAccount','find','lodash','util','moment','bluebird','ioredis'];(function(_0x40c19f,_0x125d91){var _0x4f4c7d=function(_0x40efbc){while(--_0x40efbc){_0x40c19f['push'](_0x40c19f['shift']());}};_0x4f4c7d(++_0x125d91);}(_0x64c7,0x1b5));var _0x764c=function(_0x53b8e0,_0x55d46e){_0x53b8e0=_0x53b8e0-0x0;var _0x10630c=_0x64c7[_0x53b8e0];return _0x10630c;};'use strict';var _=require(_0x764c('0x0'));var util=require(_0x764c('0x1'));var moment=require(_0x764c('0x2'));var BPromise=require(_0x764c('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x764c('0x4'));var db=require(_0x764c('0x5'))['db'];var utils=require(_0x764c('0x6'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0x764c('0x7'));var client=jayson[_0x764c('0x8')][_0x764c('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3e3fc5,_0x18269d,_0x8dd5b1){return new BPromise(function(_0x319cd8,_0x404bcb){return client[_0x764c('0xa')](_0x3e3fc5,_0x8dd5b1)['then'](function(_0xecf754){logger[_0x764c('0xb')](_0x764c('0xc'),_0x18269d,_0x764c('0xd'));logger[_0x764c('0xe')](_0x764c('0xf'),_0x18269d,'request\x20sent',JSON[_0x764c('0x10')](_0xecf754));if(_0xecf754['error']){if(_0xecf754[_0x764c('0x11')]['code']===0x1f4){logger[_0x764c('0x11')](_0x764c('0xc'),_0x18269d,_0xecf754[_0x764c('0x11')][_0x764c('0x12')]);return _0x404bcb(_0xecf754[_0x764c('0x11')]['message']);}logger[_0x764c('0x11')](_0x764c('0xc'),_0x18269d,_0xecf754[_0x764c('0x11')][_0x764c('0x12')]);return _0x319cd8(_0xecf754[_0x764c('0x11')][_0x764c('0x12')]);}else{logger[_0x764c('0xb')]('ZendeskAccount,\x20%s,\x20%s',_0x18269d,_0x764c('0xd'));_0x319cd8(_0xecf754['result']['message']);}})[_0x764c('0x13')](function(_0x338e87){logger['error'](_0x764c('0xc'),_0x18269d,_0x338e87);_0x404bcb(_0x338e87);});});}exports[_0x764c('0x14')]=function(_0x4043f8){var _0x228232=this;return new Promise(function(_0x36ef46,_0x5ae500){return db[_0x764c('0x15')][_0x764c('0x16')]({'raw':_0x4043f8[_0x764c('0x17')]?_0x4043f8[_0x764c('0x17')][_0x764c('0x18')]===undefined?!![]:![]:!![],'where':_0x4043f8[_0x764c('0x17')]?_0x4043f8['options'][_0x764c('0x19')]||null:null,'attributes':_0x4043f8[_0x764c('0x17')]?_0x4043f8[_0x764c('0x17')][_0x764c('0x1a')]||null:null,'limit':_0x4043f8['options']?_0x4043f8[_0x764c('0x17')][_0x764c('0x1b')]||null:null,'include':_0x4043f8['options']?_0x4043f8[_0x764c('0x17')]['include']?_[_0x764c('0x1c')](_0x4043f8[_0x764c('0x17')][_0x764c('0x1d')],function(_0x49e76d){return{'model':db[_0x49e76d[_0x764c('0x1e')]],'as':_0x49e76d['as'],'attributes':_0x49e76d[_0x764c('0x1a')],'include':_0x49e76d[_0x764c('0x1d')]?_[_0x764c('0x1c')](_0x49e76d[_0x764c('0x1d')],function(_0x39f154){return{'model':db[_0x39f154['model']],'as':_0x39f154['as'],'attributes':_0x39f154[_0x764c('0x1a')],'include':_0x39f154[_0x764c('0x1d')]?_[_0x764c('0x1c')](_0x39f154[_0x764c('0x1d')],function(_0x4ffff8){return{'model':db[_0x4ffff8[_0x764c('0x1e')]],'as':_0x4ffff8['as'],'attributes':_0x4ffff8[_0x764c('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x764c('0x1f')](function(_0x22726b){logger['info'](_0x764c('0x14'),_0x4043f8);logger[_0x764c('0xe')]('GetZendeskAccount',_0x4043f8,JSON[_0x764c('0x10')](_0x22726b));_0x36ef46(_0x22726b);})[_0x764c('0x13')](function(_0x5c6978){logger[_0x764c('0x11')]('GetZendeskAccount',_0x5c6978[_0x764c('0x12')],_0x4043f8);_0x5ae500(_0x228232[_0x764c('0x11')](0x1f4,_0x5c6978['message']));});});};exports[_0x764c('0x20')]=function(_0x4b8a49){var _0x1612ef=this;return new Promise(function(_0x2a8e9b,_0x38717f){return db[_0x764c('0x15')][_0x764c('0x21')]({'raw':_0x4b8a49['options']?_0x4b8a49[_0x764c('0x17')]['raw']===undefined?!![]:![]:!![],'where':_0x4b8a49[_0x764c('0x17')]?_0x4b8a49[_0x764c('0x17')][_0x764c('0x19')]||null:null,'attributes':_0x4b8a49[_0x764c('0x17')]?_0x4b8a49[_0x764c('0x17')][_0x764c('0x1a')]||null:null,'include':_0x4b8a49['options']?_0x4b8a49[_0x764c('0x17')]['include']?_[_0x764c('0x1c')](_0x4b8a49[_0x764c('0x17')]['include'],function(_0x512540){return{'model':db[_0x512540['model']],'as':_0x512540['as'],'attributes':_0x512540['attributes'],'include':_0x512540[_0x764c('0x1d')]?_[_0x764c('0x1c')](_0x512540[_0x764c('0x1d')],function(_0x1b8f08){return{'model':db[_0x1b8f08[_0x764c('0x1e')]],'as':_0x1b8f08['as'],'attributes':_0x1b8f08['attributes'],'include':_0x1b8f08[_0x764c('0x1d')]?_['map'](_0x1b8f08['include'],function(_0x5e6fd3){return{'model':db[_0x5e6fd3[_0x764c('0x1e')]],'as':_0x5e6fd3['as'],'attributes':_0x5e6fd3[_0x764c('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x764c('0x1f')](function(_0x2dc15e){logger[_0x764c('0xb')](_0x764c('0x20'),_0x4b8a49);logger[_0x764c('0xe')]('ShowZendeskAccount',_0x4b8a49,JSON['stringify'](_0x2dc15e));_0x2a8e9b(_0x2dc15e);})[_0x764c('0x13')](function(_0x375f09){logger['error'](_0x764c('0x20'),_0x375f09[_0x764c('0x12')],_0x4b8a49);_0x38717f(_0x1612ef['error'](0x1f4,_0x375f09[_0x764c('0x12')]));});});};
\ No newline at end of file
+var _0x5570=['jayson/promise','client','http','then','info','ZendeskAccount,\x20%s,\x20%s','debug','ZendeskAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','GetZendeskAccount','ZendeskAccount','findAll','options','raw','where','attributes','map','include','model','ShowZendeskAccount','moment','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment'];(function(_0x56e32e,_0x9eb2f6){var _0x2a757b=function(_0x50b7bc){while(--_0x50b7bc){_0x56e32e['push'](_0x56e32e['shift']());}};_0x2a757b(++_0x9eb2f6);}(_0x5570,0x122));var _0x0557=function(_0x2a3653,_0x2b5804){_0x2a3653=_0x2a3653-0x0;var _0x2d9e61=_0x5570[_0x2a3653];return _0x2d9e61;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x0557('0x0'));var BPromise=require(_0x0557('0x1'));var rs=require(_0x0557('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x0557('0x3'))['db'];var utils=require(_0x0557('0x4'));var logger=require('../../config/logger')(_0x0557('0x5'));var config=require(_0x0557('0x6'));var jayson=require(_0x0557('0x7'));var client=jayson[_0x0557('0x8')][_0x0557('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x17bd51,_0x168641,_0x3afc9d){return new BPromise(function(_0x13b56e,_0x28a84a){return client['request'](_0x17bd51,_0x3afc9d)[_0x0557('0xa')](function(_0x50e0e9){logger[_0x0557('0xb')](_0x0557('0xc'),_0x168641,'request\x20sent');logger[_0x0557('0xd')](_0x0557('0xe'),_0x168641,_0x0557('0xf'),JSON[_0x0557('0x10')](_0x50e0e9));if(_0x50e0e9[_0x0557('0x11')]){if(_0x50e0e9[_0x0557('0x11')][_0x0557('0x12')]===0x1f4){logger[_0x0557('0x11')]('ZendeskAccount,\x20%s,\x20%s',_0x168641,_0x50e0e9[_0x0557('0x11')][_0x0557('0x13')]);return _0x28a84a(_0x50e0e9[_0x0557('0x11')]['message']);}logger[_0x0557('0x11')](_0x0557('0xc'),_0x168641,_0x50e0e9[_0x0557('0x11')][_0x0557('0x13')]);return _0x13b56e(_0x50e0e9[_0x0557('0x11')]['message']);}else{logger[_0x0557('0xb')]('ZendeskAccount,\x20%s,\x20%s',_0x168641,_0x0557('0xf'));_0x13b56e(_0x50e0e9[_0x0557('0x14')][_0x0557('0x13')]);}})[_0x0557('0x15')](function(_0xdc727a){logger['error'](_0x0557('0xc'),_0x168641,_0xdc727a);_0x28a84a(_0xdc727a);});});}exports[_0x0557('0x16')]=function(_0x2dff77){var _0x24c4ec=this;return new Promise(function(_0x5a1e34,_0xfb871){return db[_0x0557('0x17')][_0x0557('0x18')]({'raw':_0x2dff77[_0x0557('0x19')]?_0x2dff77[_0x0557('0x19')][_0x0557('0x1a')]===undefined?!![]:![]:!![],'where':_0x2dff77[_0x0557('0x19')]?_0x2dff77[_0x0557('0x19')][_0x0557('0x1b')]||null:null,'attributes':_0x2dff77['options']?_0x2dff77[_0x0557('0x19')][_0x0557('0x1c')]||null:null,'limit':_0x2dff77['options']?_0x2dff77[_0x0557('0x19')]['limit']||null:null,'include':_0x2dff77[_0x0557('0x19')]?_0x2dff77['options']['include']?_[_0x0557('0x1d')](_0x2dff77[_0x0557('0x19')][_0x0557('0x1e')],function(_0x1f0d05){return{'model':db[_0x1f0d05[_0x0557('0x1f')]],'as':_0x1f0d05['as'],'attributes':_0x1f0d05[_0x0557('0x1c')],'include':_0x1f0d05['include']?_[_0x0557('0x1d')](_0x1f0d05['include'],function(_0x5982d0){return{'model':db[_0x5982d0[_0x0557('0x1f')]],'as':_0x5982d0['as'],'attributes':_0x5982d0[_0x0557('0x1c')],'include':_0x5982d0[_0x0557('0x1e')]?_[_0x0557('0x1d')](_0x5982d0[_0x0557('0x1e')],function(_0x542649){return{'model':db[_0x542649[_0x0557('0x1f')]],'as':_0x542649['as'],'attributes':_0x542649[_0x0557('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x0557('0xa')](function(_0x46e68d){logger[_0x0557('0xb')](_0x0557('0x16'),_0x2dff77);logger[_0x0557('0xd')](_0x0557('0x16'),_0x2dff77,JSON[_0x0557('0x10')](_0x46e68d));_0x5a1e34(_0x46e68d);})['catch'](function(_0x459220){logger[_0x0557('0x11')](_0x0557('0x16'),_0x459220[_0x0557('0x13')],_0x2dff77);_0xfb871(_0x24c4ec[_0x0557('0x11')](0x1f4,_0x459220[_0x0557('0x13')]));});});};exports[_0x0557('0x20')]=function(_0x475780){var _0x4921da=this;return new Promise(function(_0xb15b1e,_0xa46515){return db['ZendeskAccount']['find']({'raw':_0x475780[_0x0557('0x19')]?_0x475780[_0x0557('0x19')][_0x0557('0x1a')]===undefined?!![]:![]:!![],'where':_0x475780[_0x0557('0x19')]?_0x475780[_0x0557('0x19')]['where']||null:null,'attributes':_0x475780[_0x0557('0x19')]?_0x475780[_0x0557('0x19')][_0x0557('0x1c')]||null:null,'include':_0x475780[_0x0557('0x19')]?_0x475780[_0x0557('0x19')][_0x0557('0x1e')]?_[_0x0557('0x1d')](_0x475780[_0x0557('0x19')]['include'],function(_0x3b141e){return{'model':db[_0x3b141e[_0x0557('0x1f')]],'as':_0x3b141e['as'],'attributes':_0x3b141e[_0x0557('0x1c')],'include':_0x3b141e['include']?_[_0x0557('0x1d')](_0x3b141e[_0x0557('0x1e')],function(_0x452a15){return{'model':db[_0x452a15[_0x0557('0x1f')]],'as':_0x452a15['as'],'attributes':_0x452a15[_0x0557('0x1c')],'include':_0x452a15[_0x0557('0x1e')]?_[_0x0557('0x1d')](_0x452a15['include'],function(_0x398e19){return{'model':db[_0x398e19['model']],'as':_0x398e19['as'],'attributes':_0x398e19[_0x0557('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x0557('0xa')](function(_0x3acd4c){logger[_0x0557('0xb')](_0x0557('0x20'),_0x475780);logger[_0x0557('0xd')](_0x0557('0x20'),_0x475780,JSON['stringify'](_0x3acd4c));_0xb15b1e(_0x3acd4c);})[_0x0557('0x15')](function(_0x358a5b){logger[_0x0557('0x11')](_0x0557('0x20'),_0x358a5b[_0x0557('0x13')],_0x475780);_0xa46515(_0x4921da[_0x0557('0x11')](0x1f4,_0x358a5b['message']));});});};
\ No newline at end of file