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 _0x0e4b=['file','addLogo','join','server/files/images/avatars/','%s-%s','/:id/avatar','addAvatar','/:id/customer_avatar','addCustomerAvatar','addSystemAvatar','notify','offline','/:id/interactions','addInteraction','addApplications','addProactiveActions','addAgents','update','destroy','delete','removeAnswers','removeAgents','exports','multer','util','connect-timeout','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatWebsite.controller','get','isAuthenticated','index','/describe','/:id','getDispositions','/:id/logo','getLogo','getAvatar','getCustomerAvatar','/:id/system_avatar','getSystemAvatar','getInteractions','/:id/snippet','getSnippet','/:id/applications','/:id/proactive_actions','getFields','/:id/offline_messages','getOfflineMessages','/:id/users','getAgents','create','post','/:id/dispositions','addDisposition','/:id/canned_answers','addAnswer','diskStorage','root','server/files/images/logos/','format','now','originalname','single'];(function(_0x24259d,_0x64a194){var _0x5a701=function(_0x204516){while(--_0x204516){_0x24259d['push'](_0x24259d['shift']());}};_0x5a701(++_0x64a194);}(_0x0e4b,0x99));var _0xb0e4=function(_0x2e69d9,_0x4c664f){_0x2e69d9=_0x2e69d9-0x0;var _0x53f49a=_0x0e4b[_0x2e69d9];return _0x53f49a;};'use strict';var multer=require(_0xb0e4('0x0'));var util=require(_0xb0e4('0x1'));var path=require('path');var timeout=require(_0xb0e4('0x2'));var express=require('express');var router=express['Router']();var auth=require(_0xb0e4('0x3'));var interaction=require(_0xb0e4('0x4'));var config=require(_0xb0e4('0x5'));var controller=require(_0xb0e4('0x6'));router[_0xb0e4('0x7')]('/',auth[_0xb0e4('0x8')](),controller[_0xb0e4('0x9')]);router['get'](_0xb0e4('0xa'),auth[_0xb0e4('0x8')](),controller['describe']);router[_0xb0e4('0x7')](_0xb0e4('0xb'),auth[_0xb0e4('0x8')](),controller['show']);router[_0xb0e4('0x7')]('/:id/dispositions',auth[_0xb0e4('0x8')](),controller[_0xb0e4('0xc')]);router[_0xb0e4('0x7')]('/:id/canned_answers',auth['isAuthenticated'](),controller['getAnswers']);router[_0xb0e4('0x7')](_0xb0e4('0xd'),controller[_0xb0e4('0xe')]);router[_0xb0e4('0x7')]('/:id/avatar',controller[_0xb0e4('0xf')]);router[_0xb0e4('0x7')]('/:id/customer_avatar',controller[_0xb0e4('0x10')]);router['get'](_0xb0e4('0x11'),controller[_0xb0e4('0x12')]);router[_0xb0e4('0x7')]('/:id/interactions',auth['isAuthenticated'](),controller[_0xb0e4('0x13')]);router[_0xb0e4('0x7')](_0xb0e4('0x14'),controller[_0xb0e4('0x15')]);router[_0xb0e4('0x7')](_0xb0e4('0x16'),auth[_0xb0e4('0x8')](),controller['getApplications']);router[_0xb0e4('0x7')](_0xb0e4('0x17'),auth[_0xb0e4('0x8')](),controller['getProactiveActions']);router[_0xb0e4('0x7')]('/:id/fields',controller[_0xb0e4('0x18')]);router[_0xb0e4('0x7')](_0xb0e4('0x19'),auth['isAuthenticated'](),controller[_0xb0e4('0x1a')]);router['get'](_0xb0e4('0x1b'),auth[_0xb0e4('0x8')](),controller[_0xb0e4('0x1c')]);router['post']('/',auth['isAuthenticated'](),controller[_0xb0e4('0x1d')]);router[_0xb0e4('0x1e')](_0xb0e4('0x1f'),auth['isAuthenticated'](),controller[_0xb0e4('0x20')]);router[_0xb0e4('0x1e')](_0xb0e4('0x21'),auth[_0xb0e4('0x8')](),controller[_0xb0e4('0x22')]);var upload=multer({'storage':multer[_0xb0e4('0x23')]({'destination':function(_0x5d6e67,_0x8a9e7,_0x2faa25){_0x2faa25(null,path['join'](config[_0xb0e4('0x24')],_0xb0e4('0x25')));},'filename':function(_0x27a285,_0x43745e,_0x4dac58){_0x4dac58(null,util[_0xb0e4('0x26')]('%s-%s',Date[_0xb0e4('0x27')](),_0x43745e[_0xb0e4('0x28')]));}})});router['post'](_0xb0e4('0xd'),upload[_0xb0e4('0x29')](_0xb0e4('0x2a')),controller[_0xb0e4('0x2b')]);var upload=multer({'storage':multer[_0xb0e4('0x23')]({'destination':function(_0x212eba,_0x5862d1,_0x400792){_0x400792(null,path[_0xb0e4('0x2c')](config[_0xb0e4('0x24')],_0xb0e4('0x2d')));},'filename':function(_0x4c037e,_0x5cb78a,_0xfe9881){_0xfe9881(null,util[_0xb0e4('0x26')](_0xb0e4('0x2e'),Date[_0xb0e4('0x27')](),_0x5cb78a[_0xb0e4('0x28')]));}})});router[_0xb0e4('0x1e')](_0xb0e4('0x2f'),upload[_0xb0e4('0x29')](_0xb0e4('0x2a')),controller[_0xb0e4('0x30')]);var upload=multer({'storage':multer[_0xb0e4('0x23')]({'destination':function(_0x3b9962,_0x54667a,_0x43575c){_0x43575c(null,path[_0xb0e4('0x2c')](config['root'],_0xb0e4('0x2d')));},'filename':function(_0x3d6d14,_0x102dc3,_0x1e78c4){_0x1e78c4(null,util[_0xb0e4('0x26')](_0xb0e4('0x2e'),Date[_0xb0e4('0x27')](),_0x102dc3[_0xb0e4('0x28')]));}})});router[_0xb0e4('0x1e')](_0xb0e4('0x31'),upload['single'](_0xb0e4('0x2a')),controller[_0xb0e4('0x32')]);var upload=multer({'storage':multer[_0xb0e4('0x23')]({'destination':function(_0x2dc8af,_0x21198f,_0x3d1c5f){_0x3d1c5f(null,path[_0xb0e4('0x2c')](config[_0xb0e4('0x24')],_0xb0e4('0x2d')));},'filename':function(_0x187eba,_0x6d55ea,_0x5bbef7){_0x5bbef7(null,util[_0xb0e4('0x26')](_0xb0e4('0x2e'),Date[_0xb0e4('0x27')](),_0x6d55ea['originalname']));}})});router[_0xb0e4('0x1e')](_0xb0e4('0x11'),upload['single'](_0xb0e4('0x2a')),controller[_0xb0e4('0x33')]);router['post']('/:id/notify',controller[_0xb0e4('0x34')]);router[_0xb0e4('0x1e')]('/:id/offline',controller[_0xb0e4('0x35')]);router[_0xb0e4('0x1e')](_0xb0e4('0x36'),auth[_0xb0e4('0x8')](),controller[_0xb0e4('0x37')]);router[_0xb0e4('0x1e')](_0xb0e4('0x16'),auth['isAuthenticated'](),controller[_0xb0e4('0x38')]);router[_0xb0e4('0x1e')]('/:id/proactive_actions',auth[_0xb0e4('0x8')](),controller[_0xb0e4('0x39')]);router[_0xb0e4('0x1e')](_0xb0e4('0x1b'),auth[_0xb0e4('0x8')](),controller[_0xb0e4('0x3a')]);router['put'](_0xb0e4('0xb'),auth[_0xb0e4('0x8')](),controller[_0xb0e4('0x3b')]);router['delete']('/:id',auth[_0xb0e4('0x8')](),controller[_0xb0e4('0x3c')]);router['delete'](_0xb0e4('0x1f'),auth[_0xb0e4('0x8')](),controller['removeDispositions']);router[_0xb0e4('0x3d')](_0xb0e4('0x21'),auth['isAuthenticated'](),controller[_0xb0e4('0x3e')]);router[_0xb0e4('0x3d')](_0xb0e4('0x1b'),auth['isAuthenticated'](),controller[_0xb0e4('0x3f')]);module[_0xb0e4('0x40')]=router;