Built motion from commit da617fac.|2.6.6
[motion2.git] / server / api / automation / 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 _0xc5b1=['getActions','post','create','addConditions','addActions','put','update','destroy','exports','multer','util','path','Router','../../components/interaction/service','../../config/environment','get','index','/:id','isAuthenticated','show','/:id/conditions','getConditions','/:id/actions'];(function(_0x5d0b34,_0x20557b){var _0x472a0f=function(_0x3e7ff9){while(--_0x3e7ff9){_0x5d0b34['push'](_0x5d0b34['shift']());}};_0x472a0f(++_0x20557b);}(_0xc5b1,0x106));var _0x1c5b=function(_0x55889e,_0x466fbf){_0x55889e=_0x55889e-0x0;var _0x48a697=_0xc5b1[_0x55889e];return _0x48a697;};'use strict';var multer=require(_0x1c5b('0x0'));var util=require(_0x1c5b('0x1'));var path=require(_0x1c5b('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x1c5b('0x3')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x1c5b('0x4'));var config=require(_0x1c5b('0x5'));var controller=require('./automation.controller');router[_0x1c5b('0x6')]('/',auth['isAuthenticated'](),controller[_0x1c5b('0x7')]);router[_0x1c5b('0x6')](_0x1c5b('0x8'),auth[_0x1c5b('0x9')](),controller[_0x1c5b('0xa')]);router['get'](_0x1c5b('0xb'),auth[_0x1c5b('0x9')](),controller[_0x1c5b('0xc')]);router[_0x1c5b('0x6')](_0x1c5b('0xd'),auth['isAuthenticated'](),controller[_0x1c5b('0xe')]);router[_0x1c5b('0xf')]('/',auth[_0x1c5b('0x9')](),controller[_0x1c5b('0x10')]);router[_0x1c5b('0xf')]('/:id/conditions',auth['isAuthenticated'](),controller[_0x1c5b('0x11')]);router['post']('/:id/actions',auth[_0x1c5b('0x9')](),controller[_0x1c5b('0x12')]);router[_0x1c5b('0x13')](_0x1c5b('0x8'),auth[_0x1c5b('0x9')](),controller[_0x1c5b('0x14')]);router['delete'](_0x1c5b('0x8'),auth['isAuthenticated'](),controller[_0x1c5b('0x15')]);module[_0x1c5b('0x16')]=router;