Built motion from commit 06eb8eb0.|2.6.31
[motion2.git] / server / api / intServicenowAccount / intServicenowAccount.rpc.js
index e72c498..dbd66aa 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5b76=['../../config/environment','jayson/promise','client','http','then','info','request\x20sent','debug','ServicenowAccount,\x20%s,\x20%s,\x20%s','error','message','ServicenowAccount,\x20%s,\x20%s','result','catch','ServicenowAccount','options','where','attributes','limit','map','include','model','GetServicenowAccount','stringify','ShowServicenowAccount','raw','moment','bluebird','randomstring','../../mysqldb','../../config/logger','rpc'];(function(_0x22dd17,_0x56d249){var _0x517196=function(_0xdb7874){while(--_0xdb7874){_0x22dd17['push'](_0x22dd17['shift']());}};_0x517196(++_0x56d249);}(_0x5b76,0xba));var _0x65b7=function(_0x1dcc42,_0x2d45c6){_0x1dcc42=_0x1dcc42-0x0;var _0x5804d4=_0x5b76[_0x1dcc42];return _0x5804d4;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x65b7('0x0'));var BPromise=require(_0x65b7('0x1'));var rs=require(_0x65b7('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x65b7('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x65b7('0x4'))(_0x65b7('0x5'));var config=require(_0x65b7('0x6'));var jayson=require(_0x65b7('0x7'));var client=jayson[_0x65b7('0x8')][_0x65b7('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1eae42,_0x1f46a1,_0x4f223f){return new BPromise(function(_0x5298a6,_0x3da72a){return client['request'](_0x1eae42,_0x4f223f)[_0x65b7('0xa')](function(_0x152fa4){logger[_0x65b7('0xb')]('ServicenowAccount,\x20%s,\x20%s',_0x1f46a1,_0x65b7('0xc'));logger[_0x65b7('0xd')](_0x65b7('0xe'),_0x1f46a1,_0x65b7('0xc'),JSON['stringify'](_0x152fa4));if(_0x152fa4[_0x65b7('0xf')]){if(_0x152fa4['error']['code']===0x1f4){logger['error']('ServicenowAccount,\x20%s,\x20%s',_0x1f46a1,_0x152fa4[_0x65b7('0xf')][_0x65b7('0x10')]);return _0x3da72a(_0x152fa4[_0x65b7('0xf')][_0x65b7('0x10')]);}logger[_0x65b7('0xf')](_0x65b7('0x11'),_0x1f46a1,_0x152fa4[_0x65b7('0xf')][_0x65b7('0x10')]);return _0x5298a6(_0x152fa4[_0x65b7('0xf')][_0x65b7('0x10')]);}else{logger[_0x65b7('0xb')]('ServicenowAccount,\x20%s,\x20%s',_0x1f46a1,_0x65b7('0xc'));_0x5298a6(_0x152fa4[_0x65b7('0x12')][_0x65b7('0x10')]);}})[_0x65b7('0x13')](function(_0x2969b0){logger[_0x65b7('0xf')](_0x65b7('0x11'),_0x1f46a1,_0x2969b0);_0x3da72a(_0x2969b0);});});}exports['GetServicenowAccount']=function(_0x31a5d7){var _0x43e67f=this;return new Promise(function(_0x3fbb10,_0x20338e){return db[_0x65b7('0x14')]['findAll']({'raw':_0x31a5d7[_0x65b7('0x15')]?_0x31a5d7[_0x65b7('0x15')]['raw']===undefined?!![]:![]:!![],'where':_0x31a5d7[_0x65b7('0x15')]?_0x31a5d7[_0x65b7('0x15')][_0x65b7('0x16')]||null:null,'attributes':_0x31a5d7[_0x65b7('0x15')]?_0x31a5d7['options'][_0x65b7('0x17')]||null:null,'limit':_0x31a5d7[_0x65b7('0x15')]?_0x31a5d7[_0x65b7('0x15')][_0x65b7('0x18')]||null:null,'include':_0x31a5d7['options']?_0x31a5d7[_0x65b7('0x15')]['include']?_[_0x65b7('0x19')](_0x31a5d7[_0x65b7('0x15')][_0x65b7('0x1a')],function(_0x4ba7fc){return{'model':db[_0x4ba7fc[_0x65b7('0x1b')]],'as':_0x4ba7fc['as'],'attributes':_0x4ba7fc['attributes'],'include':_0x4ba7fc['include']?_[_0x65b7('0x19')](_0x4ba7fc[_0x65b7('0x1a')],function(_0x3fae32){return{'model':db[_0x3fae32[_0x65b7('0x1b')]],'as':_0x3fae32['as'],'attributes':_0x3fae32[_0x65b7('0x17')],'include':_0x3fae32[_0x65b7('0x1a')]?_['map'](_0x3fae32[_0x65b7('0x1a')],function(_0x2498a7){return{'model':db[_0x2498a7[_0x65b7('0x1b')]],'as':_0x2498a7['as'],'attributes':_0x2498a7[_0x65b7('0x17')]};}):[]};}):[]};}):[]:[]})[_0x65b7('0xa')](function(_0x3ac4c5){logger['info']('GetServicenowAccount',_0x31a5d7);logger[_0x65b7('0xd')](_0x65b7('0x1c'),_0x31a5d7,JSON[_0x65b7('0x1d')](_0x3ac4c5));_0x3fbb10(_0x3ac4c5);})[_0x65b7('0x13')](function(_0x14ab1e){logger[_0x65b7('0xf')](_0x65b7('0x1c'),_0x14ab1e[_0x65b7('0x10')],_0x31a5d7);_0x20338e(_0x43e67f['error'](0x1f4,_0x14ab1e[_0x65b7('0x10')]));});});};exports[_0x65b7('0x1e')]=function(_0x3696ba){var _0x43099b=this;return new Promise(function(_0x550e44,_0x45bf8c){return db[_0x65b7('0x14')]['find']({'raw':_0x3696ba[_0x65b7('0x15')]?_0x3696ba[_0x65b7('0x15')][_0x65b7('0x1f')]===undefined?!![]:![]:!![],'where':_0x3696ba[_0x65b7('0x15')]?_0x3696ba[_0x65b7('0x15')][_0x65b7('0x16')]||null:null,'attributes':_0x3696ba[_0x65b7('0x15')]?_0x3696ba[_0x65b7('0x15')][_0x65b7('0x17')]||null:null,'include':_0x3696ba[_0x65b7('0x15')]?_0x3696ba[_0x65b7('0x15')][_0x65b7('0x1a')]?_[_0x65b7('0x19')](_0x3696ba[_0x65b7('0x15')][_0x65b7('0x1a')],function(_0xc1467f){return{'model':db[_0xc1467f['model']],'as':_0xc1467f['as'],'attributes':_0xc1467f['attributes'],'include':_0xc1467f[_0x65b7('0x1a')]?_[_0x65b7('0x19')](_0xc1467f[_0x65b7('0x1a')],function(_0x2596ed){return{'model':db[_0x2596ed[_0x65b7('0x1b')]],'as':_0x2596ed['as'],'attributes':_0x2596ed['attributes'],'include':_0x2596ed[_0x65b7('0x1a')]?_[_0x65b7('0x19')](_0x2596ed[_0x65b7('0x1a')],function(_0x3f90c0){return{'model':db[_0x3f90c0[_0x65b7('0x1b')]],'as':_0x3f90c0['as'],'attributes':_0x3f90c0[_0x65b7('0x17')]};}):[]};}):[]};}):[]:[]})[_0x65b7('0xa')](function(_0x1aef39){logger[_0x65b7('0xb')](_0x65b7('0x1e'),_0x3696ba);logger[_0x65b7('0xd')](_0x65b7('0x1e'),_0x3696ba,JSON[_0x65b7('0x1d')](_0x1aef39));_0x550e44(_0x1aef39);})[_0x65b7('0x13')](function(_0x2bb52d){logger['error']('ShowServicenowAccount',_0x2bb52d[_0x65b7('0x10')],_0x3696ba);_0x45bf8c(_0x43099b['error'](0x1f4,_0x2bb52d[_0x65b7('0x10')]));});});};
\ No newline at end of file
+var _0xf4e1=['findAll','options','raw','where','attributes','limit','include','map','model','GetServicenowAccount','ShowServicenowAccount','find','lodash','util','bluebird','../../mysqldb','../../config/utils','rpc','jayson/promise','client','http','request','ServicenowAccount,\x20%s,\x20%s','request\x20sent','debug','ServicenowAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','ServicenowAccount'];(function(_0x503a61,_0x1a48f7){var _0x2202cb=function(_0x4e6fce){while(--_0x4e6fce){_0x503a61['push'](_0x503a61['shift']());}};_0x2202cb(++_0x1a48f7);}(_0xf4e1,0x13e));var _0x1f4e=function(_0x4bb061,_0x449692){_0x4bb061=_0x4bb061-0x0;var _0xa9f41f=_0xf4e1[_0x4bb061];return _0xa9f41f;};'use strict';var _=require(_0x1f4e('0x0'));var util=require(_0x1f4e('0x1'));var moment=require('moment');var BPromise=require(_0x1f4e('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x1f4e('0x3'))['db'];var utils=require(_0x1f4e('0x4'));var logger=require('../../config/logger')(_0x1f4e('0x5'));var config=require('../../config/environment');var jayson=require(_0x1f4e('0x6'));var client=jayson[_0x1f4e('0x7')][_0x1f4e('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x502ba1,_0x25eed5,_0x22ce77){return new BPromise(function(_0x463f77,_0x246bc2){return client[_0x1f4e('0x9')](_0x502ba1,_0x22ce77)['then'](function(_0x483d20){logger['info'](_0x1f4e('0xa'),_0x25eed5,_0x1f4e('0xb'));logger[_0x1f4e('0xc')](_0x1f4e('0xd'),_0x25eed5,'request\x20sent',JSON[_0x1f4e('0xe')](_0x483d20));if(_0x483d20[_0x1f4e('0xf')]){if(_0x483d20[_0x1f4e('0xf')][_0x1f4e('0x10')]===0x1f4){logger[_0x1f4e('0xf')](_0x1f4e('0xa'),_0x25eed5,_0x483d20[_0x1f4e('0xf')]['message']);return _0x246bc2(_0x483d20[_0x1f4e('0xf')]['message']);}logger['error'](_0x1f4e('0xa'),_0x25eed5,_0x483d20[_0x1f4e('0xf')][_0x1f4e('0x11')]);return _0x463f77(_0x483d20['error'][_0x1f4e('0x11')]);}else{logger[_0x1f4e('0x12')](_0x1f4e('0xa'),_0x25eed5,_0x1f4e('0xb'));_0x463f77(_0x483d20[_0x1f4e('0x13')][_0x1f4e('0x11')]);}})[_0x1f4e('0x14')](function(_0xbf532d){logger[_0x1f4e('0xf')](_0x1f4e('0xa'),_0x25eed5,_0xbf532d);_0x246bc2(_0xbf532d);});});}exports['GetServicenowAccount']=function(_0x8af8f3){var _0x2e0c57=this;return new Promise(function(_0x37c888,_0x1db3e0){return db[_0x1f4e('0x15')][_0x1f4e('0x16')]({'raw':_0x8af8f3['options']?_0x8af8f3[_0x1f4e('0x17')][_0x1f4e('0x18')]===undefined?!![]:![]:!![],'where':_0x8af8f3[_0x1f4e('0x17')]?_0x8af8f3['options'][_0x1f4e('0x19')]||null:null,'attributes':_0x8af8f3[_0x1f4e('0x17')]?_0x8af8f3[_0x1f4e('0x17')][_0x1f4e('0x1a')]||null:null,'limit':_0x8af8f3[_0x1f4e('0x17')]?_0x8af8f3['options'][_0x1f4e('0x1b')]||null:null,'include':_0x8af8f3['options']?_0x8af8f3['options'][_0x1f4e('0x1c')]?_[_0x1f4e('0x1d')](_0x8af8f3['options'][_0x1f4e('0x1c')],function(_0x1bce06){return{'model':db[_0x1bce06[_0x1f4e('0x1e')]],'as':_0x1bce06['as'],'attributes':_0x1bce06['attributes'],'include':_0x1bce06[_0x1f4e('0x1c')]?_[_0x1f4e('0x1d')](_0x1bce06[_0x1f4e('0x1c')],function(_0x43d768){return{'model':db[_0x43d768[_0x1f4e('0x1e')]],'as':_0x43d768['as'],'attributes':_0x43d768['attributes'],'include':_0x43d768[_0x1f4e('0x1c')]?_[_0x1f4e('0x1d')](_0x43d768[_0x1f4e('0x1c')],function(_0x4b4163){return{'model':db[_0x4b4163[_0x1f4e('0x1e')]],'as':_0x4b4163['as'],'attributes':_0x4b4163[_0x1f4e('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x164730){logger['info'](_0x1f4e('0x1f'),_0x8af8f3);logger[_0x1f4e('0xc')](_0x1f4e('0x1f'),_0x8af8f3,JSON[_0x1f4e('0xe')](_0x164730));_0x37c888(_0x164730);})[_0x1f4e('0x14')](function(_0x5db536){logger[_0x1f4e('0xf')]('GetServicenowAccount',_0x5db536[_0x1f4e('0x11')],_0x8af8f3);_0x1db3e0(_0x2e0c57[_0x1f4e('0xf')](0x1f4,_0x5db536[_0x1f4e('0x11')]));});});};exports[_0x1f4e('0x20')]=function(_0x33318b){var _0x2a1666=this;return new Promise(function(_0x218699,_0x3b74b7){return db['ServicenowAccount'][_0x1f4e('0x21')]({'raw':_0x33318b['options']?_0x33318b[_0x1f4e('0x17')]['raw']===undefined?!![]:![]:!![],'where':_0x33318b[_0x1f4e('0x17')]?_0x33318b[_0x1f4e('0x17')]['where']||null:null,'attributes':_0x33318b['options']?_0x33318b[_0x1f4e('0x17')]['attributes']||null:null,'include':_0x33318b['options']?_0x33318b[_0x1f4e('0x17')]['include']?_[_0x1f4e('0x1d')](_0x33318b[_0x1f4e('0x17')]['include'],function(_0x4f64d9){return{'model':db[_0x4f64d9[_0x1f4e('0x1e')]],'as':_0x4f64d9['as'],'attributes':_0x4f64d9[_0x1f4e('0x1a')],'include':_0x4f64d9[_0x1f4e('0x1c')]?_['map'](_0x4f64d9[_0x1f4e('0x1c')],function(_0x5150a7){return{'model':db[_0x5150a7[_0x1f4e('0x1e')]],'as':_0x5150a7['as'],'attributes':_0x5150a7[_0x1f4e('0x1a')],'include':_0x5150a7[_0x1f4e('0x1c')]?_[_0x1f4e('0x1d')](_0x5150a7[_0x1f4e('0x1c')],function(_0x50194){return{'model':db[_0x50194[_0x1f4e('0x1e')]],'as':_0x50194['as'],'attributes':_0x50194['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x12852a){logger[_0x1f4e('0x12')](_0x1f4e('0x20'),_0x33318b);logger['debug'](_0x1f4e('0x20'),_0x33318b,JSON[_0x1f4e('0xe')](_0x12852a));_0x218699(_0x12852a);})[_0x1f4e('0x14')](function(_0x5b3075){logger[_0x1f4e('0xf')]('ShowServicenowAccount',_0x5b3075['message'],_0x33318b);_0x3b74b7(_0x2a1666[_0x1f4e('0xf')](0x1f4,_0x5b3075[_0x1f4e('0x11')]));});});};
\ No newline at end of file