Built motion from commit f541bb3b.|2.6.14
[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 _0x46bf=['./chatInteraction.controller','get','isAuthenticated','/describe','describe','isChatInteractionAuthorized','/:id/attachment_download','attachmentDownload','/:id/messages','getMessages','/:id/my_messages','getMyMessages','post','create','/:id/vidaoo','createVidaooSession','join','root','server/files/attachments/','format','%s-%s','now','originalname','replace','/:id/attachment_upload','file','attachmentUpload','addMessage','chat','addTags','chatinteraction:update','update','put','/:id/abandon','abandon','/:id/close','close','delete','/:id','chatinteraction:destroy','destroy','/:id/tags','removeTags','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x46bf,0x1dc));var _0xf46b=function(_0x120123,_0x4eff59){_0x120123=_0x120123-0x0;var _0x3bec4c=_0x46bf[_0x120123];return _0x3bec4c;};'use strict';var multer=require(_0xf46b('0x0'));var util=require(_0xf46b('0x1'));var path=require(_0xf46b('0x2'));var timeout=require(_0xf46b('0x3'));var express=require(_0xf46b('0x4'));var router=express[_0xf46b('0x5')]();var fs_extra=require(_0xf46b('0x6'));var auth=require(_0xf46b('0x7'));var interaction=require(_0xf46b('0x8'));var config=require(_0xf46b('0x9'));var controller=require(_0xf46b('0xa'));router[_0xf46b('0xb')]('/',auth[_0xf46b('0xc')](),controller['index']);router[_0xf46b('0xb')](_0xf46b('0xd'),auth[_0xf46b('0xc')](),controller[_0xf46b('0xe')]);router['get']('/:id',auth[_0xf46b('0xf')](),controller['show']);router[_0xf46b('0xb')](_0xf46b('0x10'),auth[_0xf46b('0xf')](),controller[_0xf46b('0x11')]);router[_0xf46b('0xb')](_0xf46b('0x12'),auth[_0xf46b('0xc')](),controller[_0xf46b('0x13')]);router[_0xf46b('0xb')](_0xf46b('0x14'),auth[_0xf46b('0xf')](),controller[_0xf46b('0x15')]);router[_0xf46b('0xb')]('/:id/download',auth[_0xf46b('0xc')](),controller['download']);router[_0xf46b('0x16')]('/',auth[_0xf46b('0xc')](),controller[_0xf46b('0x17')]);router[_0xf46b('0x16')](_0xf46b('0x18'),auth[_0xf46b('0xc')](),controller[_0xf46b('0x19')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x1cc1b6,_0x5ceb1d,_0x23a1d5){_0x23a1d5(null,path[_0xf46b('0x1a')](config[_0xf46b('0x1b')],_0xf46b('0x1c')));},'filename':function(_0x4dd30a,_0x5ad220,_0x39f48a){_0x39f48a(null,util[_0xf46b('0x1d')](_0xf46b('0x1e'),Date[_0xf46b('0x1f')](),_0x5ad220[_0xf46b('0x20')][_0xf46b('0x21')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0xf46b('0x16')](_0xf46b('0x22'),upload['single'](_0xf46b('0x23')),controller[_0xf46b('0x24')]);router[_0xf46b('0x16')](_0xf46b('0x12'),auth[_0xf46b('0xf')](),controller[_0xf46b('0x25')]);router[_0xf46b('0x16')]('/:id/tags',auth[_0xf46b('0xc')](),interaction['tracked'](_0xf46b('0x26'),'chatinteraction:addtags'),controller[_0xf46b('0x27')]);router['put']('/:id',auth[_0xf46b('0xc')](),interaction['tracked'](_0xf46b('0x26'),_0xf46b('0x28')),controller[_0xf46b('0x29')]);router[_0xf46b('0x2a')]('/:id/custom_update',controller['customUpdate']);router[_0xf46b('0x2a')](_0xf46b('0x2b'),auth[_0xf46b('0xf')](),controller[_0xf46b('0x2c')]);router[_0xf46b('0x2a')](_0xf46b('0x2d'),controller[_0xf46b('0x2e')]);router[_0xf46b('0x2f')](_0xf46b('0x30'),auth[_0xf46b('0xc')](),interaction['tracked'](_0xf46b('0x26'),_0xf46b('0x31')),controller[_0xf46b('0x32')]);router[_0xf46b('0x2f')](_0xf46b('0x33'),auth[_0xf46b('0xc')](),controller[_0xf46b('0x34')]);module[_0xf46b('0x35')]=router;