258ec902c161a2130f3a711e7e8208151009295f
[motion2.git] / server / api / trigger / 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 _0x49a3=['util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','/:id','show','get','/:id/any_conditions','getAnyConditions','/:id/actions','getActions','post','create','addAnyCondition','addAction','put','delete'];(function(_0x27999e,_0x1cbbd2){var _0x19498d=function(_0x2bd9ab){while(--_0x2bd9ab){_0x27999e['push'](_0x27999e['shift']());}};_0x19498d(++_0x1cbbd2);}(_0x49a3,0xe6));var _0x349a=function(_0x450929,_0xfbf496){_0x450929=_0x450929-0x0;var _0x1413d8=_0x49a3[_0x450929];return _0x1413d8;};'use strict';var multer=require('multer');var util=require(_0x349a('0x0'));var path=require(_0x349a('0x1'));var timeout=require(_0x349a('0x2'));var express=require(_0x349a('0x3'));var router=express[_0x349a('0x4')]();var fs_extra=require(_0x349a('0x5'));var auth=require(_0x349a('0x6'));var interaction=require(_0x349a('0x7'));var config=require(_0x349a('0x8'));var controller=require('./trigger.controller');router['get']('/',auth[_0x349a('0x9')](),controller['index']);router['get'](_0x349a('0xa'),auth[_0x349a('0x9')](),controller[_0x349a('0xb')]);router[_0x349a('0xc')]('/:id/all_conditions',auth[_0x349a('0x9')](),controller['getAllConditions']);router[_0x349a('0xc')](_0x349a('0xd'),auth['isAuthenticated'](),controller[_0x349a('0xe')]);router['get'](_0x349a('0xf'),auth['isAuthenticated'](),controller[_0x349a('0x10')]);router[_0x349a('0x11')]('/',auth[_0x349a('0x9')](),controller[_0x349a('0x12')]);router[_0x349a('0x11')]('/:id/all_conditions',auth['isAuthenticated'](),controller['addAllCondition']);router[_0x349a('0x11')]('/:id/any_conditions',auth['isAuthenticated'](),controller[_0x349a('0x13')]);router[_0x349a('0x11')]('/:id/actions',auth['isAuthenticated'](),controller[_0x349a('0x14')]);router[_0x349a('0x15')](_0x349a('0xa'),auth['isAuthenticated'](),controller['update']);router[_0x349a('0x16')](_0x349a('0xa'),auth[_0x349a('0x9')](),controller['destroy']);module['exports']=router;