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