3624b58cf56f811a13e29f31cf1777000257aab3
[motion2.git] / server / api / cmContact / cmContact.model.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 _0x0c44=['error','Campaign','timezones','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20onlyIfOpen,\x20exist\x20in\x20hopper\x20Campaign\x20','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20always,\x20exist\x20in\x20hopper\x20Campaign\x20','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20always,\x20exist\x20in\x20hopperFinal\x20Campaign\x20','findAll','outbound','dialCheckDuplicateType','CmList','Lists','length','always','VoiceQueue','BlackLists','CmHopperBlack','onlyIfOpen','cmContact,\x20%s,\x20%s','message','List\x20not\x20found','isEmpty','destroy','ContactId','VoiceQueueId','push','info','inspect','[CmContact][afterDestroy][Error]','lodash','util','api','request-promise','path','rimraf','../../config/environment','../../config/environment/shared','./cmContact.attributes','exports','define','CmContact','phone','fti_cm_contacts','firstName','lastName','mobile','fax','email','FULLTEXT','utf8mb4','utf8mb4_unicode_ci','get','cmContact','afterCreate','scheduledat','YYYY-MM-DD\x20HH:mm:ss','isNil','dialTimezone','then','utcOffset','add','minutes','format','ret','CmHopper','cmContact,\x20afterCreate\x20','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20onlyIfOpen,\x20exist\x20in\x20hopper\x20VoiceQueue\x20','create','ListId','callbackUniqueid','catch','findOne','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20always,\x20exist\x20in\x20hopper\x20VoiceQueue\x20','CmHopperFinal','cmContact,\x20afterCreate,\x20','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20always,\x20exist\x20in\x20hopperFinal\x20VoiceQueue\x20','priority'];(function(_0x1589dd,_0x2b9d22){var _0x1bddd1=function(_0x3687f8){while(--_0x3687f8){_0x1589dd['push'](_0x1589dd['shift']());}};_0x1bddd1(++_0x2b9d22);}(_0x0c44,0x68));var _0x40c4=function(_0x1bdc53,_0x236ace){_0x1bdc53=_0x1bdc53-0x0;var _0x109bd0=_0x0c44[_0x1bdc53];return _0x109bd0;};'use strict';var _=require(_0x40c4('0x0'));var util=require(_0x40c4('0x1'));var logger=require('../../config/logger')(_0x40c4('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x40c4('0x3'));var fs=require('fs');var path=require(_0x40c4('0x4'));var rimraf=require(_0x40c4('0x5'));var config=require(_0x40c4('0x6'));var shared=require(_0x40c4('0x7'));var attributes=require(_0x40c4('0x8'));module[_0x40c4('0x9')]=function(_0x1bd5dd,_0x4c08b9){return _0x1bd5dd[_0x40c4('0xa')](_0x40c4('0xb'),attributes,{'tableName':'cm_contacts','paranoid':!![],'indexes':[{'name':'phone','fields':[_0x40c4('0xc')]},{'name':_0x40c4('0xd'),'fields':[_0x40c4('0xe'),_0x40c4('0xf'),_0x40c4('0xc'),_0x40c4('0x10'),_0x40c4('0x11'),_0x40c4('0x12')],'type':_0x40c4('0x13')}],'timestamps':!![],'charset':_0x40c4('0x14'),'collate':_0x40c4('0x15'),'hooks':{'afterCreate':function(_0x3a7377,_0xb3084b,_0x31b401){var _0x53e8c0=_0x1bd5dd['models'];var _0x1f8243=_0x3a7377[_0x40c4('0x16')]({'plain':!![]});function _0x44dbe(){return function(_0x9f1b41){logger['error'](_0x40c4('0x17'),_0x40c4('0x18'),util['inspect'](_0x9f1b41,{'showHidden':![],'depth':null}));};}function _0x1d2d20(_0x450811,_0x4a47e7){var _0x25ef60=_0x4a47e7[_0x40c4('0x19')]?_0x4a47e7[_0x40c4('0x19')]:moment()['format'](_0x40c4('0x1a'));return new BPromise(function(_0x465089,_0x1c2098){if(_[_0x40c4('0x1b')](_0x4a47e7[_0x40c4('0x1c')])){_0x465089({'ret':_0x25ef60});}else{_0x53e8c0['VoiceQueue']['findOne']({'where':{'id':_0x450811['id']}})[_0x40c4('0x1d')](function(_0x1a3990){if(!_[_0x40c4('0x1b')](_0x1a3990)){var _0xaab405=_0x1a3990[_0x40c4('0x1c')];if(!_[_0x40c4('0x1b')](_0xaab405)){var _0x5ad866=shared['timezones'];var _0x2ae41d=_0x5ad866[_0xaab405];var _0x1e8f6e=_0x5ad866[_0x4a47e7[_0x40c4('0x1c')]];if(!_['isNil'](_0x2ae41d)&&!_[_0x40c4('0x1b')](_0x1e8f6e)){var _0x39766b=_0x2ae41d['utcOffset']-_0x1e8f6e[_0x40c4('0x1e')];_0x25ef60=_0x4a47e7['scheduledat']?_0x4a47e7[_0x40c4('0x19')]:moment();var _0x39c4bc=moment(_0x25ef60)[_0x40c4('0x1f')](_0x39766b,_0x40c4('0x20'));_0x465089({'ret':_0x39c4bc[_0x40c4('0x21')](_0x40c4('0x1a'))});}else _0x465089({'ret':_0x25ef60});}else _0x465089({'ret':_0x25ef60});}else{_0x465089({'ret':_0x25ef60});}});}});return 0xa;}var _0x5954d3=function(_0x470ae8){return new BPromise(function(_0x2e97ee,_0x3e2d3f){_0x1d2d20(_0x470ae8,_0x1f8243)[_0x40c4('0x1d')](function(_0x93ccbe){_0x1f8243[_0x40c4('0x19')]=_0x93ccbe[_0x40c4('0x22')];_0x53e8c0[_0x40c4('0x23')]['findOne']({'where':{'phone':_0x1f8243[_0x40c4('0xc')],'VoiceQueueId':_0x470ae8['id']}})[_0x40c4('0x1d')](function(_0x28fdd3){if(!_[_0x40c4('0x1b')](_0x28fdd3)){throw new Error(_0x40c4('0x24')+_0x1f8243['phone']+_0x40c4('0x25')+_0x470ae8['id']);}return _0x53e8c0[_0x40c4('0x23')][_0x40c4('0x26')]({'phone':_0x1f8243[_0x40c4('0xc')],'ContactId':_0x1f8243['id'],'ListId':_0x1f8243[_0x40c4('0x27')],'priority':_0x1f8243['priority']?_0x1f8243['priority']:0x2,'scheduledat':_0x1f8243[_0x40c4('0x19')]?_0x1f8243[_0x40c4('0x19')]:moment()[_0x40c4('0x21')](_0x40c4('0x1a')),'callback':_0x1f8243[_0x40c4('0x28')]?!![]:![],'callbackuniqueid':_0x1f8243[_0x40c4('0x28')]?_0x1f8243[_0x40c4('0x28')]:undefined,'callbackat':_0x1f8243[_0x40c4('0x28')]?moment()[_0x40c4('0x21')]('YYYY-MM-DD\x20HH:mm:ss'):undefined,'VoiceQueueId':_0x470ae8['id']});})[_0x40c4('0x29')](function(_0x1ef605){_0x3e2d3f(_0x1ef605);});});});};var _0x353d03=function(_0x1d0110){return new BPromise(function(_0x45ce11,_0x27262a){_0x1d2d20(_0x1d0110,_0x1f8243)[_0x40c4('0x1d')](function(_0x19ceaf){_0x1f8243['scheduledat']=_0x19ceaf[_0x40c4('0x22')];_0x53e8c0['CmHopper'][_0x40c4('0x2a')]({'where':{'phone':_0x1f8243[_0x40c4('0xc')],'VoiceQueueId':_0x1d0110['id']}})[_0x40c4('0x1d')](function(_0x3611f0){if(!_['isNil'](_0x3611f0)){throw new Error('cmContact,\x20afterCreate\x20'+_0x1f8243[_0x40c4('0xc')]+_0x40c4('0x2b')+_0x1d0110['id']);}return _0x53e8c0[_0x40c4('0x2c')]['findOne']({'where':{'calleridnum':_0x1f8243[_0x40c4('0xc')],'VoiceQueueId':_0x1d0110['id']}});})[_0x40c4('0x1d')](function(_0x1fd976){if(!_[_0x40c4('0x1b')](_0x1fd976)){throw new Error(_0x40c4('0x2d')+_0x1f8243[_0x40c4('0xc')]+_0x40c4('0x2e')+_0x1d0110['id']);}return _0x53e8c0[_0x40c4('0x23')][_0x40c4('0x26')]({'phone':_0x1f8243[_0x40c4('0xc')],'ContactId':_0x1f8243['id'],'ListId':_0x1f8243['ListId'],'priority':_0x1f8243[_0x40c4('0x2f')]?_0x1f8243[_0x40c4('0x2f')]:0x2,'scheduledat':_0x1f8243['scheduledat']?_0x1f8243[_0x40c4('0x19')]:moment()[_0x40c4('0x21')]('YYYY-MM-DD\x20HH:mm:ss'),'callback':_0x1f8243[_0x40c4('0x28')]?!![]:![],'callbackuniqueid':_0x1f8243['callbackUniqueid']?_0x1f8243[_0x40c4('0x28')]:undefined,'callbackat':_0x1f8243[_0x40c4('0x28')]?moment()[_0x40c4('0x21')](_0x40c4('0x1a')):undefined,'VoiceQueueId':_0x1d0110['id']});})[_0x40c4('0x29')](function(_0x3f8c49){_0x27262a(_0x3f8c49);});});});};function _0x41b1e0(){return function(_0xd220f7){logger[_0x40c4('0x30')](_0x40c4('0x17'),'afterCreate',util['inspect'](_0xd220f7,{'showHidden':![],'depth':null}));};}function _0x307f30(_0x5098c2,_0x5c1742){var _0xa6df1=_0x5c1742['scheduledat']?_0x5c1742[_0x40c4('0x19')]:moment()[_0x40c4('0x21')](_0x40c4('0x1a'));return new BPromise(function(_0x49d662,_0x27f17b){if(_['isNil'](_0x5c1742[_0x40c4('0x1c')])){_0x49d662({'ret':_0xa6df1});}else{_0x53e8c0[_0x40c4('0x31')]['findOne']({'where':{'id':_0x5098c2['id']}})['then'](function(_0x15c80e){if(!_[_0x40c4('0x1b')](_0x15c80e)){var _0x290b21=_0x15c80e[_0x40c4('0x1c')];if(!_[_0x40c4('0x1b')](_0x290b21)){var _0x369130=shared[_0x40c4('0x32')];var _0xc0e0e4=_0x369130[_0x290b21];var _0x547932=_0x369130[_0x5c1742['dialTimezone']];if(!_[_0x40c4('0x1b')](_0xc0e0e4)&&!_['isNil'](_0x547932)){var _0x5ba089=_0xc0e0e4[_0x40c4('0x1e')]-_0x547932[_0x40c4('0x1e')];_0xa6df1=_0x5c1742[_0x40c4('0x19')]?_0x5c1742['scheduledat']:moment();var _0x5ba76a=moment(_0xa6df1)[_0x40c4('0x1f')](_0x5ba089,_0x40c4('0x20'));_0x49d662({'ret':_0x5ba76a[_0x40c4('0x21')]('YYYY-MM-DD\x20HH:mm:ss')});}else _0x49d662({'ret':_0xa6df1});}else _0x49d662({'ret':_0xa6df1});}else{_0x49d662({'ret':_0xa6df1});}});}});return 0xa;}var _0x306170=function(_0x20e6c8){return new BPromise(function(_0x43ac7d,_0xa9cddc){_0x307f30(_0x20e6c8,_0x1f8243)[_0x40c4('0x1d')](function(_0x487ec8){_0x1f8243['scheduledat']=_0x487ec8[_0x40c4('0x22')];_0x53e8c0['CmHopper'][_0x40c4('0x2a')]({'where':{'phone':_0x1f8243[_0x40c4('0xc')],'CampaignId':_0x20e6c8['id']}})['then'](function(_0x312782){if(!_[_0x40c4('0x1b')](_0x312782)){throw new Error(_0x40c4('0x24')+_0x1f8243[_0x40c4('0xc')]+_0x40c4('0x33')+_0x20e6c8['id']);}return _0x53e8c0['CmHopper'][_0x40c4('0x26')]({'phone':_0x1f8243[_0x40c4('0xc')],'ContactId':_0x1f8243['id'],'ListId':_0x1f8243[_0x40c4('0x27')],'priority':_0x1f8243[_0x40c4('0x2f')]?_0x1f8243[_0x40c4('0x2f')]:0x2,'scheduledat':_0x1f8243['scheduledat']?_0x1f8243[_0x40c4('0x19')]:moment()[_0x40c4('0x21')](_0x40c4('0x1a')),'callback':_0x1f8243[_0x40c4('0x28')]?!![]:![],'callbackuniqueid':_0x1f8243['callbackUniqueid']?_0x1f8243['callbackUniqueid']:undefined,'callbackat':_0x1f8243[_0x40c4('0x28')]?moment()[_0x40c4('0x21')](_0x40c4('0x1a')):undefined,'CampaignId':_0x20e6c8['id']});})[_0x40c4('0x29')](function(_0x6d8557){_0xa9cddc(_0x6d8557);});});});};var _0x4f847f=function(_0x126d44){return new BPromise(function(_0x5141d4,_0x45433e){_0x307f30(_0x126d44,_0x1f8243)[_0x40c4('0x1d')](function(_0x5bd6e8){_0x1f8243[_0x40c4('0x19')]=_0x5bd6e8['ret'];_0x53e8c0[_0x40c4('0x23')][_0x40c4('0x2a')]({'where':{'phone':_0x1f8243[_0x40c4('0xc')],'CampaignId':_0x126d44['id']}})[_0x40c4('0x1d')](function(_0x1be40f){if(!_[_0x40c4('0x1b')](_0x1be40f)){throw new Error('cmContact,\x20afterCreate\x20'+_0x1f8243[_0x40c4('0xc')]+_0x40c4('0x34')+_0x126d44['id']);}return _0x53e8c0['CmHopperFinal'][_0x40c4('0x2a')]({'where':{'calleridnum':_0x1f8243[_0x40c4('0xc')],'CampaignId':_0x126d44['id']}});})[_0x40c4('0x1d')](function(_0x2a68a5){if(!_[_0x40c4('0x1b')](_0x2a68a5)){throw new Error('cmContact,\x20afterCreate,\x20'+_0x1f8243[_0x40c4('0xc')]+_0x40c4('0x35')+_0x126d44['id']);}return _0x53e8c0[_0x40c4('0x23')][_0x40c4('0x26')]({'phone':_0x1f8243[_0x40c4('0xc')],'ContactId':_0x1f8243['id'],'ListId':_0x1f8243[_0x40c4('0x27')],'priority':_0x1f8243[_0x40c4('0x2f')]?_0x1f8243[_0x40c4('0x2f')]:0x2,'scheduledat':_0x1f8243[_0x40c4('0x19')]?_0x1f8243[_0x40c4('0x19')]:moment()['format'](_0x40c4('0x1a')),'callback':_0x1f8243[_0x40c4('0x28')]?!![]:![],'callbackuniqueid':_0x1f8243['callbackUniqueid']?_0x1f8243[_0x40c4('0x28')]:undefined,'callbackat':_0x1f8243[_0x40c4('0x28')]?moment()[_0x40c4('0x21')](_0x40c4('0x1a')):undefined,'CampaignId':_0x126d44['id']});})['catch'](function(_0x21809a){_0x45433e(_0x21809a);});});});};if(_0x1f8243[_0x40c4('0x27')]){_0x53e8c0['VoiceQueue'][_0x40c4('0x36')]({'where':{'type':_0x40c4('0x37')},'attributes':['id',_0x40c4('0x38'),_0x40c4('0x1c')],'include':[{'model':_0x53e8c0[_0x40c4('0x39')],'as':_0x40c4('0x3a'),'where':{'id':_0x1f8243[_0x40c4('0x27')]}}]})['then'](function(_0x30ae49){if(_0x30ae49){var _0x4f1191=[];for(var _0x153ae2=0x0,_0x59bea5;_0x153ae2<_0x30ae49[_0x40c4('0x3b')];_0x153ae2+=0x1){_0x59bea5=_0x30ae49[_0x153ae2][_0x40c4('0x16')]({'plain':!![]});switch(_0x59bea5[_0x40c4('0x38')]){case _0x40c4('0x3c'):_0x353d03(_0x59bea5)[_0x40c4('0x29')](_0x44dbe());break;case'onlyIfOpen':_0x5954d3(_0x59bea5)[_0x40c4('0x29')](_0x44dbe());break;default:_0x307f30(_0x59bea5,_0x1f8243)['then'](function(_0x414cb7){_0x1f8243['scheduledat']=_0x414cb7[_0x40c4('0x22')];_0x53e8c0[_0x40c4('0x23')][_0x40c4('0x26')]({'phone':_0x1f8243['phone'],'ContactId':_0x1f8243['id'],'ListId':_0x1f8243[_0x40c4('0x27')],'scheduledat':_0x1f8243[_0x40c4('0x19')]?_0x1f8243['scheduledat']:moment()[_0x40c4('0x21')](_0x40c4('0x1a')),'priority':_0x1f8243['priority']?_0x1f8243[_0x40c4('0x2f')]:0x2,'callback':_0x1f8243[_0x40c4('0x28')]?!![]:![],'callbackuniqueid':_0x1f8243[_0x40c4('0x28')]?_0x1f8243[_0x40c4('0x28')]:undefined,'callbackat':_0x1f8243[_0x40c4('0x28')]?moment()[_0x40c4('0x21')](_0x40c4('0x1a')):undefined,'VoiceQueueId':_0x59bea5['id']})[_0x40c4('0x29')](_0x44dbe());});}}}})['then'](function(){return _0x53e8c0[_0x40c4('0x3d')][_0x40c4('0x36')]({'where':{'type':_0x40c4('0x37')},'attributes':['id'],'include':[{'model':_0x53e8c0[_0x40c4('0x39')],'as':_0x40c4('0x3e'),'where':{'id':_0x1f8243[_0x40c4('0x27')]}}]})[_0x40c4('0x1d')](function(_0x33fe17){if(_0x33fe17){var _0x2f47c8=[];for(var _0x5474a1=0x0,_0x3b108d;_0x5474a1<_0x33fe17['length'];_0x5474a1+=0x1){_0x3b108d=_0x33fe17[_0x5474a1][_0x40c4('0x16')]({'plain':!![]});_0x53e8c0[_0x40c4('0x3f')]['create']({'phone':_0x1f8243['phone'],'ContactId':_0x1f8243['id'],'ListId':_0x1f8243['ListId'],'VoiceQueueId':_0x3b108d['id']})['catch'](function(_0x156507){logger[_0x40c4('0x30')]('cmContact,\x20%s,\x20%s',_0x40c4('0x18'),_0x156507['message']);});}}});})[_0x40c4('0x1d')](function(){return _0x53e8c0['Campaign'][_0x40c4('0x36')]({'attributes':['id',_0x40c4('0x38'),'dialTimezone'],'include':[{'model':_0x53e8c0['CmList'],'as':_0x40c4('0x3a'),'where':{'id':_0x1f8243[_0x40c4('0x27')]}}]})['then'](function(_0x2da048){if(_0x2da048){var _0x151736=[];for(var _0x2e7436=0x0,_0x3701b1;_0x2e7436<_0x2da048['length'];_0x2e7436+=0x1){_0x3701b1=_0x2da048[_0x2e7436][_0x40c4('0x16')]({'plain':!![]});switch(_0x3701b1[_0x40c4('0x38')]){case'always':_0x4f847f(_0x3701b1)[_0x40c4('0x29')](_0x41b1e0());break;case _0x40c4('0x40'):_0x306170(_0x3701b1)[_0x40c4('0x29')](_0x41b1e0());break;default:_0x53e8c0['CmHopper'][_0x40c4('0x26')]({'phone':_0x1f8243[_0x40c4('0xc')],'ContactId':_0x1f8243['id'],'ListId':_0x1f8243[_0x40c4('0x27')],'scheduledat':_0x1f8243['scheduledat']?_0x1f8243[_0x40c4('0x19')]:moment()[_0x40c4('0x21')](_0x40c4('0x1a')),'priority':_0x1f8243['priority']?_0x1f8243[_0x40c4('0x2f')]:0x2,'callback':_0x1f8243[_0x40c4('0x28')]?!![]:![],'callbackuniqueid':_0x1f8243['callbackUniqueid']?_0x1f8243['callbackUniqueid']:undefined,'callbackat':_0x1f8243['callbackUniqueid']?moment()[_0x40c4('0x21')]('YYYY-MM-DD\x20HH:mm:ss'):undefined,'CampaignId':_0x3701b1['id']})[_0x40c4('0x29')](_0x41b1e0());}}}});})[_0x40c4('0x1d')](function(){return _0x53e8c0[_0x40c4('0x31')][_0x40c4('0x36')]({'attributes':['id'],'include':[{'model':_0x53e8c0[_0x40c4('0x39')],'as':_0x40c4('0x3e'),'where':{'id':_0x1f8243[_0x40c4('0x27')]}}]})['then'](function(_0x1434f2){if(_0x1434f2){var _0x528292=[];for(var _0x19dda8=0x0,_0x5aad09;_0x19dda8<_0x1434f2['length'];_0x19dda8+=0x1){_0x5aad09=_0x1434f2[_0x19dda8][_0x40c4('0x16')]({'plain':!![]});_0x53e8c0['CmHopperBlack'][_0x40c4('0x26')]({'phone':_0x1f8243[_0x40c4('0xc')],'ContactId':_0x1f8243['id'],'ListId':_0x1f8243[_0x40c4('0x27')],'CampaignId':_0x5aad09['id']})['catch'](function(_0x4d2908){logger['error'](_0x40c4('0x41'),_0x40c4('0x18'),_0x4d2908['message']);});}}});})[_0x40c4('0x1d')](function(){_0x31b401();})[_0x40c4('0x29')](function(_0x5d6cf8){logger[_0x40c4('0x30')](_0x40c4('0x41'),_0x40c4('0x18'),_0x5d6cf8[_0x40c4('0x42')]);_0x31b401(_0x5d6cf8);});}else{_0x31b401(new Error(_0x40c4('0x43')));}},'afterDestroy':function(_0x52ffd6,_0x297cca,_0x2912ba){var _0x19f0e8=_0x1bd5dd['models'];var _0x1bd513=_0x52ffd6['get']({'plain':!![]});return _0x19f0e8[_0x40c4('0x23')][_0x40c4('0x36')]({'raw':!![],'where':{'ListId':_0x1bd513[_0x40c4('0x27')],'ContactId':_0x1bd513['id']}})[_0x40c4('0x1d')](function(_0x3f963f){if(!_[_0x40c4('0x44')](_0x3f963f)){var _0x38f632=[];for(var _0x9b4731=0x0;_0x9b4731<_0x3f963f[_0x40c4('0x3b')];_0x9b4731+=0x1){var _0x4bee65=_0x19f0e8[_0x40c4('0x23')][_0x40c4('0x45')]({'where':{'ListId':_0x3f963f[_0x9b4731]['ListId'],'ContactId':_0x3f963f[_0x9b4731][_0x40c4('0x46')],'VoiceQueueId':_0x3f963f[_0x9b4731][_0x40c4('0x47')],'CampaignId':_0x3f963f[_0x9b4731]['CampaignId']}});_0x38f632[_0x40c4('0x48')](_0x4bee65);}return BPromise['all'](_0x38f632);}})[_0x40c4('0x1d')](function(_0x424a36){logger[_0x40c4('0x49')]('[CmContact][afterDestroy][Succesfull]',util[_0x40c4('0x4a')](_0x424a36,{'showHidden':![],'depth':null}));_0x2912ba();})[_0x40c4('0x29')](function(_0x43921c){logger[_0x40c4('0x30')](_0x40c4('0x4b'),util[_0x40c4('0x4a')](_0x43921c,{'showHidden':![],'depth':null}));_0x2912ba(_0x43921c);});}}});};