Built motion from commit (unavailable).|2.5.22
[motion2.git] / server / api / voiceMailMessage / voiceMailMessage.controller.js
index a203bda..ca2a75b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x597f=['ejs','lodash','squel','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../config/license/util','status','end','json','count','offset','limit','set','Content-Range','apply','reject','save','update','destroy','then','sendStatus','name','send','index','VoiceMailMessage','type','key','model','map','query','filters','intersection','attributes','fields','length','order','sort','where','pick','filter','merge','VIRTUAL','includeAll','findAll','rows','params','keys','rawAttributes','options','find','catch','body','download','msg_id','Sequelize','VoiceMailMessage\x20not\x20found','audio/wav','attachment','Content-Disposition','attachment;\x20filename=\x22','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','mustache','path','sox','to-csv'];(function(_0x53ba69,_0x287485){var _0x41debc=function(_0x2abd36){while(--_0x2abd36){_0x53ba69['push'](_0x53ba69['shift']());}};_0x41debc(++_0x287485);}(_0x597f,0x177));var _0xf597=function(_0x48ce56,_0x213bea){_0x48ce56=_0x48ce56-0x0;var _0x25e8a1=_0x597f[_0x48ce56];return _0x25e8a1;};'use strict';var pdf=require(_0xf597('0x0'));var emlformat=require(_0xf597('0x1'));var rimraf=require(_0xf597('0x2'));var zipdir=require(_0xf597('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0xf597('0x4'));var moment=require(_0xf597('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xf597('0x6'));var util=require('util');var path=require(_0xf597('0x7'));var sox=require(_0xf597('0x8'));var csv=require(_0xf597('0x9'));var ejs=require(_0xf597('0xa'));var fs=require('fs');var _=require(_0xf597('0xb'));var squel=require(_0xf597('0xc'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0xf597('0x9'));var querystring=require(_0xf597('0xd'));var Papa=require(_0xf597('0xe'));var Redis=require(_0xf597('0xf'));var authService=require(_0xf597('0x10'));var qs=require(_0xf597('0x11'));var as=require(_0xf597('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xf597('0x13'))(_0xf597('0x14'));var utils=require('../../config/utils');var config=require(_0xf597('0x15'));var licenseUtil=require(_0xf597('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0xa99f9b,_0x526b66){_0x526b66=_0x526b66||0xcc;return function(_0x3194f2){if(_0x3194f2){return _0xa99f9b['sendStatus'](_0x526b66);}return _0xa99f9b[_0xf597('0x17')](_0x526b66)[_0xf597('0x18')]();};}function respondWithResult(_0x2eacdc,_0x5ec11e){_0x5ec11e=_0x5ec11e||0xc8;return function(_0x1486a0){if(_0x1486a0){return _0x2eacdc['status'](_0x5ec11e)[_0xf597('0x19')](_0x1486a0);}};}function respondWithFilteredResult(_0x55a6ee,_0x4489ff){return function(_0x3001cd){if(_0x3001cd){var _0x1ebd03=_0x3001cd[_0xf597('0x1a')],_0x40ff20=_0x4489ff[_0xf597('0x1b')],_0x2df7f7=_0x4489ff['offset']+_0x4489ff[_0xf597('0x1c')],_0x126961;if(_0x2df7f7>=_0x1ebd03){_0x2df7f7=_0x1ebd03;_0x126961=0xc8;}else{_0x126961=0xce;}_0x55a6ee[_0xf597('0x17')](_0x126961);return _0x55a6ee[_0xf597('0x1d')](_0xf597('0x1e'),_0x40ff20+'-'+_0x2df7f7+'/'+_0x1ebd03)['json'](_0x3001cd);}return null;};}function patchUpdates(_0x1aa2fc){return function(_0x18f3d9){try{jsonpatch[_0xf597('0x1f')](_0x18f3d9,_0x1aa2fc,!![]);}catch(_0x277e42){return BPromise[_0xf597('0x20')](_0x277e42);}return _0x18f3d9[_0xf597('0x21')]();};}function saveUpdates(_0x3d1ee3,_0x595f51){return function(_0x58fd03){if(_0x58fd03){return _0x58fd03[_0xf597('0x22')](_0x3d1ee3)['then'](function(_0x2fd51b){return _0x2fd51b;});}return null;};}function removeEntity(_0x3d0d7e,_0x11fbb7){return function(_0x354c99){if(_0x354c99){return _0x354c99[_0xf597('0x23')]()[_0xf597('0x24')](function(){_0x3d0d7e[_0xf597('0x17')](0xcc)[_0xf597('0x18')]();});}};}function handleEntityNotFound(_0x3e0c03,_0x7f914c){return function(_0x3823f2){if(!_0x3823f2){_0x3e0c03[_0xf597('0x25')](0x194);}return _0x3823f2;};}function handleError(_0x5335e4,_0x59f332){_0x59f332=_0x59f332||0x1f4;return function(_0x2bdcc6){logger['error'](_0x2bdcc6['stack']);if(_0x2bdcc6[_0xf597('0x26')]){delete _0x2bdcc6[_0xf597('0x26')];}_0x5335e4[_0xf597('0x17')](_0x59f332)[_0xf597('0x27')](_0x2bdcc6);};}exports[_0xf597('0x28')]=function(_0x4fe31e,_0x368ab0){var _0x24b016={},_0x31bcc7={},_0x13a12a={'count':0x0,'rows':[]};var _0x1c9b68=_['map'](db[_0xf597('0x29')]['rawAttributes'],function(_0x585cac){return{'name':_0x585cac['fieldName'],'type':_0x585cac[_0xf597('0x2a')][_0xf597('0x2b')]};});_0x31bcc7[_0xf597('0x2c')]=_['differenceBy'](_[_0xf597('0x2d')](_0x1c9b68,'name'),[_0xf597('0x26')]);_0x31bcc7[_0xf597('0x2e')]=_['keys'](_0x4fe31e['query']);_0x31bcc7[_0xf597('0x2f')]=_[_0xf597('0x30')](_0x31bcc7[_0xf597('0x2c')],_0x31bcc7['query']);_0x24b016[_0xf597('0x31')]=_[_0xf597('0x30')](_0x31bcc7[_0xf597('0x2c')],qs[_0xf597('0x32')](_0x4fe31e[_0xf597('0x2e')][_0xf597('0x32')]));_0x24b016[_0xf597('0x31')]=_0x24b016['attributes'][_0xf597('0x33')]?_0x24b016['attributes']:_0x31bcc7['model'];if(!_0x4fe31e[_0xf597('0x2e')]['hasOwnProperty']('nolimit')){_0x24b016[_0xf597('0x1c')]=qs[_0xf597('0x1c')](_0x4fe31e['query'][_0xf597('0x1c')]);_0x24b016['offset']=qs['offset'](_0x4fe31e[_0xf597('0x2e')][_0xf597('0x1b')]);}_0x24b016[_0xf597('0x34')]=qs[_0xf597('0x35')](_0x4fe31e[_0xf597('0x2e')][_0xf597('0x35')]);_0x24b016[_0xf597('0x36')]=qs[_0xf597('0x2f')](_[_0xf597('0x37')](_0x4fe31e[_0xf597('0x2e')],_0x31bcc7[_0xf597('0x2f')]),_0x1c9b68);if(_0x4fe31e[_0xf597('0x2e')][_0xf597('0x38')]){_0x24b016[_0xf597('0x36')]=_[_0xf597('0x39')](_0x24b016[_0xf597('0x36')],{'$or':_[_0xf597('0x2d')](_0x1c9b68,function(_0xb9988a){if(_0xb9988a['type']!==_0xf597('0x3a')){var _0x58e62f={};_0x58e62f[_0xb9988a['name']]={'$like':'%'+_0x4fe31e[_0xf597('0x2e')]['filter']+'%'};return _0x58e62f;}})});}_0x24b016=_[_0xf597('0x39')]({},_0x24b016,_0x4fe31e['options']);var _0xef9244={'where':_0x24b016[_0xf597('0x36')]};return db[_0xf597('0x29')]['count'](_0xef9244)[_0xf597('0x24')](function(_0x694c48){_0x13a12a[_0xf597('0x1a')]=_0x694c48;if(_0x4fe31e['query'][_0xf597('0x3b')]){_0x24b016['include']=[{'all':!![]}];}return db['VoiceMailMessage'][_0xf597('0x3c')](_0x24b016);})[_0xf597('0x24')](function(_0x299bbd){_0x13a12a[_0xf597('0x3d')]=_0x299bbd;return _0x13a12a;})[_0xf597('0x24')](respondWithFilteredResult(_0x368ab0,_0x24b016))['catch'](handleError(_0x368ab0,null));};exports['show']=function(_0xe93078,_0x9e5a77){var _0x2caf7a={'raw':!![],'where':{'id':_0xe93078[_0xf597('0x3e')]['id']}},_0x47a449={};_0x47a449[_0xf597('0x2c')]=_[_0xf597('0x3f')](db[_0xf597('0x29')][_0xf597('0x40')]);_0x47a449[_0xf597('0x2e')]=_[_0xf597('0x3f')](_0xe93078['query']);_0x47a449['filters']=_[_0xf597('0x30')](_0x47a449['model'],_0x47a449['query']);_0x2caf7a[_0xf597('0x31')]=_[_0xf597('0x30')](_0x47a449[_0xf597('0x2c')],qs[_0xf597('0x32')](_0xe93078[_0xf597('0x2e')][_0xf597('0x32')]));_0x2caf7a[_0xf597('0x31')]=_0x2caf7a[_0xf597('0x31')][_0xf597('0x33')]?_0x2caf7a[_0xf597('0x31')]:_0x47a449['model'];if(_0xe93078[_0xf597('0x2e')][_0xf597('0x3b')]){_0x2caf7a['include']=[{'all':!![]}];}_0x2caf7a=_[_0xf597('0x39')]({},_0x2caf7a,_0xe93078[_0xf597('0x41')]);return db[_0xf597('0x29')][_0xf597('0x42')](_0x2caf7a)['then'](handleEntityNotFound(_0x9e5a77,null))['then'](respondWithResult(_0x9e5a77,null))[_0xf597('0x43')](handleError(_0x9e5a77,null));};exports['create']=function(_0x2becd7,_0x1c49f2){return db[_0xf597('0x29')]['create'](_0x2becd7[_0xf597('0x44')],{})['then'](respondWithResult(_0x1c49f2,0xc9))['catch'](handleError(_0x1c49f2,null));};exports[_0xf597('0x22')]=function(_0x3e3cb2,_0x5ecba2){if(_0x3e3cb2[_0xf597('0x44')]['id']){delete _0x3e3cb2[_0xf597('0x44')]['id'];}return db['VoiceMailMessage'][_0xf597('0x42')]({'where':{'id':_0x3e3cb2['params']['id']}})[_0xf597('0x24')](handleEntityNotFound(_0x5ecba2,null))[_0xf597('0x24')](saveUpdates(_0x3e3cb2['body'],null))[_0xf597('0x24')](respondWithResult(_0x5ecba2,null))['catch'](handleError(_0x5ecba2,null));};exports['destroy']=function(_0x27a286,_0x1be4f0){return db[_0xf597('0x29')][_0xf597('0x42')]({'where':{'id':_0x27a286[_0xf597('0x3e')]['id']}})[_0xf597('0x24')](handleEntityNotFound(_0x1be4f0,null))[_0xf597('0x24')](removeEntity(_0x1be4f0,null))[_0xf597('0x43')](handleError(_0x1be4f0,null));};exports[_0xf597('0x45')]=function(_0x5b57ec,_0xbbba0f,_0x5d9548){return db[_0xf597('0x29')]['find']({'where':{'id':_0x5b57ec['params']['id']},'attributes':['id','recording',_0xf597('0x46')]})[_0xf597('0x24')](handleEntityNotFound(_0xbbba0f,null))[_0xf597('0x24')](function(_0x3b0195){if(_0x3b0195){if(!_0x3b0195['recording']){throw new db[(_0xf597('0x47'))]['ValidationError'](_0xf597('0x48'));}var _0x5e950f={'Content-Type':_0xf597('0x49'),'Content-Disposition':_0xf597('0x4a')};if(_0x3b0195[_0xf597('0x46')]){_0x5e950f[_0xf597('0x4b')]=_0xf597('0x4c')+_0x3b0195['msg_id']+'.wav\x22';}_0xbbba0f[_0xf597('0x1d')](_0x5e950f);return _0xbbba0f[_0xf597('0x27')](new Buffer(_0x3b0195['recording']));}})[_0xf597('0x43')](handleError(_0xbbba0f,null));};
\ No newline at end of file
+var _0xc53a=['crypto','jsforce','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','limit','set','Content-Range','apply','reject','save','update','destroy','end','error','stack','send','index','map','fieldName','type','key','name','query','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','filters','filter','merge','VIRTUAL','VoiceMailMessage','then','count','includeAll','include','findAll','rows','catch','show','params','rawAttributes','keys','options','find','create','body','recording','Sequelize','audio/wav','msg_id','Content-Disposition','attachment;\x20filename=\x22','.wav\x22','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','util','path','sox','to-csv','ejs','lodash','squel'];(function(_0x6b658b,_0xd739c){var _0x546719=function(_0x20dd83){while(--_0x20dd83){_0x6b658b['push'](_0x6b658b['shift']());}};_0x546719(++_0xd739c);}(_0xc53a,0xf4));var _0xac53=function(_0xfae23b,_0x2be4ba){_0xfae23b=_0xfae23b-0x0;var _0x200640=_0xc53a[_0xfae23b];return _0x200640;};'use strict';var pdf=require(_0xac53('0x0'));var emlformat=require(_0xac53('0x1'));var rimraf=require(_0xac53('0x2'));var zipdir=require(_0xac53('0x3'));var jsonpatch=require(_0xac53('0x4'));var rp=require(_0xac53('0x5'));var moment=require(_0xac53('0x6'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xac53('0x7'));var path=require(_0xac53('0x8'));var sox=require(_0xac53('0x9'));var csv=require(_0xac53('0xa'));var ejs=require(_0xac53('0xb'));var fs=require('fs');var _=require(_0xac53('0xc'));var squel=require(_0xac53('0xd'));var crypto=require(_0xac53('0xe'));var jsforce=require(_0xac53('0xf'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xac53('0x10'));var Papa=require('papaparse');var Redis=require(_0xac53('0x11'));var authService=require('../../components/auth/service');var qs=require(_0xac53('0x12'));var as=require(_0xac53('0x13'));var hardwareService=require(_0xac53('0x14'));var logger=require(_0xac53('0x15'))(_0xac53('0x16'));var utils=require(_0xac53('0x17'));var config=require('../../config/environment');var licenseUtil=require(_0xac53('0x18'));var db=require(_0xac53('0x19'))['db'];function respondWithStatusCode(_0x2cfdbf,_0x55463b){_0x55463b=_0x55463b||0xcc;return function(_0x163ec0){if(_0x163ec0){return _0x2cfdbf[_0xac53('0x1a')](_0x55463b);}return _0x2cfdbf[_0xac53('0x1b')](_0x55463b)['end']();};}function respondWithResult(_0x254173,_0x56c6cc){_0x56c6cc=_0x56c6cc||0xc8;return function(_0x13eb0a){if(_0x13eb0a){return _0x254173[_0xac53('0x1b')](_0x56c6cc)[_0xac53('0x1c')](_0x13eb0a);}};}function respondWithFilteredResult(_0x536388,_0x249252){return function(_0x231a13){if(_0x231a13){var _0x428c20=_0x231a13['count'],_0x328bdf=_0x249252[_0xac53('0x1d')],_0x160a0c=_0x249252[_0xac53('0x1d')]+_0x249252[_0xac53('0x1e')],_0x467447;if(_0x160a0c>=_0x428c20){_0x160a0c=_0x428c20;_0x467447=0xc8;}else{_0x467447=0xce;}_0x536388[_0xac53('0x1b')](_0x467447);return _0x536388[_0xac53('0x1f')](_0xac53('0x20'),_0x328bdf+'-'+_0x160a0c+'/'+_0x428c20)['json'](_0x231a13);}return null;};}function patchUpdates(_0x4a49ec){return function(_0x5e698f){try{jsonpatch[_0xac53('0x21')](_0x5e698f,_0x4a49ec,!![]);}catch(_0x16c48b){return BPromise[_0xac53('0x22')](_0x16c48b);}return _0x5e698f[_0xac53('0x23')]();};}function saveUpdates(_0x12081c,_0x30ba9c){return function(_0x421784){if(_0x421784){return _0x421784[_0xac53('0x24')](_0x12081c)['then'](function(_0x36e2a3){return _0x36e2a3;});}return null;};}function removeEntity(_0x281f8c,_0x2bb253){return function(_0x2dac50){if(_0x2dac50){return _0x2dac50[_0xac53('0x25')]()['then'](function(){_0x281f8c[_0xac53('0x1b')](0xcc)[_0xac53('0x26')]();});}};}function handleEntityNotFound(_0x38d97e,_0x347b7f){return function(_0x2295a3){if(!_0x2295a3){_0x38d97e['sendStatus'](0x194);}return _0x2295a3;};}function handleError(_0x9f135c,_0x277c25){_0x277c25=_0x277c25||0x1f4;return function(_0x5beb38){logger[_0xac53('0x27')](_0x5beb38[_0xac53('0x28')]);if(_0x5beb38['name']){delete _0x5beb38['name'];}_0x9f135c[_0xac53('0x1b')](_0x277c25)[_0xac53('0x29')](_0x5beb38);};}exports[_0xac53('0x2a')]=function(_0x589346,_0xb2ae47){var _0x2d4931={},_0x40dd46={},_0x43e932={'count':0x0,'rows':[]};var _0x1c1d61=_[_0xac53('0x2b')](db['VoiceMailMessage']['rawAttributes'],function(_0xf03f6f){return{'name':_0xf03f6f[_0xac53('0x2c')],'type':_0xf03f6f[_0xac53('0x2d')][_0xac53('0x2e')]};});_0x40dd46['model']=_['differenceBy'](_[_0xac53('0x2b')](_0x1c1d61,_0xac53('0x2f')),[_0xac53('0x2f')]);_0x40dd46[_0xac53('0x30')]=_['keys'](_0x589346[_0xac53('0x30')]);_0x40dd46['filters']=_[_0xac53('0x31')](_0x40dd46[_0xac53('0x32')],_0x40dd46['query']);_0x2d4931[_0xac53('0x33')]=_['intersection'](_0x40dd46[_0xac53('0x32')],qs[_0xac53('0x34')](_0x589346[_0xac53('0x30')][_0xac53('0x34')]));_0x2d4931[_0xac53('0x33')]=_0x2d4931[_0xac53('0x33')][_0xac53('0x35')]?_0x2d4931[_0xac53('0x33')]:_0x40dd46['model'];if(!_0x589346['query'][_0xac53('0x36')](_0xac53('0x37'))){_0x2d4931[_0xac53('0x1e')]=qs[_0xac53('0x1e')](_0x589346[_0xac53('0x30')][_0xac53('0x1e')]);_0x2d4931[_0xac53('0x1d')]=qs[_0xac53('0x1d')](_0x589346[_0xac53('0x30')]['offset']);}_0x2d4931['order']=qs[_0xac53('0x38')](_0x589346[_0xac53('0x30')][_0xac53('0x38')]);_0x2d4931[_0xac53('0x39')]=qs['filters'](_[_0xac53('0x3a')](_0x589346[_0xac53('0x30')],_0x40dd46[_0xac53('0x3b')]),_0x1c1d61);if(_0x589346[_0xac53('0x30')][_0xac53('0x3c')]){_0x2d4931[_0xac53('0x39')]=_[_0xac53('0x3d')](_0x2d4931[_0xac53('0x39')],{'$or':_[_0xac53('0x2b')](_0x1c1d61,function(_0xa20baf){if(_0xa20baf[_0xac53('0x2d')]!==_0xac53('0x3e')){var _0x3d8ad3={};_0x3d8ad3[_0xa20baf[_0xac53('0x2f')]]={'$like':'%'+_0x589346[_0xac53('0x30')][_0xac53('0x3c')]+'%'};return _0x3d8ad3;}})});}_0x2d4931=_['merge']({},_0x2d4931,_0x589346['options']);var _0x46b796={'where':_0x2d4931[_0xac53('0x39')]};return db[_0xac53('0x3f')]['count'](_0x46b796)[_0xac53('0x40')](function(_0xe67a11){_0x43e932[_0xac53('0x41')]=_0xe67a11;if(_0x589346[_0xac53('0x30')][_0xac53('0x42')]){_0x2d4931[_0xac53('0x43')]=[{'all':!![]}];}return db['VoiceMailMessage'][_0xac53('0x44')](_0x2d4931);})[_0xac53('0x40')](function(_0x1dd17f){_0x43e932[_0xac53('0x45')]=_0x1dd17f;return _0x43e932;})[_0xac53('0x40')](respondWithFilteredResult(_0xb2ae47,_0x2d4931))[_0xac53('0x46')](handleError(_0xb2ae47,null));};exports[_0xac53('0x47')]=function(_0x113a1d,_0x1b5448){var _0x20407c={'raw':!![],'where':{'id':_0x113a1d[_0xac53('0x48')]['id']}},_0x2f106d={};_0x2f106d[_0xac53('0x32')]=_['keys'](db['VoiceMailMessage'][_0xac53('0x49')]);_0x2f106d[_0xac53('0x30')]=_[_0xac53('0x4a')](_0x113a1d[_0xac53('0x30')]);_0x2f106d['filters']=_[_0xac53('0x31')](_0x2f106d[_0xac53('0x32')],_0x2f106d[_0xac53('0x30')]);_0x20407c['attributes']=_[_0xac53('0x31')](_0x2f106d[_0xac53('0x32')],qs[_0xac53('0x34')](_0x113a1d[_0xac53('0x30')][_0xac53('0x34')]));_0x20407c[_0xac53('0x33')]=_0x20407c[_0xac53('0x33')]['length']?_0x20407c[_0xac53('0x33')]:_0x2f106d[_0xac53('0x32')];if(_0x113a1d[_0xac53('0x30')][_0xac53('0x42')]){_0x20407c['include']=[{'all':!![]}];}_0x20407c=_[_0xac53('0x3d')]({},_0x20407c,_0x113a1d[_0xac53('0x4b')]);return db['VoiceMailMessage'][_0xac53('0x4c')](_0x20407c)[_0xac53('0x40')](handleEntityNotFound(_0x1b5448,null))[_0xac53('0x40')](respondWithResult(_0x1b5448,null))['catch'](handleError(_0x1b5448,null));};exports['create']=function(_0x180e97,_0x1faf41){return db[_0xac53('0x3f')][_0xac53('0x4d')](_0x180e97[_0xac53('0x4e')],{})[_0xac53('0x40')](respondWithResult(_0x1faf41,0xc9))[_0xac53('0x46')](handleError(_0x1faf41,null));};exports['update']=function(_0x31c76f,_0x1fa397){if(_0x31c76f['body']['id']){delete _0x31c76f[_0xac53('0x4e')]['id'];}return db[_0xac53('0x3f')][_0xac53('0x4c')]({'where':{'id':_0x31c76f[_0xac53('0x48')]['id']}})[_0xac53('0x40')](handleEntityNotFound(_0x1fa397,null))['then'](saveUpdates(_0x31c76f[_0xac53('0x4e')],null))[_0xac53('0x40')](respondWithResult(_0x1fa397,null))[_0xac53('0x46')](handleError(_0x1fa397,null));};exports[_0xac53('0x25')]=function(_0x2fe793,_0x5926a0){return db[_0xac53('0x3f')]['find']({'where':{'id':_0x2fe793[_0xac53('0x48')]['id']}})[_0xac53('0x40')](handleEntityNotFound(_0x5926a0,null))[_0xac53('0x40')](removeEntity(_0x5926a0,null))['catch'](handleError(_0x5926a0,null));};exports['download']=function(_0x125be3,_0x1f153c,_0x563c8a){return db[_0xac53('0x3f')][_0xac53('0x4c')]({'where':{'id':_0x125be3[_0xac53('0x48')]['id']},'attributes':['id',_0xac53('0x4f'),'msg_id']})[_0xac53('0x40')](handleEntityNotFound(_0x1f153c,null))[_0xac53('0x40')](function(_0x37116f){if(_0x37116f){if(!_0x37116f[_0xac53('0x4f')]){throw new db[(_0xac53('0x50'))]['ValidationError']('VoiceMailMessage\x20not\x20found');}var _0x4e8a28={'Content-Type':_0xac53('0x51'),'Content-Disposition':'attachment'};if(_0x37116f[_0xac53('0x52')]){_0x4e8a28[_0xac53('0x53')]=_0xac53('0x54')+_0x37116f[_0xac53('0x52')]+_0xac53('0x55');}_0x1f153c['set'](_0x4e8a28);return _0x1f153c[_0xac53('0x29')](new Buffer(_0x37116f[_0xac53('0x4f')]));}})[_0xac53('0x46')](handleError(_0x1f153c,null));};
\ No newline at end of file