Built motion from commit 0900f080.|2.5.45
[motion2.git] / server / api / voiceQueueReport / voiceQueueReport.controller.js
index 9d254c0..3959bd9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0ac2=['options','rows','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','squel','crypto','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','localhost','socket.io-emitter','redis','./voiceQueueReport.socket','register','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','apply','reject','save','update','then','destroy','name','send','index','map','rawAttributes','fieldName','key','model','keys','query','filters','intersection','fields','attributes','length','nolimit','sort','where','filter','merge','type','VoiceQueueReport','findAll','catch','show','params','includeAll','include','find','create','body','describe','getVoiceQueuesReport','hasOwnProperty','order','pick'];(function(_0x156fae,_0x1ceac2){var _0x5148b7=function(_0x3ba822){while(--_0x3ba822){_0x156fae['push'](_0x156fae['shift']());}};_0x5148b7(++_0x1ceac2);}(_0x0ac2,0xac));var _0x20ac=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0x0ac2[_0xa464c9];return _0x3d73c4;};'use strict';var emlformat=require(_0x20ac('0x0'));var rimraf=require(_0x20ac('0x1'));var zipdir=require(_0x20ac('0x2'));var jsonpatch=require(_0x20ac('0x3'));var rp=require(_0x20ac('0x4'));var moment=require(_0x20ac('0x5'));var BPromise=require(_0x20ac('0x6'));var Mustache=require(_0x20ac('0x7'));var util=require(_0x20ac('0x8'));var path=require(_0x20ac('0x9'));var sox=require(_0x20ac('0xa'));var csv=require(_0x20ac('0xb'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x20ac('0xc'));var _=require('lodash');var squel=require(_0x20ac('0xd'));var crypto=require(_0x20ac('0xe'));var jsforce=require('jsforce');var deskjs=require(_0x20ac('0xf'));var toCsv=require(_0x20ac('0xb'));var querystring=require('querystring');var Papa=require(_0x20ac('0x10'));var Redis=require(_0x20ac('0x11'));var authService=require(_0x20ac('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0x20ac('0x13'));var hardwareService=require(_0x20ac('0x14'));var logger=require('../../config/logger')(_0x20ac('0x15'));var utils=require(_0x20ac('0x16'));var config=require(_0x20ac('0x17'));var licenseUtil=require(_0x20ac('0x18'));var db=require(_0x20ac('0x19'))['db'];config['redis']=_['defaults'](config['redis'],{'host':_0x20ac('0x1a'),'port':0x18eb});var socket=require(_0x20ac('0x1b'))(new Redis(config[_0x20ac('0x1c')]));require(_0x20ac('0x1d'))[_0x20ac('0x1e')](socket);function respondWithStatusCode(_0x4959be,_0x5364f2){_0x5364f2=_0x5364f2||0xcc;return function(_0x4f3681){if(_0x4f3681){return _0x4959be[_0x20ac('0x1f')](_0x5364f2);}return _0x4959be[_0x20ac('0x20')](_0x5364f2)[_0x20ac('0x21')]();};}function respondWithResult(_0xa98494,_0x872ac9){_0x872ac9=_0x872ac9||0xc8;return function(_0x29eae5){if(_0x29eae5){return _0xa98494[_0x20ac('0x20')](_0x872ac9)['json'](_0x29eae5);}};}function respondWithFilteredResult(_0x18bc81,_0x5dc925){return function(_0x1db8e7){if(_0x1db8e7){var _0x370283=typeof _0x5dc925[_0x20ac('0x22')]===_0x20ac('0x23')&&typeof _0x5dc925[_0x20ac('0x24')]===_0x20ac('0x23');var _0x20b89b=_0x1db8e7[_0x20ac('0x25')];var _0x2ed71a=_0x370283?0x0:_0x5dc925[_0x20ac('0x22')];var _0x235e7d=_0x370283?_0x1db8e7[_0x20ac('0x25')]:_0x5dc925[_0x20ac('0x22')]+_0x5dc925[_0x20ac('0x24')];var _0x3b14c8;if(_0x235e7d>=_0x20b89b){_0x235e7d=_0x20b89b;_0x3b14c8=0xc8;}else{_0x3b14c8=0xce;}_0x18bc81[_0x20ac('0x20')](_0x3b14c8);return _0x18bc81[_0x20ac('0x26')](_0x20ac('0x27'),_0x2ed71a+'-'+_0x235e7d+'/'+_0x20b89b)[_0x20ac('0x28')](_0x1db8e7);}return null;};}function patchUpdates(_0xf819){return function(_0x450f4b){try{jsonpatch[_0x20ac('0x29')](_0x450f4b,_0xf819,!![]);}catch(_0xc4b685){return BPromise[_0x20ac('0x2a')](_0xc4b685);}return _0x450f4b[_0x20ac('0x2b')]();};}function saveUpdates(_0x26cf96,_0x23c0e6){return function(_0x4b2cce){if(_0x4b2cce){return _0x4b2cce[_0x20ac('0x2c')](_0x26cf96)[_0x20ac('0x2d')](function(_0x31d0b9){return _0x31d0b9;});}return null;};}function removeEntity(_0x55f2ba,_0x45afe0){return function(_0xb3ca93){if(_0xb3ca93){return _0xb3ca93[_0x20ac('0x2e')]()[_0x20ac('0x2d')](function(){_0x55f2ba[_0x20ac('0x20')](0xcc)['end']();});}};}function handleEntityNotFound(_0x27b018,_0x5ad2a3){return function(_0x1bb231){if(!_0x1bb231){_0x27b018['sendStatus'](0x194);}return _0x1bb231;};}function handleError(_0x4f5e00,_0x1e2f84){_0x1e2f84=_0x1e2f84||0x1f4;return function(_0x4666b7){logger['error'](_0x4666b7['stack']);if(_0x4666b7['name']){delete _0x4666b7[_0x20ac('0x2f')];}_0x4f5e00['status'](_0x1e2f84)[_0x20ac('0x30')](_0x4666b7);};}exports[_0x20ac('0x31')]=function(_0xeae52,_0xad9a1c){var _0xc26ad2={},_0x35abd7={},_0x282fef={'count':0x0,'rows':[]};var _0x28cba6=_[_0x20ac('0x32')](db['VoiceQueueReport'][_0x20ac('0x33')],function(_0xb6cfa){return{'name':_0xb6cfa[_0x20ac('0x34')],'type':_0xb6cfa['type'][_0x20ac('0x35')]};});_0x35abd7[_0x20ac('0x36')]=_[_0x20ac('0x32')](_0x28cba6,_0x20ac('0x2f'));_0x35abd7['query']=_[_0x20ac('0x37')](_0xeae52[_0x20ac('0x38')]);_0x35abd7[_0x20ac('0x39')]=_[_0x20ac('0x3a')](_0x35abd7['model'],_0x35abd7[_0x20ac('0x38')]);_0xc26ad2['attributes']=_[_0x20ac('0x3a')](_0x35abd7[_0x20ac('0x36')],qs[_0x20ac('0x3b')](_0xeae52[_0x20ac('0x38')][_0x20ac('0x3b')]));_0xc26ad2[_0x20ac('0x3c')]=_0xc26ad2['attributes'][_0x20ac('0x3d')]?_0xc26ad2[_0x20ac('0x3c')]:_0x35abd7[_0x20ac('0x36')];if(!_0xeae52['query']['hasOwnProperty'](_0x20ac('0x3e'))){_0xc26ad2[_0x20ac('0x24')]=qs[_0x20ac('0x24')](_0xeae52[_0x20ac('0x38')][_0x20ac('0x24')]);_0xc26ad2[_0x20ac('0x22')]=qs[_0x20ac('0x22')](_0xeae52[_0x20ac('0x38')][_0x20ac('0x22')]);}_0xc26ad2['order']=qs[_0x20ac('0x3f')](_0xeae52['query'][_0x20ac('0x3f')]);_0xc26ad2[_0x20ac('0x40')]=qs[_0x20ac('0x39')](_['pick'](_0xeae52[_0x20ac('0x38')],_0x35abd7[_0x20ac('0x39')]),_0x28cba6);if(_0xeae52[_0x20ac('0x38')][_0x20ac('0x41')]){_0xc26ad2[_0x20ac('0x40')]=_[_0x20ac('0x42')](_0xc26ad2['where'],{'$or':_[_0x20ac('0x32')](_0x28cba6,function(_0xfe37ae){if(_0xfe37ae[_0x20ac('0x43')]!=='VIRTUAL'){var _0x1c7a19={};_0x1c7a19[_0xfe37ae[_0x20ac('0x2f')]]={'$like':'%'+_0xeae52[_0x20ac('0x38')][_0x20ac('0x41')]+'%'};return _0x1c7a19;}})});}_0xc26ad2=_[_0x20ac('0x42')]({},_0xc26ad2,_0xeae52['options']);var _0x43cc37={'where':_0xc26ad2[_0x20ac('0x40')]};return db[_0x20ac('0x44')][_0x20ac('0x25')](_0x43cc37)['then'](function(_0x5ccebe){_0x282fef['count']=_0x5ccebe;if(_0xeae52[_0x20ac('0x38')]['includeAll']){_0xc26ad2['include']=[{'all':!![]}];}return db[_0x20ac('0x44')][_0x20ac('0x45')](_0xc26ad2);})['then'](function(_0x3feb1f){_0x282fef['rows']=_0x3feb1f;return _0x282fef;})[_0x20ac('0x2d')](respondWithFilteredResult(_0xad9a1c,_0xc26ad2))[_0x20ac('0x46')](handleError(_0xad9a1c,null));};exports[_0x20ac('0x47')]=function(_0x5ba77c,_0x362029){var _0xe2190d={'raw':![],'where':{'id':_0x5ba77c[_0x20ac('0x48')]['id']}},_0x49b49f={};_0x49b49f['model']=_[_0x20ac('0x37')](db[_0x20ac('0x44')][_0x20ac('0x33')]);_0x49b49f[_0x20ac('0x38')]=_[_0x20ac('0x37')](_0x5ba77c[_0x20ac('0x38')]);_0x49b49f[_0x20ac('0x39')]=_[_0x20ac('0x3a')](_0x49b49f[_0x20ac('0x36')],_0x49b49f['query']);_0xe2190d[_0x20ac('0x3c')]=_[_0x20ac('0x3a')](_0x49b49f[_0x20ac('0x36')],qs[_0x20ac('0x3b')](_0x5ba77c[_0x20ac('0x38')][_0x20ac('0x3b')]));_0xe2190d[_0x20ac('0x3c')]=_0xe2190d[_0x20ac('0x3c')][_0x20ac('0x3d')]?_0xe2190d[_0x20ac('0x3c')]:_0x49b49f[_0x20ac('0x36')];if(_0x5ba77c[_0x20ac('0x38')][_0x20ac('0x49')]){_0xe2190d[_0x20ac('0x4a')]=[{'all':!![]}];}_0xe2190d=_[_0x20ac('0x42')]({},_0xe2190d,_0x5ba77c['options']);return db[_0x20ac('0x44')][_0x20ac('0x4b')](_0xe2190d)[_0x20ac('0x2d')](handleEntityNotFound(_0x362029,null))[_0x20ac('0x2d')](respondWithResult(_0x362029,null))[_0x20ac('0x46')](handleError(_0x362029,null));};exports[_0x20ac('0x4c')]=function(_0x358042,_0x39764e){return db[_0x20ac('0x44')][_0x20ac('0x4c')](_0x358042[_0x20ac('0x4d')],{})[_0x20ac('0x2d')](respondWithResult(_0x39764e,0xc9))[_0x20ac('0x46')](handleError(_0x39764e,null));};exports[_0x20ac('0x2c')]=function(_0x23adc8,_0x12ce8b){if(_0x23adc8[_0x20ac('0x4d')]['id']){delete _0x23adc8[_0x20ac('0x4d')]['id'];}return db[_0x20ac('0x44')][_0x20ac('0x4b')]({'where':{'id':_0x23adc8[_0x20ac('0x48')]['id']}})[_0x20ac('0x2d')](handleEntityNotFound(_0x12ce8b,null))[_0x20ac('0x2d')](saveUpdates(_0x23adc8[_0x20ac('0x4d')],null))[_0x20ac('0x2d')](respondWithResult(_0x12ce8b,null))[_0x20ac('0x46')](handleError(_0x12ce8b,null));};exports['destroy']=function(_0x416977,_0x42b441){return db[_0x20ac('0x44')]['find']({'where':{'id':_0x416977[_0x20ac('0x48')]['id']}})[_0x20ac('0x2d')](handleEntityNotFound(_0x42b441,null))['then'](removeEntity(_0x42b441,null))['catch'](handleError(_0x42b441,null));};exports[_0x20ac('0x4e')]=function(_0x5995a0,_0x1e3796){return db['VoiceQueueReport'][_0x20ac('0x4e')]()[_0x20ac('0x2d')](respondWithResult(_0x1e3796,null))[_0x20ac('0x46')](handleError(_0x1e3796,null));};exports[_0x20ac('0x4f')]=function(_0x245c8a,_0x563b74){var _0x2089ff={},_0x4b18b8={},_0x43de64={'count':0x0,'rows':[]};_0x4b18b8[_0x20ac('0x36')]=_['keys'](db[_0x20ac('0x44')][_0x20ac('0x33')]);_0x4b18b8[_0x20ac('0x38')]=_[_0x20ac('0x37')](_0x245c8a[_0x20ac('0x38')]);_0x4b18b8[_0x20ac('0x39')]=_[_0x20ac('0x3a')](_0x4b18b8['model'],_0x4b18b8[_0x20ac('0x38')]);_0x2089ff[_0x20ac('0x3c')]=_['intersection'](_0x4b18b8[_0x20ac('0x36')],qs[_0x20ac('0x3b')](_0x245c8a[_0x20ac('0x38')][_0x20ac('0x3b')]));_0x2089ff[_0x20ac('0x3c')]=_0x2089ff['attributes'][_0x20ac('0x3d')]?_0x2089ff[_0x20ac('0x3c')]:_0x4b18b8[_0x20ac('0x36')];if(!_0x245c8a[_0x20ac('0x38')][_0x20ac('0x50')](_0x20ac('0x3e'))){_0x2089ff['limit']=qs[_0x20ac('0x24')](_0x245c8a[_0x20ac('0x38')][_0x20ac('0x24')]);_0x2089ff['offset']=qs[_0x20ac('0x22')](_0x245c8a['query']['offset']);}_0x2089ff[_0x20ac('0x51')]=qs[_0x20ac('0x3f')](_0x245c8a[_0x20ac('0x38')]['sort']);_0x2089ff[_0x20ac('0x40')]=qs[_0x20ac('0x39')](_[_0x20ac('0x52')](_0x245c8a[_0x20ac('0x38')],_0x4b18b8[_0x20ac('0x39')]));if(_0x245c8a[_0x20ac('0x38')][_0x20ac('0x41')]){_0x2089ff[_0x20ac('0x40')]=_['merge'](_0x2089ff['where'],{'$or':_[_0x20ac('0x32')](_0x2089ff[_0x20ac('0x3c')],function(_0x5493bd){var _0x55a281={};_0x55a281[_0x5493bd]={'$like':'%'+_0x245c8a[_0x20ac('0x38')]['filter']+'%'};return _0x55a281;})});}_0x2089ff=_[_0x20ac('0x42')]({},_0x2089ff,_0x245c8a[_0x20ac('0x53')]);var _0x3c1093={'where':_0x2089ff['where']};return db[_0x20ac('0x44')]['count'](_0x3c1093)[_0x20ac('0x2d')](function(_0x14b993){_0x43de64[_0x20ac('0x25')]=_0x14b993;if(_0x245c8a['query'][_0x20ac('0x49')]){_0x2089ff[_0x20ac('0x4a')]=[{'all':!![]}];}return db[_0x20ac('0x44')]['findAll'](_0x2089ff);})['then'](function(_0x8560f5){_0x43de64[_0x20ac('0x54')]=_0x8560f5;return _0x43de64;})['then'](respondWithFilteredResult(_0x563b74,_0x2089ff,_0x20ac('0x4f')))[_0x20ac('0x46')](handleError(_0x563b74,null,_0x20ac('0x4f')));};
\ No newline at end of file
+var _0xff17=['../../config/logger','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','end','status','undefined','count','offset','limit','set','Content-Range','json','apply','reject','save','destroy','sendStatus','error','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','VoiceQueueReport','then','includeAll','include','findAll','rows','show','params','length','find','catch','create','body','update','describe','hasOwnProperty','getVoiceQueuesReport','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','sox','to-csv','ejs','lodash','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware'];(function(_0x2763f2,_0x416af8){var _0x3ef471=function(_0x288aa2){while(--_0x288aa2){_0x2763f2['push'](_0x2763f2['shift']());}};_0x3ef471(++_0x416af8);}(_0xff17,0x144));var _0x7ff1=function(_0xd4c300,_0x56708a){_0xd4c300=_0xd4c300-0x0;var _0x201653=_0xff17[_0xd4c300];return _0x201653;};'use strict';var emlformat=require(_0x7ff1('0x0'));var rimraf=require(_0x7ff1('0x1'));var zipdir=require(_0x7ff1('0x2'));var jsonpatch=require(_0x7ff1('0x3'));var rp=require(_0x7ff1('0x4'));var moment=require(_0x7ff1('0x5'));var BPromise=require(_0x7ff1('0x6'));var Mustache=require(_0x7ff1('0x7'));var util=require('util');var path=require('path');var sox=require(_0x7ff1('0x8'));var csv=require(_0x7ff1('0x9'));var ejs=require(_0x7ff1('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x7ff1('0xb'));var squel=require('squel');var crypto=require(_0x7ff1('0xc'));var jsforce=require(_0x7ff1('0xd'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x7ff1('0xe'));var Papa=require(_0x7ff1('0xf'));var Redis=require(_0x7ff1('0x10'));var authService=require(_0x7ff1('0x11'));var qs=require(_0x7ff1('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x7ff1('0x13'));var logger=require(_0x7ff1('0x14'))('api');var utils=require('../../config/utils');var config=require(_0x7ff1('0x15'));var licenseUtil=require(_0x7ff1('0x16'));var db=require(_0x7ff1('0x17'))['db'];config[_0x7ff1('0x18')]=_[_0x7ff1('0x19')](config[_0x7ff1('0x18')],{'host':_0x7ff1('0x1a'),'port':0x18eb});var socket=require(_0x7ff1('0x1b'))(new Redis(config[_0x7ff1('0x18')]));require('./voiceQueueReport.socket')[_0x7ff1('0x1c')](socket);function respondWithStatusCode(_0x3feacd,_0x522bbf){_0x522bbf=_0x522bbf||0xcc;return function(_0x5af4d0){if(_0x5af4d0){return _0x3feacd['sendStatus'](_0x522bbf);}return _0x3feacd['status'](_0x522bbf)[_0x7ff1('0x1d')]();};}function respondWithResult(_0x3ad08b,_0xaa27aa){_0xaa27aa=_0xaa27aa||0xc8;return function(_0xb31e67){if(_0xb31e67){return _0x3ad08b[_0x7ff1('0x1e')](_0xaa27aa)['json'](_0xb31e67);}};}function respondWithFilteredResult(_0xc16998,_0x492a2b){return function(_0x2a658c){if(_0x2a658c){var _0x318639=typeof _0x492a2b['offset']===_0x7ff1('0x1f')&&typeof _0x492a2b['limit']===_0x7ff1('0x1f');var _0x2674f4=_0x2a658c[_0x7ff1('0x20')];var _0x4ca920=_0x318639?0x0:_0x492a2b[_0x7ff1('0x21')];var _0x4c8f22=_0x318639?_0x2a658c['count']:_0x492a2b[_0x7ff1('0x21')]+_0x492a2b[_0x7ff1('0x22')];var _0x17c086;if(_0x4c8f22>=_0x2674f4){_0x4c8f22=_0x2674f4;_0x17c086=0xc8;}else{_0x17c086=0xce;}_0xc16998[_0x7ff1('0x1e')](_0x17c086);return _0xc16998[_0x7ff1('0x23')](_0x7ff1('0x24'),_0x4ca920+'-'+_0x4c8f22+'/'+_0x2674f4)[_0x7ff1('0x25')](_0x2a658c);}return null;};}function patchUpdates(_0x3790ea){return function(_0x152e4c){try{jsonpatch[_0x7ff1('0x26')](_0x152e4c,_0x3790ea,!![]);}catch(_0x28ef23){return BPromise[_0x7ff1('0x27')](_0x28ef23);}return _0x152e4c[_0x7ff1('0x28')]();};}function saveUpdates(_0x111289,_0x58a075){return function(_0x2a7a3d){if(_0x2a7a3d){return _0x2a7a3d['update'](_0x111289)['then'](function(_0x57e5f4){return _0x57e5f4;});}return null;};}function removeEntity(_0x16582c,_0x1745c9){return function(_0x1c96fe){if(_0x1c96fe){return _0x1c96fe[_0x7ff1('0x29')]()['then'](function(){_0x16582c[_0x7ff1('0x1e')](0xcc)[_0x7ff1('0x1d')]();});}};}function handleEntityNotFound(_0x1bc0b4,_0x479a9a){return function(_0x303538){if(!_0x303538){_0x1bc0b4[_0x7ff1('0x2a')](0x194);}return _0x303538;};}function handleError(_0x3c7fff,_0x5300d3){_0x5300d3=_0x5300d3||0x1f4;return function(_0x58772a){logger[_0x7ff1('0x2b')](_0x58772a[_0x7ff1('0x2c')]);if(_0x58772a['name']){delete _0x58772a[_0x7ff1('0x2d')];}_0x3c7fff[_0x7ff1('0x1e')](_0x5300d3)[_0x7ff1('0x2e')](_0x58772a);};}exports[_0x7ff1('0x2f')]=function(_0xee6d8d,_0x4a729a){var _0x14c661={},_0x24790c={},_0xb68efd={'count':0x0,'rows':[]};var _0x1e5cc4=_[_0x7ff1('0x30')](db['VoiceQueueReport'][_0x7ff1('0x31')],function(_0x5ba649){return{'name':_0x5ba649[_0x7ff1('0x32')],'type':_0x5ba649[_0x7ff1('0x33')][_0x7ff1('0x34')]};});_0x24790c[_0x7ff1('0x35')]=_[_0x7ff1('0x30')](_0x1e5cc4,_0x7ff1('0x2d'));_0x24790c[_0x7ff1('0x36')]=_[_0x7ff1('0x37')](_0xee6d8d['query']);_0x24790c[_0x7ff1('0x38')]=_[_0x7ff1('0x39')](_0x24790c[_0x7ff1('0x35')],_0x24790c['query']);_0x14c661['attributes']=_[_0x7ff1('0x39')](_0x24790c[_0x7ff1('0x35')],qs['fields'](_0xee6d8d[_0x7ff1('0x36')][_0x7ff1('0x3a')]));_0x14c661[_0x7ff1('0x3b')]=_0x14c661[_0x7ff1('0x3b')]['length']?_0x14c661[_0x7ff1('0x3b')]:_0x24790c[_0x7ff1('0x35')];if(!_0xee6d8d[_0x7ff1('0x36')]['hasOwnProperty'](_0x7ff1('0x3c'))){_0x14c661[_0x7ff1('0x22')]=qs[_0x7ff1('0x22')](_0xee6d8d[_0x7ff1('0x36')]['limit']);_0x14c661['offset']=qs['offset'](_0xee6d8d[_0x7ff1('0x36')][_0x7ff1('0x21')]);}_0x14c661[_0x7ff1('0x3d')]=qs[_0x7ff1('0x3e')](_0xee6d8d[_0x7ff1('0x36')]['sort']);_0x14c661[_0x7ff1('0x3f')]=qs[_0x7ff1('0x38')](_[_0x7ff1('0x40')](_0xee6d8d[_0x7ff1('0x36')],_0x24790c['filters']),_0x1e5cc4);if(_0xee6d8d[_0x7ff1('0x36')][_0x7ff1('0x41')]){_0x14c661[_0x7ff1('0x3f')]=_[_0x7ff1('0x42')](_0x14c661[_0x7ff1('0x3f')],{'$or':_[_0x7ff1('0x30')](_0x1e5cc4,function(_0x23eba5){if(_0x23eba5[_0x7ff1('0x33')]!==_0x7ff1('0x43')){var _0x4e5c57={};_0x4e5c57[_0x23eba5[_0x7ff1('0x2d')]]={'$like':'%'+_0xee6d8d['query'][_0x7ff1('0x41')]+'%'};return _0x4e5c57;}})});}_0x14c661=_['merge']({},_0x14c661,_0xee6d8d[_0x7ff1('0x44')]);var _0x12aebc={'where':_0x14c661[_0x7ff1('0x3f')]};return db[_0x7ff1('0x45')][_0x7ff1('0x20')](_0x12aebc)[_0x7ff1('0x46')](function(_0x53212d){_0xb68efd[_0x7ff1('0x20')]=_0x53212d;if(_0xee6d8d[_0x7ff1('0x36')][_0x7ff1('0x47')]){_0x14c661[_0x7ff1('0x48')]=[{'all':!![]}];}return db[_0x7ff1('0x45')][_0x7ff1('0x49')](_0x14c661);})[_0x7ff1('0x46')](function(_0x29fabf){_0xb68efd[_0x7ff1('0x4a')]=_0x29fabf;return _0xb68efd;})[_0x7ff1('0x46')](respondWithFilteredResult(_0x4a729a,_0x14c661))['catch'](handleError(_0x4a729a,null));};exports[_0x7ff1('0x4b')]=function(_0x32f4d0,_0x35cfe0){var _0x47548f={'raw':![],'where':{'id':_0x32f4d0[_0x7ff1('0x4c')]['id']}},_0x984b09={};_0x984b09[_0x7ff1('0x35')]=_['keys'](db[_0x7ff1('0x45')][_0x7ff1('0x31')]);_0x984b09[_0x7ff1('0x36')]=_[_0x7ff1('0x37')](_0x32f4d0[_0x7ff1('0x36')]);_0x984b09[_0x7ff1('0x38')]=_[_0x7ff1('0x39')](_0x984b09[_0x7ff1('0x35')],_0x984b09[_0x7ff1('0x36')]);_0x47548f['attributes']=_[_0x7ff1('0x39')](_0x984b09[_0x7ff1('0x35')],qs[_0x7ff1('0x3a')](_0x32f4d0[_0x7ff1('0x36')]['fields']));_0x47548f[_0x7ff1('0x3b')]=_0x47548f[_0x7ff1('0x3b')][_0x7ff1('0x4d')]?_0x47548f[_0x7ff1('0x3b')]:_0x984b09['model'];if(_0x32f4d0[_0x7ff1('0x36')]['includeAll']){_0x47548f[_0x7ff1('0x48')]=[{'all':!![]}];}_0x47548f=_['merge']({},_0x47548f,_0x32f4d0[_0x7ff1('0x44')]);return db[_0x7ff1('0x45')][_0x7ff1('0x4e')](_0x47548f)[_0x7ff1('0x46')](handleEntityNotFound(_0x35cfe0,null))['then'](respondWithResult(_0x35cfe0,null))[_0x7ff1('0x4f')](handleError(_0x35cfe0,null));};exports[_0x7ff1('0x50')]=function(_0xc06537,_0x50636a){return db[_0x7ff1('0x45')]['create'](_0xc06537[_0x7ff1('0x51')],{})[_0x7ff1('0x46')](respondWithResult(_0x50636a,0xc9))[_0x7ff1('0x4f')](handleError(_0x50636a,null));};exports[_0x7ff1('0x52')]=function(_0x8c56e2,_0x504167){if(_0x8c56e2[_0x7ff1('0x51')]['id']){delete _0x8c56e2[_0x7ff1('0x51')]['id'];}return db[_0x7ff1('0x45')][_0x7ff1('0x4e')]({'where':{'id':_0x8c56e2['params']['id']}})['then'](handleEntityNotFound(_0x504167,null))[_0x7ff1('0x46')](saveUpdates(_0x8c56e2[_0x7ff1('0x51')],null))[_0x7ff1('0x46')](respondWithResult(_0x504167,null))[_0x7ff1('0x4f')](handleError(_0x504167,null));};exports[_0x7ff1('0x29')]=function(_0x2d6fb7,_0x3b8291){return db['VoiceQueueReport'][_0x7ff1('0x4e')]({'where':{'id':_0x2d6fb7[_0x7ff1('0x4c')]['id']}})[_0x7ff1('0x46')](handleEntityNotFound(_0x3b8291,null))[_0x7ff1('0x46')](removeEntity(_0x3b8291,null))[_0x7ff1('0x4f')](handleError(_0x3b8291,null));};exports[_0x7ff1('0x53')]=function(_0x4c6ee1,_0x5d30e2){return db[_0x7ff1('0x45')]['describe']()['then'](respondWithResult(_0x5d30e2,null))[_0x7ff1('0x4f')](handleError(_0x5d30e2,null));};exports['getVoiceQueuesReport']=function(_0x135812,_0x25827b){var _0x41e273={},_0x115cb9={},_0x5b2ac8={'count':0x0,'rows':[]};_0x115cb9[_0x7ff1('0x35')]=_[_0x7ff1('0x37')](db[_0x7ff1('0x45')][_0x7ff1('0x31')]);_0x115cb9[_0x7ff1('0x36')]=_[_0x7ff1('0x37')](_0x135812['query']);_0x115cb9['filters']=_[_0x7ff1('0x39')](_0x115cb9[_0x7ff1('0x35')],_0x115cb9['query']);_0x41e273[_0x7ff1('0x3b')]=_['intersection'](_0x115cb9[_0x7ff1('0x35')],qs[_0x7ff1('0x3a')](_0x135812['query'][_0x7ff1('0x3a')]));_0x41e273['attributes']=_0x41e273[_0x7ff1('0x3b')][_0x7ff1('0x4d')]?_0x41e273[_0x7ff1('0x3b')]:_0x115cb9[_0x7ff1('0x35')];if(!_0x135812['query'][_0x7ff1('0x54')](_0x7ff1('0x3c'))){_0x41e273[_0x7ff1('0x22')]=qs[_0x7ff1('0x22')](_0x135812[_0x7ff1('0x36')][_0x7ff1('0x22')]);_0x41e273[_0x7ff1('0x21')]=qs[_0x7ff1('0x21')](_0x135812[_0x7ff1('0x36')]['offset']);}_0x41e273[_0x7ff1('0x3d')]=qs[_0x7ff1('0x3e')](_0x135812[_0x7ff1('0x36')]['sort']);_0x41e273['where']=qs[_0x7ff1('0x38')](_[_0x7ff1('0x40')](_0x135812[_0x7ff1('0x36')],_0x115cb9[_0x7ff1('0x38')]));if(_0x135812[_0x7ff1('0x36')][_0x7ff1('0x41')]){_0x41e273['where']=_[_0x7ff1('0x42')](_0x41e273[_0x7ff1('0x3f')],{'$or':_[_0x7ff1('0x30')](_0x41e273[_0x7ff1('0x3b')],function(_0x494ae1){var _0x8de7f0={};_0x8de7f0[_0x494ae1]={'$like':'%'+_0x135812['query']['filter']+'%'};return _0x8de7f0;})});}_0x41e273=_[_0x7ff1('0x42')]({},_0x41e273,_0x135812[_0x7ff1('0x44')]);var _0x10967e={'where':_0x41e273[_0x7ff1('0x3f')]};return db[_0x7ff1('0x45')]['count'](_0x10967e)[_0x7ff1('0x46')](function(_0x1cf60c){_0x5b2ac8[_0x7ff1('0x20')]=_0x1cf60c;if(_0x135812[_0x7ff1('0x36')][_0x7ff1('0x47')]){_0x41e273[_0x7ff1('0x48')]=[{'all':!![]}];}return db[_0x7ff1('0x45')][_0x7ff1('0x49')](_0x41e273);})[_0x7ff1('0x46')](function(_0x11e369){_0x5b2ac8[_0x7ff1('0x4a')]=_0x11e369;return _0x5b2ac8;})[_0x7ff1('0x46')](respondWithFilteredResult(_0x25827b,_0x41e273,_0x7ff1('0x55')))[_0x7ff1('0x4f')](handleError(_0x25827b,null,_0x7ff1('0x55')));};
\ No newline at end of file