Built motion from commit (unavailable).|2.5.31
[motion2.git] / server / api / chatWebsite / index.js
index eaee673..bfe3d3f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbcb0=['/:id/applications','/:id/proactive_actions','getProactiveActions','getFields','/:id/offline_messages','getOfflineMessages','/:id/users','getAgents','post','create','addAnswer','join','root','format','%s-%s','now','originalname','single','addLogo','diskStorage','server/files/images/avatars/','file','addAvatar','addCustomerAvatar','addSystemAvatar','/:id/notify','notify','server/files','attachments','offline-chat','ensureDir','replace','extname','/:id/offline','/:id/interactions','addInteraction','/:id','update','delete','destroy','removeAnswers','multer','util','path','express','Router','fs-extra','../../components/auth/service','get','isAuthenticated','index','describe','/:id/dispositions','getDispositions','/:id/canned_answers','/:id/logo','getLogo','/:id/avatar','getAvatar','/:id/customer_avatar','getCustomerAvatar','getSystemAvatar','getInteractions','/:id/snippet'];(function(_0x1b8524,_0x1bb669){var _0x81418d=function(_0x5f5795){while(--_0x5f5795){_0x1b8524['push'](_0x1b8524['shift']());}};_0x81418d(++_0x1bb669);}(_0xbcb0,0xa9));var _0x0bcb=function(_0x30e162,_0x3522f4){_0x30e162=_0x30e162-0x0;var _0x5965be=_0xbcb0[_0x30e162];return _0x5965be;};'use strict';var multer=require(_0x0bcb('0x0'));var util=require(_0x0bcb('0x1'));var path=require(_0x0bcb('0x2'));var timeout=require('connect-timeout');var express=require(_0x0bcb('0x3'));var router=express[_0x0bcb('0x4')]();var fs_extra=require(_0x0bcb('0x5'));var auth=require(_0x0bcb('0x6'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require('./chatWebsite.controller');router[_0x0bcb('0x7')]('/',auth[_0x0bcb('0x8')](),controller[_0x0bcb('0x9')]);router[_0x0bcb('0x7')]('/describe',auth[_0x0bcb('0x8')](),controller[_0x0bcb('0xa')]);router[_0x0bcb('0x7')]('/:id',auth[_0x0bcb('0x8')](),controller['show']);router[_0x0bcb('0x7')](_0x0bcb('0xb'),auth['isAuthenticated'](),controller[_0x0bcb('0xc')]);router[_0x0bcb('0x7')](_0x0bcb('0xd'),auth['isAuthenticated'](),controller['getAnswers']);router[_0x0bcb('0x7')](_0x0bcb('0xe'),controller[_0x0bcb('0xf')]);router['get'](_0x0bcb('0x10'),controller[_0x0bcb('0x11')]);router[_0x0bcb('0x7')](_0x0bcb('0x12'),controller[_0x0bcb('0x13')]);router[_0x0bcb('0x7')]('/:id/system_avatar',controller[_0x0bcb('0x14')]);router[_0x0bcb('0x7')]('/:id/interactions',auth[_0x0bcb('0x8')](),controller[_0x0bcb('0x15')]);router[_0x0bcb('0x7')](_0x0bcb('0x16'),controller['getSnippet']);router['get'](_0x0bcb('0x17'),auth[_0x0bcb('0x8')](),controller['getApplications']);router[_0x0bcb('0x7')](_0x0bcb('0x18'),auth[_0x0bcb('0x8')](),controller[_0x0bcb('0x19')]);router['get']('/:id/fields',controller[_0x0bcb('0x1a')]);router[_0x0bcb('0x7')](_0x0bcb('0x1b'),auth['isAuthenticated'](),controller[_0x0bcb('0x1c')]);router[_0x0bcb('0x7')](_0x0bcb('0x1d'),auth[_0x0bcb('0x8')](),controller[_0x0bcb('0x1e')]);router[_0x0bcb('0x1f')]('/',auth[_0x0bcb('0x8')](),controller[_0x0bcb('0x20')]);router[_0x0bcb('0x1f')](_0x0bcb('0xb'),auth[_0x0bcb('0x8')](),controller['addDisposition']);router[_0x0bcb('0x1f')](_0x0bcb('0xd'),auth[_0x0bcb('0x8')](),controller[_0x0bcb('0x21')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x1ff7ca,_0x308edd,_0x176a70){_0x176a70(null,path[_0x0bcb('0x22')](config[_0x0bcb('0x23')],'server/files/images/logos/'));},'filename':function(_0x4382fc,_0x201591,_0x49f54c){_0x49f54c(null,util[_0x0bcb('0x24')](_0x0bcb('0x25'),Date[_0x0bcb('0x26')](),_0x201591[_0x0bcb('0x27')]));}})});router[_0x0bcb('0x1f')]('/:id/logo',upload[_0x0bcb('0x28')]('file'),controller[_0x0bcb('0x29')]);var upload=multer({'storage':multer[_0x0bcb('0x2a')]({'destination':function(_0x407db2,_0x16e7d3,_0x2fc38b){_0x2fc38b(null,path[_0x0bcb('0x22')](config['root'],_0x0bcb('0x2b')));},'filename':function(_0x3d916f,_0x336fc5,_0x397f9f){_0x397f9f(null,util[_0x0bcb('0x24')](_0x0bcb('0x25'),Date[_0x0bcb('0x26')](),_0x336fc5['originalname']));}})});router[_0x0bcb('0x1f')](_0x0bcb('0x10'),upload[_0x0bcb('0x28')](_0x0bcb('0x2c')),controller[_0x0bcb('0x2d')]);var upload=multer({'storage':multer[_0x0bcb('0x2a')]({'destination':function(_0x5046f8,_0x4e7313,_0x5edff2){_0x5edff2(null,path[_0x0bcb('0x22')](config['root'],_0x0bcb('0x2b')));},'filename':function(_0x4de536,_0x24fc4b,_0x10b7ec){_0x10b7ec(null,util['format'](_0x0bcb('0x25'),Date['now'](),_0x24fc4b[_0x0bcb('0x27')]));}})});router[_0x0bcb('0x1f')](_0x0bcb('0x12'),upload[_0x0bcb('0x28')]('file'),controller[_0x0bcb('0x2e')]);var upload=multer({'storage':multer[_0x0bcb('0x2a')]({'destination':function(_0x4312cc,_0x3239d9,_0x10ab9a){_0x10ab9a(null,path[_0x0bcb('0x22')](config[_0x0bcb('0x23')],_0x0bcb('0x2b')));},'filename':function(_0x469505,_0x381f67,_0x5f5595){_0x5f5595(null,util['format'](_0x0bcb('0x25'),Date[_0x0bcb('0x26')](),_0x381f67[_0x0bcb('0x27')]));}})});router[_0x0bcb('0x1f')]('/:id/system_avatar',upload['single']('file'),controller[_0x0bcb('0x2f')]);router[_0x0bcb('0x1f')](_0x0bcb('0x30'),controller[_0x0bcb('0x31')]);const offlineUploadMulter=multer({'storage':multer[_0x0bcb('0x2a')]({'destination':function(_0x44d903,_0x37a0a2,_0x192d8b){const _0x32ff41=path[_0x0bcb('0x22')](config[_0x0bcb('0x23')],_0x0bcb('0x32'),_0x0bcb('0x33'),_0x0bcb('0x34'));fs_extra[_0x0bcb('0x35')](_0x32ff41,function(){_0x192d8b(null,_0x32ff41);});},'filename':function(_0x2ead6d,_0x258e9a,_0x57adbf){const _0x2e1dc9=_0x258e9a[_0x0bcb('0x27')][_0x0bcb('0x36')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');const _0x5b89ba=path[_0x0bcb('0x37')](_0x2e1dc9);const _0x2b0f81=Date[_0x0bcb('0x26')]()+'-'+_0x2e1dc9[_0x0bcb('0x36')](_0x5b89ba,'')+_0x5b89ba;_0x57adbf(null,_0x2b0f81);}})});router[_0x0bcb('0x1f')](_0x0bcb('0x38'),offlineUploadMulter['any'](),controller['offline']);router[_0x0bcb('0x1f')](_0x0bcb('0x39'),auth[_0x0bcb('0x8')](),controller[_0x0bcb('0x3a')]);router[_0x0bcb('0x1f')](_0x0bcb('0x17'),auth[_0x0bcb('0x8')](),controller['addApplications']);router[_0x0bcb('0x1f')]('/:id/proactive_actions',auth['isAuthenticated'](),controller['addProactiveActions']);router[_0x0bcb('0x1f')](_0x0bcb('0x1d'),auth[_0x0bcb('0x8')](),controller['addAgents']);router['put'](_0x0bcb('0x3b'),auth[_0x0bcb('0x8')](),controller[_0x0bcb('0x3c')]);router[_0x0bcb('0x3d')](_0x0bcb('0x3b'),auth[_0x0bcb('0x8')](),controller[_0x0bcb('0x3e')]);router['delete'](_0x0bcb('0xb'),auth[_0x0bcb('0x8')](),controller['removeDispositions']);router[_0x0bcb('0x3d')]('/:id/canned_answers',auth[_0x0bcb('0x8')](),controller[_0x0bcb('0x3f')]);router[_0x0bcb('0x3d')](_0x0bcb('0x1d'),auth['isAuthenticated'](),controller['removeAgents']);module['exports']=router;
\ No newline at end of file
+var _0x9bee=['delete','destroy','removeDispositions','removeAgents','exports','multer','util','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatWebsite.controller','isAuthenticated','get','/describe','/:id','show','/:id/dispositions','/:id/canned_answers','getAnswers','getLogo','/:id/avatar','getAvatar','getCustomerAvatar','/:id/system_avatar','getInteractions','/:id/snippet','getSnippet','/:id/applications','getApplications','getProactiveActions','/:id/fields','/:id/offline_messages','/:id/users','getAgents','post','create','addDisposition','diskStorage','join','format','%s-%s','now','originalname','/:id/logo','single','file','addLogo','root','server/files/images/avatars/','addAvatar','addCustomerAvatar','addSystemAvatar','notify','attachments','offline-chat','ensureDir','replace','extname','any','offline','/:id/interactions','addInteraction','addApplications','/:id/proactive_actions','addProactiveActions','addAgents','put'];(function(_0x4295bc,_0x55b581){var _0x2f0298=function(_0x3015e2){while(--_0x3015e2){_0x4295bc['push'](_0x4295bc['shift']());}};_0x2f0298(++_0x55b581);}(_0x9bee,0xd4));var _0xe9be=function(_0x1925df,_0xbd3e63){_0x1925df=_0x1925df-0x0;var _0x2f4e05=_0x9bee[_0x1925df];return _0x2f4e05;};'use strict';var multer=require(_0xe9be('0x0'));var util=require(_0xe9be('0x1'));var path=require(_0xe9be('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0xe9be('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0xe9be('0x4'));var interaction=require(_0xe9be('0x5'));var config=require(_0xe9be('0x6'));var controller=require(_0xe9be('0x7'));router['get']('/',auth[_0xe9be('0x8')](),controller['index']);router[_0xe9be('0x9')](_0xe9be('0xa'),auth[_0xe9be('0x8')](),controller['describe']);router[_0xe9be('0x9')](_0xe9be('0xb'),auth[_0xe9be('0x8')](),controller[_0xe9be('0xc')]);router[_0xe9be('0x9')](_0xe9be('0xd'),auth['isAuthenticated'](),controller['getDispositions']);router[_0xe9be('0x9')](_0xe9be('0xe'),auth[_0xe9be('0x8')](),controller[_0xe9be('0xf')]);router[_0xe9be('0x9')]('/:id/logo',controller[_0xe9be('0x10')]);router['get'](_0xe9be('0x11'),controller[_0xe9be('0x12')]);router[_0xe9be('0x9')]('/:id/customer_avatar',controller[_0xe9be('0x13')]);router[_0xe9be('0x9')](_0xe9be('0x14'),controller['getSystemAvatar']);router[_0xe9be('0x9')]('/:id/interactions',auth[_0xe9be('0x8')](),controller[_0xe9be('0x15')]);router[_0xe9be('0x9')](_0xe9be('0x16'),controller[_0xe9be('0x17')]);router['get'](_0xe9be('0x18'),auth['isAuthenticated'](),controller[_0xe9be('0x19')]);router[_0xe9be('0x9')]('/:id/proactive_actions',auth[_0xe9be('0x8')](),controller[_0xe9be('0x1a')]);router[_0xe9be('0x9')](_0xe9be('0x1b'),controller['getFields']);router['get'](_0xe9be('0x1c'),auth['isAuthenticated'](),controller['getOfflineMessages']);router[_0xe9be('0x9')](_0xe9be('0x1d'),auth['isAuthenticated'](),controller[_0xe9be('0x1e')]);router[_0xe9be('0x1f')]('/',auth[_0xe9be('0x8')](),controller[_0xe9be('0x20')]);router[_0xe9be('0x1f')]('/:id/dispositions',auth[_0xe9be('0x8')](),controller[_0xe9be('0x21')]);router[_0xe9be('0x1f')]('/:id/canned_answers',auth[_0xe9be('0x8')](),controller['addAnswer']);var upload=multer({'storage':multer[_0xe9be('0x22')]({'destination':function(_0x264988,_0x7bf02e,_0x11c013){_0x11c013(null,path[_0xe9be('0x23')](config['root'],'server/files/images/logos/'));},'filename':function(_0xf2acb0,_0x5e24da,_0xb21874){_0xb21874(null,util[_0xe9be('0x24')](_0xe9be('0x25'),Date[_0xe9be('0x26')](),_0x5e24da[_0xe9be('0x27')]));}})});router[_0xe9be('0x1f')](_0xe9be('0x28'),upload[_0xe9be('0x29')](_0xe9be('0x2a')),controller[_0xe9be('0x2b')]);var upload=multer({'storage':multer[_0xe9be('0x22')]({'destination':function(_0xe262f7,_0x19586f,_0xdab3a3){_0xdab3a3(null,path[_0xe9be('0x23')](config[_0xe9be('0x2c')],_0xe9be('0x2d')));},'filename':function(_0x38b653,_0x4cd778,_0x2e371c){_0x2e371c(null,util[_0xe9be('0x24')]('%s-%s',Date[_0xe9be('0x26')](),_0x4cd778[_0xe9be('0x27')]));}})});router[_0xe9be('0x1f')]('/:id/avatar',upload[_0xe9be('0x29')](_0xe9be('0x2a')),controller[_0xe9be('0x2e')]);var upload=multer({'storage':multer[_0xe9be('0x22')]({'destination':function(_0x4d918c,_0x553aaf,_0x53cbfc){_0x53cbfc(null,path['join'](config[_0xe9be('0x2c')],_0xe9be('0x2d')));},'filename':function(_0x4f3c28,_0x2f0863,_0x2af5bb){_0x2af5bb(null,util[_0xe9be('0x24')](_0xe9be('0x25'),Date['now'](),_0x2f0863[_0xe9be('0x27')]));}})});router[_0xe9be('0x1f')]('/:id/customer_avatar',upload[_0xe9be('0x29')](_0xe9be('0x2a')),controller[_0xe9be('0x2f')]);var upload=multer({'storage':multer[_0xe9be('0x22')]({'destination':function(_0x3b4e00,_0x3a912c,_0x532411){_0x532411(null,path[_0xe9be('0x23')](config['root'],_0xe9be('0x2d')));},'filename':function(_0x418134,_0x47abb6,_0x23382e){_0x23382e(null,util[_0xe9be('0x24')](_0xe9be('0x25'),Date[_0xe9be('0x26')](),_0x47abb6['originalname']));}})});router[_0xe9be('0x1f')](_0xe9be('0x14'),upload[_0xe9be('0x29')](_0xe9be('0x2a')),controller[_0xe9be('0x30')]);router[_0xe9be('0x1f')]('/:id/notify',controller[_0xe9be('0x31')]);const offlineUploadMulter=multer({'storage':multer[_0xe9be('0x22')]({'destination':function(_0x121bcc,_0x265819,_0x923342){const _0x3400e5=path[_0xe9be('0x23')](config[_0xe9be('0x2c')],'server/files',_0xe9be('0x32'),_0xe9be('0x33'));fs_extra[_0xe9be('0x34')](_0x3400e5,function(){_0x923342(null,_0x3400e5);});},'filename':function(_0x4e2f42,_0x13cadc,_0x35e728){const _0x55d068=_0x13cadc[_0xe9be('0x27')][_0xe9be('0x35')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');const _0x536683=path[_0xe9be('0x36')](_0x55d068);const _0x5d9b8c=Date[_0xe9be('0x26')]()+'-'+_0x55d068[_0xe9be('0x35')](_0x536683,'')+_0x536683;_0x35e728(null,_0x5d9b8c);}})});router['post']('/:id/offline',offlineUploadMulter[_0xe9be('0x37')](),controller[_0xe9be('0x38')]);router[_0xe9be('0x1f')](_0xe9be('0x39'),auth[_0xe9be('0x8')](),controller[_0xe9be('0x3a')]);router[_0xe9be('0x1f')](_0xe9be('0x18'),auth['isAuthenticated'](),controller[_0xe9be('0x3b')]);router[_0xe9be('0x1f')](_0xe9be('0x3c'),auth[_0xe9be('0x8')](),controller[_0xe9be('0x3d')]);router[_0xe9be('0x1f')]('/:id/users',auth[_0xe9be('0x8')](),controller[_0xe9be('0x3e')]);router[_0xe9be('0x3f')](_0xe9be('0xb'),auth[_0xe9be('0x8')](),controller['update']);router[_0xe9be('0x40')](_0xe9be('0xb'),auth[_0xe9be('0x8')](),controller[_0xe9be('0x41')]);router['delete'](_0xe9be('0xd'),auth[_0xe9be('0x8')](),controller[_0xe9be('0x42')]);router[_0xe9be('0x40')](_0xe9be('0xe'),auth[_0xe9be('0x8')](),controller['removeAnswers']);router[_0xe9be('0x40')](_0xe9be('0x1d'),auth[_0xe9be('0x8')](),controller[_0xe9be('0x43')]);module[_0xe9be('0x44')]=router;
\ No newline at end of file