Built motion from commit 3d6333b4.|2.6.31
[motion2.git] / server / api / chatWebsite / index.js
index 1afd510..904d437 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa8be=['replace','extname','/:id/offline','offline','addInteraction','/:id/applications','addApplications','addProactiveActions','put','update','delete','removeDispositions','removeAnswers','removeAgents','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/interaction/service','./chatWebsite.controller','get','isAuthenticated','describe','/:id','show','/:id/canned_answers','getLogo','/:id/avatar','getAvatar','/:id/customer_avatar','getCustomerAvatar','/:id/interactions','/:id/snippet','getSnippet','getApplications','/:id/proactive_actions','/:id/fields','getOfflineMessages','/:id/users','getAgents','post','create','/:id/dispositions','addDisposition','addAnswer','diskStorage','root','server/files/images/logos/','format','%s-%s','now','/:id/logo','single','addLogo','server/files/images/avatars/','originalname','file','addAvatar','addCustomerAvatar','join','addSystemAvatar','/:id/notify','notify','server/files','attachments','offline-chat','ensureDir'];(function(_0x88a523,_0x4c930c){var _0x3deebf=function(_0x9d3877){while(--_0x9d3877){_0x88a523['push'](_0x88a523['shift']());}};_0x3deebf(++_0x4c930c);}(_0xa8be,0x16d));var _0xea8b=function(_0x4189fa,_0x2d3cff){_0x4189fa=_0x4189fa-0x0;var _0x3bef96=_0xa8be[_0x4189fa];return _0x3bef96;};'use strict';var multer=require(_0xea8b('0x0'));var util=require(_0xea8b('0x1'));var path=require(_0xea8b('0x2'));var timeout=require(_0xea8b('0x3'));var express=require(_0xea8b('0x4'));var router=express['Router']();var fs_extra=require(_0xea8b('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0xea8b('0x6'));var config=require('../../config/environment');var controller=require(_0xea8b('0x7'));router[_0xea8b('0x8')]('/',auth[_0xea8b('0x9')](),controller['index']);router[_0xea8b('0x8')]('/describe',auth[_0xea8b('0x9')](),controller[_0xea8b('0xa')]);router[_0xea8b('0x8')](_0xea8b('0xb'),auth['isAuthenticated'](),controller[_0xea8b('0xc')]);router['get']('/:id/dispositions',auth[_0xea8b('0x9')](),controller['getDispositions']);router['get'](_0xea8b('0xd'),auth[_0xea8b('0x9')](),controller['getAnswers']);router[_0xea8b('0x8')]('/:id/logo',controller[_0xea8b('0xe')]);router[_0xea8b('0x8')](_0xea8b('0xf'),controller[_0xea8b('0x10')]);router[_0xea8b('0x8')](_0xea8b('0x11'),controller[_0xea8b('0x12')]);router['get']('/:id/system_avatar',controller['getSystemAvatar']);router['get'](_0xea8b('0x13'),auth[_0xea8b('0x9')](),controller['getInteractions']);router[_0xea8b('0x8')](_0xea8b('0x14'),controller[_0xea8b('0x15')]);router[_0xea8b('0x8')]('/:id/applications',auth[_0xea8b('0x9')](),controller[_0xea8b('0x16')]);router['get'](_0xea8b('0x17'),auth[_0xea8b('0x9')](),controller['getProactiveActions']);router[_0xea8b('0x8')](_0xea8b('0x18'),controller['getFields']);router['get']('/:id/offline_messages',auth[_0xea8b('0x9')](),controller[_0xea8b('0x19')]);router['get'](_0xea8b('0x1a'),auth[_0xea8b('0x9')](),controller[_0xea8b('0x1b')]);router[_0xea8b('0x1c')]('/',auth['isAuthenticated'](),controller[_0xea8b('0x1d')]);router[_0xea8b('0x1c')](_0xea8b('0x1e'),auth[_0xea8b('0x9')](),controller[_0xea8b('0x1f')]);router[_0xea8b('0x1c')](_0xea8b('0xd'),auth[_0xea8b('0x9')](),controller[_0xea8b('0x20')]);var upload=multer({'storage':multer[_0xea8b('0x21')]({'destination':function(_0x57ea6b,_0x27bf66,_0x52238e){_0x52238e(null,path['join'](config[_0xea8b('0x22')],_0xea8b('0x23')));},'filename':function(_0x4ffe63,_0x122c1d,_0x2b149f){_0x2b149f(null,util[_0xea8b('0x24')](_0xea8b('0x25'),Date[_0xea8b('0x26')](),_0x122c1d['originalname']));}})});router[_0xea8b('0x1c')](_0xea8b('0x27'),upload[_0xea8b('0x28')]('file'),controller[_0xea8b('0x29')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x115edb,_0x39ca94,_0x3597d2){_0x3597d2(null,path['join'](config[_0xea8b('0x22')],_0xea8b('0x2a')));},'filename':function(_0xfd497f,_0x71eeec,_0x259a02){_0x259a02(null,util[_0xea8b('0x24')](_0xea8b('0x25'),Date[_0xea8b('0x26')](),_0x71eeec[_0xea8b('0x2b')]));}})});router[_0xea8b('0x1c')](_0xea8b('0xf'),upload[_0xea8b('0x28')](_0xea8b('0x2c')),controller[_0xea8b('0x2d')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x8362bd,_0x257af4,_0x357afc){_0x357afc(null,path['join'](config[_0xea8b('0x22')],'server/files/images/avatars/'));},'filename':function(_0xace069,_0x4acb8b,_0x44fdae){_0x44fdae(null,util[_0xea8b('0x24')](_0xea8b('0x25'),Date[_0xea8b('0x26')](),_0x4acb8b[_0xea8b('0x2b')]));}})});router[_0xea8b('0x1c')]('/:id/customer_avatar',upload[_0xea8b('0x28')](_0xea8b('0x2c')),controller[_0xea8b('0x2e')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x3dd87e,_0x4fae08,_0x4c9425){_0x4c9425(null,path[_0xea8b('0x2f')](config[_0xea8b('0x22')],_0xea8b('0x2a')));},'filename':function(_0xeedc94,_0x1120d9,_0x42ec0c){_0x42ec0c(null,util['format'](_0xea8b('0x25'),Date['now'](),_0x1120d9[_0xea8b('0x2b')]));}})});router[_0xea8b('0x1c')]('/:id/system_avatar',upload['single'](_0xea8b('0x2c')),controller[_0xea8b('0x30')]);router[_0xea8b('0x1c')](_0xea8b('0x31'),controller[_0xea8b('0x32')]);const offlineUploadMulter=multer({'storage':multer[_0xea8b('0x21')]({'destination':function(_0x4a87a4,_0x2e6244,_0xbb7cbc){const _0x2d3060=path[_0xea8b('0x2f')](config['root'],_0xea8b('0x33'),_0xea8b('0x34'),_0xea8b('0x35'));fs_extra[_0xea8b('0x36')](_0x2d3060,function(){_0xbb7cbc(null,_0x2d3060);});},'filename':function(_0x485670,_0x201c86,_0x2bacef){const _0xbfb1ea=_0x201c86[_0xea8b('0x2b')][_0xea8b('0x37')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');const _0x1257c9=path[_0xea8b('0x38')](_0xbfb1ea);const _0x4220e9=Date[_0xea8b('0x26')]()+'-'+_0xbfb1ea[_0xea8b('0x37')](_0x1257c9,'')+_0x1257c9;_0x2bacef(null,_0x4220e9);}})});router[_0xea8b('0x1c')](_0xea8b('0x39'),offlineUploadMulter['any'](),controller[_0xea8b('0x3a')]);router[_0xea8b('0x1c')](_0xea8b('0x13'),auth['isAuthenticated'](),controller[_0xea8b('0x3b')]);router[_0xea8b('0x1c')](_0xea8b('0x3c'),auth[_0xea8b('0x9')](),controller[_0xea8b('0x3d')]);router[_0xea8b('0x1c')](_0xea8b('0x17'),auth[_0xea8b('0x9')](),controller[_0xea8b('0x3e')]);router[_0xea8b('0x1c')]('/:id/users',auth[_0xea8b('0x9')](),controller['addAgents']);router[_0xea8b('0x3f')](_0xea8b('0xb'),auth[_0xea8b('0x9')](),controller[_0xea8b('0x40')]);router['delete'](_0xea8b('0xb'),auth[_0xea8b('0x9')](),controller['destroy']);router[_0xea8b('0x41')]('/:id/dispositions',auth['isAuthenticated'](),controller[_0xea8b('0x42')]);router[_0xea8b('0x41')](_0xea8b('0xd'),auth[_0xea8b('0x9')](),controller[_0xea8b('0x43')]);router['delete'](_0xea8b('0x1a'),auth[_0xea8b('0x9')](),controller[_0xea8b('0x44')]);module[_0xea8b('0x45')]=router;
\ No newline at end of file
+var _0xb416=['removeDispositions','removeAnswers','util','connect-timeout','fs-extra','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/describe','describe','/:id','/:id/dispositions','getDispositions','/:id/canned_answers','/:id/avatar','/:id/customer_avatar','getCustomerAvatar','/:id/system_avatar','getSystemAvatar','/:id/interactions','getInteractions','getSnippet','/:id/applications','/:id/proactive_actions','getProactiveActions','/:id/offline_messages','getOfflineMessages','/:id/users','post','create','addDisposition','diskStorage','root','server/files/images/logos/','format','now','originalname','/:id/logo','single','addLogo','join','%s-%s','file','addCustomerAvatar','/:id/notify','server/files','attachments','ensureDir','replace','extname','/:id/offline','any','addInteraction','addApplications','addProactiveActions','put','update','delete','destroy'];(function(_0x5bcc2e,_0x158b13){var _0x2a7e72=function(_0x17be8a){while(--_0x17be8a){_0x5bcc2e['push'](_0x5bcc2e['shift']());}};_0x2a7e72(++_0x158b13);}(_0xb416,0x170));var _0x6b41=function(_0x22b7b4,_0x4fb2af){_0x22b7b4=_0x22b7b4-0x0;var _0xfd1f22=_0xb416[_0x22b7b4];return _0xfd1f22;};'use strict';var multer=require('multer');var util=require(_0x6b41('0x0'));var path=require('path');var timeout=require(_0x6b41('0x1'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x6b41('0x2'));var auth=require('../../components/auth/service');var interaction=require(_0x6b41('0x3'));var config=require(_0x6b41('0x4'));var controller=require('./chatWebsite.controller');router[_0x6b41('0x5')]('/',auth[_0x6b41('0x6')](),controller[_0x6b41('0x7')]);router[_0x6b41('0x5')](_0x6b41('0x8'),auth['isAuthenticated'](),controller[_0x6b41('0x9')]);router[_0x6b41('0x5')](_0x6b41('0xa'),auth['isAuthenticated'](),controller['show']);router[_0x6b41('0x5')](_0x6b41('0xb'),auth[_0x6b41('0x6')](),controller[_0x6b41('0xc')]);router[_0x6b41('0x5')](_0x6b41('0xd'),auth[_0x6b41('0x6')](),controller['getAnswers']);router[_0x6b41('0x5')]('/:id/logo',controller['getLogo']);router['get'](_0x6b41('0xe'),controller['getAvatar']);router[_0x6b41('0x5')](_0x6b41('0xf'),controller[_0x6b41('0x10')]);router[_0x6b41('0x5')](_0x6b41('0x11'),controller[_0x6b41('0x12')]);router['get'](_0x6b41('0x13'),auth[_0x6b41('0x6')](),controller[_0x6b41('0x14')]);router[_0x6b41('0x5')]('/:id/snippet',controller[_0x6b41('0x15')]);router[_0x6b41('0x5')](_0x6b41('0x16'),auth[_0x6b41('0x6')](),controller['getApplications']);router[_0x6b41('0x5')](_0x6b41('0x17'),auth[_0x6b41('0x6')](),controller[_0x6b41('0x18')]);router[_0x6b41('0x5')]('/:id/fields',controller['getFields']);router[_0x6b41('0x5')](_0x6b41('0x19'),auth[_0x6b41('0x6')](),controller[_0x6b41('0x1a')]);router[_0x6b41('0x5')](_0x6b41('0x1b'),auth['isAuthenticated'](),controller['getAgents']);router[_0x6b41('0x1c')]('/',auth[_0x6b41('0x6')](),controller[_0x6b41('0x1d')]);router[_0x6b41('0x1c')]('/:id/dispositions',auth[_0x6b41('0x6')](),controller[_0x6b41('0x1e')]);router[_0x6b41('0x1c')](_0x6b41('0xd'),auth['isAuthenticated'](),controller['addAnswer']);var upload=multer({'storage':multer[_0x6b41('0x1f')]({'destination':function(_0x2c06cf,_0x192864,_0x7a77b7){_0x7a77b7(null,path['join'](config[_0x6b41('0x20')],_0x6b41('0x21')));},'filename':function(_0x563d34,_0x108f2f,_0x49a2cb){_0x49a2cb(null,util[_0x6b41('0x22')]('%s-%s',Date[_0x6b41('0x23')](),_0x108f2f[_0x6b41('0x24')]));}})});router['post'](_0x6b41('0x25'),upload[_0x6b41('0x26')]('file'),controller[_0x6b41('0x27')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x211b29,_0x47eabe,_0x46e133){_0x46e133(null,path[_0x6b41('0x28')](config['root'],'server/files/images/avatars/'));},'filename':function(_0x5ea968,_0x3d5b85,_0x281af7){_0x281af7(null,util['format'](_0x6b41('0x29'),Date[_0x6b41('0x23')](),_0x3d5b85['originalname']));}})});router['post']('/:id/avatar',upload['single'](_0x6b41('0x2a')),controller['addAvatar']);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x35b643,_0x4c1880,_0x34a7b5){_0x34a7b5(null,path[_0x6b41('0x28')](config[_0x6b41('0x20')],'server/files/images/avatars/'));},'filename':function(_0x119143,_0xf38176,_0x5634ec){_0x5634ec(null,util[_0x6b41('0x22')]('%s-%s',Date[_0x6b41('0x23')](),_0xf38176[_0x6b41('0x24')]));}})});router[_0x6b41('0x1c')](_0x6b41('0xf'),upload[_0x6b41('0x26')](_0x6b41('0x2a')),controller[_0x6b41('0x2b')]);var upload=multer({'storage':multer[_0x6b41('0x1f')]({'destination':function(_0x38736d,_0x2cc3fe,_0x3faae4){_0x3faae4(null,path[_0x6b41('0x28')](config[_0x6b41('0x20')],'server/files/images/avatars/'));},'filename':function(_0x225dff,_0x5d1511,_0x26cad3){_0x26cad3(null,util[_0x6b41('0x22')](_0x6b41('0x29'),Date[_0x6b41('0x23')](),_0x5d1511['originalname']));}})});router[_0x6b41('0x1c')](_0x6b41('0x11'),upload['single']('file'),controller['addSystemAvatar']);router[_0x6b41('0x1c')](_0x6b41('0x2c'),controller['notify']);const offlineUploadMulter=multer({'storage':multer[_0x6b41('0x1f')]({'destination':function(_0x403e7a,_0x21e35e,_0x28d365){const _0xb27fb1=path[_0x6b41('0x28')](config[_0x6b41('0x20')],_0x6b41('0x2d'),_0x6b41('0x2e'),'offline-chat');fs_extra[_0x6b41('0x2f')](_0xb27fb1,function(){_0x28d365(null,_0xb27fb1);});},'filename':function(_0x456ef5,_0x569639,_0x41d300){const _0x50bc64=_0x569639[_0x6b41('0x24')][_0x6b41('0x30')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');const _0x435c58=path[_0x6b41('0x31')](_0x50bc64);const _0x16a755=Date[_0x6b41('0x23')]()+'-'+_0x50bc64[_0x6b41('0x30')](_0x435c58,'')+_0x435c58;_0x41d300(null,_0x16a755);}})});router[_0x6b41('0x1c')](_0x6b41('0x32'),offlineUploadMulter[_0x6b41('0x33')](),controller['offline']);router[_0x6b41('0x1c')](_0x6b41('0x13'),auth[_0x6b41('0x6')](),controller[_0x6b41('0x34')]);router[_0x6b41('0x1c')](_0x6b41('0x16'),auth[_0x6b41('0x6')](),controller[_0x6b41('0x35')]);router[_0x6b41('0x1c')]('/:id/proactive_actions',auth[_0x6b41('0x6')](),controller[_0x6b41('0x36')]);router[_0x6b41('0x1c')](_0x6b41('0x1b'),auth[_0x6b41('0x6')](),controller['addAgents']);router[_0x6b41('0x37')]('/:id',auth[_0x6b41('0x6')](),controller[_0x6b41('0x38')]);router[_0x6b41('0x39')]('/:id',auth[_0x6b41('0x6')](),controller[_0x6b41('0x3a')]);router[_0x6b41('0x39')](_0x6b41('0xb'),auth[_0x6b41('0x6')](),controller[_0x6b41('0x3b')]);router[_0x6b41('0x39')](_0x6b41('0xd'),auth[_0x6b41('0x6')](),controller[_0x6b41('0x3c')]);router[_0x6b41('0x39')]('/:id/users',auth[_0x6b41('0x6')](),controller['removeAgents']);module['exports']=router;
\ No newline at end of file