Built motion from commit 67e5df37.|2.0.58
[motion2.git] / server / api / intSugarcrmAccount / intSugarcrmAccount.rpc.js
1 var _0x2b2c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x53\x68\x6F\x77\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x66\x69\x6E\x64"];_0x2b2c[0];var _=require(_0x2b2c[1]);var util=require(_0x2b2c[2]);var moment=require(_0x2b2c[3]);var BPromise=require(_0x2b2c[4]);var rs=require(_0x2b2c[5]);var fs=require(_0x2b2c[6]);var db=require(_0x2b2c[8])[_0x2b2c[7]];var utils=require(_0x2b2c[9]);var logger=require(_0x2b2c[11])(_0x2b2c[10]);var config=require(_0x2b2c[12]);var jayson=require(_0x2b2c[13]);var client=jayson[_0x2b2c[15]][_0x2b2c[14]]({port:9002});function respondWithRpcPromise(_0xf803xe,_0xf803xf,_0xf803x10){return  new BPromise(function(_0xf803x11,_0xf803x12){return client[_0x2b2c[28]](_0xf803xe,_0xf803x10)[_0x2b2c[27]](function(_0xf803x14){logger[_0x2b2c[20]](_0x2b2c[16],_0xf803xf,_0x2b2c[19]);logger[_0x2b2c[23]](_0x2b2c[21],_0xf803xf,_0x2b2c[19],JSON[_0x2b2c[22]](_0xf803x14));if(_0xf803x14[_0x2b2c[17]]){if(_0xf803x14[_0x2b2c[17]][_0x2b2c[24]]=== 500){logger[_0x2b2c[17]](_0x2b2c[16],_0xf803xf,_0xf803x14[_0x2b2c[17]][_0x2b2c[25]]);return _0xf803x12(_0xf803x14[_0x2b2c[17]][_0x2b2c[25]])};logger[_0x2b2c[17]](_0x2b2c[16],_0xf803xf,_0xf803x14[_0x2b2c[17]][_0x2b2c[25]]);return _0xf803x11(_0xf803x14[_0x2b2c[17]][_0x2b2c[25]])}else {logger[_0x2b2c[20]](_0x2b2c[16],_0xf803xf,_0x2b2c[19]);_0xf803x11(_0xf803x14[_0x2b2c[26]][_0x2b2c[25]])}})[_0x2b2c[18]](function(_0xf803x13){logger[_0x2b2c[17]](_0x2b2c[16],_0xf803xf,_0xf803x13);_0xf803x12(_0xf803x13)})})}exports[_0x2b2c[29]]= function(_0xf803x10){var _0xf803x15=this;return  new Promise(function(_0xf803x11,_0xf803x12){return db[_0x2b2c[40]][_0x2b2c[39]]({raw:_0xf803x10[_0x2b2c[30]]?(_0xf803x10[_0x2b2c[30]][_0x2b2c[31]]=== undefined)?true:false:true,where:_0xf803x10[_0x2b2c[30]]?_0xf803x10[_0x2b2c[30]][_0x2b2c[32]]|| null:null,attributes:_0xf803x10[_0x2b2c[30]]?_0xf803x10[_0x2b2c[30]][_0x2b2c[33]]|| null:null,limit:_0xf803x10[_0x2b2c[30]]?_0xf803x10[_0x2b2c[30]][_0x2b2c[34]]|| null:null,include:_0xf803x10[_0x2b2c[30]]?(_0xf803x10[_0x2b2c[30]][_0x2b2c[35]]?_[_0x2b2c[38]](_0xf803x10[_0x2b2c[30]][_0x2b2c[35]],function(_0xf803x16){return {model:db[_0xf803x16[_0x2b2c[36]]],as:_0xf803x16[_0x2b2c[37]],attributes:_0xf803x16[_0x2b2c[33]],include:_0xf803x16[_0x2b2c[35]]?_[_0x2b2c[38]](_0xf803x16[_0x2b2c[35]],function(_0xf803x17){return {model:db[_0xf803x17[_0x2b2c[36]]],as:_0xf803x17[_0x2b2c[37]],attributes:_0xf803x17[_0x2b2c[33]],include:_0xf803x17[_0x2b2c[35]]?_[_0x2b2c[38]](_0xf803x17[_0x2b2c[35]],function(_0xf803x18){return {model:db[_0xf803x18[_0x2b2c[36]]],as:_0xf803x18[_0x2b2c[37]],attributes:_0xf803x18[_0x2b2c[33]]}}):[]}}):[]}}):[]):[]})[_0x2b2c[27]](function(_0xf803x14){logger[_0x2b2c[20]](_0x2b2c[29],_0xf803x10);logger[_0x2b2c[23]](_0x2b2c[29],_0xf803x10,JSON[_0x2b2c[22]](_0xf803x14));_0xf803x11(_0xf803x14)})[_0x2b2c[18]](function(_0xf803x13){logger[_0x2b2c[17]](_0x2b2c[29],_0xf803x13[_0x2b2c[25]],_0xf803x10);_0xf803x12(_0xf803x15[_0x2b2c[17]](500,_0xf803x13[_0x2b2c[25]]))})})};exports[_0x2b2c[41]]= function(_0xf803x10){var _0xf803x15=this;return  new Promise(function(_0xf803x11,_0xf803x12){return db[_0x2b2c[40]][_0x2b2c[42]]({raw:_0xf803x10[_0x2b2c[30]]?(_0xf803x10[_0x2b2c[30]][_0x2b2c[31]]=== undefined)?true:false:true,where:_0xf803x10[_0x2b2c[30]]?_0xf803x10[_0x2b2c[30]][_0x2b2c[32]]|| null:null,attributes:_0xf803x10[_0x2b2c[30]]?_0xf803x10[_0x2b2c[30]][_0x2b2c[33]]|| null:null,include:_0xf803x10[_0x2b2c[30]]?(_0xf803x10[_0x2b2c[30]][_0x2b2c[35]]?_[_0x2b2c[38]](_0xf803x10[_0x2b2c[30]][_0x2b2c[35]],function(_0xf803x16){return {model:db[_0xf803x16[_0x2b2c[36]]],as:_0xf803x16[_0x2b2c[37]],attributes:_0xf803x16[_0x2b2c[33]],include:_0xf803x16[_0x2b2c[35]]?_[_0x2b2c[38]](_0xf803x16[_0x2b2c[35]],function(_0xf803x17){return {model:db[_0xf803x17[_0x2b2c[36]]],as:_0xf803x17[_0x2b2c[37]],attributes:_0xf803x17[_0x2b2c[33]],include:_0xf803x17[_0x2b2c[35]]?_[_0x2b2c[38]](_0xf803x17[_0x2b2c[35]],function(_0xf803x18){return {model:db[_0xf803x18[_0x2b2c[36]]],as:_0xf803x18[_0x2b2c[37]],attributes:_0xf803x18[_0x2b2c[33]]}}):[]}}):[]}}):[]):[]})[_0x2b2c[27]](function(_0xf803x14){logger[_0x2b2c[20]](_0x2b2c[41],_0xf803x10);logger[_0x2b2c[23]](_0x2b2c[41],_0xf803x10,JSON[_0x2b2c[22]](_0xf803x14));_0xf803x11(_0xf803x14)})[_0x2b2c[18]](function(_0xf803x13){logger[_0x2b2c[17]](_0x2b2c[41],_0xf803x13[_0x2b2c[25]],_0xf803x10);_0xf803x12(_0xf803x15[_0x2b2c[17]](500,_0xf803x13[_0x2b2c[25]]))})})}