Built motion from commit f738f9592c388b9f9eb3948f400a5c9d717a3561. Version 3.0.0...
[motion-next.git] / server / api / intSalesforceConfiguration / intSalesforceConfiguration.controller.js
index ab40fa9..afe4ed5 100644 (file)
@@ -1 +1 @@
-const a342_0x2a96=['send','filters','rawAttributes','limit','rows','intersection','query','api','stack','count','catch','includeAll','SalesforceField','json','options','create','Content-Range','params','nolimit','fieldName','fields','include','update','sort','undefined','offset','VIRTUAL','length','sequelize','type','index','like','map','getSubjects','pick','name','error','findOne','lodash','then','keys','where','../../components/parsers/qs','order','model','findAll','attributes','key','status','merge','show','body','getDescriptions','filter','SalesforceConfiguration','getFields'];(function(_0x18db78,_0xf6c4e6){const _0x2a96f3=function(_0x64f87){while(--_0x64f87){_0x18db78['push'](_0x18db78['shift']());}};_0x2a96f3(++_0xf6c4e6);}(a342_0x2a96,0x19a));const a342_0x64f8=function(_0x18db78,_0xf6c4e6){_0x18db78=_0x18db78-0x9f;let _0x2a96f3=a342_0x2a96[_0x18db78];return _0x2a96f3;};const a342_0x4e9f5d=a342_0x64f8;'use strict';const _=require(a342_0x4e9f5d(0xb3)),qs=require(a342_0x4e9f5d(0xb7)),logger=require('../../config/logger')(a342_0x4e9f5d(0xcc)),{db}=require('../../mysqldb'),{Op}=require(a342_0x4e9f5d(0xa9));function respondWithResult(_0xeabbe4,_0x3873a6){return _0x3873a6=_0x3873a6||0xc8,function(_0x9a6005){const _0x1a5162=a342_0x64f8;if(_0x9a6005)return _0xeabbe4['status'](_0x3873a6)[_0x1a5162(0xd2)](_0x9a6005);};}function respondWithFilteredResult(_0x3a4927,_0x4f0fa6){return function(_0x5710fd){const _0x11434b=a342_0x64f8;if(_0x5710fd){const _0x2d01b0=_0x5710fd['count'],_0x43eb77=_0x4f0fa6['offset'];let _0x14bcba=_0x4f0fa6[_0x11434b(0xa6)]+_0x4f0fa6[_0x11434b(0xc8)],_0x20ebc0;return _0x14bcba>=_0x2d01b0?(_0x14bcba=_0x2d01b0,_0x20ebc0=0xc8):_0x20ebc0=0xce,_0x3a4927[_0x11434b(0xbd)](_0x20ebc0),_0x3a4927['set'](_0x11434b(0xd5),_0x43eb77+'-'+_0x14bcba+'/'+_0x2d01b0)['json'](_0x5710fd);}return null;};}function saveUpdates(_0x198342){return function(_0x6aadfe){const _0x411773=a342_0x64f8;if(_0x6aadfe)return _0x6aadfe[_0x411773(0xa3)](_0x198342)['then'](function(_0x3acd3c){return _0x3acd3c;});return null;};}function removeEntity(_0x3099d7){return function(_0x4874b7){if(_0x4874b7)return _0x4874b7['destroy']()['then'](function(){_0x3099d7['status'](0xcc)['end']();});};}function handleEntityNotFound(_0x5ec279){return function(_0x1dd8c3){return!_0x1dd8c3&&_0x5ec279['sendStatus'](0x194),_0x1dd8c3;};}function handleError(_0x54ade7,_0x4615e0){return _0x4615e0=_0x4615e0||0x1f4,function(_0x5e70ae){const _0x446bb5=a342_0x64f8;logger[_0x446bb5(0xb1)](_0x5e70ae[_0x446bb5(0xcd)]),_0x5e70ae[_0x446bb5(0xb0)]&&delete _0x5e70ae['name'],_0x54ade7['status'](_0x4615e0)[_0x446bb5(0xc5)](_0x5e70ae);};}exports[a342_0x4e9f5d(0xab)]=function(_0xfa0939,_0x51f573){const _0x52bd6c=a342_0x4e9f5d;let _0x2e692d={};const _0x387a75={},_0xa2f4c7={'count':0x0,'rows':[]},_0x5640bd=_[_0x52bd6c(0xad)](db[_0x52bd6c(0xc3)][_0x52bd6c(0xc7)],function(_0x2bad32){const _0x57b3c0=_0x52bd6c;return{'name':_0x2bad32[_0x57b3c0(0xa0)],'type':_0x2bad32[_0x57b3c0(0xaa)][_0x57b3c0(0xbc)]};});_0x387a75[_0x52bd6c(0xb9)]=_[_0x52bd6c(0xad)](_0x5640bd,'name'),_0x387a75[_0x52bd6c(0xcb)]=_['keys'](_0xfa0939[_0x52bd6c(0xcb)]),_0x387a75['filters']=_[_0x52bd6c(0xca)](_0x387a75['model'],_0x387a75['query']),_0x2e692d['attributes']=_[_0x52bd6c(0xca)](_0x387a75[_0x52bd6c(0xb9)],qs[_0x52bd6c(0xa1)](_0xfa0939[_0x52bd6c(0xcb)][_0x52bd6c(0xa1)])),_0x2e692d[_0x52bd6c(0xbb)]=_0x2e692d[_0x52bd6c(0xbb)][_0x52bd6c(0xa8)]?_0x2e692d[_0x52bd6c(0xbb)]:_0x387a75[_0x52bd6c(0xb9)];typeof _0xfa0939[_0x52bd6c(0xcb)][_0x52bd6c(0x9f)]==='undefined'&&(_0x2e692d[_0x52bd6c(0xc8)]=qs[_0x52bd6c(0xc8)](_0xfa0939[_0x52bd6c(0xcb)][_0x52bd6c(0xc8)]),_0x2e692d['offset']=qs[_0x52bd6c(0xa6)](_0xfa0939['query'][_0x52bd6c(0xa6)]));_0x2e692d[_0x52bd6c(0xb8)]=qs[_0x52bd6c(0xa4)](_0xfa0939[_0x52bd6c(0xcb)][_0x52bd6c(0xa4)]),_0x2e692d[_0x52bd6c(0xb6)]=qs['filters'](_[_0x52bd6c(0xaf)](_0xfa0939[_0x52bd6c(0xcb)],_0x387a75['filters']),_0x5640bd);_0xfa0939['query'][_0x52bd6c(0xc2)]&&(_0x2e692d['where']=_[_0x52bd6c(0xbe)](_0x2e692d[_0x52bd6c(0xb6)],{[Op['or']]:_[_0x52bd6c(0xad)](_0x5640bd,function(_0x7e83c7){const _0x4d7935=_0x52bd6c;if(_0x7e83c7[_0x4d7935(0xaa)]!==_0x4d7935(0xa7)){const _0xdc909={};return _0xdc909[_0x7e83c7[_0x4d7935(0xb0)]]={[Op[_0x4d7935(0xac)]]:'%'+_0xfa0939[_0x4d7935(0xcb)]['filter']+'%'},_0xdc909;}})}));_0x2e692d=_[_0x52bd6c(0xbe)]({},_0x2e692d,_0xfa0939[_0x52bd6c(0xd3)]);const _0x4a1dcc={'where':_0x2e692d[_0x52bd6c(0xb6)]};return db[_0x52bd6c(0xc3)][_0x52bd6c(0xce)](_0x4a1dcc)[_0x52bd6c(0xb4)](function(_0x2a1ace){const _0x20845b=_0x52bd6c;return _0xa2f4c7['count']=_0x2a1ace,_0xfa0939[_0x20845b(0xcb)][_0x20845b(0xd0)]&&(_0x2e692d[_0x20845b(0xa2)]=[{'all':!![]}]),db[_0x20845b(0xc3)][_0x20845b(0xba)](_0x2e692d);})[_0x52bd6c(0xb4)](function(_0x415d87){const _0x391f81=_0x52bd6c;return _0xa2f4c7[_0x391f81(0xc9)]=_0x415d87,_0xa2f4c7;})[_0x52bd6c(0xb4)](respondWithFilteredResult(_0x51f573,_0x2e692d))[_0x52bd6c(0xcf)](handleError(_0x51f573,null));},exports[a342_0x4e9f5d(0xbf)]=function(_0x9549b8,_0xfacf79){const _0x578218=a342_0x4e9f5d;let _0x3f64ae={'raw':![],'where':{'id':_0x9549b8[_0x578218(0xd6)]['id']}};const _0x4abf92={};return _0x4abf92['model']=_['keys'](db[_0x578218(0xc3)][_0x578218(0xc7)]),_0x4abf92['query']=_[_0x578218(0xb5)](_0x9549b8['query']),_0x4abf92[_0x578218(0xc6)]=_[_0x578218(0xca)](_0x4abf92[_0x578218(0xb9)],_0x4abf92[_0x578218(0xcb)]),_0x3f64ae['attributes']=_[_0x578218(0xca)](_0x4abf92['model'],qs[_0x578218(0xa1)](_0x9549b8[_0x578218(0xcb)][_0x578218(0xa1)])),_0x3f64ae[_0x578218(0xbb)]=_0x3f64ae[_0x578218(0xbb)][_0x578218(0xa8)]?_0x3f64ae[_0x578218(0xbb)]:_0x4abf92['model'],_0x9549b8['query'][_0x578218(0xd0)]&&(_0x3f64ae[_0x578218(0xa2)]=[{'all':!![]}]),_0x3f64ae=_[_0x578218(0xbe)]({},_0x3f64ae,_0x9549b8[_0x578218(0xd3)]),db[_0x578218(0xc3)]['findOne'](_0x3f64ae)[_0x578218(0xb4)](handleEntityNotFound(_0xfacf79,null))[_0x578218(0xb4)](respondWithResult(_0xfacf79,null))[_0x578218(0xcf)](handleError(_0xfacf79,null));},exports[a342_0x4e9f5d(0xd4)]=function(_0x1448cd,_0x3238ed){const _0x45a53f=a342_0x4e9f5d;return db[_0x45a53f(0xc3)][_0x45a53f(0xd4)](_0x1448cd[_0x45a53f(0xc0)],{})[_0x45a53f(0xb4)](respondWithResult(_0x3238ed,0xc9))['catch'](handleError(_0x3238ed,null));},exports['update']=function(_0x5335bc,_0x580086){const _0x30886f=a342_0x4e9f5d;return _0x5335bc[_0x30886f(0xc0)]['id']&&delete _0x5335bc['body']['id'],db[_0x30886f(0xc3)]['findOne']({'where':{'id':_0x5335bc[_0x30886f(0xd6)]['id']}})[_0x30886f(0xb4)](handleEntityNotFound(_0x580086,null))[_0x30886f(0xb4)](saveUpdates(_0x5335bc[_0x30886f(0xc0)],null))[_0x30886f(0xb4)](respondWithResult(_0x580086,null))[_0x30886f(0xcf)](handleError(_0x580086,null));},exports['destroy']=function(_0x5802cb,_0x45fe36){const _0x1e32f9=a342_0x4e9f5d;return db[_0x1e32f9(0xc3)][_0x1e32f9(0xb2)]({'where':{'id':_0x5802cb[_0x1e32f9(0xd6)]['id']}})[_0x1e32f9(0xb4)](handleEntityNotFound(_0x45fe36,null))['then'](removeEntity(_0x45fe36,null))[_0x1e32f9(0xcf)](handleError(_0x45fe36,null));},exports['getFields']=function(_0x29f0c6,_0x251f02){const _0x1a7dc7=a342_0x4e9f5d;let _0x401db2={};const _0x4c0f6c={};let _0x5c3398,_0x3535ca;return db['SalesforceConfiguration'][_0x1a7dc7(0xb2)]({'where':{'id':_0x29f0c6[_0x1a7dc7(0xd6)]['id']}})[_0x1a7dc7(0xb4)](handleEntityNotFound(_0x251f02,null))[_0x1a7dc7(0xb4)](function(_0x259cc4){const _0x29acd9=_0x1a7dc7;if(_0x259cc4)return _0x5c3398=_0x259cc4,_0x4c0f6c['model']=_[_0x29acd9(0xb5)](db[_0x29acd9(0xd1)][_0x29acd9(0xc7)]),_0x4c0f6c[_0x29acd9(0xcb)]=_[_0x29acd9(0xb5)](_0x29f0c6['query']),_0x4c0f6c[_0x29acd9(0xc6)]=_[_0x29acd9(0xca)](_0x4c0f6c[_0x29acd9(0xb9)],_0x4c0f6c[_0x29acd9(0xcb)]),_0x401db2[_0x29acd9(0xbb)]=_[_0x29acd9(0xca)](_0x4c0f6c[_0x29acd9(0xb9)],qs['fields'](_0x29f0c6[_0x29acd9(0xcb)][_0x29acd9(0xa1)])),_0x401db2['attributes']=_0x401db2['attributes'][_0x29acd9(0xa8)]?_0x401db2[_0x29acd9(0xbb)]:_0x4c0f6c[_0x29acd9(0xb9)],_0x401db2[_0x29acd9(0xb8)]=qs[_0x29acd9(0xa4)](_0x29f0c6[_0x29acd9(0xcb)][_0x29acd9(0xa4)]),_0x401db2[_0x29acd9(0xb6)]=qs['filters'](_['pick'](_0x29f0c6[_0x29acd9(0xcb)],_0x4c0f6c[_0x29acd9(0xc6)])),_0x29f0c6[_0x29acd9(0xcb)]['filter']&&(_0x401db2[_0x29acd9(0xb6)]=_[_0x29acd9(0xbe)](_0x401db2[_0x29acd9(0xb6)],{[Op['or']]:_[_0x29acd9(0xad)](_0x401db2[_0x29acd9(0xbb)],function(_0x53e8f1){const _0x4cb848=_0x29acd9,_0x87c9de={};return _0x87c9de[_0x53e8f1]={[Op[_0x4cb848(0xac)]]:'%'+_0x29f0c6['query'][_0x4cb848(0xc2)]+'%'},_0x87c9de;})})),_0x401db2=_[_0x29acd9(0xbe)]({},_0x401db2,_0x29f0c6[_0x29acd9(0xd3)]),_0x5c3398[_0x29acd9(0xc4)](_0x401db2);})[_0x1a7dc7(0xb4)](function(_0x21ca04){const _0xa32aa4=_0x1a7dc7;if(_0x21ca04)return _0x3535ca=_0x21ca04['length'],typeof _0x29f0c6[_0xa32aa4(0xcb)][_0xa32aa4(0x9f)]===_0xa32aa4(0xa5)&&(_0x401db2['limit']=qs['limit'](_0x29f0c6[_0xa32aa4(0xcb)][_0xa32aa4(0xc8)]),_0x401db2[_0xa32aa4(0xa6)]=qs[_0xa32aa4(0xa6)](_0x29f0c6[_0xa32aa4(0xcb)]['offset'])),_0x5c3398[_0xa32aa4(0xc4)](_0x401db2);})[_0x1a7dc7(0xb4)](function(_0x2db633){if(_0x2db633)return _0x2db633?{'count':_0x3535ca,'rows':_0x2db633}:null;})['then'](respondWithResult(_0x251f02,null))[_0x1a7dc7(0xcf)](handleError(_0x251f02,null));},exports[a342_0x4e9f5d(0xae)]=function(_0x35f09a,_0x49c0dd){const _0x5b4729=a342_0x4e9f5d;let _0x569aa1={};const _0x337a15={};let _0x1c22c1,_0x40d1fd;return db[_0x5b4729(0xc3)][_0x5b4729(0xb2)]({'where':{'id':_0x35f09a['params']['id']}})[_0x5b4729(0xb4)](handleEntityNotFound(_0x49c0dd,null))[_0x5b4729(0xb4)](function(_0x20f024){const _0x373b7c=_0x5b4729;if(_0x20f024)return _0x1c22c1=_0x20f024,_0x337a15['model']=_[_0x373b7c(0xb5)](db[_0x373b7c(0xd1)][_0x373b7c(0xc7)]),_0x337a15[_0x373b7c(0xcb)]=_['keys'](_0x35f09a[_0x373b7c(0xcb)]),_0x337a15['filters']=_[_0x373b7c(0xca)](_0x337a15[_0x373b7c(0xb9)],_0x337a15[_0x373b7c(0xcb)]),_0x569aa1[_0x373b7c(0xbb)]=_[_0x373b7c(0xca)](_0x337a15['model'],qs[_0x373b7c(0xa1)](_0x35f09a['query']['fields'])),_0x569aa1[_0x373b7c(0xbb)]=_0x569aa1['attributes']['length']?_0x569aa1[_0x373b7c(0xbb)]:_0x337a15[_0x373b7c(0xb9)],_0x569aa1[_0x373b7c(0xb8)]=qs[_0x373b7c(0xa4)](_0x35f09a[_0x373b7c(0xcb)][_0x373b7c(0xa4)]),_0x569aa1[_0x373b7c(0xb6)]=qs[_0x373b7c(0xc6)](_[_0x373b7c(0xaf)](_0x35f09a[_0x373b7c(0xcb)],_0x337a15['filters'])),_0x35f09a['query'][_0x373b7c(0xc2)]&&(_0x569aa1[_0x373b7c(0xb6)]=_[_0x373b7c(0xbe)](_0x569aa1['where'],{[Op['or']]:_[_0x373b7c(0xad)](_0x569aa1[_0x373b7c(0xbb)],function(_0x24736a){const _0xb450a5=_0x373b7c,_0x4334c0={};return _0x4334c0[_0x24736a]={[Op[_0xb450a5(0xac)]]:'%'+_0x35f09a[_0xb450a5(0xcb)][_0xb450a5(0xc2)]+'%'},_0x4334c0;})})),_0x569aa1=_['merge']({},_0x569aa1,_0x35f09a[_0x373b7c(0xd3)]),_0x1c22c1['getSubjects'](_0x569aa1);})[_0x5b4729(0xb4)](function(_0x5a7fd6){const _0x4f4837=_0x5b4729;if(_0x5a7fd6)return _0x40d1fd=_0x5a7fd6[_0x4f4837(0xa8)],typeof _0x35f09a[_0x4f4837(0xcb)][_0x4f4837(0x9f)]===_0x4f4837(0xa5)&&(_0x569aa1[_0x4f4837(0xc8)]=qs[_0x4f4837(0xc8)](_0x35f09a['query'][_0x4f4837(0xc8)]),_0x569aa1['offset']=qs[_0x4f4837(0xa6)](_0x35f09a[_0x4f4837(0xcb)][_0x4f4837(0xa6)])),_0x1c22c1['getSubjects'](_0x569aa1);})[_0x5b4729(0xb4)](function(_0x36b419){if(_0x36b419)return _0x36b419?{'count':_0x40d1fd,'rows':_0x36b419}:null;})[_0x5b4729(0xb4)](respondWithResult(_0x49c0dd,null))[_0x5b4729(0xcf)](handleError(_0x49c0dd,null));},exports['getDescriptions']=function(_0x588bf8,_0x21abdd){const _0x157338=a342_0x4e9f5d;let _0x125c89={};const _0x1c177d={};let _0x4f9d80,_0x477ef1;return db['SalesforceConfiguration']['findOne']({'where':{'id':_0x588bf8[_0x157338(0xd6)]['id']}})[_0x157338(0xb4)](handleEntityNotFound(_0x21abdd,null))['then'](function(_0x3aff3e){const _0x4aab82=_0x157338;if(_0x3aff3e)return _0x4f9d80=_0x3aff3e,_0x1c177d['model']=_[_0x4aab82(0xb5)](db[_0x4aab82(0xd1)][_0x4aab82(0xc7)]),_0x1c177d['query']=_['keys'](_0x588bf8[_0x4aab82(0xcb)]),_0x1c177d[_0x4aab82(0xc6)]=_[_0x4aab82(0xca)](_0x1c177d[_0x4aab82(0xb9)],_0x1c177d[_0x4aab82(0xcb)]),_0x125c89[_0x4aab82(0xbb)]=_[_0x4aab82(0xca)](_0x1c177d['model'],qs[_0x4aab82(0xa1)](_0x588bf8[_0x4aab82(0xcb)][_0x4aab82(0xa1)])),_0x125c89[_0x4aab82(0xbb)]=_0x125c89[_0x4aab82(0xbb)][_0x4aab82(0xa8)]?_0x125c89[_0x4aab82(0xbb)]:_0x1c177d[_0x4aab82(0xb9)],_0x125c89[_0x4aab82(0xb8)]=qs[_0x4aab82(0xa4)](_0x588bf8[_0x4aab82(0xcb)][_0x4aab82(0xa4)]),_0x125c89[_0x4aab82(0xb6)]=qs[_0x4aab82(0xc6)](_[_0x4aab82(0xaf)](_0x588bf8[_0x4aab82(0xcb)],_0x1c177d[_0x4aab82(0xc6)])),_0x588bf8['query'][_0x4aab82(0xc2)]&&(_0x125c89[_0x4aab82(0xb6)]=_['merge'](_0x125c89['where'],{[Op['or']]:_[_0x4aab82(0xad)](_0x125c89['attributes'],function(_0x4d6ec4){const _0x369562=_0x4aab82,_0x274ca5={};return _0x274ca5[_0x4d6ec4]={[Op[_0x369562(0xac)]]:'%'+_0x588bf8['query']['filter']+'%'},_0x274ca5;})})),_0x125c89=_['merge']({},_0x125c89,_0x588bf8['options']),_0x4f9d80[_0x4aab82(0xc1)](_0x125c89);})[_0x157338(0xb4)](function(_0x23d90d){const _0x37aff7=_0x157338;if(_0x23d90d)return _0x477ef1=_0x23d90d[_0x37aff7(0xa8)],typeof _0x588bf8[_0x37aff7(0xcb)][_0x37aff7(0x9f)]===_0x37aff7(0xa5)&&(_0x125c89[_0x37aff7(0xc8)]=qs[_0x37aff7(0xc8)](_0x588bf8[_0x37aff7(0xcb)]['limit']),_0x125c89[_0x37aff7(0xa6)]=qs[_0x37aff7(0xa6)](_0x588bf8[_0x37aff7(0xcb)][_0x37aff7(0xa6)])),_0x4f9d80[_0x37aff7(0xc1)](_0x125c89);})[_0x157338(0xb4)](function(_0x59da93){if(_0x59da93)return _0x59da93?{'count':_0x477ef1,'rows':_0x59da93}:null;})[_0x157338(0xb4)](respondWithResult(_0x21abdd,null))[_0x157338(0xcf)](handleError(_0x21abdd,null));};
\ No newline at end of file
+const a342_0x55c9=['show','type','lodash','filter','SalesforceConfiguration','SalesforceField','offset','limit','VIRTUAL','order','include','getSubjects','pick','keys','params','findOne','sort','stack','name','destroy','create','catch','options','../../mysqldb','end','../../components/parsers/qs','intersection','map','query','length','model','body','sequelize','index','then','filters','includeAll','status','fieldName','error','rows','where','json','set','undefined','merge','getDescriptions','attributes','count','like','sendStatus','nolimit','getFields','rawAttributes','fields','key','../../config/logger'];(function(_0x302cfd,_0x271e36){const _0x55c980=function(_0x283fae){while(--_0x283fae){_0x302cfd['push'](_0x302cfd['shift']());}};_0x55c980(++_0x271e36);}(a342_0x55c9,0xe9));const a342_0x283f=function(_0x302cfd,_0x271e36){_0x302cfd=_0x302cfd-0x138;let _0x55c980=a342_0x55c9[_0x302cfd];return _0x55c980;};const a342_0x397445=a342_0x283f;'use strict';const _=require(a342_0x397445(0x16e)),qs=require(a342_0x397445(0x14c)),logger=require(a342_0x397445(0x16b))('api'),{db}=require(a342_0x397445(0x14a)),{Op}=require(a342_0x397445(0x153));function respondWithResult(_0x52676c,_0x4550c5){return _0x4550c5=_0x4550c5||0xc8,function(_0x521a8f){const _0x3eef36=a342_0x283f;if(_0x521a8f)return _0x52676c[_0x3eef36(0x158)](_0x4550c5)[_0x3eef36(0x15d)](_0x521a8f);};}function respondWithFilteredResult(_0x27af01,_0x4765d1){return function(_0x193b92){const _0x37d1cd=a342_0x283f;if(_0x193b92){const _0x4c6b07=_0x193b92[_0x37d1cd(0x163)],_0x41046b=_0x4765d1[_0x37d1cd(0x139)];let _0x3216ce=_0x4765d1['offset']+_0x4765d1['limit'],_0x410a6f;return _0x3216ce>=_0x4c6b07?(_0x3216ce=_0x4c6b07,_0x410a6f=0xc8):_0x410a6f=0xce,_0x27af01[_0x37d1cd(0x158)](_0x410a6f),_0x27af01[_0x37d1cd(0x15e)]('Content-Range',_0x41046b+'-'+_0x3216ce+'/'+_0x4c6b07)[_0x37d1cd(0x15d)](_0x193b92);}return null;};}function saveUpdates(_0x1173e4){return function(_0x1bf7b7){const _0x15b413=a342_0x283f;if(_0x1bf7b7)return _0x1bf7b7['update'](_0x1173e4)[_0x15b413(0x155)](function(_0x23fccf){return _0x23fccf;});return null;};}function removeEntity(_0xa46758){return function(_0x2623c6){const _0x2c86fa=a342_0x283f;if(_0x2623c6)return _0x2623c6[_0x2c86fa(0x146)]()[_0x2c86fa(0x155)](function(){const _0x43a9ed=_0x2c86fa;_0xa46758[_0x43a9ed(0x158)](0xcc)[_0x43a9ed(0x14b)]();});};}function handleEntityNotFound(_0x1ba77f){return function(_0x53990d){const _0x3dac3e=a342_0x283f;return!_0x53990d&&_0x1ba77f[_0x3dac3e(0x165)](0x194),_0x53990d;};}function handleError(_0xfa3bf7,_0x25345c){return _0x25345c=_0x25345c||0x1f4,function(_0x40639b){const _0x151564=a342_0x283f;logger[_0x151564(0x15a)](_0x40639b[_0x151564(0x144)]),_0x40639b[_0x151564(0x145)]&&delete _0x40639b[_0x151564(0x145)],_0xfa3bf7[_0x151564(0x158)](_0x25345c)['send'](_0x40639b);};}exports[a342_0x397445(0x154)]=function(_0xadfad9,_0x1154f4){const _0x4f97bb=a342_0x397445;let _0x2aaa97={};const _0xd65b93={},_0x1f6eae={'count':0x0,'rows':[]},_0x507fe8=_[_0x4f97bb(0x14e)](db['SalesforceConfiguration'][_0x4f97bb(0x168)],function(_0x58b84b){const _0x2117c3=_0x4f97bb;return{'name':_0x58b84b[_0x2117c3(0x159)],'type':_0x58b84b[_0x2117c3(0x16d)][_0x2117c3(0x16a)]};});_0xd65b93[_0x4f97bb(0x151)]=_[_0x4f97bb(0x14e)](_0x507fe8,_0x4f97bb(0x145)),_0xd65b93[_0x4f97bb(0x14f)]=_['keys'](_0xadfad9[_0x4f97bb(0x14f)]),_0xd65b93[_0x4f97bb(0x156)]=_[_0x4f97bb(0x14d)](_0xd65b93['model'],_0xd65b93['query']),_0x2aaa97[_0x4f97bb(0x162)]=_[_0x4f97bb(0x14d)](_0xd65b93[_0x4f97bb(0x151)],qs[_0x4f97bb(0x169)](_0xadfad9[_0x4f97bb(0x14f)][_0x4f97bb(0x169)])),_0x2aaa97[_0x4f97bb(0x162)]=_0x2aaa97[_0x4f97bb(0x162)][_0x4f97bb(0x150)]?_0x2aaa97[_0x4f97bb(0x162)]:_0xd65b93[_0x4f97bb(0x151)];typeof _0xadfad9[_0x4f97bb(0x14f)][_0x4f97bb(0x166)]===_0x4f97bb(0x15f)&&(_0x2aaa97[_0x4f97bb(0x13a)]=qs[_0x4f97bb(0x13a)](_0xadfad9[_0x4f97bb(0x14f)][_0x4f97bb(0x13a)]),_0x2aaa97[_0x4f97bb(0x139)]=qs['offset'](_0xadfad9[_0x4f97bb(0x14f)][_0x4f97bb(0x139)]));_0x2aaa97['order']=qs[_0x4f97bb(0x143)](_0xadfad9['query']['sort']),_0x2aaa97[_0x4f97bb(0x15c)]=qs[_0x4f97bb(0x156)](_[_0x4f97bb(0x13f)](_0xadfad9[_0x4f97bb(0x14f)],_0xd65b93['filters']),_0x507fe8);_0xadfad9[_0x4f97bb(0x14f)][_0x4f97bb(0x16f)]&&(_0x2aaa97[_0x4f97bb(0x15c)]=_[_0x4f97bb(0x160)](_0x2aaa97['where'],{[Op['or']]:_[_0x4f97bb(0x14e)](_0x507fe8,function(_0x4e3f27){const _0x581a1a=_0x4f97bb;if(_0x4e3f27['type']!==_0x581a1a(0x13b)){const _0x33307a={};return _0x33307a[_0x4e3f27['name']]={[Op[_0x581a1a(0x164)]]:'%'+_0xadfad9['query']['filter']+'%'},_0x33307a;}})}));_0x2aaa97=_[_0x4f97bb(0x160)]({},_0x2aaa97,_0xadfad9[_0x4f97bb(0x149)]);const _0x4389e6={'where':_0x2aaa97[_0x4f97bb(0x15c)]};return db[_0x4f97bb(0x170)][_0x4f97bb(0x163)](_0x4389e6)[_0x4f97bb(0x155)](function(_0x3b0a20){const _0x18a192=_0x4f97bb;return _0x1f6eae[_0x18a192(0x163)]=_0x3b0a20,_0xadfad9[_0x18a192(0x14f)][_0x18a192(0x157)]&&(_0x2aaa97['include']=[{'all':!![]}]),db[_0x18a192(0x170)]['findAll'](_0x2aaa97);})[_0x4f97bb(0x155)](function(_0x4da4b8){const _0x15db9f=_0x4f97bb;return _0x1f6eae[_0x15db9f(0x15b)]=_0x4da4b8,_0x1f6eae;})[_0x4f97bb(0x155)](respondWithFilteredResult(_0x1154f4,_0x2aaa97))['catch'](handleError(_0x1154f4,null));},exports[a342_0x397445(0x16c)]=function(_0x3a1985,_0x7f1c57){const _0x3ed0d8=a342_0x397445;let _0xabbbde={'raw':![],'where':{'id':_0x3a1985['params']['id']}};const _0x17442f={};return _0x17442f[_0x3ed0d8(0x151)]=_[_0x3ed0d8(0x140)](db[_0x3ed0d8(0x170)][_0x3ed0d8(0x168)]),_0x17442f['query']=_[_0x3ed0d8(0x140)](_0x3a1985[_0x3ed0d8(0x14f)]),_0x17442f[_0x3ed0d8(0x156)]=_[_0x3ed0d8(0x14d)](_0x17442f[_0x3ed0d8(0x151)],_0x17442f[_0x3ed0d8(0x14f)]),_0xabbbde[_0x3ed0d8(0x162)]=_[_0x3ed0d8(0x14d)](_0x17442f[_0x3ed0d8(0x151)],qs[_0x3ed0d8(0x169)](_0x3a1985[_0x3ed0d8(0x14f)][_0x3ed0d8(0x169)])),_0xabbbde['attributes']=_0xabbbde[_0x3ed0d8(0x162)][_0x3ed0d8(0x150)]?_0xabbbde[_0x3ed0d8(0x162)]:_0x17442f['model'],_0x3a1985[_0x3ed0d8(0x14f)][_0x3ed0d8(0x157)]&&(_0xabbbde[_0x3ed0d8(0x13d)]=[{'all':!![]}]),_0xabbbde=_[_0x3ed0d8(0x160)]({},_0xabbbde,_0x3a1985[_0x3ed0d8(0x149)]),db['SalesforceConfiguration'][_0x3ed0d8(0x142)](_0xabbbde)[_0x3ed0d8(0x155)](handleEntityNotFound(_0x7f1c57,null))[_0x3ed0d8(0x155)](respondWithResult(_0x7f1c57,null))[_0x3ed0d8(0x148)](handleError(_0x7f1c57,null));},exports[a342_0x397445(0x147)]=function(_0x2a5221,_0x30ab93){const _0x55c422=a342_0x397445;return db[_0x55c422(0x170)][_0x55c422(0x147)](_0x2a5221[_0x55c422(0x152)],{})[_0x55c422(0x155)](respondWithResult(_0x30ab93,0xc9))[_0x55c422(0x148)](handleError(_0x30ab93,null));},exports['update']=function(_0x371f2c,_0x415aaa){const _0x298380=a342_0x397445;return _0x371f2c[_0x298380(0x152)]['id']&&delete _0x371f2c[_0x298380(0x152)]['id'],db[_0x298380(0x170)][_0x298380(0x142)]({'where':{'id':_0x371f2c['params']['id']}})[_0x298380(0x155)](handleEntityNotFound(_0x415aaa,null))[_0x298380(0x155)](saveUpdates(_0x371f2c[_0x298380(0x152)],null))[_0x298380(0x155)](respondWithResult(_0x415aaa,null))[_0x298380(0x148)](handleError(_0x415aaa,null));},exports[a342_0x397445(0x146)]=function(_0x53ef7c,_0xc4a82e){const _0x3fba44=a342_0x397445;return db[_0x3fba44(0x170)][_0x3fba44(0x142)]({'where':{'id':_0x53ef7c['params']['id']}})['then'](handleEntityNotFound(_0xc4a82e,null))[_0x3fba44(0x155)](removeEntity(_0xc4a82e,null))['catch'](handleError(_0xc4a82e,null));},exports[a342_0x397445(0x167)]=function(_0x3646c7,_0x372720){const _0x3d0e73=a342_0x397445;let _0xf49687={};const _0x2c1f87={};let _0x33e652,_0x2d1e2d;return db['SalesforceConfiguration'][_0x3d0e73(0x142)]({'where':{'id':_0x3646c7[_0x3d0e73(0x141)]['id']}})[_0x3d0e73(0x155)](handleEntityNotFound(_0x372720,null))[_0x3d0e73(0x155)](function(_0x3ea881){const _0x54930f=_0x3d0e73;if(_0x3ea881)return _0x33e652=_0x3ea881,_0x2c1f87['model']=_['keys'](db[_0x54930f(0x138)][_0x54930f(0x168)]),_0x2c1f87[_0x54930f(0x14f)]=_['keys'](_0x3646c7[_0x54930f(0x14f)]),_0x2c1f87[_0x54930f(0x156)]=_[_0x54930f(0x14d)](_0x2c1f87[_0x54930f(0x151)],_0x2c1f87[_0x54930f(0x14f)]),_0xf49687['attributes']=_[_0x54930f(0x14d)](_0x2c1f87['model'],qs[_0x54930f(0x169)](_0x3646c7['query'][_0x54930f(0x169)])),_0xf49687[_0x54930f(0x162)]=_0xf49687[_0x54930f(0x162)][_0x54930f(0x150)]?_0xf49687[_0x54930f(0x162)]:_0x2c1f87[_0x54930f(0x151)],_0xf49687[_0x54930f(0x13c)]=qs['sort'](_0x3646c7[_0x54930f(0x14f)][_0x54930f(0x143)]),_0xf49687['where']=qs[_0x54930f(0x156)](_[_0x54930f(0x13f)](_0x3646c7['query'],_0x2c1f87[_0x54930f(0x156)])),_0x3646c7[_0x54930f(0x14f)][_0x54930f(0x16f)]&&(_0xf49687[_0x54930f(0x15c)]=_[_0x54930f(0x160)](_0xf49687[_0x54930f(0x15c)],{[Op['or']]:_[_0x54930f(0x14e)](_0xf49687[_0x54930f(0x162)],function(_0x5f321a){const _0x377be2=_0x54930f,_0x543011={};return _0x543011[_0x5f321a]={[Op['like']]:'%'+_0x3646c7[_0x377be2(0x14f)][_0x377be2(0x16f)]+'%'},_0x543011;})})),_0xf49687=_['merge']({},_0xf49687,_0x3646c7[_0x54930f(0x149)]),_0x33e652['getFields'](_0xf49687);})[_0x3d0e73(0x155)](function(_0x2cadcc){const _0x185310=_0x3d0e73;if(_0x2cadcc)return _0x2d1e2d=_0x2cadcc[_0x185310(0x150)],typeof _0x3646c7[_0x185310(0x14f)][_0x185310(0x166)]===_0x185310(0x15f)&&(_0xf49687['limit']=qs[_0x185310(0x13a)](_0x3646c7['query'][_0x185310(0x13a)]),_0xf49687[_0x185310(0x139)]=qs[_0x185310(0x139)](_0x3646c7['query'][_0x185310(0x139)])),_0x33e652[_0x185310(0x167)](_0xf49687);})[_0x3d0e73(0x155)](function(_0x4f8c16){if(_0x4f8c16)return _0x4f8c16?{'count':_0x2d1e2d,'rows':_0x4f8c16}:null;})[_0x3d0e73(0x155)](respondWithResult(_0x372720,null))[_0x3d0e73(0x148)](handleError(_0x372720,null));},exports[a342_0x397445(0x13e)]=function(_0x3b35e7,_0xbc51d0){const _0x2eed08=a342_0x397445;let _0x5315fd={};const _0x26a69b={};let _0x130072,_0x36bfff;return db[_0x2eed08(0x170)]['findOne']({'where':{'id':_0x3b35e7[_0x2eed08(0x141)]['id']}})[_0x2eed08(0x155)](handleEntityNotFound(_0xbc51d0,null))[_0x2eed08(0x155)](function(_0x60c6c2){const _0x11700e=_0x2eed08;if(_0x60c6c2)return _0x130072=_0x60c6c2,_0x26a69b[_0x11700e(0x151)]=_[_0x11700e(0x140)](db[_0x11700e(0x138)][_0x11700e(0x168)]),_0x26a69b[_0x11700e(0x14f)]=_[_0x11700e(0x140)](_0x3b35e7[_0x11700e(0x14f)]),_0x26a69b['filters']=_[_0x11700e(0x14d)](_0x26a69b[_0x11700e(0x151)],_0x26a69b[_0x11700e(0x14f)]),_0x5315fd[_0x11700e(0x162)]=_['intersection'](_0x26a69b['model'],qs['fields'](_0x3b35e7['query'][_0x11700e(0x169)])),_0x5315fd[_0x11700e(0x162)]=_0x5315fd[_0x11700e(0x162)]['length']?_0x5315fd['attributes']:_0x26a69b['model'],_0x5315fd['order']=qs[_0x11700e(0x143)](_0x3b35e7[_0x11700e(0x14f)][_0x11700e(0x143)]),_0x5315fd[_0x11700e(0x15c)]=qs[_0x11700e(0x156)](_[_0x11700e(0x13f)](_0x3b35e7[_0x11700e(0x14f)],_0x26a69b[_0x11700e(0x156)])),_0x3b35e7['query']['filter']&&(_0x5315fd[_0x11700e(0x15c)]=_[_0x11700e(0x160)](_0x5315fd[_0x11700e(0x15c)],{[Op['or']]:_['map'](_0x5315fd[_0x11700e(0x162)],function(_0x2f4b15){const _0x44a447=_0x11700e,_0x4dcaf4={};return _0x4dcaf4[_0x2f4b15]={[Op[_0x44a447(0x164)]]:'%'+_0x3b35e7[_0x44a447(0x14f)][_0x44a447(0x16f)]+'%'},_0x4dcaf4;})})),_0x5315fd=_[_0x11700e(0x160)]({},_0x5315fd,_0x3b35e7[_0x11700e(0x149)]),_0x130072[_0x11700e(0x13e)](_0x5315fd);})[_0x2eed08(0x155)](function(_0x21d721){const _0x117003=_0x2eed08;if(_0x21d721)return _0x36bfff=_0x21d721['length'],typeof _0x3b35e7[_0x117003(0x14f)][_0x117003(0x166)]===_0x117003(0x15f)&&(_0x5315fd[_0x117003(0x13a)]=qs['limit'](_0x3b35e7[_0x117003(0x14f)]['limit']),_0x5315fd[_0x117003(0x139)]=qs[_0x117003(0x139)](_0x3b35e7[_0x117003(0x14f)][_0x117003(0x139)])),_0x130072[_0x117003(0x13e)](_0x5315fd);})[_0x2eed08(0x155)](function(_0x152bd0){if(_0x152bd0)return _0x152bd0?{'count':_0x36bfff,'rows':_0x152bd0}:null;})[_0x2eed08(0x155)](respondWithResult(_0xbc51d0,null))[_0x2eed08(0x148)](handleError(_0xbc51d0,null));},exports[a342_0x397445(0x161)]=function(_0x1f7ff1,_0x5ef3a8){const _0x1073fc=a342_0x397445;let _0x323c58={};const _0x160573={};let _0xe21f35,_0x20b37f;return db['SalesforceConfiguration'][_0x1073fc(0x142)]({'where':{'id':_0x1f7ff1[_0x1073fc(0x141)]['id']}})[_0x1073fc(0x155)](handleEntityNotFound(_0x5ef3a8,null))['then'](function(_0x85ac9d){const _0x6e020f=_0x1073fc;if(_0x85ac9d)return _0xe21f35=_0x85ac9d,_0x160573['model']=_[_0x6e020f(0x140)](db[_0x6e020f(0x138)]['rawAttributes']),_0x160573[_0x6e020f(0x14f)]=_[_0x6e020f(0x140)](_0x1f7ff1[_0x6e020f(0x14f)]),_0x160573[_0x6e020f(0x156)]=_['intersection'](_0x160573['model'],_0x160573[_0x6e020f(0x14f)]),_0x323c58['attributes']=_[_0x6e020f(0x14d)](_0x160573[_0x6e020f(0x151)],qs[_0x6e020f(0x169)](_0x1f7ff1[_0x6e020f(0x14f)]['fields'])),_0x323c58[_0x6e020f(0x162)]=_0x323c58[_0x6e020f(0x162)][_0x6e020f(0x150)]?_0x323c58[_0x6e020f(0x162)]:_0x160573['model'],_0x323c58['order']=qs['sort'](_0x1f7ff1[_0x6e020f(0x14f)][_0x6e020f(0x143)]),_0x323c58['where']=qs[_0x6e020f(0x156)](_[_0x6e020f(0x13f)](_0x1f7ff1['query'],_0x160573['filters'])),_0x1f7ff1[_0x6e020f(0x14f)]['filter']&&(_0x323c58[_0x6e020f(0x15c)]=_[_0x6e020f(0x160)](_0x323c58[_0x6e020f(0x15c)],{[Op['or']]:_[_0x6e020f(0x14e)](_0x323c58['attributes'],function(_0x19d698){const _0x3b41ca=_0x6e020f,_0x400373={};return _0x400373[_0x19d698]={[Op[_0x3b41ca(0x164)]]:'%'+_0x1f7ff1['query'][_0x3b41ca(0x16f)]+'%'},_0x400373;})})),_0x323c58=_[_0x6e020f(0x160)]({},_0x323c58,_0x1f7ff1[_0x6e020f(0x149)]),_0xe21f35['getDescriptions'](_0x323c58);})[_0x1073fc(0x155)](function(_0x3ca627){const _0x114e3e=_0x1073fc;if(_0x3ca627)return _0x20b37f=_0x3ca627[_0x114e3e(0x150)],typeof _0x1f7ff1[_0x114e3e(0x14f)][_0x114e3e(0x166)]===_0x114e3e(0x15f)&&(_0x323c58[_0x114e3e(0x13a)]=qs[_0x114e3e(0x13a)](_0x1f7ff1[_0x114e3e(0x14f)][_0x114e3e(0x13a)]),_0x323c58['offset']=qs['offset'](_0x1f7ff1['query']['offset'])),_0xe21f35[_0x114e3e(0x161)](_0x323c58);})[_0x1073fc(0x155)](function(_0x3284ef){if(_0x3284ef)return _0x3284ef?{'count':_0x20b37f,'rows':_0x3284ef}:null;})[_0x1073fc(0x155)](respondWithResult(_0x5ef3a8,null))[_0x1073fc(0x148)](handleError(_0x5ef3a8,null));};
\ No newline at end of file