cfb536310be32053c355f6025711faebc4a39a14
[motion2.git] / server / api / mailInteraction / 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 _0x3831=['post','create','/:id/tags','tracked','mail','mailinteraction:addtags','addTags','put','mailinteraction:update','update','delete','destroy','removeTags','multer','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','get','/describe','describe','/:id','isAuthenticated','show','/:id/messages','/:id/download','download'];(function(_0x4792c8,_0x5158a1){var _0x35edb1=function(_0x2472d3){while(--_0x2472d3){_0x4792c8['push'](_0x4792c8['shift']());}};_0x35edb1(++_0x5158a1);}(_0x3831,0x14c));var _0x1383=function(_0x5e5671,_0x457d56){_0x5e5671=_0x5e5671-0x0;var _0x3035f8=_0x3831[_0x5e5671];return _0x3035f8;};'use strict';var multer=require(_0x1383('0x0'));var util=require('util');var path=require(_0x1383('0x1'));var timeout=require(_0x1383('0x2'));var express=require(_0x1383('0x3'));var router=express[_0x1383('0x4')]();var auth=require(_0x1383('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x1383('0x6'));var controller=require('./mailInteraction.controller');router[_0x1383('0x7')]('/',auth['isAuthenticated'](),controller['index']);router['get'](_0x1383('0x8'),auth['isAuthenticated'](),controller[_0x1383('0x9')]);router[_0x1383('0x7')](_0x1383('0xa'),auth[_0x1383('0xb')](),controller[_0x1383('0xc')]);router[_0x1383('0x7')](_0x1383('0xd'),auth[_0x1383('0xb')](),controller['getMessages']);router[_0x1383('0x7')](_0x1383('0xe'),auth[_0x1383('0xb')](),controller[_0x1383('0xf')]);router[_0x1383('0x10')]('/',auth['isAuthenticated'](),controller[_0x1383('0x11')]);router[_0x1383('0x10')](_0x1383('0xd'),auth['isAuthenticated'](),controller['addMessage']);router[_0x1383('0x10')](_0x1383('0x12'),auth[_0x1383('0xb')](),interaction[_0x1383('0x13')](_0x1383('0x14'),_0x1383('0x15')),controller[_0x1383('0x16')]);router[_0x1383('0x17')]('/:id',auth[_0x1383('0xb')](),interaction[_0x1383('0x13')](_0x1383('0x14'),_0x1383('0x18')),controller[_0x1383('0x19')]);router[_0x1383('0x1a')](_0x1383('0xa'),auth['isAuthenticated'](),interaction['tracked'](_0x1383('0x14'),'mailinteraction:destroy'),controller[_0x1383('0x1b')]);router['delete']('/:id/tags',auth['isAuthenticated'](),controller[_0x1383('0x1c')]);module['exports']=router;