82258c313f8653fc5a62c9719e2fcadbbebc4d76
[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 _0x9b97=['GetMailAccount','name','provider','service','email','ListId','TemplateId','MailServerIn','CloudProvider','type','data5','MailServerOut','Smtp','getMailAccount','notify','NotifyMailAccount','../client','Request'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x9b97,0x11e));var _0x79b9=function(_0xf5a020,_0x10e950){_0xf5a020=_0xf5a020-0x0;var _0x3e469d=_0x9b97[_0xf5a020];return _0x3e469d;};'use strict';var client=require(_0x79b9('0x0'));exports['getMailAccounts']=function(){return function(){return client[_0x79b9('0x1')](_0x79b9('0x2'),{'options':{'attributes':['id',_0x79b9('0x3'),_0x79b9('0x4'),_0x79b9('0x5'),_0x79b9('0x6'),'active','key',_0x79b9('0x7'),_0x79b9('0x8')],'raw':![],'include':[{'model':_0x79b9('0x9'),'as':'Imap','include':[{'model':_0x79b9('0xa'),'attributes':['id',_0x79b9('0x3'),'service',_0x79b9('0xb'),_0x79b9('0xc')],'as':_0x79b9('0xa')}]},{'model':_0x79b9('0xd'),'as':_0x79b9('0xe'),'include':[{'model':'CloudProvider','attributes':['id','name',_0x79b9('0x5'),_0x79b9('0xb'),_0x79b9('0xc')],'as':_0x79b9('0xa')}]}]},'log':_0x79b9('0xf')});};};exports[_0x79b9('0x10')]=function(_0x187feb,_0xb71cf4){return client[_0x79b9('0x1')](_0x79b9('0x11'),{'account':{'id':_0x187feb},'body':_0xb71cf4,'log':_0x79b9('0x11')});};