1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
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. *
17 // *************************************************************************
18 var _0x829d=['Voice','all','lodash','./team.attributes','get','Queues','then','map','setDataValue','channel','exports','define','Team','teams','Chat','Mail','Openchannel','Sms'];(function(_0x3db464,_0x53fd4e){var _0x81faa2=function(_0x98fc91){while(--_0x98fc91){_0x3db464['push'](_0x3db464['shift']());}};_0x81faa2(++_0x53fd4e);}(_0x829d,0xa4));var _0xd829=function(_0x1be621,_0x4e095f){_0x1be621=_0x1be621-0x0;var _0x34e144=_0x829d[_0x1be621];return _0x34e144;};'use strict';var _=require(_0xd829('0x0'));var attributes=require(_0xd829('0x1'));function getQueuesByChannel(_0x404cf3,_0x5b9d5f){var _0x4db1f1=_0xd829('0x2')+_0x5b9d5f+_0xd829('0x3');return _0x404cf3[_0x4db1f1]()[_0xd829('0x4')](function(_0x3141e6){return _[_0xd829('0x5')](_0x3141e6,function(_0x43eaa1){_0x43eaa1[_0xd829('0x6')](_0xd829('0x7'),_0x5b9d5f);return _0x43eaa1;});})['catch'](function(_0xaf84dd){throw _0xaf84dd;});}module[_0xd829('0x8')]=function(_0x342b08){return _0x342b08[_0xd829('0x9')](_0xd829('0xa'),attributes,{'tableName':_0xd829('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getAssociatedQueues':function(){var _0x8d63f=this;var _0x596fbd=[_0xd829('0xc'),'Fax',_0xd829('0xd'),_0xd829('0xe'),_0xd829('0xf'),_0xd829('0x10'),'Whatsapp'];return Promise['resolve']()[_0xd829('0x4')](function(){var _0xe9ceb9=_[_0xd829('0x5')](_0x596fbd,function(_0x3eeebf){return getQueuesByChannel(_0x8d63f,_0x3eeebf);});return Promise[_0xd829('0x11')](_0xe9ceb9);})['catch'](function(_0x3ee75b){throw _0x3ee75b;});}}});};