Built motion from commit (unavailable).|2.3.4
[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 _0x40be=['getVoiceQueuesRt','getGroups','/:id/recordings','getRecordings','/:id/chat/interactions','/:id/mail/interactions','getMailInteractions','/:id/sms/interactions','getSmsInteractions','/:id/fax/interactions','getTeams','/:id/lists','getLists','getAgents','/:id/prefixes','getVoicePrefixes','getFaxAccounts','getMailAccounts','/:id/openchannel_accounts','/:id/sms_accounts','getSmsAccounts','getChatWebsites','getSquareProjects','getScheduledCalls','/:id/api_key','getApiKey','post','/create_many','bulkCreate','addContacts','create','/:id/queues','addQueues','diskStorage','join','root','server/files/images/','%s-%s','now','originalname','single','file','addAvatar','/:id/login','login','/:id/logout','logout','/:id/pause','/:id/unpause','/:id/teams','addTeams','/:id/chat_interactions','addChatInteractions','/:id/mail_interactions','addMailInteractions','/:id/fax_interactions','/:id/sms_interactions','addSmsInteractions','/:id/openchannel_interactions','addOpenchannelInteractions','/:id/fax_accounts','/:id/mail_accounts','addMailAccounts','addSmsAccounts','/:id/chat_websites','addChatWebsites','/:id/square_projects','addSquareProjects','createApiKey','put','/:id','update','/:id/password','changePassword','delete','removeQueues','removeTeams','removeChatInteractions','removeMailInteractions','removeSmsInteractions','removeFaxAccounts','removeMailAccounts','removeOpenchannelAccounts','removeSmsAccounts','removeChatWebsites','removeApiKey','exports','multer','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','isAuthenticated','index','/describe','describe','get','/:id/avatar','getAvatar','/:id/contacts','getQueues','/:id/queues_rt'];(function(_0x33711e,_0x57999f){var _0x5816e3=function(_0x209f5e){while(--_0x209f5e){_0x33711e['push'](_0x33711e['shift']());}};_0x5816e3(++_0x57999f);}(_0x40be,0x127));var _0xe40b=function(_0xffa3cf,_0x3d17fd){_0xffa3cf=_0xffa3cf-0x0;var _0x2e4a2f=_0x40be[_0xffa3cf];return _0x2e4a2f;};'use strict';var multer=require(_0xe40b('0x0'));var util=require(_0xe40b('0x1'));var path=require('path');var timeout=require(_0xe40b('0x2'));var express=require(_0xe40b('0x3'));var router=express[_0xe40b('0x4')]();var auth=require(_0xe40b('0x5'));var interaction=require(_0xe40b('0x6'));var config=require('../../config/environment');var controller=require('./user.controller');router['get']('/',auth[_0xe40b('0x7')](),controller[_0xe40b('0x8')]);router['get'](_0xe40b('0x9'),auth['isAuthenticated'](),controller[_0xe40b('0xa')]);router[_0xe40b('0xb')]('/:id',auth[_0xe40b('0x7')](),controller['show']);router[_0xe40b('0xb')](_0xe40b('0xc'),controller[_0xe40b('0xd')]);router[_0xe40b('0xb')](_0xe40b('0xe'),auth[_0xe40b('0x7')](),controller['getContacts']);router[_0xe40b('0xb')]('/:id/queues',auth['isAuthenticated'](),controller[_0xe40b('0xf')]);router['get'](_0xe40b('0x10'),auth[_0xe40b('0x7')](),controller[_0xe40b('0x11')]);router[_0xe40b('0xb')]('/:id/groups',auth[_0xe40b('0x7')](),controller[_0xe40b('0x12')]);router[_0xe40b('0xb')](_0xe40b('0x13'),auth[_0xe40b('0x7')](),controller[_0xe40b('0x14')]);router[_0xe40b('0xb')](_0xe40b('0x15'),auth['isAuthenticated'](),controller['getChatInteractions']);router['get']('/:id/openchannel/interactions',auth[_0xe40b('0x7')](),controller['getOpenchannelInteractions']);router[_0xe40b('0xb')](_0xe40b('0x16'),auth[_0xe40b('0x7')](),controller[_0xe40b('0x17')]);router['get'](_0xe40b('0x18'),auth[_0xe40b('0x7')](),controller[_0xe40b('0x19')]);router[_0xe40b('0xb')](_0xe40b('0x1a'),auth[_0xe40b('0x7')](),controller['getFaxInteractions']);router[_0xe40b('0xb')]('/:id/teams',auth[_0xe40b('0x7')](),controller[_0xe40b('0x1b')]);router[_0xe40b('0xb')](_0xe40b('0x1c'),auth[_0xe40b('0x7')](),controller[_0xe40b('0x1d')]);router[_0xe40b('0xb')]('/:id/agents',auth[_0xe40b('0x7')](),controller[_0xe40b('0x1e')]);router[_0xe40b('0xb')](_0xe40b('0x1f'),auth[_0xe40b('0x7')](),controller[_0xe40b('0x20')]);router[_0xe40b('0xb')]('/:id/fax_accounts',auth[_0xe40b('0x7')](),controller[_0xe40b('0x21')]);router[_0xe40b('0xb')]('/:id/mail_accounts',auth[_0xe40b('0x7')](),controller[_0xe40b('0x22')]);router[_0xe40b('0xb')](_0xe40b('0x23'),auth[_0xe40b('0x7')](),controller['getOpenchannelAccounts']);router[_0xe40b('0xb')](_0xe40b('0x24'),auth['isAuthenticated'](),controller[_0xe40b('0x25')]);router[_0xe40b('0xb')]('/:id/chat_websites',auth[_0xe40b('0x7')](),controller[_0xe40b('0x26')]);router['get']('/:id/square_projects',auth[_0xe40b('0x7')](),controller[_0xe40b('0x27')]);router[_0xe40b('0xb')]('/:id/scheduled_calls',auth[_0xe40b('0x7')](),controller[_0xe40b('0x28')]);router[_0xe40b('0xb')](_0xe40b('0x29'),auth[_0xe40b('0x7')](),controller[_0xe40b('0x2a')]);router[_0xe40b('0x2b')](_0xe40b('0x2c'),auth[_0xe40b('0x7')](),controller[_0xe40b('0x2d')]);router[_0xe40b('0x2b')]('/:id/contacts',auth[_0xe40b('0x7')](),controller[_0xe40b('0x2e')]);router[_0xe40b('0x2b')]('/',auth['isAuthenticated'](),controller[_0xe40b('0x2f')]);router['post'](_0xe40b('0x30'),auth[_0xe40b('0x7')](),controller[_0xe40b('0x31')]);var upload=multer({'storage':multer[_0xe40b('0x32')]({'destination':function(_0x1d3091,_0x31e02f,_0xffc0e4){_0xffc0e4(null,path[_0xe40b('0x33')](config[_0xe40b('0x34')],_0xe40b('0x35')));},'filename':function(_0x33de82,_0x465c38,_0x401ef8){_0x401ef8(null,util['format'](_0xe40b('0x36'),Date[_0xe40b('0x37')](),_0x465c38[_0xe40b('0x38')]));}})});router[_0xe40b('0x2b')]('/:id/avatar',upload[_0xe40b('0x39')](_0xe40b('0x3a')),controller[_0xe40b('0x3b')]);router['post'](_0xe40b('0x3c'),auth[_0xe40b('0x7')](),controller[_0xe40b('0x3d')]);router[_0xe40b('0x2b')](_0xe40b('0x3e'),auth[_0xe40b('0x7')](),controller[_0xe40b('0x3f')]);router[_0xe40b('0x2b')](_0xe40b('0x40'),auth[_0xe40b('0x7')](),controller['pause']);router[_0xe40b('0x2b')](_0xe40b('0x41'),auth['isAuthenticated'](),controller['unpause']);router[_0xe40b('0x2b')](_0xe40b('0x42'),auth[_0xe40b('0x7')](),controller[_0xe40b('0x43')]);router[_0xe40b('0x2b')](_0xe40b('0x44'),auth[_0xe40b('0x7')](),controller[_0xe40b('0x45')]);router[_0xe40b('0x2b')](_0xe40b('0x46'),auth[_0xe40b('0x7')](),controller[_0xe40b('0x47')]);router[_0xe40b('0x2b')](_0xe40b('0x48'),auth[_0xe40b('0x7')](),controller['addFaxInteractions']);router['post'](_0xe40b('0x49'),auth[_0xe40b('0x7')](),controller[_0xe40b('0x4a')]);router[_0xe40b('0x2b')](_0xe40b('0x4b'),auth[_0xe40b('0x7')](),controller[_0xe40b('0x4c')]);router[_0xe40b('0x2b')](_0xe40b('0x4d'),auth['isAuthenticated'](),controller['addFaxAccounts']);router['post'](_0xe40b('0x4e'),auth[_0xe40b('0x7')](),controller[_0xe40b('0x4f')]);router[_0xe40b('0x2b')](_0xe40b('0x23'),auth[_0xe40b('0x7')](),controller['addOpenchannelAccounts']);router['post'](_0xe40b('0x24'),auth[_0xe40b('0x7')](),controller[_0xe40b('0x50')]);router[_0xe40b('0x2b')](_0xe40b('0x51'),auth['isAuthenticated'](),controller[_0xe40b('0x52')]);router['post'](_0xe40b('0x53'),auth[_0xe40b('0x7')](),controller[_0xe40b('0x54')]);router[_0xe40b('0x2b')](_0xe40b('0x29'),auth[_0xe40b('0x7')](),controller[_0xe40b('0x55')]);router[_0xe40b('0x56')](_0xe40b('0x57'),auth[_0xe40b('0x7')](),controller[_0xe40b('0x58')]);router[_0xe40b('0x56')](_0xe40b('0x59'),auth['isAuthenticated'](),controller[_0xe40b('0x5a')]);router[_0xe40b('0x5b')]('/:id/queues',auth['isAuthenticated'](),controller[_0xe40b('0x5c')]);router['delete'](_0xe40b('0x42'),auth['isAuthenticated'](),controller[_0xe40b('0x5d')]);router[_0xe40b('0x5b')]('/:id',auth['isAuthenticated'](),controller['destroy']);router[_0xe40b('0x5b')](_0xe40b('0x44'),auth[_0xe40b('0x7')](),controller[_0xe40b('0x5e')]);router[_0xe40b('0x5b')]('/:id/mail_interactions',auth[_0xe40b('0x7')](),controller[_0xe40b('0x5f')]);router[_0xe40b('0x5b')](_0xe40b('0x48'),auth[_0xe40b('0x7')](),controller['removeFaxInteractions']);router[_0xe40b('0x5b')](_0xe40b('0x49'),auth[_0xe40b('0x7')](),controller[_0xe40b('0x60')]);router[_0xe40b('0x5b')](_0xe40b('0x4b'),auth['isAuthenticated'](),controller['removeOpenchannelInteractions']);router['delete']('/:id/fax_accounts',auth[_0xe40b('0x7')](),controller[_0xe40b('0x61')]);router['delete'](_0xe40b('0x4e'),auth[_0xe40b('0x7')](),controller[_0xe40b('0x62')]);router[_0xe40b('0x5b')](_0xe40b('0x23'),auth[_0xe40b('0x7')](),controller[_0xe40b('0x63')]);router[_0xe40b('0x5b')](_0xe40b('0x24'),auth[_0xe40b('0x7')](),controller[_0xe40b('0x64')]);router[_0xe40b('0x5b')](_0xe40b('0x51'),auth[_0xe40b('0x7')](),controller[_0xe40b('0x65')]);router[_0xe40b('0x5b')](_0xe40b('0x53'),auth[_0xe40b('0x7')](),controller['removeSquareProjects']);router[_0xe40b('0x5b')](_0xe40b('0x29'),auth[_0xe40b('0x7')](),controller[_0xe40b('0x66')]);module[_0xe40b('0x67')]=router;