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