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