Built motion from commit d5e4af8c.|2.6.23
[motion2.git] / server / api / voiceMailMessage / voiceMailMessage.controller.js
index c9999a2..a4ddd58 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb5ef=['json','undefined','limit','count','offset','set','Content-Range','apply','reject','save','update','then','destroy','sendStatus','error','stack','send','index','map','VoiceMailMessage','fieldName','type','differenceBy','name','query','keys','filters','intersection','model','fields','attributes','length','hasOwnProperty','order','sort','where','pick','filter','VIRTUAL','merge','options','findAll','rows','show','params','rawAttributes','include','find','catch','create','body','recording','Sequelize','ValidationError','VoiceMailMessage\x20not\x20found','attachment','msg_id','attachment;\x20filename=\x22','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','util','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','to-csv','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','status','end'];(function(_0x40a045,_0x516f0e){var _0x1a687c=function(_0x48c9fe){while(--_0x48c9fe){_0x40a045['push'](_0x40a045['shift']());}};_0x1a687c(++_0x516f0e);}(_0xb5ef,0x18e));var _0xfb5e=function(_0x3a07c4,_0x13ab5e){_0x3a07c4=_0x3a07c4-0x0;var _0x59a7fd=_0xb5ef[_0x3a07c4];return _0x59a7fd;};'use strict';var emlformat=require(_0xfb5e('0x0'));var rimraf=require(_0xfb5e('0x1'));var zipdir=require(_0xfb5e('0x2'));var jsonpatch=require(_0xfb5e('0x3'));var rp=require('request-promise');var moment=require(_0xfb5e('0x4'));var BPromise=require(_0xfb5e('0x5'));var Mustache=require('mustache');var util=require(_0xfb5e('0x6'));var path=require(_0xfb5e('0x7'));var sox=require(_0xfb5e('0x8'));var csv=require('to-csv');var ejs=require(_0xfb5e('0x9'));var fs=require('fs');var fs_extra=require(_0xfb5e('0xa'));var _=require(_0xfb5e('0xb'));var squel=require(_0xfb5e('0xc'));var crypto=require(_0xfb5e('0xd'));var jsforce=require(_0xfb5e('0xe'));var deskjs=require('desk.js');var toCsv=require(_0xfb5e('0xf'));var querystring=require(_0xfb5e('0x10'));var Papa=require('papaparse');var Redis=require(_0xfb5e('0x11'));var authService=require('../../components/auth/service');var qs=require(_0xfb5e('0x12'));var as=require(_0xfb5e('0x13'));var hardwareService=require(_0xfb5e('0x14'));var logger=require(_0xfb5e('0x15'))(_0xfb5e('0x16'));var utils=require(_0xfb5e('0x17'));var config=require(_0xfb5e('0x18'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x39f36b,_0x307c52){_0x307c52=_0x307c52||0xcc;return function(_0x3d9ac6){if(_0x3d9ac6){return _0x39f36b['sendStatus'](_0x307c52);}return _0x39f36b[_0xfb5e('0x19')](_0x307c52)[_0xfb5e('0x1a')]();};}function respondWithResult(_0x1c1d98,_0x1a9840){_0x1a9840=_0x1a9840||0xc8;return function(_0xd10351){if(_0xd10351){return _0x1c1d98[_0xfb5e('0x19')](_0x1a9840)[_0xfb5e('0x1b')](_0xd10351);}};}function respondWithFilteredResult(_0x145d98,_0x24acd8){return function(_0x58f6f3){if(_0x58f6f3){var _0x1b898d=typeof _0x24acd8['offset']===_0xfb5e('0x1c')&&typeof _0x24acd8[_0xfb5e('0x1d')]==='undefined';var _0x4db6f9=_0x58f6f3[_0xfb5e('0x1e')];var _0x384926=_0x1b898d?0x0:_0x24acd8[_0xfb5e('0x1f')];var _0x583f48=_0x1b898d?_0x58f6f3[_0xfb5e('0x1e')]:_0x24acd8[_0xfb5e('0x1f')]+_0x24acd8[_0xfb5e('0x1d')];var _0x4a688d;if(_0x583f48>=_0x4db6f9){_0x583f48=_0x4db6f9;_0x4a688d=0xc8;}else{_0x4a688d=0xce;}_0x145d98[_0xfb5e('0x19')](_0x4a688d);return _0x145d98[_0xfb5e('0x20')](_0xfb5e('0x21'),_0x384926+'-'+_0x583f48+'/'+_0x4db6f9)['json'](_0x58f6f3);}return null;};}function patchUpdates(_0x187458){return function(_0x457ab8){try{jsonpatch[_0xfb5e('0x22')](_0x457ab8,_0x187458,!![]);}catch(_0x1b49fd){return BPromise[_0xfb5e('0x23')](_0x1b49fd);}return _0x457ab8[_0xfb5e('0x24')]();};}function saveUpdates(_0x39faf4,_0x3a1084){return function(_0x249b16){if(_0x249b16){return _0x249b16[_0xfb5e('0x25')](_0x39faf4)[_0xfb5e('0x26')](function(_0x364dea){return _0x364dea;});}return null;};}function removeEntity(_0x102d68,_0x1ebc63){return function(_0x300f9f){if(_0x300f9f){return _0x300f9f[_0xfb5e('0x27')]()[_0xfb5e('0x26')](function(){_0x102d68[_0xfb5e('0x19')](0xcc)[_0xfb5e('0x1a')]();});}};}function handleEntityNotFound(_0x44cc62,_0x2abcc2){return function(_0x286fc6){if(!_0x286fc6){_0x44cc62[_0xfb5e('0x28')](0x194);}return _0x286fc6;};}function handleError(_0x1e73f0,_0x2978e8){_0x2978e8=_0x2978e8||0x1f4;return function(_0x15b1b9){logger[_0xfb5e('0x29')](_0x15b1b9[_0xfb5e('0x2a')]);if(_0x15b1b9['name']){delete _0x15b1b9['name'];}_0x1e73f0[_0xfb5e('0x19')](_0x2978e8)[_0xfb5e('0x2b')](_0x15b1b9);};}exports[_0xfb5e('0x2c')]=function(_0x59475a,_0x559aee){var _0x36550d={},_0x581148={},_0x34aeec={'count':0x0,'rows':[]};var _0x4a4ffa=_[_0xfb5e('0x2d')](db[_0xfb5e('0x2e')]['rawAttributes'],function(_0x559420){return{'name':_0x559420[_0xfb5e('0x2f')],'type':_0x559420[_0xfb5e('0x30')]['key']};});_0x581148['model']=_[_0xfb5e('0x31')](_[_0xfb5e('0x2d')](_0x4a4ffa,_0xfb5e('0x32')),[_0xfb5e('0x32')]);_0x581148[_0xfb5e('0x33')]=_[_0xfb5e('0x34')](_0x59475a[_0xfb5e('0x33')]);_0x581148[_0xfb5e('0x35')]=_[_0xfb5e('0x36')](_0x581148[_0xfb5e('0x37')],_0x581148[_0xfb5e('0x33')]);_0x36550d['attributes']=_['intersection'](_0x581148[_0xfb5e('0x37')],qs['fields'](_0x59475a[_0xfb5e('0x33')][_0xfb5e('0x38')]));_0x36550d[_0xfb5e('0x39')]=_0x36550d['attributes'][_0xfb5e('0x3a')]?_0x36550d[_0xfb5e('0x39')]:_0x581148[_0xfb5e('0x37')];if(!_0x59475a[_0xfb5e('0x33')][_0xfb5e('0x3b')]('nolimit')){_0x36550d[_0xfb5e('0x1d')]=qs[_0xfb5e('0x1d')](_0x59475a[_0xfb5e('0x33')]['limit']);_0x36550d['offset']=qs[_0xfb5e('0x1f')](_0x59475a['query'][_0xfb5e('0x1f')]);}_0x36550d[_0xfb5e('0x3c')]=qs[_0xfb5e('0x3d')](_0x59475a['query']['sort']);_0x36550d[_0xfb5e('0x3e')]=qs['filters'](_[_0xfb5e('0x3f')](_0x59475a[_0xfb5e('0x33')],_0x581148[_0xfb5e('0x35')]),_0x4a4ffa);if(_0x59475a[_0xfb5e('0x33')][_0xfb5e('0x40')]){_0x36550d[_0xfb5e('0x3e')]=_['merge'](_0x36550d[_0xfb5e('0x3e')],{'$or':_[_0xfb5e('0x2d')](_0x4a4ffa,function(_0x5e75fe){if(_0x5e75fe['type']!==_0xfb5e('0x41')){var _0x5bad30={};_0x5bad30[_0x5e75fe[_0xfb5e('0x32')]]={'$like':'%'+_0x59475a['query'][_0xfb5e('0x40')]+'%'};return _0x5bad30;}})});}_0x36550d=_[_0xfb5e('0x42')]({},_0x36550d,_0x59475a[_0xfb5e('0x43')]);var _0x2ea4ff={'where':_0x36550d[_0xfb5e('0x3e')]};return db['VoiceMailMessage']['count'](_0x2ea4ff)[_0xfb5e('0x26')](function(_0x10fa5d){_0x34aeec[_0xfb5e('0x1e')]=_0x10fa5d;if(_0x59475a['query']['includeAll']){_0x36550d['include']=[{'all':!![]}];}return db[_0xfb5e('0x2e')][_0xfb5e('0x44')](_0x36550d);})['then'](function(_0x287e7e){_0x34aeec[_0xfb5e('0x45')]=_0x287e7e;return _0x34aeec;})['then'](respondWithFilteredResult(_0x559aee,_0x36550d))['catch'](handleError(_0x559aee,null));};exports[_0xfb5e('0x46')]=function(_0x47bf24,_0x3256f8){var _0x29bc50={'raw':!![],'where':{'id':_0x47bf24[_0xfb5e('0x47')]['id']}},_0x2cd6c4={};_0x2cd6c4[_0xfb5e('0x37')]=_['keys'](db[_0xfb5e('0x2e')][_0xfb5e('0x48')]);_0x2cd6c4[_0xfb5e('0x33')]=_[_0xfb5e('0x34')](_0x47bf24[_0xfb5e('0x33')]);_0x2cd6c4[_0xfb5e('0x35')]=_[_0xfb5e('0x36')](_0x2cd6c4[_0xfb5e('0x37')],_0x2cd6c4[_0xfb5e('0x33')]);_0x29bc50['attributes']=_[_0xfb5e('0x36')](_0x2cd6c4[_0xfb5e('0x37')],qs[_0xfb5e('0x38')](_0x47bf24[_0xfb5e('0x33')]['fields']));_0x29bc50[_0xfb5e('0x39')]=_0x29bc50[_0xfb5e('0x39')]['length']?_0x29bc50['attributes']:_0x2cd6c4[_0xfb5e('0x37')];if(_0x47bf24[_0xfb5e('0x33')]['includeAll']){_0x29bc50[_0xfb5e('0x49')]=[{'all':!![]}];}_0x29bc50=_[_0xfb5e('0x42')]({},_0x29bc50,_0x47bf24[_0xfb5e('0x43')]);return db[_0xfb5e('0x2e')][_0xfb5e('0x4a')](_0x29bc50)[_0xfb5e('0x26')](handleEntityNotFound(_0x3256f8,null))[_0xfb5e('0x26')](respondWithResult(_0x3256f8,null))[_0xfb5e('0x4b')](handleError(_0x3256f8,null));};exports[_0xfb5e('0x4c')]=function(_0x2dbb75,_0x21b94a){return db['VoiceMailMessage'][_0xfb5e('0x4c')](_0x2dbb75['body'],{})[_0xfb5e('0x26')](respondWithResult(_0x21b94a,0xc9))[_0xfb5e('0x4b')](handleError(_0x21b94a,null));};exports[_0xfb5e('0x25')]=function(_0x484146,_0x138ef1){if(_0x484146[_0xfb5e('0x4d')]['id']){delete _0x484146['body']['id'];}return db[_0xfb5e('0x2e')][_0xfb5e('0x4a')]({'where':{'id':_0x484146[_0xfb5e('0x47')]['id']}})[_0xfb5e('0x26')](handleEntityNotFound(_0x138ef1,null))['then'](saveUpdates(_0x484146[_0xfb5e('0x4d')],null))[_0xfb5e('0x26')](respondWithResult(_0x138ef1,null))[_0xfb5e('0x4b')](handleError(_0x138ef1,null));};exports[_0xfb5e('0x27')]=function(_0x3f4f1c,_0x5e0348){return db[_0xfb5e('0x2e')][_0xfb5e('0x4a')]({'where':{'id':_0x3f4f1c[_0xfb5e('0x47')]['id']}})[_0xfb5e('0x26')](handleEntityNotFound(_0x5e0348,null))[_0xfb5e('0x26')](removeEntity(_0x5e0348,null))[_0xfb5e('0x4b')](handleError(_0x5e0348,null));};exports['download']=function(_0x50377d,_0x51886b,_0xfbeb70){return db[_0xfb5e('0x2e')][_0xfb5e('0x4a')]({'where':{'id':_0x50377d['params']['id']},'attributes':['id',_0xfb5e('0x4e'),'msg_id']})['then'](handleEntityNotFound(_0x51886b,null))[_0xfb5e('0x26')](function(_0x5e8c33){if(_0x5e8c33){if(!_0x5e8c33[_0xfb5e('0x4e')]){throw new db[(_0xfb5e('0x4f'))][(_0xfb5e('0x50'))](_0xfb5e('0x51'));}var _0x5bbd5b={'Content-Type':'audio/wav','Content-Disposition':_0xfb5e('0x52')};if(_0x5e8c33[_0xfb5e('0x53')]){_0x5bbd5b['Content-Disposition']=_0xfb5e('0x54')+_0x5e8c33['msg_id']+'.wav\x22';}_0x51886b['set'](_0x5bbd5b);return _0x51886b[_0xfb5e('0x2b')](new Buffer(_0x5e8c33['recording']));}})[_0xfb5e('0x4b')](handleError(_0x51886b,null));};
\ No newline at end of file
+var _0xa258=['ValidationError','VoiceMailMessage\x20not\x20found','attachment','msg_id','Content-Disposition','attachment;\x20filename=\x22','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','sox','ejs','fs-extra','lodash','crypto','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','json','limit','count','offset','set','Content-Range','apply','reject','update','destroy','then','error','stack','name','map','VoiceMailMessage','rawAttributes','fieldName','type','model','differenceBy','query','keys','attributes','intersection','fields','nolimit','sort','where','pick','filters','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','create','body','find','download','recording','Sequelize'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xa258,0x146));var _0x8a25=function(_0xe8b463,_0x129158){_0xe8b463=_0xe8b463-0x0;var _0x24141b=_0xa258[_0xe8b463];return _0x24141b;};'use strict';var emlformat=require(_0x8a25('0x0'));var rimraf=require(_0x8a25('0x1'));var zipdir=require(_0x8a25('0x2'));var jsonpatch=require(_0x8a25('0x3'));var rp=require(_0x8a25('0x4'));var moment=require(_0x8a25('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x8a25('0x6'));var util=require(_0x8a25('0x7'));var path=require('path');var sox=require(_0x8a25('0x8'));var csv=require('to-csv');var ejs=require(_0x8a25('0x9'));var fs=require('fs');var fs_extra=require(_0x8a25('0xa'));var _=require(_0x8a25('0xb'));var squel=require('squel');var crypto=require(_0x8a25('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x8a25('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x8a25('0xe'));var Redis=require('ioredis');var authService=require(_0x8a25('0xf'));var qs=require(_0x8a25('0x10'));var as=require(_0x8a25('0x11'));var hardwareService=require(_0x8a25('0x12'));var logger=require('../../config/logger')(_0x8a25('0x13'));var utils=require(_0x8a25('0x14'));var config=require(_0x8a25('0x15'));var licenseUtil=require(_0x8a25('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x499495,_0x74d796){_0x74d796=_0x74d796||0xcc;return function(_0x558ffa){if(_0x558ffa){return _0x499495[_0x8a25('0x17')](_0x74d796);}return _0x499495[_0x8a25('0x18')](_0x74d796)[_0x8a25('0x19')]();};}function respondWithResult(_0x561a3d,_0x11403f){_0x11403f=_0x11403f||0xc8;return function(_0xef5fd1){if(_0xef5fd1){return _0x561a3d[_0x8a25('0x18')](_0x11403f)[_0x8a25('0x1a')](_0xef5fd1);}};}function respondWithFilteredResult(_0x3d60b8,_0x48bf73){return function(_0x53c2dd){if(_0x53c2dd){var _0x353de7=typeof _0x48bf73['offset']==='undefined'&&typeof _0x48bf73[_0x8a25('0x1b')]==='undefined';var _0x3bc440=_0x53c2dd[_0x8a25('0x1c')];var _0x29e956=_0x353de7?0x0:_0x48bf73[_0x8a25('0x1d')];var _0x343bc4=_0x353de7?_0x53c2dd[_0x8a25('0x1c')]:_0x48bf73[_0x8a25('0x1d')]+_0x48bf73[_0x8a25('0x1b')];var _0x29db74;if(_0x343bc4>=_0x3bc440){_0x343bc4=_0x3bc440;_0x29db74=0xc8;}else{_0x29db74=0xce;}_0x3d60b8[_0x8a25('0x18')](_0x29db74);return _0x3d60b8[_0x8a25('0x1e')](_0x8a25('0x1f'),_0x29e956+'-'+_0x343bc4+'/'+_0x3bc440)[_0x8a25('0x1a')](_0x53c2dd);}return null;};}function patchUpdates(_0x21b992){return function(_0x3914c0){try{jsonpatch[_0x8a25('0x20')](_0x3914c0,_0x21b992,!![]);}catch(_0x2bdbad){return BPromise[_0x8a25('0x21')](_0x2bdbad);}return _0x3914c0['save']();};}function saveUpdates(_0x26f161,_0x492910){return function(_0x15857a){if(_0x15857a){return _0x15857a[_0x8a25('0x22')](_0x26f161)['then'](function(_0x3b1b45){return _0x3b1b45;});}return null;};}function removeEntity(_0x1ce857,_0x3dc48e){return function(_0x4cfaea){if(_0x4cfaea){return _0x4cfaea[_0x8a25('0x23')]()[_0x8a25('0x24')](function(){_0x1ce857[_0x8a25('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5efe23,_0x86e851){return function(_0xf6c985){if(!_0xf6c985){_0x5efe23[_0x8a25('0x17')](0x194);}return _0xf6c985;};}function handleError(_0xebf26,_0xb26098){_0xb26098=_0xb26098||0x1f4;return function(_0x226be2){logger[_0x8a25('0x25')](_0x226be2[_0x8a25('0x26')]);if(_0x226be2['name']){delete _0x226be2[_0x8a25('0x27')];}_0xebf26[_0x8a25('0x18')](_0xb26098)['send'](_0x226be2);};}exports['index']=function(_0x204ba5,_0x53b56a){var _0x4f4e23={},_0x38019e={},_0x2514e3={'count':0x0,'rows':[]};var _0x64876b=_[_0x8a25('0x28')](db[_0x8a25('0x29')][_0x8a25('0x2a')],function(_0x51b369){return{'name':_0x51b369[_0x8a25('0x2b')],'type':_0x51b369[_0x8a25('0x2c')]['key']};});_0x38019e[_0x8a25('0x2d')]=_[_0x8a25('0x2e')](_[_0x8a25('0x28')](_0x64876b,_0x8a25('0x27')),[_0x8a25('0x27')]);_0x38019e[_0x8a25('0x2f')]=_[_0x8a25('0x30')](_0x204ba5[_0x8a25('0x2f')]);_0x38019e['filters']=_['intersection'](_0x38019e['model'],_0x38019e['query']);_0x4f4e23[_0x8a25('0x31')]=_[_0x8a25('0x32')](_0x38019e[_0x8a25('0x2d')],qs[_0x8a25('0x33')](_0x204ba5[_0x8a25('0x2f')]['fields']));_0x4f4e23['attributes']=_0x4f4e23[_0x8a25('0x31')]['length']?_0x4f4e23[_0x8a25('0x31')]:_0x38019e[_0x8a25('0x2d')];if(!_0x204ba5[_0x8a25('0x2f')]['hasOwnProperty'](_0x8a25('0x34'))){_0x4f4e23[_0x8a25('0x1b')]=qs['limit'](_0x204ba5[_0x8a25('0x2f')][_0x8a25('0x1b')]);_0x4f4e23[_0x8a25('0x1d')]=qs[_0x8a25('0x1d')](_0x204ba5[_0x8a25('0x2f')][_0x8a25('0x1d')]);}_0x4f4e23['order']=qs['sort'](_0x204ba5['query'][_0x8a25('0x35')]);_0x4f4e23[_0x8a25('0x36')]=qs['filters'](_[_0x8a25('0x37')](_0x204ba5[_0x8a25('0x2f')],_0x38019e[_0x8a25('0x38')]),_0x64876b);if(_0x204ba5[_0x8a25('0x2f')][_0x8a25('0x39')]){_0x4f4e23['where']=_[_0x8a25('0x3a')](_0x4f4e23[_0x8a25('0x36')],{'$or':_[_0x8a25('0x28')](_0x64876b,function(_0x53f6d1){if(_0x53f6d1[_0x8a25('0x2c')]!==_0x8a25('0x3b')){var _0x5363bb={};_0x5363bb[_0x53f6d1[_0x8a25('0x27')]]={'$like':'%'+_0x204ba5[_0x8a25('0x2f')][_0x8a25('0x39')]+'%'};return _0x5363bb;}})});}_0x4f4e23=_['merge']({},_0x4f4e23,_0x204ba5[_0x8a25('0x3c')]);var _0x377873={'where':_0x4f4e23[_0x8a25('0x36')]};return db[_0x8a25('0x29')][_0x8a25('0x1c')](_0x377873)[_0x8a25('0x24')](function(_0x38b4fa){_0x2514e3['count']=_0x38b4fa;if(_0x204ba5[_0x8a25('0x2f')][_0x8a25('0x3d')]){_0x4f4e23[_0x8a25('0x3e')]=[{'all':!![]}];}return db[_0x8a25('0x29')][_0x8a25('0x3f')](_0x4f4e23);})[_0x8a25('0x24')](function(_0x1b21fa){_0x2514e3[_0x8a25('0x40')]=_0x1b21fa;return _0x2514e3;})[_0x8a25('0x24')](respondWithFilteredResult(_0x53b56a,_0x4f4e23))[_0x8a25('0x41')](handleError(_0x53b56a,null));};exports[_0x8a25('0x42')]=function(_0xe49f28,_0x594f0e){var _0x1017d1={'raw':!![],'where':{'id':_0xe49f28[_0x8a25('0x43')]['id']}},_0x50c7a4={};_0x50c7a4['model']=_['keys'](db[_0x8a25('0x29')][_0x8a25('0x2a')]);_0x50c7a4['query']=_[_0x8a25('0x30')](_0xe49f28[_0x8a25('0x2f')]);_0x50c7a4['filters']=_[_0x8a25('0x32')](_0x50c7a4['model'],_0x50c7a4[_0x8a25('0x2f')]);_0x1017d1[_0x8a25('0x31')]=_[_0x8a25('0x32')](_0x50c7a4[_0x8a25('0x2d')],qs[_0x8a25('0x33')](_0xe49f28[_0x8a25('0x2f')][_0x8a25('0x33')]));_0x1017d1[_0x8a25('0x31')]=_0x1017d1[_0x8a25('0x31')]['length']?_0x1017d1[_0x8a25('0x31')]:_0x50c7a4[_0x8a25('0x2d')];if(_0xe49f28['query']['includeAll']){_0x1017d1[_0x8a25('0x3e')]=[{'all':!![]}];}_0x1017d1=_[_0x8a25('0x3a')]({},_0x1017d1,_0xe49f28['options']);return db['VoiceMailMessage']['find'](_0x1017d1)[_0x8a25('0x24')](handleEntityNotFound(_0x594f0e,null))[_0x8a25('0x24')](respondWithResult(_0x594f0e,null))['catch'](handleError(_0x594f0e,null));};exports['create']=function(_0x25eb0a,_0x2fba66){return db[_0x8a25('0x29')][_0x8a25('0x44')](_0x25eb0a[_0x8a25('0x45')],{})[_0x8a25('0x24')](respondWithResult(_0x2fba66,0xc9))[_0x8a25('0x41')](handleError(_0x2fba66,null));};exports[_0x8a25('0x22')]=function(_0x702bba,_0x3b04c4){if(_0x702bba[_0x8a25('0x45')]['id']){delete _0x702bba[_0x8a25('0x45')]['id'];}return db['VoiceMailMessage'][_0x8a25('0x46')]({'where':{'id':_0x702bba['params']['id']}})[_0x8a25('0x24')](handleEntityNotFound(_0x3b04c4,null))[_0x8a25('0x24')](saveUpdates(_0x702bba[_0x8a25('0x45')],null))[_0x8a25('0x24')](respondWithResult(_0x3b04c4,null))['catch'](handleError(_0x3b04c4,null));};exports['destroy']=function(_0x4b63cc,_0x4fad62){return db[_0x8a25('0x29')][_0x8a25('0x46')]({'where':{'id':_0x4b63cc['params']['id']}})[_0x8a25('0x24')](handleEntityNotFound(_0x4fad62,null))[_0x8a25('0x24')](removeEntity(_0x4fad62,null))[_0x8a25('0x41')](handleError(_0x4fad62,null));};exports[_0x8a25('0x47')]=function(_0x9c8508,_0x4bc220,_0x14ea7a){return db[_0x8a25('0x29')][_0x8a25('0x46')]({'where':{'id':_0x9c8508[_0x8a25('0x43')]['id']},'attributes':['id',_0x8a25('0x48'),'msg_id']})[_0x8a25('0x24')](handleEntityNotFound(_0x4bc220,null))[_0x8a25('0x24')](function(_0x272339){if(_0x272339){if(!_0x272339['recording']){throw new db[(_0x8a25('0x49'))][(_0x8a25('0x4a'))](_0x8a25('0x4b'));}var _0x1ea8b3={'Content-Type':'audio/wav','Content-Disposition':_0x8a25('0x4c')};if(_0x272339[_0x8a25('0x4d')]){_0x1ea8b3[_0x8a25('0x4e')]=_0x8a25('0x4f')+_0x272339[_0x8a25('0x4d')]+'.wav\x22';}_0x4bc220[_0x8a25('0x1e')](_0x1ea8b3);return _0x4bc220['send'](new Buffer(_0x272339[_0x8a25('0x48')]));}})[_0x8a25('0x41')](handleError(_0x4bc220,null));};
\ No newline at end of file