Built motion from commit 5fcd269f5146f10cf3129722d518881dfac64576. Version 3.0.0...
[motion-next.git] / server / api / intDynamics365Configuration / intDynamics365Configuration.controller.js
index 1a5b91f..6f98172 100644 (file)
@@ -1 +1 @@
-const a247_0x22be=['Content-Range','create','json','fieldName','update','getDescriptions','../../config/logger','order','body','query','fields','stack','show','sequelize','nolimit','intersection','sendStatus','map','status','limit','Dynamics365Configuration','like','where','then','findOne','catch','Dynamics365Field','merge','sort','undefined','api','length','getSubjects','include','count','rows','name','../../mysqldb','attributes','offset','options','destroy','filter','end','includeAll','pick','send','rawAttributes','getFields','model','keys','params','type','filters'];(function(_0x3b5d8a,_0x22bed5){const _0x44cfc8=function(_0x2c23c6){while(--_0x2c23c6){_0x3b5d8a['push'](_0x3b5d8a['shift']());}};_0x44cfc8(++_0x22bed5);}(a247_0x22be,0xa7));const a247_0x44cf=function(_0x3b5d8a,_0x22bed5){_0x3b5d8a=_0x3b5d8a-0x0;let _0x44cfc8=a247_0x22be[_0x3b5d8a];return _0x44cfc8;};const _0x259f78=a247_0x44cf;'use strict';const _=require('lodash'),qs=require('../../components/parsers/qs'),logger=require(_0x259f78('0x1'))(_0x259f78('0x19')),db=require(_0x259f78('0x20'))['db'],{Op}=require(_0x259f78('0x8'));function respondWithResult(_0x2c23c6,_0x179991){return _0x179991=_0x179991||0xc8,function(_0x14df52){const _0x1a162e=a247_0x44cf;if(_0x14df52)return _0x2c23c6['status'](_0x179991)[_0x1a162e('0x33')](_0x14df52);};}function respondWithFilteredResult(_0x2e6d1b,_0x36657f){return function(_0x487fdf){const _0x595b7d=a247_0x44cf;if(_0x487fdf){const _0x4e6938=_0x487fdf['count'],_0x5913b5=_0x36657f['offset'];let _0x1acf93=_0x36657f['offset']+_0x36657f[_0x595b7d('0xe')],_0x427877;return _0x1acf93>=_0x4e6938?(_0x1acf93=_0x4e6938,_0x427877=0xc8):_0x427877=0xce,_0x2e6d1b['status'](_0x427877),_0x2e6d1b['set'](_0x595b7d('0x31'),_0x5913b5+'-'+_0x1acf93+'/'+_0x4e6938)[_0x595b7d('0x33')](_0x487fdf);}return null;};}function saveUpdates(_0x305358){return function(_0x5b5403){const _0x3a1fa6=a247_0x44cf;if(_0x5b5403)return _0x5b5403[_0x3a1fa6('0x35')](_0x305358)['then'](function(_0x57cf23){return _0x57cf23;});return null;};}function removeEntity(_0x2e0a8a){return function(_0x1c8ad6){const _0x47ff92=a247_0x44cf;if(_0x1c8ad6)return _0x1c8ad6[_0x47ff92('0x24')]()['then'](function(){const _0x4815ca=_0x47ff92;_0x2e0a8a[_0x4815ca('0xd')](0xcc)[_0x4815ca('0x26')]();});};}function handleEntityNotFound(_0x3fa3d1){return function(_0x3ea7bb){const _0x414f28=a247_0x44cf;return!_0x3ea7bb&&_0x3fa3d1[_0x414f28('0xb')](0x194),_0x3ea7bb;};}function handleError(_0x37795d,_0x28814d){return _0x28814d=_0x28814d||0x1f4,function(_0x288998){const _0x3f7926=a247_0x44cf;logger['error'](_0x288998[_0x3f7926('0x6')]),_0x288998[_0x3f7926('0x1f')]&&delete _0x288998[_0x3f7926('0x1f')],_0x37795d[_0x3f7926('0xd')](_0x28814d)[_0x3f7926('0x29')](_0x288998);};}exports['index']=function(_0x2623c4,_0x498815){const _0x44784e=_0x259f78;let _0x46c57b={};const _0x41163c={},_0x512e47={'count':0x0,'rows':[]},_0x5630fe=_[_0x44784e('0xc')](db[_0x44784e('0xf')]['rawAttributes'],function(_0xd14bc1){const _0x174510=_0x44784e;return{'name':_0xd14bc1[_0x174510('0x34')],'type':_0xd14bc1[_0x174510('0x2f')]['key']};});_0x41163c[_0x44784e('0x2c')]=_['map'](_0x5630fe,_0x44784e('0x1f')),_0x41163c[_0x44784e('0x4')]=_[_0x44784e('0x2d')](_0x2623c4[_0x44784e('0x4')]),_0x41163c[_0x44784e('0x30')]=_[_0x44784e('0xa')](_0x41163c[_0x44784e('0x2c')],_0x41163c[_0x44784e('0x4')]),_0x46c57b['attributes']=_[_0x44784e('0xa')](_0x41163c[_0x44784e('0x2c')],qs['fields'](_0x2623c4['query'][_0x44784e('0x5')])),_0x46c57b[_0x44784e('0x21')]=_0x46c57b[_0x44784e('0x21')][_0x44784e('0x1a')]?_0x46c57b[_0x44784e('0x21')]:_0x41163c[_0x44784e('0x2c')];typeof _0x2623c4[_0x44784e('0x4')]['nolimit']===_0x44784e('0x18')&&(_0x46c57b[_0x44784e('0xe')]=qs[_0x44784e('0xe')](_0x2623c4[_0x44784e('0x4')][_0x44784e('0xe')]),_0x46c57b[_0x44784e('0x22')]=qs[_0x44784e('0x22')](_0x2623c4[_0x44784e('0x4')][_0x44784e('0x22')]));_0x46c57b[_0x44784e('0x2')]=qs['sort'](_0x2623c4[_0x44784e('0x4')][_0x44784e('0x17')]),_0x46c57b['where']=qs['filters'](_['pick'](_0x2623c4[_0x44784e('0x4')],_0x41163c['filters']),_0x5630fe);_0x2623c4[_0x44784e('0x4')][_0x44784e('0x25')]&&(_0x46c57b[_0x44784e('0x11')]=_['merge'](_0x46c57b[_0x44784e('0x11')],{[Op['or']]:_[_0x44784e('0xc')](_0x5630fe,function(_0x2ebcf4){const _0x15ae4b=_0x44784e;if(_0x2ebcf4[_0x15ae4b('0x2f')]!=='VIRTUAL'){const _0xb3f35b={};return _0xb3f35b[_0x2ebcf4['name']]={[Op[_0x15ae4b('0x10')]]:'%'+_0x2623c4['query'][_0x15ae4b('0x25')]+'%'},_0xb3f35b;}})}));_0x46c57b=_[_0x44784e('0x16')]({},_0x46c57b,_0x2623c4[_0x44784e('0x23')]);const _0x1f90e9={'where':_0x46c57b['where']};return db['Dynamics365Configuration']['count'](_0x1f90e9)[_0x44784e('0x12')](function(_0x2bdd1a){const _0x260606=_0x44784e;return _0x512e47[_0x260606('0x1d')]=_0x2bdd1a,_0x2623c4[_0x260606('0x4')][_0x260606('0x27')]&&(_0x46c57b[_0x260606('0x1c')]=[{'all':!![]}]),db[_0x260606('0xf')]['findAll'](_0x46c57b);})['then'](function(_0x42265c){const _0x3ecdb2=_0x44784e;return _0x512e47[_0x3ecdb2('0x1e')]=_0x42265c,_0x512e47;})[_0x44784e('0x12')](respondWithFilteredResult(_0x498815,_0x46c57b))[_0x44784e('0x14')](handleError(_0x498815,null));},exports[_0x259f78('0x7')]=function(_0x22a545,_0x4664f7){const _0x16fdac=_0x259f78;let _0x5dd072={'raw':![],'where':{'id':_0x22a545[_0x16fdac('0x2e')]['id']}};const _0x503ed6={};return _0x503ed6[_0x16fdac('0x2c')]=_['keys'](db['Dynamics365Configuration'][_0x16fdac('0x2a')]),_0x503ed6[_0x16fdac('0x4')]=_['keys'](_0x22a545[_0x16fdac('0x4')]),_0x503ed6[_0x16fdac('0x30')]=_[_0x16fdac('0xa')](_0x503ed6[_0x16fdac('0x2c')],_0x503ed6[_0x16fdac('0x4')]),_0x5dd072[_0x16fdac('0x21')]=_['intersection'](_0x503ed6[_0x16fdac('0x2c')],qs[_0x16fdac('0x5')](_0x22a545[_0x16fdac('0x4')][_0x16fdac('0x5')])),_0x5dd072['attributes']=_0x5dd072[_0x16fdac('0x21')][_0x16fdac('0x1a')]?_0x5dd072[_0x16fdac('0x21')]:_0x503ed6[_0x16fdac('0x2c')],_0x22a545[_0x16fdac('0x4')][_0x16fdac('0x27')]&&(_0x5dd072[_0x16fdac('0x1c')]=[{'all':!![]}]),_0x5dd072=_[_0x16fdac('0x16')]({},_0x5dd072,_0x22a545[_0x16fdac('0x23')]),db[_0x16fdac('0xf')][_0x16fdac('0x13')](_0x5dd072)[_0x16fdac('0x12')](handleEntityNotFound(_0x4664f7,null))[_0x16fdac('0x12')](respondWithResult(_0x4664f7,null))[_0x16fdac('0x14')](handleError(_0x4664f7,null));},exports['create']=function(_0x22b69e,_0x3c13d6){const _0x50498d=_0x259f78;return db[_0x50498d('0xf')][_0x50498d('0x32')](_0x22b69e[_0x50498d('0x3')],{})['then'](respondWithResult(_0x3c13d6,0xc9))[_0x50498d('0x14')](handleError(_0x3c13d6,null));},exports[_0x259f78('0x35')]=function(_0x5736e8,_0x56090f){const _0x2c9292=_0x259f78;return _0x5736e8[_0x2c9292('0x3')]['id']&&delete _0x5736e8[_0x2c9292('0x3')]['id'],db[_0x2c9292('0xf')][_0x2c9292('0x13')]({'where':{'id':_0x5736e8[_0x2c9292('0x2e')]['id']}})[_0x2c9292('0x12')](handleEntityNotFound(_0x56090f,null))['then'](saveUpdates(_0x5736e8[_0x2c9292('0x3')],null))[_0x2c9292('0x12')](respondWithResult(_0x56090f,null))[_0x2c9292('0x14')](handleError(_0x56090f,null));},exports[_0x259f78('0x24')]=function(_0x515328,_0x3d159c){const _0xaa5745=_0x259f78;return db[_0xaa5745('0xf')][_0xaa5745('0x13')]({'where':{'id':_0x515328['params']['id']}})[_0xaa5745('0x12')](handleEntityNotFound(_0x3d159c,null))[_0xaa5745('0x12')](removeEntity(_0x3d159c,null))['catch'](handleError(_0x3d159c,null));},exports[_0x259f78('0x2b')]=function(_0xad991f,_0x2ddfb9){const _0x170948=_0x259f78;let _0x1dc400={};const _0x489233={};let _0x236c0c,_0x13f5e8;return db[_0x170948('0xf')][_0x170948('0x13')]({'where':{'id':_0xad991f['params']['id']}})['then'](handleEntityNotFound(_0x2ddfb9,null))[_0x170948('0x12')](function(_0x2845f0){const _0x411c9=_0x170948;if(_0x2845f0)return _0x236c0c=_0x2845f0,_0x489233[_0x411c9('0x2c')]=_[_0x411c9('0x2d')](db[_0x411c9('0x15')][_0x411c9('0x2a')]),_0x489233[_0x411c9('0x4')]=_[_0x411c9('0x2d')](_0xad991f['query']),_0x489233['filters']=_[_0x411c9('0xa')](_0x489233['model'],_0x489233['query']),_0x1dc400[_0x411c9('0x21')]=_[_0x411c9('0xa')](_0x489233['model'],qs[_0x411c9('0x5')](_0xad991f[_0x411c9('0x4')][_0x411c9('0x5')])),_0x1dc400['attributes']=_0x1dc400[_0x411c9('0x21')]['length']?_0x1dc400[_0x411c9('0x21')]:_0x489233[_0x411c9('0x2c')],_0x1dc400[_0x411c9('0x2')]=qs[_0x411c9('0x17')](_0xad991f['query'][_0x411c9('0x17')]),_0x1dc400[_0x411c9('0x11')]=qs[_0x411c9('0x30')](_[_0x411c9('0x28')](_0xad991f[_0x411c9('0x4')],_0x489233['filters'])),_0xad991f[_0x411c9('0x4')][_0x411c9('0x25')]&&(_0x1dc400['where']=_[_0x411c9('0x16')](_0x1dc400[_0x411c9('0x11')],{[Op['or']]:_['map'](_0x1dc400['attributes'],function(_0x49cb8c){const _0x4e5466=_0x411c9,_0x49bd8e={};return _0x49bd8e[_0x49cb8c]={[Op[_0x4e5466('0x10')]]:'%'+_0xad991f[_0x4e5466('0x4')][_0x4e5466('0x25')]+'%'},_0x49bd8e;})})),_0x1dc400=_[_0x411c9('0x16')]({},_0x1dc400,_0xad991f[_0x411c9('0x23')]),_0x236c0c[_0x411c9('0x2b')](_0x1dc400);})[_0x170948('0x12')](function(_0x56aa52){const _0x84002b=_0x170948;if(_0x56aa52)return _0x13f5e8=_0x56aa52[_0x84002b('0x1a')],typeof _0xad991f[_0x84002b('0x4')][_0x84002b('0x9')]===_0x84002b('0x18')&&(_0x1dc400[_0x84002b('0xe')]=qs[_0x84002b('0xe')](_0xad991f[_0x84002b('0x4')][_0x84002b('0xe')]),_0x1dc400['offset']=qs[_0x84002b('0x22')](_0xad991f[_0x84002b('0x4')][_0x84002b('0x22')])),_0x236c0c['getFields'](_0x1dc400);})[_0x170948('0x12')](function(_0x34ccfe){if(_0x34ccfe)return _0x34ccfe?{'count':_0x13f5e8,'rows':_0x34ccfe}:null;})[_0x170948('0x12')](respondWithResult(_0x2ddfb9,null))[_0x170948('0x14')](handleError(_0x2ddfb9,null));},exports[_0x259f78('0x1b')]=function(_0x13f1d1,_0x1f6059){const _0x2e465d=_0x259f78;let _0x2c23ba={};const _0x2334f1={};let _0x34c168,_0x329919;return db['Dynamics365Configuration']['findOne']({'where':{'id':_0x13f1d1[_0x2e465d('0x2e')]['id']}})[_0x2e465d('0x12')](handleEntityNotFound(_0x1f6059,null))[_0x2e465d('0x12')](function(_0xf231f0){const _0x27c1d7=_0x2e465d;if(_0xf231f0)return _0x34c168=_0xf231f0,_0x2334f1[_0x27c1d7('0x2c')]=_[_0x27c1d7('0x2d')](db['Dynamics365Field'][_0x27c1d7('0x2a')]),_0x2334f1['query']=_['keys'](_0x13f1d1[_0x27c1d7('0x4')]),_0x2334f1[_0x27c1d7('0x30')]=_[_0x27c1d7('0xa')](_0x2334f1[_0x27c1d7('0x2c')],_0x2334f1[_0x27c1d7('0x4')]),_0x2c23ba['attributes']=_[_0x27c1d7('0xa')](_0x2334f1[_0x27c1d7('0x2c')],qs[_0x27c1d7('0x5')](_0x13f1d1[_0x27c1d7('0x4')][_0x27c1d7('0x5')])),_0x2c23ba[_0x27c1d7('0x21')]=_0x2c23ba['attributes']['length']?_0x2c23ba[_0x27c1d7('0x21')]:_0x2334f1['model'],_0x2c23ba[_0x27c1d7('0x2')]=qs['sort'](_0x13f1d1['query'][_0x27c1d7('0x17')]),_0x2c23ba[_0x27c1d7('0x11')]=qs[_0x27c1d7('0x30')](_[_0x27c1d7('0x28')](_0x13f1d1['query'],_0x2334f1[_0x27c1d7('0x30')])),_0x13f1d1[_0x27c1d7('0x4')]['filter']&&(_0x2c23ba[_0x27c1d7('0x11')]=_[_0x27c1d7('0x16')](_0x2c23ba[_0x27c1d7('0x11')],{[Op['or']]:_[_0x27c1d7('0xc')](_0x2c23ba[_0x27c1d7('0x21')],function(_0x1272fb){const _0x10b06c=_0x27c1d7,_0x2988ea={};return _0x2988ea[_0x1272fb]={[Op[_0x10b06c('0x10')]]:'%'+_0x13f1d1[_0x10b06c('0x4')][_0x10b06c('0x25')]+'%'},_0x2988ea;})})),_0x2c23ba=_['merge']({},_0x2c23ba,_0x13f1d1[_0x27c1d7('0x23')]),_0x34c168[_0x27c1d7('0x1b')](_0x2c23ba);})[_0x2e465d('0x12')](function(_0x2929a0){const _0x4231b5=_0x2e465d;if(_0x2929a0)return _0x329919=_0x2929a0[_0x4231b5('0x1a')],typeof _0x13f1d1[_0x4231b5('0x4')][_0x4231b5('0x9')]===_0x4231b5('0x18')&&(_0x2c23ba[_0x4231b5('0xe')]=qs['limit'](_0x13f1d1['query'][_0x4231b5('0xe')]),_0x2c23ba[_0x4231b5('0x22')]=qs[_0x4231b5('0x22')](_0x13f1d1['query'][_0x4231b5('0x22')])),_0x34c168[_0x4231b5('0x1b')](_0x2c23ba);})[_0x2e465d('0x12')](function(_0x1942dc){if(_0x1942dc)return _0x1942dc?{'count':_0x329919,'rows':_0x1942dc}:null;})['then'](respondWithResult(_0x1f6059,null))[_0x2e465d('0x14')](handleError(_0x1f6059,null));},exports[_0x259f78('0x0')]=function(_0x42ab9c,_0x3d5531){const _0x5d9df9=_0x259f78;let _0x31e8aa={};const _0xb83a24={};let _0x99928,_0x44bff8;return db[_0x5d9df9('0xf')]['findOne']({'where':{'id':_0x42ab9c['params']['id']}})['then'](handleEntityNotFound(_0x3d5531,null))[_0x5d9df9('0x12')](function(_0x524099){const _0x34289c=_0x5d9df9;if(_0x524099)return _0x99928=_0x524099,_0xb83a24['model']=_[_0x34289c('0x2d')](db[_0x34289c('0x15')][_0x34289c('0x2a')]),_0xb83a24[_0x34289c('0x4')]=_[_0x34289c('0x2d')](_0x42ab9c[_0x34289c('0x4')]),_0xb83a24[_0x34289c('0x30')]=_['intersection'](_0xb83a24['model'],_0xb83a24[_0x34289c('0x4')]),_0x31e8aa[_0x34289c('0x21')]=_['intersection'](_0xb83a24[_0x34289c('0x2c')],qs[_0x34289c('0x5')](_0x42ab9c[_0x34289c('0x4')][_0x34289c('0x5')])),_0x31e8aa[_0x34289c('0x21')]=_0x31e8aa[_0x34289c('0x21')][_0x34289c('0x1a')]?_0x31e8aa[_0x34289c('0x21')]:_0xb83a24[_0x34289c('0x2c')],_0x31e8aa[_0x34289c('0x2')]=qs['sort'](_0x42ab9c['query'][_0x34289c('0x17')]),_0x31e8aa[_0x34289c('0x11')]=qs[_0x34289c('0x30')](_[_0x34289c('0x28')](_0x42ab9c[_0x34289c('0x4')],_0xb83a24['filters'])),_0x42ab9c[_0x34289c('0x4')]['filter']&&(_0x31e8aa[_0x34289c('0x11')]=_['merge'](_0x31e8aa['where'],{[Op['or']]:_['map'](_0x31e8aa['attributes'],function(_0x383288){const _0x511c8e=_0x34289c,_0x2aa425={};return _0x2aa425[_0x383288]={[Op['like']]:'%'+_0x42ab9c['query'][_0x511c8e('0x25')]+'%'},_0x2aa425;})})),_0x31e8aa=_[_0x34289c('0x16')]({},_0x31e8aa,_0x42ab9c[_0x34289c('0x23')]),_0x99928[_0x34289c('0x0')](_0x31e8aa);})[_0x5d9df9('0x12')](function(_0x4ab43a){const _0x883d3d=_0x5d9df9;if(_0x4ab43a)return _0x44bff8=_0x4ab43a['length'],typeof _0x42ab9c['query'][_0x883d3d('0x9')]==='undefined'&&(_0x31e8aa[_0x883d3d('0xe')]=qs[_0x883d3d('0xe')](_0x42ab9c[_0x883d3d('0x4')][_0x883d3d('0xe')]),_0x31e8aa['offset']=qs[_0x883d3d('0x22')](_0x42ab9c['query'][_0x883d3d('0x22')])),_0x99928[_0x883d3d('0x0')](_0x31e8aa);})[_0x5d9df9('0x12')](function(_0x33b340){if(_0x33b340)return _0x33b340?{'count':_0x44bff8,'rows':_0x33b340}:null;})[_0x5d9df9('0x12')](respondWithResult(_0x3d5531,null))[_0x5d9df9('0x14')](handleError(_0x3d5531,null));};
\ No newline at end of file
+const a247_0x5193=['include','type','attributes','Content-Range','body','../../mysqldb','nolimit','api','../../components/parsers/qs','fields','undefined','filters','index','set','catch','getDescriptions','status','filter','like','merge','key','rows','params','includeAll','end','findAll','query','model','fieldName','sort','stack','error','destroy','update','count','../../config/logger','Dynamics365Field','length','getSubjects','show','where','order','send','findOne','json','map','Dynamics365Configuration','VIRTUAL','intersection','then','options','keys','lodash','pick','rawAttributes','offset','name','limit'];(function(_0x1f6d75,_0x51934c){const _0x2922b2=function(_0x1b1937){while(--_0x1b1937){_0x1f6d75['push'](_0x1f6d75['shift']());}};_0x2922b2(++_0x51934c);}(a247_0x5193,0x13a));const a247_0x2922=function(_0x1f6d75,_0x51934c){_0x1f6d75=_0x1f6d75-0x0;let _0x2922b2=a247_0x5193[_0x1f6d75];return _0x2922b2;};const _0x55ad02=a247_0x2922;'use strict';const _=require(_0x55ad02('0x1c')),qs=require(_0x55ad02('0x2a')),logger=require(_0x55ad02('0xb'))(_0x55ad02('0x29')),db=require(_0x55ad02('0x27'))['db'],{Op}=require('sequelize');function respondWithResult(_0x1b1937,_0x1cf19c){return _0x1cf19c=_0x1cf19c||0xc8,function(_0x2ffbdf){const _0x196354=a247_0x2922;if(_0x2ffbdf)return _0x1b1937[_0x196354('0x32')](_0x1cf19c)[_0x196354('0x14')](_0x2ffbdf);};}function respondWithFilteredResult(_0x43ec12,_0x22dd77){return function(_0xb1e3b9){const _0x3f859f=a247_0x2922;if(_0xb1e3b9){const _0xc20660=_0xb1e3b9[_0x3f859f('0xa')],_0x57a2ed=_0x22dd77[_0x3f859f('0x1f')];let _0x3c6091=_0x22dd77[_0x3f859f('0x1f')]+_0x22dd77[_0x3f859f('0x21')],_0x1733e4;return _0x3c6091>=_0xc20660?(_0x3c6091=_0xc20660,_0x1733e4=0xc8):_0x1733e4=0xce,_0x43ec12[_0x3f859f('0x32')](_0x1733e4),_0x43ec12[_0x3f859f('0x2f')](_0x3f859f('0x25'),_0x57a2ed+'-'+_0x3c6091+'/'+_0xc20660)[_0x3f859f('0x14')](_0xb1e3b9);}return null;};}function saveUpdates(_0x24db10){return function(_0x162acc){const _0x317254=a247_0x2922;if(_0x162acc)return _0x162acc[_0x317254('0x9')](_0x24db10)['then'](function(_0x2f70c5){return _0x2f70c5;});return null;};}function removeEntity(_0x52b5cc){return function(_0x100abb){const _0x398761=a247_0x2922;if(_0x100abb)return _0x100abb['destroy']()[_0x398761('0x19')](function(){const _0x17434e=_0x398761;_0x52b5cc[_0x17434e('0x32')](0xcc)[_0x17434e('0x0')]();});};}function handleEntityNotFound(_0x264f00){return function(_0x10f76f){return!_0x10f76f&&_0x264f00['sendStatus'](0x194),_0x10f76f;};}function handleError(_0x2092eb,_0x3f0169){return _0x3f0169=_0x3f0169||0x1f4,function(_0x20874a){const _0x63d430=a247_0x2922;logger[_0x63d430('0x7')](_0x20874a[_0x63d430('0x6')]),_0x20874a[_0x63d430('0x20')]&&delete _0x20874a[_0x63d430('0x20')],_0x2092eb[_0x63d430('0x32')](_0x3f0169)[_0x63d430('0x12')](_0x20874a);};}exports[_0x55ad02('0x2e')]=function(_0xd1dc0d,_0x14e89f){const _0x5058d1=_0x55ad02;let _0x344b8c={};const _0x4c4008={},_0x218120={'count':0x0,'rows':[]},_0x1b17cb=_[_0x5058d1('0x15')](db[_0x5058d1('0x16')][_0x5058d1('0x1e')],function(_0xf23659){const _0x57e9f1=_0x5058d1;return{'name':_0xf23659[_0x57e9f1('0x4')],'type':_0xf23659[_0x57e9f1('0x23')][_0x57e9f1('0x36')]};});_0x4c4008[_0x5058d1('0x3')]=_[_0x5058d1('0x15')](_0x1b17cb,_0x5058d1('0x20')),_0x4c4008['query']=_['keys'](_0xd1dc0d[_0x5058d1('0x2')]),_0x4c4008[_0x5058d1('0x2d')]=_[_0x5058d1('0x18')](_0x4c4008['model'],_0x4c4008[_0x5058d1('0x2')]),_0x344b8c[_0x5058d1('0x24')]=_[_0x5058d1('0x18')](_0x4c4008[_0x5058d1('0x3')],qs[_0x5058d1('0x2b')](_0xd1dc0d[_0x5058d1('0x2')][_0x5058d1('0x2b')])),_0x344b8c['attributes']=_0x344b8c[_0x5058d1('0x24')][_0x5058d1('0xd')]?_0x344b8c['attributes']:_0x4c4008[_0x5058d1('0x3')];typeof _0xd1dc0d[_0x5058d1('0x2')][_0x5058d1('0x28')]===_0x5058d1('0x2c')&&(_0x344b8c[_0x5058d1('0x21')]=qs[_0x5058d1('0x21')](_0xd1dc0d[_0x5058d1('0x2')]['limit']),_0x344b8c[_0x5058d1('0x1f')]=qs[_0x5058d1('0x1f')](_0xd1dc0d['query'][_0x5058d1('0x1f')]));_0x344b8c[_0x5058d1('0x11')]=qs[_0x5058d1('0x5')](_0xd1dc0d['query'][_0x5058d1('0x5')]),_0x344b8c[_0x5058d1('0x10')]=qs[_0x5058d1('0x2d')](_[_0x5058d1('0x1d')](_0xd1dc0d['query'],_0x4c4008[_0x5058d1('0x2d')]),_0x1b17cb);_0xd1dc0d['query'][_0x5058d1('0x33')]&&(_0x344b8c[_0x5058d1('0x10')]=_[_0x5058d1('0x35')](_0x344b8c[_0x5058d1('0x10')],{[Op['or']]:_[_0x5058d1('0x15')](_0x1b17cb,function(_0x2d621a){const _0x14b159=_0x5058d1;if(_0x2d621a[_0x14b159('0x23')]!==_0x14b159('0x17')){const _0x41f068={};return _0x41f068[_0x2d621a['name']]={[Op[_0x14b159('0x34')]]:'%'+_0xd1dc0d[_0x14b159('0x2')][_0x14b159('0x33')]+'%'},_0x41f068;}})}));_0x344b8c=_['merge']({},_0x344b8c,_0xd1dc0d[_0x5058d1('0x1a')]);const _0x589bb1={'where':_0x344b8c[_0x5058d1('0x10')]};return db[_0x5058d1('0x16')][_0x5058d1('0xa')](_0x589bb1)[_0x5058d1('0x19')](function(_0x10551a){const _0x2766ac=_0x5058d1;return _0x218120[_0x2766ac('0xa')]=_0x10551a,_0xd1dc0d[_0x2766ac('0x2')][_0x2766ac('0x39')]&&(_0x344b8c[_0x2766ac('0x22')]=[{'all':!![]}]),db[_0x2766ac('0x16')][_0x2766ac('0x1')](_0x344b8c);})[_0x5058d1('0x19')](function(_0x339dac){const _0x3e6312=_0x5058d1;return _0x218120[_0x3e6312('0x37')]=_0x339dac,_0x218120;})[_0x5058d1('0x19')](respondWithFilteredResult(_0x14e89f,_0x344b8c))['catch'](handleError(_0x14e89f,null));},exports[_0x55ad02('0xf')]=function(_0x2d17a3,_0xf66a4e){const _0xfbb5f8=_0x55ad02;let _0x6320f5={'raw':![],'where':{'id':_0x2d17a3[_0xfbb5f8('0x38')]['id']}};const _0x357f56={};return _0x357f56[_0xfbb5f8('0x3')]=_[_0xfbb5f8('0x1b')](db[_0xfbb5f8('0x16')][_0xfbb5f8('0x1e')]),_0x357f56[_0xfbb5f8('0x2')]=_[_0xfbb5f8('0x1b')](_0x2d17a3[_0xfbb5f8('0x2')]),_0x357f56[_0xfbb5f8('0x2d')]=_[_0xfbb5f8('0x18')](_0x357f56[_0xfbb5f8('0x3')],_0x357f56['query']),_0x6320f5[_0xfbb5f8('0x24')]=_[_0xfbb5f8('0x18')](_0x357f56[_0xfbb5f8('0x3')],qs[_0xfbb5f8('0x2b')](_0x2d17a3[_0xfbb5f8('0x2')][_0xfbb5f8('0x2b')])),_0x6320f5[_0xfbb5f8('0x24')]=_0x6320f5[_0xfbb5f8('0x24')][_0xfbb5f8('0xd')]?_0x6320f5[_0xfbb5f8('0x24')]:_0x357f56[_0xfbb5f8('0x3')],_0x2d17a3['query'][_0xfbb5f8('0x39')]&&(_0x6320f5[_0xfbb5f8('0x22')]=[{'all':!![]}]),_0x6320f5=_[_0xfbb5f8('0x35')]({},_0x6320f5,_0x2d17a3[_0xfbb5f8('0x1a')]),db[_0xfbb5f8('0x16')]['findOne'](_0x6320f5)[_0xfbb5f8('0x19')](handleEntityNotFound(_0xf66a4e,null))[_0xfbb5f8('0x19')](respondWithResult(_0xf66a4e,null))['catch'](handleError(_0xf66a4e,null));},exports['create']=function(_0x20ef1d,_0x155f43){const _0x4b2f6a=_0x55ad02;return db[_0x4b2f6a('0x16')]['create'](_0x20ef1d[_0x4b2f6a('0x26')],{})[_0x4b2f6a('0x19')](respondWithResult(_0x155f43,0xc9))[_0x4b2f6a('0x30')](handleError(_0x155f43,null));},exports[_0x55ad02('0x9')]=function(_0x3008e9,_0x320860){const _0x181ef6=_0x55ad02;return _0x3008e9[_0x181ef6('0x26')]['id']&&delete _0x3008e9[_0x181ef6('0x26')]['id'],db[_0x181ef6('0x16')][_0x181ef6('0x13')]({'where':{'id':_0x3008e9['params']['id']}})['then'](handleEntityNotFound(_0x320860,null))[_0x181ef6('0x19')](saveUpdates(_0x3008e9[_0x181ef6('0x26')],null))[_0x181ef6('0x19')](respondWithResult(_0x320860,null))['catch'](handleError(_0x320860,null));},exports[_0x55ad02('0x8')]=function(_0x10138e,_0x226adb){const _0x14913c=_0x55ad02;return db['Dynamics365Configuration']['findOne']({'where':{'id':_0x10138e['params']['id']}})[_0x14913c('0x19')](handleEntityNotFound(_0x226adb,null))['then'](removeEntity(_0x226adb,null))[_0x14913c('0x30')](handleError(_0x226adb,null));},exports['getFields']=function(_0x40c725,_0x1e788e){const _0xc16ee6=_0x55ad02;let _0x4e53dd={};const _0x3762ef={};let _0x32c021,_0x27c7dd;return db['Dynamics365Configuration'][_0xc16ee6('0x13')]({'where':{'id':_0x40c725[_0xc16ee6('0x38')]['id']}})[_0xc16ee6('0x19')](handleEntityNotFound(_0x1e788e,null))[_0xc16ee6('0x19')](function(_0x1c118e){const _0x2617dc=_0xc16ee6;if(_0x1c118e)return _0x32c021=_0x1c118e,_0x3762ef['model']=_[_0x2617dc('0x1b')](db['Dynamics365Field'][_0x2617dc('0x1e')]),_0x3762ef[_0x2617dc('0x2')]=_[_0x2617dc('0x1b')](_0x40c725[_0x2617dc('0x2')]),_0x3762ef[_0x2617dc('0x2d')]=_[_0x2617dc('0x18')](_0x3762ef[_0x2617dc('0x3')],_0x3762ef['query']),_0x4e53dd['attributes']=_['intersection'](_0x3762ef[_0x2617dc('0x3')],qs['fields'](_0x40c725[_0x2617dc('0x2')][_0x2617dc('0x2b')])),_0x4e53dd[_0x2617dc('0x24')]=_0x4e53dd[_0x2617dc('0x24')][_0x2617dc('0xd')]?_0x4e53dd['attributes']:_0x3762ef[_0x2617dc('0x3')],_0x4e53dd['order']=qs[_0x2617dc('0x5')](_0x40c725[_0x2617dc('0x2')][_0x2617dc('0x5')]),_0x4e53dd[_0x2617dc('0x10')]=qs[_0x2617dc('0x2d')](_['pick'](_0x40c725[_0x2617dc('0x2')],_0x3762ef['filters'])),_0x40c725[_0x2617dc('0x2')]['filter']&&(_0x4e53dd[_0x2617dc('0x10')]=_['merge'](_0x4e53dd[_0x2617dc('0x10')],{[Op['or']]:_['map'](_0x4e53dd[_0x2617dc('0x24')],function(_0xb82b16){const _0x4a43fd=_0x2617dc,_0xa369d4={};return _0xa369d4[_0xb82b16]={[Op[_0x4a43fd('0x34')]]:'%'+_0x40c725[_0x4a43fd('0x2')][_0x4a43fd('0x33')]+'%'},_0xa369d4;})})),_0x4e53dd=_[_0x2617dc('0x35')]({},_0x4e53dd,_0x40c725['options']),_0x32c021['getFields'](_0x4e53dd);})['then'](function(_0x37091a){const _0x5c2ba5=_0xc16ee6;if(_0x37091a)return _0x27c7dd=_0x37091a['length'],typeof _0x40c725[_0x5c2ba5('0x2')][_0x5c2ba5('0x28')]===_0x5c2ba5('0x2c')&&(_0x4e53dd[_0x5c2ba5('0x21')]=qs['limit'](_0x40c725[_0x5c2ba5('0x2')][_0x5c2ba5('0x21')]),_0x4e53dd[_0x5c2ba5('0x1f')]=qs['offset'](_0x40c725[_0x5c2ba5('0x2')]['offset'])),_0x32c021['getFields'](_0x4e53dd);})[_0xc16ee6('0x19')](function(_0x92a5bf){if(_0x92a5bf)return _0x92a5bf?{'count':_0x27c7dd,'rows':_0x92a5bf}:null;})['then'](respondWithResult(_0x1e788e,null))['catch'](handleError(_0x1e788e,null));},exports['getSubjects']=function(_0xfe24b2,_0xab5e28){const _0x128dbe=_0x55ad02;let _0x40719e={};const _0x5040cd={};let _0x521ab0,_0x5b6db3;return db['Dynamics365Configuration'][_0x128dbe('0x13')]({'where':{'id':_0xfe24b2[_0x128dbe('0x38')]['id']}})[_0x128dbe('0x19')](handleEntityNotFound(_0xab5e28,null))['then'](function(_0x57134e){const _0x4aa8df=_0x128dbe;if(_0x57134e)return _0x521ab0=_0x57134e,_0x5040cd['model']=_[_0x4aa8df('0x1b')](db[_0x4aa8df('0xc')][_0x4aa8df('0x1e')]),_0x5040cd[_0x4aa8df('0x2')]=_[_0x4aa8df('0x1b')](_0xfe24b2[_0x4aa8df('0x2')]),_0x5040cd[_0x4aa8df('0x2d')]=_[_0x4aa8df('0x18')](_0x5040cd[_0x4aa8df('0x3')],_0x5040cd[_0x4aa8df('0x2')]),_0x40719e[_0x4aa8df('0x24')]=_['intersection'](_0x5040cd[_0x4aa8df('0x3')],qs[_0x4aa8df('0x2b')](_0xfe24b2[_0x4aa8df('0x2')][_0x4aa8df('0x2b')])),_0x40719e['attributes']=_0x40719e['attributes'][_0x4aa8df('0xd')]?_0x40719e[_0x4aa8df('0x24')]:_0x5040cd[_0x4aa8df('0x3')],_0x40719e['order']=qs['sort'](_0xfe24b2[_0x4aa8df('0x2')][_0x4aa8df('0x5')]),_0x40719e[_0x4aa8df('0x10')]=qs['filters'](_[_0x4aa8df('0x1d')](_0xfe24b2[_0x4aa8df('0x2')],_0x5040cd[_0x4aa8df('0x2d')])),_0xfe24b2[_0x4aa8df('0x2')]['filter']&&(_0x40719e[_0x4aa8df('0x10')]=_[_0x4aa8df('0x35')](_0x40719e[_0x4aa8df('0x10')],{[Op['or']]:_[_0x4aa8df('0x15')](_0x40719e[_0x4aa8df('0x24')],function(_0x21e94d){const _0x20eadc=_0x4aa8df,_0x365199={};return _0x365199[_0x21e94d]={[Op['like']]:'%'+_0xfe24b2[_0x20eadc('0x2')][_0x20eadc('0x33')]+'%'},_0x365199;})})),_0x40719e=_[_0x4aa8df('0x35')]({},_0x40719e,_0xfe24b2[_0x4aa8df('0x1a')]),_0x521ab0[_0x4aa8df('0xe')](_0x40719e);})[_0x128dbe('0x19')](function(_0x4f71af){const _0x2325d6=_0x128dbe;if(_0x4f71af)return _0x5b6db3=_0x4f71af[_0x2325d6('0xd')],typeof _0xfe24b2[_0x2325d6('0x2')]['nolimit']===_0x2325d6('0x2c')&&(_0x40719e[_0x2325d6('0x21')]=qs[_0x2325d6('0x21')](_0xfe24b2[_0x2325d6('0x2')]['limit']),_0x40719e['offset']=qs[_0x2325d6('0x1f')](_0xfe24b2['query'][_0x2325d6('0x1f')])),_0x521ab0['getSubjects'](_0x40719e);})[_0x128dbe('0x19')](function(_0x245eaa){if(_0x245eaa)return _0x245eaa?{'count':_0x5b6db3,'rows':_0x245eaa}:null;})[_0x128dbe('0x19')](respondWithResult(_0xab5e28,null))[_0x128dbe('0x30')](handleError(_0xab5e28,null));},exports['getDescriptions']=function(_0x6ca9f4,_0x5d81e5){const _0x44d9e3=_0x55ad02;let _0x340876={};const _0x447a74={};let _0x3d5fc5,_0x36096c;return db[_0x44d9e3('0x16')][_0x44d9e3('0x13')]({'where':{'id':_0x6ca9f4[_0x44d9e3('0x38')]['id']}})['then'](handleEntityNotFound(_0x5d81e5,null))[_0x44d9e3('0x19')](function(_0x5b8768){const _0x4afe21=_0x44d9e3;if(_0x5b8768)return _0x3d5fc5=_0x5b8768,_0x447a74[_0x4afe21('0x3')]=_[_0x4afe21('0x1b')](db[_0x4afe21('0xc')][_0x4afe21('0x1e')]),_0x447a74['query']=_['keys'](_0x6ca9f4[_0x4afe21('0x2')]),_0x447a74['filters']=_['intersection'](_0x447a74[_0x4afe21('0x3')],_0x447a74[_0x4afe21('0x2')]),_0x340876[_0x4afe21('0x24')]=_['intersection'](_0x447a74['model'],qs['fields'](_0x6ca9f4[_0x4afe21('0x2')][_0x4afe21('0x2b')])),_0x340876['attributes']=_0x340876[_0x4afe21('0x24')][_0x4afe21('0xd')]?_0x340876[_0x4afe21('0x24')]:_0x447a74['model'],_0x340876[_0x4afe21('0x11')]=qs['sort'](_0x6ca9f4[_0x4afe21('0x2')][_0x4afe21('0x5')]),_0x340876['where']=qs[_0x4afe21('0x2d')](_[_0x4afe21('0x1d')](_0x6ca9f4[_0x4afe21('0x2')],_0x447a74['filters'])),_0x6ca9f4[_0x4afe21('0x2')]['filter']&&(_0x340876['where']=_[_0x4afe21('0x35')](_0x340876[_0x4afe21('0x10')],{[Op['or']]:_[_0x4afe21('0x15')](_0x340876[_0x4afe21('0x24')],function(_0x1b41e9){const _0x43745d=_0x4afe21,_0x2a5ae2={};return _0x2a5ae2[_0x1b41e9]={[Op[_0x43745d('0x34')]]:'%'+_0x6ca9f4['query']['filter']+'%'},_0x2a5ae2;})})),_0x340876=_[_0x4afe21('0x35')]({},_0x340876,_0x6ca9f4['options']),_0x3d5fc5[_0x4afe21('0x31')](_0x340876);})[_0x44d9e3('0x19')](function(_0x57048f){const _0x57e12f=_0x44d9e3;if(_0x57048f)return _0x36096c=_0x57048f[_0x57e12f('0xd')],typeof _0x6ca9f4[_0x57e12f('0x2')][_0x57e12f('0x28')]===_0x57e12f('0x2c')&&(_0x340876[_0x57e12f('0x21')]=qs['limit'](_0x6ca9f4[_0x57e12f('0x2')]['limit']),_0x340876['offset']=qs['offset'](_0x6ca9f4['query'][_0x57e12f('0x1f')])),_0x3d5fc5[_0x57e12f('0x31')](_0x340876);})[_0x44d9e3('0x19')](function(_0x24e80b){if(_0x24e80b)return _0x24e80b?{'count':_0x36096c,'rows':_0x24e80b}:null;})[_0x44d9e3('0x19')](respondWithResult(_0x5d81e5,null))[_0x44d9e3('0x30')](handleError(_0x5d81e5,null));};
\ No newline at end of file