Built motion from commit 42801a18.|2.6.28
[motion2.git] / server / api / chatWebsite / index.js
index 3364c47..35c2e86 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfefc=['removeDispositions','removeAnswers','removeAgents','exports','express','Router','../../components/auth/service','../../config/environment','./chatWebsite.controller','get','isAuthenticated','index','/describe','describe','show','/:id/dispositions','/:id/canned_answers','getAnswers','/:id/logo','/:id/avatar','getAvatar','/:id/customer_avatar','getCustomerAvatar','/:id/system_avatar','getSystemAvatar','/:id/interactions','/:id/snippet','getSnippet','/:id/applications','getApplications','/:id/proactive_actions','/:id/fields','getFields','create','post','addAnswer','root','format','now','originalname','single','file','addLogo','diskStorage','join','server/files/images/avatars/','%s-%s','addAvatar','addCustomerAvatar','addSystemAvatar','/:id/notify','notify','server/files','attachments','offline-chat','ensureDir','replace','extname','any','addInteraction','/:id','update','destroy','delete'];(function(_0x538e56,_0x4fa43c){var _0x232357=function(_0x2de1ad){while(--_0x2de1ad){_0x538e56['push'](_0x538e56['shift']());}};_0x232357(++_0x4fa43c);}(_0xfefc,0xc4));var _0xcfef=function(_0x3c5436,_0x154db5){_0x3c5436=_0x3c5436-0x0;var _0xf8c236=_0xfefc[_0x3c5436];return _0xf8c236;};'use strict';var multer=require('multer');var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require(_0xcfef('0x0'));var router=express[_0xcfef('0x1')]();var fs_extra=require('fs-extra');var auth=require(_0xcfef('0x2'));var interaction=require('../../components/interaction/service');var config=require(_0xcfef('0x3'));var controller=require(_0xcfef('0x4'));router[_0xcfef('0x5')]('/',auth[_0xcfef('0x6')](),controller[_0xcfef('0x7')]);router[_0xcfef('0x5')](_0xcfef('0x8'),auth[_0xcfef('0x6')](),controller[_0xcfef('0x9')]);router[_0xcfef('0x5')]('/:id',auth['isAuthenticated'](),controller[_0xcfef('0xa')]);router[_0xcfef('0x5')](_0xcfef('0xb'),auth[_0xcfef('0x6')](),controller['getDispositions']);router[_0xcfef('0x5')](_0xcfef('0xc'),auth[_0xcfef('0x6')](),controller[_0xcfef('0xd')]);router[_0xcfef('0x5')](_0xcfef('0xe'),controller['getLogo']);router[_0xcfef('0x5')](_0xcfef('0xf'),controller[_0xcfef('0x10')]);router[_0xcfef('0x5')](_0xcfef('0x11'),controller[_0xcfef('0x12')]);router[_0xcfef('0x5')](_0xcfef('0x13'),controller[_0xcfef('0x14')]);router[_0xcfef('0x5')](_0xcfef('0x15'),auth[_0xcfef('0x6')](),controller['getInteractions']);router['get'](_0xcfef('0x16'),controller[_0xcfef('0x17')]);router['get'](_0xcfef('0x18'),auth[_0xcfef('0x6')](),controller[_0xcfef('0x19')]);router[_0xcfef('0x5')](_0xcfef('0x1a'),auth[_0xcfef('0x6')](),controller['getProactiveActions']);router[_0xcfef('0x5')](_0xcfef('0x1b'),controller[_0xcfef('0x1c')]);router[_0xcfef('0x5')]('/:id/offline_messages',auth[_0xcfef('0x6')](),controller['getOfflineMessages']);router['get']('/:id/users',auth[_0xcfef('0x6')](),controller['getAgents']);router['post']('/',auth[_0xcfef('0x6')](),controller[_0xcfef('0x1d')]);router['post']('/:id/dispositions',auth[_0xcfef('0x6')](),controller['addDisposition']);router[_0xcfef('0x1e')](_0xcfef('0xc'),auth['isAuthenticated'](),controller[_0xcfef('0x1f')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x1869f6,_0x3aa6da,_0x485d7c){_0x485d7c(null,path['join'](config[_0xcfef('0x20')],'server/files/images/logos/'));},'filename':function(_0x498563,_0x48a67f,_0x5c71ae){_0x5c71ae(null,util[_0xcfef('0x21')]('%s-%s',Date[_0xcfef('0x22')](),_0x48a67f[_0xcfef('0x23')]));}})});router['post'](_0xcfef('0xe'),upload[_0xcfef('0x24')](_0xcfef('0x25')),controller[_0xcfef('0x26')]);var upload=multer({'storage':multer[_0xcfef('0x27')]({'destination':function(_0x2e0248,_0x1d8b38,_0x1b3ff2){_0x1b3ff2(null,path[_0xcfef('0x28')](config[_0xcfef('0x20')],_0xcfef('0x29')));},'filename':function(_0x37eadf,_0x4f6483,_0x4e02f1){_0x4e02f1(null,util['format'](_0xcfef('0x2a'),Date[_0xcfef('0x22')](),_0x4f6483[_0xcfef('0x23')]));}})});router['post'](_0xcfef('0xf'),upload[_0xcfef('0x24')](_0xcfef('0x25')),controller[_0xcfef('0x2b')]);var upload=multer({'storage':multer[_0xcfef('0x27')]({'destination':function(_0x2a59ed,_0x4f539f,_0x61940e){_0x61940e(null,path[_0xcfef('0x28')](config['root'],_0xcfef('0x29')));},'filename':function(_0x420dec,_0x2a2bd0,_0x42d667){_0x42d667(null,util[_0xcfef('0x21')](_0xcfef('0x2a'),Date[_0xcfef('0x22')](),_0x2a2bd0[_0xcfef('0x23')]));}})});router[_0xcfef('0x1e')]('/:id/customer_avatar',upload[_0xcfef('0x24')](_0xcfef('0x25')),controller[_0xcfef('0x2c')]);var upload=multer({'storage':multer[_0xcfef('0x27')]({'destination':function(_0x36dd0c,_0x6a8e50,_0x47dc4e){_0x47dc4e(null,path['join'](config['root'],'server/files/images/avatars/'));},'filename':function(_0x2f69d0,_0xe35381,_0xcdb06e){_0xcdb06e(null,util[_0xcfef('0x21')]('%s-%s',Date[_0xcfef('0x22')](),_0xe35381['originalname']));}})});router['post']('/:id/system_avatar',upload[_0xcfef('0x24')](_0xcfef('0x25')),controller[_0xcfef('0x2d')]);router['post'](_0xcfef('0x2e'),controller[_0xcfef('0x2f')]);const offlineUploadMulter=multer({'storage':multer[_0xcfef('0x27')]({'destination':function(_0x93be99,_0x148933,_0x14edb0){const _0xd6ddcf=path[_0xcfef('0x28')](config[_0xcfef('0x20')],_0xcfef('0x30'),_0xcfef('0x31'),_0xcfef('0x32'));fs_extra[_0xcfef('0x33')](_0xd6ddcf,function(){_0x14edb0(null,_0xd6ddcf);});},'filename':function(_0x41a8cf,_0x4ddf4a,_0x361e1a){const _0x9ae86f=_0x4ddf4a[_0xcfef('0x23')][_0xcfef('0x34')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');const _0x3151ac=path[_0xcfef('0x35')](_0x9ae86f);const _0x2be1fc=Date['now']()+'-'+_0x9ae86f[_0xcfef('0x34')](_0x3151ac,'')+_0x3151ac;_0x361e1a(null,_0x2be1fc);}})});router[_0xcfef('0x1e')]('/:id/offline',offlineUploadMulter[_0xcfef('0x36')](),controller['offline']);router[_0xcfef('0x1e')]('/:id/interactions',auth['isAuthenticated'](),controller[_0xcfef('0x37')]);router[_0xcfef('0x1e')](_0xcfef('0x18'),auth[_0xcfef('0x6')](),controller['addApplications']);router[_0xcfef('0x1e')]('/:id/proactive_actions',auth[_0xcfef('0x6')](),controller['addProactiveActions']);router[_0xcfef('0x1e')]('/:id/users',auth[_0xcfef('0x6')](),controller['addAgents']);router['put'](_0xcfef('0x38'),auth['isAuthenticated'](),controller[_0xcfef('0x39')]);router['delete'](_0xcfef('0x38'),auth[_0xcfef('0x6')](),controller[_0xcfef('0x3a')]);router[_0xcfef('0x3b')](_0xcfef('0xb'),auth[_0xcfef('0x6')](),controller[_0xcfef('0x3c')]);router[_0xcfef('0x3b')](_0xcfef('0xc'),auth[_0xcfef('0x6')](),controller[_0xcfef('0x3d')]);router[_0xcfef('0x3b')]('/:id/users',auth[_0xcfef('0x6')](),controller[_0xcfef('0x3e')]);module[_0xcfef('0x3f')]=router;
\ No newline at end of file
+var _0x520c=['/:id/system_avatar','getSystemAvatar','/:id/interactions','getInteractions','/:id/snippet','getSnippet','/:id/applications','getApplications','/:id/proactive_actions','getProactiveActions','getFields','/:id/offline_messages','getOfflineMessages','/:id/users','getAgents','post','create','addDisposition','addAnswer','diskStorage','join','root','format','now','originalname','/:id/logo','single','file','server/files/images/avatars/','%s-%s','/:id/avatar','addCustomerAvatar','/:id/notify','attachments','ensureDir','replace','extname','any','offline','addInteraction','addApplications','addAgents','put','/:id','update','delete','destroy','removeDispositions','removeAnswers','removeAgents','multer','util','path','connect-timeout','express','Router','fs-extra','../../config/environment','./chatWebsite.controller','get','isAuthenticated','index','/describe','describe','/:id/dispositions','/:id/canned_answers','getLogo','getAvatar','/:id/customer_avatar','getCustomerAvatar'];(function(_0x2c48df,_0x46e91c){var _0x5f223a=function(_0x11f763){while(--_0x11f763){_0x2c48df['push'](_0x2c48df['shift']());}};_0x5f223a(++_0x46e91c);}(_0x520c,0xbe));var _0xc520=function(_0x9cd4c3,_0x1c9b2c){_0x9cd4c3=_0x9cd4c3-0x0;var _0x4c9025=_0x520c[_0x9cd4c3];return _0x4c9025;};'use strict';var multer=require(_0xc520('0x0'));var util=require(_0xc520('0x1'));var path=require(_0xc520('0x2'));var timeout=require(_0xc520('0x3'));var express=require(_0xc520('0x4'));var router=express[_0xc520('0x5')]();var fs_extra=require(_0xc520('0x6'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xc520('0x7'));var controller=require(_0xc520('0x8'));router[_0xc520('0x9')]('/',auth[_0xc520('0xa')](),controller[_0xc520('0xb')]);router[_0xc520('0x9')](_0xc520('0xc'),auth[_0xc520('0xa')](),controller[_0xc520('0xd')]);router[_0xc520('0x9')]('/:id',auth[_0xc520('0xa')](),controller['show']);router[_0xc520('0x9')](_0xc520('0xe'),auth[_0xc520('0xa')](),controller['getDispositions']);router[_0xc520('0x9')](_0xc520('0xf'),auth[_0xc520('0xa')](),controller['getAnswers']);router[_0xc520('0x9')]('/:id/logo',controller[_0xc520('0x10')]);router[_0xc520('0x9')]('/:id/avatar',controller[_0xc520('0x11')]);router[_0xc520('0x9')](_0xc520('0x12'),controller[_0xc520('0x13')]);router[_0xc520('0x9')](_0xc520('0x14'),controller[_0xc520('0x15')]);router[_0xc520('0x9')](_0xc520('0x16'),auth[_0xc520('0xa')](),controller[_0xc520('0x17')]);router[_0xc520('0x9')](_0xc520('0x18'),controller[_0xc520('0x19')]);router['get'](_0xc520('0x1a'),auth[_0xc520('0xa')](),controller[_0xc520('0x1b')]);router[_0xc520('0x9')](_0xc520('0x1c'),auth[_0xc520('0xa')](),controller[_0xc520('0x1d')]);router[_0xc520('0x9')]('/:id/fields',controller[_0xc520('0x1e')]);router[_0xc520('0x9')](_0xc520('0x1f'),auth[_0xc520('0xa')](),controller[_0xc520('0x20')]);router[_0xc520('0x9')](_0xc520('0x21'),auth[_0xc520('0xa')](),controller[_0xc520('0x22')]);router[_0xc520('0x23')]('/',auth[_0xc520('0xa')](),controller[_0xc520('0x24')]);router[_0xc520('0x23')](_0xc520('0xe'),auth[_0xc520('0xa')](),controller[_0xc520('0x25')]);router[_0xc520('0x23')]('/:id/canned_answers',auth[_0xc520('0xa')](),controller[_0xc520('0x26')]);var upload=multer({'storage':multer[_0xc520('0x27')]({'destination':function(_0x16c02e,_0x5b6693,_0x179274){_0x179274(null,path[_0xc520('0x28')](config[_0xc520('0x29')],'server/files/images/logos/'));},'filename':function(_0x3c4918,_0x212868,_0x23bf63){_0x23bf63(null,util[_0xc520('0x2a')]('%s-%s',Date[_0xc520('0x2b')](),_0x212868[_0xc520('0x2c')]));}})});router['post'](_0xc520('0x2d'),upload[_0xc520('0x2e')](_0xc520('0x2f')),controller['addLogo']);var upload=multer({'storage':multer[_0xc520('0x27')]({'destination':function(_0x290251,_0x51882a,_0x28977b){_0x28977b(null,path[_0xc520('0x28')](config[_0xc520('0x29')],_0xc520('0x30')));},'filename':function(_0x3f13b7,_0x67d0,_0x4cda9a){_0x4cda9a(null,util[_0xc520('0x2a')](_0xc520('0x31'),Date[_0xc520('0x2b')](),_0x67d0[_0xc520('0x2c')]));}})});router[_0xc520('0x23')](_0xc520('0x32'),upload[_0xc520('0x2e')](_0xc520('0x2f')),controller['addAvatar']);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x2edfe3,_0x1f77a2,_0x31c064){_0x31c064(null,path['join'](config[_0xc520('0x29')],_0xc520('0x30')));},'filename':function(_0x3776d9,_0x5a0cc4,_0x50e0c6){_0x50e0c6(null,util[_0xc520('0x2a')]('%s-%s',Date['now'](),_0x5a0cc4['originalname']));}})});router['post'](_0xc520('0x12'),upload['single']('file'),controller[_0xc520('0x33')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0xaca26e,_0x512000,_0x4926f5){_0x4926f5(null,path[_0xc520('0x28')](config[_0xc520('0x29')],_0xc520('0x30')));},'filename':function(_0x3e69ab,_0x4c865b,_0x41ceda){_0x41ceda(null,util[_0xc520('0x2a')]('%s-%s',Date[_0xc520('0x2b')](),_0x4c865b[_0xc520('0x2c')]));}})});router['post'](_0xc520('0x14'),upload[_0xc520('0x2e')](_0xc520('0x2f')),controller['addSystemAvatar']);router[_0xc520('0x23')](_0xc520('0x34'),controller['notify']);const offlineUploadMulter=multer({'storage':multer['diskStorage']({'destination':function(_0x157de5,_0x1007ac,_0xf63a2e){const _0x5970fe=path[_0xc520('0x28')](config['root'],'server/files',_0xc520('0x35'),'offline-chat');fs_extra[_0xc520('0x36')](_0x5970fe,function(){_0xf63a2e(null,_0x5970fe);});},'filename':function(_0x1e51ea,_0x4ebec9,_0x4593df){const _0x1c141d=_0x4ebec9[_0xc520('0x2c')][_0xc520('0x37')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');const _0x1ebc49=path[_0xc520('0x38')](_0x1c141d);const _0x23d38c=Date[_0xc520('0x2b')]()+'-'+_0x1c141d[_0xc520('0x37')](_0x1ebc49,'')+_0x1ebc49;_0x4593df(null,_0x23d38c);}})});router[_0xc520('0x23')]('/:id/offline',offlineUploadMulter[_0xc520('0x39')](),controller[_0xc520('0x3a')]);router[_0xc520('0x23')](_0xc520('0x16'),auth[_0xc520('0xa')](),controller[_0xc520('0x3b')]);router[_0xc520('0x23')](_0xc520('0x1a'),auth[_0xc520('0xa')](),controller[_0xc520('0x3c')]);router[_0xc520('0x23')](_0xc520('0x1c'),auth['isAuthenticated'](),controller['addProactiveActions']);router[_0xc520('0x23')]('/:id/users',auth[_0xc520('0xa')](),controller[_0xc520('0x3d')]);router[_0xc520('0x3e')](_0xc520('0x3f'),auth[_0xc520('0xa')](),controller[_0xc520('0x40')]);router[_0xc520('0x41')](_0xc520('0x3f'),auth[_0xc520('0xa')](),controller[_0xc520('0x42')]);router[_0xc520('0x41')](_0xc520('0xe'),auth['isAuthenticated'](),controller[_0xc520('0x43')]);router[_0xc520('0x41')]('/:id/canned_answers',auth[_0xc520('0xa')](),controller[_0xc520('0x44')]);router['delete'](_0xc520('0x21'),auth['isAuthenticated'](),controller[_0xc520('0x45')]);module['exports']=router;
\ No newline at end of file