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