Built motion from commit (unavailable).|2.5.31
[motion2.git] / server / api / chatWebsite / index.js
index c69f3a2..eaee673 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9b5c=['now','originalname','post','single','file','addLogo','root','server/files/images/avatars/','addAvatar','%s-%s','/:id/customer_avatar','addCustomerAvatar','addSystemAvatar','/:id/notify','notify','offline-chat','ensureDir','replace','extname','/:id/offline','any','offline','addProactiveActions','/:id/users','addAgents','put','update','delete','/:id','destroy','/:id/dispositions','removeAnswers','removeAgents','exports','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatWebsite.controller','get','isAuthenticated','index','/describe','describe','show','getDispositions','/:id/canned_answers','getAnswers','/:id/logo','getLogo','/:id/avatar','getAvatar','getCustomerAvatar','/:id/system_avatar','getSystemAvatar','/:id/interactions','getSnippet','/:id/applications','/:id/proactive_actions','getProactiveActions','/:id/fields','getFields','/:id/offline_messages','create','addDisposition','addAnswer','diskStorage','join','server/files/images/logos/','format'];(function(_0x27221f,_0x3f0125){var _0x1946d4=function(_0x2c7b20){while(--_0x2c7b20){_0x27221f['push'](_0x27221f['shift']());}};_0x1946d4(++_0x3f0125);}(_0x9b5c,0xb8));var _0xc9b5=function(_0x401821,_0x34e8c4){_0x401821=_0x401821-0x0;var _0x22c1eb=_0x9b5c[_0x401821];return _0x22c1eb;};'use strict';var multer=require(_0xc9b5('0x0'));var util=require(_0xc9b5('0x1'));var path=require('path');var timeout=require(_0xc9b5('0x2'));var express=require(_0xc9b5('0x3'));var router=express[_0xc9b5('0x4')]();var fs_extra=require(_0xc9b5('0x5'));var auth=require(_0xc9b5('0x6'));var interaction=require(_0xc9b5('0x7'));var config=require(_0xc9b5('0x8'));var controller=require(_0xc9b5('0x9'));router[_0xc9b5('0xa')]('/',auth[_0xc9b5('0xb')](),controller[_0xc9b5('0xc')]);router[_0xc9b5('0xa')](_0xc9b5('0xd'),auth[_0xc9b5('0xb')](),controller[_0xc9b5('0xe')]);router['get']('/:id',auth[_0xc9b5('0xb')](),controller[_0xc9b5('0xf')]);router[_0xc9b5('0xa')]('/:id/dispositions',auth['isAuthenticated'](),controller[_0xc9b5('0x10')]);router[_0xc9b5('0xa')](_0xc9b5('0x11'),auth[_0xc9b5('0xb')](),controller[_0xc9b5('0x12')]);router[_0xc9b5('0xa')](_0xc9b5('0x13'),controller[_0xc9b5('0x14')]);router[_0xc9b5('0xa')](_0xc9b5('0x15'),controller[_0xc9b5('0x16')]);router[_0xc9b5('0xa')]('/:id/customer_avatar',controller[_0xc9b5('0x17')]);router['get'](_0xc9b5('0x18'),controller[_0xc9b5('0x19')]);router['get'](_0xc9b5('0x1a'),auth['isAuthenticated'](),controller['getInteractions']);router['get']('/:id/snippet',controller[_0xc9b5('0x1b')]);router[_0xc9b5('0xa')](_0xc9b5('0x1c'),auth[_0xc9b5('0xb')](),controller['getApplications']);router[_0xc9b5('0xa')](_0xc9b5('0x1d'),auth[_0xc9b5('0xb')](),controller[_0xc9b5('0x1e')]);router[_0xc9b5('0xa')](_0xc9b5('0x1f'),controller[_0xc9b5('0x20')]);router[_0xc9b5('0xa')](_0xc9b5('0x21'),auth['isAuthenticated'](),controller['getOfflineMessages']);router[_0xc9b5('0xa')]('/:id/users',auth[_0xc9b5('0xb')](),controller['getAgents']);router['post']('/',auth['isAuthenticated'](),controller[_0xc9b5('0x22')]);router['post']('/:id/dispositions',auth[_0xc9b5('0xb')](),controller[_0xc9b5('0x23')]);router['post'](_0xc9b5('0x11'),auth[_0xc9b5('0xb')](),controller[_0xc9b5('0x24')]);var upload=multer({'storage':multer[_0xc9b5('0x25')]({'destination':function(_0xf8b7f5,_0x4c3cd5,_0xb891da){_0xb891da(null,path[_0xc9b5('0x26')](config['root'],_0xc9b5('0x27')));},'filename':function(_0x37a1a7,_0x32bc73,_0x200429){_0x200429(null,util[_0xc9b5('0x28')]('%s-%s',Date[_0xc9b5('0x29')](),_0x32bc73[_0xc9b5('0x2a')]));}})});router[_0xc9b5('0x2b')]('/:id/logo',upload[_0xc9b5('0x2c')](_0xc9b5('0x2d')),controller[_0xc9b5('0x2e')]);var upload=multer({'storage':multer[_0xc9b5('0x25')]({'destination':function(_0x5ae300,_0x53ed1c,_0x166184){_0x166184(null,path[_0xc9b5('0x26')](config[_0xc9b5('0x2f')],_0xc9b5('0x30')));},'filename':function(_0x33b058,_0x35a107,_0xdac692){_0xdac692(null,util[_0xc9b5('0x28')]('%s-%s',Date['now'](),_0x35a107[_0xc9b5('0x2a')]));}})});router['post'](_0xc9b5('0x15'),upload[_0xc9b5('0x2c')](_0xc9b5('0x2d')),controller[_0xc9b5('0x31')]);var upload=multer({'storage':multer[_0xc9b5('0x25')]({'destination':function(_0x131984,_0x5e2cf2,_0x1d079d){_0x1d079d(null,path[_0xc9b5('0x26')](config[_0xc9b5('0x2f')],_0xc9b5('0x30')));},'filename':function(_0x14071f,_0x4c0edb,_0x343b58){_0x343b58(null,util['format'](_0xc9b5('0x32'),Date[_0xc9b5('0x29')](),_0x4c0edb[_0xc9b5('0x2a')]));}})});router['post'](_0xc9b5('0x33'),upload['single']('file'),controller[_0xc9b5('0x34')]);var upload=multer({'storage':multer[_0xc9b5('0x25')]({'destination':function(_0x5b4c58,_0x39993d,_0x400bea){_0x400bea(null,path[_0xc9b5('0x26')](config[_0xc9b5('0x2f')],_0xc9b5('0x30')));},'filename':function(_0x5416fa,_0x32710e,_0x4abc64){_0x4abc64(null,util['format'](_0xc9b5('0x32'),Date[_0xc9b5('0x29')](),_0x32710e['originalname']));}})});router['post'](_0xc9b5('0x18'),upload[_0xc9b5('0x2c')](_0xc9b5('0x2d')),controller[_0xc9b5('0x35')]);router[_0xc9b5('0x2b')](_0xc9b5('0x36'),controller[_0xc9b5('0x37')]);const offlineUploadMulter=multer({'storage':multer['diskStorage']({'destination':function(_0x4b3d9c,_0x4259a1,_0x248499){const _0x1b9e66=path['join'](config[_0xc9b5('0x2f')],'server/files','attachments',_0xc9b5('0x38'));fs_extra[_0xc9b5('0x39')](_0x1b9e66,function(){_0x248499(null,_0x1b9e66);});},'filename':function(_0x4a17b5,_0x419f9e,_0x4fa7ca){const _0x119955=_0x419f9e[_0xc9b5('0x2a')][_0xc9b5('0x3a')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');const _0x4aeeb2=path[_0xc9b5('0x3b')](_0x119955);const _0x27cb5a=Date[_0xc9b5('0x29')]()+'-'+_0x119955[_0xc9b5('0x3a')](_0x4aeeb2,'')+_0x4aeeb2;_0x4fa7ca(null,_0x27cb5a);}})});router['post'](_0xc9b5('0x3c'),offlineUploadMulter[_0xc9b5('0x3d')](),controller[_0xc9b5('0x3e')]);router[_0xc9b5('0x2b')](_0xc9b5('0x1a'),auth[_0xc9b5('0xb')](),controller['addInteraction']);router['post'](_0xc9b5('0x1c'),auth[_0xc9b5('0xb')](),controller['addApplications']);router[_0xc9b5('0x2b')](_0xc9b5('0x1d'),auth[_0xc9b5('0xb')](),controller[_0xc9b5('0x3f')]);router['post'](_0xc9b5('0x40'),auth[_0xc9b5('0xb')](),controller[_0xc9b5('0x41')]);router[_0xc9b5('0x42')]('/:id',auth[_0xc9b5('0xb')](),controller[_0xc9b5('0x43')]);router[_0xc9b5('0x44')](_0xc9b5('0x45'),auth[_0xc9b5('0xb')](),controller[_0xc9b5('0x46')]);router[_0xc9b5('0x44')](_0xc9b5('0x47'),auth[_0xc9b5('0xb')](),controller['removeDispositions']);router[_0xc9b5('0x44')]('/:id/canned_answers',auth[_0xc9b5('0xb')](),controller[_0xc9b5('0x48')]);router[_0xc9b5('0x44')](_0xc9b5('0x40'),auth[_0xc9b5('0xb')](),controller[_0xc9b5('0x49')]);module[_0xc9b5('0x4a')]=router;
\ No newline at end of file
+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