Built motion from commit 3c2ce842.|2.6.31
[motion2.git] / server / api / intZendeskAccount / intZendeskAccount.rpc.js
index 93277aa..40aaf07 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdbfe=['where','limit','include','map','model','attributes','then','ShowZendeskAccount','ZendeskAccount','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','request','info','ZendeskAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','GetZendeskAccount','findAll','options','raw'];(function(_0x3989f8,_0x5457b0){var _0x45a576=function(_0x2ea27b){while(--_0x2ea27b){_0x3989f8['push'](_0x3989f8['shift']());}};_0x45a576(++_0x5457b0);}(_0xdbfe,0x174));var _0xedbf=function(_0x570112,_0x25a3b3){_0x570112=_0x570112-0x0;var _0x257d14=_0xdbfe[_0x570112];return _0x257d14;};'use strict';var _=require(_0xedbf('0x0'));var util=require(_0xedbf('0x1'));var moment=require(_0xedbf('0x2'));var BPromise=require(_0xedbf('0x3'));var rs=require(_0xedbf('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xedbf('0x5'))['db'];var utils=require(_0xedbf('0x6'));var logger=require(_0xedbf('0x7'))(_0xedbf('0x8'));var config=require(_0xedbf('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xedbf('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1e89f6,_0x2a3d83,_0x194e65){return new BPromise(function(_0x39a25a,_0x4ddf4b){return client[_0xedbf('0xb')](_0x1e89f6,_0x194e65)['then'](function(_0x21e068){logger[_0xedbf('0xc')](_0xedbf('0xd'),_0x2a3d83,_0xedbf('0xe'));logger[_0xedbf('0xf')]('ZendeskAccount,\x20%s,\x20%s,\x20%s',_0x2a3d83,_0xedbf('0xe'),JSON[_0xedbf('0x10')](_0x21e068));if(_0x21e068['error']){if(_0x21e068['error']['code']===0x1f4){logger[_0xedbf('0x11')](_0xedbf('0xd'),_0x2a3d83,_0x21e068['error'][_0xedbf('0x12')]);return _0x4ddf4b(_0x21e068[_0xedbf('0x11')]['message']);}logger[_0xedbf('0x11')](_0xedbf('0xd'),_0x2a3d83,_0x21e068[_0xedbf('0x11')][_0xedbf('0x12')]);return _0x39a25a(_0x21e068[_0xedbf('0x11')]['message']);}else{logger[_0xedbf('0xc')]('ZendeskAccount,\x20%s,\x20%s',_0x2a3d83,_0xedbf('0xe'));_0x39a25a(_0x21e068[_0xedbf('0x13')]['message']);}})['catch'](function(_0x5814e8){logger['error'](_0xedbf('0xd'),_0x2a3d83,_0x5814e8);_0x4ddf4b(_0x5814e8);});});}exports[_0xedbf('0x14')]=function(_0x42d5af){var _0x54e66f=this;return new Promise(function(_0x3de258,_0x1efa74){return db['ZendeskAccount'][_0xedbf('0x15')]({'raw':_0x42d5af['options']?_0x42d5af[_0xedbf('0x16')][_0xedbf('0x17')]===undefined?!![]:![]:!![],'where':_0x42d5af[_0xedbf('0x16')]?_0x42d5af[_0xedbf('0x16')][_0xedbf('0x18')]||null:null,'attributes':_0x42d5af[_0xedbf('0x16')]?_0x42d5af['options']['attributes']||null:null,'limit':_0x42d5af[_0xedbf('0x16')]?_0x42d5af[_0xedbf('0x16')][_0xedbf('0x19')]||null:null,'include':_0x42d5af['options']?_0x42d5af[_0xedbf('0x16')][_0xedbf('0x1a')]?_[_0xedbf('0x1b')](_0x42d5af['options'][_0xedbf('0x1a')],function(_0x3d86f5){return{'model':db[_0x3d86f5[_0xedbf('0x1c')]],'as':_0x3d86f5['as'],'attributes':_0x3d86f5['attributes'],'include':_0x3d86f5[_0xedbf('0x1a')]?_['map'](_0x3d86f5['include'],function(_0x659dee){return{'model':db[_0x659dee['model']],'as':_0x659dee['as'],'attributes':_0x659dee['attributes'],'include':_0x659dee[_0xedbf('0x1a')]?_[_0xedbf('0x1b')](_0x659dee['include'],function(_0x21813c){return{'model':db[_0x21813c[_0xedbf('0x1c')]],'as':_0x21813c['as'],'attributes':_0x21813c[_0xedbf('0x1d')]};}):[]};}):[]};}):[]:[]})[_0xedbf('0x1e')](function(_0x2f715f){logger[_0xedbf('0xc')](_0xedbf('0x14'),_0x42d5af);logger[_0xedbf('0xf')](_0xedbf('0x14'),_0x42d5af,JSON[_0xedbf('0x10')](_0x2f715f));_0x3de258(_0x2f715f);})['catch'](function(_0x7ad8cf){logger['error']('GetZendeskAccount',_0x7ad8cf['message'],_0x42d5af);_0x1efa74(_0x54e66f[_0xedbf('0x11')](0x1f4,_0x7ad8cf[_0xedbf('0x12')]));});});};exports[_0xedbf('0x1f')]=function(_0x3aabe0){var _0x331d89=this;return new Promise(function(_0x24704f,_0x59950a){return db[_0xedbf('0x20')]['find']({'raw':_0x3aabe0[_0xedbf('0x16')]?_0x3aabe0[_0xedbf('0x16')][_0xedbf('0x17')]===undefined?!![]:![]:!![],'where':_0x3aabe0['options']?_0x3aabe0[_0xedbf('0x16')][_0xedbf('0x18')]||null:null,'attributes':_0x3aabe0[_0xedbf('0x16')]?_0x3aabe0['options'][_0xedbf('0x1d')]||null:null,'include':_0x3aabe0[_0xedbf('0x16')]?_0x3aabe0[_0xedbf('0x16')][_0xedbf('0x1a')]?_[_0xedbf('0x1b')](_0x3aabe0[_0xedbf('0x16')]['include'],function(_0x3ddfd9){return{'model':db[_0x3ddfd9[_0xedbf('0x1c')]],'as':_0x3ddfd9['as'],'attributes':_0x3ddfd9[_0xedbf('0x1d')],'include':_0x3ddfd9[_0xedbf('0x1a')]?_[_0xedbf('0x1b')](_0x3ddfd9[_0xedbf('0x1a')],function(_0x4a7b17){return{'model':db[_0x4a7b17[_0xedbf('0x1c')]],'as':_0x4a7b17['as'],'attributes':_0x4a7b17['attributes'],'include':_0x4a7b17[_0xedbf('0x1a')]?_[_0xedbf('0x1b')](_0x4a7b17['include'],function(_0x1a8c49){return{'model':db[_0x1a8c49[_0xedbf('0x1c')]],'as':_0x1a8c49['as'],'attributes':_0x1a8c49[_0xedbf('0x1d')]};}):[]};}):[]};}):[]:[]})[_0xedbf('0x1e')](function(_0x1b5bab){logger[_0xedbf('0xc')]('ShowZendeskAccount',_0x3aabe0);logger[_0xedbf('0xf')](_0xedbf('0x1f'),_0x3aabe0,JSON[_0xedbf('0x10')](_0x1b5bab));_0x24704f(_0x1b5bab);})['catch'](function(_0x2e0313){logger[_0xedbf('0x11')](_0xedbf('0x1f'),_0x2e0313['message'],_0x3aabe0);_0x59950a(_0x331d89['error'](0x1f4,_0x2e0313[_0xedbf('0x12')]));});});};
\ No newline at end of file
+var _0x812f=['GetZendeskAccount','findAll','options','raw','where','attributes','limit','include','map','model','ShowZendeskAccount','ZendeskAccount','find','lodash','util','moment','bluebird','../../config/logger','rpc','../../config/environment','jayson/promise','client','then','info','debug','ZendeskAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','ZendeskAccount,\x20%s,\x20%s','message','result','catch'];(function(_0x198ba4,_0x3a5e65){var _0x2b03a7=function(_0x1e3f89){while(--_0x1e3f89){_0x198ba4['push'](_0x198ba4['shift']());}};_0x2b03a7(++_0x3a5e65);}(_0x812f,0x136));var _0xf812=function(_0x1727cb,_0x888974){_0x1727cb=_0x1727cb-0x0;var _0x1c3555=_0x812f[_0x1727cb];return _0x1c3555;};'use strict';var _=require(_0xf812('0x0'));var util=require(_0xf812('0x1'));var moment=require(_0xf812('0x2'));var BPromise=require(_0xf812('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xf812('0x4'))(_0xf812('0x5'));var config=require(_0xf812('0x6'));var jayson=require(_0xf812('0x7'));var client=jayson[_0xf812('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x314553,_0x5312f4,_0x28a1b2){return new BPromise(function(_0x586a6f,_0x18c6b3){return client['request'](_0x314553,_0x28a1b2)[_0xf812('0x9')](function(_0x4d08a8){logger[_0xf812('0xa')]('ZendeskAccount,\x20%s,\x20%s',_0x5312f4,'request\x20sent');logger[_0xf812('0xb')](_0xf812('0xc'),_0x5312f4,'request\x20sent',JSON[_0xf812('0xd')](_0x4d08a8));if(_0x4d08a8['error']){if(_0x4d08a8[_0xf812('0xe')][_0xf812('0xf')]===0x1f4){logger['error'](_0xf812('0x10'),_0x5312f4,_0x4d08a8['error']['message']);return _0x18c6b3(_0x4d08a8['error'][_0xf812('0x11')]);}logger[_0xf812('0xe')]('ZendeskAccount,\x20%s,\x20%s',_0x5312f4,_0x4d08a8[_0xf812('0xe')][_0xf812('0x11')]);return _0x586a6f(_0x4d08a8[_0xf812('0xe')]['message']);}else{logger[_0xf812('0xa')](_0xf812('0x10'),_0x5312f4,'request\x20sent');_0x586a6f(_0x4d08a8[_0xf812('0x12')][_0xf812('0x11')]);}})[_0xf812('0x13')](function(_0x37bdc5){logger[_0xf812('0xe')](_0xf812('0x10'),_0x5312f4,_0x37bdc5);_0x18c6b3(_0x37bdc5);});});}exports[_0xf812('0x14')]=function(_0x2985ff){var _0x57ac06=this;return new Promise(function(_0x179b4d,_0x2d5d7a){return db['ZendeskAccount'][_0xf812('0x15')]({'raw':_0x2985ff[_0xf812('0x16')]?_0x2985ff[_0xf812('0x16')][_0xf812('0x17')]===undefined?!![]:![]:!![],'where':_0x2985ff[_0xf812('0x16')]?_0x2985ff['options'][_0xf812('0x18')]||null:null,'attributes':_0x2985ff[_0xf812('0x16')]?_0x2985ff['options'][_0xf812('0x19')]||null:null,'limit':_0x2985ff[_0xf812('0x16')]?_0x2985ff[_0xf812('0x16')][_0xf812('0x1a')]||null:null,'include':_0x2985ff['options']?_0x2985ff['options'][_0xf812('0x1b')]?_[_0xf812('0x1c')](_0x2985ff[_0xf812('0x16')]['include'],function(_0x2a95a4){return{'model':db[_0x2a95a4[_0xf812('0x1d')]],'as':_0x2a95a4['as'],'attributes':_0x2a95a4[_0xf812('0x19')],'include':_0x2a95a4[_0xf812('0x1b')]?_[_0xf812('0x1c')](_0x2a95a4[_0xf812('0x1b')],function(_0x4f561d){return{'model':db[_0x4f561d[_0xf812('0x1d')]],'as':_0x4f561d['as'],'attributes':_0x4f561d[_0xf812('0x19')],'include':_0x4f561d[_0xf812('0x1b')]?_[_0xf812('0x1c')](_0x4f561d[_0xf812('0x1b')],function(_0xad2db8){return{'model':db[_0xad2db8[_0xf812('0x1d')]],'as':_0xad2db8['as'],'attributes':_0xad2db8[_0xf812('0x19')]};}):[]};}):[]};}):[]:[]})[_0xf812('0x9')](function(_0xce027a){logger[_0xf812('0xa')](_0xf812('0x14'),_0x2985ff);logger['debug']('GetZendeskAccount',_0x2985ff,JSON['stringify'](_0xce027a));_0x179b4d(_0xce027a);})[_0xf812('0x13')](function(_0x27c20e){logger[_0xf812('0xe')](_0xf812('0x14'),_0x27c20e[_0xf812('0x11')],_0x2985ff);_0x2d5d7a(_0x57ac06[_0xf812('0xe')](0x1f4,_0x27c20e[_0xf812('0x11')]));});});};exports[_0xf812('0x1e')]=function(_0x2097d1){var _0x47467=this;return new Promise(function(_0x5178fc,_0x68a12b){return db[_0xf812('0x1f')][_0xf812('0x20')]({'raw':_0x2097d1[_0xf812('0x16')]?_0x2097d1[_0xf812('0x16')][_0xf812('0x17')]===undefined?!![]:![]:!![],'where':_0x2097d1[_0xf812('0x16')]?_0x2097d1[_0xf812('0x16')][_0xf812('0x18')]||null:null,'attributes':_0x2097d1[_0xf812('0x16')]?_0x2097d1['options'][_0xf812('0x19')]||null:null,'include':_0x2097d1[_0xf812('0x16')]?_0x2097d1[_0xf812('0x16')][_0xf812('0x1b')]?_['map'](_0x2097d1['options'][_0xf812('0x1b')],function(_0x4693f1){return{'model':db[_0x4693f1['model']],'as':_0x4693f1['as'],'attributes':_0x4693f1[_0xf812('0x19')],'include':_0x4693f1[_0xf812('0x1b')]?_[_0xf812('0x1c')](_0x4693f1[_0xf812('0x1b')],function(_0x51ebc3){return{'model':db[_0x51ebc3['model']],'as':_0x51ebc3['as'],'attributes':_0x51ebc3['attributes'],'include':_0x51ebc3[_0xf812('0x1b')]?_[_0xf812('0x1c')](_0x51ebc3[_0xf812('0x1b')],function(_0x2c8726){return{'model':db[_0x2c8726[_0xf812('0x1d')]],'as':_0x2c8726['as'],'attributes':_0x2c8726[_0xf812('0x19')]};}):[]};}):[]};}):[]:[]})[_0xf812('0x9')](function(_0x116429){logger[_0xf812('0xa')](_0xf812('0x1e'),_0x2097d1);logger[_0xf812('0xb')](_0xf812('0x1e'),_0x2097d1,JSON[_0xf812('0xd')](_0x116429));_0x5178fc(_0x116429);})[_0xf812('0x13')](function(_0x6b9485){logger[_0xf812('0xe')](_0xf812('0x1e'),_0x6b9485['message'],_0x2097d1);_0x68a12b(_0x47467[_0xf812('0xe')](0x1f4,_0x6b9485[_0xf812('0x11')]));});});};
\ No newline at end of file