425f4d19f18948ea1702519cf2e80d7455bec47e
[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 _0x35f5=['NotifyMailAccount','../client','Request','GetMailAccount','name','provider','key','ListId','MailServerIn','CloudProvider','type','MailServerOut','Smtp','service','data5','getMailAccount','notify'];(function(_0x172948,_0x4262cc){var _0x4aeaa9=function(_0x5ec4b3){while(--_0x5ec4b3){_0x172948['push'](_0x172948['shift']());}};_0x4aeaa9(++_0x4262cc);}(_0x35f5,0x100));var _0x535f=function(_0x403fc7,_0x32931a){_0x403fc7=_0x403fc7-0x0;var _0x5d0827=_0x35f5[_0x403fc7];return _0x5d0827;};'use strict';var client=require(_0x535f('0x0'));exports['getMailAccounts']=function(){return function(){return client[_0x535f('0x1')](_0x535f('0x2'),{'options':{'attributes':['id',_0x535f('0x3'),_0x535f('0x4'),'service','email','active',_0x535f('0x5'),_0x535f('0x6'),'TemplateId'],'raw':![],'include':[{'model':_0x535f('0x7'),'as':'Imap','include':[{'model':_0x535f('0x8'),'attributes':['id',_0x535f('0x3'),'service',_0x535f('0x9'),'data5'],'as':_0x535f('0x8')}]},{'model':_0x535f('0xa'),'as':_0x535f('0xb'),'include':[{'model':_0x535f('0x8'),'attributes':['id',_0x535f('0x3'),_0x535f('0xc'),_0x535f('0x9'),_0x535f('0xd')],'as':'CloudProvider'}]}]},'log':_0x535f('0xe')});};};exports[_0x535f('0xf')]=function(_0x1e1c58,_0x336e28){return client[_0x535f('0x1')](_0x535f('0x10'),{'account':{'id':_0x1e1c58},'body':_0x336e28,'log':'NotifyMailAccount'});};