Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / api / chatWebsite / 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 _0xd61e=['destroy','removeAnswers','/:id/users','removeAgents','util','connect-timeout','express','../../config/environment','get','isAuthenticated','index','/describe','show','/:id/dispositions','getDispositions','/:id/canned_answers','getAnswers','getLogo','getAvatar','/:id/customer_avatar','/:id/interactions','getInteractions','/:id/snippet','getSnippet','/:id/applications','/:id/proactive_actions','/:id/fields','getFields','/:id/offline_messages','getOfflineMessages','getAgents','post','create','diskStorage','join','server/files/images/logos/','format','now','/:id/logo','single','file','addLogo','root','server/files/images/avatars/','%s-%s','/:id/avatar','addAvatar','originalname','addCustomerAvatar','/:id/system_avatar','addSystemAvatar','/:id/notify','notify','/:id/offline','offline','addAgents','put','update','delete'];(function(_0x4c5180,_0x179861){var _0x328f40=function(_0x43157c){while(--_0x43157c){_0x4c5180['push'](_0x4c5180['shift']());}};_0x328f40(++_0x179861);}(_0xd61e,0x1a1));var _0xed61=function(_0x21895c,_0x75b67d){_0x21895c=_0x21895c-0x0;var _0x25004a=_0xd61e[_0x21895c];return _0x25004a;};'use strict';var multer=require('multer');var util=require(_0xed61('0x0'));var path=require('path');var timeout=require(_0xed61('0x1'));var express=require(_0xed61('0x2'));var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xed61('0x3'));var controller=require('./chatWebsite.controller');router[_0xed61('0x4')]('/',auth[_0xed61('0x5')](),controller[_0xed61('0x6')]);router[_0xed61('0x4')](_0xed61('0x7'),auth['isAuthenticated'](),controller['describe']);router[_0xed61('0x4')]('/:id',auth['isAuthenticated'](),controller[_0xed61('0x8')]);router[_0xed61('0x4')](_0xed61('0x9'),auth[_0xed61('0x5')](),controller[_0xed61('0xa')]);router[_0xed61('0x4')](_0xed61('0xb'),auth['isAuthenticated'](),controller[_0xed61('0xc')]);router[_0xed61('0x4')]('/:id/logo',controller[_0xed61('0xd')]);router[_0xed61('0x4')]('/:id/avatar',controller[_0xed61('0xe')]);router[_0xed61('0x4')](_0xed61('0xf'),controller['getCustomerAvatar']);router['get']('/:id/system_avatar',controller['getSystemAvatar']);router['get'](_0xed61('0x10'),auth[_0xed61('0x5')](),controller[_0xed61('0x11')]);router[_0xed61('0x4')](_0xed61('0x12'),controller[_0xed61('0x13')]);router['get'](_0xed61('0x14'),auth[_0xed61('0x5')](),controller['getApplications']);router[_0xed61('0x4')](_0xed61('0x15'),auth[_0xed61('0x5')](),controller['getProactiveActions']);router[_0xed61('0x4')](_0xed61('0x16'),controller[_0xed61('0x17')]);router[_0xed61('0x4')](_0xed61('0x18'),auth[_0xed61('0x5')](),controller[_0xed61('0x19')]);router[_0xed61('0x4')]('/:id/users',auth[_0xed61('0x5')](),controller[_0xed61('0x1a')]);router[_0xed61('0x1b')]('/',auth['isAuthenticated'](),controller[_0xed61('0x1c')]);router['post'](_0xed61('0x9'),auth[_0xed61('0x5')](),controller['addDisposition']);router[_0xed61('0x1b')](_0xed61('0xb'),auth[_0xed61('0x5')](),controller['addAnswer']);var upload=multer({'storage':multer[_0xed61('0x1d')]({'destination':function(_0x4b93f4,_0x760dca,_0x38b833){_0x38b833(null,path[_0xed61('0x1e')](config['root'],_0xed61('0x1f')));},'filename':function(_0x542419,_0x144c8d,_0x10c080){_0x10c080(null,util[_0xed61('0x20')]('%s-%s',Date[_0xed61('0x21')](),_0x144c8d['originalname']));}})});router['post'](_0xed61('0x22'),upload[_0xed61('0x23')](_0xed61('0x24')),controller[_0xed61('0x25')]);var upload=multer({'storage':multer[_0xed61('0x1d')]({'destination':function(_0x48f551,_0x31dc64,_0x2ed0b8){_0x2ed0b8(null,path[_0xed61('0x1e')](config[_0xed61('0x26')],_0xed61('0x27')));},'filename':function(_0x1b9260,_0x32f518,_0x4e003e){_0x4e003e(null,util[_0xed61('0x20')](_0xed61('0x28'),Date[_0xed61('0x21')](),_0x32f518['originalname']));}})});router['post'](_0xed61('0x29'),upload[_0xed61('0x23')](_0xed61('0x24')),controller[_0xed61('0x2a')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x417a04,_0xc8b6e7,_0x412635){_0x412635(null,path[_0xed61('0x1e')](config[_0xed61('0x26')],_0xed61('0x27')));},'filename':function(_0x494ad0,_0x215665,_0x2510d4){_0x2510d4(null,util[_0xed61('0x20')](_0xed61('0x28'),Date[_0xed61('0x21')](),_0x215665[_0xed61('0x2b')]));}})});router[_0xed61('0x1b')](_0xed61('0xf'),upload[_0xed61('0x23')](_0xed61('0x24')),controller[_0xed61('0x2c')]);var upload=multer({'storage':multer[_0xed61('0x1d')]({'destination':function(_0x224d83,_0xfee75e,_0x8c80d0){_0x8c80d0(null,path['join'](config[_0xed61('0x26')],_0xed61('0x27')));},'filename':function(_0x3432f2,_0x4c18db,_0x3b9a61){_0x3b9a61(null,util[_0xed61('0x20')](_0xed61('0x28'),Date[_0xed61('0x21')](),_0x4c18db['originalname']));}})});router[_0xed61('0x1b')](_0xed61('0x2d'),upload[_0xed61('0x23')](_0xed61('0x24')),controller[_0xed61('0x2e')]);router[_0xed61('0x1b')](_0xed61('0x2f'),controller[_0xed61('0x30')]);router['post'](_0xed61('0x31'),controller[_0xed61('0x32')]);router[_0xed61('0x1b')](_0xed61('0x10'),auth[_0xed61('0x5')](),controller['addInteraction']);router[_0xed61('0x1b')](_0xed61('0x14'),auth[_0xed61('0x5')](),controller['addApplications']);router[_0xed61('0x1b')]('/:id/proactive_actions',auth['isAuthenticated'](),controller['addProactiveActions']);router[_0xed61('0x1b')]('/:id/users',auth[_0xed61('0x5')](),controller[_0xed61('0x33')]);router[_0xed61('0x34')]('/:id',auth[_0xed61('0x5')](),controller[_0xed61('0x35')]);router[_0xed61('0x36')]('/:id',auth['isAuthenticated'](),controller[_0xed61('0x37')]);router[_0xed61('0x36')](_0xed61('0x9'),auth[_0xed61('0x5')](),controller['removeDispositions']);router[_0xed61('0x36')](_0xed61('0xb'),auth[_0xed61('0x5')](),controller[_0xed61('0x38')]);router[_0xed61('0x36')](_0xed61('0x39'),auth[_0xed61('0x5')](),controller[_0xed61('0x3a')]);module['exports']=router;