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