Built motion from commit (unavailable).|2.5.31
[motion2.git] / server / api / chatTransferReport / chatTransferReport.controller.js
index 55916f6..9bf22c2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdbfb=['ejs','fs-extra','lodash','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','undefined','limit','count','offset','set','Content-Range','json','apply','reject','save','then','sendStatus','error','name','render','merge','body','contact','message','agent','interaction','ChatTransferReport','rawAttributes','type','key','query','keys','filters','model','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filter','map','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','find','create','params','destroy','describe','zip-dir','request-promise','moment','bluebird','mustache','util','path','to-csv'];(function(_0x989619,_0x41b8c3){var _0x288239=function(_0x290ea4){while(--_0x290ea4){_0x989619['push'](_0x989619['shift']());}};_0x288239(++_0x41b8c3);}(_0xdbfb,0xe2));var _0xbdbf=function(_0x5a5276,_0x1cebce){_0x5a5276=_0x5a5276-0x0;var _0x5d3929=_0xdbfb[_0x5a5276];return _0x5d3929;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0xbdbf('0x0'));var jsonpatch=require('fast-json-patch');var rp=require(_0xbdbf('0x1'));var moment=require(_0xbdbf('0x2'));var BPromise=require(_0xbdbf('0x3'));var Mustache=require(_0xbdbf('0x4'));var util=require(_0xbdbf('0x5'));var path=require(_0xbdbf('0x6'));var sox=require('sox');var csv=require(_0xbdbf('0x7'));var ejs=require(_0xbdbf('0x8'));var fs=require('fs');var fs_extra=require(_0xbdbf('0x9'));var _=require(_0xbdbf('0xa'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xbdbf('0xb'));var deskjs=require('desk.js');var toCsv=require(_0xbdbf('0x7'));var querystring=require(_0xbdbf('0xc'));var Papa=require(_0xbdbf('0xd'));var Redis=require(_0xbdbf('0xe'));var authService=require(_0xbdbf('0xf'));var qs=require(_0xbdbf('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xbdbf('0x11'));var logger=require(_0xbdbf('0x12'))('api');var utils=require(_0xbdbf('0x13'));var config=require(_0xbdbf('0x14'));var licenseUtil=require(_0xbdbf('0x15'));var db=require(_0xbdbf('0x16'))['db'];function respondWithStatusCode(_0x519612,_0x3a96f4){_0x3a96f4=_0x3a96f4||0xcc;return function(_0x25f450){if(_0x25f450){return _0x519612['sendStatus'](_0x3a96f4);}return _0x519612[_0xbdbf('0x17')](_0x3a96f4)[_0xbdbf('0x18')]();};}function respondWithResult(_0x300e4f,_0x5729d7){_0x5729d7=_0x5729d7||0xc8;return function(_0x3f2dc7){if(_0x3f2dc7){return _0x300e4f[_0xbdbf('0x17')](_0x5729d7)['json'](_0x3f2dc7);}};}function respondWithFilteredResult(_0x5d0bb6,_0xff7060){return function(_0x461483){if(_0x461483){var _0x2b931b=typeof _0xff7060['offset']===_0xbdbf('0x19')&&typeof _0xff7060[_0xbdbf('0x1a')]==='undefined';var _0x508797=_0x461483[_0xbdbf('0x1b')];var _0x5afe32=_0x2b931b?0x0:_0xff7060[_0xbdbf('0x1c')];var _0x12672f=_0x2b931b?_0x461483['count']:_0xff7060[_0xbdbf('0x1c')]+_0xff7060[_0xbdbf('0x1a')];var _0xcf12e;if(_0x12672f>=_0x508797){_0x12672f=_0x508797;_0xcf12e=0xc8;}else{_0xcf12e=0xce;}_0x5d0bb6[_0xbdbf('0x17')](_0xcf12e);return _0x5d0bb6[_0xbdbf('0x1d')](_0xbdbf('0x1e'),_0x5afe32+'-'+_0x12672f+'/'+_0x508797)[_0xbdbf('0x1f')](_0x461483);}return null;};}function patchUpdates(_0x4b0a04){return function(_0x1c8f26){try{jsonpatch[_0xbdbf('0x20')](_0x1c8f26,_0x4b0a04,!![]);}catch(_0x3fffa3){return BPromise[_0xbdbf('0x21')](_0x3fffa3);}return _0x1c8f26[_0xbdbf('0x22')]();};}function saveUpdates(_0x4d0658,_0x5a3a69){return function(_0xd8dafd){if(_0xd8dafd){return _0xd8dafd['update'](_0x4d0658)[_0xbdbf('0x23')](function(_0x34ab8b){return _0x34ab8b;});}return null;};}function removeEntity(_0xf8fee,_0xcca768){return function(_0x460fa7){if(_0x460fa7){return _0x460fa7['destroy']()[_0xbdbf('0x23')](function(){_0xf8fee[_0xbdbf('0x17')](0xcc)[_0xbdbf('0x18')]();});}};}function handleEntityNotFound(_0x1cff56,_0x4329f1){return function(_0x3923ee){if(!_0x3923ee){_0x1cff56[_0xbdbf('0x24')](0x194);}return _0x3923ee;};}function handleError(_0x28ff18,_0x29b858){_0x29b858=_0x29b858||0x1f4;return function(_0x7f742){logger[_0xbdbf('0x25')](_0x7f742['stack']);if(_0x7f742[_0xbdbf('0x26')]){delete _0x7f742[_0xbdbf('0x26')];}_0x28ff18[_0xbdbf('0x17')](_0x29b858)['send'](_0x7f742);};}function getMustacheRender(_0x5d0bf1,_0x59fa55){return Mustache[_0xbdbf('0x27')](_0x5d0bf1,_[_0xbdbf('0x28')](_0x59fa55[_0xbdbf('0x29')],{'contact':_0x59fa55[_0xbdbf('0x2a')],'message':_0x59fa55[_0xbdbf('0x2b')],'agent':_0x59fa55[_0xbdbf('0x2c')],'interaction':_0x59fa55[_0xbdbf('0x2d')],'account':_0x59fa55['account']}))||'';}exports['index']=function(_0x3969f2,_0x6b6ee9){var _0x41a3c6={},_0x2910e1={},_0x44c598={'count':0x0,'rows':[]};var _0xc28b64=_['map'](db[_0xbdbf('0x2e')][_0xbdbf('0x2f')],function(_0x18c177){return{'name':_0x18c177['fieldName'],'type':_0x18c177[_0xbdbf('0x30')][_0xbdbf('0x31')]};});_0x2910e1['model']=_['map'](_0xc28b64,_0xbdbf('0x26'));_0x2910e1[_0xbdbf('0x32')]=_[_0xbdbf('0x33')](_0x3969f2['query']);_0x2910e1[_0xbdbf('0x34')]=_['intersection'](_0x2910e1[_0xbdbf('0x35')],_0x2910e1[_0xbdbf('0x32')]);_0x41a3c6['attributes']=_[_0xbdbf('0x36')](_0x2910e1[_0xbdbf('0x35')],qs[_0xbdbf('0x37')](_0x3969f2[_0xbdbf('0x32')][_0xbdbf('0x37')]));_0x41a3c6[_0xbdbf('0x38')]=_0x41a3c6[_0xbdbf('0x38')][_0xbdbf('0x39')]?_0x41a3c6[_0xbdbf('0x38')]:_0x2910e1[_0xbdbf('0x35')];if(!_0x3969f2[_0xbdbf('0x32')][_0xbdbf('0x3a')](_0xbdbf('0x3b'))){_0x41a3c6[_0xbdbf('0x1a')]=qs['limit'](_0x3969f2[_0xbdbf('0x32')][_0xbdbf('0x1a')]);_0x41a3c6[_0xbdbf('0x1c')]=qs[_0xbdbf('0x1c')](_0x3969f2[_0xbdbf('0x32')][_0xbdbf('0x1c')]);}_0x41a3c6[_0xbdbf('0x3c')]=qs[_0xbdbf('0x3d')](_0x3969f2['query'][_0xbdbf('0x3d')]);_0x41a3c6[_0xbdbf('0x3e')]=qs['filters'](_['pick'](_0x3969f2[_0xbdbf('0x32')],_0x2910e1[_0xbdbf('0x34')]),_0xc28b64);if(_0x3969f2[_0xbdbf('0x32')][_0xbdbf('0x3f')]){_0x41a3c6[_0xbdbf('0x3e')]=_[_0xbdbf('0x28')](_0x41a3c6[_0xbdbf('0x3e')],{'$or':_[_0xbdbf('0x40')](_0xc28b64,function(_0x276da8){if(_0x276da8[_0xbdbf('0x30')]!==_0xbdbf('0x41')){var _0x20f90a={};_0x20f90a[_0x276da8['name']]={'$like':'%'+_0x3969f2[_0xbdbf('0x32')][_0xbdbf('0x3f')]+'%'};return _0x20f90a;}})});}_0x41a3c6=_[_0xbdbf('0x28')]({},_0x41a3c6,_0x3969f2[_0xbdbf('0x42')]);var _0xd0aff9={'where':_0x41a3c6[_0xbdbf('0x3e')]};return db[_0xbdbf('0x2e')]['count'](_0xd0aff9)[_0xbdbf('0x23')](function(_0x4ade2c){_0x44c598[_0xbdbf('0x1b')]=_0x4ade2c;if(_0x3969f2[_0xbdbf('0x32')][_0xbdbf('0x43')]){_0x41a3c6[_0xbdbf('0x44')]=[{'all':!![]}];}return db[_0xbdbf('0x2e')][_0xbdbf('0x45')](_0x41a3c6);})[_0xbdbf('0x23')](function(_0x300f32){_0x44c598[_0xbdbf('0x46')]=_0x300f32;return _0x44c598;})[_0xbdbf('0x23')](respondWithFilteredResult(_0x6b6ee9,_0x41a3c6))[_0xbdbf('0x47')](handleError(_0x6b6ee9,null));};exports[_0xbdbf('0x48')]=function(_0x5cdd50,_0x2379b0){var _0x41babf={'raw':!![],'where':{'id':_0x5cdd50['params']['id']}},_0x30bf15={};_0x30bf15[_0xbdbf('0x35')]=_[_0xbdbf('0x33')](db[_0xbdbf('0x2e')]['rawAttributes']);_0x30bf15[_0xbdbf('0x32')]=_[_0xbdbf('0x33')](_0x5cdd50[_0xbdbf('0x32')]);_0x30bf15['filters']=_['intersection'](_0x30bf15[_0xbdbf('0x35')],_0x30bf15[_0xbdbf('0x32')]);_0x41babf[_0xbdbf('0x38')]=_['intersection'](_0x30bf15['model'],qs[_0xbdbf('0x37')](_0x5cdd50['query']['fields']));_0x41babf['attributes']=_0x41babf[_0xbdbf('0x38')][_0xbdbf('0x39')]?_0x41babf['attributes']:_0x30bf15[_0xbdbf('0x35')];if(_0x5cdd50[_0xbdbf('0x32')][_0xbdbf('0x43')]){_0x41babf['include']=[{'all':!![]}];}_0x41babf=_[_0xbdbf('0x28')]({},_0x41babf,_0x5cdd50[_0xbdbf('0x42')]);return db[_0xbdbf('0x2e')][_0xbdbf('0x49')](_0x41babf)[_0xbdbf('0x23')](handleEntityNotFound(_0x2379b0,null))[_0xbdbf('0x23')](respondWithResult(_0x2379b0,null))[_0xbdbf('0x47')](handleError(_0x2379b0,null));};exports[_0xbdbf('0x4a')]=function(_0x43ada6,_0x338d27){return db[_0xbdbf('0x2e')][_0xbdbf('0x4a')](_0x43ada6[_0xbdbf('0x29')],{})[_0xbdbf('0x23')](respondWithResult(_0x338d27,0xc9))[_0xbdbf('0x47')](handleError(_0x338d27,null));};exports['update']=function(_0x487be7,_0x2f2884){if(_0x487be7['body']['id']){delete _0x487be7[_0xbdbf('0x29')]['id'];}return db[_0xbdbf('0x2e')]['find']({'where':{'id':_0x487be7[_0xbdbf('0x4b')]['id']}})[_0xbdbf('0x23')](handleEntityNotFound(_0x2f2884,null))[_0xbdbf('0x23')](saveUpdates(_0x487be7[_0xbdbf('0x29')],null))[_0xbdbf('0x23')](respondWithResult(_0x2f2884,null))[_0xbdbf('0x47')](handleError(_0x2f2884,null));};exports[_0xbdbf('0x4c')]=function(_0xf12972,_0x221ee3){return db[_0xbdbf('0x2e')][_0xbdbf('0x49')]({'where':{'id':_0xf12972[_0xbdbf('0x4b')]['id']}})[_0xbdbf('0x23')](handleEntityNotFound(_0x221ee3,null))[_0xbdbf('0x23')](removeEntity(_0x221ee3,null))['catch'](handleError(_0x221ee3,null));};exports[_0xbdbf('0x4d')]=function(_0x4b6a98,_0xe67662){return db[_0xbdbf('0x2e')][_0xbdbf('0x4d')]()['then'](respondWithResult(_0xe67662,null))[_0xbdbf('0x47')](handleError(_0xe67662,null));};
\ No newline at end of file
+var _0xfe41=['body','contact','agent','interaction','account','index','rawAttributes','fieldName','type','map','query','keys','model','attributes','intersection','fields','length','nolimit','order','where','filters','pick','VIRTUAL','filter','ChatTransferReport','include','findAll','rows','catch','show','params','includeAll','create','find','describe','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../mysqldb','end','status','json','offset','undefined','limit','count','Content-Range','apply','reject','update','then','destroy','error','stack','name','send','render','merge'];(function(_0x3dbd50,_0x99ad82){var _0x1c1da0=function(_0x19a0bb){while(--_0x19a0bb){_0x3dbd50['push'](_0x3dbd50['shift']());}};_0x1c1da0(++_0x99ad82);}(_0xfe41,0x10a));var _0x1fe4=function(_0x49b14d,_0x578d07){_0x49b14d=_0x49b14d-0x0;var _0x3d2488=_0xfe41[_0x49b14d];return _0x3d2488;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x1fe4('0x0'));var zipdir=require(_0x1fe4('0x1'));var jsonpatch=require(_0x1fe4('0x2'));var rp=require(_0x1fe4('0x3'));var moment=require(_0x1fe4('0x4'));var BPromise=require(_0x1fe4('0x5'));var Mustache=require(_0x1fe4('0x6'));var util=require(_0x1fe4('0x7'));var path=require('path');var sox=require(_0x1fe4('0x8'));var csv=require(_0x1fe4('0x9'));var ejs=require(_0x1fe4('0xa'));var fs=require('fs');var fs_extra=require(_0x1fe4('0xb'));var _=require(_0x1fe4('0xc'));var squel=require(_0x1fe4('0xd'));var crypto=require(_0x1fe4('0xe'));var jsforce=require('jsforce');var deskjs=require(_0x1fe4('0xf'));var toCsv=require(_0x1fe4('0x9'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x1fe4('0x10'));var authService=require(_0x1fe4('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0x1fe4('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x1fe4('0x13'))(_0x1fe4('0x14'));var utils=require('../../config/utils');var config=require(_0x1fe4('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0x1fe4('0x16'))['db'];function respondWithStatusCode(_0x4414a2,_0x4e108c){_0x4e108c=_0x4e108c||0xcc;return function(_0x504263){if(_0x504263){return _0x4414a2['sendStatus'](_0x4e108c);}return _0x4414a2['status'](_0x4e108c)[_0x1fe4('0x17')]();};}function respondWithResult(_0x28f810,_0x26cab9){_0x26cab9=_0x26cab9||0xc8;return function(_0x462372){if(_0x462372){return _0x28f810[_0x1fe4('0x18')](_0x26cab9)[_0x1fe4('0x19')](_0x462372);}};}function respondWithFilteredResult(_0xedd23c,_0x3ece07){return function(_0x1484f3){if(_0x1484f3){var _0x57a8ea=typeof _0x3ece07[_0x1fe4('0x1a')]===_0x1fe4('0x1b')&&typeof _0x3ece07[_0x1fe4('0x1c')]===_0x1fe4('0x1b');var _0xa38ea3=_0x1484f3[_0x1fe4('0x1d')];var _0x20052a=_0x57a8ea?0x0:_0x3ece07[_0x1fe4('0x1a')];var _0x47f9ba=_0x57a8ea?_0x1484f3[_0x1fe4('0x1d')]:_0x3ece07[_0x1fe4('0x1a')]+_0x3ece07[_0x1fe4('0x1c')];var _0x4ba9ec;if(_0x47f9ba>=_0xa38ea3){_0x47f9ba=_0xa38ea3;_0x4ba9ec=0xc8;}else{_0x4ba9ec=0xce;}_0xedd23c[_0x1fe4('0x18')](_0x4ba9ec);return _0xedd23c['set'](_0x1fe4('0x1e'),_0x20052a+'-'+_0x47f9ba+'/'+_0xa38ea3)[_0x1fe4('0x19')](_0x1484f3);}return null;};}function patchUpdates(_0x4c590a){return function(_0xb41c98){try{jsonpatch[_0x1fe4('0x1f')](_0xb41c98,_0x4c590a,!![]);}catch(_0x1bfd8c){return BPromise[_0x1fe4('0x20')](_0x1bfd8c);}return _0xb41c98['save']();};}function saveUpdates(_0x240155,_0x41360c){return function(_0x9410fc){if(_0x9410fc){return _0x9410fc[_0x1fe4('0x21')](_0x240155)[_0x1fe4('0x22')](function(_0x472b5a){return _0x472b5a;});}return null;};}function removeEntity(_0x362284,_0x1c07f7){return function(_0x17ea79){if(_0x17ea79){return _0x17ea79[_0x1fe4('0x23')]()[_0x1fe4('0x22')](function(){_0x362284[_0x1fe4('0x18')](0xcc)[_0x1fe4('0x17')]();});}};}function handleEntityNotFound(_0x2966f6,_0x48b8cc){return function(_0x14bb41){if(!_0x14bb41){_0x2966f6['sendStatus'](0x194);}return _0x14bb41;};}function handleError(_0xefb67a,_0x595585){_0x595585=_0x595585||0x1f4;return function(_0x5d93eb){logger[_0x1fe4('0x24')](_0x5d93eb[_0x1fe4('0x25')]);if(_0x5d93eb[_0x1fe4('0x26')]){delete _0x5d93eb['name'];}_0xefb67a['status'](_0x595585)[_0x1fe4('0x27')](_0x5d93eb);};}function getMustacheRender(_0x51204f,_0x5a5ac6){return Mustache[_0x1fe4('0x28')](_0x51204f,_[_0x1fe4('0x29')](_0x5a5ac6[_0x1fe4('0x2a')],{'contact':_0x5a5ac6[_0x1fe4('0x2b')],'message':_0x5a5ac6['message'],'agent':_0x5a5ac6[_0x1fe4('0x2c')],'interaction':_0x5a5ac6[_0x1fe4('0x2d')],'account':_0x5a5ac6[_0x1fe4('0x2e')]}))||'';}exports[_0x1fe4('0x2f')]=function(_0x4f1579,_0xcd5a31){var _0x45d42b={},_0x4170ff={},_0x403b12={'count':0x0,'rows':[]};var _0x476c1f=_['map'](db['ChatTransferReport'][_0x1fe4('0x30')],function(_0x322b83){return{'name':_0x322b83[_0x1fe4('0x31')],'type':_0x322b83[_0x1fe4('0x32')]['key']};});_0x4170ff['model']=_[_0x1fe4('0x33')](_0x476c1f,_0x1fe4('0x26'));_0x4170ff[_0x1fe4('0x34')]=_[_0x1fe4('0x35')](_0x4f1579['query']);_0x4170ff['filters']=_['intersection'](_0x4170ff[_0x1fe4('0x36')],_0x4170ff[_0x1fe4('0x34')]);_0x45d42b[_0x1fe4('0x37')]=_[_0x1fe4('0x38')](_0x4170ff[_0x1fe4('0x36')],qs[_0x1fe4('0x39')](_0x4f1579[_0x1fe4('0x34')]['fields']));_0x45d42b[_0x1fe4('0x37')]=_0x45d42b[_0x1fe4('0x37')][_0x1fe4('0x3a')]?_0x45d42b[_0x1fe4('0x37')]:_0x4170ff[_0x1fe4('0x36')];if(!_0x4f1579[_0x1fe4('0x34')]['hasOwnProperty'](_0x1fe4('0x3b'))){_0x45d42b[_0x1fe4('0x1c')]=qs['limit'](_0x4f1579['query'][_0x1fe4('0x1c')]);_0x45d42b[_0x1fe4('0x1a')]=qs[_0x1fe4('0x1a')](_0x4f1579[_0x1fe4('0x34')][_0x1fe4('0x1a')]);}_0x45d42b[_0x1fe4('0x3c')]=qs['sort'](_0x4f1579[_0x1fe4('0x34')]['sort']);_0x45d42b[_0x1fe4('0x3d')]=qs[_0x1fe4('0x3e')](_[_0x1fe4('0x3f')](_0x4f1579['query'],_0x4170ff[_0x1fe4('0x3e')]),_0x476c1f);if(_0x4f1579[_0x1fe4('0x34')]['filter']){_0x45d42b[_0x1fe4('0x3d')]=_[_0x1fe4('0x29')](_0x45d42b[_0x1fe4('0x3d')],{'$or':_['map'](_0x476c1f,function(_0x11ed6f){if(_0x11ed6f[_0x1fe4('0x32')]!==_0x1fe4('0x40')){var _0x2c948e={};_0x2c948e[_0x11ed6f[_0x1fe4('0x26')]]={'$like':'%'+_0x4f1579[_0x1fe4('0x34')][_0x1fe4('0x41')]+'%'};return _0x2c948e;}})});}_0x45d42b=_[_0x1fe4('0x29')]({},_0x45d42b,_0x4f1579['options']);var _0x1429be={'where':_0x45d42b[_0x1fe4('0x3d')]};return db[_0x1fe4('0x42')][_0x1fe4('0x1d')](_0x1429be)[_0x1fe4('0x22')](function(_0x2f13d4){_0x403b12[_0x1fe4('0x1d')]=_0x2f13d4;if(_0x4f1579[_0x1fe4('0x34')]['includeAll']){_0x45d42b[_0x1fe4('0x43')]=[{'all':!![]}];}return db['ChatTransferReport'][_0x1fe4('0x44')](_0x45d42b);})[_0x1fe4('0x22')](function(_0x5cf77c){_0x403b12[_0x1fe4('0x45')]=_0x5cf77c;return _0x403b12;})[_0x1fe4('0x22')](respondWithFilteredResult(_0xcd5a31,_0x45d42b))[_0x1fe4('0x46')](handleError(_0xcd5a31,null));};exports[_0x1fe4('0x47')]=function(_0x42c57d,_0x1e5610){var _0x327e6c={'raw':!![],'where':{'id':_0x42c57d[_0x1fe4('0x48')]['id']}},_0x528d92={};_0x528d92[_0x1fe4('0x36')]=_['keys'](db['ChatTransferReport']['rawAttributes']);_0x528d92[_0x1fe4('0x34')]=_[_0x1fe4('0x35')](_0x42c57d['query']);_0x528d92[_0x1fe4('0x3e')]=_['intersection'](_0x528d92[_0x1fe4('0x36')],_0x528d92['query']);_0x327e6c[_0x1fe4('0x37')]=_[_0x1fe4('0x38')](_0x528d92[_0x1fe4('0x36')],qs[_0x1fe4('0x39')](_0x42c57d[_0x1fe4('0x34')]['fields']));_0x327e6c[_0x1fe4('0x37')]=_0x327e6c[_0x1fe4('0x37')][_0x1fe4('0x3a')]?_0x327e6c[_0x1fe4('0x37')]:_0x528d92['model'];if(_0x42c57d[_0x1fe4('0x34')][_0x1fe4('0x49')]){_0x327e6c[_0x1fe4('0x43')]=[{'all':!![]}];}_0x327e6c=_[_0x1fe4('0x29')]({},_0x327e6c,_0x42c57d['options']);return db[_0x1fe4('0x42')]['find'](_0x327e6c)['then'](handleEntityNotFound(_0x1e5610,null))[_0x1fe4('0x22')](respondWithResult(_0x1e5610,null))[_0x1fe4('0x46')](handleError(_0x1e5610,null));};exports['create']=function(_0x56616c,_0x438e33){return db[_0x1fe4('0x42')][_0x1fe4('0x4a')](_0x56616c[_0x1fe4('0x2a')],{})[_0x1fe4('0x22')](respondWithResult(_0x438e33,0xc9))[_0x1fe4('0x46')](handleError(_0x438e33,null));};exports[_0x1fe4('0x21')]=function(_0x388d96,_0x29b54b){if(_0x388d96[_0x1fe4('0x2a')]['id']){delete _0x388d96[_0x1fe4('0x2a')]['id'];}return db[_0x1fe4('0x42')][_0x1fe4('0x4b')]({'where':{'id':_0x388d96[_0x1fe4('0x48')]['id']}})[_0x1fe4('0x22')](handleEntityNotFound(_0x29b54b,null))['then'](saveUpdates(_0x388d96[_0x1fe4('0x2a')],null))[_0x1fe4('0x22')](respondWithResult(_0x29b54b,null))[_0x1fe4('0x46')](handleError(_0x29b54b,null));};exports[_0x1fe4('0x23')]=function(_0x4d622c,_0x74615){return db[_0x1fe4('0x42')][_0x1fe4('0x4b')]({'where':{'id':_0x4d622c[_0x1fe4('0x48')]['id']}})[_0x1fe4('0x22')](handleEntityNotFound(_0x74615,null))['then'](removeEntity(_0x74615,null))[_0x1fe4('0x46')](handleError(_0x74615,null));};exports['describe']=function(_0x419088,_0x25195b){return db[_0x1fe4('0x42')][_0x1fe4('0x4c')]()['then'](respondWithResult(_0x25195b,null))[_0x1fe4('0x46')](handleError(_0x25195b,null));};
\ No newline at end of file