Built motion from commit 639a1a7f.|2.6.19
[motion2.git] / server / services / email / rpc / mailAccount.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 _0x463e=['data5','MailServerOut','getMailAccount','Request','../client','GetMailAccount','provider','service','active','key','ListId','Imap','CloudProvider','name','type'];(function(_0x5466d3,_0x3e47ae){var _0x147302=function(_0x5087aa){while(--_0x5087aa){_0x5466d3['push'](_0x5466d3['shift']());}};_0x147302(++_0x3e47ae);}(_0x463e,0x13f));var _0xe463=function(_0x2bf141,_0x31eac7){_0x2bf141=_0x2bf141-0x0;var _0x48277b=_0x463e[_0x2bf141];return _0x48277b;};'use strict';var client=require(_0xe463('0x0'));exports['getMailAccounts']=function(){return function(){return client['Request'](_0xe463('0x1'),{'options':{'attributes':['id','name',_0xe463('0x2'),_0xe463('0x3'),'email',_0xe463('0x4'),_0xe463('0x5'),_0xe463('0x6'),'TemplateId'],'raw':![],'include':[{'model':'MailServerIn','as':_0xe463('0x7'),'include':[{'model':_0xe463('0x8'),'attributes':['id',_0xe463('0x9'),_0xe463('0x3'),_0xe463('0xa'),_0xe463('0xb')],'as':'CloudProvider'}]},{'model':_0xe463('0xc'),'as':'Smtp','include':[{'model':_0xe463('0x8'),'attributes':['id',_0xe463('0x9'),_0xe463('0x3'),_0xe463('0xa'),_0xe463('0xb')],'as':_0xe463('0x8')}]}]},'log':_0xe463('0xd')});};};exports['notify']=function(_0x47fcc2,_0x2bc616){return client[_0xe463('0xe')]('NotifyMailAccount',{'account':{'id':_0x47fcc2},'body':_0x2bc616,'log':'NotifyMailAccount'});};