Built motion from commit 9d0783e6.|2.6.13
[motion2.git] / server / api / chatWebsite / index.js
index a5649bd..1cdf22f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf372=['getInteractions','/:id/snippet','getSnippet','/:id/applications','getApplications','/:id/proactive_actions','/:id/offline_messages','/:id/users','post','create','addDisposition','addAnswer','diskStorage','join','server/files/images/logos/','%s-%s','now','originalname','single','file','addLogo','root','server/files/images/avatars/','format','addSystemAvatar','/:id/notify','notify','server/files','attachments','ensureDir','extname','replace','/:id/offline','any','addInteraction','addApplications','addProactiveActions','put','update','delete','destroy','removeDispositions','removeAnswers','removeAgents','exports','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatWebsite.controller','isAuthenticated','index','get','describe','show','/:id/dispositions','getDispositions','/:id/canned_answers','getAnswers','/:id/logo','getLogo','/:id/avatar','getAvatar','/:id/customer_avatar','getCustomerAvatar','/:id/system_avatar','getSystemAvatar','/:id/interactions'];(function(_0xc83289,_0x12d090){var _0x3d09a3=function(_0x59eab){while(--_0x59eab){_0xc83289['push'](_0xc83289['shift']());}};_0x3d09a3(++_0x12d090);}(_0xf372,0x149));var _0x2f37=function(_0x18cb8f,_0x161f2a){_0x18cb8f=_0x18cb8f-0x0;var _0x131d4b=_0xf372[_0x18cb8f];return _0x131d4b;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x2f37('0x0'));var timeout=require('connect-timeout');var express=require(_0x2f37('0x1'));var router=express[_0x2f37('0x2')]();var fs_extra=require(_0x2f37('0x3'));var auth=require(_0x2f37('0x4'));var interaction=require(_0x2f37('0x5'));var config=require(_0x2f37('0x6'));var controller=require(_0x2f37('0x7'));router['get']('/',auth[_0x2f37('0x8')](),controller[_0x2f37('0x9')]);router[_0x2f37('0xa')]('/describe',auth[_0x2f37('0x8')](),controller[_0x2f37('0xb')]);router[_0x2f37('0xa')]('/:id',auth[_0x2f37('0x8')](),controller[_0x2f37('0xc')]);router[_0x2f37('0xa')](_0x2f37('0xd'),auth['isAuthenticated'](),controller[_0x2f37('0xe')]);router[_0x2f37('0xa')](_0x2f37('0xf'),auth['isAuthenticated'](),controller[_0x2f37('0x10')]);router[_0x2f37('0xa')](_0x2f37('0x11'),controller[_0x2f37('0x12')]);router[_0x2f37('0xa')](_0x2f37('0x13'),controller[_0x2f37('0x14')]);router[_0x2f37('0xa')](_0x2f37('0x15'),controller[_0x2f37('0x16')]);router[_0x2f37('0xa')](_0x2f37('0x17'),controller[_0x2f37('0x18')]);router[_0x2f37('0xa')](_0x2f37('0x19'),auth[_0x2f37('0x8')](),controller[_0x2f37('0x1a')]);router[_0x2f37('0xa')](_0x2f37('0x1b'),controller[_0x2f37('0x1c')]);router['get'](_0x2f37('0x1d'),auth['isAuthenticated'](),controller[_0x2f37('0x1e')]);router[_0x2f37('0xa')](_0x2f37('0x1f'),auth[_0x2f37('0x8')](),controller['getProactiveActions']);router[_0x2f37('0xa')]('/:id/fields',controller['getFields']);router[_0x2f37('0xa')](_0x2f37('0x20'),auth[_0x2f37('0x8')](),controller['getOfflineMessages']);router[_0x2f37('0xa')](_0x2f37('0x21'),auth[_0x2f37('0x8')](),controller['getAgents']);router[_0x2f37('0x22')]('/',auth['isAuthenticated'](),controller[_0x2f37('0x23')]);router[_0x2f37('0x22')]('/:id/dispositions',auth[_0x2f37('0x8')](),controller[_0x2f37('0x24')]);router[_0x2f37('0x22')](_0x2f37('0xf'),auth[_0x2f37('0x8')](),controller[_0x2f37('0x25')]);var upload=multer({'storage':multer[_0x2f37('0x26')]({'destination':function(_0x5cd388,_0x39e8ed,_0x10f865){_0x10f865(null,path[_0x2f37('0x27')](config['root'],_0x2f37('0x28')));},'filename':function(_0x2d91fc,_0x43d4f1,_0x3e3666){_0x3e3666(null,util['format'](_0x2f37('0x29'),Date[_0x2f37('0x2a')](),_0x43d4f1[_0x2f37('0x2b')]));}})});router[_0x2f37('0x22')]('/:id/logo',upload[_0x2f37('0x2c')](_0x2f37('0x2d')),controller[_0x2f37('0x2e')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x53b174,_0x49f6af,_0x2b1e89){_0x2b1e89(null,path[_0x2f37('0x27')](config[_0x2f37('0x2f')],_0x2f37('0x30')));},'filename':function(_0x3f5826,_0x1e557e,_0x1402c7){_0x1402c7(null,util[_0x2f37('0x31')](_0x2f37('0x29'),Date[_0x2f37('0x2a')](),_0x1e557e[_0x2f37('0x2b')]));}})});router[_0x2f37('0x22')]('/:id/avatar',upload[_0x2f37('0x2c')](_0x2f37('0x2d')),controller['addAvatar']);var upload=multer({'storage':multer[_0x2f37('0x26')]({'destination':function(_0xdab659,_0x570914,_0x143d10){_0x143d10(null,path[_0x2f37('0x27')](config[_0x2f37('0x2f')],'server/files/images/avatars/'));},'filename':function(_0x1dd026,_0x55b9a9,_0x69be92){_0x69be92(null,util[_0x2f37('0x31')](_0x2f37('0x29'),Date[_0x2f37('0x2a')](),_0x55b9a9[_0x2f37('0x2b')]));}})});router['post'](_0x2f37('0x15'),upload[_0x2f37('0x2c')](_0x2f37('0x2d')),controller['addCustomerAvatar']);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x343a3b,_0x44bbdf,_0x250efe){_0x250efe(null,path[_0x2f37('0x27')](config[_0x2f37('0x2f')],'server/files/images/avatars/'));},'filename':function(_0x98d71f,_0x57dd32,_0x55fe20){_0x55fe20(null,util[_0x2f37('0x31')](_0x2f37('0x29'),Date['now'](),_0x57dd32['originalname']));}})});router[_0x2f37('0x22')]('/:id/system_avatar',upload[_0x2f37('0x2c')](_0x2f37('0x2d')),controller[_0x2f37('0x32')]);router[_0x2f37('0x22')](_0x2f37('0x33'),controller[_0x2f37('0x34')]);const offlineUploadMulter=multer({'storage':multer['diskStorage']({'destination':function(_0x88775b,_0x17fa07,_0x5b2f46){const _0x314b4f=path['join'](config[_0x2f37('0x2f')],_0x2f37('0x35'),_0x2f37('0x36'),'offline-chat');fs_extra[_0x2f37('0x37')](_0x314b4f,function(){_0x5b2f46(null,_0x314b4f);});},'filename':function(_0x14359f,_0x4274cf,_0x5c8ca8){const _0x30e784=_0x4274cf[_0x2f37('0x2b')]['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');const _0x5f343a=path[_0x2f37('0x38')](_0x30e784);const _0x592e8c=Date[_0x2f37('0x2a')]()+'-'+_0x30e784[_0x2f37('0x39')](_0x5f343a,'')+_0x5f343a;_0x5c8ca8(null,_0x592e8c);}})});router[_0x2f37('0x22')](_0x2f37('0x3a'),offlineUploadMulter[_0x2f37('0x3b')](),controller['offline']);router[_0x2f37('0x22')](_0x2f37('0x19'),auth['isAuthenticated'](),controller[_0x2f37('0x3c')]);router[_0x2f37('0x22')](_0x2f37('0x1d'),auth[_0x2f37('0x8')](),controller[_0x2f37('0x3d')]);router['post'](_0x2f37('0x1f'),auth['isAuthenticated'](),controller[_0x2f37('0x3e')]);router[_0x2f37('0x22')](_0x2f37('0x21'),auth['isAuthenticated'](),controller['addAgents']);router[_0x2f37('0x3f')]('/:id',auth[_0x2f37('0x8')](),controller[_0x2f37('0x40')]);router[_0x2f37('0x41')]('/:id',auth['isAuthenticated'](),controller[_0x2f37('0x42')]);router[_0x2f37('0x41')](_0x2f37('0xd'),auth[_0x2f37('0x8')](),controller[_0x2f37('0x43')]);router['delete'](_0x2f37('0xf'),auth['isAuthenticated'](),controller[_0x2f37('0x44')]);router[_0x2f37('0x41')](_0x2f37('0x21'),auth[_0x2f37('0x8')](),controller[_0x2f37('0x45')]);module[_0x2f37('0x46')]=router;
\ No newline at end of file
+var _0x7352=['/:id/avatar','getAvatar','getCustomerAvatar','getSystemAvatar','/:id/interactions','getInteractions','/:id/snippet','getSnippet','/:id/applications','/:id/proactive_actions','/:id/fields','getFields','/:id/offline_messages','getOfflineMessages','getAgents','post','create','addAnswer','diskStorage','join','root','server/files/images/logos/','format','%s-%s','now','single','file','addLogo','server/files/images/avatars/','originalname','/:id/customer_avatar','addCustomerAvatar','/:id/system_avatar','addSystemAvatar','/:id/notify','notify','attachments','offline-chat','ensureDir','replace','extname','/:id/offline','any','offline','addInteraction','addApplications','addProactiveActions','addAgents','put','update','removeAnswers','removeAgents','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../config/environment','./chatWebsite.controller','get','index','isAuthenticated','describe','/:id','show','/:id/dispositions','/:id/canned_answers','getAnswers','/:id/logo'];(function(_0x2426a2,_0x46da0d){var _0x5cedd1=function(_0x26e52e){while(--_0x26e52e){_0x2426a2['push'](_0x2426a2['shift']());}};_0x5cedd1(++_0x46da0d);}(_0x7352,0x10d));var _0x2735=function(_0x136e11,_0x29bd0b){_0x136e11=_0x136e11-0x0;var _0x36d346=_0x7352[_0x136e11];return _0x36d346;};'use strict';var multer=require(_0x2735('0x0'));var util=require(_0x2735('0x1'));var path=require(_0x2735('0x2'));var timeout=require('connect-timeout');var express=require(_0x2735('0x3'));var router=express[_0x2735('0x4')]();var fs_extra=require(_0x2735('0x5'));var auth=require(_0x2735('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x2735('0x7'));var controller=require(_0x2735('0x8'));router[_0x2735('0x9')]('/',auth['isAuthenticated'](),controller[_0x2735('0xa')]);router['get']('/describe',auth[_0x2735('0xb')](),controller[_0x2735('0xc')]);router['get'](_0x2735('0xd'),auth['isAuthenticated'](),controller[_0x2735('0xe')]);router['get'](_0x2735('0xf'),auth[_0x2735('0xb')](),controller['getDispositions']);router[_0x2735('0x9')](_0x2735('0x10'),auth[_0x2735('0xb')](),controller[_0x2735('0x11')]);router['get'](_0x2735('0x12'),controller['getLogo']);router[_0x2735('0x9')](_0x2735('0x13'),controller[_0x2735('0x14')]);router[_0x2735('0x9')]('/:id/customer_avatar',controller[_0x2735('0x15')]);router['get']('/:id/system_avatar',controller[_0x2735('0x16')]);router['get'](_0x2735('0x17'),auth[_0x2735('0xb')](),controller[_0x2735('0x18')]);router[_0x2735('0x9')](_0x2735('0x19'),controller[_0x2735('0x1a')]);router[_0x2735('0x9')](_0x2735('0x1b'),auth[_0x2735('0xb')](),controller['getApplications']);router['get'](_0x2735('0x1c'),auth[_0x2735('0xb')](),controller['getProactiveActions']);router['get'](_0x2735('0x1d'),controller[_0x2735('0x1e')]);router[_0x2735('0x9')](_0x2735('0x1f'),auth[_0x2735('0xb')](),controller[_0x2735('0x20')]);router[_0x2735('0x9')]('/:id/users',auth[_0x2735('0xb')](),controller[_0x2735('0x21')]);router[_0x2735('0x22')]('/',auth[_0x2735('0xb')](),controller[_0x2735('0x23')]);router[_0x2735('0x22')](_0x2735('0xf'),auth[_0x2735('0xb')](),controller['addDisposition']);router[_0x2735('0x22')](_0x2735('0x10'),auth[_0x2735('0xb')](),controller[_0x2735('0x24')]);var upload=multer({'storage':multer[_0x2735('0x25')]({'destination':function(_0x52dc57,_0x57cf0b,_0x562f76){_0x562f76(null,path[_0x2735('0x26')](config[_0x2735('0x27')],_0x2735('0x28')));},'filename':function(_0x4b52e3,_0x91d68d,_0x3299a0){_0x3299a0(null,util[_0x2735('0x29')](_0x2735('0x2a'),Date[_0x2735('0x2b')](),_0x91d68d['originalname']));}})});router[_0x2735('0x22')](_0x2735('0x12'),upload[_0x2735('0x2c')](_0x2735('0x2d')),controller[_0x2735('0x2e')]);var upload=multer({'storage':multer[_0x2735('0x25')]({'destination':function(_0x401598,_0x1fd969,_0xa63d39){_0xa63d39(null,path[_0x2735('0x26')](config[_0x2735('0x27')],_0x2735('0x2f')));},'filename':function(_0xdff0a,_0x4418b0,_0x1258c2){_0x1258c2(null,util[_0x2735('0x29')](_0x2735('0x2a'),Date[_0x2735('0x2b')](),_0x4418b0[_0x2735('0x30')]));}})});router['post'](_0x2735('0x13'),upload[_0x2735('0x2c')](_0x2735('0x2d')),controller['addAvatar']);var upload=multer({'storage':multer[_0x2735('0x25')]({'destination':function(_0x48b6f9,_0x201be3,_0x1af84d){_0x1af84d(null,path[_0x2735('0x26')](config[_0x2735('0x27')],_0x2735('0x2f')));},'filename':function(_0x21fd4b,_0x5e7f10,_0xdab324){_0xdab324(null,util['format']('%s-%s',Date[_0x2735('0x2b')](),_0x5e7f10[_0x2735('0x30')]));}})});router['post'](_0x2735('0x31'),upload[_0x2735('0x2c')](_0x2735('0x2d')),controller[_0x2735('0x32')]);var upload=multer({'storage':multer[_0x2735('0x25')]({'destination':function(_0x74bb9a,_0x336135,_0x122df1){_0x122df1(null,path[_0x2735('0x26')](config['root'],'server/files/images/avatars/'));},'filename':function(_0x493887,_0x75ea87,_0x563e3e){_0x563e3e(null,util[_0x2735('0x29')](_0x2735('0x2a'),Date[_0x2735('0x2b')](),_0x75ea87['originalname']));}})});router[_0x2735('0x22')](_0x2735('0x33'),upload[_0x2735('0x2c')]('file'),controller[_0x2735('0x34')]);router[_0x2735('0x22')](_0x2735('0x35'),controller[_0x2735('0x36')]);const offlineUploadMulter=multer({'storage':multer['diskStorage']({'destination':function(_0x28410a,_0x3c1291,_0x190679){const _0x3e137f=path[_0x2735('0x26')](config[_0x2735('0x27')],'server/files',_0x2735('0x37'),_0x2735('0x38'));fs_extra[_0x2735('0x39')](_0x3e137f,function(){_0x190679(null,_0x3e137f);});},'filename':function(_0x415943,_0x421385,_0x55616c){const _0xcebd1a=_0x421385[_0x2735('0x30')][_0x2735('0x3a')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');const _0x5e2f04=path[_0x2735('0x3b')](_0xcebd1a);const _0x3680f4=Date[_0x2735('0x2b')]()+'-'+_0xcebd1a[_0x2735('0x3a')](_0x5e2f04,'')+_0x5e2f04;_0x55616c(null,_0x3680f4);}})});router['post'](_0x2735('0x3c'),offlineUploadMulter[_0x2735('0x3d')](),controller[_0x2735('0x3e')]);router[_0x2735('0x22')](_0x2735('0x17'),auth[_0x2735('0xb')](),controller[_0x2735('0x3f')]);router['post']('/:id/applications',auth[_0x2735('0xb')](),controller[_0x2735('0x40')]);router[_0x2735('0x22')](_0x2735('0x1c'),auth[_0x2735('0xb')](),controller[_0x2735('0x41')]);router[_0x2735('0x22')]('/:id/users',auth[_0x2735('0xb')](),controller[_0x2735('0x42')]);router[_0x2735('0x43')](_0x2735('0xd'),auth['isAuthenticated'](),controller[_0x2735('0x44')]);router['delete'](_0x2735('0xd'),auth[_0x2735('0xb')](),controller['destroy']);router['delete'](_0x2735('0xf'),auth[_0x2735('0xb')](),controller['removeDispositions']);router['delete'](_0x2735('0x10'),auth[_0x2735('0xb')](),controller[_0x2735('0x45')]);router['delete']('/:id/users',auth[_0x2735('0xb')](),controller[_0x2735('0x46')]);module[_0x2735('0x47')]=router;
\ No newline at end of file