2a5cb1c18a3d62d0637cef9faa460871deac297d
[motion2.git] / server / api / cmList / 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 _0x0a88=['/:id/users','create','post','addDisposition','addContacts','/:id/fields','addCustomField','update','delete','exports','path','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','index','get','/describe','/:id','show','/:id/dispositions','/:id/contacts','/:id/contacts/csv','getContactsCsv','getCustomFields'];(function(_0x115598,_0x4622f8){var _0x128dcb=function(_0x329313){while(--_0x329313){_0x115598['push'](_0x115598['shift']());}};_0x128dcb(++_0x4622f8);}(_0x0a88,0xac));var _0x80a8=function(_0x5ac1e5,_0x4b5012){_0x5ac1e5=_0x5ac1e5-0x0;var _0x1bccc6=_0x0a88[_0x5ac1e5];return _0x1bccc6;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x80a8('0x0'));var timeout=require(_0x80a8('0x1'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x80a8('0x2'));var auth=require(_0x80a8('0x3'));var interaction=require(_0x80a8('0x4'));var config=require(_0x80a8('0x5'));var controller=require('./cmList.controller');router['get']('/',auth[_0x80a8('0x6')](),controller[_0x80a8('0x7')]);router[_0x80a8('0x8')](_0x80a8('0x9'),auth[_0x80a8('0x6')](),controller['describe']);router['get']('/global_fields',auth['isAuthenticated'](),controller['getGlobalCustomFields']);router[_0x80a8('0x8')](_0x80a8('0xa'),auth[_0x80a8('0x6')](),controller[_0x80a8('0xb')]);router[_0x80a8('0x8')](_0x80a8('0xc'),auth[_0x80a8('0x6')](),controller['getDispositions']);router[_0x80a8('0x8')](_0x80a8('0xd'),auth['isAuthenticated'](),controller['getContacts']);router[_0x80a8('0x8')](_0x80a8('0xe'),auth['isAuthenticated'](),controller[_0x80a8('0xf')]);router[_0x80a8('0x8')]('/:id/fields',auth[_0x80a8('0x6')](),controller[_0x80a8('0x10')]);router['get'](_0x80a8('0x11'),auth[_0x80a8('0x6')](),controller['getAgents']);router['post']('/',auth['isAuthenticated'](),controller[_0x80a8('0x12')]);router[_0x80a8('0x13')](_0x80a8('0xc'),auth[_0x80a8('0x6')](),controller[_0x80a8('0x14')]);router[_0x80a8('0x13')](_0x80a8('0xd'),auth[_0x80a8('0x6')](),controller[_0x80a8('0x15')]);router[_0x80a8('0x13')](_0x80a8('0x16'),auth[_0x80a8('0x6')](),controller[_0x80a8('0x17')]);router[_0x80a8('0x13')]('/:id/users',auth[_0x80a8('0x6')](),controller['addAgents']);router['put'](_0x80a8('0xa'),auth['isAuthenticated'](),controller[_0x80a8('0x18')]);router[_0x80a8('0x19')](_0x80a8('0xa'),auth['isAuthenticated'](),controller['destroy']);router['delete'](_0x80a8('0xc'),auth[_0x80a8('0x6')](),controller['removeDispositions']);router[_0x80a8('0x19')](_0x80a8('0x11'),auth[_0x80a8('0x6')](),controller['removeAgents']);module[_0x80a8('0x1a')]=router;