Built motion from commit 85328c08.|2.5.50
[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 _0x3c77=['diskStorage','root','originalname','replace','format','%s-%s%s','basename','extname','now','/csv','file','uploadCsv','/upload','upload','/upload/:id','put','update','delete','destroy','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmContact.controller','index','/describe','isAuthenticated','describe','get','/:id','show','/:id/tags','getTags','/:id/hoppers','getHoppers','/:id/hopper_histories','getHopperFinals','/:id/jscripty_sessions','getJscriptySessions','/:id/journey','getJourney','post','/merge','merge','/create_many','bulkCreate','setTags'];(function(_0x578275,_0xe7ae46){var _0xf78041=function(_0x13148c){while(--_0x13148c){_0x578275['push'](_0x578275['shift']());}};_0xf78041(++_0xe7ae46);}(_0x3c77,0x1bc));var _0x73c7=function(_0x562f6d,_0x1a82f3){_0x562f6d=_0x562f6d-0x0;var _0x4c486f=_0x3c77[_0x562f6d];return _0x4c486f;};'use strict';var multer=require(_0x73c7('0x0'));var util=require('util');var path=require(_0x73c7('0x1'));var timeout=require(_0x73c7('0x2'));var express=require(_0x73c7('0x3'));var router=express[_0x73c7('0x4')]();var fs_extra=require(_0x73c7('0x5'));var auth=require(_0x73c7('0x6'));var interaction=require(_0x73c7('0x7'));var config=require(_0x73c7('0x8'));var controller=require(_0x73c7('0x9'));router['get']('/',auth['isAuthenticated'](),controller[_0x73c7('0xa')]);router['get'](_0x73c7('0xb'),auth[_0x73c7('0xc')](),controller[_0x73c7('0xd')]);router[_0x73c7('0xe')](_0x73c7('0xf'),auth['isAuthenticated'](),controller[_0x73c7('0x10')]);router[_0x73c7('0xe')](_0x73c7('0x11'),auth['isAuthenticated'](),controller[_0x73c7('0x12')]);router[_0x73c7('0xe')](_0x73c7('0x13'),auth[_0x73c7('0xc')](),controller[_0x73c7('0x14')]);router[_0x73c7('0xe')](_0x73c7('0x15'),auth[_0x73c7('0xc')](),controller['getHopperHistories']);router['get']('/:id/hopper_finals',auth[_0x73c7('0xc')](),controller[_0x73c7('0x16')]);router[_0x73c7('0xe')](_0x73c7('0x17'),auth['isAuthenticated'](),controller[_0x73c7('0x18')]);router['get'](_0x73c7('0x19'),auth['isAuthenticated'](),controller[_0x73c7('0x1a')]);router[_0x73c7('0x1b')](_0x73c7('0x1c'),auth[_0x73c7('0xc')](),controller[_0x73c7('0x1d')]);router[_0x73c7('0x1b')]('/',auth[_0x73c7('0xc')](),controller['create']);router[_0x73c7('0x1b')](_0x73c7('0x1e'),auth[_0x73c7('0xc')](),controller[_0x73c7('0x1f')]);router[_0x73c7('0x1b')]('/:id/tags',auth[_0x73c7('0xc')](),controller[_0x73c7('0x20')]);var upload=multer({'storage':multer[_0x73c7('0x21')]({'destination':function(_0x2d3dee,_0x4f3e2a,_0xb6a7a9){_0xb6a7a9(null,path['join'](config[_0x73c7('0x22')],'server/files/tmp'));},'filename':function(_0x1e456d,_0x5a724c,_0x441e94){_0x5a724c['originalname']=_0x5a724c[_0x73c7('0x23')][_0x73c7('0x24')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x441e94(null,util[_0x73c7('0x25')](_0x73c7('0x26'),path[_0x73c7('0x27')](_0x5a724c[_0x73c7('0x23')],path[_0x73c7('0x28')](_0x5a724c[_0x73c7('0x23')])),Date[_0x73c7('0x29')](),path[_0x73c7('0x28')](_0x5a724c[_0x73c7('0x23')])));}})});router['post'](_0x73c7('0x2a'),upload['single'](_0x73c7('0x2b')),controller[_0x73c7('0x2c')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x397d7a,_0x40a61b,_0x3eaf14){_0x3eaf14(null,path['join'](config[_0x73c7('0x22')],'server/files/tmp'));},'filename':function(_0x4d0061,_0x5f3ac6,_0x453f0f){_0x5f3ac6[_0x73c7('0x23')]=_0x5f3ac6['originalname'][_0x73c7('0x24')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x453f0f(null,util[_0x73c7('0x25')](_0x73c7('0x26'),path[_0x73c7('0x27')](_0x5f3ac6[_0x73c7('0x23')],path[_0x73c7('0x28')](_0x5f3ac6[_0x73c7('0x23')])),Date[_0x73c7('0x29')](),path[_0x73c7('0x28')](_0x5f3ac6[_0x73c7('0x23')])));}})});router[_0x73c7('0x1b')](_0x73c7('0x2d'),upload['single'](_0x73c7('0x2b')),controller[_0x73c7('0x2e')]);router[_0x73c7('0x1b')](_0x73c7('0x2f'),auth[_0x73c7('0xc')](),controller['import']);router[_0x73c7('0x30')](_0x73c7('0xf'),auth[_0x73c7('0xc')](),controller[_0x73c7('0x31')]);router[_0x73c7('0x32')](_0x73c7('0xf'),auth[_0x73c7('0xc')](),controller[_0x73c7('0x33')]);module[_0x73c7('0x34')]=router;