Built motion from commit 3c2ce842.|2.6.31
[motion2.git] / server / api / voiceMailMessage / voiceMailMessage.controller.js
index a602c17..0aa351c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x49d2=['keys','filters','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','includeAll','findAll','catch','show','intersection','find','create','body','update','params','destroy','download','recording','msg_id','Sequelize','ValidationError','audio/wav','attachment','attachment;\x20filename=\x22','.wav\x22','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','limit','undefined','count','set','apply','save','then','name','send','index','map','VoiceMailMessage','rawAttributes','fieldName','type','key','model','differenceBy','query'];(function(_0xc34cd4,_0x463064){var _0x128eaa=function(_0x221318){while(--_0x221318){_0xc34cd4['push'](_0xc34cd4['shift']());}};_0x128eaa(++_0x463064);}(_0x49d2,0x1c6));var _0x249d=function(_0x3fb030,_0x12aebe){_0x3fb030=_0x3fb030-0x0;var _0xd6899b=_0x49d2[_0x3fb030];return _0xd6899b;};'use strict';var emlformat=require(_0x249d('0x0'));var rimraf=require(_0x249d('0x1'));var zipdir=require(_0x249d('0x2'));var jsonpatch=require(_0x249d('0x3'));var rp=require(_0x249d('0x4'));var moment=require('moment');var BPromise=require(_0x249d('0x5'));var Mustache=require(_0x249d('0x6'));var util=require(_0x249d('0x7'));var path=require(_0x249d('0x8'));var sox=require('sox');var csv=require(_0x249d('0x9'));var ejs=require(_0x249d('0xa'));var fs=require('fs');var fs_extra=require(_0x249d('0xb'));var _=require('lodash');var squel=require(_0x249d('0xc'));var crypto=require(_0x249d('0xd'));var jsforce=require(_0x249d('0xe'));var deskjs=require(_0x249d('0xf'));var toCsv=require('to-csv');var querystring=require(_0x249d('0x10'));var Papa=require('papaparse');var Redis=require(_0x249d('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x249d('0x12'));var as=require(_0x249d('0x13'));var hardwareService=require(_0x249d('0x14'));var logger=require(_0x249d('0x15'))('api');var utils=require(_0x249d('0x16'));var config=require(_0x249d('0x17'));var licenseUtil=require(_0x249d('0x18'));var db=require(_0x249d('0x19'))['db'];function respondWithStatusCode(_0x4a4745,_0x3163b2){_0x3163b2=_0x3163b2||0xcc;return function(_0x3d31bb){if(_0x3d31bb){return _0x4a4745[_0x249d('0x1a')](_0x3163b2);}return _0x4a4745[_0x249d('0x1b')](_0x3163b2)[_0x249d('0x1c')]();};}function respondWithResult(_0x46da8d,_0x575ce1){_0x575ce1=_0x575ce1||0xc8;return function(_0x1d506e){if(_0x1d506e){return _0x46da8d[_0x249d('0x1b')](_0x575ce1)[_0x249d('0x1d')](_0x1d506e);}};}function respondWithFilteredResult(_0x464a81,_0x3cf22b){return function(_0x3309b2){if(_0x3309b2){var _0x4356f8=typeof _0x3cf22b[_0x249d('0x1e')]==='undefined'&&typeof _0x3cf22b[_0x249d('0x1f')]===_0x249d('0x20');var _0x142c16=_0x3309b2[_0x249d('0x21')];var _0x355131=_0x4356f8?0x0:_0x3cf22b[_0x249d('0x1e')];var _0x118633=_0x4356f8?_0x3309b2[_0x249d('0x21')]:_0x3cf22b[_0x249d('0x1e')]+_0x3cf22b[_0x249d('0x1f')];var _0xfcf52f;if(_0x118633>=_0x142c16){_0x118633=_0x142c16;_0xfcf52f=0xc8;}else{_0xfcf52f=0xce;}_0x464a81[_0x249d('0x1b')](_0xfcf52f);return _0x464a81[_0x249d('0x22')]('Content-Range',_0x355131+'-'+_0x118633+'/'+_0x142c16)['json'](_0x3309b2);}return null;};}function patchUpdates(_0x560016){return function(_0x471a4f){try{jsonpatch[_0x249d('0x23')](_0x471a4f,_0x560016,!![]);}catch(_0x1d3f83){return BPromise['reject'](_0x1d3f83);}return _0x471a4f[_0x249d('0x24')]();};}function saveUpdates(_0xd65670,_0x2ab6d6){return function(_0x291efc){if(_0x291efc){return _0x291efc['update'](_0xd65670)['then'](function(_0x3cfa44){return _0x3cfa44;});}return null;};}function removeEntity(_0x3a440d,_0x525289){return function(_0xa132f4){if(_0xa132f4){return _0xa132f4['destroy']()[_0x249d('0x25')](function(){_0x3a440d['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x366730,_0x5876a7){return function(_0x318529){if(!_0x318529){_0x366730[_0x249d('0x1a')](0x194);}return _0x318529;};}function handleError(_0x40a3b6,_0x593223){_0x593223=_0x593223||0x1f4;return function(_0x2bfb14){logger['error'](_0x2bfb14['stack']);if(_0x2bfb14['name']){delete _0x2bfb14[_0x249d('0x26')];}_0x40a3b6['status'](_0x593223)[_0x249d('0x27')](_0x2bfb14);};}exports[_0x249d('0x28')]=function(_0x113823,_0xcd278b){var _0x5a0278={},_0xa08a3c={},_0x55abdb={'count':0x0,'rows':[]};var _0x5fe280=_[_0x249d('0x29')](db[_0x249d('0x2a')][_0x249d('0x2b')],function(_0x222ba8){return{'name':_0x222ba8[_0x249d('0x2c')],'type':_0x222ba8[_0x249d('0x2d')][_0x249d('0x2e')]};});_0xa08a3c[_0x249d('0x2f')]=_[_0x249d('0x30')](_[_0x249d('0x29')](_0x5fe280,_0x249d('0x26')),[_0x249d('0x26')]);_0xa08a3c[_0x249d('0x31')]=_[_0x249d('0x32')](_0x113823['query']);_0xa08a3c[_0x249d('0x33')]=_['intersection'](_0xa08a3c['model'],_0xa08a3c[_0x249d('0x31')]);_0x5a0278['attributes']=_['intersection'](_0xa08a3c['model'],qs['fields'](_0x113823['query'][_0x249d('0x34')]));_0x5a0278[_0x249d('0x35')]=_0x5a0278[_0x249d('0x35')][_0x249d('0x36')]?_0x5a0278[_0x249d('0x35')]:_0xa08a3c[_0x249d('0x2f')];if(!_0x113823[_0x249d('0x31')][_0x249d('0x37')](_0x249d('0x38'))){_0x5a0278['limit']=qs[_0x249d('0x1f')](_0x113823[_0x249d('0x31')][_0x249d('0x1f')]);_0x5a0278['offset']=qs['offset'](_0x113823[_0x249d('0x31')][_0x249d('0x1e')]);}_0x5a0278[_0x249d('0x39')]=qs[_0x249d('0x3a')](_0x113823[_0x249d('0x31')][_0x249d('0x3a')]);_0x5a0278[_0x249d('0x3b')]=qs['filters'](_[_0x249d('0x3c')](_0x113823['query'],_0xa08a3c[_0x249d('0x33')]),_0x5fe280);if(_0x113823['query'][_0x249d('0x3d')]){_0x5a0278[_0x249d('0x3b')]=_[_0x249d('0x3e')](_0x5a0278[_0x249d('0x3b')],{'$or':_['map'](_0x5fe280,function(_0x59a9d6){if(_0x59a9d6[_0x249d('0x2d')]!==_0x249d('0x3f')){var _0x5899d4={};_0x5899d4[_0x59a9d6[_0x249d('0x26')]]={'$like':'%'+_0x113823[_0x249d('0x31')][_0x249d('0x3d')]+'%'};return _0x5899d4;}})});}_0x5a0278=_['merge']({},_0x5a0278,_0x113823['options']);var _0x11fe27={'where':_0x5a0278[_0x249d('0x3b')]};return db[_0x249d('0x2a')][_0x249d('0x21')](_0x11fe27)[_0x249d('0x25')](function(_0x570080){_0x55abdb[_0x249d('0x21')]=_0x570080;if(_0x113823[_0x249d('0x31')][_0x249d('0x40')]){_0x5a0278['include']=[{'all':!![]}];}return db[_0x249d('0x2a')][_0x249d('0x41')](_0x5a0278);})[_0x249d('0x25')](function(_0x3f29b1){_0x55abdb['rows']=_0x3f29b1;return _0x55abdb;})[_0x249d('0x25')](respondWithFilteredResult(_0xcd278b,_0x5a0278))[_0x249d('0x42')](handleError(_0xcd278b,null));};exports[_0x249d('0x43')]=function(_0x3f4f70,_0x122bd4){var _0x5a9486={'raw':!![],'where':{'id':_0x3f4f70['params']['id']}},_0x46f2d6={};_0x46f2d6[_0x249d('0x2f')]=_[_0x249d('0x32')](db[_0x249d('0x2a')][_0x249d('0x2b')]);_0x46f2d6[_0x249d('0x31')]=_[_0x249d('0x32')](_0x3f4f70[_0x249d('0x31')]);_0x46f2d6['filters']=_['intersection'](_0x46f2d6[_0x249d('0x2f')],_0x46f2d6['query']);_0x5a9486['attributes']=_[_0x249d('0x44')](_0x46f2d6[_0x249d('0x2f')],qs['fields'](_0x3f4f70['query'][_0x249d('0x34')]));_0x5a9486['attributes']=_0x5a9486[_0x249d('0x35')][_0x249d('0x36')]?_0x5a9486[_0x249d('0x35')]:_0x46f2d6[_0x249d('0x2f')];if(_0x3f4f70[_0x249d('0x31')][_0x249d('0x40')]){_0x5a9486['include']=[{'all':!![]}];}_0x5a9486=_['merge']({},_0x5a9486,_0x3f4f70['options']);return db[_0x249d('0x2a')][_0x249d('0x45')](_0x5a9486)['then'](handleEntityNotFound(_0x122bd4,null))[_0x249d('0x25')](respondWithResult(_0x122bd4,null))[_0x249d('0x42')](handleError(_0x122bd4,null));};exports[_0x249d('0x46')]=function(_0x3bf8e8,_0x1decee){return db['VoiceMailMessage'][_0x249d('0x46')](_0x3bf8e8[_0x249d('0x47')],{})[_0x249d('0x25')](respondWithResult(_0x1decee,0xc9))[_0x249d('0x42')](handleError(_0x1decee,null));};exports[_0x249d('0x48')]=function(_0x17a16c,_0x259dc9){if(_0x17a16c[_0x249d('0x47')]['id']){delete _0x17a16c[_0x249d('0x47')]['id'];}return db[_0x249d('0x2a')][_0x249d('0x45')]({'where':{'id':_0x17a16c[_0x249d('0x49')]['id']}})[_0x249d('0x25')](handleEntityNotFound(_0x259dc9,null))[_0x249d('0x25')](saveUpdates(_0x17a16c[_0x249d('0x47')],null))[_0x249d('0x25')](respondWithResult(_0x259dc9,null))[_0x249d('0x42')](handleError(_0x259dc9,null));};exports[_0x249d('0x4a')]=function(_0x3eb527,_0x3a93ad){return db[_0x249d('0x2a')][_0x249d('0x45')]({'where':{'id':_0x3eb527[_0x249d('0x49')]['id']}})['then'](handleEntityNotFound(_0x3a93ad,null))[_0x249d('0x25')](removeEntity(_0x3a93ad,null))[_0x249d('0x42')](handleError(_0x3a93ad,null));};exports[_0x249d('0x4b')]=function(_0x40adaa,_0x41a0f1,_0x478a20){return db['VoiceMailMessage'][_0x249d('0x45')]({'where':{'id':_0x40adaa[_0x249d('0x49')]['id']},'attributes':['id',_0x249d('0x4c'),_0x249d('0x4d')]})[_0x249d('0x25')](handleEntityNotFound(_0x41a0f1,null))[_0x249d('0x25')](function(_0x2e259e){if(_0x2e259e){if(!_0x2e259e[_0x249d('0x4c')]){throw new db[(_0x249d('0x4e'))][(_0x249d('0x4f'))]('VoiceMailMessage\x20not\x20found');}var _0x23d243={'Content-Type':_0x249d('0x50'),'Content-Disposition':_0x249d('0x51')};if(_0x2e259e[_0x249d('0x4d')]){_0x23d243['Content-Disposition']=_0x249d('0x52')+_0x2e259e[_0x249d('0x4d')]+_0x249d('0x53');}_0x41a0f1[_0x249d('0x22')](_0x23d243);return _0x41a0f1[_0x249d('0x27')](new Buffer(_0x2e259e[_0x249d('0x4c')]));}})[_0x249d('0x42')](handleError(_0x41a0f1,null));};
\ No newline at end of file
+var _0x2245=['rimraf','zip-dir','fast-json-patch','bluebird','mustache','util','sox','to-csv','fs-extra','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','apply','reject','save','update','then','destroy','stack','name','index','map','rawAttributes','fieldName','model','differenceBy','query','keys','attributes','intersection','fields','length','hasOwnProperty','sort','where','filters','filter','merge','type','VIRTUAL','options','VoiceMailMessage','findAll','catch','show','params','include','find','body','download','recording','msg_id','Sequelize','ValidationError','VoiceMailMessage\x20not\x20found','audio/wav','attachment','Content-Disposition','attachment;\x20filename=\x22','.wav\x22','eml-format'];(function(_0x5aeda7,_0x74556a){var _0x122f8a=function(_0x38d083){while(--_0x38d083){_0x5aeda7['push'](_0x5aeda7['shift']());}};_0x122f8a(++_0x74556a);}(_0x2245,0xf2));var _0x5224=function(_0x5bf6f6,_0x14ebc4){_0x5bf6f6=_0x5bf6f6-0x0;var _0x1fd3c4=_0x2245[_0x5bf6f6];return _0x1fd3c4;};'use strict';var emlformat=require(_0x5224('0x0'));var rimraf=require(_0x5224('0x1'));var zipdir=require(_0x5224('0x2'));var jsonpatch=require(_0x5224('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x5224('0x4'));var Mustache=require(_0x5224('0x5'));var util=require(_0x5224('0x6'));var path=require('path');var sox=require(_0x5224('0x7'));var csv=require(_0x5224('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x5224('0x9'));var _=require('lodash');var squel=require('squel');var crypto=require(_0x5224('0xa'));var jsforce=require(_0x5224('0xb'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x5224('0xc'));var Papa=require(_0x5224('0xd'));var Redis=require(_0x5224('0xe'));var authService=require(_0x5224('0xf'));var qs=require(_0x5224('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x5224('0x11'));var logger=require(_0x5224('0x12'))(_0x5224('0x13'));var utils=require(_0x5224('0x14'));var config=require(_0x5224('0x15'));var licenseUtil=require(_0x5224('0x16'));var db=require(_0x5224('0x17'))['db'];function respondWithStatusCode(_0x16fda4,_0x268f73){_0x268f73=_0x268f73||0xcc;return function(_0x34d190){if(_0x34d190){return _0x16fda4[_0x5224('0x18')](_0x268f73);}return _0x16fda4[_0x5224('0x19')](_0x268f73)[_0x5224('0x1a')]();};}function respondWithResult(_0x29b3be,_0x2a490f){_0x2a490f=_0x2a490f||0xc8;return function(_0x1bb3f4){if(_0x1bb3f4){return _0x29b3be[_0x5224('0x19')](_0x2a490f)[_0x5224('0x1b')](_0x1bb3f4);}};}function respondWithFilteredResult(_0x5ace6c,_0x1555dc){return function(_0x431062){if(_0x431062){var _0x5af71b=typeof _0x1555dc[_0x5224('0x1c')]===_0x5224('0x1d')&&typeof _0x1555dc[_0x5224('0x1e')]===_0x5224('0x1d');var _0x416887=_0x431062[_0x5224('0x1f')];var _0x58c7b7=_0x5af71b?0x0:_0x1555dc['offset'];var _0x487e45=_0x5af71b?_0x431062['count']:_0x1555dc['offset']+_0x1555dc[_0x5224('0x1e')];var _0xdc0a;if(_0x487e45>=_0x416887){_0x487e45=_0x416887;_0xdc0a=0xc8;}else{_0xdc0a=0xce;}_0x5ace6c[_0x5224('0x19')](_0xdc0a);return _0x5ace6c[_0x5224('0x20')]('Content-Range',_0x58c7b7+'-'+_0x487e45+'/'+_0x416887)[_0x5224('0x1b')](_0x431062);}return null;};}function patchUpdates(_0x193223){return function(_0x1e637a){try{jsonpatch[_0x5224('0x21')](_0x1e637a,_0x193223,!![]);}catch(_0x3c6c95){return BPromise[_0x5224('0x22')](_0x3c6c95);}return _0x1e637a[_0x5224('0x23')]();};}function saveUpdates(_0xb10bec,_0x347101){return function(_0x468565){if(_0x468565){return _0x468565[_0x5224('0x24')](_0xb10bec)[_0x5224('0x25')](function(_0x1c6e93){return _0x1c6e93;});}return null;};}function removeEntity(_0x2d5143,_0x4d8996){return function(_0x4b2d4a){if(_0x4b2d4a){return _0x4b2d4a[_0x5224('0x26')]()['then'](function(){_0x2d5143[_0x5224('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0xba8fdb,_0x3e9486){return function(_0x1c8284){if(!_0x1c8284){_0xba8fdb[_0x5224('0x18')](0x194);}return _0x1c8284;};}function handleError(_0x40d7ae,_0x51b571){_0x51b571=_0x51b571||0x1f4;return function(_0x18090f){logger['error'](_0x18090f[_0x5224('0x27')]);if(_0x18090f[_0x5224('0x28')]){delete _0x18090f[_0x5224('0x28')];}_0x40d7ae[_0x5224('0x19')](_0x51b571)['send'](_0x18090f);};}exports[_0x5224('0x29')]=function(_0x79dc5a,_0x22998e){var _0x3c9b15={},_0x8fdda8={},_0x2bb149={'count':0x0,'rows':[]};var _0x51f5e3=_[_0x5224('0x2a')](db['VoiceMailMessage'][_0x5224('0x2b')],function(_0x4f1b7e){return{'name':_0x4f1b7e[_0x5224('0x2c')],'type':_0x4f1b7e['type']['key']};});_0x8fdda8[_0x5224('0x2d')]=_[_0x5224('0x2e')](_[_0x5224('0x2a')](_0x51f5e3,_0x5224('0x28')),[_0x5224('0x28')]);_0x8fdda8[_0x5224('0x2f')]=_[_0x5224('0x30')](_0x79dc5a[_0x5224('0x2f')]);_0x8fdda8['filters']=_['intersection'](_0x8fdda8[_0x5224('0x2d')],_0x8fdda8[_0x5224('0x2f')]);_0x3c9b15[_0x5224('0x31')]=_[_0x5224('0x32')](_0x8fdda8['model'],qs[_0x5224('0x33')](_0x79dc5a[_0x5224('0x2f')][_0x5224('0x33')]));_0x3c9b15[_0x5224('0x31')]=_0x3c9b15['attributes'][_0x5224('0x34')]?_0x3c9b15[_0x5224('0x31')]:_0x8fdda8[_0x5224('0x2d')];if(!_0x79dc5a['query'][_0x5224('0x35')]('nolimit')){_0x3c9b15[_0x5224('0x1e')]=qs[_0x5224('0x1e')](_0x79dc5a[_0x5224('0x2f')][_0x5224('0x1e')]);_0x3c9b15[_0x5224('0x1c')]=qs[_0x5224('0x1c')](_0x79dc5a['query'][_0x5224('0x1c')]);}_0x3c9b15['order']=qs[_0x5224('0x36')](_0x79dc5a['query'][_0x5224('0x36')]);_0x3c9b15[_0x5224('0x37')]=qs['filters'](_['pick'](_0x79dc5a[_0x5224('0x2f')],_0x8fdda8[_0x5224('0x38')]),_0x51f5e3);if(_0x79dc5a[_0x5224('0x2f')][_0x5224('0x39')]){_0x3c9b15[_0x5224('0x37')]=_[_0x5224('0x3a')](_0x3c9b15[_0x5224('0x37')],{'$or':_[_0x5224('0x2a')](_0x51f5e3,function(_0x3ee60e){if(_0x3ee60e[_0x5224('0x3b')]!==_0x5224('0x3c')){var _0x6b3a08={};_0x6b3a08[_0x3ee60e[_0x5224('0x28')]]={'$like':'%'+_0x79dc5a['query'][_0x5224('0x39')]+'%'};return _0x6b3a08;}})});}_0x3c9b15=_[_0x5224('0x3a')]({},_0x3c9b15,_0x79dc5a[_0x5224('0x3d')]);var _0x498f0b={'where':_0x3c9b15[_0x5224('0x37')]};return db[_0x5224('0x3e')][_0x5224('0x1f')](_0x498f0b)['then'](function(_0x1aff41){_0x2bb149[_0x5224('0x1f')]=_0x1aff41;if(_0x79dc5a[_0x5224('0x2f')]['includeAll']){_0x3c9b15['include']=[{'all':!![]}];}return db[_0x5224('0x3e')][_0x5224('0x3f')](_0x3c9b15);})[_0x5224('0x25')](function(_0x5e6cb3){_0x2bb149['rows']=_0x5e6cb3;return _0x2bb149;})[_0x5224('0x25')](respondWithFilteredResult(_0x22998e,_0x3c9b15))[_0x5224('0x40')](handleError(_0x22998e,null));};exports[_0x5224('0x41')]=function(_0x2c3a31,_0x1afbb3){var _0x136272={'raw':!![],'where':{'id':_0x2c3a31[_0x5224('0x42')]['id']}},_0x1ce411={};_0x1ce411[_0x5224('0x2d')]=_['keys'](db[_0x5224('0x3e')]['rawAttributes']);_0x1ce411[_0x5224('0x2f')]=_[_0x5224('0x30')](_0x2c3a31[_0x5224('0x2f')]);_0x1ce411[_0x5224('0x38')]=_[_0x5224('0x32')](_0x1ce411[_0x5224('0x2d')],_0x1ce411[_0x5224('0x2f')]);_0x136272[_0x5224('0x31')]=_['intersection'](_0x1ce411[_0x5224('0x2d')],qs[_0x5224('0x33')](_0x2c3a31[_0x5224('0x2f')]['fields']));_0x136272[_0x5224('0x31')]=_0x136272[_0x5224('0x31')][_0x5224('0x34')]?_0x136272[_0x5224('0x31')]:_0x1ce411[_0x5224('0x2d')];if(_0x2c3a31[_0x5224('0x2f')]['includeAll']){_0x136272[_0x5224('0x43')]=[{'all':!![]}];}_0x136272=_[_0x5224('0x3a')]({},_0x136272,_0x2c3a31[_0x5224('0x3d')]);return db[_0x5224('0x3e')][_0x5224('0x44')](_0x136272)[_0x5224('0x25')](handleEntityNotFound(_0x1afbb3,null))['then'](respondWithResult(_0x1afbb3,null))['catch'](handleError(_0x1afbb3,null));};exports['create']=function(_0x10d489,_0x3e6f0e){return db[_0x5224('0x3e')]['create'](_0x10d489[_0x5224('0x45')],{})['then'](respondWithResult(_0x3e6f0e,0xc9))[_0x5224('0x40')](handleError(_0x3e6f0e,null));};exports['update']=function(_0xdfcf16,_0x1591e8){if(_0xdfcf16[_0x5224('0x45')]['id']){delete _0xdfcf16[_0x5224('0x45')]['id'];}return db['VoiceMailMessage'][_0x5224('0x44')]({'where':{'id':_0xdfcf16[_0x5224('0x42')]['id']}})[_0x5224('0x25')](handleEntityNotFound(_0x1591e8,null))[_0x5224('0x25')](saveUpdates(_0xdfcf16[_0x5224('0x45')],null))[_0x5224('0x25')](respondWithResult(_0x1591e8,null))['catch'](handleError(_0x1591e8,null));};exports[_0x5224('0x26')]=function(_0x3d53d6,_0x261eb4){return db['VoiceMailMessage']['find']({'where':{'id':_0x3d53d6[_0x5224('0x42')]['id']}})[_0x5224('0x25')](handleEntityNotFound(_0x261eb4,null))[_0x5224('0x25')](removeEntity(_0x261eb4,null))[_0x5224('0x40')](handleError(_0x261eb4,null));};exports[_0x5224('0x46')]=function(_0x17cb79,_0x5bda15,_0x5f5986){return db[_0x5224('0x3e')][_0x5224('0x44')]({'where':{'id':_0x17cb79[_0x5224('0x42')]['id']},'attributes':['id',_0x5224('0x47'),_0x5224('0x48')]})['then'](handleEntityNotFound(_0x5bda15,null))['then'](function(_0x39044c){if(_0x39044c){if(!_0x39044c['recording']){throw new db[(_0x5224('0x49'))][(_0x5224('0x4a'))](_0x5224('0x4b'));}var _0x4c3aa3={'Content-Type':_0x5224('0x4c'),'Content-Disposition':_0x5224('0x4d')};if(_0x39044c[_0x5224('0x48')]){_0x4c3aa3[_0x5224('0x4e')]=_0x5224('0x4f')+_0x39044c['msg_id']+_0x5224('0x50');}_0x5bda15[_0x5224('0x20')](_0x4c3aa3);return _0x5bda15['send'](new Buffer(_0x39044c[_0x5224('0x47')]));}})[_0x5224('0x40')](handleError(_0x5bda15,null));};
\ No newline at end of file