7ac90b29b4773eef9fcf7af0fcd8c23aab4c0077
[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 _0x580b=['notify','NotifyMailAccount','../client','Request','name','provider','email','key','ListId','TemplateId','Imap','CloudProvider','service','type','data5','MailServerOut','getMailAccount'];(function(_0x2241ad,_0x3fa404){var _0x3fe045=function(_0x4cee37){while(--_0x4cee37){_0x2241ad['push'](_0x2241ad['shift']());}};_0x3fe045(++_0x3fa404);}(_0x580b,0xf0));var _0xb580=function(_0x34f17d,_0x5b2f39){_0x34f17d=_0x34f17d-0x0;var _0x1bf465=_0x580b[_0x34f17d];return _0x1bf465;};'use strict';var client=require(_0xb580('0x0'));exports['getMailAccounts']=function(){return function(){return client[_0xb580('0x1')]('GetMailAccount',{'options':{'attributes':['id',_0xb580('0x2'),_0xb580('0x3'),'service',_0xb580('0x4'),'active',_0xb580('0x5'),_0xb580('0x6'),_0xb580('0x7')],'raw':![],'include':[{'model':'MailServerIn','as':_0xb580('0x8'),'include':[{'model':_0xb580('0x9'),'attributes':['id','name',_0xb580('0xa'),_0xb580('0xb'),_0xb580('0xc')],'as':_0xb580('0x9')}]},{'model':_0xb580('0xd'),'as':'Smtp','include':[{'model':'CloudProvider','attributes':['id','name','service','type',_0xb580('0xc')],'as':_0xb580('0x9')}]}]},'log':_0xb580('0xe')});};};exports[_0xb580('0xf')]=function(_0x628222,_0x44534f){return client[_0xb580('0x1')](_0xb580('0x10'),{'account':{'id':_0x628222},'body':_0x44534f,'log':'NotifyMailAccount'});};