Built motion from commit 58b0471d.|2.6.29
[motion2.git] / server / api / chatWebsite / index.js
index ac1dcdd..5c421e9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa128=['getAnswers','/:id/logo','getLogo','/:id/customer_avatar','getCustomerAvatar','/:id/system_avatar','getSystemAvatar','/:id/interactions','getInteractions','/:id/snippet','getSnippet','/:id/applications','getApplications','/:id/proactive_actions','getProactiveActions','getFields','/:id/offline_messages','getOfflineMessages','getAgents','create','addDisposition','addAnswer','diskStorage','root','%s-%s','originalname','post','single','file','addLogo','server/files/images/avatars/','now','/:id/avatar','addAvatar','join','format','addCustomerAvatar','addSystemAvatar','/:id/notify','notify','server/files','ensureDir','replace','extname','/:id/offline','offline','addInteraction','addProactiveActions','/:id/users','addAgents','put','destroy','delete','exports','multer','util','connect-timeout','Router','fs-extra','../../components/auth/service','../../config/environment','./chatWebsite.controller','get','index','/describe','isAuthenticated','describe','/:id','show','/:id/dispositions','getDispositions'];(function(_0x5ddb1c,_0x5ea4df){var _0x354adc=function(_0x2dfb1f){while(--_0x2dfb1f){_0x5ddb1c['push'](_0x5ddb1c['shift']());}};_0x354adc(++_0x5ea4df);}(_0xa128,0xc4));var _0x8a12=function(_0x487b0c,_0x14ff74){_0x487b0c=_0x487b0c-0x0;var _0x1adbdc=_0xa128[_0x487b0c];return _0x1adbdc;};'use strict';var multer=require(_0x8a12('0x0'));var util=require(_0x8a12('0x1'));var path=require('path');var timeout=require(_0x8a12('0x2'));var express=require('express');var router=express[_0x8a12('0x3')]();var fs_extra=require(_0x8a12('0x4'));var auth=require(_0x8a12('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x8a12('0x6'));var controller=require(_0x8a12('0x7'));router[_0x8a12('0x8')]('/',auth['isAuthenticated'](),controller[_0x8a12('0x9')]);router[_0x8a12('0x8')](_0x8a12('0xa'),auth[_0x8a12('0xb')](),controller[_0x8a12('0xc')]);router[_0x8a12('0x8')](_0x8a12('0xd'),auth[_0x8a12('0xb')](),controller[_0x8a12('0xe')]);router[_0x8a12('0x8')](_0x8a12('0xf'),auth[_0x8a12('0xb')](),controller[_0x8a12('0x10')]);router[_0x8a12('0x8')]('/:id/canned_answers',auth[_0x8a12('0xb')](),controller[_0x8a12('0x11')]);router[_0x8a12('0x8')](_0x8a12('0x12'),controller[_0x8a12('0x13')]);router[_0x8a12('0x8')]('/:id/avatar',controller['getAvatar']);router[_0x8a12('0x8')](_0x8a12('0x14'),controller[_0x8a12('0x15')]);router[_0x8a12('0x8')](_0x8a12('0x16'),controller[_0x8a12('0x17')]);router[_0x8a12('0x8')](_0x8a12('0x18'),auth[_0x8a12('0xb')](),controller[_0x8a12('0x19')]);router['get'](_0x8a12('0x1a'),controller[_0x8a12('0x1b')]);router['get'](_0x8a12('0x1c'),auth[_0x8a12('0xb')](),controller[_0x8a12('0x1d')]);router[_0x8a12('0x8')](_0x8a12('0x1e'),auth['isAuthenticated'](),controller[_0x8a12('0x1f')]);router['get']('/:id/fields',controller[_0x8a12('0x20')]);router['get'](_0x8a12('0x21'),auth[_0x8a12('0xb')](),controller[_0x8a12('0x22')]);router[_0x8a12('0x8')]('/:id/users',auth[_0x8a12('0xb')](),controller[_0x8a12('0x23')]);router['post']('/',auth['isAuthenticated'](),controller[_0x8a12('0x24')]);router['post']('/:id/dispositions',auth[_0x8a12('0xb')](),controller[_0x8a12('0x25')]);router['post']('/:id/canned_answers',auth[_0x8a12('0xb')](),controller[_0x8a12('0x26')]);var upload=multer({'storage':multer[_0x8a12('0x27')]({'destination':function(_0xa0b3df,_0x175e28,_0x5b7fae){_0x5b7fae(null,path['join'](config[_0x8a12('0x28')],'server/files/images/logos/'));},'filename':function(_0x33aed1,_0x2997c0,_0x1d84c1){_0x1d84c1(null,util['format'](_0x8a12('0x29'),Date['now'](),_0x2997c0[_0x8a12('0x2a')]));}})});router[_0x8a12('0x2b')](_0x8a12('0x12'),upload[_0x8a12('0x2c')](_0x8a12('0x2d')),controller[_0x8a12('0x2e')]);var upload=multer({'storage':multer[_0x8a12('0x27')]({'destination':function(_0x4ff834,_0x3e9856,_0x447d21){_0x447d21(null,path['join'](config[_0x8a12('0x28')],_0x8a12('0x2f')));},'filename':function(_0x3ff18f,_0x1995fb,_0x507240){_0x507240(null,util['format'](_0x8a12('0x29'),Date[_0x8a12('0x30')](),_0x1995fb[_0x8a12('0x2a')]));}})});router[_0x8a12('0x2b')](_0x8a12('0x31'),upload['single'](_0x8a12('0x2d')),controller[_0x8a12('0x32')]);var upload=multer({'storage':multer[_0x8a12('0x27')]({'destination':function(_0x1adf37,_0x4be489,_0x1bdda1){_0x1bdda1(null,path[_0x8a12('0x33')](config[_0x8a12('0x28')],_0x8a12('0x2f')));},'filename':function(_0x303210,_0x5f3c78,_0x3555eb){_0x3555eb(null,util[_0x8a12('0x34')](_0x8a12('0x29'),Date[_0x8a12('0x30')](),_0x5f3c78[_0x8a12('0x2a')]));}})});router[_0x8a12('0x2b')](_0x8a12('0x14'),upload[_0x8a12('0x2c')]('file'),controller[_0x8a12('0x35')]);var upload=multer({'storage':multer[_0x8a12('0x27')]({'destination':function(_0x215138,_0x5bb730,_0xd9ea87){_0xd9ea87(null,path[_0x8a12('0x33')](config[_0x8a12('0x28')],'server/files/images/avatars/'));},'filename':function(_0x2da887,_0x14e4b0,_0x36c72f){_0x36c72f(null,util[_0x8a12('0x34')](_0x8a12('0x29'),Date['now'](),_0x14e4b0[_0x8a12('0x2a')]));}})});router['post']('/:id/system_avatar',upload[_0x8a12('0x2c')](_0x8a12('0x2d')),controller[_0x8a12('0x36')]);router[_0x8a12('0x2b')](_0x8a12('0x37'),controller[_0x8a12('0x38')]);const offlineUploadMulter=multer({'storage':multer[_0x8a12('0x27')]({'destination':function(_0x33eda7,_0x1ef9fd,_0x432d69){const _0x12e3a8=path[_0x8a12('0x33')](config[_0x8a12('0x28')],_0x8a12('0x39'),'attachments','offline-chat');fs_extra[_0x8a12('0x3a')](_0x12e3a8,function(){_0x432d69(null,_0x12e3a8);});},'filename':function(_0x185dd1,_0x3dd5af,_0x3922e4){const _0xe743aa=_0x3dd5af[_0x8a12('0x2a')][_0x8a12('0x3b')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');const _0x13eb6c=path[_0x8a12('0x3c')](_0xe743aa);const _0xb1a518=Date['now']()+'-'+_0xe743aa[_0x8a12('0x3b')](_0x13eb6c,'')+_0x13eb6c;_0x3922e4(null,_0xb1a518);}})});router[_0x8a12('0x2b')](_0x8a12('0x3d'),offlineUploadMulter['any'](),controller[_0x8a12('0x3e')]);router[_0x8a12('0x2b')](_0x8a12('0x18'),auth[_0x8a12('0xb')](),controller[_0x8a12('0x3f')]);router[_0x8a12('0x2b')]('/:id/applications',auth[_0x8a12('0xb')](),controller['addApplications']);router[_0x8a12('0x2b')](_0x8a12('0x1e'),auth[_0x8a12('0xb')](),controller[_0x8a12('0x40')]);router[_0x8a12('0x2b')](_0x8a12('0x41'),auth[_0x8a12('0xb')](),controller[_0x8a12('0x42')]);router[_0x8a12('0x43')]('/:id',auth[_0x8a12('0xb')](),controller['update']);router['delete']('/:id',auth[_0x8a12('0xb')](),controller[_0x8a12('0x44')]);router['delete']('/:id/dispositions',auth[_0x8a12('0xb')](),controller['removeDispositions']);router[_0x8a12('0x45')]('/:id/canned_answers',auth[_0x8a12('0xb')](),controller['removeAnswers']);router[_0x8a12('0x45')]('/:id/users',auth[_0x8a12('0xb')](),controller['removeAgents']);module[_0x8a12('0x46')]=router;
\ No newline at end of file
+var _0xd7cb=['/:id/offline','any','offline','/:id/interactions','addInteraction','addAgents','put','update','destroy','delete','removeAnswers','removeAgents','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','index','/describe','describe','/:id','show','get','/:id/dispositions','getDispositions','/:id/canned_answers','getLogo','getAvatar','/:id/customer_avatar','getCustomerAvatar','getInteractions','/:id/snippet','/:id/applications','getApplications','/:id/proactive_actions','getProactiveActions','/:id/fields','/:id/offline_messages','getOfflineMessages','/:id/users','getAgents','post','addAnswer','diskStorage','join','root','server/files/images/logos/','format','now','originalname','single','file','addLogo','server/files/images/avatars/','/:id/avatar','%s-%s','addCustomerAvatar','/:id/system_avatar','addSystemAvatar','/:id/notify','server/files','attachments','offline-chat','ensureDir','replace'];(function(_0x1221eb,_0x424ac7){var _0xad59c4=function(_0x40c702){while(--_0x40c702){_0x1221eb['push'](_0x1221eb['shift']());}};_0xad59c4(++_0x424ac7);}(_0xd7cb,0x129));var _0xbd7c=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0xd7cb[_0x2dafbe];return _0x58a45a;};'use strict';var multer=require(_0xbd7c('0x0'));var util=require(_0xbd7c('0x1'));var path=require(_0xbd7c('0x2'));var timeout=require('connect-timeout');var express=require(_0xbd7c('0x3'));var router=express[_0xbd7c('0x4')]();var fs_extra=require(_0xbd7c('0x5'));var auth=require(_0xbd7c('0x6'));var interaction=require(_0xbd7c('0x7'));var config=require(_0xbd7c('0x8'));var controller=require('./chatWebsite.controller');router['get']('/',auth[_0xbd7c('0x9')](),controller[_0xbd7c('0xa')]);router['get'](_0xbd7c('0xb'),auth[_0xbd7c('0x9')](),controller[_0xbd7c('0xc')]);router['get'](_0xbd7c('0xd'),auth[_0xbd7c('0x9')](),controller[_0xbd7c('0xe')]);router[_0xbd7c('0xf')](_0xbd7c('0x10'),auth[_0xbd7c('0x9')](),controller[_0xbd7c('0x11')]);router[_0xbd7c('0xf')](_0xbd7c('0x12'),auth['isAuthenticated'](),controller['getAnswers']);router['get']('/:id/logo',controller[_0xbd7c('0x13')]);router['get']('/:id/avatar',controller[_0xbd7c('0x14')]);router[_0xbd7c('0xf')](_0xbd7c('0x15'),controller[_0xbd7c('0x16')]);router[_0xbd7c('0xf')]('/:id/system_avatar',controller['getSystemAvatar']);router['get']('/:id/interactions',auth[_0xbd7c('0x9')](),controller[_0xbd7c('0x17')]);router['get'](_0xbd7c('0x18'),controller['getSnippet']);router[_0xbd7c('0xf')](_0xbd7c('0x19'),auth[_0xbd7c('0x9')](),controller[_0xbd7c('0x1a')]);router[_0xbd7c('0xf')](_0xbd7c('0x1b'),auth[_0xbd7c('0x9')](),controller[_0xbd7c('0x1c')]);router[_0xbd7c('0xf')](_0xbd7c('0x1d'),controller['getFields']);router['get'](_0xbd7c('0x1e'),auth[_0xbd7c('0x9')](),controller[_0xbd7c('0x1f')]);router[_0xbd7c('0xf')](_0xbd7c('0x20'),auth[_0xbd7c('0x9')](),controller[_0xbd7c('0x21')]);router[_0xbd7c('0x22')]('/',auth[_0xbd7c('0x9')](),controller['create']);router[_0xbd7c('0x22')](_0xbd7c('0x10'),auth[_0xbd7c('0x9')](),controller['addDisposition']);router[_0xbd7c('0x22')]('/:id/canned_answers',auth['isAuthenticated'](),controller[_0xbd7c('0x23')]);var upload=multer({'storage':multer[_0xbd7c('0x24')]({'destination':function(_0x13896b,_0x40ddf1,_0x2e4240){_0x2e4240(null,path[_0xbd7c('0x25')](config[_0xbd7c('0x26')],_0xbd7c('0x27')));},'filename':function(_0x4ca4bf,_0x31853b,_0x2cac8a){_0x2cac8a(null,util[_0xbd7c('0x28')]('%s-%s',Date[_0xbd7c('0x29')](),_0x31853b[_0xbd7c('0x2a')]));}})});router[_0xbd7c('0x22')]('/:id/logo',upload[_0xbd7c('0x2b')](_0xbd7c('0x2c')),controller[_0xbd7c('0x2d')]);var upload=multer({'storage':multer[_0xbd7c('0x24')]({'destination':function(_0x206682,_0x200e64,_0x100e4f){_0x100e4f(null,path[_0xbd7c('0x25')](config[_0xbd7c('0x26')],_0xbd7c('0x2e')));},'filename':function(_0x7ae5d5,_0x26aa7a,_0x3c4110){_0x3c4110(null,util[_0xbd7c('0x28')]('%s-%s',Date[_0xbd7c('0x29')](),_0x26aa7a[_0xbd7c('0x2a')]));}})});router[_0xbd7c('0x22')](_0xbd7c('0x2f'),upload[_0xbd7c('0x2b')](_0xbd7c('0x2c')),controller['addAvatar']);var upload=multer({'storage':multer[_0xbd7c('0x24')]({'destination':function(_0x31cc7b,_0x25a0b6,_0x1b9453){_0x1b9453(null,path['join'](config[_0xbd7c('0x26')],_0xbd7c('0x2e')));},'filename':function(_0x2a7605,_0x3059d0,_0x176dbe){_0x176dbe(null,util[_0xbd7c('0x28')](_0xbd7c('0x30'),Date['now'](),_0x3059d0[_0xbd7c('0x2a')]));}})});router[_0xbd7c('0x22')]('/:id/customer_avatar',upload[_0xbd7c('0x2b')](_0xbd7c('0x2c')),controller[_0xbd7c('0x31')]);var upload=multer({'storage':multer[_0xbd7c('0x24')]({'destination':function(_0x5684fa,_0x48081b,_0x4d3381){_0x4d3381(null,path[_0xbd7c('0x25')](config[_0xbd7c('0x26')],'server/files/images/avatars/'));},'filename':function(_0x5357ba,_0x538e05,_0x23c848){_0x23c848(null,util[_0xbd7c('0x28')]('%s-%s',Date[_0xbd7c('0x29')](),_0x538e05[_0xbd7c('0x2a')]));}})});router[_0xbd7c('0x22')](_0xbd7c('0x32'),upload[_0xbd7c('0x2b')](_0xbd7c('0x2c')),controller[_0xbd7c('0x33')]);router[_0xbd7c('0x22')](_0xbd7c('0x34'),controller['notify']);const offlineUploadMulter=multer({'storage':multer[_0xbd7c('0x24')]({'destination':function(_0x494edb,_0x21c796,_0x257c3a){const _0x5230bc=path[_0xbd7c('0x25')](config[_0xbd7c('0x26')],_0xbd7c('0x35'),_0xbd7c('0x36'),_0xbd7c('0x37'));fs_extra[_0xbd7c('0x38')](_0x5230bc,function(){_0x257c3a(null,_0x5230bc);});},'filename':function(_0x1c6f3e,_0x22af26,_0x4f9a46){const _0x558ae3=_0x22af26[_0xbd7c('0x2a')]['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');const _0x1fdd4f=path['extname'](_0x558ae3);const _0x700bb9=Date[_0xbd7c('0x29')]()+'-'+_0x558ae3[_0xbd7c('0x39')](_0x1fdd4f,'')+_0x1fdd4f;_0x4f9a46(null,_0x700bb9);}})});router['post'](_0xbd7c('0x3a'),offlineUploadMulter[_0xbd7c('0x3b')](),controller[_0xbd7c('0x3c')]);router[_0xbd7c('0x22')](_0xbd7c('0x3d'),auth[_0xbd7c('0x9')](),controller[_0xbd7c('0x3e')]);router['post'](_0xbd7c('0x19'),auth[_0xbd7c('0x9')](),controller['addApplications']);router[_0xbd7c('0x22')](_0xbd7c('0x1b'),auth['isAuthenticated'](),controller['addProactiveActions']);router[_0xbd7c('0x22')](_0xbd7c('0x20'),auth[_0xbd7c('0x9')](),controller[_0xbd7c('0x3f')]);router[_0xbd7c('0x40')](_0xbd7c('0xd'),auth[_0xbd7c('0x9')](),controller[_0xbd7c('0x41')]);router['delete'](_0xbd7c('0xd'),auth[_0xbd7c('0x9')](),controller[_0xbd7c('0x42')]);router[_0xbd7c('0x43')](_0xbd7c('0x10'),auth['isAuthenticated'](),controller['removeDispositions']);router[_0xbd7c('0x43')](_0xbd7c('0x12'),auth['isAuthenticated'](),controller[_0xbd7c('0x44')]);router[_0xbd7c('0x43')]('/:id/users',auth[_0xbd7c('0x9')](),controller[_0xbd7c('0x45')]);module[_0xbd7c('0x46')]=router;
\ No newline at end of file