15a2de128bcd7eec12e21a24b387b5f27830e157
[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 _0x15be=['openchannelinteraction:update','update','delete','removeTags','exports','multer','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','/describe','describe','/:id','show','/:id/messages','/:id/download','download','create','post','addMessage','/:id/tags','tracked','openchannel','addTags'];(function(_0x4b0fbb,_0x1730df){var _0x26243f=function(_0xeaae1c){while(--_0xeaae1c){_0x4b0fbb['push'](_0x4b0fbb['shift']());}};_0x26243f(++_0x1730df);}(_0x15be,0x171));var _0xe15b=function(_0x2b53c7,_0x5c487a){_0x2b53c7=_0x2b53c7-0x0;var _0x26938b=_0x15be[_0x2b53c7];return _0x26938b;};'use strict';var multer=require(_0xe15b('0x0'));var util=require('util');var path=require(_0xe15b('0x1'));var timeout=require(_0xe15b('0x2'));var express=require('express');var router=express[_0xe15b('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0xe15b('0x4'));var interaction=require(_0xe15b('0x5'));var config=require(_0xe15b('0x6'));var controller=require('./openchannelInteraction.controller');router[_0xe15b('0x7')]('/',auth[_0xe15b('0x8')](),controller['index']);router[_0xe15b('0x7')](_0xe15b('0x9'),auth['isAuthenticated'](),controller[_0xe15b('0xa')]);router[_0xe15b('0x7')](_0xe15b('0xb'),auth[_0xe15b('0x8')](),controller[_0xe15b('0xc')]);router[_0xe15b('0x7')](_0xe15b('0xd'),auth[_0xe15b('0x8')](),controller['getMessages']);router[_0xe15b('0x7')](_0xe15b('0xe'),auth[_0xe15b('0x8')](),controller[_0xe15b('0xf')]);router['post']('/',auth[_0xe15b('0x8')](),controller[_0xe15b('0x10')]);router[_0xe15b('0x11')](_0xe15b('0xd'),auth[_0xe15b('0x8')](),controller[_0xe15b('0x12')]);router[_0xe15b('0x11')](_0xe15b('0x13'),auth['isAuthenticated'](),interaction[_0xe15b('0x14')](_0xe15b('0x15'),'openchannelinteraction:addtags'),controller[_0xe15b('0x16')]);router['put'](_0xe15b('0xb'),auth[_0xe15b('0x8')](),interaction['tracked'](_0xe15b('0x15'),_0xe15b('0x17')),controller[_0xe15b('0x18')]);router[_0xe15b('0x19')]('/:id',auth['isAuthenticated'](),interaction[_0xe15b('0x14')](_0xe15b('0x15'),'openchannelinteraction:destroy'),controller['destroy']);router[_0xe15b('0x19')](_0xe15b('0x13'),auth['isAuthenticated'](),controller[_0xe15b('0x1a')]);module[_0xe15b('0x1b')]=router;