Built motion from commit (unavailable).|2.5.9
[motion2.git] / server / api / voiceMailMessage / voiceMailMessage.controller.js
index a643698..4d7430b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8080=['destroy','error','stack','name','index','map','VoiceMailMessage','type','key','differenceBy','query','keys','filters','intersection','model','attributes','hasOwnProperty','nolimit','order','sort','where','VIRTUAL','filter','options','includeAll','include','findAll','catch','show','params','rawAttributes','fields','length','find','create','body','download','recording','msg_id','Sequelize','VoiceMailMessage\x20not\x20found','audio/wav','attachment','Content-Disposition','attachment;\x20filename=\x22','.wav\x22','send','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','moment','mustache','util','to-csv','ejs','lodash','squel','crypto','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','count','offset','limit','Content-Range','apply','reject','save','update','then'];(function(_0x5a6d11,_0x3f443b){var _0x2512ff=function(_0x856600){while(--_0x856600){_0x5a6d11['push'](_0x5a6d11['shift']());}};_0x2512ff(++_0x3f443b);}(_0x8080,0x12b));var _0x0808=function(_0x17749b,_0x4b4e3e){_0x17749b=_0x17749b-0x0;var _0x37ad41=_0x8080[_0x17749b];return _0x37ad41;};'use strict';var pdf=require(_0x0808('0x0'));var emlformat=require(_0x0808('0x1'));var rimraf=require(_0x0808('0x2'));var zipdir=require(_0x0808('0x3'));var jsonpatch=require(_0x0808('0x4'));var rp=require('request-promise');var moment=require(_0x0808('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x0808('0x6'));var util=require(_0x0808('0x7'));var path=require('path');var sox=require('sox');var csv=require(_0x0808('0x8'));var ejs=require(_0x0808('0x9'));var fs=require('fs');var _=require(_0x0808('0xa'));var squel=require(_0x0808('0xb'));var crypto=require(_0x0808('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x0808('0x8'));var querystring=require(_0x0808('0xd'));var Papa=require(_0x0808('0xe'));var Redis=require(_0x0808('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x0808('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x0808('0x11'));var logger=require(_0x0808('0x12'))(_0x0808('0x13'));var utils=require(_0x0808('0x14'));var config=require(_0x0808('0x15'));var licenseUtil=require(_0x0808('0x16'));var db=require(_0x0808('0x17'))['db'];function respondWithStatusCode(_0x213b02,_0x11e51b){_0x11e51b=_0x11e51b||0xcc;return function(_0x355ef9){if(_0x355ef9){return _0x213b02[_0x0808('0x18')](_0x11e51b);}return _0x213b02[_0x0808('0x19')](_0x11e51b)[_0x0808('0x1a')]();};}function respondWithResult(_0x27456f,_0x122102){_0x122102=_0x122102||0xc8;return function(_0xd30d1d){if(_0xd30d1d){return _0x27456f[_0x0808('0x19')](_0x122102)[_0x0808('0x1b')](_0xd30d1d);}};}function respondWithFilteredResult(_0x550581,_0x100084){return function(_0xfdd859){if(_0xfdd859){var _0x8e0386=_0xfdd859[_0x0808('0x1c')],_0x4f896b=_0x100084['offset'],_0xf2af14=_0x100084[_0x0808('0x1d')]+_0x100084[_0x0808('0x1e')],_0x42776e;if(_0xf2af14>=_0x8e0386){_0xf2af14=_0x8e0386;_0x42776e=0xc8;}else{_0x42776e=0xce;}_0x550581[_0x0808('0x19')](_0x42776e);return _0x550581['set'](_0x0808('0x1f'),_0x4f896b+'-'+_0xf2af14+'/'+_0x8e0386)['json'](_0xfdd859);}return null;};}function patchUpdates(_0x5e41d5){return function(_0x1d62fd){try{jsonpatch[_0x0808('0x20')](_0x1d62fd,_0x5e41d5,!![]);}catch(_0x495046){return BPromise[_0x0808('0x21')](_0x495046);}return _0x1d62fd[_0x0808('0x22')]();};}function saveUpdates(_0x5410fc,_0x145932){return function(_0x4e6ace){if(_0x4e6ace){return _0x4e6ace[_0x0808('0x23')](_0x5410fc)[_0x0808('0x24')](function(_0x26f022){return _0x26f022;});}return null;};}function removeEntity(_0x166bfb,_0x5ad0c8){return function(_0xf59c4f){if(_0xf59c4f){return _0xf59c4f[_0x0808('0x25')]()[_0x0808('0x24')](function(){_0x166bfb['status'](0xcc)[_0x0808('0x1a')]();});}};}function handleEntityNotFound(_0xbede77,_0x2d523c){return function(_0x29ba07){if(!_0x29ba07){_0xbede77[_0x0808('0x18')](0x194);}return _0x29ba07;};}function handleError(_0x52767b,_0x179eb2){_0x179eb2=_0x179eb2||0x1f4;return function(_0x3eda07){logger[_0x0808('0x26')](_0x3eda07[_0x0808('0x27')]);if(_0x3eda07[_0x0808('0x28')]){delete _0x3eda07[_0x0808('0x28')];}_0x52767b[_0x0808('0x19')](_0x179eb2)['send'](_0x3eda07);};}exports[_0x0808('0x29')]=function(_0x1c5059,_0x3fff88){var _0x302554={},_0x6eef42={},_0x515682={'count':0x0,'rows':[]};var _0x5b6d5c=_[_0x0808('0x2a')](db[_0x0808('0x2b')]['rawAttributes'],function(_0x5af25d){return{'name':_0x5af25d['fieldName'],'type':_0x5af25d[_0x0808('0x2c')][_0x0808('0x2d')]};});_0x6eef42['model']=_[_0x0808('0x2e')](_[_0x0808('0x2a')](_0x5b6d5c,_0x0808('0x28')),[_0x0808('0x28')]);_0x6eef42[_0x0808('0x2f')]=_[_0x0808('0x30')](_0x1c5059[_0x0808('0x2f')]);_0x6eef42[_0x0808('0x31')]=_[_0x0808('0x32')](_0x6eef42[_0x0808('0x33')],_0x6eef42[_0x0808('0x2f')]);_0x302554[_0x0808('0x34')]=_[_0x0808('0x32')](_0x6eef42[_0x0808('0x33')],qs['fields'](_0x1c5059[_0x0808('0x2f')]['fields']));_0x302554['attributes']=_0x302554[_0x0808('0x34')]['length']?_0x302554[_0x0808('0x34')]:_0x6eef42[_0x0808('0x33')];if(!_0x1c5059[_0x0808('0x2f')][_0x0808('0x35')](_0x0808('0x36'))){_0x302554[_0x0808('0x1e')]=qs[_0x0808('0x1e')](_0x1c5059[_0x0808('0x2f')][_0x0808('0x1e')]);_0x302554[_0x0808('0x1d')]=qs[_0x0808('0x1d')](_0x1c5059[_0x0808('0x2f')][_0x0808('0x1d')]);}_0x302554[_0x0808('0x37')]=qs[_0x0808('0x38')](_0x1c5059[_0x0808('0x2f')][_0x0808('0x38')]);_0x302554[_0x0808('0x39')]=qs['filters'](_['pick'](_0x1c5059[_0x0808('0x2f')],_0x6eef42[_0x0808('0x31')]),_0x5b6d5c);if(_0x1c5059['query']['filter']){_0x302554[_0x0808('0x39')]=_['merge'](_0x302554[_0x0808('0x39')],{'$or':_['map'](_0x5b6d5c,function(_0x277408){if(_0x277408[_0x0808('0x2c')]!==_0x0808('0x3a')){var _0x1403fc={};_0x1403fc[_0x277408[_0x0808('0x28')]]={'$like':'%'+_0x1c5059['query'][_0x0808('0x3b')]+'%'};return _0x1403fc;}})});}_0x302554=_['merge']({},_0x302554,_0x1c5059[_0x0808('0x3c')]);var _0x49e0b8={'where':_0x302554[_0x0808('0x39')]};return db[_0x0808('0x2b')][_0x0808('0x1c')](_0x49e0b8)[_0x0808('0x24')](function(_0x3f072f){_0x515682[_0x0808('0x1c')]=_0x3f072f;if(_0x1c5059[_0x0808('0x2f')][_0x0808('0x3d')]){_0x302554[_0x0808('0x3e')]=[{'all':!![]}];}return db['VoiceMailMessage'][_0x0808('0x3f')](_0x302554);})[_0x0808('0x24')](function(_0x1c06f7){_0x515682['rows']=_0x1c06f7;return _0x515682;})[_0x0808('0x24')](respondWithFilteredResult(_0x3fff88,_0x302554))[_0x0808('0x40')](handleError(_0x3fff88,null));};exports[_0x0808('0x41')]=function(_0x4fe21f,_0x1cb552){var _0x55956d={'raw':!![],'where':{'id':_0x4fe21f[_0x0808('0x42')]['id']}},_0x4504fd={};_0x4504fd[_0x0808('0x33')]=_['keys'](db['VoiceMailMessage'][_0x0808('0x43')]);_0x4504fd[_0x0808('0x2f')]=_[_0x0808('0x30')](_0x4fe21f[_0x0808('0x2f')]);_0x4504fd[_0x0808('0x31')]=_[_0x0808('0x32')](_0x4504fd[_0x0808('0x33')],_0x4504fd[_0x0808('0x2f')]);_0x55956d['attributes']=_[_0x0808('0x32')](_0x4504fd['model'],qs['fields'](_0x4fe21f['query'][_0x0808('0x44')]));_0x55956d['attributes']=_0x55956d['attributes'][_0x0808('0x45')]?_0x55956d[_0x0808('0x34')]:_0x4504fd[_0x0808('0x33')];if(_0x4fe21f[_0x0808('0x2f')][_0x0808('0x3d')]){_0x55956d[_0x0808('0x3e')]=[{'all':!![]}];}_0x55956d=_['merge']({},_0x55956d,_0x4fe21f[_0x0808('0x3c')]);return db[_0x0808('0x2b')][_0x0808('0x46')](_0x55956d)[_0x0808('0x24')](handleEntityNotFound(_0x1cb552,null))['then'](respondWithResult(_0x1cb552,null))['catch'](handleError(_0x1cb552,null));};exports['create']=function(_0x4851b1,_0x78a926){return db['VoiceMailMessage'][_0x0808('0x47')](_0x4851b1['body'],{})['then'](respondWithResult(_0x78a926,0xc9))[_0x0808('0x40')](handleError(_0x78a926,null));};exports[_0x0808('0x23')]=function(_0x424e0e,_0x4ec3de){if(_0x424e0e[_0x0808('0x48')]['id']){delete _0x424e0e['body']['id'];}return db[_0x0808('0x2b')][_0x0808('0x46')]({'where':{'id':_0x424e0e[_0x0808('0x42')]['id']}})[_0x0808('0x24')](handleEntityNotFound(_0x4ec3de,null))[_0x0808('0x24')](saveUpdates(_0x424e0e[_0x0808('0x48')],null))[_0x0808('0x24')](respondWithResult(_0x4ec3de,null))[_0x0808('0x40')](handleError(_0x4ec3de,null));};exports[_0x0808('0x25')]=function(_0x59f2ea,_0x37cd21){return db[_0x0808('0x2b')]['find']({'where':{'id':_0x59f2ea[_0x0808('0x42')]['id']}})[_0x0808('0x24')](handleEntityNotFound(_0x37cd21,null))[_0x0808('0x24')](removeEntity(_0x37cd21,null))[_0x0808('0x40')](handleError(_0x37cd21,null));};exports[_0x0808('0x49')]=function(_0x26bcf8,_0x1e7f02,_0x57970f){return db[_0x0808('0x2b')][_0x0808('0x46')]({'where':{'id':_0x26bcf8[_0x0808('0x42')]['id']},'attributes':['id',_0x0808('0x4a'),_0x0808('0x4b')]})['then'](handleEntityNotFound(_0x1e7f02,null))[_0x0808('0x24')](function(_0x1e03cb){if(_0x1e03cb){if(!_0x1e03cb['recording']){throw new db[(_0x0808('0x4c'))]['ValidationError'](_0x0808('0x4d'));}var _0x4b5be1={'Content-Type':_0x0808('0x4e'),'Content-Disposition':_0x0808('0x4f')};if(_0x1e03cb[_0x0808('0x4b')]){_0x4b5be1[_0x0808('0x50')]=_0x0808('0x51')+_0x1e03cb[_0x0808('0x4b')]+_0x0808('0x52');}_0x1e7f02['set'](_0x4b5be1);return _0x1e7f02[_0x0808('0x53')](new Buffer(_0x1e03cb[_0x0808('0x4a')]));}})[_0x0808('0x40')](handleError(_0x1e7f02,null));};
\ No newline at end of file
+var _0x576a=['differenceBy','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','VIRTUAL','merge','options','count','include','findAll','rows','catch','show','params','keys','includeAll','create','body','find','destroy','download','recording','msg_id','Sequelize','ValidationError','VoiceMailMessage\x20not\x20found','attachment;\x20filename=\x22','.wav\x22','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','moment','path','sox','to-csv','ejs','squel','crypto','jsforce','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','set','Content-Range','apply','reject','save','then','error','stack','name','send','index','map','VoiceMailMessage','rawAttributes','type'];(function(_0x2316b9,_0x87059b){var _0x4405a9=function(_0xd9a3e1){while(--_0xd9a3e1){_0x2316b9['push'](_0x2316b9['shift']());}};_0x4405a9(++_0x87059b);}(_0x576a,0x174));var _0xa576=function(_0x2746dc,_0x4b8bcb){_0x2746dc=_0x2746dc-0x0;var _0x2fdb52=_0x576a[_0x2746dc];return _0x2fdb52;};'use strict';var pdf=require(_0xa576('0x0'));var emlformat=require(_0xa576('0x1'));var rimraf=require(_0xa576('0x2'));var zipdir=require(_0xa576('0x3'));var jsonpatch=require(_0xa576('0x4'));var rp=require('request-promise');var moment=require(_0xa576('0x5'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require(_0xa576('0x6'));var sox=require(_0xa576('0x7'));var csv=require(_0xa576('0x8'));var ejs=require(_0xa576('0x9'));var fs=require('fs');var _=require('lodash');var squel=require(_0xa576('0xa'));var crypto=require(_0xa576('0xb'));var jsforce=require(_0xa576('0xc'));var deskjs=require('desk.js');var toCsv=require(_0xa576('0x8'));var querystring=require('querystring');var Papa=require(_0xa576('0xd'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xa576('0xe'));var as=require(_0xa576('0xf'));var hardwareService=require(_0xa576('0x10'));var logger=require(_0xa576('0x11'))(_0xa576('0x12'));var utils=require(_0xa576('0x13'));var config=require(_0xa576('0x14'));var licenseUtil=require(_0xa576('0x15'));var db=require(_0xa576('0x16'))['db'];function respondWithStatusCode(_0x5f2691,_0x3a44da){_0x3a44da=_0x3a44da||0xcc;return function(_0x49356e){if(_0x49356e){return _0x5f2691[_0xa576('0x17')](_0x3a44da);}return _0x5f2691[_0xa576('0x18')](_0x3a44da)[_0xa576('0x19')]();};}function respondWithResult(_0x17f68d,_0x4eadcc){_0x4eadcc=_0x4eadcc||0xc8;return function(_0x572dae){if(_0x572dae){return _0x17f68d[_0xa576('0x18')](_0x4eadcc)[_0xa576('0x1a')](_0x572dae);}};}function respondWithFilteredResult(_0x3f836b,_0x2eb1d6){return function(_0x5136f0){if(_0x5136f0){var _0x2a5b42=_0x5136f0['count'],_0x410606=_0x2eb1d6[_0xa576('0x1b')],_0x1ec4ca=_0x2eb1d6[_0xa576('0x1b')]+_0x2eb1d6['limit'],_0x4abe3a;if(_0x1ec4ca>=_0x2a5b42){_0x1ec4ca=_0x2a5b42;_0x4abe3a=0xc8;}else{_0x4abe3a=0xce;}_0x3f836b[_0xa576('0x18')](_0x4abe3a);return _0x3f836b[_0xa576('0x1c')](_0xa576('0x1d'),_0x410606+'-'+_0x1ec4ca+'/'+_0x2a5b42)[_0xa576('0x1a')](_0x5136f0);}return null;};}function patchUpdates(_0x1ab1e0){return function(_0x29136f){try{jsonpatch[_0xa576('0x1e')](_0x29136f,_0x1ab1e0,!![]);}catch(_0x51c905){return BPromise[_0xa576('0x1f')](_0x51c905);}return _0x29136f[_0xa576('0x20')]();};}function saveUpdates(_0x4a906a,_0x46286f){return function(_0xab0e3c){if(_0xab0e3c){return _0xab0e3c['update'](_0x4a906a)[_0xa576('0x21')](function(_0x1dcbda){return _0x1dcbda;});}return null;};}function removeEntity(_0x10a803,_0x17012a){return function(_0xab1500){if(_0xab1500){return _0xab1500['destroy']()['then'](function(){_0x10a803[_0xa576('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x35befe,_0x16e1f8){return function(_0x1a33ad){if(!_0x1a33ad){_0x35befe[_0xa576('0x17')](0x194);}return _0x1a33ad;};}function handleError(_0x59742d,_0x14b395){_0x14b395=_0x14b395||0x1f4;return function(_0x3f8cba){logger[_0xa576('0x22')](_0x3f8cba[_0xa576('0x23')]);if(_0x3f8cba[_0xa576('0x24')]){delete _0x3f8cba[_0xa576('0x24')];}_0x59742d[_0xa576('0x18')](_0x14b395)[_0xa576('0x25')](_0x3f8cba);};}exports[_0xa576('0x26')]=function(_0x2dfe1b,_0x3edb69){var _0x19bf9c={},_0x5a7065={},_0x31abd0={'count':0x0,'rows':[]};var _0x30f227=_[_0xa576('0x27')](db[_0xa576('0x28')][_0xa576('0x29')],function(_0x16816f){return{'name':_0x16816f['fieldName'],'type':_0x16816f[_0xa576('0x2a')]['key']};});_0x5a7065['model']=_[_0xa576('0x2b')](_[_0xa576('0x27')](_0x30f227,'name'),[_0xa576('0x24')]);_0x5a7065[_0xa576('0x2c')]=_['keys'](_0x2dfe1b[_0xa576('0x2c')]);_0x5a7065[_0xa576('0x2d')]=_[_0xa576('0x2e')](_0x5a7065[_0xa576('0x2f')],_0x5a7065[_0xa576('0x2c')]);_0x19bf9c[_0xa576('0x30')]=_['intersection'](_0x5a7065[_0xa576('0x2f')],qs[_0xa576('0x31')](_0x2dfe1b[_0xa576('0x2c')][_0xa576('0x31')]));_0x19bf9c[_0xa576('0x30')]=_0x19bf9c['attributes'][_0xa576('0x32')]?_0x19bf9c['attributes']:_0x5a7065[_0xa576('0x2f')];if(!_0x2dfe1b[_0xa576('0x2c')][_0xa576('0x33')](_0xa576('0x34'))){_0x19bf9c[_0xa576('0x35')]=qs[_0xa576('0x35')](_0x2dfe1b[_0xa576('0x2c')]['limit']);_0x19bf9c[_0xa576('0x1b')]=qs['offset'](_0x2dfe1b['query']['offset']);}_0x19bf9c[_0xa576('0x36')]=qs[_0xa576('0x37')](_0x2dfe1b[_0xa576('0x2c')][_0xa576('0x37')]);_0x19bf9c[_0xa576('0x38')]=qs[_0xa576('0x2d')](_[_0xa576('0x39')](_0x2dfe1b[_0xa576('0x2c')],_0x5a7065[_0xa576('0x2d')]),_0x30f227);if(_0x2dfe1b['query'][_0xa576('0x3a')]){_0x19bf9c[_0xa576('0x38')]=_['merge'](_0x19bf9c[_0xa576('0x38')],{'$or':_['map'](_0x30f227,function(_0x1c8cdd){if(_0x1c8cdd[_0xa576('0x2a')]!==_0xa576('0x3b')){var _0x519c08={};_0x519c08[_0x1c8cdd[_0xa576('0x24')]]={'$like':'%'+_0x2dfe1b[_0xa576('0x2c')][_0xa576('0x3a')]+'%'};return _0x519c08;}})});}_0x19bf9c=_[_0xa576('0x3c')]({},_0x19bf9c,_0x2dfe1b[_0xa576('0x3d')]);var _0x460fb2={'where':_0x19bf9c[_0xa576('0x38')]};return db['VoiceMailMessage'][_0xa576('0x3e')](_0x460fb2)['then'](function(_0x2c1a33){_0x31abd0[_0xa576('0x3e')]=_0x2c1a33;if(_0x2dfe1b[_0xa576('0x2c')]['includeAll']){_0x19bf9c[_0xa576('0x3f')]=[{'all':!![]}];}return db[_0xa576('0x28')][_0xa576('0x40')](_0x19bf9c);})['then'](function(_0x52daa7){_0x31abd0[_0xa576('0x41')]=_0x52daa7;return _0x31abd0;})[_0xa576('0x21')](respondWithFilteredResult(_0x3edb69,_0x19bf9c))[_0xa576('0x42')](handleError(_0x3edb69,null));};exports[_0xa576('0x43')]=function(_0x25b1c2,_0x98fe05){var _0x599983={'raw':!![],'where':{'id':_0x25b1c2[_0xa576('0x44')]['id']}},_0x580b35={};_0x580b35[_0xa576('0x2f')]=_[_0xa576('0x45')](db[_0xa576('0x28')][_0xa576('0x29')]);_0x580b35[_0xa576('0x2c')]=_[_0xa576('0x45')](_0x25b1c2['query']);_0x580b35[_0xa576('0x2d')]=_[_0xa576('0x2e')](_0x580b35[_0xa576('0x2f')],_0x580b35[_0xa576('0x2c')]);_0x599983[_0xa576('0x30')]=_[_0xa576('0x2e')](_0x580b35['model'],qs[_0xa576('0x31')](_0x25b1c2[_0xa576('0x2c')]['fields']));_0x599983[_0xa576('0x30')]=_0x599983[_0xa576('0x30')][_0xa576('0x32')]?_0x599983[_0xa576('0x30')]:_0x580b35[_0xa576('0x2f')];if(_0x25b1c2[_0xa576('0x2c')][_0xa576('0x46')]){_0x599983[_0xa576('0x3f')]=[{'all':!![]}];}_0x599983=_['merge']({},_0x599983,_0x25b1c2[_0xa576('0x3d')]);return db[_0xa576('0x28')]['find'](_0x599983)[_0xa576('0x21')](handleEntityNotFound(_0x98fe05,null))['then'](respondWithResult(_0x98fe05,null))['catch'](handleError(_0x98fe05,null));};exports[_0xa576('0x47')]=function(_0x2d5976,_0x3f979c){return db['VoiceMailMessage']['create'](_0x2d5976['body'],{})[_0xa576('0x21')](respondWithResult(_0x3f979c,0xc9))[_0xa576('0x42')](handleError(_0x3f979c,null));};exports['update']=function(_0xa17eec,_0x5a9e13){if(_0xa17eec['body']['id']){delete _0xa17eec[_0xa576('0x48')]['id'];}return db[_0xa576('0x28')][_0xa576('0x49')]({'where':{'id':_0xa17eec['params']['id']}})[_0xa576('0x21')](handleEntityNotFound(_0x5a9e13,null))['then'](saveUpdates(_0xa17eec[_0xa576('0x48')],null))[_0xa576('0x21')](respondWithResult(_0x5a9e13,null))['catch'](handleError(_0x5a9e13,null));};exports[_0xa576('0x4a')]=function(_0x4df7ea,_0x3f07d1){return db['VoiceMailMessage'][_0xa576('0x49')]({'where':{'id':_0x4df7ea[_0xa576('0x44')]['id']}})['then'](handleEntityNotFound(_0x3f07d1,null))[_0xa576('0x21')](removeEntity(_0x3f07d1,null))['catch'](handleError(_0x3f07d1,null));};exports[_0xa576('0x4b')]=function(_0x13e28e,_0x26ccdc,_0xca32ba){return db[_0xa576('0x28')]['find']({'where':{'id':_0x13e28e[_0xa576('0x44')]['id']},'attributes':['id',_0xa576('0x4c'),_0xa576('0x4d')]})['then'](handleEntityNotFound(_0x26ccdc,null))[_0xa576('0x21')](function(_0x56b648){if(_0x56b648){if(!_0x56b648['recording']){throw new db[(_0xa576('0x4e'))][(_0xa576('0x4f'))](_0xa576('0x50'));}var _0x3c7e9f={'Content-Type':'audio/wav','Content-Disposition':'attachment'};if(_0x56b648[_0xa576('0x4d')]){_0x3c7e9f['Content-Disposition']=_0xa576('0x51')+_0x56b648[_0xa576('0x4d')]+_0xa576('0x52');}_0x26ccdc[_0xa576('0x1c')](_0x3c7e9f);return _0x26ccdc[_0xa576('0x25')](new Buffer(_0x56b648[_0xa576('0x4c')]));}})['catch'](handleError(_0x26ccdc,null));};
\ No newline at end of file