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