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