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