Built motion from commit 1ea47bf4.|2.6.34
[motion2.git] / server / api / intServicenowAccount / intServicenowAccount.rpc.js
index 806cb92..d2685c4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa0b3=['ServicenowAccount','findAll','options','raw','attributes','limit','map','include','model','GetServicenowAccount','ShowServicenowAccount','lodash','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','then','info','ServicenowAccount,\x20%s,\x20%s','request\x20sent','debug','ServicenowAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch'];(function(_0x3fb41c,_0x5d8db7){var _0x4b0169=function(_0x3a829f){while(--_0x3a829f){_0x3fb41c['push'](_0x3fb41c['shift']());}};_0x4b0169(++_0x5d8db7);}(_0xa0b3,0x6b));var _0x3a0b=function(_0x47bd7c,_0x3358ee){_0x47bd7c=_0x47bd7c-0x0;var _0x4aa095=_0xa0b3[_0x47bd7c];return _0x4aa095;};'use strict';var _=require(_0x3a0b('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x3a0b('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x3a0b('0x2'));var db=require(_0x3a0b('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x3a0b('0x4'))(_0x3a0b('0x5'));var config=require(_0x3a0b('0x6'));var jayson=require(_0x3a0b('0x7'));var client=jayson['client'][_0x3a0b('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x2d3aa6,_0x2ce591,_0x21dbb6){return new BPromise(function(_0x4ee83c,_0x31b7d6){return client['request'](_0x2d3aa6,_0x21dbb6)[_0x3a0b('0x9')](function(_0x3bd837){logger[_0x3a0b('0xa')](_0x3a0b('0xb'),_0x2ce591,_0x3a0b('0xc'));logger[_0x3a0b('0xd')](_0x3a0b('0xe'),_0x2ce591,_0x3a0b('0xc'),JSON[_0x3a0b('0xf')](_0x3bd837));if(_0x3bd837[_0x3a0b('0x10')]){if(_0x3bd837[_0x3a0b('0x10')][_0x3a0b('0x11')]===0x1f4){logger[_0x3a0b('0x10')]('ServicenowAccount,\x20%s,\x20%s',_0x2ce591,_0x3bd837[_0x3a0b('0x10')]['message']);return _0x31b7d6(_0x3bd837[_0x3a0b('0x10')][_0x3a0b('0x12')]);}logger[_0x3a0b('0x10')](_0x3a0b('0xb'),_0x2ce591,_0x3bd837['error']['message']);return _0x4ee83c(_0x3bd837[_0x3a0b('0x10')]['message']);}else{logger[_0x3a0b('0xa')](_0x3a0b('0xb'),_0x2ce591,_0x3a0b('0xc'));_0x4ee83c(_0x3bd837[_0x3a0b('0x13')][_0x3a0b('0x12')]);}})[_0x3a0b('0x14')](function(_0x530dae){logger['error'](_0x3a0b('0xb'),_0x2ce591,_0x530dae);_0x31b7d6(_0x530dae);});});}exports['GetServicenowAccount']=function(_0x3487a5){var _0x55a68c=this;return new Promise(function(_0x421cef,_0x426406){return db[_0x3a0b('0x15')][_0x3a0b('0x16')]({'raw':_0x3487a5[_0x3a0b('0x17')]?_0x3487a5[_0x3a0b('0x17')][_0x3a0b('0x18')]===undefined?!![]:![]:!![],'where':_0x3487a5[_0x3a0b('0x17')]?_0x3487a5[_0x3a0b('0x17')]['where']||null:null,'attributes':_0x3487a5[_0x3a0b('0x17')]?_0x3487a5[_0x3a0b('0x17')][_0x3a0b('0x19')]||null:null,'limit':_0x3487a5[_0x3a0b('0x17')]?_0x3487a5[_0x3a0b('0x17')][_0x3a0b('0x1a')]||null:null,'include':_0x3487a5['options']?_0x3487a5['options']['include']?_[_0x3a0b('0x1b')](_0x3487a5['options'][_0x3a0b('0x1c')],function(_0x1ffa7f){return{'model':db[_0x1ffa7f[_0x3a0b('0x1d')]],'as':_0x1ffa7f['as'],'attributes':_0x1ffa7f[_0x3a0b('0x19')],'include':_0x1ffa7f['include']?_['map'](_0x1ffa7f[_0x3a0b('0x1c')],function(_0x356f79){return{'model':db[_0x356f79[_0x3a0b('0x1d')]],'as':_0x356f79['as'],'attributes':_0x356f79[_0x3a0b('0x19')],'include':_0x356f79[_0x3a0b('0x1c')]?_[_0x3a0b('0x1b')](_0x356f79['include'],function(_0x2bc867){return{'model':db[_0x2bc867[_0x3a0b('0x1d')]],'as':_0x2bc867['as'],'attributes':_0x2bc867[_0x3a0b('0x19')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x181f73){logger['info'](_0x3a0b('0x1e'),_0x3487a5);logger[_0x3a0b('0xd')](_0x3a0b('0x1e'),_0x3487a5,JSON['stringify'](_0x181f73));_0x421cef(_0x181f73);})[_0x3a0b('0x14')](function(_0x1c2bfc){logger[_0x3a0b('0x10')]('GetServicenowAccount',_0x1c2bfc[_0x3a0b('0x12')],_0x3487a5);_0x426406(_0x55a68c[_0x3a0b('0x10')](0x1f4,_0x1c2bfc[_0x3a0b('0x12')]));});});};exports['ShowServicenowAccount']=function(_0x317690){var _0x547e37=this;return new Promise(function(_0x852047,_0x4da52b){return db['ServicenowAccount']['find']({'raw':_0x317690['options']?_0x317690[_0x3a0b('0x17')][_0x3a0b('0x18')]===undefined?!![]:![]:!![],'where':_0x317690['options']?_0x317690['options']['where']||null:null,'attributes':_0x317690[_0x3a0b('0x17')]?_0x317690[_0x3a0b('0x17')][_0x3a0b('0x19')]||null:null,'include':_0x317690[_0x3a0b('0x17')]?_0x317690[_0x3a0b('0x17')][_0x3a0b('0x1c')]?_[_0x3a0b('0x1b')](_0x317690[_0x3a0b('0x17')]['include'],function(_0xde6ec8){return{'model':db[_0xde6ec8[_0x3a0b('0x1d')]],'as':_0xde6ec8['as'],'attributes':_0xde6ec8[_0x3a0b('0x19')],'include':_0xde6ec8[_0x3a0b('0x1c')]?_['map'](_0xde6ec8['include'],function(_0x512b75){return{'model':db[_0x512b75['model']],'as':_0x512b75['as'],'attributes':_0x512b75[_0x3a0b('0x19')],'include':_0x512b75['include']?_[_0x3a0b('0x1b')](_0x512b75[_0x3a0b('0x1c')],function(_0xfcdba1){return{'model':db[_0xfcdba1[_0x3a0b('0x1d')]],'as':_0xfcdba1['as'],'attributes':_0xfcdba1['attributes']};}):[]};}):[]};}):[]:[]})[_0x3a0b('0x9')](function(_0x187517){logger['info']('ShowServicenowAccount',_0x317690);logger[_0x3a0b('0xd')](_0x3a0b('0x1f'),_0x317690,JSON[_0x3a0b('0xf')](_0x187517));_0x852047(_0x187517);})[_0x3a0b('0x14')](function(_0x43962e){logger['error'](_0x3a0b('0x1f'),_0x43962e['message'],_0x317690);_0x4da52b(_0x547e37[_0x3a0b('0x10')](0x1f4,_0x43962e[_0x3a0b('0x12')]));});});};
\ No newline at end of file
+var _0x33b1=['catch','GetServicenowAccount','ServicenowAccount','findAll','options','raw','where','attributes','limit','map','model','include','ShowServicenowAccount','find','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','info','ServicenowAccount,\x20%s,\x20%s','debug','ServicenowAccount,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message'];(function(_0x5a2e40,_0x31545f){var _0x24b638=function(_0xe6f282){while(--_0xe6f282){_0x5a2e40['push'](_0x5a2e40['shift']());}};_0x24b638(++_0x31545f);}(_0x33b1,0xb3));var _0x133b=function(_0x28a0c7,_0x6202d3){_0x28a0c7=_0x28a0c7-0x0;var _0x55d1dc=_0x33b1[_0x28a0c7];return _0x55d1dc;};'use strict';var _=require('lodash');var util=require(_0x133b('0x0'));var moment=require('moment');var BPromise=require(_0x133b('0x1'));var rs=require(_0x133b('0x2'));var fs=require('fs');var Redis=require(_0x133b('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x133b('0x4'));var logger=require(_0x133b('0x5'))('rpc');var config=require(_0x133b('0x6'));var jayson=require(_0x133b('0x7'));var client=jayson[_0x133b('0x8')][_0x133b('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x15a1ea,_0x39803b,_0x3ab7e4){return new BPromise(function(_0x5ca5bc,_0x5cd7a0){return client[_0x133b('0xa')](_0x15a1ea,_0x3ab7e4)['then'](function(_0x263c40){logger[_0x133b('0xb')](_0x133b('0xc'),_0x39803b,'request\x20sent');logger[_0x133b('0xd')](_0x133b('0xe'),_0x39803b,_0x133b('0xf'),JSON['stringify'](_0x263c40));if(_0x263c40[_0x133b('0x10')]){if(_0x263c40[_0x133b('0x10')][_0x133b('0x11')]===0x1f4){logger[_0x133b('0x10')](_0x133b('0xc'),_0x39803b,_0x263c40[_0x133b('0x10')]['message']);return _0x5cd7a0(_0x263c40[_0x133b('0x10')][_0x133b('0x12')]);}logger[_0x133b('0x10')](_0x133b('0xc'),_0x39803b,_0x263c40['error'][_0x133b('0x12')]);return _0x5ca5bc(_0x263c40[_0x133b('0x10')]['message']);}else{logger[_0x133b('0xb')](_0x133b('0xc'),_0x39803b,_0x133b('0xf'));_0x5ca5bc(_0x263c40['result'][_0x133b('0x12')]);}})[_0x133b('0x13')](function(_0x34c53f){logger[_0x133b('0x10')](_0x133b('0xc'),_0x39803b,_0x34c53f);_0x5cd7a0(_0x34c53f);});});}exports[_0x133b('0x14')]=function(_0x4b129a){var _0x3e18dc=this;return new Promise(function(_0x209f37,_0x11162c){return db[_0x133b('0x15')][_0x133b('0x16')]({'raw':_0x4b129a['options']?_0x4b129a[_0x133b('0x17')][_0x133b('0x18')]===undefined?!![]:![]:!![],'where':_0x4b129a['options']?_0x4b129a[_0x133b('0x17')][_0x133b('0x19')]||null:null,'attributes':_0x4b129a[_0x133b('0x17')]?_0x4b129a[_0x133b('0x17')][_0x133b('0x1a')]||null:null,'limit':_0x4b129a[_0x133b('0x17')]?_0x4b129a[_0x133b('0x17')][_0x133b('0x1b')]||null:null,'include':_0x4b129a['options']?_0x4b129a[_0x133b('0x17')]['include']?_[_0x133b('0x1c')](_0x4b129a['options']['include'],function(_0xaf1c0b){return{'model':db[_0xaf1c0b[_0x133b('0x1d')]],'as':_0xaf1c0b['as'],'attributes':_0xaf1c0b[_0x133b('0x1a')],'include':_0xaf1c0b[_0x133b('0x1e')]?_[_0x133b('0x1c')](_0xaf1c0b[_0x133b('0x1e')],function(_0x195e22){return{'model':db[_0x195e22[_0x133b('0x1d')]],'as':_0x195e22['as'],'attributes':_0x195e22[_0x133b('0x1a')],'include':_0x195e22[_0x133b('0x1e')]?_['map'](_0x195e22[_0x133b('0x1e')],function(_0xbb382a){return{'model':db[_0xbb382a['model']],'as':_0xbb382a['as'],'attributes':_0xbb382a[_0x133b('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x57a2bb){logger['info'](_0x133b('0x14'),_0x4b129a);logger[_0x133b('0xd')]('GetServicenowAccount',_0x4b129a,JSON['stringify'](_0x57a2bb));_0x209f37(_0x57a2bb);})[_0x133b('0x13')](function(_0x427873){logger[_0x133b('0x10')]('GetServicenowAccount',_0x427873[_0x133b('0x12')],_0x4b129a);_0x11162c(_0x3e18dc[_0x133b('0x10')](0x1f4,_0x427873[_0x133b('0x12')]));});});};exports[_0x133b('0x1f')]=function(_0x42c486){var _0x466516=this;return new Promise(function(_0x58e087,_0xb588e8){return db['ServicenowAccount'][_0x133b('0x20')]({'raw':_0x42c486[_0x133b('0x17')]?_0x42c486[_0x133b('0x17')][_0x133b('0x18')]===undefined?!![]:![]:!![],'where':_0x42c486[_0x133b('0x17')]?_0x42c486['options'][_0x133b('0x19')]||null:null,'attributes':_0x42c486[_0x133b('0x17')]?_0x42c486[_0x133b('0x17')][_0x133b('0x1a')]||null:null,'include':_0x42c486[_0x133b('0x17')]?_0x42c486['options'][_0x133b('0x1e')]?_[_0x133b('0x1c')](_0x42c486['options'][_0x133b('0x1e')],function(_0x1e9b43){return{'model':db[_0x1e9b43[_0x133b('0x1d')]],'as':_0x1e9b43['as'],'attributes':_0x1e9b43['attributes'],'include':_0x1e9b43[_0x133b('0x1e')]?_[_0x133b('0x1c')](_0x1e9b43['include'],function(_0xe1bc53){return{'model':db[_0xe1bc53['model']],'as':_0xe1bc53['as'],'attributes':_0xe1bc53[_0x133b('0x1a')],'include':_0xe1bc53['include']?_[_0x133b('0x1c')](_0xe1bc53['include'],function(_0x1f1d1e){return{'model':db[_0x1f1d1e[_0x133b('0x1d')]],'as':_0x1f1d1e['as'],'attributes':_0x1f1d1e[_0x133b('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x7438b1){logger[_0x133b('0xb')](_0x133b('0x1f'),_0x42c486);logger[_0x133b('0xd')](_0x133b('0x1f'),_0x42c486,JSON['stringify'](_0x7438b1));_0x58e087(_0x7438b1);})[_0x133b('0x13')](function(_0x6cd9ce){logger[_0x133b('0x10')](_0x133b('0x1f'),_0x6cd9ce[_0x133b('0x12')],_0x42c486);_0xb588e8(_0x466516[_0x133b('0x10')](0x1f4,_0x6cd9ce[_0x133b('0x12')]));});});};
\ No newline at end of file