1ae44c28459fb7132f76c566ab197ab7a1c53ab1
[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 _0x9790=['name','provider','service','active','ListId','TemplateId','MailServerIn','CloudProvider','type','data5','MailServerOut','notify','NotifyMailAccount','../client','getMailAccounts'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x9790,0xc1));var _0x0979=function(_0x1f939f,_0x401b06){_0x1f939f=_0x1f939f-0x0;var _0xdb74af=_0x9790[_0x1f939f];return _0xdb74af;};'use strict';var client=require(_0x0979('0x0'));exports[_0x0979('0x1')]=function(){return function(){return client['Request']('GetMailAccount',{'options':{'attributes':['id',_0x0979('0x2'),_0x0979('0x3'),_0x0979('0x4'),'email',_0x0979('0x5'),'key',_0x0979('0x6'),_0x0979('0x7')],'raw':![],'include':[{'model':_0x0979('0x8'),'as':'Imap','include':[{'model':_0x0979('0x9'),'attributes':['id',_0x0979('0x2'),_0x0979('0x4'),_0x0979('0xa'),_0x0979('0xb')],'as':_0x0979('0x9')}]},{'model':_0x0979('0xc'),'as':'Smtp','include':[{'model':_0x0979('0x9'),'attributes':['id','name','service','type',_0x0979('0xb')],'as':_0x0979('0x9')}]}]},'log':'getMailAccount'});};};exports[_0x0979('0xd')]=function(_0x4d9d94,_0x30d316){return client['Request'](_0x0979('0xe'),{'account':{'id':_0x4d9d94},'body':_0x30d316,'log':_0x0979('0xe')});};