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