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