Built motion from commit (unavailable).|2.6.0
[motion2.git] / server / api / intFreshdeskAccount / intFreshdeskAccount.rpc.js
index ef54e9f..91c1099 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa728=['find','raw','ShowFreshdeskAccount','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','client','http','then','info','request\x20sent','stringify','error','code','FreshdeskAccount,\x20%s,\x20%s','message','result','GetFreshdeskAccount','FreshdeskAccount','findAll','options','where','map','include','model','attributes','debug','catch'];(function(_0x3f1e65,_0x49945c){var _0x16bd2f=function(_0x11ed9e){while(--_0x11ed9e){_0x3f1e65['push'](_0x3f1e65['shift']());}};_0x16bd2f(++_0x49945c);}(_0xa728,0x69));var _0x8a72=function(_0x488b0d,_0x2f3da4){_0x488b0d=_0x488b0d-0x0;var _0x1eeaba=_0xa728[_0x488b0d];return _0x1eeaba;};'use strict';var _=require(_0x8a72('0x0'));var util=require('util');var moment=require(_0x8a72('0x1'));var BPromise=require(_0x8a72('0x2'));var rs=require(_0x8a72('0x3'));var fs=require('fs');var Redis=require(_0x8a72('0x4'));var db=require(_0x8a72('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x8a72('0x6'))(_0x8a72('0x7'));var config=require(_0x8a72('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x8a72('0x9')][_0x8a72('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x147589,_0x263421,_0x1e756a){return new BPromise(function(_0x4b05cd,_0x58bc7a){return client['request'](_0x147589,_0x1e756a)[_0x8a72('0xb')](function(_0x229b72){logger[_0x8a72('0xc')]('FreshdeskAccount,\x20%s,\x20%s',_0x263421,_0x8a72('0xd'));logger['debug']('FreshdeskAccount,\x20%s,\x20%s,\x20%s',_0x263421,_0x8a72('0xd'),JSON[_0x8a72('0xe')](_0x229b72));if(_0x229b72[_0x8a72('0xf')]){if(_0x229b72[_0x8a72('0xf')][_0x8a72('0x10')]===0x1f4){logger[_0x8a72('0xf')](_0x8a72('0x11'),_0x263421,_0x229b72['error'][_0x8a72('0x12')]);return _0x58bc7a(_0x229b72[_0x8a72('0xf')][_0x8a72('0x12')]);}logger[_0x8a72('0xf')](_0x8a72('0x11'),_0x263421,_0x229b72['error'][_0x8a72('0x12')]);return _0x4b05cd(_0x229b72['error'][_0x8a72('0x12')]);}else{logger[_0x8a72('0xc')]('FreshdeskAccount,\x20%s,\x20%s',_0x263421,_0x8a72('0xd'));_0x4b05cd(_0x229b72[_0x8a72('0x13')]['message']);}})['catch'](function(_0x1b1b0e){logger[_0x8a72('0xf')](_0x8a72('0x11'),_0x263421,_0x1b1b0e);_0x58bc7a(_0x1b1b0e);});});}exports[_0x8a72('0x14')]=function(_0x89205e){var _0x40154e=this;return new Promise(function(_0x17e00f,_0x5d384f){return db[_0x8a72('0x15')][_0x8a72('0x16')]({'raw':_0x89205e[_0x8a72('0x17')]?_0x89205e[_0x8a72('0x17')]['raw']===undefined?!![]:![]:!![],'where':_0x89205e['options']?_0x89205e[_0x8a72('0x17')][_0x8a72('0x18')]||null:null,'attributes':_0x89205e[_0x8a72('0x17')]?_0x89205e['options']['attributes']||null:null,'limit':_0x89205e[_0x8a72('0x17')]?_0x89205e['options']['limit']||null:null,'include':_0x89205e['options']?_0x89205e[_0x8a72('0x17')]['include']?_[_0x8a72('0x19')](_0x89205e[_0x8a72('0x17')][_0x8a72('0x1a')],function(_0x2e6d03){return{'model':db[_0x2e6d03[_0x8a72('0x1b')]],'as':_0x2e6d03['as'],'attributes':_0x2e6d03[_0x8a72('0x1c')],'include':_0x2e6d03['include']?_['map'](_0x2e6d03[_0x8a72('0x1a')],function(_0x4b6449){return{'model':db[_0x4b6449[_0x8a72('0x1b')]],'as':_0x4b6449['as'],'attributes':_0x4b6449[_0x8a72('0x1c')],'include':_0x4b6449[_0x8a72('0x1a')]?_[_0x8a72('0x19')](_0x4b6449[_0x8a72('0x1a')],function(_0x286cc3){return{'model':db[_0x286cc3[_0x8a72('0x1b')]],'as':_0x286cc3['as'],'attributes':_0x286cc3[_0x8a72('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x8a72('0xb')](function(_0x379c62){logger[_0x8a72('0xc')](_0x8a72('0x14'),_0x89205e);logger[_0x8a72('0x1d')](_0x8a72('0x14'),_0x89205e,JSON['stringify'](_0x379c62));_0x17e00f(_0x379c62);})[_0x8a72('0x1e')](function(_0x4b1f81){logger[_0x8a72('0xf')]('GetFreshdeskAccount',_0x4b1f81[_0x8a72('0x12')],_0x89205e);_0x5d384f(_0x40154e[_0x8a72('0xf')](0x1f4,_0x4b1f81[_0x8a72('0x12')]));});});};exports['ShowFreshdeskAccount']=function(_0x5051a2){var _0x1cb716=this;return new Promise(function(_0x173460,_0x505198){return db[_0x8a72('0x15')][_0x8a72('0x1f')]({'raw':_0x5051a2['options']?_0x5051a2['options'][_0x8a72('0x20')]===undefined?!![]:![]:!![],'where':_0x5051a2[_0x8a72('0x17')]?_0x5051a2[_0x8a72('0x17')][_0x8a72('0x18')]||null:null,'attributes':_0x5051a2['options']?_0x5051a2[_0x8a72('0x17')][_0x8a72('0x1c')]||null:null,'include':_0x5051a2[_0x8a72('0x17')]?_0x5051a2[_0x8a72('0x17')][_0x8a72('0x1a')]?_[_0x8a72('0x19')](_0x5051a2[_0x8a72('0x17')][_0x8a72('0x1a')],function(_0x30f4d7){return{'model':db[_0x30f4d7[_0x8a72('0x1b')]],'as':_0x30f4d7['as'],'attributes':_0x30f4d7[_0x8a72('0x1c')],'include':_0x30f4d7['include']?_[_0x8a72('0x19')](_0x30f4d7[_0x8a72('0x1a')],function(_0x474690){return{'model':db[_0x474690[_0x8a72('0x1b')]],'as':_0x474690['as'],'attributes':_0x474690[_0x8a72('0x1c')],'include':_0x474690[_0x8a72('0x1a')]?_[_0x8a72('0x19')](_0x474690[_0x8a72('0x1a')],function(_0xb0d39){return{'model':db[_0xb0d39['model']],'as':_0xb0d39['as'],'attributes':_0xb0d39[_0x8a72('0x1c')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x44a44d){logger['info'](_0x8a72('0x21'),_0x5051a2);logger[_0x8a72('0x1d')]('ShowFreshdeskAccount',_0x5051a2,JSON[_0x8a72('0xe')](_0x44a44d));_0x173460(_0x44a44d);})['catch'](function(_0x31bb63){logger[_0x8a72('0xf')](_0x8a72('0x21'),_0x31bb63['message'],_0x5051a2);_0x505198(_0x1cb716[_0x8a72('0xf')](0x1f4,_0x31bb63['message']));});});};
\ No newline at end of file
+var _0x100d=['FreshdeskAccount,\x20%s,\x20%s','request\x20sent','FreshdeskAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','GetFreshdeskAccount','FreshdeskAccount','findAll','options','raw','attributes','include','map','model','debug','catch','ShowFreshdeskAccount','find','where','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info'];(function(_0x5231f6,_0x5a63de){var _0x2335d9=function(_0x2197a6){while(--_0x2197a6){_0x5231f6['push'](_0x5231f6['shift']());}};_0x2335d9(++_0x5a63de);}(_0x100d,0x136));var _0xd100=function(_0x37af33,_0x23b8a0){_0x37af33=_0x37af33-0x0;var _0x5e732e=_0x100d[_0x37af33];return _0x5e732e;};'use strict';var _=require(_0xd100('0x0'));var util=require(_0xd100('0x1'));var moment=require(_0xd100('0x2'));var BPromise=require(_0xd100('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xd100('0x4'))['db'];var utils=require(_0xd100('0x5'));var logger=require(_0xd100('0x6'))(_0xd100('0x7'));var config=require(_0xd100('0x8'));var jayson=require(_0xd100('0x9'));var client=jayson['client'][_0xd100('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x5cd204,_0x13874c,_0x2fb8a8){return new BPromise(function(_0x12daee,_0x5b3e43){return client[_0xd100('0xb')](_0x5cd204,_0x2fb8a8)[_0xd100('0xc')](function(_0x59734b){logger[_0xd100('0xd')](_0xd100('0xe'),_0x13874c,_0xd100('0xf'));logger['debug'](_0xd100('0x10'),_0x13874c,_0xd100('0xf'),JSON[_0xd100('0x11')](_0x59734b));if(_0x59734b[_0xd100('0x12')]){if(_0x59734b[_0xd100('0x12')][_0xd100('0x13')]===0x1f4){logger[_0xd100('0x12')](_0xd100('0xe'),_0x13874c,_0x59734b[_0xd100('0x12')]['message']);return _0x5b3e43(_0x59734b[_0xd100('0x12')]['message']);}logger[_0xd100('0x12')](_0xd100('0xe'),_0x13874c,_0x59734b[_0xd100('0x12')][_0xd100('0x14')]);return _0x12daee(_0x59734b[_0xd100('0x12')][_0xd100('0x14')]);}else{logger[_0xd100('0xd')](_0xd100('0xe'),_0x13874c,_0xd100('0xf'));_0x12daee(_0x59734b[_0xd100('0x15')][_0xd100('0x14')]);}})['catch'](function(_0x27ef4f){logger[_0xd100('0x12')](_0xd100('0xe'),_0x13874c,_0x27ef4f);_0x5b3e43(_0x27ef4f);});});}exports[_0xd100('0x16')]=function(_0x3466cd){var _0x73ccb5=this;return new Promise(function(_0x287c71,_0x5cc6cc){return db[_0xd100('0x17')][_0xd100('0x18')]({'raw':_0x3466cd['options']?_0x3466cd[_0xd100('0x19')][_0xd100('0x1a')]===undefined?!![]:![]:!![],'where':_0x3466cd['options']?_0x3466cd['options']['where']||null:null,'attributes':_0x3466cd[_0xd100('0x19')]?_0x3466cd['options'][_0xd100('0x1b')]||null:null,'limit':_0x3466cd[_0xd100('0x19')]?_0x3466cd[_0xd100('0x19')]['limit']||null:null,'include':_0x3466cd[_0xd100('0x19')]?_0x3466cd[_0xd100('0x19')][_0xd100('0x1c')]?_[_0xd100('0x1d')](_0x3466cd[_0xd100('0x19')][_0xd100('0x1c')],function(_0x201742){return{'model':db[_0x201742[_0xd100('0x1e')]],'as':_0x201742['as'],'attributes':_0x201742[_0xd100('0x1b')],'include':_0x201742[_0xd100('0x1c')]?_[_0xd100('0x1d')](_0x201742['include'],function(_0x5b0004){return{'model':db[_0x5b0004[_0xd100('0x1e')]],'as':_0x5b0004['as'],'attributes':_0x5b0004[_0xd100('0x1b')],'include':_0x5b0004[_0xd100('0x1c')]?_[_0xd100('0x1d')](_0x5b0004[_0xd100('0x1c')],function(_0xa0efc0){return{'model':db[_0xa0efc0['model']],'as':_0xa0efc0['as'],'attributes':_0xa0efc0[_0xd100('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xd100('0xc')](function(_0x58eb06){logger['info'](_0xd100('0x16'),_0x3466cd);logger[_0xd100('0x1f')](_0xd100('0x16'),_0x3466cd,JSON['stringify'](_0x58eb06));_0x287c71(_0x58eb06);})[_0xd100('0x20')](function(_0x24b6b9){logger[_0xd100('0x12')](_0xd100('0x16'),_0x24b6b9[_0xd100('0x14')],_0x3466cd);_0x5cc6cc(_0x73ccb5[_0xd100('0x12')](0x1f4,_0x24b6b9['message']));});});};exports[_0xd100('0x21')]=function(_0x626e54){var _0x58d2d0=this;return new Promise(function(_0x4c6427,_0x1a9b24){return db[_0xd100('0x17')][_0xd100('0x22')]({'raw':_0x626e54['options']?_0x626e54['options'][_0xd100('0x1a')]===undefined?!![]:![]:!![],'where':_0x626e54['options']?_0x626e54[_0xd100('0x19')][_0xd100('0x23')]||null:null,'attributes':_0x626e54[_0xd100('0x19')]?_0x626e54[_0xd100('0x19')][_0xd100('0x1b')]||null:null,'include':_0x626e54[_0xd100('0x19')]?_0x626e54['options'][_0xd100('0x1c')]?_[_0xd100('0x1d')](_0x626e54[_0xd100('0x19')][_0xd100('0x1c')],function(_0x4292d5){return{'model':db[_0x4292d5[_0xd100('0x1e')]],'as':_0x4292d5['as'],'attributes':_0x4292d5[_0xd100('0x1b')],'include':_0x4292d5[_0xd100('0x1c')]?_['map'](_0x4292d5[_0xd100('0x1c')],function(_0x29ccfd){return{'model':db[_0x29ccfd[_0xd100('0x1e')]],'as':_0x29ccfd['as'],'attributes':_0x29ccfd[_0xd100('0x1b')],'include':_0x29ccfd[_0xd100('0x1c')]?_['map'](_0x29ccfd[_0xd100('0x1c')],function(_0xeec160){return{'model':db[_0xeec160[_0xd100('0x1e')]],'as':_0xeec160['as'],'attributes':_0xeec160[_0xd100('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xd100('0xc')](function(_0x45cdae){logger[_0xd100('0xd')](_0xd100('0x21'),_0x626e54);logger[_0xd100('0x1f')](_0xd100('0x21'),_0x626e54,JSON[_0xd100('0x11')](_0x45cdae));_0x4c6427(_0x45cdae);})['catch'](function(_0x58ad59){logger[_0xd100('0x12')](_0xd100('0x21'),_0x58ad59[_0xd100('0x14')],_0x626e54);_0x1a9b24(_0x58d2d0['error'](0x1f4,_0x58ad59[_0xd100('0x14')]));});});};
\ No newline at end of file