Built motion from commit d1eab355.|2.6.28
[motion2.git] / server / api / voiceMailMessage / voiceMailMessage.controller.js
index e84bd11..f62b982 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0b8a=['VoiceMailMessage\x20not\x20found','audio/wav','attachment','Content-Disposition','.wav\x22','html-pdf','rimraf','zip-dir','request-promise','bluebird','mustache','util','path','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','set','Content-Range','apply','reject','update','then','destroy','error','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','length','hasOwnProperty','nolimit','limit','order','where','pick','filter','merge','options','VoiceMailMessage','include','findAll','catch','show','params','fields','includeAll','create','body','find','download','recording','msg_id','ValidationError'];(function(_0x7f256f,_0x5c8890){var _0x68e369=function(_0x121285){while(--_0x121285){_0x7f256f['push'](_0x7f256f['shift']());}};_0x68e369(++_0x5c8890);}(_0x0b8a,0x19f));var _0xa0b8=function(_0x29dbd0,_0x328382){_0x29dbd0=_0x29dbd0-0x0;var _0x5337f8=_0x0b8a[_0x29dbd0];return _0x5337f8;};'use strict';var pdf=require(_0xa0b8('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xa0b8('0x1'));var zipdir=require(_0xa0b8('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xa0b8('0x3'));var moment=require('moment');var BPromise=require(_0xa0b8('0x4'));var Mustache=require(_0xa0b8('0x5'));var util=require(_0xa0b8('0x6'));var path=require(_0xa0b8('0x7'));var sox=require('sox');var csv=require(_0xa0b8('0x8'));var ejs=require(_0xa0b8('0x9'));var fs=require('fs');var _=require('lodash');var squel=require(_0xa0b8('0xa'));var crypto=require(_0xa0b8('0xb'));var jsforce=require(_0xa0b8('0xc'));var deskjs=require(_0xa0b8('0xd'));var toCsv=require('to-csv');var querystring=require(_0xa0b8('0xe'));var Papa=require(_0xa0b8('0xf'));var Redis=require(_0xa0b8('0x10'));var authService=require(_0xa0b8('0x11'));var qs=require(_0xa0b8('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xa0b8('0x13'))('api');var utils=require(_0xa0b8('0x14'));var config=require(_0xa0b8('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0xa0b8('0x16'))['db'];function respondWithStatusCode(_0x14a4fa,_0x34b5ef){_0x34b5ef=_0x34b5ef||0xcc;return function(_0x584643){if(_0x584643){return _0x14a4fa[_0xa0b8('0x17')](_0x34b5ef);}return _0x14a4fa[_0xa0b8('0x18')](_0x34b5ef)[_0xa0b8('0x19')]();};}function respondWithResult(_0x196253,_0x22fc51){_0x22fc51=_0x22fc51||0xc8;return function(_0x2d1f10){if(_0x2d1f10){return _0x196253[_0xa0b8('0x18')](_0x22fc51)[_0xa0b8('0x1a')](_0x2d1f10);}};}function respondWithFilteredResult(_0x20a949,_0x41e44d){return function(_0x456562){if(_0x456562){var _0x5ac250=_0x456562[_0xa0b8('0x1b')],_0x1125ae=_0x41e44d['offset'],_0x33eace=_0x41e44d[_0xa0b8('0x1c')]+_0x41e44d['limit'],_0x44b24a;if(_0x33eace>=_0x5ac250){_0x33eace=_0x5ac250;_0x44b24a=0xc8;}else{_0x44b24a=0xce;}_0x20a949[_0xa0b8('0x18')](_0x44b24a);return _0x20a949[_0xa0b8('0x1d')](_0xa0b8('0x1e'),_0x1125ae+'-'+_0x33eace+'/'+_0x5ac250)[_0xa0b8('0x1a')](_0x456562);}return null;};}function patchUpdates(_0x1288c7){return function(_0x7958b3){try{jsonpatch[_0xa0b8('0x1f')](_0x7958b3,_0x1288c7,!![]);}catch(_0x2122c7){return BPromise[_0xa0b8('0x20')](_0x2122c7);}return _0x7958b3['save']();};}function saveUpdates(_0x490eef,_0x231bd9){return function(_0x557514){if(_0x557514){return _0x557514[_0xa0b8('0x21')](_0x490eef)[_0xa0b8('0x22')](function(_0x4405f6){return _0x4405f6;});}return null;};}function removeEntity(_0x3151d4,_0x3fb8b1){return function(_0x34eebe){if(_0x34eebe){return _0x34eebe[_0xa0b8('0x23')]()[_0xa0b8('0x22')](function(){_0x3151d4['status'](0xcc)[_0xa0b8('0x19')]();});}};}function handleEntityNotFound(_0x4d91a,_0x16b826){return function(_0xe27660){if(!_0xe27660){_0x4d91a['sendStatus'](0x194);}return _0xe27660;};}function handleError(_0x46e1d7,_0x52776d){_0x52776d=_0x52776d||0x1f4;return function(_0x3fc5c9){logger[_0xa0b8('0x24')](_0x3fc5c9[_0xa0b8('0x25')]);if(_0x3fc5c9[_0xa0b8('0x26')]){delete _0x3fc5c9['name'];}_0x46e1d7['status'](_0x52776d)[_0xa0b8('0x27')](_0x3fc5c9);};}exports[_0xa0b8('0x28')]=function(_0x5998f8,_0x5f56b8){var _0x306b9d={},_0x128f28={},_0x30db55={'count':0x0,'rows':[]};var _0x2d5a85=_[_0xa0b8('0x29')](db['VoiceMailMessage'][_0xa0b8('0x2a')],function(_0x4400c1){return{'name':_0x4400c1[_0xa0b8('0x2b')],'type':_0x4400c1[_0xa0b8('0x2c')][_0xa0b8('0x2d')]};});_0x128f28[_0xa0b8('0x2e')]=_['differenceBy'](_[_0xa0b8('0x29')](_0x2d5a85,_0xa0b8('0x26')),[_0xa0b8('0x26')]);_0x128f28[_0xa0b8('0x2f')]=_[_0xa0b8('0x30')](_0x5998f8['query']);_0x128f28[_0xa0b8('0x31')]=_[_0xa0b8('0x32')](_0x128f28['model'],_0x128f28[_0xa0b8('0x2f')]);_0x306b9d[_0xa0b8('0x33')]=_['intersection'](_0x128f28[_0xa0b8('0x2e')],qs['fields'](_0x5998f8['query']['fields']));_0x306b9d[_0xa0b8('0x33')]=_0x306b9d[_0xa0b8('0x33')][_0xa0b8('0x34')]?_0x306b9d[_0xa0b8('0x33')]:_0x128f28['model'];if(!_0x5998f8[_0xa0b8('0x2f')][_0xa0b8('0x35')](_0xa0b8('0x36'))){_0x306b9d[_0xa0b8('0x37')]=qs[_0xa0b8('0x37')](_0x5998f8[_0xa0b8('0x2f')][_0xa0b8('0x37')]);_0x306b9d[_0xa0b8('0x1c')]=qs['offset'](_0x5998f8[_0xa0b8('0x2f')][_0xa0b8('0x1c')]);}_0x306b9d[_0xa0b8('0x38')]=qs['sort'](_0x5998f8[_0xa0b8('0x2f')]['sort']);_0x306b9d[_0xa0b8('0x39')]=qs['filters'](_[_0xa0b8('0x3a')](_0x5998f8['query'],_0x128f28[_0xa0b8('0x31')]),_0x2d5a85);if(_0x5998f8[_0xa0b8('0x2f')][_0xa0b8('0x3b')]){_0x306b9d[_0xa0b8('0x39')]=_[_0xa0b8('0x3c')](_0x306b9d['where'],{'$or':_[_0xa0b8('0x29')](_0x2d5a85,function(_0x9a831a){if(_0x9a831a[_0xa0b8('0x2c')]!=='VIRTUAL'){var _0x23fd7={};_0x23fd7[_0x9a831a[_0xa0b8('0x26')]]={'$like':'%'+_0x5998f8[_0xa0b8('0x2f')][_0xa0b8('0x3b')]+'%'};return _0x23fd7;}})});}_0x306b9d=_[_0xa0b8('0x3c')]({},_0x306b9d,_0x5998f8[_0xa0b8('0x3d')]);var _0x176428={'where':_0x306b9d['where']};return db[_0xa0b8('0x3e')][_0xa0b8('0x1b')](_0x176428)[_0xa0b8('0x22')](function(_0x10554d){_0x30db55[_0xa0b8('0x1b')]=_0x10554d;if(_0x5998f8[_0xa0b8('0x2f')]['includeAll']){_0x306b9d[_0xa0b8('0x3f')]=[{'all':!![]}];}return db[_0xa0b8('0x3e')][_0xa0b8('0x40')](_0x306b9d);})[_0xa0b8('0x22')](function(_0x4fdd5d){_0x30db55['rows']=_0x4fdd5d;return _0x30db55;})['then'](respondWithFilteredResult(_0x5f56b8,_0x306b9d))[_0xa0b8('0x41')](handleError(_0x5f56b8,null));};exports[_0xa0b8('0x42')]=function(_0x4a45eb,_0x3924f6){var _0xbeb097={'raw':!![],'where':{'id':_0x4a45eb[_0xa0b8('0x43')]['id']}},_0x4eb3c1={};_0x4eb3c1[_0xa0b8('0x2e')]=_[_0xa0b8('0x30')](db[_0xa0b8('0x3e')]['rawAttributes']);_0x4eb3c1[_0xa0b8('0x2f')]=_[_0xa0b8('0x30')](_0x4a45eb['query']);_0x4eb3c1[_0xa0b8('0x31')]=_[_0xa0b8('0x32')](_0x4eb3c1[_0xa0b8('0x2e')],_0x4eb3c1['query']);_0xbeb097[_0xa0b8('0x33')]=_[_0xa0b8('0x32')](_0x4eb3c1[_0xa0b8('0x2e')],qs[_0xa0b8('0x44')](_0x4a45eb[_0xa0b8('0x2f')]['fields']));_0xbeb097[_0xa0b8('0x33')]=_0xbeb097[_0xa0b8('0x33')][_0xa0b8('0x34')]?_0xbeb097[_0xa0b8('0x33')]:_0x4eb3c1[_0xa0b8('0x2e')];if(_0x4a45eb[_0xa0b8('0x2f')][_0xa0b8('0x45')]){_0xbeb097['include']=[{'all':!![]}];}_0xbeb097=_[_0xa0b8('0x3c')]({},_0xbeb097,_0x4a45eb[_0xa0b8('0x3d')]);return db[_0xa0b8('0x3e')]['find'](_0xbeb097)['then'](handleEntityNotFound(_0x3924f6,null))[_0xa0b8('0x22')](respondWithResult(_0x3924f6,null))['catch'](handleError(_0x3924f6,null));};exports[_0xa0b8('0x46')]=function(_0x18064e,_0x443e82){return db[_0xa0b8('0x3e')][_0xa0b8('0x46')](_0x18064e['body'],{})[_0xa0b8('0x22')](respondWithResult(_0x443e82,0xc9))['catch'](handleError(_0x443e82,null));};exports[_0xa0b8('0x21')]=function(_0x1fcecc,_0x1dbf31){if(_0x1fcecc[_0xa0b8('0x47')]['id']){delete _0x1fcecc['body']['id'];}return db['VoiceMailMessage'][_0xa0b8('0x48')]({'where':{'id':_0x1fcecc[_0xa0b8('0x43')]['id']}})['then'](handleEntityNotFound(_0x1dbf31,null))[_0xa0b8('0x22')](saveUpdates(_0x1fcecc[_0xa0b8('0x47')],null))[_0xa0b8('0x22')](respondWithResult(_0x1dbf31,null))[_0xa0b8('0x41')](handleError(_0x1dbf31,null));};exports[_0xa0b8('0x23')]=function(_0x410c0a,_0x409249){return db[_0xa0b8('0x3e')]['find']({'where':{'id':_0x410c0a[_0xa0b8('0x43')]['id']}})['then'](handleEntityNotFound(_0x409249,null))[_0xa0b8('0x22')](removeEntity(_0x409249,null))[_0xa0b8('0x41')](handleError(_0x409249,null));};exports[_0xa0b8('0x49')]=function(_0x58b518,_0x57ef5b,_0x15315c){return db[_0xa0b8('0x3e')][_0xa0b8('0x48')]({'where':{'id':_0x58b518[_0xa0b8('0x43')]['id']},'attributes':['id',_0xa0b8('0x4a'),_0xa0b8('0x4b')]})[_0xa0b8('0x22')](handleEntityNotFound(_0x57ef5b,null))['then'](function(_0x1b7cc2){if(_0x1b7cc2){if(!_0x1b7cc2[_0xa0b8('0x4a')]){throw new db['Sequelize'][(_0xa0b8('0x4c'))](_0xa0b8('0x4d'));}var _0x16335c={'Content-Type':_0xa0b8('0x4e'),'Content-Disposition':_0xa0b8('0x4f')};if(_0x1b7cc2[_0xa0b8('0x4b')]){_0x16335c[_0xa0b8('0x50')]='attachment;\x20filename=\x22'+_0x1b7cc2[_0xa0b8('0x4b')]+_0xa0b8('0x51');}_0x57ef5b[_0xa0b8('0x1d')](_0x16335c);return _0x57ef5b[_0xa0b8('0x27')](new Buffer(_0x1b7cc2[_0xa0b8('0x4a')]));}})[_0xa0b8('0x41')](handleError(_0x57ef5b,null));};
\ No newline at end of file
+var _0x034a=['type','model','keys','query','intersection','attributes','fields','length','hasOwnProperty','order','sort','filters','filter','where','merge','VIRTUAL','options','VoiceMailMessage','includeAll','findAll','rows','catch','params','include','find','create','update','body','download','recording','msg_id','Sequelize','ValidationError','audio/wav','attachment;\x20filename=\x22','.wav\x22','set','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','offset','undefined','limit','count','json','apply','reject','save','then','sendStatus','error','stack','name','send','index','map','rawAttributes','fieldName'];(function(_0xf950f,_0x6f0533){var _0x36947d=function(_0xce5f65){while(--_0xce5f65){_0xf950f['push'](_0xf950f['shift']());}};_0x36947d(++_0x6f0533);}(_0x034a,0x1c4));var _0xa034=function(_0x4d6954,_0x347932){_0x4d6954=_0x4d6954-0x0;var _0x34d870=_0x034a[_0x4d6954];return _0x34d870;};'use strict';var emlformat=require(_0xa034('0x0'));var rimraf=require(_0xa034('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xa034('0x2'));var rp=require(_0xa034('0x3'));var moment=require(_0xa034('0x4'));var BPromise=require(_0xa034('0x5'));var Mustache=require(_0xa034('0x6'));var util=require(_0xa034('0x7'));var path=require(_0xa034('0x8'));var sox=require(_0xa034('0x9'));var csv=require('to-csv');var ejs=require(_0xa034('0xa'));var fs=require('fs');var fs_extra=require(_0xa034('0xb'));var _=require(_0xa034('0xc'));var squel=require(_0xa034('0xd'));var crypto=require('crypto');var jsforce=require(_0xa034('0xe'));var deskjs=require(_0xa034('0xf'));var toCsv=require('to-csv');var querystring=require(_0xa034('0x10'));var Papa=require(_0xa034('0x11'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xa034('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xa034('0x13'));var logger=require(_0xa034('0x14'))(_0xa034('0x15'));var utils=require(_0xa034('0x16'));var config=require(_0xa034('0x17'));var licenseUtil=require(_0xa034('0x18'));var db=require(_0xa034('0x19'))['db'];function respondWithStatusCode(_0x4ba094,_0x4fc715){_0x4fc715=_0x4fc715||0xcc;return function(_0x219c7f){if(_0x219c7f){return _0x4ba094['sendStatus'](_0x4fc715);}return _0x4ba094[_0xa034('0x1a')](_0x4fc715)[_0xa034('0x1b')]();};}function respondWithResult(_0x5a7df4,_0x9e10ac){_0x9e10ac=_0x9e10ac||0xc8;return function(_0x224b1b){if(_0x224b1b){return _0x5a7df4[_0xa034('0x1a')](_0x9e10ac)['json'](_0x224b1b);}};}function respondWithFilteredResult(_0x12e8b8,_0x379fa8){return function(_0x1277df){if(_0x1277df){var _0x3dc87e=typeof _0x379fa8[_0xa034('0x1c')]===_0xa034('0x1d')&&typeof _0x379fa8[_0xa034('0x1e')]===_0xa034('0x1d');var _0x329da8=_0x1277df[_0xa034('0x1f')];var _0x341652=_0x3dc87e?0x0:_0x379fa8[_0xa034('0x1c')];var _0x36c037=_0x3dc87e?_0x1277df[_0xa034('0x1f')]:_0x379fa8['offset']+_0x379fa8[_0xa034('0x1e')];var _0x22e37c;if(_0x36c037>=_0x329da8){_0x36c037=_0x329da8;_0x22e37c=0xc8;}else{_0x22e37c=0xce;}_0x12e8b8[_0xa034('0x1a')](_0x22e37c);return _0x12e8b8['set']('Content-Range',_0x341652+'-'+_0x36c037+'/'+_0x329da8)[_0xa034('0x20')](_0x1277df);}return null;};}function patchUpdates(_0x58fd28){return function(_0x3b56a6){try{jsonpatch[_0xa034('0x21')](_0x3b56a6,_0x58fd28,!![]);}catch(_0x410671){return BPromise[_0xa034('0x22')](_0x410671);}return _0x3b56a6[_0xa034('0x23')]();};}function saveUpdates(_0x11885f,_0x21c716){return function(_0xf2c03){if(_0xf2c03){return _0xf2c03['update'](_0x11885f)[_0xa034('0x24')](function(_0x241f62){return _0x241f62;});}return null;};}function removeEntity(_0x37a3d8,_0x37e4c6){return function(_0x49ae75){if(_0x49ae75){return _0x49ae75['destroy']()[_0xa034('0x24')](function(){_0x37a3d8[_0xa034('0x1a')](0xcc)[_0xa034('0x1b')]();});}};}function handleEntityNotFound(_0x5dfb99,_0xf5cb1d){return function(_0x211608){if(!_0x211608){_0x5dfb99[_0xa034('0x25')](0x194);}return _0x211608;};}function handleError(_0x7efdef,_0x1433bf){_0x1433bf=_0x1433bf||0x1f4;return function(_0x2d38fd){logger[_0xa034('0x26')](_0x2d38fd[_0xa034('0x27')]);if(_0x2d38fd[_0xa034('0x28')]){delete _0x2d38fd[_0xa034('0x28')];}_0x7efdef['status'](_0x1433bf)[_0xa034('0x29')](_0x2d38fd);};}exports[_0xa034('0x2a')]=function(_0xbdaa67,_0x370a4b){var _0xf3c3ee={},_0x3ccdec={},_0x44588e={'count':0x0,'rows':[]};var _0x2a3767=_[_0xa034('0x2b')](db['VoiceMailMessage'][_0xa034('0x2c')],function(_0x244b5e){return{'name':_0x244b5e[_0xa034('0x2d')],'type':_0x244b5e[_0xa034('0x2e')]['key']};});_0x3ccdec[_0xa034('0x2f')]=_['differenceBy'](_[_0xa034('0x2b')](_0x2a3767,_0xa034('0x28')),['name']);_0x3ccdec['query']=_[_0xa034('0x30')](_0xbdaa67[_0xa034('0x31')]);_0x3ccdec['filters']=_[_0xa034('0x32')](_0x3ccdec['model'],_0x3ccdec[_0xa034('0x31')]);_0xf3c3ee[_0xa034('0x33')]=_[_0xa034('0x32')](_0x3ccdec[_0xa034('0x2f')],qs[_0xa034('0x34')](_0xbdaa67['query']['fields']));_0xf3c3ee[_0xa034('0x33')]=_0xf3c3ee[_0xa034('0x33')][_0xa034('0x35')]?_0xf3c3ee[_0xa034('0x33')]:_0x3ccdec[_0xa034('0x2f')];if(!_0xbdaa67[_0xa034('0x31')][_0xa034('0x36')]('nolimit')){_0xf3c3ee[_0xa034('0x1e')]=qs['limit'](_0xbdaa67[_0xa034('0x31')][_0xa034('0x1e')]);_0xf3c3ee['offset']=qs[_0xa034('0x1c')](_0xbdaa67[_0xa034('0x31')]['offset']);}_0xf3c3ee[_0xa034('0x37')]=qs[_0xa034('0x38')](_0xbdaa67[_0xa034('0x31')][_0xa034('0x38')]);_0xf3c3ee['where']=qs[_0xa034('0x39')](_['pick'](_0xbdaa67['query'],_0x3ccdec[_0xa034('0x39')]),_0x2a3767);if(_0xbdaa67[_0xa034('0x31')][_0xa034('0x3a')]){_0xf3c3ee[_0xa034('0x3b')]=_[_0xa034('0x3c')](_0xf3c3ee['where'],{'$or':_[_0xa034('0x2b')](_0x2a3767,function(_0x4fa7d3){if(_0x4fa7d3[_0xa034('0x2e')]!==_0xa034('0x3d')){var _0x34e561={};_0x34e561[_0x4fa7d3['name']]={'$like':'%'+_0xbdaa67[_0xa034('0x31')][_0xa034('0x3a')]+'%'};return _0x34e561;}})});}_0xf3c3ee=_[_0xa034('0x3c')]({},_0xf3c3ee,_0xbdaa67[_0xa034('0x3e')]);var _0x1f10b1={'where':_0xf3c3ee[_0xa034('0x3b')]};return db[_0xa034('0x3f')][_0xa034('0x1f')](_0x1f10b1)[_0xa034('0x24')](function(_0x52c951){_0x44588e['count']=_0x52c951;if(_0xbdaa67['query'][_0xa034('0x40')]){_0xf3c3ee['include']=[{'all':!![]}];}return db[_0xa034('0x3f')][_0xa034('0x41')](_0xf3c3ee);})[_0xa034('0x24')](function(_0x3ba4f2){_0x44588e[_0xa034('0x42')]=_0x3ba4f2;return _0x44588e;})['then'](respondWithFilteredResult(_0x370a4b,_0xf3c3ee))[_0xa034('0x43')](handleError(_0x370a4b,null));};exports['show']=function(_0x456ad5,_0x5b6daf){var _0x5f02b1={'raw':!![],'where':{'id':_0x456ad5[_0xa034('0x44')]['id']}},_0x22a7d9={};_0x22a7d9[_0xa034('0x2f')]=_['keys'](db[_0xa034('0x3f')][_0xa034('0x2c')]);_0x22a7d9[_0xa034('0x31')]=_['keys'](_0x456ad5[_0xa034('0x31')]);_0x22a7d9['filters']=_[_0xa034('0x32')](_0x22a7d9[_0xa034('0x2f')],_0x22a7d9['query']);_0x5f02b1[_0xa034('0x33')]=_[_0xa034('0x32')](_0x22a7d9[_0xa034('0x2f')],qs['fields'](_0x456ad5[_0xa034('0x31')][_0xa034('0x34')]));_0x5f02b1[_0xa034('0x33')]=_0x5f02b1[_0xa034('0x33')][_0xa034('0x35')]?_0x5f02b1['attributes']:_0x22a7d9['model'];if(_0x456ad5['query'][_0xa034('0x40')]){_0x5f02b1[_0xa034('0x45')]=[{'all':!![]}];}_0x5f02b1=_[_0xa034('0x3c')]({},_0x5f02b1,_0x456ad5[_0xa034('0x3e')]);return db[_0xa034('0x3f')][_0xa034('0x46')](_0x5f02b1)[_0xa034('0x24')](handleEntityNotFound(_0x5b6daf,null))[_0xa034('0x24')](respondWithResult(_0x5b6daf,null))['catch'](handleError(_0x5b6daf,null));};exports[_0xa034('0x47')]=function(_0x14e95b,_0x56d195){return db['VoiceMailMessage'][_0xa034('0x47')](_0x14e95b['body'],{})['then'](respondWithResult(_0x56d195,0xc9))[_0xa034('0x43')](handleError(_0x56d195,null));};exports[_0xa034('0x48')]=function(_0x578d23,_0x2f56ba){if(_0x578d23[_0xa034('0x49')]['id']){delete _0x578d23['body']['id'];}return db[_0xa034('0x3f')]['find']({'where':{'id':_0x578d23[_0xa034('0x44')]['id']}})[_0xa034('0x24')](handleEntityNotFound(_0x2f56ba,null))[_0xa034('0x24')](saveUpdates(_0x578d23[_0xa034('0x49')],null))[_0xa034('0x24')](respondWithResult(_0x2f56ba,null))['catch'](handleError(_0x2f56ba,null));};exports['destroy']=function(_0x52a07b,_0xc7cce0){return db[_0xa034('0x3f')][_0xa034('0x46')]({'where':{'id':_0x52a07b[_0xa034('0x44')]['id']}})['then'](handleEntityNotFound(_0xc7cce0,null))['then'](removeEntity(_0xc7cce0,null))[_0xa034('0x43')](handleError(_0xc7cce0,null));};exports[_0xa034('0x4a')]=function(_0x4fe2c0,_0x216f35,_0x3deadf){return db[_0xa034('0x3f')]['find']({'where':{'id':_0x4fe2c0['params']['id']},'attributes':['id',_0xa034('0x4b'),_0xa034('0x4c')]})['then'](handleEntityNotFound(_0x216f35,null))[_0xa034('0x24')](function(_0x4faf9d){if(_0x4faf9d){if(!_0x4faf9d[_0xa034('0x4b')]){throw new db[(_0xa034('0x4d'))][(_0xa034('0x4e'))]('VoiceMailMessage\x20not\x20found');}var _0x1ea522={'Content-Type':_0xa034('0x4f'),'Content-Disposition':'attachment'};if(_0x4faf9d[_0xa034('0x4c')]){_0x1ea522['Content-Disposition']=_0xa034('0x50')+_0x4faf9d[_0xa034('0x4c')]+_0xa034('0x51');}_0x216f35[_0xa034('0x52')](_0x1ea522);return _0x216f35['send'](new Buffer(_0x4faf9d[_0xa034('0x4b')]));}})[_0xa034('0x43')](handleError(_0x216f35,null));};
\ No newline at end of file