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