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