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