Built motion from commit (unavailable).|2.5.31
[motion2.git] / server / api / intFreshdeskField / intFreshdeskField.controller.js
index d0ee41b..243ea34 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3f50=['ejs','fs-extra','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../mysqldb','sendStatus','end','json','offset','undefined','limit','count','status','set','Content-Range','apply','reject','save','update','destroy','error','name','render','merge','body','contact','message','interaction','account','index','map','FreshdeskField','fieldName','type','model','keys','query','filters','intersection','attributes','fields','hasOwnProperty','order','sort','filter','where','VIRTUAL','options','then','include','findAll','rows','catch','rawAttributes','includeAll','find','create','params','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','to-csv'];(function(_0x1c75de,_0x52c9b3){var _0x20a5e6=function(_0x5cbec1){while(--_0x5cbec1){_0x1c75de['push'](_0x1c75de['shift']());}};_0x20a5e6(++_0x52c9b3);}(_0x3f50,0x127));var _0x03f5=function(_0x9b6536,_0x56f83d){_0x9b6536=_0x9b6536-0x0;var _0x438675=_0x3f50[_0x9b6536];return _0x438675;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x03f5('0x0'));var zipdir=require(_0x03f5('0x1'));var jsonpatch=require(_0x03f5('0x2'));var rp=require(_0x03f5('0x3'));var moment=require(_0x03f5('0x4'));var BPromise=require(_0x03f5('0x5'));var Mustache=require(_0x03f5('0x6'));var util=require(_0x03f5('0x7'));var path=require('path');var sox=require('sox');var csv=require(_0x03f5('0x8'));var ejs=require(_0x03f5('0x9'));var fs=require('fs');var fs_extra=require(_0x03f5('0xa'));var _=require('lodash');var squel=require('squel');var crypto=require(_0x03f5('0xb'));var jsforce=require(_0x03f5('0xc'));var deskjs=require(_0x03f5('0xd'));var toCsv=require(_0x03f5('0x8'));var querystring=require('querystring');var Papa=require(_0x03f5('0xe'));var Redis=require(_0x03f5('0xf'));var authService=require(_0x03f5('0x10'));var qs=require(_0x03f5('0x11'));var as=require(_0x03f5('0x12'));var hardwareService=require(_0x03f5('0x13'));var logger=require('../../config/logger')(_0x03f5('0x14'));var utils=require(_0x03f5('0x15'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x03f5('0x16'))['db'];function respondWithStatusCode(_0x3eb838,_0x62a8cd){_0x62a8cd=_0x62a8cd||0xcc;return function(_0x129be1){if(_0x129be1){return _0x3eb838[_0x03f5('0x17')](_0x62a8cd);}return _0x3eb838['status'](_0x62a8cd)[_0x03f5('0x18')]();};}function respondWithResult(_0x3cfa91,_0x782759){_0x782759=_0x782759||0xc8;return function(_0x136ec0){if(_0x136ec0){return _0x3cfa91['status'](_0x782759)[_0x03f5('0x19')](_0x136ec0);}};}function respondWithFilteredResult(_0x5cbcef,_0x4f773d){return function(_0x222fe0){if(_0x222fe0){var _0x194e60=typeof _0x4f773d[_0x03f5('0x1a')]===_0x03f5('0x1b')&&typeof _0x4f773d[_0x03f5('0x1c')]===_0x03f5('0x1b');var _0x308fa3=_0x222fe0[_0x03f5('0x1d')];var _0x35fef5=_0x194e60?0x0:_0x4f773d[_0x03f5('0x1a')];var _0x3078e9=_0x194e60?_0x222fe0[_0x03f5('0x1d')]:_0x4f773d['offset']+_0x4f773d[_0x03f5('0x1c')];var _0x5e4878;if(_0x3078e9>=_0x308fa3){_0x3078e9=_0x308fa3;_0x5e4878=0xc8;}else{_0x5e4878=0xce;}_0x5cbcef[_0x03f5('0x1e')](_0x5e4878);return _0x5cbcef[_0x03f5('0x1f')](_0x03f5('0x20'),_0x35fef5+'-'+_0x3078e9+'/'+_0x308fa3)[_0x03f5('0x19')](_0x222fe0);}return null;};}function patchUpdates(_0x1cff08){return function(_0x2737b6){try{jsonpatch[_0x03f5('0x21')](_0x2737b6,_0x1cff08,!![]);}catch(_0x482cac){return BPromise[_0x03f5('0x22')](_0x482cac);}return _0x2737b6[_0x03f5('0x23')]();};}function saveUpdates(_0x2c813f,_0x4a6c65){return function(_0x32bf18){if(_0x32bf18){return _0x32bf18[_0x03f5('0x24')](_0x2c813f)['then'](function(_0x18ce88){return _0x18ce88;});}return null;};}function removeEntity(_0x1cfe64,_0x20acb0){return function(_0x2bd75d){if(_0x2bd75d){return _0x2bd75d[_0x03f5('0x25')]()['then'](function(){_0x1cfe64['status'](0xcc)[_0x03f5('0x18')]();});}};}function handleEntityNotFound(_0x433764,_0x41c675){return function(_0x3b0d09){if(!_0x3b0d09){_0x433764[_0x03f5('0x17')](0x194);}return _0x3b0d09;};}function handleError(_0x47d059,_0x345d4d){_0x345d4d=_0x345d4d||0x1f4;return function(_0x1f3a08){logger[_0x03f5('0x26')](_0x1f3a08['stack']);if(_0x1f3a08[_0x03f5('0x27')]){delete _0x1f3a08['name'];}_0x47d059[_0x03f5('0x1e')](_0x345d4d)['send'](_0x1f3a08);};}function getMustacheRender(_0x583f0f,_0x7416cb){return Mustache[_0x03f5('0x28')](_0x583f0f,_[_0x03f5('0x29')](_0x7416cb[_0x03f5('0x2a')],{'contact':_0x7416cb[_0x03f5('0x2b')],'message':_0x7416cb[_0x03f5('0x2c')],'agent':_0x7416cb['agent'],'interaction':_0x7416cb[_0x03f5('0x2d')],'account':_0x7416cb[_0x03f5('0x2e')]}))||'';}exports[_0x03f5('0x2f')]=function(_0x222fc9,_0x498f11){var _0x1a7420={},_0x2bf09a={},_0x1d55ef={'count':0x0,'rows':[]};var _0x10c22c=_[_0x03f5('0x30')](db[_0x03f5('0x31')]['rawAttributes'],function(_0x5eb8f5){return{'name':_0x5eb8f5[_0x03f5('0x32')],'type':_0x5eb8f5[_0x03f5('0x33')]['key']};});_0x2bf09a[_0x03f5('0x34')]=_[_0x03f5('0x30')](_0x10c22c,_0x03f5('0x27'));_0x2bf09a['query']=_[_0x03f5('0x35')](_0x222fc9[_0x03f5('0x36')]);_0x2bf09a[_0x03f5('0x37')]=_[_0x03f5('0x38')](_0x2bf09a[_0x03f5('0x34')],_0x2bf09a[_0x03f5('0x36')]);_0x1a7420[_0x03f5('0x39')]=_[_0x03f5('0x38')](_0x2bf09a[_0x03f5('0x34')],qs[_0x03f5('0x3a')](_0x222fc9[_0x03f5('0x36')][_0x03f5('0x3a')]));_0x1a7420[_0x03f5('0x39')]=_0x1a7420[_0x03f5('0x39')]['length']?_0x1a7420[_0x03f5('0x39')]:_0x2bf09a['model'];if(!_0x222fc9['query'][_0x03f5('0x3b')]('nolimit')){_0x1a7420[_0x03f5('0x1c')]=qs[_0x03f5('0x1c')](_0x222fc9[_0x03f5('0x36')][_0x03f5('0x1c')]);_0x1a7420[_0x03f5('0x1a')]=qs[_0x03f5('0x1a')](_0x222fc9['query'][_0x03f5('0x1a')]);}_0x1a7420[_0x03f5('0x3c')]=qs[_0x03f5('0x3d')](_0x222fc9[_0x03f5('0x36')][_0x03f5('0x3d')]);_0x1a7420['where']=qs[_0x03f5('0x37')](_['pick'](_0x222fc9['query'],_0x2bf09a['filters']),_0x10c22c);if(_0x222fc9[_0x03f5('0x36')][_0x03f5('0x3e')]){_0x1a7420[_0x03f5('0x3f')]=_[_0x03f5('0x29')](_0x1a7420[_0x03f5('0x3f')],{'$or':_[_0x03f5('0x30')](_0x10c22c,function(_0x2d6d30){if(_0x2d6d30[_0x03f5('0x33')]!==_0x03f5('0x40')){var _0x2c3926={};_0x2c3926[_0x2d6d30[_0x03f5('0x27')]]={'$like':'%'+_0x222fc9[_0x03f5('0x36')]['filter']+'%'};return _0x2c3926;}})});}_0x1a7420=_[_0x03f5('0x29')]({},_0x1a7420,_0x222fc9[_0x03f5('0x41')]);var _0x2e6ffc={'where':_0x1a7420[_0x03f5('0x3f')]};return db[_0x03f5('0x31')][_0x03f5('0x1d')](_0x2e6ffc)[_0x03f5('0x42')](function(_0x24bab5){_0x1d55ef[_0x03f5('0x1d')]=_0x24bab5;if(_0x222fc9[_0x03f5('0x36')]['includeAll']){_0x1a7420[_0x03f5('0x43')]=[{'all':!![]}];}return db[_0x03f5('0x31')][_0x03f5('0x44')](_0x1a7420);})[_0x03f5('0x42')](function(_0x2075ed){_0x1d55ef[_0x03f5('0x45')]=_0x2075ed;return _0x1d55ef;})[_0x03f5('0x42')](respondWithFilteredResult(_0x498f11,_0x1a7420))[_0x03f5('0x46')](handleError(_0x498f11,null));};exports['show']=function(_0x567b7f,_0x24c24d){var _0x504b69={'raw':!![],'where':{'id':_0x567b7f['params']['id']}},_0x464908={};_0x464908[_0x03f5('0x34')]=_['keys'](db[_0x03f5('0x31')][_0x03f5('0x47')]);_0x464908[_0x03f5('0x36')]=_[_0x03f5('0x35')](_0x567b7f[_0x03f5('0x36')]);_0x464908[_0x03f5('0x37')]=_[_0x03f5('0x38')](_0x464908[_0x03f5('0x34')],_0x464908['query']);_0x504b69[_0x03f5('0x39')]=_[_0x03f5('0x38')](_0x464908['model'],qs[_0x03f5('0x3a')](_0x567b7f['query'][_0x03f5('0x3a')]));_0x504b69[_0x03f5('0x39')]=_0x504b69[_0x03f5('0x39')]['length']?_0x504b69[_0x03f5('0x39')]:_0x464908[_0x03f5('0x34')];if(_0x567b7f[_0x03f5('0x36')][_0x03f5('0x48')]){_0x504b69[_0x03f5('0x43')]=[{'all':!![]}];}_0x504b69=_[_0x03f5('0x29')]({},_0x504b69,_0x567b7f[_0x03f5('0x41')]);return db[_0x03f5('0x31')][_0x03f5('0x49')](_0x504b69)[_0x03f5('0x42')](handleEntityNotFound(_0x24c24d,null))[_0x03f5('0x42')](respondWithResult(_0x24c24d,null))[_0x03f5('0x46')](handleError(_0x24c24d,null));};exports[_0x03f5('0x4a')]=function(_0x362166,_0xb6381){return db[_0x03f5('0x31')]['create'](_0x362166['body'],{})[_0x03f5('0x42')](respondWithResult(_0xb6381,0xc9))['catch'](handleError(_0xb6381,null));};exports['update']=function(_0x1e4fdf,_0x28eed7){if(_0x1e4fdf[_0x03f5('0x2a')]['id']){delete _0x1e4fdf[_0x03f5('0x2a')]['id'];}return db[_0x03f5('0x31')][_0x03f5('0x49')]({'where':{'id':_0x1e4fdf[_0x03f5('0x4b')]['id']}})[_0x03f5('0x42')](handleEntityNotFound(_0x28eed7,null))[_0x03f5('0x42')](saveUpdates(_0x1e4fdf[_0x03f5('0x2a')],null))[_0x03f5('0x42')](respondWithResult(_0x28eed7,null))[_0x03f5('0x46')](handleError(_0x28eed7,null));};exports[_0x03f5('0x25')]=function(_0x3c6ddc,_0x176138){return db[_0x03f5('0x31')]['find']({'where':{'id':_0x3c6ddc[_0x03f5('0x4b')]['id']}})[_0x03f5('0x42')](handleEntityNotFound(_0x176138,null))['then'](removeEntity(_0x176138,null))[_0x03f5('0x46')](handleError(_0x176138,null));};
\ No newline at end of file
+var _0x62ba=['include','findAll','rows','catch','show','params','options','find','create','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','sox','to-csv','ejs','fs-extra','squel','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','end','json','offset','undefined','count','limit','status','Content-Range','apply','reject','save','then','destroy','stack','name','send','render','merge','contact','message','agent','interaction','index','map','FreshdeskField','rawAttributes','fieldName','type','key','model','query','keys','intersection','attributes','fields','order','sort','where','filters','pick','filter','VIRTUAL','includeAll'];(function(_0xb4e66e,_0x5e5af9){var _0x4cc6ac=function(_0x5d5dd4){while(--_0x5d5dd4){_0xb4e66e['push'](_0xb4e66e['shift']());}};_0x4cc6ac(++_0x5e5af9);}(_0x62ba,0xa8));var _0xa62b=function(_0x2fc581,_0x48ddcd){_0x2fc581=_0x2fc581-0x0;var _0x3e643f=_0x62ba[_0x2fc581];return _0x3e643f;};'use strict';var emlformat=require(_0xa62b('0x0'));var rimraf=require(_0xa62b('0x1'));var zipdir=require(_0xa62b('0x2'));var jsonpatch=require(_0xa62b('0x3'));var rp=require(_0xa62b('0x4'));var moment=require(_0xa62b('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xa62b('0x6'));var util=require(_0xa62b('0x7'));var path=require('path');var sox=require(_0xa62b('0x8'));var csv=require(_0xa62b('0x9'));var ejs=require(_0xa62b('0xa'));var fs=require('fs');var fs_extra=require(_0xa62b('0xb'));var _=require('lodash');var squel=require(_0xa62b('0xc'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xa62b('0xd'));var toCsv=require(_0xa62b('0x9'));var querystring=require(_0xa62b('0xe'));var Papa=require(_0xa62b('0xf'));var Redis=require(_0xa62b('0x10'));var authService=require(_0xa62b('0x11'));var qs=require(_0xa62b('0x12'));var as=require(_0xa62b('0x13'));var hardwareService=require(_0xa62b('0x14'));var logger=require(_0xa62b('0x15'))(_0xa62b('0x16'));var utils=require(_0xa62b('0x17'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xa62b('0x18'))['db'];function respondWithStatusCode(_0x6d7685,_0x4abbcc){_0x4abbcc=_0x4abbcc||0xcc;return function(_0x18ea85){if(_0x18ea85){return _0x6d7685[_0xa62b('0x19')](_0x4abbcc);}return _0x6d7685['status'](_0x4abbcc)[_0xa62b('0x1a')]();};}function respondWithResult(_0x3a5115,_0x565a7d){_0x565a7d=_0x565a7d||0xc8;return function(_0x2879dd){if(_0x2879dd){return _0x3a5115['status'](_0x565a7d)[_0xa62b('0x1b')](_0x2879dd);}};}function respondWithFilteredResult(_0x4f0ac6,_0x473a01){return function(_0xff6818){if(_0xff6818){var _0x5b4f0c=typeof _0x473a01[_0xa62b('0x1c')]===_0xa62b('0x1d')&&typeof _0x473a01['limit']===_0xa62b('0x1d');var _0x3b275b=_0xff6818[_0xa62b('0x1e')];var _0x5dee31=_0x5b4f0c?0x0:_0x473a01[_0xa62b('0x1c')];var _0x37ae3c=_0x5b4f0c?_0xff6818[_0xa62b('0x1e')]:_0x473a01[_0xa62b('0x1c')]+_0x473a01[_0xa62b('0x1f')];var _0x2feba6;if(_0x37ae3c>=_0x3b275b){_0x37ae3c=_0x3b275b;_0x2feba6=0xc8;}else{_0x2feba6=0xce;}_0x4f0ac6[_0xa62b('0x20')](_0x2feba6);return _0x4f0ac6['set'](_0xa62b('0x21'),_0x5dee31+'-'+_0x37ae3c+'/'+_0x3b275b)[_0xa62b('0x1b')](_0xff6818);}return null;};}function patchUpdates(_0x32973f){return function(_0x3fafa4){try{jsonpatch[_0xa62b('0x22')](_0x3fafa4,_0x32973f,!![]);}catch(_0x4cbc0d){return BPromise[_0xa62b('0x23')](_0x4cbc0d);}return _0x3fafa4[_0xa62b('0x24')]();};}function saveUpdates(_0x4bbfd1,_0x33d7aa){return function(_0x1e2bdb){if(_0x1e2bdb){return _0x1e2bdb['update'](_0x4bbfd1)[_0xa62b('0x25')](function(_0x551433){return _0x551433;});}return null;};}function removeEntity(_0x8f4021,_0x58afea){return function(_0x3def06){if(_0x3def06){return _0x3def06[_0xa62b('0x26')]()[_0xa62b('0x25')](function(){_0x8f4021[_0xa62b('0x20')](0xcc)[_0xa62b('0x1a')]();});}};}function handleEntityNotFound(_0xba3dd1,_0x1c82fb){return function(_0x25504e){if(!_0x25504e){_0xba3dd1[_0xa62b('0x19')](0x194);}return _0x25504e;};}function handleError(_0x22ef47,_0x51f281){_0x51f281=_0x51f281||0x1f4;return function(_0x47b5c1){logger['error'](_0x47b5c1[_0xa62b('0x27')]);if(_0x47b5c1[_0xa62b('0x28')]){delete _0x47b5c1[_0xa62b('0x28')];}_0x22ef47[_0xa62b('0x20')](_0x51f281)[_0xa62b('0x29')](_0x47b5c1);};}function getMustacheRender(_0x4efb17,_0x19d76f){return Mustache[_0xa62b('0x2a')](_0x4efb17,_[_0xa62b('0x2b')](_0x19d76f['body'],{'contact':_0x19d76f[_0xa62b('0x2c')],'message':_0x19d76f[_0xa62b('0x2d')],'agent':_0x19d76f[_0xa62b('0x2e')],'interaction':_0x19d76f[_0xa62b('0x2f')],'account':_0x19d76f['account']}))||'';}exports[_0xa62b('0x30')]=function(_0x4f971f,_0x39e380){var _0x4f3af9={},_0x4094e5={},_0x53515d={'count':0x0,'rows':[]};var _0x3d17cb=_[_0xa62b('0x31')](db[_0xa62b('0x32')][_0xa62b('0x33')],function(_0x5ac476){return{'name':_0x5ac476[_0xa62b('0x34')],'type':_0x5ac476[_0xa62b('0x35')][_0xa62b('0x36')]};});_0x4094e5[_0xa62b('0x37')]=_[_0xa62b('0x31')](_0x3d17cb,_0xa62b('0x28'));_0x4094e5[_0xa62b('0x38')]=_[_0xa62b('0x39')](_0x4f971f[_0xa62b('0x38')]);_0x4094e5['filters']=_[_0xa62b('0x3a')](_0x4094e5['model'],_0x4094e5[_0xa62b('0x38')]);_0x4f3af9[_0xa62b('0x3b')]=_[_0xa62b('0x3a')](_0x4094e5[_0xa62b('0x37')],qs['fields'](_0x4f971f[_0xa62b('0x38')][_0xa62b('0x3c')]));_0x4f3af9[_0xa62b('0x3b')]=_0x4f3af9[_0xa62b('0x3b')]['length']?_0x4f3af9[_0xa62b('0x3b')]:_0x4094e5['model'];if(!_0x4f971f[_0xa62b('0x38')]['hasOwnProperty']('nolimit')){_0x4f3af9[_0xa62b('0x1f')]=qs[_0xa62b('0x1f')](_0x4f971f[_0xa62b('0x38')][_0xa62b('0x1f')]);_0x4f3af9[_0xa62b('0x1c')]=qs[_0xa62b('0x1c')](_0x4f971f[_0xa62b('0x38')][_0xa62b('0x1c')]);}_0x4f3af9[_0xa62b('0x3d')]=qs[_0xa62b('0x3e')](_0x4f971f[_0xa62b('0x38')]['sort']);_0x4f3af9[_0xa62b('0x3f')]=qs[_0xa62b('0x40')](_[_0xa62b('0x41')](_0x4f971f[_0xa62b('0x38')],_0x4094e5[_0xa62b('0x40')]),_0x3d17cb);if(_0x4f971f[_0xa62b('0x38')][_0xa62b('0x42')]){_0x4f3af9['where']=_[_0xa62b('0x2b')](_0x4f3af9[_0xa62b('0x3f')],{'$or':_[_0xa62b('0x31')](_0x3d17cb,function(_0x32c8b0){if(_0x32c8b0[_0xa62b('0x35')]!==_0xa62b('0x43')){var _0x22426a={};_0x22426a[_0x32c8b0[_0xa62b('0x28')]]={'$like':'%'+_0x4f971f['query'][_0xa62b('0x42')]+'%'};return _0x22426a;}})});}_0x4f3af9=_[_0xa62b('0x2b')]({},_0x4f3af9,_0x4f971f['options']);var _0x8d14a4={'where':_0x4f3af9['where']};return db['FreshdeskField'][_0xa62b('0x1e')](_0x8d14a4)[_0xa62b('0x25')](function(_0x2ed115){_0x53515d[_0xa62b('0x1e')]=_0x2ed115;if(_0x4f971f[_0xa62b('0x38')][_0xa62b('0x44')]){_0x4f3af9[_0xa62b('0x45')]=[{'all':!![]}];}return db[_0xa62b('0x32')][_0xa62b('0x46')](_0x4f3af9);})[_0xa62b('0x25')](function(_0x16e170){_0x53515d[_0xa62b('0x47')]=_0x16e170;return _0x53515d;})[_0xa62b('0x25')](respondWithFilteredResult(_0x39e380,_0x4f3af9))[_0xa62b('0x48')](handleError(_0x39e380,null));};exports[_0xa62b('0x49')]=function(_0x395572,_0x6411a8){var _0x4d614b={'raw':!![],'where':{'id':_0x395572[_0xa62b('0x4a')]['id']}},_0x19f940={};_0x19f940[_0xa62b('0x37')]=_[_0xa62b('0x39')](db[_0xa62b('0x32')][_0xa62b('0x33')]);_0x19f940[_0xa62b('0x38')]=_['keys'](_0x395572[_0xa62b('0x38')]);_0x19f940[_0xa62b('0x40')]=_['intersection'](_0x19f940[_0xa62b('0x37')],_0x19f940['query']);_0x4d614b[_0xa62b('0x3b')]=_[_0xa62b('0x3a')](_0x19f940[_0xa62b('0x37')],qs[_0xa62b('0x3c')](_0x395572[_0xa62b('0x38')][_0xa62b('0x3c')]));_0x4d614b[_0xa62b('0x3b')]=_0x4d614b[_0xa62b('0x3b')]['length']?_0x4d614b['attributes']:_0x19f940['model'];if(_0x395572[_0xa62b('0x38')][_0xa62b('0x44')]){_0x4d614b[_0xa62b('0x45')]=[{'all':!![]}];}_0x4d614b=_['merge']({},_0x4d614b,_0x395572[_0xa62b('0x4b')]);return db[_0xa62b('0x32')][_0xa62b('0x4c')](_0x4d614b)[_0xa62b('0x25')](handleEntityNotFound(_0x6411a8,null))[_0xa62b('0x25')](respondWithResult(_0x6411a8,null))[_0xa62b('0x48')](handleError(_0x6411a8,null));};exports[_0xa62b('0x4d')]=function(_0x4d50bf,_0x270b3e){return db['FreshdeskField'][_0xa62b('0x4d')](_0x4d50bf[_0xa62b('0x4e')],{})[_0xa62b('0x25')](respondWithResult(_0x270b3e,0xc9))[_0xa62b('0x48')](handleError(_0x270b3e,null));};exports['update']=function(_0x1e0744,_0x133db7){if(_0x1e0744[_0xa62b('0x4e')]['id']){delete _0x1e0744['body']['id'];}return db[_0xa62b('0x32')]['find']({'where':{'id':_0x1e0744['params']['id']}})[_0xa62b('0x25')](handleEntityNotFound(_0x133db7,null))[_0xa62b('0x25')](saveUpdates(_0x1e0744['body'],null))['then'](respondWithResult(_0x133db7,null))[_0xa62b('0x48')](handleError(_0x133db7,null));};exports[_0xa62b('0x26')]=function(_0x20a92a,_0x1f97ad){return db['FreshdeskField'][_0xa62b('0x4c')]({'where':{'id':_0x20a92a[_0xa62b('0x4a')]['id']}})[_0xa62b('0x25')](handleEntityNotFound(_0x1f97ad,null))[_0xa62b('0x25')](removeEntity(_0x1f97ad,null))['catch'](handleError(_0x1f97ad,null));};
\ No newline at end of file