Built motion from commit e0fa946e.|2.6.5
[motion2.git] / server / api / mailAccount / mailAccount.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 _0xa5b9=['custom','host','Smtp','port','secure','authentication','modernAuthentication','CloudProvider','Cloud\x20Provider\x20configuration\x20not\x20found','auth','OAuth2','data5','user','pass','./mailAccount.attributes','exports','define','MailAccount','mail_accounts'];(function(_0x68c979,_0x431cff){var _0x4f0001=function(_0xa7595d){while(--_0xa7595d){_0x68c979['push'](_0x68c979['shift']());}};_0x4f0001(++_0x431cff);}(_0xa5b9,0xdf));var _0x9a5b=function(_0x5d2d89,_0x2f8aaa){_0x5d2d89=_0x5d2d89-0x0;var _0x1edde3=_0xa5b9[_0x5d2d89];return _0x1edde3;};'use strict';var attributes=require(_0x9a5b('0x0'));module[_0x9a5b('0x1')]=function(_0x3a3369){return _0x3a3369[_0x9a5b('0x2')](_0x9a5b('0x3'),attributes,{'tableName':_0x9a5b('0x4'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getSmtpOptions':function(){var _0x42ecd7=this;var _0x1ce6ae={'id':_0x42ecd7['id'],'tls':{'rejectUnauthorized':![]}};if(_0x42ecd7['provider']!==_0x9a5b('0x5')){_0x1ce6ae['service']=_0x42ecd7['provider'];}else{_0x1ce6ae[_0x9a5b('0x6')]=_0x42ecd7[_0x9a5b('0x7')]['host'];_0x1ce6ae['port']=_0x42ecd7[_0x9a5b('0x7')][_0x9a5b('0x8')];_0x1ce6ae[_0x9a5b('0x9')]=_0x42ecd7[_0x9a5b('0x7')][_0x9a5b('0x9')];}if(_0x42ecd7[_0x9a5b('0x7')][_0x9a5b('0xa')]){if(_0x42ecd7[_0x9a5b('0x7')][_0x9a5b('0xb')]){if(!_0x42ecd7[_0x9a5b('0x7')][_0x9a5b('0xc')])throw new Error(_0x9a5b('0xd'));_0x1ce6ae[_0x9a5b('0xe')]={'type':_0x9a5b('0xf'),'user':_0x42ecd7[_0x9a5b('0x7')]['user'],'accessToken':_0x42ecd7[_0x9a5b('0x7')][_0x9a5b('0xc')][_0x9a5b('0x10')]};}else{_0x1ce6ae[_0x9a5b('0xe')]={'user':_0x42ecd7[_0x9a5b('0x7')][_0x9a5b('0x11')],'pass':_0x42ecd7['Smtp'][_0x9a5b('0x12')]};}}return _0x1ce6ae;}}});};