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