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