b0fa0108ecfdca5790182bbddc4e9ea46f87aefd
[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 _0x51a8=['TemplateId','MailServerIn','type','CloudProvider','MailServerOut','data5','getMailAccount','notify','Request','NotifyMailAccount','../client','GetMailAccount','name','provider','service','email','active','key','ListId'];(function(_0x1aad64,_0x56fec3){var _0x41d94c=function(_0x5a5842){while(--_0x5a5842){_0x1aad64['push'](_0x1aad64['shift']());}};_0x41d94c(++_0x56fec3);}(_0x51a8,0x186));var _0x851a=function(_0x3e4490,_0x2d52fe){_0x3e4490=_0x3e4490-0x0;var _0x579424=_0x51a8[_0x3e4490];return _0x579424;};'use strict';var client=require(_0x851a('0x0'));exports['getMailAccounts']=function(){return function(){return client['Request'](_0x851a('0x1'),{'options':{'attributes':['id',_0x851a('0x2'),_0x851a('0x3'),_0x851a('0x4'),_0x851a('0x5'),_0x851a('0x6'),_0x851a('0x7'),_0x851a('0x8'),_0x851a('0x9')],'raw':![],'include':[{'model':_0x851a('0xa'),'as':'Imap','include':[{'model':'CloudProvider','attributes':['id',_0x851a('0x2'),_0x851a('0x4'),_0x851a('0xb'),'data5'],'as':_0x851a('0xc')}]},{'model':_0x851a('0xd'),'as':'Smtp','include':[{'model':'CloudProvider','attributes':['id',_0x851a('0x2'),_0x851a('0x4'),_0x851a('0xb'),_0x851a('0xe')],'as':_0x851a('0xc')}]}]},'log':_0x851a('0xf')});};};exports[_0x851a('0x10')]=function(_0x42ed66,_0x1d233f){return client[_0x851a('0x11')](_0x851a('0x12'),{'account':{'id':_0x42ed66},'body':_0x1d233f,'log':_0x851a('0x12')});};