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