Built motion from commit 67e5df37.|2.0.68
[motion2.git] / server / api / user / 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 _0xc492=['getMailInteractions','/:id/sms/interactions','getSmsInteractions','/:id/teams','/:id/lists','getLists','/:id/agents','getAgents','getVoicePrefixes','/:id/fax_accounts','getFaxAccounts','/:id/mail_accounts','/:id/openchannel_accounts','/:id/sms_accounts','getSmsAccounts','post','bulkCreate','/:id/contacts','addContacts','create','diskStorage','join','root','server/files/images/','format','%s-%s','now','originalname','single','file','/:id/login','login','/:id/logout','logout','/:id/pause','/:id/unpause','addTeams','/:id/chat_interactions','addChatInteractions','addMailInteractions','/:id/fax_interactions','addFaxInteractions','/:id/sms_interactions','addSmsInteractions','/:id/openchannel_interactions','addOpenchannelInteractions','put','update','/:id/password','changePassword','delete','/:id/queues','removeTeams','removeChatInteractions','/:id/mail_interactions','removeMailInteractions','exports','multer','util','path','../../components/auth/service','./user.controller','get','index','/describe','isAuthenticated','/:id','show','getAvatar','getQueues','/:id/queues_rt','getVoiceQueuesRt','/:id/groups','/:id/recordings','getRecordings','getChatInteractions','/:id/openchannel/interactions','getOpenchannelInteractions','/:id/mail/interactions'];(function(_0xca2c12,_0x172148){var _0x35366b=function(_0x240fa8){while(--_0x240fa8){_0xca2c12['push'](_0xca2c12['shift']());}};_0x35366b(++_0x172148);}(_0xc492,0xd7));var _0x2c49=function(_0x1bd558,_0x223f69){_0x1bd558=_0x1bd558-0x0;var _0x4db09b=_0xc492[_0x1bd558];return _0x4db09b;};'use strict';var multer=require(_0x2c49('0x0'));var util=require(_0x2c49('0x1'));var path=require(_0x2c49('0x2'));var express=require('express');var router=express['Router']();var auth=require(_0x2c49('0x3'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x2c49('0x4'));router[_0x2c49('0x5')]('/',auth['isAuthenticated'](),controller[_0x2c49('0x6')]);router['get'](_0x2c49('0x7'),auth[_0x2c49('0x8')](),controller['describe']);router[_0x2c49('0x5')](_0x2c49('0x9'),auth[_0x2c49('0x8')](),controller[_0x2c49('0xa')]);router[_0x2c49('0x5')]('/:id/avatar',controller[_0x2c49('0xb')]);router['get']('/:id/contacts',auth['isAuthenticated'](),controller['getContacts']);router[_0x2c49('0x5')]('/:id/queues',auth[_0x2c49('0x8')](),controller[_0x2c49('0xc')]);router['get'](_0x2c49('0xd'),auth[_0x2c49('0x8')](),controller[_0x2c49('0xe')]);router[_0x2c49('0x5')](_0x2c49('0xf'),auth[_0x2c49('0x8')](),controller['getGroups']);router[_0x2c49('0x5')](_0x2c49('0x10'),auth[_0x2c49('0x8')](),controller[_0x2c49('0x11')]);router[_0x2c49('0x5')]('/:id/chat/interactions',auth[_0x2c49('0x8')](),controller[_0x2c49('0x12')]);router[_0x2c49('0x5')](_0x2c49('0x13'),auth[_0x2c49('0x8')](),controller[_0x2c49('0x14')]);router[_0x2c49('0x5')](_0x2c49('0x15'),auth[_0x2c49('0x8')](),controller[_0x2c49('0x16')]);router['get'](_0x2c49('0x17'),auth[_0x2c49('0x8')](),controller[_0x2c49('0x18')]);router[_0x2c49('0x5')]('/:id/fax/interactions',auth[_0x2c49('0x8')](),controller['getFaxInteractions']);router[_0x2c49('0x5')](_0x2c49('0x19'),auth['isAuthenticated'](),controller['getTeams']);router[_0x2c49('0x5')](_0x2c49('0x1a'),auth[_0x2c49('0x8')](),controller[_0x2c49('0x1b')]);router[_0x2c49('0x5')](_0x2c49('0x1c'),auth[_0x2c49('0x8')](),controller[_0x2c49('0x1d')]);router[_0x2c49('0x5')]('/:id/prefixes',auth[_0x2c49('0x8')](),controller[_0x2c49('0x1e')]);router[_0x2c49('0x5')](_0x2c49('0x1f'),auth['isAuthenticated'](),controller[_0x2c49('0x20')]);router[_0x2c49('0x5')](_0x2c49('0x21'),auth[_0x2c49('0x8')](),controller['getMailAccounts']);router[_0x2c49('0x5')](_0x2c49('0x22'),auth[_0x2c49('0x8')](),controller['getOpenchannelAccounts']);router[_0x2c49('0x5')](_0x2c49('0x23'),auth['isAuthenticated'](),controller[_0x2c49('0x24')]);router['get']('/:id/chat_websites',auth[_0x2c49('0x8')](),controller['getChatWebsites']);router[_0x2c49('0x25')]('/create_many',auth[_0x2c49('0x8')](),controller[_0x2c49('0x26')]);router[_0x2c49('0x25')](_0x2c49('0x27'),auth[_0x2c49('0x8')](),controller[_0x2c49('0x28')]);router[_0x2c49('0x25')]('/',auth[_0x2c49('0x8')](),controller[_0x2c49('0x29')]);router[_0x2c49('0x25')]('/:id/queues',auth[_0x2c49('0x8')](),controller['addQueues']);var upload=multer({'storage':multer[_0x2c49('0x2a')]({'destination':function(_0x3a4912,_0x1df70f,_0xdaed9b){_0xdaed9b(null,path[_0x2c49('0x2b')](config[_0x2c49('0x2c')],_0x2c49('0x2d')));},'filename':function(_0x178e8b,_0x3533ec,_0x2c1b30){_0x2c1b30(null,util[_0x2c49('0x2e')](_0x2c49('0x2f'),Date[_0x2c49('0x30')](),_0x3533ec[_0x2c49('0x31')]));}})});router['post']('/:id/avatar',upload[_0x2c49('0x32')](_0x2c49('0x33')),controller['addAvatar']);router[_0x2c49('0x25')](_0x2c49('0x34'),auth[_0x2c49('0x8')](),controller[_0x2c49('0x35')]);router[_0x2c49('0x25')](_0x2c49('0x36'),auth[_0x2c49('0x8')](),controller[_0x2c49('0x37')]);router['post'](_0x2c49('0x38'),auth[_0x2c49('0x8')](),controller['pause']);router[_0x2c49('0x25')](_0x2c49('0x39'),auth[_0x2c49('0x8')](),controller['unpause']);router[_0x2c49('0x25')](_0x2c49('0x19'),auth[_0x2c49('0x8')](),controller[_0x2c49('0x3a')]);router[_0x2c49('0x25')](_0x2c49('0x3b'),auth['isAuthenticated'](),controller[_0x2c49('0x3c')]);router[_0x2c49('0x25')]('/:id/mail_interactions',auth[_0x2c49('0x8')](),controller[_0x2c49('0x3d')]);router['post'](_0x2c49('0x3e'),auth['isAuthenticated'](),controller[_0x2c49('0x3f')]);router[_0x2c49('0x25')](_0x2c49('0x40'),auth['isAuthenticated'](),controller[_0x2c49('0x41')]);router['post'](_0x2c49('0x42'),auth[_0x2c49('0x8')](),controller[_0x2c49('0x43')]);router[_0x2c49('0x44')](_0x2c49('0x9'),auth['isAuthenticated'](),controller[_0x2c49('0x45')]);router[_0x2c49('0x44')](_0x2c49('0x46'),auth[_0x2c49('0x8')](),controller[_0x2c49('0x47')]);router[_0x2c49('0x48')](_0x2c49('0x49'),auth[_0x2c49('0x8')](),controller['removeQueues']);router[_0x2c49('0x48')](_0x2c49('0x19'),auth['isAuthenticated'](),controller[_0x2c49('0x4a')]);router[_0x2c49('0x48')]('/:id',auth[_0x2c49('0x8')](),controller['destroy']);router['delete']('/:id/chat_interactions',auth['isAuthenticated'](),controller[_0x2c49('0x4b')]);router[_0x2c49('0x48')](_0x2c49('0x4c'),auth[_0x2c49('0x8')](),controller[_0x2c49('0x4d')]);router['delete']('/:id/fax_interactions',auth['isAuthenticated'](),controller['removeFaxInteractions']);router[_0x2c49('0x48')]('/:id/sms_interactions',auth[_0x2c49('0x8')](),controller['removeSmsInteractions']);router['delete']('/:id/openchannel_interactions',auth[_0x2c49('0x8')](),controller['removeOpenchannelInteractions']);module[_0x2c49('0x4e')]=router;