544ddf7cba342e649a283208677962a21c4f641c
[motion2.git] / server / api / mailAccount / index.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 _0x5f61=['/:id/users','put','update','delete','removeAnswers','removeImap','/:id/out_servers','destroy','removeAgents','exports','multer','util','path','Router','../../components/auth/service','../../components/interaction/service','./mailAccount.controller','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/dispositions','getDispositions','/:id/canned_answers','getAnswers','/:id/in_servers','/:id/interactions','getInteractions','/:id/messages','addDisposition','post','addAnswer','addInteraction','/:id/applications','addApplications','send'];(function(_0x5ac23a,_0x44617a){var _0x4df275=function(_0x16fba4){while(--_0x16fba4){_0x5ac23a['push'](_0x5ac23a['shift']());}};_0x4df275(++_0x44617a);}(_0x5f61,0xcd));var _0x15f6=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x5f61[_0x20a584];return _0x4b41a8;};'use strict';var multer=require(_0x15f6('0x0'));var util=require(_0x15f6('0x1'));var path=require(_0x15f6('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x15f6('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x15f6('0x4'));var interaction=require(_0x15f6('0x5'));var config=require('../../config/environment');var controller=require(_0x15f6('0x6'));router[_0x15f6('0x7')]('/',auth[_0x15f6('0x8')](),controller[_0x15f6('0x9')]);router['get'](_0x15f6('0xa'),auth[_0x15f6('0x8')](),controller[_0x15f6('0xb')]);router[_0x15f6('0x7')](_0x15f6('0xc'),auth['isAuthenticated'](),controller[_0x15f6('0xd')]);router['get'](_0x15f6('0xe'),auth['isAuthenticated'](),controller[_0x15f6('0xf')]);router[_0x15f6('0x7')](_0x15f6('0x10'),auth['isAuthenticated'](),controller[_0x15f6('0x11')]);router[_0x15f6('0x7')](_0x15f6('0x12'),auth['isAuthenticated'](),controller['getImap']);router[_0x15f6('0x7')]('/:id/out_servers',auth[_0x15f6('0x8')](),controller['getSmtp']);router['get'](_0x15f6('0x13'),auth['isAuthenticated'](),controller[_0x15f6('0x14')]);router['get']('/:id/applications',auth[_0x15f6('0x8')](),controller['getApplications']);router[_0x15f6('0x7')](_0x15f6('0x15'),auth[_0x15f6('0x8')](),controller['getMessages']);router['get']('/:id/verify',auth[_0x15f6('0x8')](),controller['verifySmtp']);router['get']('/:id/users',auth['isAuthenticated'](),controller['getAgents']);router['post']('/:id/dispositions',auth['isAuthenticated'](),controller[_0x15f6('0x16')]);router[_0x15f6('0x17')]('/:id/canned_answers',auth[_0x15f6('0x8')](),controller[_0x15f6('0x18')]);router['post']('/',auth['isAuthenticated'](),controller['create']);router['post'](_0x15f6('0x12'),auth[_0x15f6('0x8')](),controller['addImap']);router['post']('/:id/out_servers',auth[_0x15f6('0x8')](),controller['addSmtp']);router['post'](_0x15f6('0x13'),auth[_0x15f6('0x8')](),controller[_0x15f6('0x19')]);router[_0x15f6('0x17')](_0x15f6('0x1a'),auth[_0x15f6('0x8')](),controller[_0x15f6('0x1b')]);router[_0x15f6('0x17')]('/:id/send',auth[_0x15f6('0x8')](),controller[_0x15f6('0x1c')]);router[_0x15f6('0x17')](_0x15f6('0x1d'),auth[_0x15f6('0x8')](),controller['addAgents']);router[_0x15f6('0x1e')](_0x15f6('0xc'),auth[_0x15f6('0x8')](),controller[_0x15f6('0x1f')]);router[_0x15f6('0x20')]('/:id/dispositions',auth[_0x15f6('0x8')](),controller['removeDispositions']);router[_0x15f6('0x20')](_0x15f6('0x10'),auth[_0x15f6('0x8')](),controller[_0x15f6('0x21')]);router['delete']('/:id/in_servers',auth[_0x15f6('0x8')](),controller[_0x15f6('0x22')]);router[_0x15f6('0x20')](_0x15f6('0x23'),auth['isAuthenticated'](),controller['removeSmtp']);router[_0x15f6('0x20')]('/:id',auth['isAuthenticated'](),controller[_0x15f6('0x24')]);router[_0x15f6('0x20')](_0x15f6('0x1d'),auth[_0x15f6('0x8')](),controller[_0x15f6('0x25')]);module[_0x15f6('0x26')]=router;