Built motion from commit (unavailable).|2.0.73
[motion2.git] / server / api / intZendeskAccount / intZendeskAccount.rpc.js
index 063308c..2c6d216 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe11b=['../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','info','request\x20sent','debug','ZendeskAccount,\x20%s,\x20%s,\x20%s','error','code','ZendeskAccount,\x20%s,\x20%s','message','result','catch','GetZendeskAccount','findAll','options','raw','where','limit','include','map','attributes','model','stringify','ZendeskAccount','ShowZendeskAccount','lodash','util','moment','bluebird','randomstring'];(function(_0x450ad5,_0x43becc){var _0x6a97d3=function(_0x33a51a){while(--_0x33a51a){_0x450ad5['push'](_0x450ad5['shift']());}};_0x6a97d3(++_0x43becc);}(_0xe11b,0xd9));var _0xbe11=function(_0x36142a,_0x1a9e4c){_0x36142a=_0x36142a-0x0;var _0x1b26e1=_0xe11b[_0x36142a];return _0x1b26e1;};'use strict';var _=require(_0xbe11('0x0'));var util=require(_0xbe11('0x1'));var moment=require(_0xbe11('0x2'));var BPromise=require(_0xbe11('0x3'));var rs=require(_0xbe11('0x4'));var fs=require('fs');var db=require(_0xbe11('0x5'))['db'];var utils=require(_0xbe11('0x6'));var logger=require(_0xbe11('0x7'))(_0xbe11('0x8'));var config=require(_0xbe11('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xbe11('0xa')][_0xbe11('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x6b81de,_0x6e4919,_0x1d1917){return new BPromise(function(_0x3168a4,_0x175ba6){return client[_0xbe11('0xc')](_0x6b81de,_0x1d1917)[_0xbe11('0xd')](function(_0x3e3912){logger[_0xbe11('0xe')]('ZendeskAccount,\x20%s,\x20%s',_0x6e4919,_0xbe11('0xf'));logger[_0xbe11('0x10')](_0xbe11('0x11'),_0x6e4919,_0xbe11('0xf'),JSON['stringify'](_0x3e3912));if(_0x3e3912[_0xbe11('0x12')]){if(_0x3e3912[_0xbe11('0x12')][_0xbe11('0x13')]===0x1f4){logger[_0xbe11('0x12')](_0xbe11('0x14'),_0x6e4919,_0x3e3912[_0xbe11('0x12')][_0xbe11('0x15')]);return _0x175ba6(_0x3e3912['error'][_0xbe11('0x15')]);}logger[_0xbe11('0x12')]('ZendeskAccount,\x20%s,\x20%s',_0x6e4919,_0x3e3912['error'][_0xbe11('0x15')]);return _0x3168a4(_0x3e3912[_0xbe11('0x12')]['message']);}else{logger['info'](_0xbe11('0x14'),_0x6e4919,_0xbe11('0xf'));_0x3168a4(_0x3e3912[_0xbe11('0x16')][_0xbe11('0x15')]);}})[_0xbe11('0x17')](function(_0x34c168){logger[_0xbe11('0x12')]('ZendeskAccount,\x20%s,\x20%s',_0x6e4919,_0x34c168);_0x175ba6(_0x34c168);});});}exports[_0xbe11('0x18')]=function(_0x5d7591){var _0x133d6a=this;return new Promise(function(_0x75079b,_0x4bc55e){return db['ZendeskAccount'][_0xbe11('0x19')]({'raw':_0x5d7591[_0xbe11('0x1a')]?_0x5d7591['options'][_0xbe11('0x1b')]===undefined?!![]:![]:!![],'where':_0x5d7591[_0xbe11('0x1a')]?_0x5d7591[_0xbe11('0x1a')][_0xbe11('0x1c')]||null:null,'attributes':_0x5d7591[_0xbe11('0x1a')]?_0x5d7591[_0xbe11('0x1a')]['attributes']||null:null,'limit':_0x5d7591[_0xbe11('0x1a')]?_0x5d7591['options'][_0xbe11('0x1d')]||null:null,'include':_0x5d7591[_0xbe11('0x1a')]?_0x5d7591['options'][_0xbe11('0x1e')]?_[_0xbe11('0x1f')](_0x5d7591['options'][_0xbe11('0x1e')],function(_0xef1ffc){return{'model':db[_0xef1ffc['model']],'as':_0xef1ffc['as'],'attributes':_0xef1ffc[_0xbe11('0x20')],'include':_0xef1ffc[_0xbe11('0x1e')]?_[_0xbe11('0x1f')](_0xef1ffc[_0xbe11('0x1e')],function(_0x4c3a4e){return{'model':db[_0x4c3a4e['model']],'as':_0x4c3a4e['as'],'attributes':_0x4c3a4e[_0xbe11('0x20')],'include':_0x4c3a4e['include']?_[_0xbe11('0x1f')](_0x4c3a4e['include'],function(_0x1a759a){return{'model':db[_0x1a759a[_0xbe11('0x21')]],'as':_0x1a759a['as'],'attributes':_0x1a759a[_0xbe11('0x20')]};}):[]};}):[]};}):[]:[]})[_0xbe11('0xd')](function(_0x3dcadd){logger[_0xbe11('0xe')](_0xbe11('0x18'),_0x5d7591);logger[_0xbe11('0x10')](_0xbe11('0x18'),_0x5d7591,JSON[_0xbe11('0x22')](_0x3dcadd));_0x75079b(_0x3dcadd);})[_0xbe11('0x17')](function(_0x5e05b2){logger[_0xbe11('0x12')](_0xbe11('0x18'),_0x5e05b2[_0xbe11('0x15')],_0x5d7591);_0x4bc55e(_0x133d6a['error'](0x1f4,_0x5e05b2[_0xbe11('0x15')]));});});};exports['ShowZendeskAccount']=function(_0x3baff1){var _0x481769=this;return new Promise(function(_0x28dda1,_0x2afb69){return db[_0xbe11('0x23')]['find']({'raw':_0x3baff1[_0xbe11('0x1a')]?_0x3baff1[_0xbe11('0x1a')][_0xbe11('0x1b')]===undefined?!![]:![]:!![],'where':_0x3baff1[_0xbe11('0x1a')]?_0x3baff1['options']['where']||null:null,'attributes':_0x3baff1[_0xbe11('0x1a')]?_0x3baff1[_0xbe11('0x1a')][_0xbe11('0x20')]||null:null,'include':_0x3baff1[_0xbe11('0x1a')]?_0x3baff1['options'][_0xbe11('0x1e')]?_[_0xbe11('0x1f')](_0x3baff1[_0xbe11('0x1a')][_0xbe11('0x1e')],function(_0x6b1030){return{'model':db[_0x6b1030['model']],'as':_0x6b1030['as'],'attributes':_0x6b1030[_0xbe11('0x20')],'include':_0x6b1030[_0xbe11('0x1e')]?_[_0xbe11('0x1f')](_0x6b1030[_0xbe11('0x1e')],function(_0x26f791){return{'model':db[_0x26f791[_0xbe11('0x21')]],'as':_0x26f791['as'],'attributes':_0x26f791[_0xbe11('0x20')],'include':_0x26f791[_0xbe11('0x1e')]?_[_0xbe11('0x1f')](_0x26f791[_0xbe11('0x1e')],function(_0x10d86e){return{'model':db[_0x10d86e[_0xbe11('0x21')]],'as':_0x10d86e['as'],'attributes':_0x10d86e[_0xbe11('0x20')]};}):[]};}):[]};}):[]:[]})[_0xbe11('0xd')](function(_0x331c68){logger[_0xbe11('0xe')]('ShowZendeskAccount',_0x3baff1);logger['debug']('ShowZendeskAccount',_0x3baff1,JSON[_0xbe11('0x22')](_0x331c68));_0x28dda1(_0x331c68);})[_0xbe11('0x17')](function(_0x1c7a76){logger[_0xbe11('0x12')](_0xbe11('0x24'),_0x1c7a76[_0xbe11('0x15')],_0x3baff1);_0x2afb69(_0x481769[_0xbe11('0x12')](0x1f4,_0x1c7a76['message']));});});};
\ No newline at end of file
+var _0x13f1=['util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','ZendeskAccount,\x20%s,\x20%s','ZendeskAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','code','error','message','catch','GetZendeskAccount','ZendeskAccount','findAll','options','raw','where','include','map','model','attributes','debug','find','ShowZendeskAccount'];(function(_0x1b9fa,_0x119d71){var _0x4dffe7=function(_0x1fcdc6){while(--_0x1fcdc6){_0x1b9fa['push'](_0x1b9fa['shift']());}};_0x4dffe7(++_0x119d71);}(_0x13f1,0xfc));var _0x113f=function(_0x3301b7,_0x2d6d30){_0x3301b7=_0x3301b7-0x0;var _0x1c6245=_0x13f1[_0x3301b7];return _0x1c6245;};'use strict';var _=require('lodash');var util=require(_0x113f('0x0'));var moment=require(_0x113f('0x1'));var BPromise=require(_0x113f('0x2'));var rs=require(_0x113f('0x3'));var fs=require('fs');var db=require(_0x113f('0x4'))['db'];var utils=require(_0x113f('0x5'));var logger=require(_0x113f('0x6'))(_0x113f('0x7'));var config=require(_0x113f('0x8'));var jayson=require(_0x113f('0x9'));var client=jayson[_0x113f('0xa')][_0x113f('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x6122e2,_0x54825c,_0x57c642){return new BPromise(function(_0x42b0d8,_0x3c9720){return client[_0x113f('0xc')](_0x6122e2,_0x57c642)[_0x113f('0xd')](function(_0x33306d){logger[_0x113f('0xe')](_0x113f('0xf'),_0x54825c,'request\x20sent');logger['debug'](_0x113f('0x10'),_0x54825c,_0x113f('0x11'),JSON[_0x113f('0x12')](_0x33306d));if(_0x33306d['error']){if(_0x33306d['error'][_0x113f('0x13')]===0x1f4){logger[_0x113f('0x14')](_0x113f('0xf'),_0x54825c,_0x33306d[_0x113f('0x14')][_0x113f('0x15')]);return _0x3c9720(_0x33306d[_0x113f('0x14')][_0x113f('0x15')]);}logger['error'](_0x113f('0xf'),_0x54825c,_0x33306d[_0x113f('0x14')][_0x113f('0x15')]);return _0x42b0d8(_0x33306d['error'][_0x113f('0x15')]);}else{logger[_0x113f('0xe')](_0x113f('0xf'),_0x54825c,_0x113f('0x11'));_0x42b0d8(_0x33306d['result'][_0x113f('0x15')]);}})[_0x113f('0x16')](function(_0x39c276){logger[_0x113f('0x14')](_0x113f('0xf'),_0x54825c,_0x39c276);_0x3c9720(_0x39c276);});});}exports[_0x113f('0x17')]=function(_0x50678d){var _0x163859=this;return new Promise(function(_0x1863ef,_0x25ac31){return db[_0x113f('0x18')][_0x113f('0x19')]({'raw':_0x50678d[_0x113f('0x1a')]?_0x50678d[_0x113f('0x1a')][_0x113f('0x1b')]===undefined?!![]:![]:!![],'where':_0x50678d[_0x113f('0x1a')]?_0x50678d['options'][_0x113f('0x1c')]||null:null,'attributes':_0x50678d[_0x113f('0x1a')]?_0x50678d[_0x113f('0x1a')]['attributes']||null:null,'limit':_0x50678d[_0x113f('0x1a')]?_0x50678d[_0x113f('0x1a')]['limit']||null:null,'include':_0x50678d[_0x113f('0x1a')]?_0x50678d['options'][_0x113f('0x1d')]?_[_0x113f('0x1e')](_0x50678d['options'][_0x113f('0x1d')],function(_0x128ba7){return{'model':db[_0x128ba7[_0x113f('0x1f')]],'as':_0x128ba7['as'],'attributes':_0x128ba7[_0x113f('0x20')],'include':_0x128ba7[_0x113f('0x1d')]?_['map'](_0x128ba7[_0x113f('0x1d')],function(_0x5a0a62){return{'model':db[_0x5a0a62[_0x113f('0x1f')]],'as':_0x5a0a62['as'],'attributes':_0x5a0a62[_0x113f('0x20')],'include':_0x5a0a62['include']?_[_0x113f('0x1e')](_0x5a0a62[_0x113f('0x1d')],function(_0x1122cc){return{'model':db[_0x1122cc[_0x113f('0x1f')]],'as':_0x1122cc['as'],'attributes':_0x1122cc['attributes']};}):[]};}):[]};}):[]:[]})[_0x113f('0xd')](function(_0x35e840){logger['info']('GetZendeskAccount',_0x50678d);logger[_0x113f('0x21')](_0x113f('0x17'),_0x50678d,JSON[_0x113f('0x12')](_0x35e840));_0x1863ef(_0x35e840);})['catch'](function(_0xaad28c){logger['error'](_0x113f('0x17'),_0xaad28c['message'],_0x50678d);_0x25ac31(_0x163859['error'](0x1f4,_0xaad28c[_0x113f('0x15')]));});});};exports['ShowZendeskAccount']=function(_0x33f754){var _0x5361a6=this;return new Promise(function(_0x1b1ab9,_0x360220){return db[_0x113f('0x18')][_0x113f('0x22')]({'raw':_0x33f754[_0x113f('0x1a')]?_0x33f754[_0x113f('0x1a')][_0x113f('0x1b')]===undefined?!![]:![]:!![],'where':_0x33f754['options']?_0x33f754[_0x113f('0x1a')][_0x113f('0x1c')]||null:null,'attributes':_0x33f754[_0x113f('0x1a')]?_0x33f754['options'][_0x113f('0x20')]||null:null,'include':_0x33f754[_0x113f('0x1a')]?_0x33f754[_0x113f('0x1a')][_0x113f('0x1d')]?_['map'](_0x33f754[_0x113f('0x1a')][_0x113f('0x1d')],function(_0x59dd3d){return{'model':db[_0x59dd3d[_0x113f('0x1f')]],'as':_0x59dd3d['as'],'attributes':_0x59dd3d['attributes'],'include':_0x59dd3d[_0x113f('0x1d')]?_[_0x113f('0x1e')](_0x59dd3d[_0x113f('0x1d')],function(_0x6010c4){return{'model':db[_0x6010c4[_0x113f('0x1f')]],'as':_0x6010c4['as'],'attributes':_0x6010c4[_0x113f('0x20')],'include':_0x6010c4[_0x113f('0x1d')]?_['map'](_0x6010c4[_0x113f('0x1d')],function(_0x490fef){return{'model':db[_0x490fef['model']],'as':_0x490fef['as'],'attributes':_0x490fef[_0x113f('0x20')]};}):[]};}):[]};}):[]:[]})[_0x113f('0xd')](function(_0x32247d){logger[_0x113f('0xe')](_0x113f('0x23'),_0x33f754);logger[_0x113f('0x21')](_0x113f('0x23'),_0x33f754,JSON[_0x113f('0x12')](_0x32247d));_0x1b1ab9(_0x32247d);})[_0x113f('0x16')](function(_0x2ba687){logger[_0x113f('0x14')](_0x113f('0x23'),_0x2ba687[_0x113f('0x15')],_0x33f754);_0x360220(_0x5361a6[_0x113f('0x14')](0x1f4,_0x2ba687[_0x113f('0x15')]));});});};
\ No newline at end of file