cdcc5d7c258e06e109432a2c6845898b34edbece
[motion2.git] / server / api / cmContact / index.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xac9d=['getTags','/:id/hoppers','getHoppers','/:id/hopper_histories','/:id/hopper_finals','/:id/jscripty_sessions','/merge','post','create','/create_many','bulkCreate','setTags','join','originalname','replace','format','%s-%s%s','basename','extname','now','/csv','single','file','uploadCsv','server/files/tmp','/upload','upload','/upload/:id','import','put','update','delete','destroy','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./cmContact.controller','isAuthenticated','index','get','/describe','describe','/:id','show','/:id/tags'];(function(_0x48b008,_0x3466c1){var _0x5a8cbc=function(_0xe90668){while(--_0xe90668){_0x48b008['push'](_0x48b008['shift']());}};_0x5a8cbc(++_0x3466c1);}(_0xac9d,0x14d));var _0xdac9=function(_0x166953,_0x214d3a){_0x166953=_0x166953-0x0;var _0x4a8baf=_0xac9d[_0x166953];return _0x4a8baf;};'use strict';var multer=require(_0xdac9('0x0'));var util=require(_0xdac9('0x1'));var path=require(_0xdac9('0x2'));var timeout=require(_0xdac9('0x3'));var express=require(_0xdac9('0x4'));var router=express[_0xdac9('0x5')]();var auth=require(_0xdac9('0x6'));var interaction=require(_0xdac9('0x7'));var config=require('../../config/environment');var controller=require(_0xdac9('0x8'));router['get']('/',auth[_0xdac9('0x9')](),controller[_0xdac9('0xa')]);router[_0xdac9('0xb')](_0xdac9('0xc'),auth[_0xdac9('0x9')](),controller[_0xdac9('0xd')]);router['get'](_0xdac9('0xe'),auth['isAuthenticated'](),controller[_0xdac9('0xf')]);router[_0xdac9('0xb')](_0xdac9('0x10'),auth[_0xdac9('0x9')](),controller[_0xdac9('0x11')]);router[_0xdac9('0xb')](_0xdac9('0x12'),auth[_0xdac9('0x9')](),controller[_0xdac9('0x13')]);router['get'](_0xdac9('0x14'),auth[_0xdac9('0x9')](),controller['getHopperHistories']);router[_0xdac9('0xb')](_0xdac9('0x15'),auth[_0xdac9('0x9')](),controller['getHopperFinals']);router[_0xdac9('0xb')](_0xdac9('0x16'),auth[_0xdac9('0x9')](),controller['getJscriptySessions']);router['post'](_0xdac9('0x17'),auth[_0xdac9('0x9')](),controller['merge']);router[_0xdac9('0x18')]('/',auth[_0xdac9('0x9')](),controller[_0xdac9('0x19')]);router[_0xdac9('0x18')](_0xdac9('0x1a'),auth[_0xdac9('0x9')](),controller[_0xdac9('0x1b')]);router[_0xdac9('0x18')]('/:id/tags',auth[_0xdac9('0x9')](),controller[_0xdac9('0x1c')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x1cd239,_0xa57f2d,_0x171df1){_0x171df1(null,path[_0xdac9('0x1d')](config['root'],'server/files/tmp'));},'filename':function(_0x4029fc,_0x20ece3,_0x2b9d91){_0x20ece3[_0xdac9('0x1e')]=_0x20ece3['originalname'][_0xdac9('0x1f')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x2b9d91(null,util[_0xdac9('0x20')](_0xdac9('0x21'),path[_0xdac9('0x22')](_0x20ece3[_0xdac9('0x1e')],path[_0xdac9('0x23')](_0x20ece3[_0xdac9('0x1e')])),Date[_0xdac9('0x24')](),path[_0xdac9('0x23')](_0x20ece3[_0xdac9('0x1e')])));}})});router['post'](_0xdac9('0x25'),upload[_0xdac9('0x26')](_0xdac9('0x27')),controller[_0xdac9('0x28')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x1e631a,_0x5686db,_0x3ce475){_0x3ce475(null,path[_0xdac9('0x1d')](config['root'],_0xdac9('0x29')));},'filename':function(_0x5105f1,_0x450f91,_0x3743f7){_0x450f91[_0xdac9('0x1e')]=_0x450f91[_0xdac9('0x1e')]['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x3743f7(null,util['format'](_0xdac9('0x21'),path[_0xdac9('0x22')](_0x450f91['originalname'],path['extname'](_0x450f91[_0xdac9('0x1e')])),Date[_0xdac9('0x24')](),path[_0xdac9('0x23')](_0x450f91[_0xdac9('0x1e')])));}})});router[_0xdac9('0x18')](_0xdac9('0x2a'),upload[_0xdac9('0x26')](_0xdac9('0x27')),controller[_0xdac9('0x2b')]);router[_0xdac9('0x18')](_0xdac9('0x2c'),auth[_0xdac9('0x9')](),controller[_0xdac9('0x2d')]);router[_0xdac9('0x2e')](_0xdac9('0xe'),auth[_0xdac9('0x9')](),controller[_0xdac9('0x2f')]);router[_0xdac9('0x30')](_0xdac9('0xe'),auth[_0xdac9('0x9')](),controller[_0xdac9('0x31')]);module['exports']=router;