Built motion from commit f738f9592c388b9f9eb3948f400a5c9d717a3561. Version 3.0.0...
[motion-next.git] / server / api / intFreshdeskAccount / intFreshdeskAccount.rpc.js
1 const a307_0x5b01=['error','stringify','model','options','include','GetFreshdeskAccount','rpc','map','where','catch','limit','findOne','attributes','FreshdeskAccount','../../config/logger','raw','message','debug','then','ShowFreshdeskAccount','info'];(function(_0x42eddf,_0x3d25b0){const _0x5b0184=function(_0x56d75d){while(--_0x56d75d){_0x42eddf['push'](_0x42eddf['shift']());}};_0x5b0184(++_0x3d25b0);}(a307_0x5b01,0xa2));const a307_0x56d7=function(_0x42eddf,_0x3d25b0){_0x42eddf=_0x42eddf-0x1a6;let _0x5b0184=a307_0x5b01[_0x42eddf];return _0x5b0184;};const a307_0xbc8723=a307_0x56d7;'use strict';const _=require('lodash'),db=require('../../mysqldb')['db'],logger=require(a307_0xbc8723(0x1ba))(a307_0xbc8723(0x1b2));exports[a307_0xbc8723(0x1b1)]=function(_0x30b4f9){const _0x393cf8=this;return new Promise(function(_0x472168,_0x48d102){const _0x322c63=a307_0x56d7;return db[_0x322c63(0x1b9)]['findAll']({'raw':_0x30b4f9[_0x322c63(0x1af)]?_0x30b4f9[_0x322c63(0x1af)]['raw']===undefined?!![]:![]:!![],'where':_0x30b4f9[_0x322c63(0x1af)]?_0x30b4f9['options'][_0x322c63(0x1b4)]||null:null,'attributes':_0x30b4f9[_0x322c63(0x1af)]?_0x30b4f9[_0x322c63(0x1af)][_0x322c63(0x1b8)]||null:null,'limit':_0x30b4f9['options']?_0x30b4f9['options'][_0x322c63(0x1b6)]||null:null,'include':_0x30b4f9[_0x322c63(0x1af)]?_0x30b4f9[_0x322c63(0x1af)][_0x322c63(0x1b0)]?_['map'](_0x30b4f9[_0x322c63(0x1af)][_0x322c63(0x1b0)],function(_0x2d113e){const _0x716a7a=_0x322c63;return{'model':db[_0x2d113e[_0x716a7a(0x1ae)]],'as':_0x2d113e['as'],'attributes':_0x2d113e[_0x716a7a(0x1b8)],'include':_0x2d113e['include']?_['map'](_0x2d113e[_0x716a7a(0x1b0)],function(_0xcd5f47){const _0x29242e=_0x716a7a;return{'model':db[_0xcd5f47[_0x29242e(0x1ae)]],'as':_0xcd5f47['as'],'attributes':_0xcd5f47[_0x29242e(0x1b8)],'include':_0xcd5f47[_0x29242e(0x1b0)]?_[_0x29242e(0x1b3)](_0xcd5f47[_0x29242e(0x1b0)],function(_0x32858c){const _0x7df8ea=_0x29242e;return{'model':db[_0x32858c[_0x7df8ea(0x1ae)]],'as':_0x32858c['as'],'attributes':_0x32858c[_0x7df8ea(0x1b8)]};}):[]};}):[]};}):[]:[]})[_0x322c63(0x1a9)](function(_0x302ce9){const _0x4f5de6=_0x322c63;logger['info'](_0x4f5de6(0x1b1),_0x30b4f9),logger[_0x4f5de6(0x1a8)]('GetFreshdeskAccount',_0x30b4f9,JSON['stringify'](_0x302ce9)),_0x472168(_0x302ce9);})[_0x322c63(0x1b5)](function(_0x4fe098){const _0x56cd31=_0x322c63;logger[_0x56cd31(0x1ac)](_0x56cd31(0x1b1),_0x4fe098['message'],_0x30b4f9),_0x48d102(_0x393cf8[_0x56cd31(0x1ac)](0x1f4,_0x4fe098[_0x56cd31(0x1a7)]));});});},exports[a307_0xbc8723(0x1aa)]=function(_0x32aeea){const _0x23a458=this;return new Promise(function(_0x59a3d4,_0x240496){const _0x505764=a307_0x56d7;return db[_0x505764(0x1b9)][_0x505764(0x1b7)]({'raw':_0x32aeea['options']?_0x32aeea[_0x505764(0x1af)][_0x505764(0x1a6)]===undefined?!![]:![]:!![],'where':_0x32aeea[_0x505764(0x1af)]?_0x32aeea[_0x505764(0x1af)]['where']||null:null,'attributes':_0x32aeea[_0x505764(0x1af)]?_0x32aeea[_0x505764(0x1af)][_0x505764(0x1b8)]||null:null,'include':_0x32aeea[_0x505764(0x1af)]?_0x32aeea['options'][_0x505764(0x1b0)]?_[_0x505764(0x1b3)](_0x32aeea['options'][_0x505764(0x1b0)],function(_0x28f3fc){const _0x3348ec=_0x505764;return{'model':db[_0x28f3fc[_0x3348ec(0x1ae)]],'as':_0x28f3fc['as'],'attributes':_0x28f3fc[_0x3348ec(0x1b8)],'include':_0x28f3fc['include']?_[_0x3348ec(0x1b3)](_0x28f3fc[_0x3348ec(0x1b0)],function(_0x3d8209){const _0x106284=_0x3348ec;return{'model':db[_0x3d8209[_0x106284(0x1ae)]],'as':_0x3d8209['as'],'attributes':_0x3d8209[_0x106284(0x1b8)],'include':_0x3d8209[_0x106284(0x1b0)]?_['map'](_0x3d8209[_0x106284(0x1b0)],function(_0x1e73c4){const _0x47141f=_0x106284;return{'model':db[_0x1e73c4[_0x47141f(0x1ae)]],'as':_0x1e73c4['as'],'attributes':_0x1e73c4[_0x47141f(0x1b8)]};}):[]};}):[]};}):[]:[]})[_0x505764(0x1a9)](function(_0x3cb512){const _0x2dc043=_0x505764;logger[_0x2dc043(0x1ab)](_0x2dc043(0x1aa),_0x32aeea),logger[_0x2dc043(0x1a8)](_0x2dc043(0x1aa),_0x32aeea,JSON[_0x2dc043(0x1ad)](_0x3cb512)),_0x59a3d4(_0x3cb512);})[_0x505764(0x1b5)](function(_0x10caa7){const _0x139e4f=_0x505764;logger[_0x139e4f(0x1ac)](_0x139e4f(0x1aa),_0x10caa7[_0x139e4f(0x1a7)],_0x32aeea),_0x240496(_0x23a458[_0x139e4f(0x1ac)](0x1f4,_0x10caa7['message']));});});};