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