Built motion from commit (unavailable).|2.5.12
[motion2.git] / server / api / cmHopperFinal / cmHopperFinal.controller.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x4b84=['VIRTUAL','options','CmHopperFinal','count','includeAll','include','findAll','rows','catch','show','params','find','describe','body','uniqueid','countContactsQueueCampaignHopperFinal','sequelize','literal','`state`\x20=\x200,\x201,\x20null','noSuchContacts','noAnswerContacts','COUNT','`state`\x20=\x205,\x201,\x20null','`state`\x20=\x208,\x201,\x20null','congestionContacts','`state`\x20=\x2010\x20,\x201,\x20null','dropContacts','`state`\x20=\x2011\x20,\x201,\x20null','abandonedContacts','`state`\x20=\x2022,\x201,\x20null','reCallContacts','`state`\x20=\x2019,\x201,\x20null','answeringMachine','countContactsIvrCampaignHopperFinal','`state`\x20=\x203,\x201,\x20null','busyContacts','VoiceQueue','insert','into','cm_hopper','fromQuery','scheduledAt','ContactId','ListId','VoiceQueueId','field','ANY_VALUE(calleridnum)','phone','NOW()','ANY_VALUE(ListId)','ANY_VALUE(VoiceQueueId)','createdAt','updatedAt','from','VoiceQueueId\x20=\x20?','toString','state','calleridnum\x20IS\x20NOT\x20NULL','calleridnum\x20NOT\x20IN\x20(?)','select','state\x20=\x204','group','moveContactsIvrCampaignHopperFinal','Campaign','CampaignId','ANY_VALUE(ContactId)','ANY_VALUE(CampaignId)','cm_hopper_final','CampaignId\x20=\x20?','state\x20=\x20?','calleridnum','CmHopper','findOne','html-pdf','eml-format','fast-json-patch','bluebird','mustache','util','ejs','squel','jsforce','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','status','end','json','offset','set','apply','reject','save','update','then','destroy','error','stack','name','send','index','map','rawAttributes','fieldName','query','keys','filters','intersection','model','attributes','fields','length','nolimit','limit','order','sort','where','pick','filter','merge','type'];(function(_0xdefbc3,_0x1ea49a){var _0x367798=function(_0x594678){while(--_0x594678){_0xdefbc3['push'](_0xdefbc3['shift']());}};_0x367798(++_0x1ea49a);}(_0x4b84,0x1cc));var _0x44b8=function(_0x45346d,_0xffd56b){_0x45346d=_0x45346d-0x0;var _0x5ce7ca=_0x4b84[_0x45346d];return _0x5ce7ca;};'use strict';var pdf=require(_0x44b8('0x0'));var emlformat=require(_0x44b8('0x1'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x44b8('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x44b8('0x3'));var Mustache=require(_0x44b8('0x4'));var util=require(_0x44b8('0x5'));var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x44b8('0x6'));var fs=require('fs');var _=require('lodash');var squel=require(_0x44b8('0x7'));var crypto=require('crypto');var jsforce=require(_0x44b8('0x8'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x44b8('0x9'));var Papa=require(_0x44b8('0xa'));var Redis=require(_0x44b8('0xb'));var authService=require('../../components/auth/service');var qs=require(_0x44b8('0xc'));var as=require(_0x44b8('0xd'));var hardwareService=require(_0x44b8('0xe'));var logger=require(_0x44b8('0xf'))(_0x44b8('0x10'));var utils=require(_0x44b8('0x11'));var config=require(_0x44b8('0x12'));var licenseUtil=require('../../config/license/util');var db=require(_0x44b8('0x13'))['db'];function respondWithStatusCode(_0x4301a6,_0x4bcc43){_0x4bcc43=_0x4bcc43||0xcc;return function(_0x194230){if(_0x194230){return _0x4301a6['sendStatus'](_0x4bcc43);}return _0x4301a6[_0x44b8('0x14')](_0x4bcc43)[_0x44b8('0x15')]();};}function respondWithResult(_0x4df670,_0x63e8f6){_0x63e8f6=_0x63e8f6||0xc8;return function(_0x4be54c){if(_0x4be54c){return _0x4df670['status'](_0x63e8f6)[_0x44b8('0x16')](_0x4be54c);}};}function respondWithFilteredResult(_0x2af0ad,_0x1722da){return function(_0x41ab46){if(_0x41ab46){var _0x5e52f2=_0x41ab46['count'],_0x495c74=_0x1722da[_0x44b8('0x17')],_0x5d6349=_0x1722da[_0x44b8('0x17')]+_0x1722da['limit'],_0x3fe9fb;if(_0x5d6349>=_0x5e52f2){_0x5d6349=_0x5e52f2;_0x3fe9fb=0xc8;}else{_0x3fe9fb=0xce;}_0x2af0ad[_0x44b8('0x14')](_0x3fe9fb);return _0x2af0ad[_0x44b8('0x18')]('Content-Range',_0x495c74+'-'+_0x5d6349+'/'+_0x5e52f2)[_0x44b8('0x16')](_0x41ab46);}return null;};}function patchUpdates(_0x3f4688){return function(_0x4b600f){try{jsonpatch[_0x44b8('0x19')](_0x4b600f,_0x3f4688,!![]);}catch(_0x8b4301){return BPromise[_0x44b8('0x1a')](_0x8b4301);}return _0x4b600f[_0x44b8('0x1b')]();};}function saveUpdates(_0x102ef9,_0x369c09){return function(_0x452f2f){if(_0x452f2f){return _0x452f2f[_0x44b8('0x1c')](_0x102ef9)[_0x44b8('0x1d')](function(_0x1e0f2d){return _0x1e0f2d;});}return null;};}function removeEntity(_0x1d642b,_0x14996c){return function(_0x48327e){if(_0x48327e){return _0x48327e[_0x44b8('0x1e')]()[_0x44b8('0x1d')](function(){_0x1d642b[_0x44b8('0x14')](0xcc)[_0x44b8('0x15')]();});}};}function handleEntityNotFound(_0x305a5c,_0x51a34a){return function(_0x402497){if(!_0x402497){_0x305a5c['sendStatus'](0x194);}return _0x402497;};}function handleError(_0x41a922,_0x228c81){_0x228c81=_0x228c81||0x1f4;return function(_0x25a0c1){logger[_0x44b8('0x1f')](_0x25a0c1[_0x44b8('0x20')]);if(_0x25a0c1['name']){delete _0x25a0c1[_0x44b8('0x21')];}_0x41a922['status'](_0x228c81)[_0x44b8('0x22')](_0x25a0c1);};}exports[_0x44b8('0x23')]=function(_0x549a26,_0x17ac44){var _0x470f49={},_0x2656d7={},_0x59c1bf={'count':0x0,'rows':[]};var _0xb22107=_[_0x44b8('0x24')](db['CmHopperFinal'][_0x44b8('0x25')],function(_0x4a182d){return{'name':_0x4a182d[_0x44b8('0x26')],'type':_0x4a182d['type']['key']};});_0x2656d7['model']=_[_0x44b8('0x24')](_0xb22107,_0x44b8('0x21'));_0x2656d7[_0x44b8('0x27')]=_[_0x44b8('0x28')](_0x549a26[_0x44b8('0x27')]);_0x2656d7[_0x44b8('0x29')]=_[_0x44b8('0x2a')](_0x2656d7[_0x44b8('0x2b')],_0x2656d7[_0x44b8('0x27')]);_0x470f49[_0x44b8('0x2c')]=_[_0x44b8('0x2a')](_0x2656d7[_0x44b8('0x2b')],qs[_0x44b8('0x2d')](_0x549a26['query'][_0x44b8('0x2d')]));_0x470f49['attributes']=_0x470f49[_0x44b8('0x2c')][_0x44b8('0x2e')]?_0x470f49[_0x44b8('0x2c')]:_0x2656d7[_0x44b8('0x2b')];if(!_0x549a26[_0x44b8('0x27')]['hasOwnProperty'](_0x44b8('0x2f'))){_0x470f49[_0x44b8('0x30')]=qs[_0x44b8('0x30')](_0x549a26[_0x44b8('0x27')][_0x44b8('0x30')]);_0x470f49['offset']=qs[_0x44b8('0x17')](_0x549a26[_0x44b8('0x27')][_0x44b8('0x17')]);}_0x470f49[_0x44b8('0x31')]=qs[_0x44b8('0x32')](_0x549a26[_0x44b8('0x27')][_0x44b8('0x32')]);_0x470f49[_0x44b8('0x33')]=qs[_0x44b8('0x29')](_[_0x44b8('0x34')](_0x549a26[_0x44b8('0x27')],_0x2656d7[_0x44b8('0x29')]),_0xb22107);if(_0x549a26[_0x44b8('0x27')][_0x44b8('0x35')]){_0x470f49[_0x44b8('0x33')]=_[_0x44b8('0x36')](_0x470f49[_0x44b8('0x33')],{'$or':_[_0x44b8('0x24')](_0xb22107,function(_0x28faa9){if(_0x28faa9[_0x44b8('0x37')]!==_0x44b8('0x38')){var _0x282345={};_0x282345[_0x28faa9['name']]={'$like':'%'+_0x549a26[_0x44b8('0x27')][_0x44b8('0x35')]+'%'};return _0x282345;}})});}_0x470f49=_['merge']({},_0x470f49,_0x549a26[_0x44b8('0x39')]);var _0x2b9139={'where':_0x470f49[_0x44b8('0x33')]};return db[_0x44b8('0x3a')]['count'](_0x2b9139)[_0x44b8('0x1d')](function(_0x11e4e3){_0x59c1bf[_0x44b8('0x3b')]=_0x11e4e3;if(_0x549a26[_0x44b8('0x27')][_0x44b8('0x3c')]){_0x470f49[_0x44b8('0x3d')]=[{'all':!![]}];}return db[_0x44b8('0x3a')][_0x44b8('0x3e')](_0x470f49);})[_0x44b8('0x1d')](function(_0x3d1be1){_0x59c1bf[_0x44b8('0x3f')]=_0x3d1be1;return _0x59c1bf;})[_0x44b8('0x1d')](respondWithFilteredResult(_0x17ac44,_0x470f49))[_0x44b8('0x40')](handleError(_0x17ac44,null));};exports[_0x44b8('0x41')]=function(_0x2f8b59,_0x29b43f){var _0x57d8c4={'raw':!![],'where':{'id':_0x2f8b59[_0x44b8('0x42')]['id']}},_0x12a0a4={};_0x12a0a4[_0x44b8('0x2b')]=_['keys'](db[_0x44b8('0x3a')][_0x44b8('0x25')]);_0x12a0a4[_0x44b8('0x27')]=_['keys'](_0x2f8b59[_0x44b8('0x27')]);_0x12a0a4[_0x44b8('0x29')]=_[_0x44b8('0x2a')](_0x12a0a4[_0x44b8('0x2b')],_0x12a0a4[_0x44b8('0x27')]);_0x57d8c4['attributes']=_['intersection'](_0x12a0a4[_0x44b8('0x2b')],qs[_0x44b8('0x2d')](_0x2f8b59[_0x44b8('0x27')][_0x44b8('0x2d')]));_0x57d8c4[_0x44b8('0x2c')]=_0x57d8c4[_0x44b8('0x2c')][_0x44b8('0x2e')]?_0x57d8c4[_0x44b8('0x2c')]:_0x12a0a4[_0x44b8('0x2b')];if(_0x2f8b59[_0x44b8('0x27')][_0x44b8('0x3c')]){_0x57d8c4[_0x44b8('0x3d')]=[{'all':!![]}];}_0x57d8c4=_[_0x44b8('0x36')]({},_0x57d8c4,_0x2f8b59[_0x44b8('0x39')]);return db[_0x44b8('0x3a')][_0x44b8('0x43')](_0x57d8c4)[_0x44b8('0x1d')](handleEntityNotFound(_0x29b43f,null))[_0x44b8('0x1d')](respondWithResult(_0x29b43f,null))[_0x44b8('0x40')](handleError(_0x29b43f,null));};exports['describe']=function(_0x547dc1,_0x3b1b12){return db[_0x44b8('0x3a')][_0x44b8('0x44')]()[_0x44b8('0x1d')](respondWithResult(_0x3b1b12,null))[_0x44b8('0x40')](handleError(_0x3b1b12,null));};exports[_0x44b8('0x1c')]=function(_0x411ed6,_0x4fe73f){if(_0x411ed6[_0x44b8('0x45')]['uniqueid']){delete _0x411ed6[_0x44b8('0x45')][_0x44b8('0x46')];}return db[_0x44b8('0x3a')][_0x44b8('0x43')]({'where':{'uniqueid':_0x411ed6[_0x44b8('0x42')]['id']}})[_0x44b8('0x1d')](handleEntityNotFound(_0x4fe73f,null))['then'](saveUpdates(_0x411ed6[_0x44b8('0x45')],null))[_0x44b8('0x1d')](respondWithResult(_0x4fe73f,null))[_0x44b8('0x40')](handleError(_0x4fe73f,null));};exports[_0x44b8('0x47')]=function(_0x4ccc77,_0x4e4ed1,_0x2f549d){return db[_0x44b8('0x3a')][_0x44b8('0x3e')]({'raw':![],'where':{'VoiceQueueId':_0x4ccc77[_0x44b8('0x42')]['id']},'attributes':[[db[_0x44b8('0x48')]['fn']('COUNT',db[_0x44b8('0x48')]['fn']('IF',db[_0x44b8('0x48')][_0x44b8('0x49')](_0x44b8('0x4a')))),_0x44b8('0x4b')],[db['sequelize']['fn']('COUNT',db[_0x44b8('0x48')]['fn']('IF',db['sequelize'][_0x44b8('0x49')]('`state`\x20=\x203,\x201,\x20null'))),_0x44b8('0x4c')],[db[_0x44b8('0x48')]['fn'](_0x44b8('0x4d'),db[_0x44b8('0x48')]['fn']('IF',db[_0x44b8('0x48')][_0x44b8('0x49')](_0x44b8('0x4e')))),'busyContacts'],[db[_0x44b8('0x48')]['fn'](_0x44b8('0x4d'),db[_0x44b8('0x48')]['fn']('IF',db['sequelize'][_0x44b8('0x49')](_0x44b8('0x4f')))),_0x44b8('0x50')],[db[_0x44b8('0x48')]['fn']('COUNT',db[_0x44b8('0x48')]['fn']('IF',db[_0x44b8('0x48')]['literal'](_0x44b8('0x51')))),_0x44b8('0x52')],[db[_0x44b8('0x48')]['fn'](_0x44b8('0x4d'),db[_0x44b8('0x48')]['fn']('IF',db['sequelize']['literal'](_0x44b8('0x53')))),_0x44b8('0x54')],[db[_0x44b8('0x48')]['fn'](_0x44b8('0x4d'),db[_0x44b8('0x48')]['fn']('IF',db[_0x44b8('0x48')][_0x44b8('0x49')](_0x44b8('0x55')))),_0x44b8('0x56')],[db[_0x44b8('0x48')]['fn'](_0x44b8('0x4d'),db[_0x44b8('0x48')]['fn']('IF',db['sequelize'][_0x44b8('0x49')](_0x44b8('0x57')))),_0x44b8('0x58')]]})[_0x44b8('0x1d')](handleEntityNotFound(_0x4e4ed1,null))[_0x44b8('0x1d')](respondWithResult(_0x4e4ed1,null))[_0x44b8('0x40')](handleError(_0x4e4ed1,null));};exports[_0x44b8('0x59')]=function(_0x172ff3,_0x25d371,_0x2d6a31){return db[_0x44b8('0x3a')][_0x44b8('0x3e')]({'raw':![],'where':{'CampaignId':_0x172ff3[_0x44b8('0x42')]['id']},'attributes':[[db[_0x44b8('0x48')]['fn'](_0x44b8('0x4d'),db[_0x44b8('0x48')]['fn']('IF',db[_0x44b8('0x48')][_0x44b8('0x49')]('`state`\x20=\x200,\x201,\x20null'))),_0x44b8('0x4b')],[db[_0x44b8('0x48')]['fn'](_0x44b8('0x4d'),db[_0x44b8('0x48')]['fn']('IF',db[_0x44b8('0x48')][_0x44b8('0x49')](_0x44b8('0x5a')))),'noAnswerContacts'],[db[_0x44b8('0x48')]['fn'](_0x44b8('0x4d'),db['sequelize']['fn']('IF',db[_0x44b8('0x48')][_0x44b8('0x49')]('`state`\x20=\x205,\x201,\x20null'))),_0x44b8('0x5b')],[db[_0x44b8('0x48')]['fn'](_0x44b8('0x4d'),db['sequelize']['fn']('IF',db[_0x44b8('0x48')]['literal'](_0x44b8('0x4f')))),'congestionContacts'],[db[_0x44b8('0x48')]['fn'](_0x44b8('0x4d'),db[_0x44b8('0x48')]['fn']('IF',db[_0x44b8('0x48')][_0x44b8('0x49')](_0x44b8('0x51')))),'dropContacts'],[db[_0x44b8('0x48')]['fn']('COUNT',db[_0x44b8('0x48')]['fn']('IF',db[_0x44b8('0x48')]['literal'](_0x44b8('0x53')))),_0x44b8('0x54')],[db[_0x44b8('0x48')]['fn'](_0x44b8('0x4d'),db[_0x44b8('0x48')]['fn']('IF',db[_0x44b8('0x48')][_0x44b8('0x49')](_0x44b8('0x55')))),_0x44b8('0x56')],[db[_0x44b8('0x48')]['fn'](_0x44b8('0x4d'),db[_0x44b8('0x48')]['fn']('IF',db['sequelize'][_0x44b8('0x49')](_0x44b8('0x57')))),_0x44b8('0x58')]]})['then'](handleEntityNotFound(_0x25d371,null))[_0x44b8('0x1d')](respondWithResult(_0x25d371,null))[_0x44b8('0x40')](handleError(_0x25d371,null));};exports['moveContactsQueueCampaignHopperFinal']=function(_0x10f6cc,_0x1a8cff,_0xb89680){return db[_0x44b8('0x5c')][_0x44b8('0x43')]({'where':{'id':_0x10f6cc['params']['id']}})[_0x44b8('0x1d')](handleEntityNotFound(_0x1a8cff,null))[_0x44b8('0x1d')](function(_0x279753){var _0x270224;if(_0x279753){_0x270224=squel[_0x44b8('0x5d')]()[_0x44b8('0x5e')](_0x44b8('0x5f'))[_0x44b8('0x60')](['phone',_0x44b8('0x61'),_0x44b8('0x62'),_0x44b8('0x63'),_0x44b8('0x64'),'createdAt','updatedAt'],squel['select']()[_0x44b8('0x65')](_0x44b8('0x66'),_0x44b8('0x67'))[_0x44b8('0x65')](_0x44b8('0x68'),'scheduledAt')[_0x44b8('0x65')]('ANY_VALUE(ContactId)',_0x44b8('0x62'))[_0x44b8('0x65')](_0x44b8('0x69'),'ListId')['field'](_0x44b8('0x6a'),_0x44b8('0x64'))[_0x44b8('0x65')]('NOW()',_0x44b8('0x6b'))[_0x44b8('0x65')](_0x44b8('0x68'),_0x44b8('0x6c'))[_0x44b8('0x6d')]('cm_hopper_final')[_0x44b8('0x33')](_0x44b8('0x6e'),_0x10f6cc[_0x44b8('0x42')]['id'][_0x44b8('0x6f')]())[_0x44b8('0x33')]('state\x20=\x20?',_0x10f6cc[_0x44b8('0x45')][_0x44b8('0x70')][_0x44b8('0x6f')]())[_0x44b8('0x33')](_0x44b8('0x71'))[_0x44b8('0x33')](_0x44b8('0x72'),squel['select']()[_0x44b8('0x65')](_0x44b8('0x67'))['from'](_0x44b8('0x5f'))[_0x44b8('0x33')]('VoiceQueueId\x20=\x20?',_0x10f6cc[_0x44b8('0x42')]['id']['toString']()))['where'](_0x44b8('0x72'),squel[_0x44b8('0x73')]()[_0x44b8('0x65')]('calleridnum')['from']('cm_hopper_final')[_0x44b8('0x33')](_0x44b8('0x6e'),_0x10f6cc[_0x44b8('0x42')]['id'][_0x44b8('0x6f')]())[_0x44b8('0x33')](_0x44b8('0x74')))[_0x44b8('0x75')](_0x44b8('0x62')))['toString']();return db[_0x44b8('0x48')]['query'](_0x270224);}return[];})['then'](respondWithResult(_0x1a8cff,null))['catch'](handleError(_0x1a8cff,null));};exports[_0x44b8('0x76')]=function(_0x5ab8b1,_0x2166df,_0x1e37fd){return db[_0x44b8('0x77')][_0x44b8('0x43')]({'where':{'id':_0x5ab8b1[_0x44b8('0x42')]['id']}})[_0x44b8('0x1d')](handleEntityNotFound(_0x2166df,null))[_0x44b8('0x1d')](function(_0x953f65){var _0x5e8e0b;if(_0x953f65){_0x5e8e0b=squel[_0x44b8('0x5d')]()[_0x44b8('0x5e')](_0x44b8('0x5f'))[_0x44b8('0x60')]([_0x44b8('0x67'),_0x44b8('0x61'),_0x44b8('0x62'),_0x44b8('0x63'),_0x44b8('0x78'),'createdAt','updatedAt'],squel[_0x44b8('0x73')]()['field'](_0x44b8('0x66'),_0x44b8('0x67'))[_0x44b8('0x65')]('NOW()','scheduledAt')['field'](_0x44b8('0x79'),'ContactId')[_0x44b8('0x65')](_0x44b8('0x69'),_0x44b8('0x63'))[_0x44b8('0x65')](_0x44b8('0x7a'),_0x44b8('0x78'))[_0x44b8('0x65')](_0x44b8('0x68'),_0x44b8('0x6b'))[_0x44b8('0x65')](_0x44b8('0x68'),_0x44b8('0x6c'))[_0x44b8('0x6d')](_0x44b8('0x7b'))['where'](_0x44b8('0x7c'),_0x5ab8b1[_0x44b8('0x42')]['id'][_0x44b8('0x6f')]())[_0x44b8('0x33')](_0x44b8('0x7d'),_0x5ab8b1[_0x44b8('0x45')][_0x44b8('0x70')][_0x44b8('0x6f')]())[_0x44b8('0x33')](_0x44b8('0x71'))[_0x44b8('0x33')](_0x44b8('0x72'),squel[_0x44b8('0x73')]()['field'](_0x44b8('0x67'))[_0x44b8('0x6d')](_0x44b8('0x5f'))['where']('CampaignId\x20=\x20?',_0x5ab8b1[_0x44b8('0x42')]['id'][_0x44b8('0x6f')]()))[_0x44b8('0x33')]('calleridnum\x20NOT\x20IN\x20(?)',squel[_0x44b8('0x73')]()[_0x44b8('0x65')](_0x44b8('0x7e'))[_0x44b8('0x6d')](_0x44b8('0x7b'))[_0x44b8('0x33')](_0x44b8('0x7c'),_0x5ab8b1[_0x44b8('0x42')]['id']['toString']())[_0x44b8('0x33')](_0x44b8('0x74')))[_0x44b8('0x75')](_0x44b8('0x62')))[_0x44b8('0x6f')]();return db[_0x44b8('0x48')][_0x44b8('0x27')](_0x5e8e0b);}return[];})['then'](respondWithResult(_0x2166df,null))['catch'](handleError(_0x2166df,null));};exports['checkContactHopper']=function(_0x420f4f,_0xc5f9ef,_0x2d74ee){return db[_0x44b8('0x7f')][_0x44b8('0x80')]({'where':{'VoiceQueueId':_0x420f4f[_0x44b8('0x45')][_0x44b8('0x64')],'CampaignId':_0x420f4f[_0x44b8('0x45')][_0x44b8('0x78')],'ContactId':_0x420f4f['body'][_0x44b8('0x62')]}})[_0x44b8('0x1d')](handleEntityNotFound(_0xc5f9ef,null))['then'](function(_0x4e204b){if(_0x4e204b){return _0x4e204b;}return null;})[_0x44b8('0x1d')](respondWithResult(_0xc5f9ef,null))['catch'](handleError(_0xc5f9ef,null));};