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