Built motion from commit 973e3e332e1c8e2f84c4b0cd2e5af794131724f5. Version 3.0.0...
[motion-next.git] / server / api / intSalesforceConfiguration / intSalesforceConfiguration.controller.js
index 0d114c0..5f9ff98 100644 (file)
@@ -1 +1 @@
-const a286_0x53db=['status','sort','../../components/parsers/qs','pick','type','include','update','like','sequelize','order','key','findAll','SalesforceField','nolimit','api','length','destroy','name','body','offset','intersection','catch','rawAttributes','filter','json','undefined','then','fields','../../config/logger','attributes','lodash','limit','filters','where','query','getFields','keys','getSubjects','../../mysqldb','includeAll','count','end','merge','SalesforceConfiguration','map','create','options','getDescriptions','fieldName','params','index','sendStatus','model','findOne','rows'];(function(_0x101df9,_0x53dbca){const _0x29ddd9=function(_0x41755e){while(--_0x41755e){_0x101df9['push'](_0x101df9['shift']());}};_0x29ddd9(++_0x53dbca);}(a286_0x53db,0x1cb));const a286_0x29dd=function(_0x101df9,_0x53dbca){_0x101df9=_0x101df9-0x0;let _0x29ddd9=a286_0x53db[_0x101df9];return _0x29ddd9;};const _0x11888f=a286_0x29dd;'use strict';const _=require(_0x11888f('0xb')),qs=require(_0x11888f('0x26')),logger=require(_0x11888f('0x9'))(_0x11888f('0x32')),db=require(_0x11888f('0x13'))['db'],{Op}=require(_0x11888f('0x2c'));function respondWithResult(_0x41755e,_0x38ebaa){return _0x38ebaa=_0x38ebaa||0xc8,function(_0x268e9d){const _0x348435=a286_0x29dd;if(_0x268e9d)return _0x41755e['status'](_0x38ebaa)[_0x348435('0x5')](_0x268e9d);};}function respondWithFilteredResult(_0x184c52,_0x410107){return function(_0x1062a7){const _0x3389f2=a286_0x29dd;if(_0x1062a7){const _0x50ac03=_0x1062a7['count'],_0x23a010=_0x410107[_0x3389f2('0x0')];let _0xf3e3b6=_0x410107[_0x3389f2('0x0')]+_0x410107[_0x3389f2('0xc')],_0x57e1a0;return _0xf3e3b6>=_0x50ac03?(_0xf3e3b6=_0x50ac03,_0x57e1a0=0xc8):_0x57e1a0=0xce,_0x184c52[_0x3389f2('0x24')](_0x57e1a0),_0x184c52['set']('Content-Range',_0x23a010+'-'+_0xf3e3b6+'/'+_0x50ac03)[_0x3389f2('0x5')](_0x1062a7);}return null;};}function saveUpdates(_0x107632){return function(_0x2f6e95){const _0x3919b9=a286_0x29dd;if(_0x2f6e95)return _0x2f6e95[_0x3919b9('0x2a')](_0x107632)[_0x3919b9('0x7')](function(_0x30d350){return _0x30d350;});return null;};}function removeEntity(_0x575b13){return function(_0x3cea46){const _0x3f5b0d=a286_0x29dd;if(_0x3cea46)return _0x3cea46[_0x3f5b0d('0x34')]()[_0x3f5b0d('0x7')](function(){const _0x42b168=_0x3f5b0d;_0x575b13[_0x42b168('0x24')](0xcc)[_0x42b168('0x16')]();});};}function handleEntityNotFound(_0x46ff74){return function(_0x24c5dc){const _0x2febfc=a286_0x29dd;return!_0x24c5dc&&_0x46ff74[_0x2febfc('0x20')](0x194),_0x24c5dc;};}function handleError(_0x1a1581,_0x50ba25){return _0x50ba25=_0x50ba25||0x1f4,function(_0x4eaf14){const _0xb18bb8=a286_0x29dd;logger['error'](_0x4eaf14['stack']),_0x4eaf14[_0xb18bb8('0x35')]&&delete _0x4eaf14[_0xb18bb8('0x35')],_0x1a1581['status'](_0x50ba25)['send'](_0x4eaf14);};}exports[_0x11888f('0x1f')]=function(_0x4d7dcf,_0x19fdd6){const _0x4a0995=_0x11888f;let _0x5a7d0a={};const _0x4126b1={},_0x33ca00={'count':0x0,'rows':[]},_0x3361e2=_[_0x4a0995('0x19')](db[_0x4a0995('0x18')][_0x4a0995('0x3')],function(_0x2e6e77){const _0x1c9bd0=_0x4a0995;return{'name':_0x2e6e77[_0x1c9bd0('0x1d')],'type':_0x2e6e77[_0x1c9bd0('0x28')][_0x1c9bd0('0x2e')]};});_0x4126b1[_0x4a0995('0x21')]=_['map'](_0x3361e2,_0x4a0995('0x35')),_0x4126b1[_0x4a0995('0xf')]=_[_0x4a0995('0x11')](_0x4d7dcf[_0x4a0995('0xf')]),_0x4126b1[_0x4a0995('0xd')]=_[_0x4a0995('0x1')](_0x4126b1[_0x4a0995('0x21')],_0x4126b1[_0x4a0995('0xf')]),_0x5a7d0a[_0x4a0995('0xa')]=_[_0x4a0995('0x1')](_0x4126b1['model'],qs[_0x4a0995('0x8')](_0x4d7dcf['query'][_0x4a0995('0x8')])),_0x5a7d0a[_0x4a0995('0xa')]=_0x5a7d0a[_0x4a0995('0xa')]['length']?_0x5a7d0a[_0x4a0995('0xa')]:_0x4126b1[_0x4a0995('0x21')];typeof _0x4d7dcf['query']['nolimit']==='undefined'&&(_0x5a7d0a['limit']=qs[_0x4a0995('0xc')](_0x4d7dcf[_0x4a0995('0xf')][_0x4a0995('0xc')]),_0x5a7d0a[_0x4a0995('0x0')]=qs[_0x4a0995('0x0')](_0x4d7dcf[_0x4a0995('0xf')][_0x4a0995('0x0')]));_0x5a7d0a[_0x4a0995('0x2d')]=qs['sort'](_0x4d7dcf[_0x4a0995('0xf')][_0x4a0995('0x25')]),_0x5a7d0a['where']=qs[_0x4a0995('0xd')](_[_0x4a0995('0x27')](_0x4d7dcf[_0x4a0995('0xf')],_0x4126b1[_0x4a0995('0xd')]),_0x3361e2);_0x4d7dcf[_0x4a0995('0xf')]['filter']&&(_0x5a7d0a['where']=_['merge'](_0x5a7d0a[_0x4a0995('0xe')],{[Op['or']]:_[_0x4a0995('0x19')](_0x3361e2,function(_0xd352ff){const _0xb156cd=_0x4a0995;if(_0xd352ff[_0xb156cd('0x28')]!=='VIRTUAL'){const _0x2405c9={};return _0x2405c9[_0xd352ff[_0xb156cd('0x35')]]={[Op[_0xb156cd('0x2b')]]:'%'+_0x4d7dcf[_0xb156cd('0xf')][_0xb156cd('0x4')]+'%'},_0x2405c9;}})}));_0x5a7d0a=_['merge']({},_0x5a7d0a,_0x4d7dcf[_0x4a0995('0x1b')]);const _0x60da8b={'where':_0x5a7d0a[_0x4a0995('0xe')]};return db['SalesforceConfiguration'][_0x4a0995('0x15')](_0x60da8b)[_0x4a0995('0x7')](function(_0x3a823d){const _0x54e9b1=_0x4a0995;return _0x33ca00[_0x54e9b1('0x15')]=_0x3a823d,_0x4d7dcf[_0x54e9b1('0xf')][_0x54e9b1('0x14')]&&(_0x5a7d0a[_0x54e9b1('0x29')]=[{'all':!![]}]),db[_0x54e9b1('0x18')][_0x54e9b1('0x2f')](_0x5a7d0a);})['then'](function(_0x24b86c){const _0x34e9af=_0x4a0995;return _0x33ca00[_0x34e9af('0x23')]=_0x24b86c,_0x33ca00;})['then'](respondWithFilteredResult(_0x19fdd6,_0x5a7d0a))['catch'](handleError(_0x19fdd6,null));},exports['show']=function(_0x143e26,_0x17ee6b){const _0x3edb71=_0x11888f;let _0xf3140d={'raw':![],'where':{'id':_0x143e26[_0x3edb71('0x1e')]['id']}};const _0x59fb8d={};return _0x59fb8d['model']=_[_0x3edb71('0x11')](db[_0x3edb71('0x18')][_0x3edb71('0x3')]),_0x59fb8d[_0x3edb71('0xf')]=_[_0x3edb71('0x11')](_0x143e26[_0x3edb71('0xf')]),_0x59fb8d[_0x3edb71('0xd')]=_['intersection'](_0x59fb8d[_0x3edb71('0x21')],_0x59fb8d[_0x3edb71('0xf')]),_0xf3140d[_0x3edb71('0xa')]=_[_0x3edb71('0x1')](_0x59fb8d[_0x3edb71('0x21')],qs[_0x3edb71('0x8')](_0x143e26[_0x3edb71('0xf')][_0x3edb71('0x8')])),_0xf3140d[_0x3edb71('0xa')]=_0xf3140d['attributes'][_0x3edb71('0x33')]?_0xf3140d[_0x3edb71('0xa')]:_0x59fb8d[_0x3edb71('0x21')],_0x143e26['query']['includeAll']&&(_0xf3140d['include']=[{'all':!![]}]),_0xf3140d=_[_0x3edb71('0x17')]({},_0xf3140d,_0x143e26[_0x3edb71('0x1b')]),db[_0x3edb71('0x18')][_0x3edb71('0x22')](_0xf3140d)[_0x3edb71('0x7')](handleEntityNotFound(_0x17ee6b,null))['then'](respondWithResult(_0x17ee6b,null))[_0x3edb71('0x2')](handleError(_0x17ee6b,null));},exports['create']=function(_0x3e8ea8,_0x368e69){const _0x27ca2b=_0x11888f;return db[_0x27ca2b('0x18')][_0x27ca2b('0x1a')](_0x3e8ea8[_0x27ca2b('0x36')],{})['then'](respondWithResult(_0x368e69,0xc9))[_0x27ca2b('0x2')](handleError(_0x368e69,null));},exports[_0x11888f('0x2a')]=function(_0x594dcd,_0xd03c05){const _0x119b04=_0x11888f;return _0x594dcd[_0x119b04('0x36')]['id']&&delete _0x594dcd[_0x119b04('0x36')]['id'],db[_0x119b04('0x18')]['findOne']({'where':{'id':_0x594dcd[_0x119b04('0x1e')]['id']}})['then'](handleEntityNotFound(_0xd03c05,null))['then'](saveUpdates(_0x594dcd[_0x119b04('0x36')],null))[_0x119b04('0x7')](respondWithResult(_0xd03c05,null))[_0x119b04('0x2')](handleError(_0xd03c05,null));},exports[_0x11888f('0x34')]=function(_0x378530,_0xecdc8c){const _0x1a1793=_0x11888f;return db[_0x1a1793('0x18')][_0x1a1793('0x22')]({'where':{'id':_0x378530['params']['id']}})[_0x1a1793('0x7')](handleEntityNotFound(_0xecdc8c,null))[_0x1a1793('0x7')](removeEntity(_0xecdc8c,null))[_0x1a1793('0x2')](handleError(_0xecdc8c,null));},exports[_0x11888f('0x10')]=function(_0x19923e,_0x5bba86){const _0x33a6af=_0x11888f;let _0x4728d2={};const _0x41bd02={};let _0x37166d,_0x241c34;return db[_0x33a6af('0x18')][_0x33a6af('0x22')]({'where':{'id':_0x19923e[_0x33a6af('0x1e')]['id']}})[_0x33a6af('0x7')](handleEntityNotFound(_0x5bba86,null))[_0x33a6af('0x7')](function(_0x4da0e7){const _0x52c691=_0x33a6af;if(_0x4da0e7)return _0x37166d=_0x4da0e7,_0x41bd02[_0x52c691('0x21')]=_[_0x52c691('0x11')](db[_0x52c691('0x30')][_0x52c691('0x3')]),_0x41bd02['query']=_['keys'](_0x19923e[_0x52c691('0xf')]),_0x41bd02[_0x52c691('0xd')]=_['intersection'](_0x41bd02['model'],_0x41bd02['query']),_0x4728d2[_0x52c691('0xa')]=_[_0x52c691('0x1')](_0x41bd02[_0x52c691('0x21')],qs[_0x52c691('0x8')](_0x19923e[_0x52c691('0xf')][_0x52c691('0x8')])),_0x4728d2[_0x52c691('0xa')]=_0x4728d2['attributes'][_0x52c691('0x33')]?_0x4728d2['attributes']:_0x41bd02[_0x52c691('0x21')],_0x4728d2['order']=qs[_0x52c691('0x25')](_0x19923e[_0x52c691('0xf')][_0x52c691('0x25')]),_0x4728d2[_0x52c691('0xe')]=qs[_0x52c691('0xd')](_['pick'](_0x19923e[_0x52c691('0xf')],_0x41bd02['filters'])),_0x19923e[_0x52c691('0xf')][_0x52c691('0x4')]&&(_0x4728d2[_0x52c691('0xe')]=_[_0x52c691('0x17')](_0x4728d2['where'],{[Op['or']]:_[_0x52c691('0x19')](_0x4728d2[_0x52c691('0xa')],function(_0x24685d){const _0x4d3cf3=_0x52c691,_0x5c34e3={};return _0x5c34e3[_0x24685d]={[Op[_0x4d3cf3('0x2b')]]:'%'+_0x19923e[_0x4d3cf3('0xf')][_0x4d3cf3('0x4')]+'%'},_0x5c34e3;})})),_0x4728d2=_[_0x52c691('0x17')]({},_0x4728d2,_0x19923e['options']),_0x37166d['getFields'](_0x4728d2);})[_0x33a6af('0x7')](function(_0x5af75c){const _0x2d4f8a=_0x33a6af;if(_0x5af75c)return _0x241c34=_0x5af75c[_0x2d4f8a('0x33')],typeof _0x19923e[_0x2d4f8a('0xf')]['nolimit']===_0x2d4f8a('0x6')&&(_0x4728d2['limit']=qs['limit'](_0x19923e[_0x2d4f8a('0xf')][_0x2d4f8a('0xc')]),_0x4728d2[_0x2d4f8a('0x0')]=qs['offset'](_0x19923e['query']['offset'])),_0x37166d[_0x2d4f8a('0x10')](_0x4728d2);})[_0x33a6af('0x7')](function(_0x24bb86){if(_0x24bb86)return _0x24bb86?{'count':_0x241c34,'rows':_0x24bb86}:null;})[_0x33a6af('0x7')](respondWithResult(_0x5bba86,null))[_0x33a6af('0x2')](handleError(_0x5bba86,null));},exports['getSubjects']=function(_0x1d52c1,_0x270bc2){const _0xb3dee3=_0x11888f;let _0x2fe6d1={};const _0x369a53={};let _0x574b0d,_0x30bdc6;return db[_0xb3dee3('0x18')]['findOne']({'where':{'id':_0x1d52c1[_0xb3dee3('0x1e')]['id']}})[_0xb3dee3('0x7')](handleEntityNotFound(_0x270bc2,null))[_0xb3dee3('0x7')](function(_0x3d8b14){const _0x2e44d9=_0xb3dee3;if(_0x3d8b14)return _0x574b0d=_0x3d8b14,_0x369a53[_0x2e44d9('0x21')]=_[_0x2e44d9('0x11')](db[_0x2e44d9('0x30')][_0x2e44d9('0x3')]),_0x369a53[_0x2e44d9('0xf')]=_[_0x2e44d9('0x11')](_0x1d52c1['query']),_0x369a53[_0x2e44d9('0xd')]=_['intersection'](_0x369a53[_0x2e44d9('0x21')],_0x369a53[_0x2e44d9('0xf')]),_0x2fe6d1[_0x2e44d9('0xa')]=_[_0x2e44d9('0x1')](_0x369a53['model'],qs['fields'](_0x1d52c1[_0x2e44d9('0xf')][_0x2e44d9('0x8')])),_0x2fe6d1[_0x2e44d9('0xa')]=_0x2fe6d1[_0x2e44d9('0xa')][_0x2e44d9('0x33')]?_0x2fe6d1[_0x2e44d9('0xa')]:_0x369a53[_0x2e44d9('0x21')],_0x2fe6d1['order']=qs[_0x2e44d9('0x25')](_0x1d52c1[_0x2e44d9('0xf')]['sort']),_0x2fe6d1[_0x2e44d9('0xe')]=qs[_0x2e44d9('0xd')](_[_0x2e44d9('0x27')](_0x1d52c1[_0x2e44d9('0xf')],_0x369a53['filters'])),_0x1d52c1[_0x2e44d9('0xf')]['filter']&&(_0x2fe6d1[_0x2e44d9('0xe')]=_[_0x2e44d9('0x17')](_0x2fe6d1[_0x2e44d9('0xe')],{[Op['or']]:_[_0x2e44d9('0x19')](_0x2fe6d1[_0x2e44d9('0xa')],function(_0x30d27c){const _0x25cd4a=_0x2e44d9,_0x53cfef={};return _0x53cfef[_0x30d27c]={[Op[_0x25cd4a('0x2b')]]:'%'+_0x1d52c1[_0x25cd4a('0xf')][_0x25cd4a('0x4')]+'%'},_0x53cfef;})})),_0x2fe6d1=_['merge']({},_0x2fe6d1,_0x1d52c1[_0x2e44d9('0x1b')]),_0x574b0d['getSubjects'](_0x2fe6d1);})['then'](function(_0x54c4df){const _0xa1dacf=_0xb3dee3;if(_0x54c4df)return _0x30bdc6=_0x54c4df[_0xa1dacf('0x33')],typeof _0x1d52c1[_0xa1dacf('0xf')][_0xa1dacf('0x31')]==='undefined'&&(_0x2fe6d1['limit']=qs['limit'](_0x1d52c1[_0xa1dacf('0xf')][_0xa1dacf('0xc')]),_0x2fe6d1['offset']=qs['offset'](_0x1d52c1['query']['offset'])),_0x574b0d[_0xa1dacf('0x12')](_0x2fe6d1);})[_0xb3dee3('0x7')](function(_0x1e13a2){if(_0x1e13a2)return _0x1e13a2?{'count':_0x30bdc6,'rows':_0x1e13a2}:null;})[_0xb3dee3('0x7')](respondWithResult(_0x270bc2,null))[_0xb3dee3('0x2')](handleError(_0x270bc2,null));},exports[_0x11888f('0x1c')]=function(_0x13302f,_0x27a110){const _0x141d1c=_0x11888f;let _0xc8860c={};const _0x494347={};let _0x1ba968,_0x302e76;return db[_0x141d1c('0x18')][_0x141d1c('0x22')]({'where':{'id':_0x13302f[_0x141d1c('0x1e')]['id']}})[_0x141d1c('0x7')](handleEntityNotFound(_0x27a110,null))[_0x141d1c('0x7')](function(_0x1f0799){const _0x5a497a=_0x141d1c;if(_0x1f0799)return _0x1ba968=_0x1f0799,_0x494347[_0x5a497a('0x21')]=_[_0x5a497a('0x11')](db['SalesforceField'][_0x5a497a('0x3')]),_0x494347[_0x5a497a('0xf')]=_[_0x5a497a('0x11')](_0x13302f[_0x5a497a('0xf')]),_0x494347[_0x5a497a('0xd')]=_[_0x5a497a('0x1')](_0x494347['model'],_0x494347[_0x5a497a('0xf')]),_0xc8860c[_0x5a497a('0xa')]=_[_0x5a497a('0x1')](_0x494347['model'],qs[_0x5a497a('0x8')](_0x13302f[_0x5a497a('0xf')]['fields'])),_0xc8860c[_0x5a497a('0xa')]=_0xc8860c[_0x5a497a('0xa')][_0x5a497a('0x33')]?_0xc8860c[_0x5a497a('0xa')]:_0x494347[_0x5a497a('0x21')],_0xc8860c[_0x5a497a('0x2d')]=qs[_0x5a497a('0x25')](_0x13302f[_0x5a497a('0xf')][_0x5a497a('0x25')]),_0xc8860c[_0x5a497a('0xe')]=qs[_0x5a497a('0xd')](_[_0x5a497a('0x27')](_0x13302f[_0x5a497a('0xf')],_0x494347[_0x5a497a('0xd')])),_0x13302f['query'][_0x5a497a('0x4')]&&(_0xc8860c['where']=_['merge'](_0xc8860c[_0x5a497a('0xe')],{[Op['or']]:_[_0x5a497a('0x19')](_0xc8860c[_0x5a497a('0xa')],function(_0x446a13){const _0x4d4d9e=_0x5a497a,_0x40cce2={};return _0x40cce2[_0x446a13]={[Op[_0x4d4d9e('0x2b')]]:'%'+_0x13302f[_0x4d4d9e('0xf')][_0x4d4d9e('0x4')]+'%'},_0x40cce2;})})),_0xc8860c=_[_0x5a497a('0x17')]({},_0xc8860c,_0x13302f['options']),_0x1ba968[_0x5a497a('0x1c')](_0xc8860c);})[_0x141d1c('0x7')](function(_0x268b0b){const _0x27da97=_0x141d1c;if(_0x268b0b)return _0x302e76=_0x268b0b[_0x27da97('0x33')],typeof _0x13302f[_0x27da97('0xf')][_0x27da97('0x31')]==='undefined'&&(_0xc8860c['limit']=qs['limit'](_0x13302f[_0x27da97('0xf')][_0x27da97('0xc')]),_0xc8860c[_0x27da97('0x0')]=qs[_0x27da97('0x0')](_0x13302f['query'][_0x27da97('0x0')])),_0x1ba968[_0x27da97('0x1c')](_0xc8860c);})[_0x141d1c('0x7')](function(_0x4f2310){if(_0x4f2310)return _0x4f2310?{'count':_0x302e76,'rows':_0x4f2310}:null;})[_0x141d1c('0x7')](respondWithResult(_0x27a110,null))[_0x141d1c('0x2')](handleError(_0x27a110,null));};
\ No newline at end of file
+const a286_0x5cd7=['sort','like','SalesforceConfiguration','limit','findOne','index','options','stack','length','offset','set','name','status','getSubjects','body','create','map','model','../../components/parsers/qs','lodash','filters','fields','order','getDescriptions','type','undefined','where','pick','intersection','nolimit','attributes','fieldName','error','destroy','params','sendStatus','count','SalesforceField','then','update','../../config/logger','includeAll','rawAttributes','merge','catch','query','sequelize','api','filter','end','keys','show','getFields','VIRTUAL','Content-Range'];(function(_0x370994,_0x5cd7f1){const _0x4d0651=function(_0x2cf366){while(--_0x2cf366){_0x370994['push'](_0x370994['shift']());}};_0x4d0651(++_0x5cd7f1);}(a286_0x5cd7,0x1c6));const a286_0x4d06=function(_0x370994,_0x5cd7f1){_0x370994=_0x370994-0x0;let _0x4d0651=a286_0x5cd7[_0x370994];return _0x4d0651;};const _0xe1cc26=a286_0x4d06;'use strict';const _=require(_0xe1cc26('0x5')),qs=require(_0xe1cc26('0x4')),logger=require(_0xe1cc26('0x1a'))(_0xe1cc26('0x21')),db=require('../../mysqldb')['db'],{Op}=require(_0xe1cc26('0x20'));function respondWithResult(_0x2cf366,_0x1732a7){return _0x1732a7=_0x1732a7||0xc8,function(_0x549c42){if(_0x549c42)return _0x2cf366['status'](_0x1732a7)['json'](_0x549c42);};}function respondWithFilteredResult(_0x5bebf4,_0x130af5){return function(_0x531d3a){const _0x25ea0a=a286_0x4d06;if(_0x531d3a){const _0x12c369=_0x531d3a[_0x25ea0a('0x16')],_0x5262e2=_0x130af5['offset'];let _0x419558=_0x130af5[_0x25ea0a('0x32')]+_0x130af5[_0x25ea0a('0x2c')],_0x2755ad;return _0x419558>=_0x12c369?(_0x419558=_0x12c369,_0x2755ad=0xc8):_0x2755ad=0xce,_0x5bebf4['status'](_0x2755ad),_0x5bebf4[_0x25ea0a('0x33')](_0x25ea0a('0x28'),_0x5262e2+'-'+_0x419558+'/'+_0x12c369)['json'](_0x531d3a);}return null;};}function saveUpdates(_0x18ee7a){return function(_0x1b419e){const _0x3eb675=a286_0x4d06;if(_0x1b419e)return _0x1b419e[_0x3eb675('0x19')](_0x18ee7a)[_0x3eb675('0x18')](function(_0xf34c2c){return _0xf34c2c;});return null;};}function removeEntity(_0x30fcce){return function(_0x478d8b){const _0x16aeb3=a286_0x4d06;if(_0x478d8b)return _0x478d8b[_0x16aeb3('0x13')]()[_0x16aeb3('0x18')](function(){const _0x477f87=_0x16aeb3;_0x30fcce['status'](0xcc)[_0x477f87('0x23')]();});};}function handleEntityNotFound(_0x1d2fd7){return function(_0x550b4a){const _0x3a2159=a286_0x4d06;return!_0x550b4a&&_0x1d2fd7[_0x3a2159('0x15')](0x194),_0x550b4a;};}function handleError(_0x19428b,_0x3454e8){return _0x3454e8=_0x3454e8||0x1f4,function(_0x98c445){const _0x36a292=a286_0x4d06;logger[_0x36a292('0x12')](_0x98c445[_0x36a292('0x30')]),_0x98c445[_0x36a292('0x34')]&&delete _0x98c445[_0x36a292('0x34')],_0x19428b[_0x36a292('0x35')](_0x3454e8)['send'](_0x98c445);};}exports[_0xe1cc26('0x2e')]=function(_0x2448e2,_0x5b6570){const _0x25a047=_0xe1cc26;let _0x1c75ce={};const _0x28ecfc={},_0x272580={'count':0x0,'rows':[]},_0x78bdda=_[_0x25a047('0x2')](db[_0x25a047('0x2b')][_0x25a047('0x1c')],function(_0x1f9e90){const _0x4f6fe7=_0x25a047;return{'name':_0x1f9e90[_0x4f6fe7('0x11')],'type':_0x1f9e90[_0x4f6fe7('0xa')]['key']};});_0x28ecfc[_0x25a047('0x3')]=_['map'](_0x78bdda,_0x25a047('0x34')),_0x28ecfc[_0x25a047('0x1f')]=_[_0x25a047('0x24')](_0x2448e2['query']),_0x28ecfc[_0x25a047('0x6')]=_[_0x25a047('0xe')](_0x28ecfc[_0x25a047('0x3')],_0x28ecfc[_0x25a047('0x1f')]),_0x1c75ce['attributes']=_[_0x25a047('0xe')](_0x28ecfc[_0x25a047('0x3')],qs['fields'](_0x2448e2[_0x25a047('0x1f')][_0x25a047('0x7')])),_0x1c75ce[_0x25a047('0x10')]=_0x1c75ce['attributes']['length']?_0x1c75ce[_0x25a047('0x10')]:_0x28ecfc['model'];typeof _0x2448e2[_0x25a047('0x1f')]['nolimit']==='undefined'&&(_0x1c75ce['limit']=qs[_0x25a047('0x2c')](_0x2448e2[_0x25a047('0x1f')][_0x25a047('0x2c')]),_0x1c75ce[_0x25a047('0x32')]=qs['offset'](_0x2448e2['query']['offset']));_0x1c75ce[_0x25a047('0x8')]=qs[_0x25a047('0x29')](_0x2448e2[_0x25a047('0x1f')]['sort']),_0x1c75ce['where']=qs[_0x25a047('0x6')](_[_0x25a047('0xd')](_0x2448e2[_0x25a047('0x1f')],_0x28ecfc[_0x25a047('0x6')]),_0x78bdda);_0x2448e2[_0x25a047('0x1f')][_0x25a047('0x22')]&&(_0x1c75ce[_0x25a047('0xc')]=_['merge'](_0x1c75ce[_0x25a047('0xc')],{[Op['or']]:_['map'](_0x78bdda,function(_0x29fd31){const _0x50216b=_0x25a047;if(_0x29fd31['type']!==_0x50216b('0x27')){const _0x3a0793={};return _0x3a0793[_0x29fd31['name']]={[Op[_0x50216b('0x2a')]]:'%'+_0x2448e2[_0x50216b('0x1f')]['filter']+'%'},_0x3a0793;}})}));_0x1c75ce=_[_0x25a047('0x1d')]({},_0x1c75ce,_0x2448e2[_0x25a047('0x2f')]);const _0x34108f={'where':_0x1c75ce[_0x25a047('0xc')]};return db[_0x25a047('0x2b')][_0x25a047('0x16')](_0x34108f)[_0x25a047('0x18')](function(_0x20309e){const _0x439f71=_0x25a047;return _0x272580[_0x439f71('0x16')]=_0x20309e,_0x2448e2[_0x439f71('0x1f')][_0x439f71('0x1b')]&&(_0x1c75ce['include']=[{'all':!![]}]),db['SalesforceConfiguration']['findAll'](_0x1c75ce);})[_0x25a047('0x18')](function(_0x47a317){return _0x272580['rows']=_0x47a317,_0x272580;})['then'](respondWithFilteredResult(_0x5b6570,_0x1c75ce))[_0x25a047('0x1e')](handleError(_0x5b6570,null));},exports[_0xe1cc26('0x25')]=function(_0x44490f,_0x55454){const _0x490054=_0xe1cc26;let _0x745d09={'raw':![],'where':{'id':_0x44490f['params']['id']}};const _0x560855={};return _0x560855[_0x490054('0x3')]=_[_0x490054('0x24')](db[_0x490054('0x2b')][_0x490054('0x1c')]),_0x560855['query']=_['keys'](_0x44490f[_0x490054('0x1f')]),_0x560855[_0x490054('0x6')]=_[_0x490054('0xe')](_0x560855['model'],_0x560855[_0x490054('0x1f')]),_0x745d09[_0x490054('0x10')]=_[_0x490054('0xe')](_0x560855['model'],qs[_0x490054('0x7')](_0x44490f['query'][_0x490054('0x7')])),_0x745d09['attributes']=_0x745d09['attributes']['length']?_0x745d09[_0x490054('0x10')]:_0x560855['model'],_0x44490f[_0x490054('0x1f')][_0x490054('0x1b')]&&(_0x745d09['include']=[{'all':!![]}]),_0x745d09=_['merge']({},_0x745d09,_0x44490f[_0x490054('0x2f')]),db['SalesforceConfiguration'][_0x490054('0x2d')](_0x745d09)[_0x490054('0x18')](handleEntityNotFound(_0x55454,null))[_0x490054('0x18')](respondWithResult(_0x55454,null))['catch'](handleError(_0x55454,null));},exports['create']=function(_0x5b5399,_0x5b98a7){const _0x5d171a=_0xe1cc26;return db[_0x5d171a('0x2b')][_0x5d171a('0x1')](_0x5b5399[_0x5d171a('0x0')],{})['then'](respondWithResult(_0x5b98a7,0xc9))[_0x5d171a('0x1e')](handleError(_0x5b98a7,null));},exports['update']=function(_0x31f0e6,_0xa91cd3){const _0x5e66b8=_0xe1cc26;return _0x31f0e6[_0x5e66b8('0x0')]['id']&&delete _0x31f0e6['body']['id'],db[_0x5e66b8('0x2b')]['findOne']({'where':{'id':_0x31f0e6['params']['id']}})[_0x5e66b8('0x18')](handleEntityNotFound(_0xa91cd3,null))[_0x5e66b8('0x18')](saveUpdates(_0x31f0e6['body'],null))[_0x5e66b8('0x18')](respondWithResult(_0xa91cd3,null))['catch'](handleError(_0xa91cd3,null));},exports['destroy']=function(_0x53e4f4,_0x4c97a2){const _0x4925f7=_0xe1cc26;return db[_0x4925f7('0x2b')][_0x4925f7('0x2d')]({'where':{'id':_0x53e4f4['params']['id']}})[_0x4925f7('0x18')](handleEntityNotFound(_0x4c97a2,null))[_0x4925f7('0x18')](removeEntity(_0x4c97a2,null))[_0x4925f7('0x1e')](handleError(_0x4c97a2,null));},exports[_0xe1cc26('0x26')]=function(_0x4301ef,_0x1c3ac6){const _0xf34f3a=_0xe1cc26;let _0x3734e6={};const _0x509f90={};let _0x4bd4e6,_0x4e4ce4;return db[_0xf34f3a('0x2b')][_0xf34f3a('0x2d')]({'where':{'id':_0x4301ef[_0xf34f3a('0x14')]['id']}})[_0xf34f3a('0x18')](handleEntityNotFound(_0x1c3ac6,null))[_0xf34f3a('0x18')](function(_0x1a0a84){const _0x4f7af4=_0xf34f3a;if(_0x1a0a84)return _0x4bd4e6=_0x1a0a84,_0x509f90[_0x4f7af4('0x3')]=_[_0x4f7af4('0x24')](db[_0x4f7af4('0x17')][_0x4f7af4('0x1c')]),_0x509f90['query']=_['keys'](_0x4301ef[_0x4f7af4('0x1f')]),_0x509f90[_0x4f7af4('0x6')]=_[_0x4f7af4('0xe')](_0x509f90['model'],_0x509f90[_0x4f7af4('0x1f')]),_0x3734e6[_0x4f7af4('0x10')]=_[_0x4f7af4('0xe')](_0x509f90[_0x4f7af4('0x3')],qs['fields'](_0x4301ef[_0x4f7af4('0x1f')][_0x4f7af4('0x7')])),_0x3734e6[_0x4f7af4('0x10')]=_0x3734e6[_0x4f7af4('0x10')]['length']?_0x3734e6['attributes']:_0x509f90[_0x4f7af4('0x3')],_0x3734e6[_0x4f7af4('0x8')]=qs['sort'](_0x4301ef[_0x4f7af4('0x1f')][_0x4f7af4('0x29')]),_0x3734e6[_0x4f7af4('0xc')]=qs[_0x4f7af4('0x6')](_[_0x4f7af4('0xd')](_0x4301ef[_0x4f7af4('0x1f')],_0x509f90[_0x4f7af4('0x6')])),_0x4301ef['query'][_0x4f7af4('0x22')]&&(_0x3734e6[_0x4f7af4('0xc')]=_['merge'](_0x3734e6['where'],{[Op['or']]:_[_0x4f7af4('0x2')](_0x3734e6['attributes'],function(_0x298aa4){const _0x3ef0f5=_0x4f7af4,_0x15485d={};return _0x15485d[_0x298aa4]={[Op[_0x3ef0f5('0x2a')]]:'%'+_0x4301ef[_0x3ef0f5('0x1f')][_0x3ef0f5('0x22')]+'%'},_0x15485d;})})),_0x3734e6=_['merge']({},_0x3734e6,_0x4301ef[_0x4f7af4('0x2f')]),_0x4bd4e6['getFields'](_0x3734e6);})[_0xf34f3a('0x18')](function(_0xb8472){const _0x9613d1=_0xf34f3a;if(_0xb8472)return _0x4e4ce4=_0xb8472['length'],typeof _0x4301ef['query']['nolimit']===_0x9613d1('0xb')&&(_0x3734e6['limit']=qs[_0x9613d1('0x2c')](_0x4301ef[_0x9613d1('0x1f')][_0x9613d1('0x2c')]),_0x3734e6[_0x9613d1('0x32')]=qs['offset'](_0x4301ef['query'][_0x9613d1('0x32')])),_0x4bd4e6[_0x9613d1('0x26')](_0x3734e6);})['then'](function(_0xad1509){if(_0xad1509)return _0xad1509?{'count':_0x4e4ce4,'rows':_0xad1509}:null;})[_0xf34f3a('0x18')](respondWithResult(_0x1c3ac6,null))[_0xf34f3a('0x1e')](handleError(_0x1c3ac6,null));},exports['getSubjects']=function(_0xb01216,_0x25a551){const _0x15cf16=_0xe1cc26;let _0x22211f={};const _0x1c5906={};let _0x5116d7,_0x5f8e5;return db[_0x15cf16('0x2b')]['findOne']({'where':{'id':_0xb01216[_0x15cf16('0x14')]['id']}})[_0x15cf16('0x18')](handleEntityNotFound(_0x25a551,null))[_0x15cf16('0x18')](function(_0x1d1913){const _0x3ecdd2=_0x15cf16;if(_0x1d1913)return _0x5116d7=_0x1d1913,_0x1c5906[_0x3ecdd2('0x3')]=_[_0x3ecdd2('0x24')](db[_0x3ecdd2('0x17')][_0x3ecdd2('0x1c')]),_0x1c5906[_0x3ecdd2('0x1f')]=_['keys'](_0xb01216['query']),_0x1c5906['filters']=_[_0x3ecdd2('0xe')](_0x1c5906[_0x3ecdd2('0x3')],_0x1c5906[_0x3ecdd2('0x1f')]),_0x22211f[_0x3ecdd2('0x10')]=_[_0x3ecdd2('0xe')](_0x1c5906[_0x3ecdd2('0x3')],qs['fields'](_0xb01216['query'][_0x3ecdd2('0x7')])),_0x22211f['attributes']=_0x22211f[_0x3ecdd2('0x10')][_0x3ecdd2('0x31')]?_0x22211f[_0x3ecdd2('0x10')]:_0x1c5906[_0x3ecdd2('0x3')],_0x22211f[_0x3ecdd2('0x8')]=qs[_0x3ecdd2('0x29')](_0xb01216['query']['sort']),_0x22211f[_0x3ecdd2('0xc')]=qs[_0x3ecdd2('0x6')](_[_0x3ecdd2('0xd')](_0xb01216['query'],_0x1c5906['filters'])),_0xb01216['query'][_0x3ecdd2('0x22')]&&(_0x22211f[_0x3ecdd2('0xc')]=_[_0x3ecdd2('0x1d')](_0x22211f['where'],{[Op['or']]:_[_0x3ecdd2('0x2')](_0x22211f[_0x3ecdd2('0x10')],function(_0x3d4e7a){const _0x45c7de=_0x3ecdd2,_0x24ca50={};return _0x24ca50[_0x3d4e7a]={[Op[_0x45c7de('0x2a')]]:'%'+_0xb01216['query'][_0x45c7de('0x22')]+'%'},_0x24ca50;})})),_0x22211f=_[_0x3ecdd2('0x1d')]({},_0x22211f,_0xb01216['options']),_0x5116d7[_0x3ecdd2('0x36')](_0x22211f);})[_0x15cf16('0x18')](function(_0x4248b0){const _0x14a3ba=_0x15cf16;if(_0x4248b0)return _0x5f8e5=_0x4248b0[_0x14a3ba('0x31')],typeof _0xb01216['query'][_0x14a3ba('0xf')]==='undefined'&&(_0x22211f[_0x14a3ba('0x2c')]=qs[_0x14a3ba('0x2c')](_0xb01216[_0x14a3ba('0x1f')][_0x14a3ba('0x2c')]),_0x22211f[_0x14a3ba('0x32')]=qs[_0x14a3ba('0x32')](_0xb01216[_0x14a3ba('0x1f')][_0x14a3ba('0x32')])),_0x5116d7[_0x14a3ba('0x36')](_0x22211f);})[_0x15cf16('0x18')](function(_0x1bffe8){if(_0x1bffe8)return _0x1bffe8?{'count':_0x5f8e5,'rows':_0x1bffe8}:null;})[_0x15cf16('0x18')](respondWithResult(_0x25a551,null))[_0x15cf16('0x1e')](handleError(_0x25a551,null));},exports['getDescriptions']=function(_0x5cfeac,_0x11385e){const _0x4d20be=_0xe1cc26;let _0x553eff={};const _0x97817f={};let _0x407897,_0x1ced1d;return db[_0x4d20be('0x2b')][_0x4d20be('0x2d')]({'where':{'id':_0x5cfeac[_0x4d20be('0x14')]['id']}})['then'](handleEntityNotFound(_0x11385e,null))[_0x4d20be('0x18')](function(_0x14df0d){const _0x2e4559=_0x4d20be;if(_0x14df0d)return _0x407897=_0x14df0d,_0x97817f['model']=_[_0x2e4559('0x24')](db[_0x2e4559('0x17')][_0x2e4559('0x1c')]),_0x97817f[_0x2e4559('0x1f')]=_[_0x2e4559('0x24')](_0x5cfeac[_0x2e4559('0x1f')]),_0x97817f[_0x2e4559('0x6')]=_[_0x2e4559('0xe')](_0x97817f[_0x2e4559('0x3')],_0x97817f['query']),_0x553eff['attributes']=_[_0x2e4559('0xe')](_0x97817f['model'],qs[_0x2e4559('0x7')](_0x5cfeac[_0x2e4559('0x1f')]['fields'])),_0x553eff['attributes']=_0x553eff[_0x2e4559('0x10')]['length']?_0x553eff['attributes']:_0x97817f[_0x2e4559('0x3')],_0x553eff[_0x2e4559('0x8')]=qs[_0x2e4559('0x29')](_0x5cfeac[_0x2e4559('0x1f')][_0x2e4559('0x29')]),_0x553eff[_0x2e4559('0xc')]=qs[_0x2e4559('0x6')](_['pick'](_0x5cfeac[_0x2e4559('0x1f')],_0x97817f[_0x2e4559('0x6')])),_0x5cfeac['query'][_0x2e4559('0x22')]&&(_0x553eff[_0x2e4559('0xc')]=_['merge'](_0x553eff[_0x2e4559('0xc')],{[Op['or']]:_[_0x2e4559('0x2')](_0x553eff[_0x2e4559('0x10')],function(_0x33e6de){const _0x15ed6e=_0x2e4559,_0x22bcc5={};return _0x22bcc5[_0x33e6de]={[Op['like']]:'%'+_0x5cfeac[_0x15ed6e('0x1f')]['filter']+'%'},_0x22bcc5;})})),_0x553eff=_[_0x2e4559('0x1d')]({},_0x553eff,_0x5cfeac[_0x2e4559('0x2f')]),_0x407897[_0x2e4559('0x9')](_0x553eff);})[_0x4d20be('0x18')](function(_0x5534df){const _0x6e6ac2=_0x4d20be;if(_0x5534df)return _0x1ced1d=_0x5534df[_0x6e6ac2('0x31')],typeof _0x5cfeac[_0x6e6ac2('0x1f')][_0x6e6ac2('0xf')]===_0x6e6ac2('0xb')&&(_0x553eff['limit']=qs[_0x6e6ac2('0x2c')](_0x5cfeac[_0x6e6ac2('0x1f')][_0x6e6ac2('0x2c')]),_0x553eff['offset']=qs[_0x6e6ac2('0x32')](_0x5cfeac['query'][_0x6e6ac2('0x32')])),_0x407897['getDescriptions'](_0x553eff);})['then'](function(_0x35ee13){if(_0x35ee13)return _0x35ee13?{'count':_0x1ced1d,'rows':_0x35ee13}:null;})['then'](respondWithResult(_0x11385e,null))[_0x4d20be('0x1e')](handleError(_0x11385e,null));};
\ No newline at end of file