9a54baaedfe3fcb1bb2f49c13e752c9e641ad696
[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 _0x0e82=['addTags','put','/:id','update','delete','mailinteraction:destroy','removeTags','express','Router','../../components/auth/service','./mailInteraction.controller','isAuthenticated','/describe','describe','get','show','/:id/messages','getMessages','download','post','/:id/tags','tracked','mail'];(function(_0x2597c3,_0x32be09){var _0x1792b7=function(_0x53459d){while(--_0x53459d){_0x2597c3['push'](_0x2597c3['shift']());}};_0x1792b7(++_0x32be09);}(_0x0e82,0x1ea));var _0x20e8=function(_0x5dfde8,_0xa2f77d){_0x5dfde8=_0x5dfde8-0x0;var _0x2253fb=_0x0e82[_0x5dfde8];return _0x2253fb;};'use strict';var express=require(_0x20e8('0x0'));var router=express[_0x20e8('0x1')]();var auth=require(_0x20e8('0x2'));var interaction=require('../../components/interaction/service');var controller=require(_0x20e8('0x3'));router['get']('/',auth[_0x20e8('0x4')](),controller['index']);router['get'](_0x20e8('0x5'),auth[_0x20e8('0x4')](),controller[_0x20e8('0x6')]);router[_0x20e8('0x7')]('/:id',auth[_0x20e8('0x4')](),controller[_0x20e8('0x8')]);router[_0x20e8('0x7')](_0x20e8('0x9'),auth[_0x20e8('0x4')](),controller[_0x20e8('0xa')]);router[_0x20e8('0x7')]('/:id/download',auth[_0x20e8('0x4')](),controller[_0x20e8('0xb')]);router[_0x20e8('0xc')]('/',auth['isAuthenticated'](),controller['create']);router['post'](_0x20e8('0x9'),auth['isAuthenticated'](),controller['addMessage']);router[_0x20e8('0xc')](_0x20e8('0xd'),auth[_0x20e8('0x4')](),interaction[_0x20e8('0xe')](_0x20e8('0xf'),'mailinteraction:addtags'),controller[_0x20e8('0x10')]);router[_0x20e8('0x11')](_0x20e8('0x12'),auth[_0x20e8('0x4')](),interaction[_0x20e8('0xe')]('mail','mailinteraction:update'),controller[_0x20e8('0x13')]);router[_0x20e8('0x14')](_0x20e8('0x12'),auth['isAuthenticated'](),interaction[_0x20e8('0xe')](_0x20e8('0xf'),_0x20e8('0x15')),controller['destroy']);router['delete']('/:id/tags',auth[_0x20e8('0x4')](),controller[_0x20e8('0x16')]);module['exports']=router;