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