Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / api / intServicenowAccount / intServicenowAccount.rpc.js
index 61868c2..8ee32c6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x103b=['bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','then','info','ServicenowAccount,\x20%s,\x20%s','request\x20sent','ServicenowAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','findAll','options','raw','attributes','include','map','model','GetServicenowAccount','debug','ShowServicenowAccount','where','lodash','util','moment'];(function(_0x50659a,_0x3102c6){var _0x4d7ef8=function(_0xc6f461){while(--_0xc6f461){_0x50659a['push'](_0x50659a['shift']());}};_0x4d7ef8(++_0x3102c6);}(_0x103b,0xcf));var _0xb103=function(_0x19e7a6,_0x4c8752){_0x19e7a6=_0x19e7a6-0x0;var _0xbd61fe=_0x103b[_0x19e7a6];return _0xbd61fe;};'use strict';var _=require(_0xb103('0x0'));var util=require(_0xb103('0x1'));var moment=require(_0xb103('0x2'));var BPromise=require(_0xb103('0x3'));var rs=require(_0xb103('0x4'));var fs=require('fs');var Redis=require(_0xb103('0x5'));var db=require(_0xb103('0x6'))['db'];var utils=require(_0xb103('0x7'));var logger=require(_0xb103('0x8'))(_0xb103('0x9'));var config=require(_0xb103('0xa'));var jayson=require(_0xb103('0xb'));var client=jayson['client'][_0xb103('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x12fc63,_0x3cf1da,_0x5e04e6){return new BPromise(function(_0x49f3d2,_0x5d9a75){return client['request'](_0x12fc63,_0x5e04e6)[_0xb103('0xd')](function(_0x258a15){logger[_0xb103('0xe')](_0xb103('0xf'),_0x3cf1da,_0xb103('0x10'));logger['debug'](_0xb103('0x11'),_0x3cf1da,_0xb103('0x10'),JSON[_0xb103('0x12')](_0x258a15));if(_0x258a15[_0xb103('0x13')]){if(_0x258a15[_0xb103('0x13')][_0xb103('0x14')]===0x1f4){logger[_0xb103('0x13')]('ServicenowAccount,\x20%s,\x20%s',_0x3cf1da,_0x258a15['error'][_0xb103('0x15')]);return _0x5d9a75(_0x258a15['error'][_0xb103('0x15')]);}logger[_0xb103('0x13')]('ServicenowAccount,\x20%s,\x20%s',_0x3cf1da,_0x258a15[_0xb103('0x13')][_0xb103('0x15')]);return _0x49f3d2(_0x258a15[_0xb103('0x13')][_0xb103('0x15')]);}else{logger[_0xb103('0xe')](_0xb103('0xf'),_0x3cf1da,_0xb103('0x10'));_0x49f3d2(_0x258a15[_0xb103('0x16')]['message']);}})[_0xb103('0x17')](function(_0x8879ea){logger[_0xb103('0x13')](_0xb103('0xf'),_0x3cf1da,_0x8879ea);_0x5d9a75(_0x8879ea);});});}exports['GetServicenowAccount']=function(_0x376733){var _0x3cd3fe=this;return new Promise(function(_0x2f16bf,_0x4378ad){return db['ServicenowAccount'][_0xb103('0x18')]({'raw':_0x376733[_0xb103('0x19')]?_0x376733[_0xb103('0x19')][_0xb103('0x1a')]===undefined?!![]:![]:!![],'where':_0x376733[_0xb103('0x19')]?_0x376733[_0xb103('0x19')]['where']||null:null,'attributes':_0x376733[_0xb103('0x19')]?_0x376733['options'][_0xb103('0x1b')]||null:null,'limit':_0x376733[_0xb103('0x19')]?_0x376733['options']['limit']||null:null,'include':_0x376733[_0xb103('0x19')]?_0x376733[_0xb103('0x19')][_0xb103('0x1c')]?_[_0xb103('0x1d')](_0x376733[_0xb103('0x19')][_0xb103('0x1c')],function(_0x2de793){return{'model':db[_0x2de793[_0xb103('0x1e')]],'as':_0x2de793['as'],'attributes':_0x2de793[_0xb103('0x1b')],'include':_0x2de793[_0xb103('0x1c')]?_['map'](_0x2de793[_0xb103('0x1c')],function(_0x5dc43f){return{'model':db[_0x5dc43f[_0xb103('0x1e')]],'as':_0x5dc43f['as'],'attributes':_0x5dc43f[_0xb103('0x1b')],'include':_0x5dc43f['include']?_['map'](_0x5dc43f[_0xb103('0x1c')],function(_0x413633){return{'model':db[_0x413633[_0xb103('0x1e')]],'as':_0x413633['as'],'attributes':_0x413633[_0xb103('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xb103('0xd')](function(_0x370002){logger[_0xb103('0xe')](_0xb103('0x1f'),_0x376733);logger[_0xb103('0x20')](_0xb103('0x1f'),_0x376733,JSON[_0xb103('0x12')](_0x370002));_0x2f16bf(_0x370002);})['catch'](function(_0x46c448){logger[_0xb103('0x13')](_0xb103('0x1f'),_0x46c448[_0xb103('0x15')],_0x376733);_0x4378ad(_0x3cd3fe[_0xb103('0x13')](0x1f4,_0x46c448['message']));});});};exports[_0xb103('0x21')]=function(_0x2e1b8b){var _0x330ce3=this;return new Promise(function(_0x6f2238,_0x5cfb25){return db['ServicenowAccount']['find']({'raw':_0x2e1b8b[_0xb103('0x19')]?_0x2e1b8b[_0xb103('0x19')][_0xb103('0x1a')]===undefined?!![]:![]:!![],'where':_0x2e1b8b[_0xb103('0x19')]?_0x2e1b8b[_0xb103('0x19')][_0xb103('0x22')]||null:null,'attributes':_0x2e1b8b[_0xb103('0x19')]?_0x2e1b8b[_0xb103('0x19')]['attributes']||null:null,'include':_0x2e1b8b[_0xb103('0x19')]?_0x2e1b8b['options'][_0xb103('0x1c')]?_['map'](_0x2e1b8b[_0xb103('0x19')][_0xb103('0x1c')],function(_0x1e4c60){return{'model':db[_0x1e4c60[_0xb103('0x1e')]],'as':_0x1e4c60['as'],'attributes':_0x1e4c60['attributes'],'include':_0x1e4c60[_0xb103('0x1c')]?_[_0xb103('0x1d')](_0x1e4c60[_0xb103('0x1c')],function(_0x543f9b){return{'model':db[_0x543f9b['model']],'as':_0x543f9b['as'],'attributes':_0x543f9b['attributes'],'include':_0x543f9b[_0xb103('0x1c')]?_['map'](_0x543f9b['include'],function(_0x2ecd5d){return{'model':db[_0x2ecd5d['model']],'as':_0x2ecd5d['as'],'attributes':_0x2ecd5d[_0xb103('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xb103('0xd')](function(_0x27391f){logger[_0xb103('0xe')]('ShowServicenowAccount',_0x2e1b8b);logger[_0xb103('0x20')](_0xb103('0x21'),_0x2e1b8b,JSON[_0xb103('0x12')](_0x27391f));_0x6f2238(_0x27391f);})[_0xb103('0x17')](function(_0x266f77){logger[_0xb103('0x13')](_0xb103('0x21'),_0x266f77['message'],_0x2e1b8b);_0x5cfb25(_0x330ce3[_0xb103('0x13')](0x1f4,_0x266f77['message']));});});};
\ No newline at end of file
+var _0x3d93=['bluebird','randomstring','ioredis','../../mysqldb','rpc','jayson/promise','client','request','then','info','ServicenowAccount,\x20%s,\x20%s','request\x20sent','debug','ServicenowAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','findAll','options','raw','where','map','include','model','attributes','GetServicenowAccount','ShowServicenowAccount','ServicenowAccount','lodash','util'];(function(_0x23c8c1,_0x1c8a4e){var _0x1962e7=function(_0xbcdf00){while(--_0xbcdf00){_0x23c8c1['push'](_0x23c8c1['shift']());}};_0x1962e7(++_0x1c8a4e);}(_0x3d93,0x15e));var _0x33d9=function(_0x3dbaa5,_0x4826a3){_0x3dbaa5=_0x3dbaa5-0x0;var _0x4b203e=_0x3d93[_0x3dbaa5];return _0x4b203e;};'use strict';var _=require(_0x33d9('0x0'));var util=require(_0x33d9('0x1'));var moment=require('moment');var BPromise=require(_0x33d9('0x2'));var rs=require(_0x33d9('0x3'));var fs=require('fs');var Redis=require(_0x33d9('0x4'));var db=require(_0x33d9('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x33d9('0x6'));var config=require('../../config/environment');var jayson=require(_0x33d9('0x7'));var client=jayson[_0x33d9('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x51896a,_0x1666e1,_0x152d18){return new BPromise(function(_0x3a9e61,_0xa352b){return client[_0x33d9('0x9')](_0x51896a,_0x152d18)[_0x33d9('0xa')](function(_0x56bdc3){logger[_0x33d9('0xb')](_0x33d9('0xc'),_0x1666e1,_0x33d9('0xd'));logger[_0x33d9('0xe')](_0x33d9('0xf'),_0x1666e1,_0x33d9('0xd'),JSON[_0x33d9('0x10')](_0x56bdc3));if(_0x56bdc3[_0x33d9('0x11')]){if(_0x56bdc3[_0x33d9('0x11')]['code']===0x1f4){logger[_0x33d9('0x11')](_0x33d9('0xc'),_0x1666e1,_0x56bdc3[_0x33d9('0x11')][_0x33d9('0x12')]);return _0xa352b(_0x56bdc3[_0x33d9('0x11')][_0x33d9('0x12')]);}logger[_0x33d9('0x11')](_0x33d9('0xc'),_0x1666e1,_0x56bdc3['error'][_0x33d9('0x12')]);return _0x3a9e61(_0x56bdc3[_0x33d9('0x11')][_0x33d9('0x12')]);}else{logger['info'](_0x33d9('0xc'),_0x1666e1,_0x33d9('0xd'));_0x3a9e61(_0x56bdc3[_0x33d9('0x13')][_0x33d9('0x12')]);}})[_0x33d9('0x14')](function(_0xf3e868){logger[_0x33d9('0x11')]('ServicenowAccount,\x20%s,\x20%s',_0x1666e1,_0xf3e868);_0xa352b(_0xf3e868);});});}exports['GetServicenowAccount']=function(_0x3fd14e){var _0x2f8578=this;return new Promise(function(_0x440006,_0x301ff9){return db['ServicenowAccount'][_0x33d9('0x15')]({'raw':_0x3fd14e['options']?_0x3fd14e[_0x33d9('0x16')][_0x33d9('0x17')]===undefined?!![]:![]:!![],'where':_0x3fd14e[_0x33d9('0x16')]?_0x3fd14e[_0x33d9('0x16')][_0x33d9('0x18')]||null:null,'attributes':_0x3fd14e[_0x33d9('0x16')]?_0x3fd14e[_0x33d9('0x16')]['attributes']||null:null,'limit':_0x3fd14e[_0x33d9('0x16')]?_0x3fd14e[_0x33d9('0x16')]['limit']||null:null,'include':_0x3fd14e[_0x33d9('0x16')]?_0x3fd14e[_0x33d9('0x16')]['include']?_[_0x33d9('0x19')](_0x3fd14e[_0x33d9('0x16')][_0x33d9('0x1a')],function(_0x16b0d9){return{'model':db[_0x16b0d9[_0x33d9('0x1b')]],'as':_0x16b0d9['as'],'attributes':_0x16b0d9[_0x33d9('0x1c')],'include':_0x16b0d9[_0x33d9('0x1a')]?_['map'](_0x16b0d9[_0x33d9('0x1a')],function(_0x1293d7){return{'model':db[_0x1293d7[_0x33d9('0x1b')]],'as':_0x1293d7['as'],'attributes':_0x1293d7[_0x33d9('0x1c')],'include':_0x1293d7[_0x33d9('0x1a')]?_[_0x33d9('0x19')](_0x1293d7['include'],function(_0x3e47c1){return{'model':db[_0x3e47c1['model']],'as':_0x3e47c1['as'],'attributes':_0x3e47c1['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x53485f){logger[_0x33d9('0xb')](_0x33d9('0x1d'),_0x3fd14e);logger[_0x33d9('0xe')]('GetServicenowAccount',_0x3fd14e,JSON['stringify'](_0x53485f));_0x440006(_0x53485f);})[_0x33d9('0x14')](function(_0xbf4fe8){logger['error'](_0x33d9('0x1d'),_0xbf4fe8[_0x33d9('0x12')],_0x3fd14e);_0x301ff9(_0x2f8578[_0x33d9('0x11')](0x1f4,_0xbf4fe8[_0x33d9('0x12')]));});});};exports[_0x33d9('0x1e')]=function(_0xc30017){var _0xdb34fc=this;return new Promise(function(_0x57010d,_0x23958a){return db[_0x33d9('0x1f')]['find']({'raw':_0xc30017[_0x33d9('0x16')]?_0xc30017[_0x33d9('0x16')][_0x33d9('0x17')]===undefined?!![]:![]:!![],'where':_0xc30017[_0x33d9('0x16')]?_0xc30017['options'][_0x33d9('0x18')]||null:null,'attributes':_0xc30017['options']?_0xc30017[_0x33d9('0x16')][_0x33d9('0x1c')]||null:null,'include':_0xc30017[_0x33d9('0x16')]?_0xc30017[_0x33d9('0x16')][_0x33d9('0x1a')]?_[_0x33d9('0x19')](_0xc30017['options']['include'],function(_0x524391){return{'model':db[_0x524391[_0x33d9('0x1b')]],'as':_0x524391['as'],'attributes':_0x524391['attributes'],'include':_0x524391[_0x33d9('0x1a')]?_[_0x33d9('0x19')](_0x524391['include'],function(_0x36db9f){return{'model':db[_0x36db9f[_0x33d9('0x1b')]],'as':_0x36db9f['as'],'attributes':_0x36db9f[_0x33d9('0x1c')],'include':_0x36db9f[_0x33d9('0x1a')]?_['map'](_0x36db9f[_0x33d9('0x1a')],function(_0x1036ad){return{'model':db[_0x1036ad['model']],'as':_0x1036ad['as'],'attributes':_0x1036ad['attributes']};}):[]};}):[]};}):[]:[]})[_0x33d9('0xa')](function(_0x14a411){logger[_0x33d9('0xb')](_0x33d9('0x1e'),_0xc30017);logger[_0x33d9('0xe')](_0x33d9('0x1e'),_0xc30017,JSON[_0x33d9('0x10')](_0x14a411));_0x57010d(_0x14a411);})[_0x33d9('0x14')](function(_0x50abec){logger[_0x33d9('0x11')](_0x33d9('0x1e'),_0x50abec[_0x33d9('0x12')],_0xc30017);_0x23958a(_0xdb34fc[_0x33d9('0x11')](0x1f4,_0x50abec[_0x33d9('0x12')]));});});};
\ No newline at end of file