27ccc3874af3e431c6b70c30e70e04e52cfb1de7
[motion2.git] / server / api / chatInteraction / 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 _0x3d3b=['/describe','describe','isChatInteractionAuthorized','show','/:id/attachment_download','attachmentDownload','/:id/my_messages','getMyMessages','create','post','/:id/vidaoo','createVidaooSession','diskStorage','join','root','server/files/attachments/','%s-%s','now','originalname','replace','/:id/attachment_upload','single','file','attachmentUpload','/:id/messages','addMessage','/:id/tags','tracked','chat','chatinteraction:addtags','addTags','put','/:id','chatinteraction:update','update','customUpdate','/:id/abandon','abandon','/:id/close','close','delete','chatinteraction:destroy','destroy','removeTags','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatInteraction.controller','get','isAuthenticated'];(function(_0x34d7bc,_0x1729b8){var _0xe6aa1e=function(_0x4aaeee){while(--_0x4aaeee){_0x34d7bc['push'](_0x34d7bc['shift']());}};_0xe6aa1e(++_0x1729b8);}(_0x3d3b,0x1b4));var _0xb3d3=function(_0x27eda0,_0x42a3cf){_0x27eda0=_0x27eda0-0x0;var _0x2b63a5=_0x3d3b[_0x27eda0];return _0x2b63a5;};'use strict';var multer=require(_0xb3d3('0x0'));var util=require(_0xb3d3('0x1'));var path=require(_0xb3d3('0x2'));var timeout=require('connect-timeout');var express=require(_0xb3d3('0x3'));var router=express[_0xb3d3('0x4')]();var fs_extra=require(_0xb3d3('0x5'));var auth=require(_0xb3d3('0x6'));var interaction=require(_0xb3d3('0x7'));var config=require(_0xb3d3('0x8'));var controller=require(_0xb3d3('0x9'));router[_0xb3d3('0xa')]('/',auth[_0xb3d3('0xb')](),controller['index']);router['get'](_0xb3d3('0xc'),auth[_0xb3d3('0xb')](),controller[_0xb3d3('0xd')]);router[_0xb3d3('0xa')]('/:id',auth[_0xb3d3('0xe')](),controller[_0xb3d3('0xf')]);router['get'](_0xb3d3('0x10'),auth[_0xb3d3('0xe')](),controller[_0xb3d3('0x11')]);router[_0xb3d3('0xa')]('/:id/messages',auth[_0xb3d3('0xb')](),controller['getMessages']);router['get'](_0xb3d3('0x12'),auth[_0xb3d3('0xe')](),controller[_0xb3d3('0x13')]);router[_0xb3d3('0xa')]('/:id/download',auth[_0xb3d3('0xb')](),controller['download']);router['post']('/',auth[_0xb3d3('0xb')](),controller[_0xb3d3('0x14')]);router[_0xb3d3('0x15')](_0xb3d3('0x16'),auth[_0xb3d3('0xb')](),controller[_0xb3d3('0x17')]);var upload=multer({'storage':multer[_0xb3d3('0x18')]({'destination':function(_0x51f71c,_0x30bdff,_0x545a6c){_0x545a6c(null,path[_0xb3d3('0x19')](config[_0xb3d3('0x1a')],_0xb3d3('0x1b')));},'filename':function(_0x56877c,_0x30b30e,_0x293732){_0x293732(null,util['format'](_0xb3d3('0x1c'),Date[_0xb3d3('0x1d')](),_0x30b30e[_0xb3d3('0x1e')][_0xb3d3('0x1f')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0xb3d3('0x15')](_0xb3d3('0x20'),upload[_0xb3d3('0x21')](_0xb3d3('0x22')),controller[_0xb3d3('0x23')]);router[_0xb3d3('0x15')](_0xb3d3('0x24'),auth[_0xb3d3('0xe')](),controller[_0xb3d3('0x25')]);router[_0xb3d3('0x15')](_0xb3d3('0x26'),auth[_0xb3d3('0xb')](),interaction[_0xb3d3('0x27')](_0xb3d3('0x28'),_0xb3d3('0x29')),controller[_0xb3d3('0x2a')]);router[_0xb3d3('0x2b')](_0xb3d3('0x2c'),auth['isAuthenticated'](),interaction[_0xb3d3('0x27')](_0xb3d3('0x28'),_0xb3d3('0x2d')),controller[_0xb3d3('0x2e')]);router[_0xb3d3('0x2b')]('/:id/custom_update',controller[_0xb3d3('0x2f')]);router[_0xb3d3('0x2b')](_0xb3d3('0x30'),auth[_0xb3d3('0xe')](),controller[_0xb3d3('0x31')]);router[_0xb3d3('0x2b')](_0xb3d3('0x32'),controller[_0xb3d3('0x33')]);router[_0xb3d3('0x34')](_0xb3d3('0x2c'),auth['isAuthenticated'](),interaction[_0xb3d3('0x27')](_0xb3d3('0x28'),_0xb3d3('0x35')),controller[_0xb3d3('0x36')]);router[_0xb3d3('0x34')](_0xb3d3('0x26'),auth[_0xb3d3('0xb')](),controller[_0xb3d3('0x37')]);module['exports']=router;