e2df5af0d62754498df4d36bd3d700db9f0c6cd1
[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 _0x5902=['../client','Request','GetMailAccount','provider','service','active','key','ListId','TemplateId','Imap','CloudProvider','name','type','data5','MailServerOut','getMailAccount','NotifyMailAccount'];(function(_0x40a045,_0x516f0e){var _0x1a687c=function(_0x48c9fe){while(--_0x48c9fe){_0x40a045['push'](_0x40a045['shift']());}};_0x1a687c(++_0x516f0e);}(_0x5902,0x187));var _0x2590=function(_0x19950b,_0x53d0d7){_0x19950b=_0x19950b-0x0;var _0x3c6b41=_0x5902[_0x19950b];return _0x3c6b41;};'use strict';var client=require(_0x2590('0x0'));exports['getMailAccounts']=function(){return function(){return client[_0x2590('0x1')](_0x2590('0x2'),{'options':{'attributes':['id','name',_0x2590('0x3'),_0x2590('0x4'),'email',_0x2590('0x5'),_0x2590('0x6'),_0x2590('0x7'),_0x2590('0x8')],'raw':![],'include':[{'model':'MailServerIn','as':_0x2590('0x9'),'include':[{'model':_0x2590('0xa'),'attributes':['id',_0x2590('0xb'),_0x2590('0x4'),_0x2590('0xc'),_0x2590('0xd')],'as':_0x2590('0xa')}]},{'model':_0x2590('0xe'),'as':'Smtp','include':[{'model':_0x2590('0xa'),'attributes':['id',_0x2590('0xb'),_0x2590('0x4'),_0x2590('0xc'),_0x2590('0xd')],'as':_0x2590('0xa')}]}]},'log':_0x2590('0xf')});};};exports['notify']=function(_0x5d271c,_0x4d7eea){return client[_0x2590('0x1')]('NotifyMailAccount',{'account':{'id':_0x5d271c},'body':_0x4d7eea,'log':_0x2590('0x10')});};