64c793294328be224d330ccceb968633f44c4c95
[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 _0x2bbc=['delete','mailinteraction:destroy','destroy','/:id/tags','exports','express','Router','isAuthenticated','index','get','describe','show','/:id/messages','/:id/download','post','create','tracked','addTags','/:id','mail','mailinteraction:update','update'];(function(_0x147cfa,_0x5c27bc){var _0x161e6d=function(_0x29702e){while(--_0x29702e){_0x147cfa['push'](_0x147cfa['shift']());}};_0x161e6d(++_0x5c27bc);}(_0x2bbc,0x123));var _0xc2bb=function(_0x5d7adf,_0x57df6c){_0x5d7adf=_0x5d7adf-0x0;var _0x13d079=_0x2bbc[_0x5d7adf];return _0x13d079;};'use strict';var express=require(_0xc2bb('0x0'));var router=express[_0xc2bb('0x1')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var controller=require('./mailInteraction.controller');router['get']('/',auth[_0xc2bb('0x2')](),controller[_0xc2bb('0x3')]);router[_0xc2bb('0x4')]('/describe',auth['isAuthenticated'](),controller[_0xc2bb('0x5')]);router[_0xc2bb('0x4')]('/:id',auth[_0xc2bb('0x2')](),controller[_0xc2bb('0x6')]);router[_0xc2bb('0x4')](_0xc2bb('0x7'),auth[_0xc2bb('0x2')](),controller['getMessages']);router[_0xc2bb('0x4')](_0xc2bb('0x8'),auth[_0xc2bb('0x2')](),controller['download']);router[_0xc2bb('0x9')]('/',auth[_0xc2bb('0x2')](),controller[_0xc2bb('0xa')]);router[_0xc2bb('0x9')]('/:id/messages',auth[_0xc2bb('0x2')](),controller['addMessage']);router[_0xc2bb('0x9')]('/:id/tags',auth['isAuthenticated'](),interaction[_0xc2bb('0xb')]('mail','mailinteraction:addtags'),controller[_0xc2bb('0xc')]);router['put'](_0xc2bb('0xd'),auth[_0xc2bb('0x2')](),interaction['tracked'](_0xc2bb('0xe'),_0xc2bb('0xf')),controller[_0xc2bb('0x10')]);router[_0xc2bb('0x11')](_0xc2bb('0xd'),auth[_0xc2bb('0x2')](),interaction['tracked']('mail',_0xc2bb('0x12')),controller[_0xc2bb('0x13')]);router[_0xc2bb('0x11')](_0xc2bb('0x14'),auth[_0xc2bb('0x2')](),controller['removeTags']);module[_0xc2bb('0x15')]=router;