ef56830384507288a3cb192f2fa0dc9b3476cddf
[motion2.git] / server / api / openchannelInteraction / 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 _0xb6e9=['openchannel','openchannelinteraction:addtags','addTags','delete','/:id','destroy','removeTags','exports','util','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./openchannelInteraction.controller','get','isAuthenticated','index','/describe','/:id/messages','/:id/download','download','post','create','addMessage','/:id/tags','tracked'];(function(_0x491a7f,_0x28bb80){var _0x3d8f44=function(_0xdaa716){while(--_0xdaa716){_0x491a7f['push'](_0x491a7f['shift']());}};_0x3d8f44(++_0x28bb80);}(_0xb6e9,0x174));var _0x9b6e=function(_0x116f4a,_0x1881ce){_0x116f4a=_0x116f4a-0x0;var _0x763af8=_0xb6e9[_0x116f4a];return _0x763af8;};'use strict';var multer=require('multer');var util=require(_0x9b6e('0x0'));var path=require('path');var timeout=require(_0x9b6e('0x1'));var express=require(_0x9b6e('0x2'));var router=express[_0x9b6e('0x3')]();var fs_extra=require(_0x9b6e('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x9b6e('0x5'));var config=require(_0x9b6e('0x6'));var controller=require(_0x9b6e('0x7'));router[_0x9b6e('0x8')]('/',auth[_0x9b6e('0x9')](),controller[_0x9b6e('0xa')]);router['get'](_0x9b6e('0xb'),auth['isAuthenticated'](),controller['describe']);router[_0x9b6e('0x8')]('/:id',auth['isAuthenticated'](),controller['show']);router[_0x9b6e('0x8')](_0x9b6e('0xc'),auth[_0x9b6e('0x9')](),controller['getMessages']);router[_0x9b6e('0x8')](_0x9b6e('0xd'),auth[_0x9b6e('0x9')](),controller[_0x9b6e('0xe')]);router[_0x9b6e('0xf')]('/',auth['isAuthenticated'](),controller[_0x9b6e('0x10')]);router['post'](_0x9b6e('0xc'),auth[_0x9b6e('0x9')](),controller[_0x9b6e('0x11')]);router['post'](_0x9b6e('0x12'),auth[_0x9b6e('0x9')](),interaction[_0x9b6e('0x13')](_0x9b6e('0x14'),_0x9b6e('0x15')),controller[_0x9b6e('0x16')]);router['put']('/:id',auth[_0x9b6e('0x9')](),interaction['tracked'](_0x9b6e('0x14'),'openchannelinteraction:update'),controller['update']);router[_0x9b6e('0x17')](_0x9b6e('0x18'),auth[_0x9b6e('0x9')](),interaction[_0x9b6e('0x13')]('openchannel','openchannelinteraction:destroy'),controller[_0x9b6e('0x19')]);router[_0x9b6e('0x17')](_0x9b6e('0x12'),auth[_0x9b6e('0x9')](),controller[_0x9b6e('0x1a')]);module[_0x9b6e('0x1b')]=router;