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