Built motion from commit f16df95f.|2.5.40
[motion2.git] / server / api / voiceMailMessage / voiceMailMessage.controller.js
index 7ebc4db..430741f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcfc0=['squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','Content-Range','apply','save','update','then','destroy','error','stack','name','send','index','map','VoiceMailMessage','fieldName','key','differenceBy','query','keys','filters','intersection','model','attributes','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','merge','type','VIRTUAL','filter','includeAll','include','findAll','catch','params','rawAttributes','fields','find','create','body','download','recording','Sequelize','VoiceMailMessage\x20not\x20found','audio/wav','attachment','msg_id','Content-Disposition','.wav\x22','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra'];(function(_0x382d7e,_0x16798c){var _0x33c721=function(_0x13d857){while(--_0x13d857){_0x382d7e['push'](_0x382d7e['shift']());}};_0x33c721(++_0x16798c);}(_0xcfc0,0x14e));var _0x0cfc=function(_0x18f751,_0x3a52c6){_0x18f751=_0x18f751-0x0;var _0x2002ff=_0xcfc0[_0x18f751];return _0x2002ff;};'use strict';var emlformat=require(_0x0cfc('0x0'));var rimraf=require(_0x0cfc('0x1'));var zipdir=require(_0x0cfc('0x2'));var jsonpatch=require(_0x0cfc('0x3'));var rp=require(_0x0cfc('0x4'));var moment=require(_0x0cfc('0x5'));var BPromise=require(_0x0cfc('0x6'));var Mustache=require(_0x0cfc('0x7'));var util=require(_0x0cfc('0x8'));var path=require(_0x0cfc('0x9'));var sox=require(_0x0cfc('0xa'));var csv=require(_0x0cfc('0xb'));var ejs=require(_0x0cfc('0xc'));var fs=require('fs');var fs_extra=require(_0x0cfc('0xd'));var _=require('lodash');var squel=require(_0x0cfc('0xe'));var crypto=require(_0x0cfc('0xf'));var jsforce=require(_0x0cfc('0x10'));var deskjs=require(_0x0cfc('0x11'));var toCsv=require(_0x0cfc('0xb'));var querystring=require('querystring');var Papa=require(_0x0cfc('0x12'));var Redis=require(_0x0cfc('0x13'));var authService=require(_0x0cfc('0x14'));var qs=require(_0x0cfc('0x15'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x0cfc('0x16'));var utils=require(_0x0cfc('0x17'));var config=require(_0x0cfc('0x18'));var licenseUtil=require(_0x0cfc('0x19'));var db=require(_0x0cfc('0x1a'))['db'];function respondWithStatusCode(_0xfd5a09,_0x56196c){_0x56196c=_0x56196c||0xcc;return function(_0x5aa6d7){if(_0x5aa6d7){return _0xfd5a09[_0x0cfc('0x1b')](_0x56196c);}return _0xfd5a09[_0x0cfc('0x1c')](_0x56196c)[_0x0cfc('0x1d')]();};}function respondWithResult(_0x5a9f3f,_0x465d44){_0x465d44=_0x465d44||0xc8;return function(_0x472d95){if(_0x472d95){return _0x5a9f3f['status'](_0x465d44)[_0x0cfc('0x1e')](_0x472d95);}};}function respondWithFilteredResult(_0x57eb4c,_0x3ca300){return function(_0x41da68){if(_0x41da68){var _0x1289aa=typeof _0x3ca300[_0x0cfc('0x1f')]===_0x0cfc('0x20')&&typeof _0x3ca300['limit']===_0x0cfc('0x20');var _0x5aea67=_0x41da68['count'];var _0x484c19=_0x1289aa?0x0:_0x3ca300['offset'];var _0x40065a=_0x1289aa?_0x41da68[_0x0cfc('0x21')]:_0x3ca300[_0x0cfc('0x1f')]+_0x3ca300['limit'];var _0x5526c2;if(_0x40065a>=_0x5aea67){_0x40065a=_0x5aea67;_0x5526c2=0xc8;}else{_0x5526c2=0xce;}_0x57eb4c[_0x0cfc('0x1c')](_0x5526c2);return _0x57eb4c['set'](_0x0cfc('0x22'),_0x484c19+'-'+_0x40065a+'/'+_0x5aea67)[_0x0cfc('0x1e')](_0x41da68);}return null;};}function patchUpdates(_0x463683){return function(_0x31342f){try{jsonpatch[_0x0cfc('0x23')](_0x31342f,_0x463683,!![]);}catch(_0x2e07f5){return BPromise['reject'](_0x2e07f5);}return _0x31342f[_0x0cfc('0x24')]();};}function saveUpdates(_0x1ff924,_0x301c38){return function(_0xa3f010){if(_0xa3f010){return _0xa3f010[_0x0cfc('0x25')](_0x1ff924)[_0x0cfc('0x26')](function(_0x8ac3eb){return _0x8ac3eb;});}return null;};}function removeEntity(_0x3124a0,_0x604561){return function(_0x5752c7){if(_0x5752c7){return _0x5752c7[_0x0cfc('0x27')]()[_0x0cfc('0x26')](function(){_0x3124a0['status'](0xcc)[_0x0cfc('0x1d')]();});}};}function handleEntityNotFound(_0x3374a6,_0x174831){return function(_0x24b918){if(!_0x24b918){_0x3374a6[_0x0cfc('0x1b')](0x194);}return _0x24b918;};}function handleError(_0x26f817,_0x1a5ea9){_0x1a5ea9=_0x1a5ea9||0x1f4;return function(_0x50e51f){logger[_0x0cfc('0x28')](_0x50e51f[_0x0cfc('0x29')]);if(_0x50e51f[_0x0cfc('0x2a')]){delete _0x50e51f['name'];}_0x26f817[_0x0cfc('0x1c')](_0x1a5ea9)[_0x0cfc('0x2b')](_0x50e51f);};}exports[_0x0cfc('0x2c')]=function(_0x4a205b,_0x33ed06){var _0x20ce27={},_0x246262={},_0xe4e0c0={'count':0x0,'rows':[]};var _0xc1e89c=_[_0x0cfc('0x2d')](db[_0x0cfc('0x2e')]['rawAttributes'],function(_0x4f2801){return{'name':_0x4f2801[_0x0cfc('0x2f')],'type':_0x4f2801['type'][_0x0cfc('0x30')]};});_0x246262['model']=_[_0x0cfc('0x31')](_['map'](_0xc1e89c,_0x0cfc('0x2a')),[_0x0cfc('0x2a')]);_0x246262[_0x0cfc('0x32')]=_[_0x0cfc('0x33')](_0x4a205b[_0x0cfc('0x32')]);_0x246262[_0x0cfc('0x34')]=_[_0x0cfc('0x35')](_0x246262[_0x0cfc('0x36')],_0x246262[_0x0cfc('0x32')]);_0x20ce27['attributes']=_[_0x0cfc('0x35')](_0x246262['model'],qs['fields'](_0x4a205b[_0x0cfc('0x32')]['fields']));_0x20ce27['attributes']=_0x20ce27[_0x0cfc('0x37')][_0x0cfc('0x38')]?_0x20ce27['attributes']:_0x246262[_0x0cfc('0x36')];if(!_0x4a205b[_0x0cfc('0x32')][_0x0cfc('0x39')](_0x0cfc('0x3a'))){_0x20ce27[_0x0cfc('0x3b')]=qs['limit'](_0x4a205b[_0x0cfc('0x32')][_0x0cfc('0x3b')]);_0x20ce27[_0x0cfc('0x1f')]=qs[_0x0cfc('0x1f')](_0x4a205b[_0x0cfc('0x32')][_0x0cfc('0x1f')]);}_0x20ce27[_0x0cfc('0x3c')]=qs[_0x0cfc('0x3d')](_0x4a205b[_0x0cfc('0x32')][_0x0cfc('0x3d')]);_0x20ce27[_0x0cfc('0x3e')]=qs[_0x0cfc('0x34')](_[_0x0cfc('0x3f')](_0x4a205b['query'],_0x246262['filters']),_0xc1e89c);if(_0x4a205b[_0x0cfc('0x32')]['filter']){_0x20ce27[_0x0cfc('0x3e')]=_[_0x0cfc('0x40')](_0x20ce27['where'],{'$or':_[_0x0cfc('0x2d')](_0xc1e89c,function(_0x135ca0){if(_0x135ca0[_0x0cfc('0x41')]!==_0x0cfc('0x42')){var _0x1afdff={};_0x1afdff[_0x135ca0[_0x0cfc('0x2a')]]={'$like':'%'+_0x4a205b[_0x0cfc('0x32')][_0x0cfc('0x43')]+'%'};return _0x1afdff;}})});}_0x20ce27=_[_0x0cfc('0x40')]({},_0x20ce27,_0x4a205b['options']);var _0x131c2c={'where':_0x20ce27[_0x0cfc('0x3e')]};return db[_0x0cfc('0x2e')][_0x0cfc('0x21')](_0x131c2c)[_0x0cfc('0x26')](function(_0x165874){_0xe4e0c0[_0x0cfc('0x21')]=_0x165874;if(_0x4a205b[_0x0cfc('0x32')][_0x0cfc('0x44')]){_0x20ce27[_0x0cfc('0x45')]=[{'all':!![]}];}return db[_0x0cfc('0x2e')][_0x0cfc('0x46')](_0x20ce27);})[_0x0cfc('0x26')](function(_0x115be3){_0xe4e0c0['rows']=_0x115be3;return _0xe4e0c0;})[_0x0cfc('0x26')](respondWithFilteredResult(_0x33ed06,_0x20ce27))[_0x0cfc('0x47')](handleError(_0x33ed06,null));};exports['show']=function(_0xe0b2b4,_0xe9f1b1){var _0x5944be={'raw':!![],'where':{'id':_0xe0b2b4[_0x0cfc('0x48')]['id']}},_0x2d2fed={};_0x2d2fed[_0x0cfc('0x36')]=_[_0x0cfc('0x33')](db['VoiceMailMessage'][_0x0cfc('0x49')]);_0x2d2fed[_0x0cfc('0x32')]=_[_0x0cfc('0x33')](_0xe0b2b4[_0x0cfc('0x32')]);_0x2d2fed['filters']=_[_0x0cfc('0x35')](_0x2d2fed['model'],_0x2d2fed['query']);_0x5944be[_0x0cfc('0x37')]=_['intersection'](_0x2d2fed[_0x0cfc('0x36')],qs[_0x0cfc('0x4a')](_0xe0b2b4[_0x0cfc('0x32')][_0x0cfc('0x4a')]));_0x5944be[_0x0cfc('0x37')]=_0x5944be['attributes'][_0x0cfc('0x38')]?_0x5944be[_0x0cfc('0x37')]:_0x2d2fed[_0x0cfc('0x36')];if(_0xe0b2b4[_0x0cfc('0x32')][_0x0cfc('0x44')]){_0x5944be[_0x0cfc('0x45')]=[{'all':!![]}];}_0x5944be=_[_0x0cfc('0x40')]({},_0x5944be,_0xe0b2b4['options']);return db[_0x0cfc('0x2e')][_0x0cfc('0x4b')](_0x5944be)['then'](handleEntityNotFound(_0xe9f1b1,null))[_0x0cfc('0x26')](respondWithResult(_0xe9f1b1,null))[_0x0cfc('0x47')](handleError(_0xe9f1b1,null));};exports[_0x0cfc('0x4c')]=function(_0x3d9aec,_0x51139b){return db[_0x0cfc('0x2e')]['create'](_0x3d9aec[_0x0cfc('0x4d')],{})[_0x0cfc('0x26')](respondWithResult(_0x51139b,0xc9))[_0x0cfc('0x47')](handleError(_0x51139b,null));};exports['update']=function(_0x3ff4c,_0x3406b0){if(_0x3ff4c['body']['id']){delete _0x3ff4c['body']['id'];}return db[_0x0cfc('0x2e')][_0x0cfc('0x4b')]({'where':{'id':_0x3ff4c[_0x0cfc('0x48')]['id']}})[_0x0cfc('0x26')](handleEntityNotFound(_0x3406b0,null))[_0x0cfc('0x26')](saveUpdates(_0x3ff4c[_0x0cfc('0x4d')],null))[_0x0cfc('0x26')](respondWithResult(_0x3406b0,null))[_0x0cfc('0x47')](handleError(_0x3406b0,null));};exports['destroy']=function(_0xdc2757,_0x31e10d){return db[_0x0cfc('0x2e')]['find']({'where':{'id':_0xdc2757['params']['id']}})[_0x0cfc('0x26')](handleEntityNotFound(_0x31e10d,null))[_0x0cfc('0x26')](removeEntity(_0x31e10d,null))[_0x0cfc('0x47')](handleError(_0x31e10d,null));};exports[_0x0cfc('0x4e')]=function(_0x58e89e,_0x12aa93,_0x2db37d){return db[_0x0cfc('0x2e')]['find']({'where':{'id':_0x58e89e['params']['id']},'attributes':['id','recording','msg_id']})[_0x0cfc('0x26')](handleEntityNotFound(_0x12aa93,null))[_0x0cfc('0x26')](function(_0x525b5a){if(_0x525b5a){if(!_0x525b5a[_0x0cfc('0x4f')]){throw new db[(_0x0cfc('0x50'))]['ValidationError'](_0x0cfc('0x51'));}var _0x4c70ea={'Content-Type':_0x0cfc('0x52'),'Content-Disposition':_0x0cfc('0x53')};if(_0x525b5a[_0x0cfc('0x54')]){_0x4c70ea[_0x0cfc('0x55')]='attachment;\x20filename=\x22'+_0x525b5a[_0x0cfc('0x54')]+_0x0cfc('0x56');}_0x12aa93['set'](_0x4c70ea);return _0x12aa93[_0x0cfc('0x2b')](new Buffer(_0x525b5a[_0x0cfc('0x4f')]));}})[_0x0cfc('0x47')](handleError(_0x12aa93,null));};
\ No newline at end of file
+var _0xfc36=['attachment','.wav\x22','eml-format','zip-dir','fast-json-patch','request-promise','moment','path','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','destroy','then','end','error','stack','name','send','index','map','VoiceMailMessage','fieldName','type','model','differenceBy','query','filters','attributes','intersection','fields','hasOwnProperty','nolimit','order','sort','where','merge','VIRTUAL','filter','includeAll','include','findAll','catch','show','rawAttributes','keys','length','options','find','create','body','params','recording','msg_id','Sequelize','ValidationError','VoiceMailMessage\x20not\x20found'];(function(_0x181edb,_0x13e879){var _0x1680da=function(_0x1ca121){while(--_0x1ca121){_0x181edb['push'](_0x181edb['shift']());}};_0x1680da(++_0x13e879);}(_0xfc36,0xa8));var _0x6fc3=function(_0x32a078,_0x3527d2){_0x32a078=_0x32a078-0x0;var _0x377968=_0xfc36[_0x32a078];return _0x377968;};'use strict';var emlformat=require(_0x6fc3('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x6fc3('0x1'));var jsonpatch=require(_0x6fc3('0x2'));var rp=require(_0x6fc3('0x3'));var moment=require(_0x6fc3('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require(_0x6fc3('0x5'));var sox=require('sox');var csv=require(_0x6fc3('0x6'));var ejs=require(_0x6fc3('0x7'));var fs=require('fs');var fs_extra=require(_0x6fc3('0x8'));var _=require('lodash');var squel=require(_0x6fc3('0x9'));var crypto=require(_0x6fc3('0xa'));var jsforce=require(_0x6fc3('0xb'));var deskjs=require(_0x6fc3('0xc'));var toCsv=require(_0x6fc3('0x6'));var querystring=require('querystring');var Papa=require(_0x6fc3('0xd'));var Redis=require(_0x6fc3('0xe'));var authService=require(_0x6fc3('0xf'));var qs=require(_0x6fc3('0x10'));var as=require(_0x6fc3('0x11'));var hardwareService=require(_0x6fc3('0x12'));var logger=require('../../config/logger')(_0x6fc3('0x13'));var utils=require(_0x6fc3('0x14'));var config=require(_0x6fc3('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0x6fc3('0x16'))['db'];function respondWithStatusCode(_0x2c8baf,_0x30eb15){_0x30eb15=_0x30eb15||0xcc;return function(_0x1cbc17){if(_0x1cbc17){return _0x2c8baf[_0x6fc3('0x17')](_0x30eb15);}return _0x2c8baf[_0x6fc3('0x18')](_0x30eb15)['end']();};}function respondWithResult(_0x139250,_0x487a87){_0x487a87=_0x487a87||0xc8;return function(_0x32a83f){if(_0x32a83f){return _0x139250['status'](_0x487a87)[_0x6fc3('0x19')](_0x32a83f);}};}function respondWithFilteredResult(_0x4482a5,_0x41f121){return function(_0x28611b){if(_0x28611b){var _0x242039=typeof _0x41f121[_0x6fc3('0x1a')]===_0x6fc3('0x1b')&&typeof _0x41f121[_0x6fc3('0x1c')]==='undefined';var _0x58ac58=_0x28611b[_0x6fc3('0x1d')];var _0x14c31e=_0x242039?0x0:_0x41f121[_0x6fc3('0x1a')];var _0x357a47=_0x242039?_0x28611b[_0x6fc3('0x1d')]:_0x41f121[_0x6fc3('0x1a')]+_0x41f121[_0x6fc3('0x1c')];var _0x34508d;if(_0x357a47>=_0x58ac58){_0x357a47=_0x58ac58;_0x34508d=0xc8;}else{_0x34508d=0xce;}_0x4482a5[_0x6fc3('0x18')](_0x34508d);return _0x4482a5[_0x6fc3('0x1e')](_0x6fc3('0x1f'),_0x14c31e+'-'+_0x357a47+'/'+_0x58ac58)['json'](_0x28611b);}return null;};}function patchUpdates(_0x133080){return function(_0x4f258e){try{jsonpatch[_0x6fc3('0x20')](_0x4f258e,_0x133080,!![]);}catch(_0x1455d2){return BPromise[_0x6fc3('0x21')](_0x1455d2);}return _0x4f258e[_0x6fc3('0x22')]();};}function saveUpdates(_0x99e7d,_0x215d25){return function(_0xf4ea6c){if(_0xf4ea6c){return _0xf4ea6c[_0x6fc3('0x23')](_0x99e7d)['then'](function(_0x2e9515){return _0x2e9515;});}return null;};}function removeEntity(_0x5bf219,_0x1c432d){return function(_0x3fd619){if(_0x3fd619){return _0x3fd619[_0x6fc3('0x24')]()[_0x6fc3('0x25')](function(){_0x5bf219[_0x6fc3('0x18')](0xcc)[_0x6fc3('0x26')]();});}};}function handleEntityNotFound(_0x2cafb4,_0x133c6e){return function(_0x4670db){if(!_0x4670db){_0x2cafb4['sendStatus'](0x194);}return _0x4670db;};}function handleError(_0x30a142,_0x16c43e){_0x16c43e=_0x16c43e||0x1f4;return function(_0x348f8f){logger[_0x6fc3('0x27')](_0x348f8f[_0x6fc3('0x28')]);if(_0x348f8f[_0x6fc3('0x29')]){delete _0x348f8f[_0x6fc3('0x29')];}_0x30a142[_0x6fc3('0x18')](_0x16c43e)[_0x6fc3('0x2a')](_0x348f8f);};}exports[_0x6fc3('0x2b')]=function(_0x3a4cd1,_0x28e223){var _0x38cf21={},_0x270a43={},_0x449cf0={'count':0x0,'rows':[]};var _0x32a993=_[_0x6fc3('0x2c')](db[_0x6fc3('0x2d')]['rawAttributes'],function(_0x1433cb){return{'name':_0x1433cb[_0x6fc3('0x2e')],'type':_0x1433cb[_0x6fc3('0x2f')]['key']};});_0x270a43[_0x6fc3('0x30')]=_[_0x6fc3('0x31')](_[_0x6fc3('0x2c')](_0x32a993,'name'),[_0x6fc3('0x29')]);_0x270a43[_0x6fc3('0x32')]=_['keys'](_0x3a4cd1['query']);_0x270a43[_0x6fc3('0x33')]=_['intersection'](_0x270a43[_0x6fc3('0x30')],_0x270a43[_0x6fc3('0x32')]);_0x38cf21[_0x6fc3('0x34')]=_[_0x6fc3('0x35')](_0x270a43[_0x6fc3('0x30')],qs[_0x6fc3('0x36')](_0x3a4cd1[_0x6fc3('0x32')]['fields']));_0x38cf21[_0x6fc3('0x34')]=_0x38cf21[_0x6fc3('0x34')]['length']?_0x38cf21[_0x6fc3('0x34')]:_0x270a43['model'];if(!_0x3a4cd1[_0x6fc3('0x32')][_0x6fc3('0x37')](_0x6fc3('0x38'))){_0x38cf21[_0x6fc3('0x1c')]=qs[_0x6fc3('0x1c')](_0x3a4cd1[_0x6fc3('0x32')][_0x6fc3('0x1c')]);_0x38cf21[_0x6fc3('0x1a')]=qs[_0x6fc3('0x1a')](_0x3a4cd1[_0x6fc3('0x32')][_0x6fc3('0x1a')]);}_0x38cf21[_0x6fc3('0x39')]=qs[_0x6fc3('0x3a')](_0x3a4cd1[_0x6fc3('0x32')]['sort']);_0x38cf21[_0x6fc3('0x3b')]=qs['filters'](_['pick'](_0x3a4cd1[_0x6fc3('0x32')],_0x270a43['filters']),_0x32a993);if(_0x3a4cd1[_0x6fc3('0x32')]['filter']){_0x38cf21[_0x6fc3('0x3b')]=_[_0x6fc3('0x3c')](_0x38cf21[_0x6fc3('0x3b')],{'$or':_[_0x6fc3('0x2c')](_0x32a993,function(_0x22514c){if(_0x22514c[_0x6fc3('0x2f')]!==_0x6fc3('0x3d')){var _0x409099={};_0x409099[_0x22514c[_0x6fc3('0x29')]]={'$like':'%'+_0x3a4cd1[_0x6fc3('0x32')][_0x6fc3('0x3e')]+'%'};return _0x409099;}})});}_0x38cf21=_[_0x6fc3('0x3c')]({},_0x38cf21,_0x3a4cd1['options']);var _0x5c68bd={'where':_0x38cf21[_0x6fc3('0x3b')]};return db['VoiceMailMessage']['count'](_0x5c68bd)[_0x6fc3('0x25')](function(_0x260f3c){_0x449cf0[_0x6fc3('0x1d')]=_0x260f3c;if(_0x3a4cd1[_0x6fc3('0x32')][_0x6fc3('0x3f')]){_0x38cf21[_0x6fc3('0x40')]=[{'all':!![]}];}return db['VoiceMailMessage'][_0x6fc3('0x41')](_0x38cf21);})['then'](function(_0x5e41b2){_0x449cf0['rows']=_0x5e41b2;return _0x449cf0;})[_0x6fc3('0x25')](respondWithFilteredResult(_0x28e223,_0x38cf21))[_0x6fc3('0x42')](handleError(_0x28e223,null));};exports[_0x6fc3('0x43')]=function(_0x5f4a0c,_0x31be64){var _0x353810={'raw':!![],'where':{'id':_0x5f4a0c['params']['id']}},_0x326596={};_0x326596[_0x6fc3('0x30')]=_['keys'](db[_0x6fc3('0x2d')][_0x6fc3('0x44')]);_0x326596[_0x6fc3('0x32')]=_[_0x6fc3('0x45')](_0x5f4a0c['query']);_0x326596[_0x6fc3('0x33')]=_['intersection'](_0x326596[_0x6fc3('0x30')],_0x326596[_0x6fc3('0x32')]);_0x353810[_0x6fc3('0x34')]=_['intersection'](_0x326596[_0x6fc3('0x30')],qs[_0x6fc3('0x36')](_0x5f4a0c[_0x6fc3('0x32')][_0x6fc3('0x36')]));_0x353810[_0x6fc3('0x34')]=_0x353810[_0x6fc3('0x34')][_0x6fc3('0x46')]?_0x353810[_0x6fc3('0x34')]:_0x326596['model'];if(_0x5f4a0c[_0x6fc3('0x32')]['includeAll']){_0x353810[_0x6fc3('0x40')]=[{'all':!![]}];}_0x353810=_['merge']({},_0x353810,_0x5f4a0c[_0x6fc3('0x47')]);return db[_0x6fc3('0x2d')][_0x6fc3('0x48')](_0x353810)[_0x6fc3('0x25')](handleEntityNotFound(_0x31be64,null))['then'](respondWithResult(_0x31be64,null))[_0x6fc3('0x42')](handleError(_0x31be64,null));};exports[_0x6fc3('0x49')]=function(_0x4e0e0f,_0x2fc446){return db['VoiceMailMessage'][_0x6fc3('0x49')](_0x4e0e0f[_0x6fc3('0x4a')],{})[_0x6fc3('0x25')](respondWithResult(_0x2fc446,0xc9))[_0x6fc3('0x42')](handleError(_0x2fc446,null));};exports[_0x6fc3('0x23')]=function(_0x45d5d9,_0x5e6e54){if(_0x45d5d9[_0x6fc3('0x4a')]['id']){delete _0x45d5d9['body']['id'];}return db[_0x6fc3('0x2d')][_0x6fc3('0x48')]({'where':{'id':_0x45d5d9['params']['id']}})[_0x6fc3('0x25')](handleEntityNotFound(_0x5e6e54,null))['then'](saveUpdates(_0x45d5d9[_0x6fc3('0x4a')],null))[_0x6fc3('0x25')](respondWithResult(_0x5e6e54,null))[_0x6fc3('0x42')](handleError(_0x5e6e54,null));};exports['destroy']=function(_0x11d07d,_0xadb139){return db[_0x6fc3('0x2d')][_0x6fc3('0x48')]({'where':{'id':_0x11d07d['params']['id']}})['then'](handleEntityNotFound(_0xadb139,null))[_0x6fc3('0x25')](removeEntity(_0xadb139,null))[_0x6fc3('0x42')](handleError(_0xadb139,null));};exports['download']=function(_0x546943,_0x332cf3,_0x12ba90){return db['VoiceMailMessage'][_0x6fc3('0x48')]({'where':{'id':_0x546943[_0x6fc3('0x4b')]['id']},'attributes':['id',_0x6fc3('0x4c'),_0x6fc3('0x4d')]})['then'](handleEntityNotFound(_0x332cf3,null))[_0x6fc3('0x25')](function(_0x38116d){if(_0x38116d){if(!_0x38116d[_0x6fc3('0x4c')]){throw new db[(_0x6fc3('0x4e'))][(_0x6fc3('0x4f'))](_0x6fc3('0x50'));}var _0x324c94={'Content-Type':'audio/wav','Content-Disposition':_0x6fc3('0x51')};if(_0x38116d[_0x6fc3('0x4d')]){_0x324c94['Content-Disposition']='attachment;\x20filename=\x22'+_0x38116d[_0x6fc3('0x4d')]+_0x6fc3('0x52');}_0x332cf3[_0x6fc3('0x1e')](_0x324c94);return _0x332cf3[_0x6fc3('0x2a')](new Buffer(_0x38116d[_0x6fc3('0x4c')]));}})[_0x6fc3('0x42')](handleError(_0x332cf3,null));};
\ No newline at end of file