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