Built motion from commit 25580385.|2.6.2
[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 _0x7bbd=['delete','destroy','multer','util','path','connect-timeout','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','show','/:id/conditions','/:id/actions','getActions','create','post','put'];(function(_0x5e6515,_0x2954b1){var _0xd33ce2=function(_0x5ce7ea){while(--_0x5ce7ea){_0x5e6515['push'](_0x5e6515['shift']());}};_0xd33ce2(++_0x2954b1);}(_0x7bbd,0x11f));var _0xd7bb=function(_0x5e9fdf,_0x366cb4){_0x5e9fdf=_0x5e9fdf-0x0;var _0x71cdc7=_0x7bbd[_0x5e9fdf];return _0x71cdc7;};'use strict';var multer=require(_0xd7bb('0x0'));var util=require(_0xd7bb('0x1'));var path=require(_0xd7bb('0x2'));var timeout=require(_0xd7bb('0x3'));var express=require('express');var router=express['Router']();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0xd7bb('0x4'));var config=require(_0xd7bb('0x5'));var controller=require('./automation.controller');router[_0xd7bb('0x6')]('/',auth[_0xd7bb('0x7')](),controller[_0xd7bb('0x8')]);router[_0xd7bb('0x6')](_0xd7bb('0x9'),auth[_0xd7bb('0x7')](),controller[_0xd7bb('0xa')]);router[_0xd7bb('0x6')](_0xd7bb('0xb'),auth[_0xd7bb('0x7')](),controller['getConditions']);router[_0xd7bb('0x6')](_0xd7bb('0xc'),auth[_0xd7bb('0x7')](),controller[_0xd7bb('0xd')]);router['post']('/',auth[_0xd7bb('0x7')](),controller[_0xd7bb('0xe')]);router['post']('/:id/conditions',auth[_0xd7bb('0x7')](),controller['addConditions']);router[_0xd7bb('0xf')]('/:id/actions',auth[_0xd7bb('0x7')](),controller['addActions']);router[_0xd7bb('0x10')](_0xd7bb('0x9'),auth[_0xd7bb('0x7')](),controller['update']);router[_0xd7bb('0x11')]('/:id',auth[_0xd7bb('0x7')](),controller[_0xd7bb('0x12')]);module['exports']=router;