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