Built motion from commit 00bf23f6.|2.6.16
[motion2.git] / server / api / voiceMailMessage / voiceMailMessage.controller.js
index 9ab1905..0805d8e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xca5b=['fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','end','status','json','offset','undefined','limit','count','Content-Range','apply','save','destroy','then','sendStatus','error','stack','name','send','index','map','VoiceMailMessage','rawAttributes','key','differenceBy','keys','query','intersection','model','attributes','fields','length','nolimit','order','sort','where','filters','filter','merge','type','VIRTUAL','options','includeAll','include','rows','catch','show','params','find','create','body','download','recording','msg_id','Sequelize','ValidationError','audio/wav','attachment','Content-Disposition','attachment;\x20filename=\x22','.wav\x22','set','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','sox','to-csv'];(function(_0xc0f0d6,_0x4f4015){var _0x40d7ee=function(_0x246eac){while(--_0x246eac){_0xc0f0d6['push'](_0xc0f0d6['shift']());}};_0x40d7ee(++_0x4f4015);}(_0xca5b,0xf8));var _0xbca5=function(_0x17cffd,_0x2e92ca){_0x17cffd=_0x17cffd-0x0;var _0x54b404=_0xca5b[_0x17cffd];return _0x54b404;};'use strict';var emlformat=require(_0xbca5('0x0'));var rimraf=require(_0xbca5('0x1'));var zipdir=require(_0xbca5('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xbca5('0x3'));var moment=require(_0xbca5('0x4'));var BPromise=require(_0xbca5('0x5'));var Mustache=require(_0xbca5('0x6'));var util=require(_0xbca5('0x7'));var path=require('path');var sox=require(_0xbca5('0x8'));var csv=require(_0xbca5('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xbca5('0xa'));var _=require(_0xbca5('0xb'));var squel=require(_0xbca5('0xc'));var crypto=require(_0xbca5('0xd'));var jsforce=require(_0xbca5('0xe'));var deskjs=require(_0xbca5('0xf'));var toCsv=require(_0xbca5('0x9'));var querystring=require(_0xbca5('0x10'));var Papa=require('papaparse');var Redis=require(_0xbca5('0x11'));var authService=require('../../components/auth/service');var qs=require(_0xbca5('0x12'));var as=require(_0xbca5('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xbca5('0x14'))(_0xbca5('0x15'));var utils=require(_0xbca5('0x16'));var config=require(_0xbca5('0x17'));var licenseUtil=require(_0xbca5('0x18'));var db=require(_0xbca5('0x19'))['db'];function respondWithStatusCode(_0x1bd3e9,_0x36d80b){_0x36d80b=_0x36d80b||0xcc;return function(_0x443bdc){if(_0x443bdc){return _0x1bd3e9['sendStatus'](_0x36d80b);}return _0x1bd3e9['status'](_0x36d80b)[_0xbca5('0x1a')]();};}function respondWithResult(_0x10be06,_0x5b43e6){_0x5b43e6=_0x5b43e6||0xc8;return function(_0x1b1b0f){if(_0x1b1b0f){return _0x10be06[_0xbca5('0x1b')](_0x5b43e6)[_0xbca5('0x1c')](_0x1b1b0f);}};}function respondWithFilteredResult(_0xc504ee,_0x8c9825){return function(_0x3cb133){if(_0x3cb133){var _0x4e5940=typeof _0x8c9825[_0xbca5('0x1d')]===_0xbca5('0x1e')&&typeof _0x8c9825[_0xbca5('0x1f')]===_0xbca5('0x1e');var _0x42a865=_0x3cb133['count'];var _0x519711=_0x4e5940?0x0:_0x8c9825[_0xbca5('0x1d')];var _0x1d0075=_0x4e5940?_0x3cb133[_0xbca5('0x20')]:_0x8c9825[_0xbca5('0x1d')]+_0x8c9825[_0xbca5('0x1f')];var _0x2870d7;if(_0x1d0075>=_0x42a865){_0x1d0075=_0x42a865;_0x2870d7=0xc8;}else{_0x2870d7=0xce;}_0xc504ee[_0xbca5('0x1b')](_0x2870d7);return _0xc504ee['set'](_0xbca5('0x21'),_0x519711+'-'+_0x1d0075+'/'+_0x42a865)[_0xbca5('0x1c')](_0x3cb133);}return null;};}function patchUpdates(_0x206ad1){return function(_0x5415ee){try{jsonpatch[_0xbca5('0x22')](_0x5415ee,_0x206ad1,!![]);}catch(_0x2c6cdc){return BPromise['reject'](_0x2c6cdc);}return _0x5415ee[_0xbca5('0x23')]();};}function saveUpdates(_0x4449cf,_0x34b8b8){return function(_0x1922b5){if(_0x1922b5){return _0x1922b5['update'](_0x4449cf)['then'](function(_0xeef20c){return _0xeef20c;});}return null;};}function removeEntity(_0x408b54,_0x17e2dd){return function(_0x559244){if(_0x559244){return _0x559244[_0xbca5('0x24')]()[_0xbca5('0x25')](function(){_0x408b54['status'](0xcc)[_0xbca5('0x1a')]();});}};}function handleEntityNotFound(_0xbe1dd,_0xa46e5b){return function(_0x4614de){if(!_0x4614de){_0xbe1dd[_0xbca5('0x26')](0x194);}return _0x4614de;};}function handleError(_0x42fb29,_0x9fea58){_0x9fea58=_0x9fea58||0x1f4;return function(_0x14dce3){logger[_0xbca5('0x27')](_0x14dce3[_0xbca5('0x28')]);if(_0x14dce3[_0xbca5('0x29')]){delete _0x14dce3['name'];}_0x42fb29[_0xbca5('0x1b')](_0x9fea58)[_0xbca5('0x2a')](_0x14dce3);};}exports[_0xbca5('0x2b')]=function(_0x2509e8,_0x1d7707){var _0x135b6a={},_0x2aee7b={},_0x13db96={'count':0x0,'rows':[]};var _0x7a84ed=_[_0xbca5('0x2c')](db[_0xbca5('0x2d')][_0xbca5('0x2e')],function(_0x3b8bf5){return{'name':_0x3b8bf5['fieldName'],'type':_0x3b8bf5['type'][_0xbca5('0x2f')]};});_0x2aee7b['model']=_[_0xbca5('0x30')](_[_0xbca5('0x2c')](_0x7a84ed,_0xbca5('0x29')),[_0xbca5('0x29')]);_0x2aee7b['query']=_[_0xbca5('0x31')](_0x2509e8[_0xbca5('0x32')]);_0x2aee7b['filters']=_[_0xbca5('0x33')](_0x2aee7b[_0xbca5('0x34')],_0x2aee7b[_0xbca5('0x32')]);_0x135b6a[_0xbca5('0x35')]=_[_0xbca5('0x33')](_0x2aee7b[_0xbca5('0x34')],qs[_0xbca5('0x36')](_0x2509e8[_0xbca5('0x32')][_0xbca5('0x36')]));_0x135b6a[_0xbca5('0x35')]=_0x135b6a['attributes'][_0xbca5('0x37')]?_0x135b6a[_0xbca5('0x35')]:_0x2aee7b[_0xbca5('0x34')];if(!_0x2509e8[_0xbca5('0x32')]['hasOwnProperty'](_0xbca5('0x38'))){_0x135b6a[_0xbca5('0x1f')]=qs[_0xbca5('0x1f')](_0x2509e8[_0xbca5('0x32')][_0xbca5('0x1f')]);_0x135b6a[_0xbca5('0x1d')]=qs[_0xbca5('0x1d')](_0x2509e8[_0xbca5('0x32')][_0xbca5('0x1d')]);}_0x135b6a[_0xbca5('0x39')]=qs['sort'](_0x2509e8[_0xbca5('0x32')][_0xbca5('0x3a')]);_0x135b6a[_0xbca5('0x3b')]=qs[_0xbca5('0x3c')](_['pick'](_0x2509e8[_0xbca5('0x32')],_0x2aee7b[_0xbca5('0x3c')]),_0x7a84ed);if(_0x2509e8['query'][_0xbca5('0x3d')]){_0x135b6a[_0xbca5('0x3b')]=_[_0xbca5('0x3e')](_0x135b6a['where'],{'$or':_[_0xbca5('0x2c')](_0x7a84ed,function(_0x49a68f){if(_0x49a68f[_0xbca5('0x3f')]!==_0xbca5('0x40')){var _0x3d7659={};_0x3d7659[_0x49a68f[_0xbca5('0x29')]]={'$like':'%'+_0x2509e8[_0xbca5('0x32')]['filter']+'%'};return _0x3d7659;}})});}_0x135b6a=_[_0xbca5('0x3e')]({},_0x135b6a,_0x2509e8[_0xbca5('0x41')]);var _0x2aa4b7={'where':_0x135b6a[_0xbca5('0x3b')]};return db[_0xbca5('0x2d')][_0xbca5('0x20')](_0x2aa4b7)[_0xbca5('0x25')](function(_0x4c86d5){_0x13db96[_0xbca5('0x20')]=_0x4c86d5;if(_0x2509e8['query'][_0xbca5('0x42')]){_0x135b6a[_0xbca5('0x43')]=[{'all':!![]}];}return db[_0xbca5('0x2d')]['findAll'](_0x135b6a);})[_0xbca5('0x25')](function(_0x274ddf){_0x13db96[_0xbca5('0x44')]=_0x274ddf;return _0x13db96;})[_0xbca5('0x25')](respondWithFilteredResult(_0x1d7707,_0x135b6a))[_0xbca5('0x45')](handleError(_0x1d7707,null));};exports[_0xbca5('0x46')]=function(_0x432872,_0x10730f){var _0x8776d={'raw':!![],'where':{'id':_0x432872[_0xbca5('0x47')]['id']}},_0x2d3a80={};_0x2d3a80[_0xbca5('0x34')]=_[_0xbca5('0x31')](db[_0xbca5('0x2d')][_0xbca5('0x2e')]);_0x2d3a80[_0xbca5('0x32')]=_[_0xbca5('0x31')](_0x432872[_0xbca5('0x32')]);_0x2d3a80['filters']=_[_0xbca5('0x33')](_0x2d3a80['model'],_0x2d3a80['query']);_0x8776d[_0xbca5('0x35')]=_[_0xbca5('0x33')](_0x2d3a80[_0xbca5('0x34')],qs[_0xbca5('0x36')](_0x432872[_0xbca5('0x32')]['fields']));_0x8776d['attributes']=_0x8776d['attributes']['length']?_0x8776d[_0xbca5('0x35')]:_0x2d3a80[_0xbca5('0x34')];if(_0x432872[_0xbca5('0x32')][_0xbca5('0x42')]){_0x8776d[_0xbca5('0x43')]=[{'all':!![]}];}_0x8776d=_['merge']({},_0x8776d,_0x432872[_0xbca5('0x41')]);return db[_0xbca5('0x2d')][_0xbca5('0x48')](_0x8776d)['then'](handleEntityNotFound(_0x10730f,null))['then'](respondWithResult(_0x10730f,null))[_0xbca5('0x45')](handleError(_0x10730f,null));};exports['create']=function(_0x56a6fe,_0x514a84){return db['VoiceMailMessage'][_0xbca5('0x49')](_0x56a6fe[_0xbca5('0x4a')],{})[_0xbca5('0x25')](respondWithResult(_0x514a84,0xc9))[_0xbca5('0x45')](handleError(_0x514a84,null));};exports['update']=function(_0x1efaaa,_0x11aeea){if(_0x1efaaa[_0xbca5('0x4a')]['id']){delete _0x1efaaa['body']['id'];}return db[_0xbca5('0x2d')]['find']({'where':{'id':_0x1efaaa['params']['id']}})['then'](handleEntityNotFound(_0x11aeea,null))[_0xbca5('0x25')](saveUpdates(_0x1efaaa[_0xbca5('0x4a')],null))[_0xbca5('0x25')](respondWithResult(_0x11aeea,null))[_0xbca5('0x45')](handleError(_0x11aeea,null));};exports[_0xbca5('0x24')]=function(_0x48bc5e,_0x47b31e){return db[_0xbca5('0x2d')][_0xbca5('0x48')]({'where':{'id':_0x48bc5e[_0xbca5('0x47')]['id']}})[_0xbca5('0x25')](handleEntityNotFound(_0x47b31e,null))[_0xbca5('0x25')](removeEntity(_0x47b31e,null))['catch'](handleError(_0x47b31e,null));};exports[_0xbca5('0x4b')]=function(_0x235b77,_0x4948e0,_0x2056fe){return db[_0xbca5('0x2d')][_0xbca5('0x48')]({'where':{'id':_0x235b77[_0xbca5('0x47')]['id']},'attributes':['id',_0xbca5('0x4c'),_0xbca5('0x4d')]})[_0xbca5('0x25')](handleEntityNotFound(_0x4948e0,null))[_0xbca5('0x25')](function(_0x5d0e95){if(_0x5d0e95){if(!_0x5d0e95[_0xbca5('0x4c')]){throw new db[(_0xbca5('0x4e'))][(_0xbca5('0x4f'))]('VoiceMailMessage\x20not\x20found');}var _0x280d76={'Content-Type':_0xbca5('0x50'),'Content-Disposition':_0xbca5('0x51')};if(_0x5d0e95[_0xbca5('0x4d')]){_0x280d76[_0xbca5('0x52')]=_0xbca5('0x53')+_0x5d0e95['msg_id']+_0xbca5('0x54');}_0x4948e0[_0xbca5('0x55')](_0x280d76);return _0x4948e0[_0xbca5('0x2a')](new Buffer(_0x5d0e95['recording']));}})['catch'](handleError(_0x4948e0,null));};
\ No newline at end of file
+var _0x5f7f=['ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','error','name','index','map','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','filter','merge','VIRTUAL','options','include','findAll','show','VoiceMailMessage','rawAttributes','keys','catch','body','find','params','download','msg_id','recording','ValidationError','VoiceMailMessage\x20not\x20found','Content-Disposition','attachment;\x20filename=\x22','rimraf','zip-dir','request-promise','moment','bluebird','util','path','sox','to-csv'];(function(_0xe706b4,_0xb83514){var _0x34172d=function(_0x4bebb0){while(--_0x4bebb0){_0xe706b4['push'](_0xe706b4['shift']());}};_0x34172d(++_0xb83514);}(_0x5f7f,0x133));var _0xf5f7=function(_0x2f5ac5,_0x1ee939){_0x2f5ac5=_0x2f5ac5-0x0;var _0x37c9a8=_0x5f7f[_0x2f5ac5];return _0x37c9a8;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xf5f7('0x0'));var zipdir=require(_0xf5f7('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xf5f7('0x2'));var moment=require(_0xf5f7('0x3'));var BPromise=require(_0xf5f7('0x4'));var Mustache=require('mustache');var util=require(_0xf5f7('0x5'));var path=require(_0xf5f7('0x6'));var sox=require(_0xf5f7('0x7'));var csv=require(_0xf5f7('0x8'));var ejs=require(_0xf5f7('0x9'));var fs=require('fs');var fs_extra=require(_0xf5f7('0xa'));var _=require('lodash');var squel=require(_0xf5f7('0xb'));var crypto=require(_0xf5f7('0xc'));var jsforce=require(_0xf5f7('0xd'));var deskjs=require(_0xf5f7('0xe'));var toCsv=require(_0xf5f7('0x8'));var querystring=require(_0xf5f7('0xf'));var Papa=require('papaparse');var Redis=require(_0xf5f7('0x10'));var authService=require('../../components/auth/service');var qs=require(_0xf5f7('0x11'));var as=require(_0xf5f7('0x12'));var hardwareService=require(_0xf5f7('0x13'));var logger=require('../../config/logger')(_0xf5f7('0x14'));var utils=require(_0xf5f7('0x15'));var config=require(_0xf5f7('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0xf5f7('0x17'))['db'];function respondWithStatusCode(_0x315140,_0x127326){_0x127326=_0x127326||0xcc;return function(_0xa8cce4){if(_0xa8cce4){return _0x315140[_0xf5f7('0x18')](_0x127326);}return _0x315140[_0xf5f7('0x19')](_0x127326)[_0xf5f7('0x1a')]();};}function respondWithResult(_0xb91357,_0x13d5f1){_0x13d5f1=_0x13d5f1||0xc8;return function(_0x248b44){if(_0x248b44){return _0xb91357[_0xf5f7('0x19')](_0x13d5f1)[_0xf5f7('0x1b')](_0x248b44);}};}function respondWithFilteredResult(_0x3787ca,_0x4a0e55){return function(_0x2d4d55){if(_0x2d4d55){var _0x42d728=typeof _0x4a0e55[_0xf5f7('0x1c')]===_0xf5f7('0x1d')&&typeof _0x4a0e55[_0xf5f7('0x1e')]===_0xf5f7('0x1d');var _0x4605a1=_0x2d4d55[_0xf5f7('0x1f')];var _0x1d7e31=_0x42d728?0x0:_0x4a0e55['offset'];var _0x5c2b27=_0x42d728?_0x2d4d55[_0xf5f7('0x1f')]:_0x4a0e55[_0xf5f7('0x1c')]+_0x4a0e55[_0xf5f7('0x1e')];var _0xb51fa1;if(_0x5c2b27>=_0x4605a1){_0x5c2b27=_0x4605a1;_0xb51fa1=0xc8;}else{_0xb51fa1=0xce;}_0x3787ca[_0xf5f7('0x19')](_0xb51fa1);return _0x3787ca[_0xf5f7('0x20')](_0xf5f7('0x21'),_0x1d7e31+'-'+_0x5c2b27+'/'+_0x4605a1)[_0xf5f7('0x1b')](_0x2d4d55);}return null;};}function patchUpdates(_0x40e1fd){return function(_0x1304f6){try{jsonpatch[_0xf5f7('0x22')](_0x1304f6,_0x40e1fd,!![]);}catch(_0x52725b){return BPromise[_0xf5f7('0x23')](_0x52725b);}return _0x1304f6[_0xf5f7('0x24')]();};}function saveUpdates(_0x3aaa10,_0x4c184a){return function(_0x4270db){if(_0x4270db){return _0x4270db[_0xf5f7('0x25')](_0x3aaa10)[_0xf5f7('0x26')](function(_0x3f6230){return _0x3f6230;});}return null;};}function removeEntity(_0x2bac18,_0x41849a){return function(_0x28874f){if(_0x28874f){return _0x28874f[_0xf5f7('0x27')]()['then'](function(){_0x2bac18[_0xf5f7('0x19')](0xcc)[_0xf5f7('0x1a')]();});}};}function handleEntityNotFound(_0x4164c7,_0x20826e){return function(_0x47fe70){if(!_0x47fe70){_0x4164c7['sendStatus'](0x194);}return _0x47fe70;};}function handleError(_0x52d726,_0x5642fc){_0x5642fc=_0x5642fc||0x1f4;return function(_0x597683){logger[_0xf5f7('0x28')](_0x597683['stack']);if(_0x597683[_0xf5f7('0x29')]){delete _0x597683[_0xf5f7('0x29')];}_0x52d726[_0xf5f7('0x19')](_0x5642fc)['send'](_0x597683);};}exports[_0xf5f7('0x2a')]=function(_0x493358,_0x2e29f6){var _0xe47f81={},_0x85998d={},_0x4a08f7={'count':0x0,'rows':[]};var _0x48167f=_[_0xf5f7('0x2b')](db['VoiceMailMessage']['rawAttributes'],function(_0x2c5d66){return{'name':_0x2c5d66[_0xf5f7('0x2c')],'type':_0x2c5d66[_0xf5f7('0x2d')][_0xf5f7('0x2e')]};});_0x85998d[_0xf5f7('0x2f')]=_['differenceBy'](_[_0xf5f7('0x2b')](_0x48167f,'name'),[_0xf5f7('0x29')]);_0x85998d['query']=_['keys'](_0x493358[_0xf5f7('0x30')]);_0x85998d[_0xf5f7('0x31')]=_[_0xf5f7('0x32')](_0x85998d[_0xf5f7('0x2f')],_0x85998d[_0xf5f7('0x30')]);_0xe47f81[_0xf5f7('0x33')]=_[_0xf5f7('0x32')](_0x85998d['model'],qs[_0xf5f7('0x34')](_0x493358[_0xf5f7('0x30')][_0xf5f7('0x34')]));_0xe47f81['attributes']=_0xe47f81[_0xf5f7('0x33')][_0xf5f7('0x35')]?_0xe47f81[_0xf5f7('0x33')]:_0x85998d['model'];if(!_0x493358['query'][_0xf5f7('0x36')]('nolimit')){_0xe47f81[_0xf5f7('0x1e')]=qs[_0xf5f7('0x1e')](_0x493358['query'][_0xf5f7('0x1e')]);_0xe47f81[_0xf5f7('0x1c')]=qs[_0xf5f7('0x1c')](_0x493358[_0xf5f7('0x30')][_0xf5f7('0x1c')]);}_0xe47f81[_0xf5f7('0x37')]=qs[_0xf5f7('0x38')](_0x493358[_0xf5f7('0x30')][_0xf5f7('0x38')]);_0xe47f81[_0xf5f7('0x39')]=qs[_0xf5f7('0x31')](_['pick'](_0x493358[_0xf5f7('0x30')],_0x85998d[_0xf5f7('0x31')]),_0x48167f);if(_0x493358['query'][_0xf5f7('0x3a')]){_0xe47f81[_0xf5f7('0x39')]=_[_0xf5f7('0x3b')](_0xe47f81['where'],{'$or':_['map'](_0x48167f,function(_0x2dead7){if(_0x2dead7[_0xf5f7('0x2d')]!==_0xf5f7('0x3c')){var _0x19b3a5={};_0x19b3a5[_0x2dead7['name']]={'$like':'%'+_0x493358[_0xf5f7('0x30')][_0xf5f7('0x3a')]+'%'};return _0x19b3a5;}})});}_0xe47f81=_[_0xf5f7('0x3b')]({},_0xe47f81,_0x493358[_0xf5f7('0x3d')]);var _0x38f15d={'where':_0xe47f81[_0xf5f7('0x39')]};return db['VoiceMailMessage'][_0xf5f7('0x1f')](_0x38f15d)[_0xf5f7('0x26')](function(_0xed56ed){_0x4a08f7[_0xf5f7('0x1f')]=_0xed56ed;if(_0x493358[_0xf5f7('0x30')]['includeAll']){_0xe47f81[_0xf5f7('0x3e')]=[{'all':!![]}];}return db['VoiceMailMessage'][_0xf5f7('0x3f')](_0xe47f81);})[_0xf5f7('0x26')](function(_0x3f126e){_0x4a08f7['rows']=_0x3f126e;return _0x4a08f7;})[_0xf5f7('0x26')](respondWithFilteredResult(_0x2e29f6,_0xe47f81))['catch'](handleError(_0x2e29f6,null));};exports[_0xf5f7('0x40')]=function(_0x5beb2d,_0x56a8c8){var _0x5c056e={'raw':!![],'where':{'id':_0x5beb2d['params']['id']}},_0x29a7f9={};_0x29a7f9[_0xf5f7('0x2f')]=_['keys'](db[_0xf5f7('0x41')][_0xf5f7('0x42')]);_0x29a7f9[_0xf5f7('0x30')]=_[_0xf5f7('0x43')](_0x5beb2d[_0xf5f7('0x30')]);_0x29a7f9[_0xf5f7('0x31')]=_[_0xf5f7('0x32')](_0x29a7f9[_0xf5f7('0x2f')],_0x29a7f9[_0xf5f7('0x30')]);_0x5c056e[_0xf5f7('0x33')]=_[_0xf5f7('0x32')](_0x29a7f9[_0xf5f7('0x2f')],qs[_0xf5f7('0x34')](_0x5beb2d[_0xf5f7('0x30')][_0xf5f7('0x34')]));_0x5c056e[_0xf5f7('0x33')]=_0x5c056e[_0xf5f7('0x33')][_0xf5f7('0x35')]?_0x5c056e[_0xf5f7('0x33')]:_0x29a7f9[_0xf5f7('0x2f')];if(_0x5beb2d[_0xf5f7('0x30')]['includeAll']){_0x5c056e[_0xf5f7('0x3e')]=[{'all':!![]}];}_0x5c056e=_[_0xf5f7('0x3b')]({},_0x5c056e,_0x5beb2d[_0xf5f7('0x3d')]);return db['VoiceMailMessage']['find'](_0x5c056e)[_0xf5f7('0x26')](handleEntityNotFound(_0x56a8c8,null))[_0xf5f7('0x26')](respondWithResult(_0x56a8c8,null))[_0xf5f7('0x44')](handleError(_0x56a8c8,null));};exports['create']=function(_0x31ee75,_0x4112f2){return db[_0xf5f7('0x41')]['create'](_0x31ee75[_0xf5f7('0x45')],{})[_0xf5f7('0x26')](respondWithResult(_0x4112f2,0xc9))['catch'](handleError(_0x4112f2,null));};exports[_0xf5f7('0x25')]=function(_0x4dd72e,_0x544ea2){if(_0x4dd72e[_0xf5f7('0x45')]['id']){delete _0x4dd72e['body']['id'];}return db[_0xf5f7('0x41')]['find']({'where':{'id':_0x4dd72e['params']['id']}})['then'](handleEntityNotFound(_0x544ea2,null))['then'](saveUpdates(_0x4dd72e['body'],null))[_0xf5f7('0x26')](respondWithResult(_0x544ea2,null))['catch'](handleError(_0x544ea2,null));};exports['destroy']=function(_0x408338,_0x2cddbf){return db[_0xf5f7('0x41')][_0xf5f7('0x46')]({'where':{'id':_0x408338[_0xf5f7('0x47')]['id']}})[_0xf5f7('0x26')](handleEntityNotFound(_0x2cddbf,null))[_0xf5f7('0x26')](removeEntity(_0x2cddbf,null))[_0xf5f7('0x44')](handleError(_0x2cddbf,null));};exports[_0xf5f7('0x48')]=function(_0x108d4b,_0x4eb431,_0xb45bcd){return db[_0xf5f7('0x41')][_0xf5f7('0x46')]({'where':{'id':_0x108d4b[_0xf5f7('0x47')]['id']},'attributes':['id','recording',_0xf5f7('0x49')]})['then'](handleEntityNotFound(_0x4eb431,null))['then'](function(_0x93899a){if(_0x93899a){if(!_0x93899a[_0xf5f7('0x4a')]){throw new db['Sequelize'][(_0xf5f7('0x4b'))](_0xf5f7('0x4c'));}var _0x54c96c={'Content-Type':'audio/wav','Content-Disposition':'attachment'};if(_0x93899a[_0xf5f7('0x49')]){_0x54c96c[_0xf5f7('0x4d')]=_0xf5f7('0x4e')+_0x93899a['msg_id']+'.wav\x22';}_0x4eb431[_0xf5f7('0x20')](_0x54c96c);return _0x4eb431['send'](new Buffer(_0x93899a['recording']));}})[_0xf5f7('0x44')](handleError(_0x4eb431,null));};
\ No newline at end of file