Built motion from commit f9526609.|2.6.29
[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 _0x0a6f=['service','Smtp','host','port','authentication','modernAuthentication','CloudProvider','Cloud\x20Provider\x20configuration\x20not\x20found','OAuth2','user','data5','pass','./mailAccount.attributes','exports','define','MailAccount','mail_accounts','provider','custom'];(function(_0x464250,_0xe75bbe){var _0x23fa7e=function(_0x373aa6){while(--_0x373aa6){_0x464250['push'](_0x464250['shift']());}};_0x23fa7e(++_0xe75bbe);}(_0x0a6f,0xdd));var _0xf0a6=function(_0x4c4fbe,_0x483482){_0x4c4fbe=_0x4c4fbe-0x0;var _0x39b3b9=_0x0a6f[_0x4c4fbe];return _0x39b3b9;};'use strict';var attributes=require(_0xf0a6('0x0'));module[_0xf0a6('0x1')]=function(_0x2ef84e){return _0x2ef84e[_0xf0a6('0x2')](_0xf0a6('0x3'),attributes,{'tableName':_0xf0a6('0x4'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getSmtpOptions':function(){var _0x4ecd79=this;var _0x4a3fc8={'id':_0x4ecd79['id'],'tls':{'rejectUnauthorized':![]}};if(_0x4ecd79[_0xf0a6('0x5')]!==_0xf0a6('0x6')){_0x4a3fc8[_0xf0a6('0x7')]=_0x4ecd79[_0xf0a6('0x5')];}else{_0x4a3fc8['host']=_0x4ecd79[_0xf0a6('0x8')][_0xf0a6('0x9')];_0x4a3fc8[_0xf0a6('0xa')]=_0x4ecd79[_0xf0a6('0x8')][_0xf0a6('0xa')];_0x4a3fc8['secure']=_0x4ecd79[_0xf0a6('0x8')]['secure'];}if(_0x4ecd79[_0xf0a6('0x8')][_0xf0a6('0xb')]){if(_0x4ecd79['Smtp'][_0xf0a6('0xc')]){if(!_0x4ecd79[_0xf0a6('0x8')][_0xf0a6('0xd')])throw new Error(_0xf0a6('0xe'));_0x4a3fc8['auth']={'type':_0xf0a6('0xf'),'user':_0x4ecd79[_0xf0a6('0x8')][_0xf0a6('0x10')],'accessToken':_0x4ecd79[_0xf0a6('0x8')]['CloudProvider'][_0xf0a6('0x11')]};}else{_0x4a3fc8['auth']={'user':_0x4ecd79[_0xf0a6('0x8')][_0xf0a6('0x10')],'pass':_0x4ecd79[_0xf0a6('0x8')][_0xf0a6('0x12')]};}}return _0x4a3fc8;}}});};