Built motion from commit c738b9ac.|2.6.25
[motion2.git] / server / api / voiceMailMessage / voiceMailMessage.controller.js
index 5bf1d2a..2e39e46 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8f58=['sort','where','filter','VIRTUAL','merge','options','include','findAll','rows','show','includeAll','find','catch','create','body','update','params','download','recording','msg_id','VoiceMailMessage\x20not\x20found','audio/wav','Content-Disposition','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','util','path','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','destroy','then','error','name','send','index','VoiceMailMessage','rawAttributes','fieldName','type','key','model','differenceBy','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit'];(function(_0x4e4567,_0x598f1a){var _0x44eef6=function(_0x17f0e7){while(--_0x17f0e7){_0x4e4567['push'](_0x4e4567['shift']());}};_0x44eef6(++_0x598f1a);}(_0x8f58,0x16b));var _0x88f5=function(_0x6ce431,_0x51aa93){_0x6ce431=_0x6ce431-0x0;var _0x118b4a=_0x8f58[_0x6ce431];return _0x118b4a;};'use strict';var emlformat=require(_0x88f5('0x0'));var rimraf=require(_0x88f5('0x1'));var zipdir=require(_0x88f5('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x88f5('0x3'));var moment=require(_0x88f5('0x4'));var BPromise=require(_0x88f5('0x5'));var Mustache=require('mustache');var util=require(_0x88f5('0x6'));var path=require(_0x88f5('0x7'));var sox=require('sox');var csv=require(_0x88f5('0x8'));var ejs=require(_0x88f5('0x9'));var fs=require('fs');var fs_extra=require(_0x88f5('0xa'));var _=require(_0x88f5('0xb'));var squel=require('squel');var crypto=require(_0x88f5('0xc'));var jsforce=require(_0x88f5('0xd'));var deskjs=require(_0x88f5('0xe'));var toCsv=require(_0x88f5('0x8'));var querystring=require(_0x88f5('0xf'));var Papa=require(_0x88f5('0x10'));var Redis=require(_0x88f5('0x11'));var authService=require(_0x88f5('0x12'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x88f5('0x13'));var logger=require(_0x88f5('0x14'))(_0x88f5('0x15'));var utils=require(_0x88f5('0x16'));var config=require(_0x88f5('0x17'));var licenseUtil=require(_0x88f5('0x18'));var db=require(_0x88f5('0x19'))['db'];function respondWithStatusCode(_0x2da2b3,_0x3d8b4b){_0x3d8b4b=_0x3d8b4b||0xcc;return function(_0x3ec253){if(_0x3ec253){return _0x2da2b3[_0x88f5('0x1a')](_0x3d8b4b);}return _0x2da2b3[_0x88f5('0x1b')](_0x3d8b4b)[_0x88f5('0x1c')]();};}function respondWithResult(_0x5a16a4,_0xb55d74){_0xb55d74=_0xb55d74||0xc8;return function(_0x5a5739){if(_0x5a5739){return _0x5a16a4[_0x88f5('0x1b')](_0xb55d74)[_0x88f5('0x1d')](_0x5a5739);}};}function respondWithFilteredResult(_0x2e665f,_0x1643e1){return function(_0x23cc03){if(_0x23cc03){var _0x1b05ae=typeof _0x1643e1[_0x88f5('0x1e')]===_0x88f5('0x1f')&&typeof _0x1643e1[_0x88f5('0x20')]===_0x88f5('0x1f');var _0x2db1b3=_0x23cc03[_0x88f5('0x21')];var _0x5534db=_0x1b05ae?0x0:_0x1643e1[_0x88f5('0x1e')];var _0x5cba52=_0x1b05ae?_0x23cc03[_0x88f5('0x21')]:_0x1643e1['offset']+_0x1643e1[_0x88f5('0x20')];var _0x5141b4;if(_0x5cba52>=_0x2db1b3){_0x5cba52=_0x2db1b3;_0x5141b4=0xc8;}else{_0x5141b4=0xce;}_0x2e665f[_0x88f5('0x1b')](_0x5141b4);return _0x2e665f[_0x88f5('0x22')](_0x88f5('0x23'),_0x5534db+'-'+_0x5cba52+'/'+_0x2db1b3)[_0x88f5('0x1d')](_0x23cc03);}return null;};}function patchUpdates(_0x1fe689){return function(_0x154717){try{jsonpatch[_0x88f5('0x24')](_0x154717,_0x1fe689,!![]);}catch(_0x498847){return BPromise[_0x88f5('0x25')](_0x498847);}return _0x154717[_0x88f5('0x26')]();};}function saveUpdates(_0x326f31,_0x187bdf){return function(_0x308d4d){if(_0x308d4d){return _0x308d4d['update'](_0x326f31)['then'](function(_0x2c27bb){return _0x2c27bb;});}return null;};}function removeEntity(_0x543c0c,_0x3d4309){return function(_0xd8f8f0){if(_0xd8f8f0){return _0xd8f8f0[_0x88f5('0x27')]()[_0x88f5('0x28')](function(){_0x543c0c[_0x88f5('0x1b')](0xcc)[_0x88f5('0x1c')]();});}};}function handleEntityNotFound(_0x51858c,_0x53a050){return function(_0x1d4ba7){if(!_0x1d4ba7){_0x51858c[_0x88f5('0x1a')](0x194);}return _0x1d4ba7;};}function handleError(_0x26e31c,_0x291c6d){_0x291c6d=_0x291c6d||0x1f4;return function(_0xc50880){logger[_0x88f5('0x29')](_0xc50880['stack']);if(_0xc50880['name']){delete _0xc50880[_0x88f5('0x2a')];}_0x26e31c[_0x88f5('0x1b')](_0x291c6d)[_0x88f5('0x2b')](_0xc50880);};}exports[_0x88f5('0x2c')]=function(_0x8c396,_0x26706d){var _0x4e2b39={},_0x53f3b2={},_0x2ab15b={'count':0x0,'rows':[]};var _0x544441=_['map'](db[_0x88f5('0x2d')][_0x88f5('0x2e')],function(_0x2cbb44){return{'name':_0x2cbb44[_0x88f5('0x2f')],'type':_0x2cbb44[_0x88f5('0x30')][_0x88f5('0x31')]};});_0x53f3b2[_0x88f5('0x32')]=_[_0x88f5('0x33')](_[_0x88f5('0x34')](_0x544441,_0x88f5('0x2a')),['name']);_0x53f3b2[_0x88f5('0x35')]=_[_0x88f5('0x36')](_0x8c396['query']);_0x53f3b2[_0x88f5('0x37')]=_[_0x88f5('0x38')](_0x53f3b2[_0x88f5('0x32')],_0x53f3b2[_0x88f5('0x35')]);_0x4e2b39[_0x88f5('0x39')]=_['intersection'](_0x53f3b2['model'],qs[_0x88f5('0x3a')](_0x8c396[_0x88f5('0x35')][_0x88f5('0x3a')]));_0x4e2b39[_0x88f5('0x39')]=_0x4e2b39['attributes'][_0x88f5('0x3b')]?_0x4e2b39[_0x88f5('0x39')]:_0x53f3b2['model'];if(!_0x8c396[_0x88f5('0x35')][_0x88f5('0x3c')](_0x88f5('0x3d'))){_0x4e2b39[_0x88f5('0x20')]=qs[_0x88f5('0x20')](_0x8c396[_0x88f5('0x35')][_0x88f5('0x20')]);_0x4e2b39[_0x88f5('0x1e')]=qs[_0x88f5('0x1e')](_0x8c396[_0x88f5('0x35')][_0x88f5('0x1e')]);}_0x4e2b39['order']=qs[_0x88f5('0x3e')](_0x8c396['query']['sort']);_0x4e2b39[_0x88f5('0x3f')]=qs[_0x88f5('0x37')](_['pick'](_0x8c396[_0x88f5('0x35')],_0x53f3b2['filters']),_0x544441);if(_0x8c396[_0x88f5('0x35')][_0x88f5('0x40')]){_0x4e2b39[_0x88f5('0x3f')]=_['merge'](_0x4e2b39[_0x88f5('0x3f')],{'$or':_[_0x88f5('0x34')](_0x544441,function(_0x40ee9b){if(_0x40ee9b['type']!==_0x88f5('0x41')){var _0x20c3fe={};_0x20c3fe[_0x40ee9b[_0x88f5('0x2a')]]={'$like':'%'+_0x8c396['query'][_0x88f5('0x40')]+'%'};return _0x20c3fe;}})});}_0x4e2b39=_[_0x88f5('0x42')]({},_0x4e2b39,_0x8c396[_0x88f5('0x43')]);var _0x36474c={'where':_0x4e2b39[_0x88f5('0x3f')]};return db[_0x88f5('0x2d')][_0x88f5('0x21')](_0x36474c)[_0x88f5('0x28')](function(_0x4f5faf){_0x2ab15b[_0x88f5('0x21')]=_0x4f5faf;if(_0x8c396[_0x88f5('0x35')]['includeAll']){_0x4e2b39[_0x88f5('0x44')]=[{'all':!![]}];}return db[_0x88f5('0x2d')][_0x88f5('0x45')](_0x4e2b39);})[_0x88f5('0x28')](function(_0x528052){_0x2ab15b[_0x88f5('0x46')]=_0x528052;return _0x2ab15b;})[_0x88f5('0x28')](respondWithFilteredResult(_0x26706d,_0x4e2b39))['catch'](handleError(_0x26706d,null));};exports[_0x88f5('0x47')]=function(_0x255efe,_0x338af2){var _0x567209={'raw':!![],'where':{'id':_0x255efe['params']['id']}},_0x4ab162={};_0x4ab162[_0x88f5('0x32')]=_[_0x88f5('0x36')](db[_0x88f5('0x2d')][_0x88f5('0x2e')]);_0x4ab162[_0x88f5('0x35')]=_[_0x88f5('0x36')](_0x255efe[_0x88f5('0x35')]);_0x4ab162[_0x88f5('0x37')]=_['intersection'](_0x4ab162[_0x88f5('0x32')],_0x4ab162[_0x88f5('0x35')]);_0x567209[_0x88f5('0x39')]=_[_0x88f5('0x38')](_0x4ab162[_0x88f5('0x32')],qs[_0x88f5('0x3a')](_0x255efe[_0x88f5('0x35')]['fields']));_0x567209[_0x88f5('0x39')]=_0x567209[_0x88f5('0x39')][_0x88f5('0x3b')]?_0x567209[_0x88f5('0x39')]:_0x4ab162['model'];if(_0x255efe[_0x88f5('0x35')][_0x88f5('0x48')]){_0x567209[_0x88f5('0x44')]=[{'all':!![]}];}_0x567209=_[_0x88f5('0x42')]({},_0x567209,_0x255efe[_0x88f5('0x43')]);return db[_0x88f5('0x2d')][_0x88f5('0x49')](_0x567209)['then'](handleEntityNotFound(_0x338af2,null))[_0x88f5('0x28')](respondWithResult(_0x338af2,null))[_0x88f5('0x4a')](handleError(_0x338af2,null));};exports[_0x88f5('0x4b')]=function(_0x10ae3c,_0x1a9a38){return db[_0x88f5('0x2d')][_0x88f5('0x4b')](_0x10ae3c[_0x88f5('0x4c')],{})[_0x88f5('0x28')](respondWithResult(_0x1a9a38,0xc9))['catch'](handleError(_0x1a9a38,null));};exports[_0x88f5('0x4d')]=function(_0x279161,_0x164a42){if(_0x279161[_0x88f5('0x4c')]['id']){delete _0x279161[_0x88f5('0x4c')]['id'];}return db['VoiceMailMessage']['find']({'where':{'id':_0x279161['params']['id']}})[_0x88f5('0x28')](handleEntityNotFound(_0x164a42,null))['then'](saveUpdates(_0x279161[_0x88f5('0x4c')],null))['then'](respondWithResult(_0x164a42,null))[_0x88f5('0x4a')](handleError(_0x164a42,null));};exports[_0x88f5('0x27')]=function(_0x48eed2,_0x4280af){return db[_0x88f5('0x2d')][_0x88f5('0x49')]({'where':{'id':_0x48eed2[_0x88f5('0x4e')]['id']}})[_0x88f5('0x28')](handleEntityNotFound(_0x4280af,null))[_0x88f5('0x28')](removeEntity(_0x4280af,null))['catch'](handleError(_0x4280af,null));};exports[_0x88f5('0x4f')]=function(_0x254414,_0x30f00a,_0x5db741){return db['VoiceMailMessage'][_0x88f5('0x49')]({'where':{'id':_0x254414[_0x88f5('0x4e')]['id']},'attributes':['id',_0x88f5('0x50'),_0x88f5('0x51')]})[_0x88f5('0x28')](handleEntityNotFound(_0x30f00a,null))[_0x88f5('0x28')](function(_0x260184){if(_0x260184){if(!_0x260184[_0x88f5('0x50')]){throw new db['Sequelize']['ValidationError'](_0x88f5('0x52'));}var _0x4be3fd={'Content-Type':_0x88f5('0x53'),'Content-Disposition':'attachment'};if(_0x260184[_0x88f5('0x51')]){_0x4be3fd[_0x88f5('0x54')]='attachment;\x20filename=\x22'+_0x260184['msg_id']+'.wav\x22';}_0x30f00a[_0x88f5('0x22')](_0x4be3fd);return _0x30f00a['send'](new Buffer(_0x260184[_0x88f5('0x50')]));}})[_0x88f5('0x4a')](handleError(_0x30f00a,null));};
\ No newline at end of file
+var _0x813f=['length','find','create','body','update','params','download','recording','Sequelize','ValidationError','VoiceMailMessage\x20not\x20found','audio/wav','attachment','msg_id','attachment;\x20filename=\x22','.wav\x22','send','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','status','json','offset','undefined','limit','count','set','Content-Range','apply','save','destroy','then','end','sendStatus','error','stack','name','index','map','VoiceMailMessage','fieldName','type','model','differenceBy','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','options','includeAll','include','findAll','rows','catch','show','rawAttributes'];(function(_0x2ffe71,_0x488129){var _0x35d657=function(_0x33da48){while(--_0x33da48){_0x2ffe71['push'](_0x2ffe71['shift']());}};_0x35d657(++_0x488129);}(_0x813f,0x179));var _0xf813=function(_0x2d6ebc,_0x370b3c){_0x2d6ebc=_0x2d6ebc-0x0;var _0x36668c=_0x813f[_0x2d6ebc];return _0x36668c;};'use strict';var emlformat=require(_0xf813('0x0'));var rimraf=require(_0xf813('0x1'));var zipdir=require(_0xf813('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xf813('0x3'));var moment=require(_0xf813('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xf813('0x5'));var util=require(_0xf813('0x6'));var path=require(_0xf813('0x7'));var sox=require(_0xf813('0x8'));var csv=require('to-csv');var ejs=require(_0xf813('0x9'));var fs=require('fs');var fs_extra=require(_0xf813('0xa'));var _=require(_0xf813('0xb'));var squel=require(_0xf813('0xc'));var crypto=require(_0xf813('0xd'));var jsforce=require(_0xf813('0xe'));var deskjs=require(_0xf813('0xf'));var toCsv=require('to-csv');var querystring=require(_0xf813('0x10'));var Papa=require(_0xf813('0x11'));var Redis=require(_0xf813('0x12'));var authService=require(_0xf813('0x13'));var qs=require(_0xf813('0x14'));var as=require(_0xf813('0x15'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xf813('0x16'))(_0xf813('0x17'));var utils=require('../../config/utils');var config=require(_0xf813('0x18'));var licenseUtil=require(_0xf813('0x19'));var db=require(_0xf813('0x1a'))['db'];function respondWithStatusCode(_0x21841f,_0x4f9a07){_0x4f9a07=_0x4f9a07||0xcc;return function(_0x29f7ef){if(_0x29f7ef){return _0x21841f['sendStatus'](_0x4f9a07);}return _0x21841f[_0xf813('0x1b')](_0x4f9a07)['end']();};}function respondWithResult(_0x450e22,_0x4bd36d){_0x4bd36d=_0x4bd36d||0xc8;return function(_0x2e459e){if(_0x2e459e){return _0x450e22[_0xf813('0x1b')](_0x4bd36d)[_0xf813('0x1c')](_0x2e459e);}};}function respondWithFilteredResult(_0x2ff2b3,_0x1580d8){return function(_0x30bee7){if(_0x30bee7){var _0x931f3=typeof _0x1580d8[_0xf813('0x1d')]===_0xf813('0x1e')&&typeof _0x1580d8[_0xf813('0x1f')]===_0xf813('0x1e');var _0x5c2f9f=_0x30bee7[_0xf813('0x20')];var _0x2b4cdb=_0x931f3?0x0:_0x1580d8[_0xf813('0x1d')];var _0x253f91=_0x931f3?_0x30bee7['count']:_0x1580d8[_0xf813('0x1d')]+_0x1580d8[_0xf813('0x1f')];var _0x19679d;if(_0x253f91>=_0x5c2f9f){_0x253f91=_0x5c2f9f;_0x19679d=0xc8;}else{_0x19679d=0xce;}_0x2ff2b3['status'](_0x19679d);return _0x2ff2b3[_0xf813('0x21')](_0xf813('0x22'),_0x2b4cdb+'-'+_0x253f91+'/'+_0x5c2f9f)[_0xf813('0x1c')](_0x30bee7);}return null;};}function patchUpdates(_0x8b6a57){return function(_0x2b273f){try{jsonpatch[_0xf813('0x23')](_0x2b273f,_0x8b6a57,!![]);}catch(_0x1619e3){return BPromise['reject'](_0x1619e3);}return _0x2b273f[_0xf813('0x24')]();};}function saveUpdates(_0x7117d9,_0x3ebe32){return function(_0x24ca98){if(_0x24ca98){return _0x24ca98['update'](_0x7117d9)['then'](function(_0x2dd70d){return _0x2dd70d;});}return null;};}function removeEntity(_0x3c60f3,_0x420f2f){return function(_0x1483ed){if(_0x1483ed){return _0x1483ed[_0xf813('0x25')]()[_0xf813('0x26')](function(){_0x3c60f3[_0xf813('0x1b')](0xcc)[_0xf813('0x27')]();});}};}function handleEntityNotFound(_0x38f4c5,_0xe904e4){return function(_0x152295){if(!_0x152295){_0x38f4c5[_0xf813('0x28')](0x194);}return _0x152295;};}function handleError(_0x3bfd07,_0x309358){_0x309358=_0x309358||0x1f4;return function(_0xe7bfa2){logger[_0xf813('0x29')](_0xe7bfa2[_0xf813('0x2a')]);if(_0xe7bfa2[_0xf813('0x2b')]){delete _0xe7bfa2[_0xf813('0x2b')];}_0x3bfd07[_0xf813('0x1b')](_0x309358)['send'](_0xe7bfa2);};}exports[_0xf813('0x2c')]=function(_0x2e7683,_0x2f1272){var _0x4b20e5={},_0x3d67b0={},_0x51170e={'count':0x0,'rows':[]};var _0x2e722a=_[_0xf813('0x2d')](db[_0xf813('0x2e')]['rawAttributes'],function(_0x17d76b){return{'name':_0x17d76b[_0xf813('0x2f')],'type':_0x17d76b[_0xf813('0x30')]['key']};});_0x3d67b0[_0xf813('0x31')]=_[_0xf813('0x32')](_['map'](_0x2e722a,_0xf813('0x2b')),[_0xf813('0x2b')]);_0x3d67b0[_0xf813('0x33')]=_[_0xf813('0x34')](_0x2e7683[_0xf813('0x33')]);_0x3d67b0[_0xf813('0x35')]=_[_0xf813('0x36')](_0x3d67b0[_0xf813('0x31')],_0x3d67b0[_0xf813('0x33')]);_0x4b20e5[_0xf813('0x37')]=_['intersection'](_0x3d67b0[_0xf813('0x31')],qs[_0xf813('0x38')](_0x2e7683['query'][_0xf813('0x38')]));_0x4b20e5['attributes']=_0x4b20e5[_0xf813('0x37')]['length']?_0x4b20e5[_0xf813('0x37')]:_0x3d67b0['model'];if(!_0x2e7683['query'][_0xf813('0x39')](_0xf813('0x3a'))){_0x4b20e5['limit']=qs['limit'](_0x2e7683['query'][_0xf813('0x1f')]);_0x4b20e5[_0xf813('0x1d')]=qs['offset'](_0x2e7683[_0xf813('0x33')][_0xf813('0x1d')]);}_0x4b20e5[_0xf813('0x3b')]=qs[_0xf813('0x3c')](_0x2e7683[_0xf813('0x33')][_0xf813('0x3c')]);_0x4b20e5[_0xf813('0x3d')]=qs[_0xf813('0x35')](_[_0xf813('0x3e')](_0x2e7683[_0xf813('0x33')],_0x3d67b0['filters']),_0x2e722a);if(_0x2e7683['query'][_0xf813('0x3f')]){_0x4b20e5[_0xf813('0x3d')]=_[_0xf813('0x40')](_0x4b20e5['where'],{'$or':_[_0xf813('0x2d')](_0x2e722a,function(_0x93b4e8){if(_0x93b4e8[_0xf813('0x30')]!=='VIRTUAL'){var _0x1802a7={};_0x1802a7[_0x93b4e8[_0xf813('0x2b')]]={'$like':'%'+_0x2e7683['query'][_0xf813('0x3f')]+'%'};return _0x1802a7;}})});}_0x4b20e5=_['merge']({},_0x4b20e5,_0x2e7683[_0xf813('0x41')]);var _0x34a90e={'where':_0x4b20e5[_0xf813('0x3d')]};return db[_0xf813('0x2e')][_0xf813('0x20')](_0x34a90e)['then'](function(_0x22c923){_0x51170e[_0xf813('0x20')]=_0x22c923;if(_0x2e7683['query'][_0xf813('0x42')]){_0x4b20e5[_0xf813('0x43')]=[{'all':!![]}];}return db[_0xf813('0x2e')][_0xf813('0x44')](_0x4b20e5);})[_0xf813('0x26')](function(_0x38299b){_0x51170e[_0xf813('0x45')]=_0x38299b;return _0x51170e;})['then'](respondWithFilteredResult(_0x2f1272,_0x4b20e5))[_0xf813('0x46')](handleError(_0x2f1272,null));};exports[_0xf813('0x47')]=function(_0x427c21,_0xf4b75a){var _0x18b114={'raw':!![],'where':{'id':_0x427c21['params']['id']}},_0x46b9c4={};_0x46b9c4[_0xf813('0x31')]=_[_0xf813('0x34')](db[_0xf813('0x2e')][_0xf813('0x48')]);_0x46b9c4[_0xf813('0x33')]=_[_0xf813('0x34')](_0x427c21[_0xf813('0x33')]);_0x46b9c4[_0xf813('0x35')]=_['intersection'](_0x46b9c4[_0xf813('0x31')],_0x46b9c4[_0xf813('0x33')]);_0x18b114[_0xf813('0x37')]=_[_0xf813('0x36')](_0x46b9c4[_0xf813('0x31')],qs[_0xf813('0x38')](_0x427c21[_0xf813('0x33')][_0xf813('0x38')]));_0x18b114['attributes']=_0x18b114['attributes'][_0xf813('0x49')]?_0x18b114[_0xf813('0x37')]:_0x46b9c4[_0xf813('0x31')];if(_0x427c21[_0xf813('0x33')][_0xf813('0x42')]){_0x18b114['include']=[{'all':!![]}];}_0x18b114=_['merge']({},_0x18b114,_0x427c21[_0xf813('0x41')]);return db[_0xf813('0x2e')][_0xf813('0x4a')](_0x18b114)[_0xf813('0x26')](handleEntityNotFound(_0xf4b75a,null))[_0xf813('0x26')](respondWithResult(_0xf4b75a,null))[_0xf813('0x46')](handleError(_0xf4b75a,null));};exports[_0xf813('0x4b')]=function(_0x2182aa,_0x175218){return db['VoiceMailMessage'][_0xf813('0x4b')](_0x2182aa[_0xf813('0x4c')],{})[_0xf813('0x26')](respondWithResult(_0x175218,0xc9))[_0xf813('0x46')](handleError(_0x175218,null));};exports[_0xf813('0x4d')]=function(_0xad0fa2,_0x48a91e){if(_0xad0fa2[_0xf813('0x4c')]['id']){delete _0xad0fa2[_0xf813('0x4c')]['id'];}return db['VoiceMailMessage'][_0xf813('0x4a')]({'where':{'id':_0xad0fa2[_0xf813('0x4e')]['id']}})['then'](handleEntityNotFound(_0x48a91e,null))[_0xf813('0x26')](saveUpdates(_0xad0fa2[_0xf813('0x4c')],null))[_0xf813('0x26')](respondWithResult(_0x48a91e,null))['catch'](handleError(_0x48a91e,null));};exports['destroy']=function(_0x30a344,_0x4d7ca2){return db[_0xf813('0x2e')][_0xf813('0x4a')]({'where':{'id':_0x30a344['params']['id']}})[_0xf813('0x26')](handleEntityNotFound(_0x4d7ca2,null))['then'](removeEntity(_0x4d7ca2,null))[_0xf813('0x46')](handleError(_0x4d7ca2,null));};exports[_0xf813('0x4f')]=function(_0x51eb60,_0x4ce8d1,_0x220cfd){return db[_0xf813('0x2e')][_0xf813('0x4a')]({'where':{'id':_0x51eb60[_0xf813('0x4e')]['id']},'attributes':['id',_0xf813('0x50'),'msg_id']})['then'](handleEntityNotFound(_0x4ce8d1,null))['then'](function(_0x22d1a7){if(_0x22d1a7){if(!_0x22d1a7[_0xf813('0x50')]){throw new db[(_0xf813('0x51'))][(_0xf813('0x52'))](_0xf813('0x53'));}var _0x2b301b={'Content-Type':_0xf813('0x54'),'Content-Disposition':_0xf813('0x55')};if(_0x22d1a7[_0xf813('0x56')]){_0x2b301b['Content-Disposition']=_0xf813('0x57')+_0x22d1a7[_0xf813('0x56')]+_0xf813('0x58');}_0x4ce8d1[_0xf813('0x21')](_0x2b301b);return _0x4ce8d1[_0xf813('0x59')](new Buffer(_0x22d1a7['recording']));}})[_0xf813('0x46')](handleError(_0x4ce8d1,null));};
\ No newline at end of file