Built motion from commit fda31434.|2.5.44
[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 _0xbf2a=['CmHopperBlack','message','cmContact,\x20%s,\x20%s','List\x20not\x20found','destroy','ContactId','VoiceQueueId','CampaignId','push','all','info','[CmContact][afterDestroy][Succesfull]','[CmContact][afterDestroy][Error]','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./cmContact.attributes','CmContact','cm_contacts','phone','fti_cm_contacts','mobile','fax','email','FULLTEXT','utf8mb4','models','get','error','cmContact','afterCreate','inspect','scheduledat','format','YYYY-MM-DD\x20HH:mm:ss','isNil','VoiceQueue','then','dialTimezone','timezones','utcOffset','add','minutes','ret','CmHopper','findOne','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20onlyIfOpen,\x20exist\x20in\x20hopper\x20VoiceQueue\x20','create','priority','callbackUniqueid','catch','cmContact,\x20afterCreate\x20','\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','ListId','Campaign','\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','outbound','dialCheckDuplicateType','Lists','length','onlyIfOpen','findAll','CmList','BlackLists'];(function(_0x57be6c,_0x4b6fdf){var _0x2c0b79=function(_0x40e9db){while(--_0x40e9db){_0x57be6c['push'](_0x57be6c['shift']());}};_0x2c0b79(++_0x4b6fdf);}(_0xbf2a,0x139));var _0xabf2=function(_0x2aaf0c,_0x120301){_0x2aaf0c=_0x2aaf0c-0x0;var _0x2ccbed=_0xbf2a[_0x2aaf0c];return _0x2ccbed;};'use strict';var _=require(_0xabf2('0x0'));var util=require(_0xabf2('0x1'));var logger=require(_0xabf2('0x2'))(_0xabf2('0x3'));var moment=require(_0xabf2('0x4'));var BPromise=require(_0xabf2('0x5'));var rp=require(_0xabf2('0x6'));var fs=require('fs');var path=require(_0xabf2('0x7'));var rimraf=require(_0xabf2('0x8'));var config=require(_0xabf2('0x9'));var shared=require('../../config/environment/shared');var attributes=require(_0xabf2('0xa'));module['exports']=function(_0x5276d5,_0x3840b5){return _0x5276d5['define'](_0xabf2('0xb'),attributes,{'tableName':_0xabf2('0xc'),'paranoid':!![],'indexes':[{'name':_0xabf2('0xd'),'fields':[_0xabf2('0xd')]},{'name':_0xabf2('0xe'),'fields':['firstName','lastName',_0xabf2('0xd'),_0xabf2('0xf'),_0xabf2('0x10'),_0xabf2('0x11')],'type':_0xabf2('0x12')}],'timestamps':!![],'charset':_0xabf2('0x13'),'collate':'utf8mb4_unicode_ci','hooks':{'afterCreate':function(_0x1984a4,_0x2583ba,_0x57dfd4){var _0x2d36ef=_0x5276d5[_0xabf2('0x14')];var _0x14f127=_0x1984a4[_0xabf2('0x15')]({'plain':!![]});function _0x544d04(){return function(_0x50aefd){logger[_0xabf2('0x16')](_0xabf2('0x17'),_0xabf2('0x18'),util[_0xabf2('0x19')](_0x50aefd,{'showHidden':![],'depth':null}));};}function _0x10e176(_0x34db3b,_0x89a3db){var _0x417cdf=_0x89a3db[_0xabf2('0x1a')]?_0x89a3db[_0xabf2('0x1a')]:moment()[_0xabf2('0x1b')](_0xabf2('0x1c'));return new BPromise(function(_0x2da4d7,_0x5e89fb){if(_[_0xabf2('0x1d')](_0x89a3db['dialTimezone'])){_0x2da4d7({'ret':_0x417cdf});}else{_0x2d36ef[_0xabf2('0x1e')]['findOne']({'where':{'id':_0x34db3b['id']}})[_0xabf2('0x1f')](function(_0x504558){if(!_['isNil'](_0x504558)){var _0x165c29=_0x504558[_0xabf2('0x20')];if(!_[_0xabf2('0x1d')](_0x165c29)){var _0x5186df=shared[_0xabf2('0x21')];var _0x5eccbf=_0x5186df[_0x165c29];var _0xd60068=_0x5186df[_0x89a3db[_0xabf2('0x20')]];if(!_['isNil'](_0x5eccbf)&&!_[_0xabf2('0x1d')](_0xd60068)){var _0x470477=_0x5eccbf[_0xabf2('0x22')]-_0xd60068[_0xabf2('0x22')];_0x417cdf=_0x89a3db['scheduledat']?_0x89a3db[_0xabf2('0x1a')]:moment();var _0xcece4a=moment(_0x417cdf)[_0xabf2('0x23')](_0x470477,_0xabf2('0x24'));_0x2da4d7({'ret':_0xcece4a[_0xabf2('0x1b')]('YYYY-MM-DD\x20HH:mm:ss')});}else _0x2da4d7({'ret':_0x417cdf});}else _0x2da4d7({'ret':_0x417cdf});}else{_0x2da4d7({'ret':_0x417cdf});}});}});return 0xa;}var _0x2cdf64=function(_0x3ba097){return new BPromise(function(_0x346cb6,_0x548bd4){_0x10e176(_0x3ba097,_0x14f127)[_0xabf2('0x1f')](function(_0x56b810){_0x14f127[_0xabf2('0x1a')]=_0x56b810[_0xabf2('0x25')];_0x2d36ef[_0xabf2('0x26')][_0xabf2('0x27')]({'where':{'phone':_0x14f127['phone'],'VoiceQueueId':_0x3ba097['id']}})[_0xabf2('0x1f')](function(_0x15a97b){if(!_[_0xabf2('0x1d')](_0x15a97b)){throw new Error('cmContact,\x20afterCreate\x20'+_0x14f127[_0xabf2('0xd')]+_0xabf2('0x28')+_0x3ba097['id']);}return _0x2d36ef[_0xabf2('0x26')][_0xabf2('0x29')]({'phone':_0x14f127[_0xabf2('0xd')],'ContactId':_0x14f127['id'],'ListId':_0x14f127['ListId'],'priority':_0x14f127[_0xabf2('0x2a')]?_0x14f127[_0xabf2('0x2a')]:0x2,'scheduledat':_0x14f127[_0xabf2('0x1a')]?_0x14f127[_0xabf2('0x1a')]:moment()[_0xabf2('0x1b')]('YYYY-MM-DD\x20HH:mm:ss'),'callback':_0x14f127[_0xabf2('0x2b')]?!![]:![],'callbackuniqueid':_0x14f127[_0xabf2('0x2b')]?_0x14f127[_0xabf2('0x2b')]:undefined,'callbackat':_0x14f127[_0xabf2('0x2b')]?moment()[_0xabf2('0x1b')](_0xabf2('0x1c')):undefined,'VoiceQueueId':_0x3ba097['id']});})[_0xabf2('0x2c')](function(_0x223d01){_0x548bd4(_0x223d01);});});});};var _0x1f22cb=function(_0x42aa45){return new BPromise(function(_0x907b96,_0x5d4aa9){_0x10e176(_0x42aa45,_0x14f127)[_0xabf2('0x1f')](function(_0x5b3421){_0x14f127[_0xabf2('0x1a')]=_0x5b3421['ret'];_0x2d36ef['CmHopper']['findOne']({'where':{'phone':_0x14f127[_0xabf2('0xd')],'VoiceQueueId':_0x42aa45['id']}})[_0xabf2('0x1f')](function(_0x5dcd34){if(!_[_0xabf2('0x1d')](_0x5dcd34)){throw new Error(_0xabf2('0x2d')+_0x14f127['phone']+_0xabf2('0x2e')+_0x42aa45['id']);}return _0x2d36ef[_0xabf2('0x2f')]['findOne']({'where':{'calleridnum':_0x14f127[_0xabf2('0xd')],'VoiceQueueId':_0x42aa45['id']}});})[_0xabf2('0x1f')](function(_0x37a4fb){if(!_[_0xabf2('0x1d')](_0x37a4fb)){throw new Error(_0xabf2('0x30')+_0x14f127['phone']+_0xabf2('0x31')+_0x42aa45['id']);}return _0x2d36ef[_0xabf2('0x26')]['create']({'phone':_0x14f127[_0xabf2('0xd')],'ContactId':_0x14f127['id'],'ListId':_0x14f127[_0xabf2('0x32')],'priority':_0x14f127[_0xabf2('0x2a')]?_0x14f127[_0xabf2('0x2a')]:0x2,'scheduledat':_0x14f127[_0xabf2('0x1a')]?_0x14f127[_0xabf2('0x1a')]:moment()[_0xabf2('0x1b')](_0xabf2('0x1c')),'callback':_0x14f127['callbackUniqueid']?!![]:![],'callbackuniqueid':_0x14f127[_0xabf2('0x2b')]?_0x14f127[_0xabf2('0x2b')]:undefined,'callbackat':_0x14f127[_0xabf2('0x2b')]?moment()['format'](_0xabf2('0x1c')):undefined,'VoiceQueueId':_0x42aa45['id']});})[_0xabf2('0x2c')](function(_0x398a91){_0x5d4aa9(_0x398a91);});});});};function _0xe125aa(){return function(_0x4bab16){logger[_0xabf2('0x16')](_0xabf2('0x17'),_0xabf2('0x18'),util[_0xabf2('0x19')](_0x4bab16,{'showHidden':![],'depth':null}));};}function _0x4afdfd(_0x5db1fb,_0x4b0f0b){var _0xa57107=_0x4b0f0b['scheduledat']?_0x4b0f0b[_0xabf2('0x1a')]:moment()['format'](_0xabf2('0x1c'));return new BPromise(function(_0x39ea51,_0x21213f){if(_[_0xabf2('0x1d')](_0x4b0f0b[_0xabf2('0x20')])){_0x39ea51({'ret':_0xa57107});}else{_0x2d36ef[_0xabf2('0x33')][_0xabf2('0x27')]({'where':{'id':_0x5db1fb['id']}})[_0xabf2('0x1f')](function(_0xe9bde2){if(!_[_0xabf2('0x1d')](_0xe9bde2)){var _0x51d9dd=_0xe9bde2['dialTimezone'];if(!_[_0xabf2('0x1d')](_0x51d9dd)){var _0x26256b=shared[_0xabf2('0x21')];var _0x1248f0=_0x26256b[_0x51d9dd];var _0x351344=_0x26256b[_0x4b0f0b[_0xabf2('0x20')]];if(!_[_0xabf2('0x1d')](_0x1248f0)&&!_[_0xabf2('0x1d')](_0x351344)){var _0x4cf2b3=_0x1248f0['utcOffset']-_0x351344[_0xabf2('0x22')];_0xa57107=_0x4b0f0b[_0xabf2('0x1a')]?_0x4b0f0b['scheduledat']:moment();var _0x117a5d=moment(_0xa57107)[_0xabf2('0x23')](_0x4cf2b3,_0xabf2('0x24'));_0x39ea51({'ret':_0x117a5d['format'](_0xabf2('0x1c'))});}else _0x39ea51({'ret':_0xa57107});}else _0x39ea51({'ret':_0xa57107});}else{_0x39ea51({'ret':_0xa57107});}});}});return 0xa;}var _0x396030=function(_0x390811){return new BPromise(function(_0x3ff7ab,_0x50e273){_0x4afdfd(_0x390811,_0x14f127)[_0xabf2('0x1f')](function(_0x2ee4ac){_0x14f127[_0xabf2('0x1a')]=_0x2ee4ac['ret'];_0x2d36ef['CmHopper'][_0xabf2('0x27')]({'where':{'phone':_0x14f127['phone'],'CampaignId':_0x390811['id']}})[_0xabf2('0x1f')](function(_0x28c9b7){if(!_[_0xabf2('0x1d')](_0x28c9b7)){throw new Error(_0xabf2('0x2d')+_0x14f127[_0xabf2('0xd')]+_0xabf2('0x34')+_0x390811['id']);}return _0x2d36ef['CmHopper'][_0xabf2('0x29')]({'phone':_0x14f127['phone'],'ContactId':_0x14f127['id'],'ListId':_0x14f127[_0xabf2('0x32')],'priority':_0x14f127[_0xabf2('0x2a')]?_0x14f127[_0xabf2('0x2a')]:0x2,'scheduledat':_0x14f127[_0xabf2('0x1a')]?_0x14f127['scheduledat']:moment()['format'](_0xabf2('0x1c')),'callback':_0x14f127[_0xabf2('0x2b')]?!![]:![],'callbackuniqueid':_0x14f127[_0xabf2('0x2b')]?_0x14f127[_0xabf2('0x2b')]:undefined,'callbackat':_0x14f127[_0xabf2('0x2b')]?moment()[_0xabf2('0x1b')](_0xabf2('0x1c')):undefined,'CampaignId':_0x390811['id']});})['catch'](function(_0x392f06){_0x50e273(_0x392f06);});});});};var _0x5dd1da=function(_0x4b6f61){return new BPromise(function(_0x431bb8,_0x10a64d){_0x4afdfd(_0x4b6f61,_0x14f127)[_0xabf2('0x1f')](function(_0x1f876a){_0x14f127[_0xabf2('0x1a')]=_0x1f876a[_0xabf2('0x25')];_0x2d36ef['CmHopper']['findOne']({'where':{'phone':_0x14f127['phone'],'CampaignId':_0x4b6f61['id']}})[_0xabf2('0x1f')](function(_0x520591){if(!_[_0xabf2('0x1d')](_0x520591)){throw new Error(_0xabf2('0x2d')+_0x14f127['phone']+_0xabf2('0x35')+_0x4b6f61['id']);}return _0x2d36ef[_0xabf2('0x2f')]['findOne']({'where':{'calleridnum':_0x14f127[_0xabf2('0xd')],'CampaignId':_0x4b6f61['id']}});})[_0xabf2('0x1f')](function(_0x2da956){if(!_[_0xabf2('0x1d')](_0x2da956)){throw new Error(_0xabf2('0x30')+_0x14f127[_0xabf2('0xd')]+'\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20always,\x20exist\x20in\x20hopperFinal\x20Campaign\x20'+_0x4b6f61['id']);}return _0x2d36ef['CmHopper']['create']({'phone':_0x14f127['phone'],'ContactId':_0x14f127['id'],'ListId':_0x14f127[_0xabf2('0x32')],'priority':_0x14f127[_0xabf2('0x2a')]?_0x14f127[_0xabf2('0x2a')]:0x2,'scheduledat':_0x14f127['scheduledat']?_0x14f127[_0xabf2('0x1a')]:moment()[_0xabf2('0x1b')](_0xabf2('0x1c')),'callback':_0x14f127[_0xabf2('0x2b')]?!![]:![],'callbackuniqueid':_0x14f127['callbackUniqueid']?_0x14f127['callbackUniqueid']:undefined,'callbackat':_0x14f127['callbackUniqueid']?moment()['format']('YYYY-MM-DD\x20HH:mm:ss'):undefined,'CampaignId':_0x4b6f61['id']});})[_0xabf2('0x2c')](function(_0x3f4e92){_0x10a64d(_0x3f4e92);});});});};if(_0x14f127['ListId']){_0x2d36ef['VoiceQueue']['findAll']({'where':{'type':_0xabf2('0x36')},'attributes':['id',_0xabf2('0x37'),_0xabf2('0x20')],'include':[{'model':_0x2d36ef['CmList'],'as':_0xabf2('0x38'),'where':{'id':_0x14f127[_0xabf2('0x32')]}}]})[_0xabf2('0x1f')](function(_0x355cdf){if(_0x355cdf){var _0x3d4b16=[];for(var _0x5f1875=0x0,_0x1f20d6;_0x5f1875<_0x355cdf[_0xabf2('0x39')];_0x5f1875+=0x1){_0x1f20d6=_0x355cdf[_0x5f1875][_0xabf2('0x15')]({'plain':!![]});switch(_0x1f20d6[_0xabf2('0x37')]){case'always':_0x1f22cb(_0x1f20d6)[_0xabf2('0x2c')](_0x544d04());break;case _0xabf2('0x3a'):_0x2cdf64(_0x1f20d6)[_0xabf2('0x2c')](_0x544d04());break;default:_0x4afdfd(_0x1f20d6,_0x14f127)[_0xabf2('0x1f')](function(_0x440943){_0x14f127[_0xabf2('0x1a')]=_0x440943[_0xabf2('0x25')];_0x2d36ef[_0xabf2('0x26')]['create']({'phone':_0x14f127[_0xabf2('0xd')],'ContactId':_0x14f127['id'],'ListId':_0x14f127['ListId'],'scheduledat':_0x14f127[_0xabf2('0x1a')]?_0x14f127[_0xabf2('0x1a')]:moment()['format']('YYYY-MM-DD\x20HH:mm:ss'),'priority':_0x14f127[_0xabf2('0x2a')]?_0x14f127[_0xabf2('0x2a')]:0x2,'callback':_0x14f127['callbackUniqueid']?!![]:![],'callbackuniqueid':_0x14f127[_0xabf2('0x2b')]?_0x14f127['callbackUniqueid']:undefined,'callbackat':_0x14f127[_0xabf2('0x2b')]?moment()[_0xabf2('0x1b')]('YYYY-MM-DD\x20HH:mm:ss'):undefined,'VoiceQueueId':_0x1f20d6['id']})[_0xabf2('0x2c')](_0x544d04());});}}}})[_0xabf2('0x1f')](function(){return _0x2d36ef['VoiceQueue'][_0xabf2('0x3b')]({'where':{'type':_0xabf2('0x36')},'attributes':['id'],'include':[{'model':_0x2d36ef[_0xabf2('0x3c')],'as':_0xabf2('0x3d'),'where':{'id':_0x14f127[_0xabf2('0x32')]}}]})[_0xabf2('0x1f')](function(_0x593407){if(_0x593407){var _0x75a92e=[];for(var _0x3ace61=0x0,_0x8e21ca;_0x3ace61<_0x593407[_0xabf2('0x39')];_0x3ace61+=0x1){_0x8e21ca=_0x593407[_0x3ace61][_0xabf2('0x15')]({'plain':!![]});_0x2d36ef[_0xabf2('0x3e')][_0xabf2('0x29')]({'phone':_0x14f127[_0xabf2('0xd')],'ContactId':_0x14f127['id'],'ListId':_0x14f127[_0xabf2('0x32')],'VoiceQueueId':_0x8e21ca['id']})[_0xabf2('0x2c')](function(_0x31afe3){logger[_0xabf2('0x16')]('cmContact,\x20%s,\x20%s',_0xabf2('0x18'),_0x31afe3[_0xabf2('0x3f')]);});}}});})[_0xabf2('0x1f')](function(){return _0x2d36ef[_0xabf2('0x33')]['findAll']({'attributes':['id',_0xabf2('0x37'),_0xabf2('0x20')],'include':[{'model':_0x2d36ef[_0xabf2('0x3c')],'as':_0xabf2('0x38'),'where':{'id':_0x14f127['ListId']}}]})[_0xabf2('0x1f')](function(_0x4235a3){if(_0x4235a3){var _0x5c83f0=[];for(var _0xb561=0x0,_0x5139f6;_0xb561<_0x4235a3[_0xabf2('0x39')];_0xb561+=0x1){_0x5139f6=_0x4235a3[_0xb561][_0xabf2('0x15')]({'plain':!![]});switch(_0x5139f6['dialCheckDuplicateType']){case'always':_0x5dd1da(_0x5139f6)[_0xabf2('0x2c')](_0xe125aa());break;case'onlyIfOpen':_0x396030(_0x5139f6)['catch'](_0xe125aa());break;default:_0x2d36ef[_0xabf2('0x26')][_0xabf2('0x29')]({'phone':_0x14f127['phone'],'ContactId':_0x14f127['id'],'ListId':_0x14f127[_0xabf2('0x32')],'scheduledat':_0x14f127[_0xabf2('0x1a')]?_0x14f127[_0xabf2('0x1a')]:moment()[_0xabf2('0x1b')]('YYYY-MM-DD\x20HH:mm:ss'),'priority':_0x14f127[_0xabf2('0x2a')]?_0x14f127[_0xabf2('0x2a')]:0x2,'callback':_0x14f127[_0xabf2('0x2b')]?!![]:![],'callbackuniqueid':_0x14f127[_0xabf2('0x2b')]?_0x14f127[_0xabf2('0x2b')]:undefined,'callbackat':_0x14f127[_0xabf2('0x2b')]?moment()[_0xabf2('0x1b')](_0xabf2('0x1c')):undefined,'CampaignId':_0x5139f6['id']})[_0xabf2('0x2c')](_0xe125aa());}}}});})[_0xabf2('0x1f')](function(){return _0x2d36ef[_0xabf2('0x33')][_0xabf2('0x3b')]({'attributes':['id'],'include':[{'model':_0x2d36ef['CmList'],'as':_0xabf2('0x3d'),'where':{'id':_0x14f127[_0xabf2('0x32')]}}]})[_0xabf2('0x1f')](function(_0x5d18da){if(_0x5d18da){var _0xede813=[];for(var _0x118b0b=0x0,_0x71dce5;_0x118b0b<_0x5d18da['length'];_0x118b0b+=0x1){_0x71dce5=_0x5d18da[_0x118b0b][_0xabf2('0x15')]({'plain':!![]});_0x2d36ef[_0xabf2('0x3e')]['create']({'phone':_0x14f127['phone'],'ContactId':_0x14f127['id'],'ListId':_0x14f127[_0xabf2('0x32')],'CampaignId':_0x71dce5['id']})[_0xabf2('0x2c')](function(_0x5629f4){logger[_0xabf2('0x16')](_0xabf2('0x40'),'afterCreate',_0x5629f4[_0xabf2('0x3f')]);});}}});})['then'](function(){_0x57dfd4();})[_0xabf2('0x2c')](function(_0x4bd8b9){logger['error'](_0xabf2('0x40'),_0xabf2('0x18'),_0x4bd8b9[_0xabf2('0x3f')]);_0x57dfd4(_0x4bd8b9);});}else{_0x57dfd4(new Error(_0xabf2('0x41')));}},'afterDestroy':function(_0x329ec8,_0x45562c,_0x2a621d){var _0x2b9abe=_0x5276d5[_0xabf2('0x14')];var _0x167be2=_0x329ec8[_0xabf2('0x15')]({'plain':!![]});return _0x2b9abe['CmHopper'][_0xabf2('0x3b')]({'raw':!![],'where':{'ListId':_0x167be2['ListId'],'ContactId':_0x167be2['id']}})[_0xabf2('0x1f')](function(_0xb8dc0){if(!_['isEmpty'](_0xb8dc0)){var _0xe34c61=[];for(var _0x1dbddf=0x0;_0x1dbddf<_0xb8dc0[_0xabf2('0x39')];_0x1dbddf+=0x1){var _0x1cae51=_0x2b9abe[_0xabf2('0x26')][_0xabf2('0x42')]({'where':{'ListId':_0xb8dc0[_0x1dbddf]['ListId'],'ContactId':_0xb8dc0[_0x1dbddf][_0xabf2('0x43')],'VoiceQueueId':_0xb8dc0[_0x1dbddf][_0xabf2('0x44')],'CampaignId':_0xb8dc0[_0x1dbddf][_0xabf2('0x45')]}});_0xe34c61[_0xabf2('0x46')](_0x1cae51);}return BPromise[_0xabf2('0x47')](_0xe34c61);}})[_0xabf2('0x1f')](function(_0x36238a){logger[_0xabf2('0x48')](_0xabf2('0x49'),util['inspect'](_0x36238a,{'showHidden':![],'depth':null}));_0x2a621d();})['catch'](function(_0x2c88cb){logger[_0xabf2('0x16')](_0xabf2('0x4a'),util[_0xabf2('0x19')](_0x2c88cb,{'showHidden':![],'depth':null}));_0x2a621d(_0x2c88cb);});}}});};