Built motion from commit (unavailable).|2.1.0
[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 _0xb0b6=['delete','destroy','exports','multer','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./cmContact.controller','get','/describe','isAuthenticated','describe','/:id','show','/:id/hoppers','getHoppers','/:id/hopper_histories','/:id/hopper_finals','getJscriptySessions','post','/merge','create','/create_many','bulkCreate','/:id/tags','setTags','diskStorage','root','server/files/tmp','originalname','format','%s-%s%s','basename','extname','/csv','single','file','join','now','/upload','upload','import','put'];(function(_0x289d15,_0x4656fe){var _0x19bce5=function(_0x5ea493){while(--_0x5ea493){_0x289d15['push'](_0x289d15['shift']());}};_0x19bce5(++_0x4656fe);}(_0xb0b6,0xe9));var _0x6b0b=function(_0x194f9a,_0x479b58){_0x194f9a=_0x194f9a-0x0;var _0x559c89=_0xb0b6[_0x194f9a];return _0x559c89;};'use strict';var multer=require(_0x6b0b('0x0'));var util=require('util');var path=require(_0x6b0b('0x1'));var timeout=require(_0x6b0b('0x2'));var express=require(_0x6b0b('0x3'));var router=express[_0x6b0b('0x4')]();var auth=require(_0x6b0b('0x5'));var interaction=require(_0x6b0b('0x6'));var config=require('../../config/environment');var controller=require(_0x6b0b('0x7'));router[_0x6b0b('0x8')]('/',auth['isAuthenticated'](),controller['index']);router[_0x6b0b('0x8')](_0x6b0b('0x9'),auth[_0x6b0b('0xa')](),controller[_0x6b0b('0xb')]);router[_0x6b0b('0x8')](_0x6b0b('0xc'),auth['isAuthenticated'](),controller[_0x6b0b('0xd')]);router[_0x6b0b('0x8')]('/:id/tags',auth[_0x6b0b('0xa')](),controller['getTags']);router['get'](_0x6b0b('0xe'),auth[_0x6b0b('0xa')](),controller[_0x6b0b('0xf')]);router['get'](_0x6b0b('0x10'),auth[_0x6b0b('0xa')](),controller['getHopperHistories']);router['get'](_0x6b0b('0x11'),auth['isAuthenticated'](),controller['getHopperFinals']);router[_0x6b0b('0x8')]('/:id/jscripty_sessions',auth['isAuthenticated'](),controller[_0x6b0b('0x12')]);router[_0x6b0b('0x13')](_0x6b0b('0x14'),auth[_0x6b0b('0xa')](),controller['merge']);router[_0x6b0b('0x13')]('/',auth[_0x6b0b('0xa')](),controller[_0x6b0b('0x15')]);router[_0x6b0b('0x13')](_0x6b0b('0x16'),auth[_0x6b0b('0xa')](),controller[_0x6b0b('0x17')]);router[_0x6b0b('0x13')](_0x6b0b('0x18'),auth[_0x6b0b('0xa')](),controller[_0x6b0b('0x19')]);var upload=multer({'storage':multer[_0x6b0b('0x1a')]({'destination':function(_0x1502ca,_0x5e346f,_0x488465){_0x488465(null,path['join'](config[_0x6b0b('0x1b')],_0x6b0b('0x1c')));},'filename':function(_0x5329aa,_0x830dc9,_0x28c1ba){_0x830dc9[_0x6b0b('0x1d')]=_0x830dc9[_0x6b0b('0x1d')]['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x28c1ba(null,util[_0x6b0b('0x1e')](_0x6b0b('0x1f'),path[_0x6b0b('0x20')](_0x830dc9[_0x6b0b('0x1d')],path['extname'](_0x830dc9[_0x6b0b('0x1d')])),Date['now'](),path[_0x6b0b('0x21')](_0x830dc9[_0x6b0b('0x1d')])));}})});router[_0x6b0b('0x13')](_0x6b0b('0x22'),upload[_0x6b0b('0x23')](_0x6b0b('0x24')),controller['uploadCsv']);var upload=multer({'storage':multer[_0x6b0b('0x1a')]({'destination':function(_0x41d595,_0x54abb5,_0x577918){_0x577918(null,path[_0x6b0b('0x25')](config['root'],'server/files/tmp'));},'filename':function(_0xa2983b,_0x338ad7,_0x3abb4e){_0x338ad7[_0x6b0b('0x1d')]=_0x338ad7[_0x6b0b('0x1d')]['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x3abb4e(null,util[_0x6b0b('0x1e')](_0x6b0b('0x1f'),path[_0x6b0b('0x20')](_0x338ad7[_0x6b0b('0x1d')],path['extname'](_0x338ad7[_0x6b0b('0x1d')])),Date[_0x6b0b('0x26')](),path[_0x6b0b('0x21')](_0x338ad7[_0x6b0b('0x1d')])));}})});router[_0x6b0b('0x13')](_0x6b0b('0x27'),upload[_0x6b0b('0x23')](_0x6b0b('0x24')),controller[_0x6b0b('0x28')]);router[_0x6b0b('0x13')]('/upload/:id',auth[_0x6b0b('0xa')](),controller[_0x6b0b('0x29')]);router[_0x6b0b('0x2a')]('/:id',auth[_0x6b0b('0xa')](),controller['update']);router[_0x6b0b('0x2b')](_0x6b0b('0xc'),auth['isAuthenticated'](),controller[_0x6b0b('0x2c')]);module[_0x6b0b('0x2d')]=router;