Built motion from commit (unavailable).|2.5.4
[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 _0x7fbe=['/create_many','diskStorage','root','originalname','replace','%s-%s%s','basename','now','/csv','uploadCsv','join','server/files/tmp','format','extname','/upload','file','upload','import','update','delete','destroy','exports','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmContact.controller','get','isAuthenticated','index','/describe','/:id','show','getTags','/:id/hoppers','getHoppers','/:id/hopper_histories','getHopperHistories','/:id/hopper_finals','getHopperFinals','getJscriptySessions','/merge','post','create'];(function(_0x2f5b2b,_0xc3426c){var _0x12697a=function(_0x1e2ee3){while(--_0x1e2ee3){_0x2f5b2b['push'](_0x2f5b2b['shift']());}};_0x12697a(++_0xc3426c);}(_0x7fbe,0x1ec));var _0xe7fb=function(_0x595bd1,_0xb1e7a){_0x595bd1=_0x595bd1-0x0;var _0xd0344f=_0x7fbe[_0x595bd1];return _0xd0344f;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xe7fb('0x0'));var timeout=require(_0xe7fb('0x1'));var express=require(_0xe7fb('0x2'));var router=express[_0xe7fb('0x3')]();var auth=require(_0xe7fb('0x4'));var interaction=require(_0xe7fb('0x5'));var config=require(_0xe7fb('0x6'));var controller=require(_0xe7fb('0x7'));router[_0xe7fb('0x8')]('/',auth[_0xe7fb('0x9')](),controller[_0xe7fb('0xa')]);router[_0xe7fb('0x8')](_0xe7fb('0xb'),auth[_0xe7fb('0x9')](),controller['describe']);router[_0xe7fb('0x8')](_0xe7fb('0xc'),auth[_0xe7fb('0x9')](),controller[_0xe7fb('0xd')]);router['get']('/:id/tags',auth[_0xe7fb('0x9')](),controller[_0xe7fb('0xe')]);router[_0xe7fb('0x8')](_0xe7fb('0xf'),auth[_0xe7fb('0x9')](),controller[_0xe7fb('0x10')]);router[_0xe7fb('0x8')](_0xe7fb('0x11'),auth[_0xe7fb('0x9')](),controller[_0xe7fb('0x12')]);router[_0xe7fb('0x8')](_0xe7fb('0x13'),auth[_0xe7fb('0x9')](),controller[_0xe7fb('0x14')]);router[_0xe7fb('0x8')]('/:id/jscripty_sessions',auth[_0xe7fb('0x9')](),controller[_0xe7fb('0x15')]);router['post'](_0xe7fb('0x16'),auth[_0xe7fb('0x9')](),controller['merge']);router[_0xe7fb('0x17')]('/',auth['isAuthenticated'](),controller[_0xe7fb('0x18')]);router[_0xe7fb('0x17')](_0xe7fb('0x19'),auth[_0xe7fb('0x9')](),controller['bulkCreate']);router[_0xe7fb('0x17')]('/:id/tags',auth[_0xe7fb('0x9')](),controller['setTags']);var upload=multer({'storage':multer[_0xe7fb('0x1a')]({'destination':function(_0x4708f7,_0x3f96a7,_0x182269){_0x182269(null,path['join'](config[_0xe7fb('0x1b')],'server/files/tmp'));},'filename':function(_0x11cae0,_0x51f01f,_0x15f7a4){_0x51f01f['originalname']=_0x51f01f[_0xe7fb('0x1c')][_0xe7fb('0x1d')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x15f7a4(null,util['format'](_0xe7fb('0x1e'),path[_0xe7fb('0x1f')](_0x51f01f[_0xe7fb('0x1c')],path['extname'](_0x51f01f[_0xe7fb('0x1c')])),Date[_0xe7fb('0x20')](),path['extname'](_0x51f01f['originalname'])));}})});router['post'](_0xe7fb('0x21'),upload['single']('file'),controller[_0xe7fb('0x22')]);var upload=multer({'storage':multer[_0xe7fb('0x1a')]({'destination':function(_0x2996ae,_0x4f6c73,_0x6c930){_0x6c930(null,path[_0xe7fb('0x23')](config[_0xe7fb('0x1b')],_0xe7fb('0x24')));},'filename':function(_0x392d75,_0x16237a,_0x380130){_0x16237a['originalname']=_0x16237a['originalname'][_0xe7fb('0x1d')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x380130(null,util[_0xe7fb('0x25')](_0xe7fb('0x1e'),path['basename'](_0x16237a[_0xe7fb('0x1c')],path[_0xe7fb('0x26')](_0x16237a[_0xe7fb('0x1c')])),Date[_0xe7fb('0x20')](),path[_0xe7fb('0x26')](_0x16237a[_0xe7fb('0x1c')])));}})});router[_0xe7fb('0x17')](_0xe7fb('0x27'),upload['single'](_0xe7fb('0x28')),controller[_0xe7fb('0x29')]);router[_0xe7fb('0x17')]('/upload/:id',auth['isAuthenticated'](),controller[_0xe7fb('0x2a')]);router['put'](_0xe7fb('0xc'),auth[_0xe7fb('0x9')](),controller[_0xe7fb('0x2b')]);router[_0xe7fb('0x2c')]('/:id',auth[_0xe7fb('0x9')](),controller[_0xe7fb('0x2d')]);module[_0xe7fb('0x2e')]=router;