Built motion from commit b5413ace.|2.6.9
[motion2.git] / server / api / voiceMailMessage / voiceMailMessage.controller.js
index c9999a2..401988f 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 _0xac82=['length','hasOwnProperty','order','sort','where','pick','filters','filter','merge','options','count','includeAll','findAll','rows','catch','show','params','include','find','create','body','destroy','recording','msg_id','VoiceMailMessage\x20not\x20found','audio/wav','attachment','Content-Disposition','attachment;\x20filename=\x22','send','eml-format','zip-dir','fast-json-patch','request-promise','bluebird','mustache','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','undefined','limit','offset','set','Content-Range','apply','save','update','then','error','stack','name','index','map','VoiceMailMessage','rawAttributes','fieldName','type','key','model','differenceBy','keys','attributes','intersection','fields','query'];(function(_0xf2253c,_0x41cbf8){var _0x182046=function(_0x2e51f8){while(--_0x2e51f8){_0xf2253c['push'](_0xf2253c['shift']());}};_0x182046(++_0x41cbf8);}(_0xac82,0x71));var _0x2ac8=function(_0x4ebf30,_0x137355){_0x4ebf30=_0x4ebf30-0x0;var _0x42ec5d=_0xac82[_0x4ebf30];return _0x42ec5d;};'use strict';var emlformat=require(_0x2ac8('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x2ac8('0x1'));var jsonpatch=require(_0x2ac8('0x2'));var rp=require(_0x2ac8('0x3'));var moment=require('moment');var BPromise=require(_0x2ac8('0x4'));var Mustache=require(_0x2ac8('0x5'));var util=require('util');var path=require('path');var sox=require(_0x2ac8('0x6'));var csv=require(_0x2ac8('0x7'));var ejs=require(_0x2ac8('0x8'));var fs=require('fs');var fs_extra=require(_0x2ac8('0x9'));var _=require(_0x2ac8('0xa'));var squel=require(_0x2ac8('0xb'));var crypto=require(_0x2ac8('0xc'));var jsforce=require(_0x2ac8('0xd'));var deskjs=require(_0x2ac8('0xe'));var toCsv=require(_0x2ac8('0x7'));var querystring=require('querystring');var Papa=require(_0x2ac8('0xf'));var Redis=require(_0x2ac8('0x10'));var authService=require(_0x2ac8('0x11'));var qs=require(_0x2ac8('0x12'));var as=require(_0x2ac8('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x2ac8('0x14'))('api');var utils=require(_0x2ac8('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x2ac8('0x16'));var db=require(_0x2ac8('0x17'))['db'];function respondWithStatusCode(_0x3c61a2,_0x5bf861){_0x5bf861=_0x5bf861||0xcc;return function(_0x484aca){if(_0x484aca){return _0x3c61a2[_0x2ac8('0x18')](_0x5bf861);}return _0x3c61a2[_0x2ac8('0x19')](_0x5bf861)[_0x2ac8('0x1a')]();};}function respondWithResult(_0x26934b,_0xbc1f04){_0xbc1f04=_0xbc1f04||0xc8;return function(_0x2d5e8d){if(_0x2d5e8d){return _0x26934b[_0x2ac8('0x19')](_0xbc1f04)['json'](_0x2d5e8d);}};}function respondWithFilteredResult(_0x45d08e,_0x5e9c31){return function(_0xb7c5e2){if(_0xb7c5e2){var _0xc9ff26=typeof _0x5e9c31['offset']===_0x2ac8('0x1b')&&typeof _0x5e9c31[_0x2ac8('0x1c')]===_0x2ac8('0x1b');var _0x508f14=_0xb7c5e2['count'];var _0x5d81df=_0xc9ff26?0x0:_0x5e9c31[_0x2ac8('0x1d')];var _0x48d22b=_0xc9ff26?_0xb7c5e2['count']:_0x5e9c31[_0x2ac8('0x1d')]+_0x5e9c31[_0x2ac8('0x1c')];var _0x30ee38;if(_0x48d22b>=_0x508f14){_0x48d22b=_0x508f14;_0x30ee38=0xc8;}else{_0x30ee38=0xce;}_0x45d08e[_0x2ac8('0x19')](_0x30ee38);return _0x45d08e[_0x2ac8('0x1e')](_0x2ac8('0x1f'),_0x5d81df+'-'+_0x48d22b+'/'+_0x508f14)['json'](_0xb7c5e2);}return null;};}function patchUpdates(_0x24a58b){return function(_0x14f940){try{jsonpatch[_0x2ac8('0x20')](_0x14f940,_0x24a58b,!![]);}catch(_0x2c4c5e){return BPromise['reject'](_0x2c4c5e);}return _0x14f940[_0x2ac8('0x21')]();};}function saveUpdates(_0xc6f022,_0x22e40e){return function(_0x5c3425){if(_0x5c3425){return _0x5c3425[_0x2ac8('0x22')](_0xc6f022)[_0x2ac8('0x23')](function(_0x14b517){return _0x14b517;});}return null;};}function removeEntity(_0x536428,_0x174701){return function(_0x3b51ae){if(_0x3b51ae){return _0x3b51ae['destroy']()[_0x2ac8('0x23')](function(){_0x536428[_0x2ac8('0x19')](0xcc)[_0x2ac8('0x1a')]();});}};}function handleEntityNotFound(_0xfa2620,_0x322b88){return function(_0x40fdf7){if(!_0x40fdf7){_0xfa2620['sendStatus'](0x194);}return _0x40fdf7;};}function handleError(_0x53f459,_0x572ce0){_0x572ce0=_0x572ce0||0x1f4;return function(_0x105aa7){logger[_0x2ac8('0x24')](_0x105aa7[_0x2ac8('0x25')]);if(_0x105aa7[_0x2ac8('0x26')]){delete _0x105aa7[_0x2ac8('0x26')];}_0x53f459[_0x2ac8('0x19')](_0x572ce0)['send'](_0x105aa7);};}exports[_0x2ac8('0x27')]=function(_0x2d7917,_0x2d352a){var _0x594fd0={},_0x8985cd={},_0x56563e={'count':0x0,'rows':[]};var _0xe81318=_[_0x2ac8('0x28')](db[_0x2ac8('0x29')][_0x2ac8('0x2a')],function(_0x1b915e){return{'name':_0x1b915e[_0x2ac8('0x2b')],'type':_0x1b915e[_0x2ac8('0x2c')][_0x2ac8('0x2d')]};});_0x8985cd[_0x2ac8('0x2e')]=_[_0x2ac8('0x2f')](_[_0x2ac8('0x28')](_0xe81318,_0x2ac8('0x26')),[_0x2ac8('0x26')]);_0x8985cd['query']=_[_0x2ac8('0x30')](_0x2d7917['query']);_0x8985cd['filters']=_['intersection'](_0x8985cd[_0x2ac8('0x2e')],_0x8985cd['query']);_0x594fd0[_0x2ac8('0x31')]=_[_0x2ac8('0x32')](_0x8985cd['model'],qs[_0x2ac8('0x33')](_0x2d7917[_0x2ac8('0x34')]['fields']));_0x594fd0[_0x2ac8('0x31')]=_0x594fd0['attributes'][_0x2ac8('0x35')]?_0x594fd0['attributes']:_0x8985cd[_0x2ac8('0x2e')];if(!_0x2d7917[_0x2ac8('0x34')][_0x2ac8('0x36')]('nolimit')){_0x594fd0[_0x2ac8('0x1c')]=qs[_0x2ac8('0x1c')](_0x2d7917['query'][_0x2ac8('0x1c')]);_0x594fd0[_0x2ac8('0x1d')]=qs[_0x2ac8('0x1d')](_0x2d7917[_0x2ac8('0x34')][_0x2ac8('0x1d')]);}_0x594fd0[_0x2ac8('0x37')]=qs['sort'](_0x2d7917['query'][_0x2ac8('0x38')]);_0x594fd0[_0x2ac8('0x39')]=qs['filters'](_[_0x2ac8('0x3a')](_0x2d7917['query'],_0x8985cd[_0x2ac8('0x3b')]),_0xe81318);if(_0x2d7917[_0x2ac8('0x34')][_0x2ac8('0x3c')]){_0x594fd0['where']=_['merge'](_0x594fd0[_0x2ac8('0x39')],{'$or':_[_0x2ac8('0x28')](_0xe81318,function(_0x3d4f72){if(_0x3d4f72['type']!=='VIRTUAL'){var _0x523342={};_0x523342[_0x3d4f72[_0x2ac8('0x26')]]={'$like':'%'+_0x2d7917[_0x2ac8('0x34')][_0x2ac8('0x3c')]+'%'};return _0x523342;}})});}_0x594fd0=_[_0x2ac8('0x3d')]({},_0x594fd0,_0x2d7917[_0x2ac8('0x3e')]);var _0x4a969f={'where':_0x594fd0[_0x2ac8('0x39')]};return db[_0x2ac8('0x29')][_0x2ac8('0x3f')](_0x4a969f)[_0x2ac8('0x23')](function(_0x301d6a){_0x56563e['count']=_0x301d6a;if(_0x2d7917[_0x2ac8('0x34')][_0x2ac8('0x40')]){_0x594fd0['include']=[{'all':!![]}];}return db[_0x2ac8('0x29')][_0x2ac8('0x41')](_0x594fd0);})[_0x2ac8('0x23')](function(_0x9442be){_0x56563e[_0x2ac8('0x42')]=_0x9442be;return _0x56563e;})[_0x2ac8('0x23')](respondWithFilteredResult(_0x2d352a,_0x594fd0))[_0x2ac8('0x43')](handleError(_0x2d352a,null));};exports[_0x2ac8('0x44')]=function(_0x5f6c06,_0x3f02b9){var _0x16a2d0={'raw':!![],'where':{'id':_0x5f6c06[_0x2ac8('0x45')]['id']}},_0x292162={};_0x292162[_0x2ac8('0x2e')]=_[_0x2ac8('0x30')](db['VoiceMailMessage'][_0x2ac8('0x2a')]);_0x292162[_0x2ac8('0x34')]=_['keys'](_0x5f6c06[_0x2ac8('0x34')]);_0x292162[_0x2ac8('0x3b')]=_[_0x2ac8('0x32')](_0x292162[_0x2ac8('0x2e')],_0x292162[_0x2ac8('0x34')]);_0x16a2d0[_0x2ac8('0x31')]=_['intersection'](_0x292162['model'],qs[_0x2ac8('0x33')](_0x5f6c06['query'][_0x2ac8('0x33')]));_0x16a2d0['attributes']=_0x16a2d0[_0x2ac8('0x31')][_0x2ac8('0x35')]?_0x16a2d0[_0x2ac8('0x31')]:_0x292162[_0x2ac8('0x2e')];if(_0x5f6c06[_0x2ac8('0x34')]['includeAll']){_0x16a2d0[_0x2ac8('0x46')]=[{'all':!![]}];}_0x16a2d0=_[_0x2ac8('0x3d')]({},_0x16a2d0,_0x5f6c06[_0x2ac8('0x3e')]);return db[_0x2ac8('0x29')][_0x2ac8('0x47')](_0x16a2d0)['then'](handleEntityNotFound(_0x3f02b9,null))['then'](respondWithResult(_0x3f02b9,null))[_0x2ac8('0x43')](handleError(_0x3f02b9,null));};exports['create']=function(_0x5c1a26,_0x19d2d8){return db[_0x2ac8('0x29')][_0x2ac8('0x48')](_0x5c1a26[_0x2ac8('0x49')],{})[_0x2ac8('0x23')](respondWithResult(_0x19d2d8,0xc9))[_0x2ac8('0x43')](handleError(_0x19d2d8,null));};exports[_0x2ac8('0x22')]=function(_0x432924,_0x5d0c06){if(_0x432924[_0x2ac8('0x49')]['id']){delete _0x432924[_0x2ac8('0x49')]['id'];}return db['VoiceMailMessage']['find']({'where':{'id':_0x432924['params']['id']}})[_0x2ac8('0x23')](handleEntityNotFound(_0x5d0c06,null))['then'](saveUpdates(_0x432924[_0x2ac8('0x49')],null))[_0x2ac8('0x23')](respondWithResult(_0x5d0c06,null))[_0x2ac8('0x43')](handleError(_0x5d0c06,null));};exports[_0x2ac8('0x4a')]=function(_0x1e1936,_0x225bab){return db[_0x2ac8('0x29')][_0x2ac8('0x47')]({'where':{'id':_0x1e1936[_0x2ac8('0x45')]['id']}})[_0x2ac8('0x23')](handleEntityNotFound(_0x225bab,null))[_0x2ac8('0x23')](removeEntity(_0x225bab,null))[_0x2ac8('0x43')](handleError(_0x225bab,null));};exports['download']=function(_0xfdb07b,_0x1f36c4,_0x2ebc21){return db[_0x2ac8('0x29')][_0x2ac8('0x47')]({'where':{'id':_0xfdb07b[_0x2ac8('0x45')]['id']},'attributes':['id',_0x2ac8('0x4b'),_0x2ac8('0x4c')]})[_0x2ac8('0x23')](handleEntityNotFound(_0x1f36c4,null))[_0x2ac8('0x23')](function(_0x387a91){if(_0x387a91){if(!_0x387a91[_0x2ac8('0x4b')]){throw new db['Sequelize']['ValidationError'](_0x2ac8('0x4d'));}var _0xe633d0={'Content-Type':_0x2ac8('0x4e'),'Content-Disposition':_0x2ac8('0x4f')};if(_0x387a91[_0x2ac8('0x4c')]){_0xe633d0[_0x2ac8('0x50')]=_0x2ac8('0x51')+_0x387a91[_0x2ac8('0x4c')]+'.wav\x22';}_0x1f36c4['set'](_0xe633d0);return _0x1f36c4[_0x2ac8('0x52')](new Buffer(_0x387a91[_0x2ac8('0x4b')]));}})['catch'](handleError(_0x1f36c4,null));};
\ No newline at end of file