mirror of
https://github.com/nextcloud/spreed.git
synced 2025-12-17 21:12:20 +01:00
Merge pull request #16343 from nextcloud/techdebt/noid/route-attributes
fix(router): Move to router attributes
This commit is contained in:
commit
504822bb70
54 changed files with 21913 additions and 22079 deletions
|
|
@ -1,33 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
|
||||
return array_merge_recursive(
|
||||
include(__DIR__ . '/routes/routesAvatarController.php'),
|
||||
include(__DIR__ . '/routes/routesBanController.php'),
|
||||
include(__DIR__ . '/routes/routesBotController.php'),
|
||||
include(__DIR__ . '/routes/routesBreakoutRoomController.php'),
|
||||
include(__DIR__ . '/routes/routesCalendarIntegrationController.php'),
|
||||
include(__DIR__ . '/routes/routesCallController.php'),
|
||||
include(__DIR__ . '/routes/routesCertificateController.php'),
|
||||
include(__DIR__ . '/routes/routesFederationController.php'),
|
||||
include(__DIR__ . '/routes/routesFilesIntegrationController.php'),
|
||||
include(__DIR__ . '/routes/routesGuestController.php'),
|
||||
include(__DIR__ . '/routes/routesHostedSignalingServerController.php'),
|
||||
include(__DIR__ . '/routes/routesMatterbridgeController.php'),
|
||||
include(__DIR__ . '/routes/routesMatterbridgeSettingsController.php'),
|
||||
include(__DIR__ . '/routes/routesPageController.php'),
|
||||
include(__DIR__ . '/routes/routesPollController.php'),
|
||||
include(__DIR__ . '/routes/routesPublicShareAuthController.php'),
|
||||
include(__DIR__ . '/routes/routesReactionController.php'),
|
||||
include(__DIR__ . '/routes/routesRecordingController.php'),
|
||||
include(__DIR__ . '/routes/routesRoomController.php'),
|
||||
include(__DIR__ . '/routes/routesSettingsController.php'),
|
||||
include(__DIR__ . '/routes/routesSignalingController.php'),
|
||||
include(__DIR__ . '/routes/routesTempAvatarController.php'),
|
||||
);
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
$requirements = [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '^[a-z0-9]{4,30}$',
|
||||
];
|
||||
$requirementsWithSize = [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '^[a-z0-9]{4,30}$',
|
||||
'size' => '(64|512)',
|
||||
];
|
||||
$requirementsNewWithSize = [
|
||||
'apiVersion' => '(v1)',
|
||||
'size' => '(64|512)',
|
||||
];
|
||||
|
||||
return [
|
||||
'ocs' => [
|
||||
/** @see \OCA\Talk\Controller\AvatarController::uploadAvatar() */
|
||||
['name' => 'Avatar#uploadAvatar', 'url' => '/api/{apiVersion}/room/{token}/avatar', 'verb' => 'POST', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\AvatarController::emojiAvatar() */
|
||||
['name' => 'Avatar#emojiAvatar', 'url' => '/api/{apiVersion}/room/{token}/avatar/emoji', 'verb' => 'POST', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\AvatarController::getAvatar() */
|
||||
['name' => 'Avatar#getAvatar', 'url' => '/api/{apiVersion}/room/{token}/avatar', 'verb' => 'GET', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\AvatarController::getAvatarDark() */
|
||||
['name' => 'Avatar#getAvatarDark', 'url' => '/api/{apiVersion}/room/{token}/avatar/dark', 'verb' => 'GET', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\AvatarController::deleteAvatar() */
|
||||
['name' => 'Avatar#deleteAvatar', 'url' => '/api/{apiVersion}/room/{token}/avatar', 'verb' => 'DELETE', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\AvatarController::getUserProxyAvatarWithoutRoom() */
|
||||
['name' => 'Avatar#getUserProxyAvatarWithoutRoom', 'url' => '/api/{apiVersion}/proxy/new/user-avatar/{size}', 'verb' => 'GET', 'requirements' => $requirementsNewWithSize],
|
||||
/** @see \OCA\Talk\Controller\AvatarController::getUserProxyAvatarDarkWithoutRoom() */
|
||||
['name' => 'Avatar#getUserProxyAvatarDarkWithoutRoom', 'url' => '/api/{apiVersion}/proxy/new/user-avatar/{size}/dark', 'verb' => 'GET', 'requirements' => $requirementsNewWithSize],
|
||||
/** @see \OCA\Talk\Controller\AvatarController::getUserProxyAvatar() */
|
||||
['name' => 'Avatar#getUserProxyAvatar', 'url' => '/api/{apiVersion}/proxy/{token}/user-avatar/{size}', 'verb' => 'GET', 'requirements' => $requirementsWithSize],
|
||||
/** @see \OCA\Talk\Controller\AvatarController::getUserProxyAvatarDark() */
|
||||
['name' => 'Avatar#getUserProxyAvatarDark', 'url' => '/api/{apiVersion}/proxy/{token}/user-avatar/{size}/dark', 'verb' => 'GET', 'requirements' => $requirementsWithSize],
|
||||
],
|
||||
];
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
$requirements = [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
];
|
||||
return [
|
||||
'ocs' => [
|
||||
/** @see \OCA\Talk\Controller\BanController::banActor() */
|
||||
['name' => 'Ban#banActor', 'url' => '/api/{apiVersion}/ban/{token}', 'verb' => 'POST', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\BanController::listBans() */
|
||||
['name' => 'Ban#listBans', 'url' => '/api/{apiVersion}/ban/{token}', 'verb' => 'GET', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\BanController::unbanActor() */
|
||||
['name' => 'Ban#unbanActor', 'url' => '/api/{apiVersion}/ban/{token}/{banId}', 'verb' => 'DELETE', 'requirements' => $requirements],
|
||||
],
|
||||
];
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
$requirements = [
|
||||
'apiVersion' => '(v1)',
|
||||
];
|
||||
|
||||
$requirementsWithToken = [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
];
|
||||
|
||||
$requirementsWithMessageId = [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
'messageId' => '[0-9]+',
|
||||
];
|
||||
|
||||
$requirementsWithBotId = [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
'botId' => '[0-9]+',
|
||||
];
|
||||
|
||||
return [
|
||||
'ocs' => [
|
||||
/** @see \OCA\Talk\Controller\BotController::sendMessage() */
|
||||
['name' => 'Bot#sendMessage', 'url' => '/api/{apiVersion}/bot/{token}/message', 'verb' => 'POST', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\BotController::react() */
|
||||
['name' => 'Bot#react', 'url' => '/api/{apiVersion}/bot/{token}/reaction/{messageId}', 'verb' => 'POST', 'requirements' => $requirementsWithMessageId],
|
||||
/** @see \OCA\Talk\Controller\BotController::deleteReaction() */
|
||||
['name' => 'Bot#deleteReaction', 'url' => '/api/{apiVersion}/bot/{token}/reaction/{messageId}', 'verb' => 'DELETE', 'requirements' => $requirementsWithMessageId],
|
||||
/** @see \OCA\Talk\Controller\BotController::adminListBots() */
|
||||
['name' => 'Bot#adminListBots', 'url' => '/api/{apiVersion}/bot/admin', 'verb' => 'GET', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\BotController::listBots() */
|
||||
['name' => 'Bot#listBots', 'url' => '/api/{apiVersion}/bot/{token}', 'verb' => 'GET', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\BotController::enableBot() */
|
||||
['name' => 'Bot#enableBot', 'url' => '/api/{apiVersion}/bot/{token}/{botId}', 'verb' => 'POST', 'requirements' => $requirementsWithBotId],
|
||||
/** @see \OCA\Talk\Controller\BotController::disableBot() */
|
||||
['name' => 'Bot#disableBot', 'url' => '/api/{apiVersion}/bot/{token}/{botId}', 'verb' => 'DELETE', 'requirements' => $requirementsWithBotId],
|
||||
],
|
||||
];
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
$requirements = [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
];
|
||||
|
||||
return [
|
||||
'ocs' => [
|
||||
/** @see \OCA\Talk\Controller\BreakoutRoomController::configureBreakoutRooms() */
|
||||
['name' => 'BreakoutRoom#configureBreakoutRooms', 'url' => '/api/{apiVersion}/breakout-rooms/{token}', 'verb' => 'POST', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\BreakoutRoomController::removeBreakoutRooms() */
|
||||
['name' => 'BreakoutRoom#removeBreakoutRooms', 'url' => '/api/{apiVersion}/breakout-rooms/{token}', 'verb' => 'DELETE', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\BreakoutRoomController::broadcastChatMessage() */
|
||||
['name' => 'BreakoutRoom#broadcastChatMessage', 'url' => '/api/{apiVersion}/breakout-rooms/{token}/broadcast', 'verb' => 'POST', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\BreakoutRoomController::applyAttendeeMap() */
|
||||
['name' => 'BreakoutRoom#applyAttendeeMap', 'url' => '/api/{apiVersion}/breakout-rooms/{token}/attendees', 'verb' => 'POST', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\BreakoutRoomController::requestAssistance() */
|
||||
['name' => 'BreakoutRoom#requestAssistance', 'url' => '/api/{apiVersion}/breakout-rooms/{token}/request-assistance', 'verb' => 'POST', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\BreakoutRoomController::resetRequestForAssistance() */
|
||||
['name' => 'BreakoutRoom#resetRequestForAssistance', 'url' => '/api/{apiVersion}/breakout-rooms/{token}/request-assistance', 'verb' => 'DELETE', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\BreakoutRoomController::startBreakoutRooms() */
|
||||
['name' => 'BreakoutRoom#startBreakoutRooms', 'url' => '/api/{apiVersion}/breakout-rooms/{token}/rooms', 'verb' => 'POST', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\BreakoutRoomController::stopBreakoutRooms() */
|
||||
['name' => 'BreakoutRoom#stopBreakoutRooms', 'url' => '/api/{apiVersion}/breakout-rooms/{token}/rooms', 'verb' => 'DELETE', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\BreakoutRoomController::switchBreakoutRoom() */
|
||||
['name' => 'BreakoutRoom#switchBreakoutRoom', 'url' => '/api/{apiVersion}/breakout-rooms/{token}/switch', 'verb' => 'POST', 'requirements' => $requirements],
|
||||
],
|
||||
];
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
$requirements = [
|
||||
'apiVersion' => '(v4)',
|
||||
];
|
||||
|
||||
$requirementsWithToken = [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
];
|
||||
|
||||
return [
|
||||
'ocs' => [
|
||||
/** @see \OCA\Talk\Controller\CalendarIntegrationController::getDashboardEvents() */
|
||||
['name' => 'CalendarIntegration#getDashboardEvents', 'url' => '/api/{apiVersion}/dashboard/events', 'verb' => 'GET', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\CalendarIntegrationController::getMutualEvents() */
|
||||
['name' => 'CalendarIntegration#getMutualEvents', 'url' => '/api/{apiVersion}/room/{token}/mutual-events', 'verb' => 'GET', 'requirements' => $requirementsWithToken],
|
||||
],
|
||||
];
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
$requirements = [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
];
|
||||
|
||||
return [
|
||||
'ocs' => [
|
||||
/** @see \OCA\Talk\Controller\CallController::getPeersForCall() */
|
||||
['name' => 'Call#getPeersForCall', 'url' => '/api/{apiVersion}/call/{token}', 'verb' => 'GET', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\CallNotificationController::state() */
|
||||
['name' => 'CallNotification#state', 'url' => '/api/{apiVersion}/call/{token}/notification-state', 'verb' => 'GET', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\CallController::downloadParticipantsForCall() */
|
||||
['name' => 'Call#downloadParticipantsForCall', 'url' => '/api/{apiVersion}/call/{token}/download', 'verb' => 'GET', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\CallController::joinCall() */
|
||||
['name' => 'Call#joinCall', 'url' => '/api/{apiVersion}/call/{token}', 'verb' => 'POST', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\CallController::joinFederatedCall() */
|
||||
['name' => 'Call#joinFederatedCall', 'url' => '/api/{apiVersion}/call/{token}/federation', 'verb' => 'POST', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\CallController::ringAttendee() */
|
||||
['name' => 'Call#ringAttendee', 'url' => '/api/{apiVersion}/call/{token}/ring/{attendeeId}', 'verb' => 'POST', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\CallController::sipDialOut() */
|
||||
['name' => 'Call#sipDialOut', 'url' => '/api/{apiVersion}/call/{token}/dialout/{attendeeId}', 'verb' => 'POST', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\CallController::updateCallFlags() */
|
||||
['name' => 'Call#updateCallFlags', 'url' => '/api/{apiVersion}/call/{token}', 'verb' => 'PUT', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\CallController::updateFederatedCallFlags() */
|
||||
['name' => 'Call#updateFederatedCallFlags', 'url' => '/api/{apiVersion}/call/{token}/federation', 'verb' => 'PUT', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\CallController::leaveCall() */
|
||||
['name' => 'Call#leaveCall', 'url' => '/api/{apiVersion}/call/{token}', 'verb' => 'DELETE', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\CallController::leaveFederatedCall() */
|
||||
['name' => 'Call#leaveFederatedCall', 'url' => '/api/{apiVersion}/call/{token}/federation', 'verb' => 'DELETE', 'requirements' => $requirements],
|
||||
],
|
||||
];
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
$requirements = [
|
||||
'apiVersion' => '(v1)',
|
||||
];
|
||||
|
||||
return [
|
||||
'ocs' => [
|
||||
/** @see \OCA\Talk\Controller\CertificateController::getCertificateExpiration() */
|
||||
['name' => 'Certificate#getCertificateExpiration', 'url' => '/api/{apiVersion}/certificate/expiration', 'verb' => 'GET', 'requirements' => $requirements],
|
||||
],
|
||||
];
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
$requirements = [
|
||||
'apiVersion' => '(v1)',
|
||||
];
|
||||
|
||||
return [
|
||||
'ocs' => [
|
||||
/** @see \OCA\Talk\Controller\FederationController::acceptShare() */
|
||||
['name' => 'Federation#acceptShare', 'url' => 'api/{apiVersion}/federation/invitation/{id}', 'verb' => 'POST', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\FederationController::rejectShare() */
|
||||
['name' => 'Federation#rejectShare', 'url' => 'api/{apiVersion}/federation/invitation/{id}', 'verb' => 'DELETE', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\FederationController::getShares() */
|
||||
['name' => 'Federation#getShares', 'url' => 'api/{apiVersion}/federation/invitation', 'verb' => 'GET', 'requirements' => $requirements],
|
||||
],
|
||||
];
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
$requirementsFile = [
|
||||
'apiVersion' => '(v1)',
|
||||
'fileId' => '.+',
|
||||
];
|
||||
$requirementsShare = [
|
||||
'apiVersion' => '(v1)',
|
||||
'shareToken' => '.+',
|
||||
];
|
||||
|
||||
return [
|
||||
'ocs' => [
|
||||
/** @see \OCA\Talk\Controller\FilesIntegrationController::getRoomByFileId() */
|
||||
['name' => 'FilesIntegration#getRoomByFileId', 'url' => '/api/{apiVersion}/file/{fileId}', 'verb' => 'GET', 'requirements' => $requirementsFile],
|
||||
/** @see \OCA\Talk\Controller\FilesIntegrationController::getRoomByShareToken() */
|
||||
['name' => 'FilesIntegration#getRoomByShareToken', 'url' => '/api/{apiVersion}/publicshare/{shareToken}', 'verb' => 'GET', 'requirements' => $requirementsShare],
|
||||
],
|
||||
];
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
$requirements = [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
];
|
||||
|
||||
return [
|
||||
'ocs' => [
|
||||
/** @see \OCA\Talk\Controller\GuestController::setDisplayName() */
|
||||
['name' => 'Guest#setDisplayName', 'url' => '/api/{apiVersion}/guest/{token}/name', 'verb' => 'POST', 'requirements' => $requirements],
|
||||
],
|
||||
];
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
$requirements = [
|
||||
'apiVersion' => '(v1)',
|
||||
];
|
||||
|
||||
return [
|
||||
'ocs' => [
|
||||
/** @see \OCA\Talk\Controller\HostedSignalingServerController::requestTrial() */
|
||||
['name' => 'HostedSignalingServer#requestTrial', 'url' => '/api/{apiVersion}/hostedsignalingserver/requesttrial', 'verb' => 'POST', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\HostedSignalingServerController::auth() */
|
||||
['name' => 'HostedSignalingServer#auth', 'url' => '/api/{apiVersion}/hostedsignalingserver/auth', 'verb' => 'POST', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\HostedSignalingServerController::deleteAccount() */
|
||||
['name' => 'HostedSignalingServer#deleteAccount', 'url' => '/api/{apiVersion}/hostedsignalingserver/delete', 'verb' => 'DELETE', 'requirements' => $requirements],
|
||||
],
|
||||
];
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
$requirements = [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
];
|
||||
|
||||
return [
|
||||
'ocs' => [
|
||||
/** @see \OCA\Talk\Controller\MatterbridgeController::getBridgeOfRoom() */
|
||||
['name' => 'Matterbridge#getBridgeOfRoom', 'url' => '/api/{apiVersion}/bridge/{token}', 'verb' => 'GET', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\MatterbridgeController::getBridgeProcessState() */
|
||||
['name' => 'Matterbridge#getBridgeProcessState', 'url' => '/api/{apiVersion}/bridge/{token}/process', 'verb' => 'GET', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\MatterbridgeController::editBridgeOfRoom() */
|
||||
['name' => 'Matterbridge#editBridgeOfRoom', 'url' => '/api/{apiVersion}/bridge/{token}', 'verb' => 'PUT', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\MatterbridgeController::deleteBridgeOfRoom() */
|
||||
['name' => 'Matterbridge#deleteBridgeOfRoom', 'url' => '/api/{apiVersion}/bridge/{token}', 'verb' => 'DELETE', 'requirements' => $requirements],
|
||||
],
|
||||
];
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
$requirements = [
|
||||
'apiVersion' => '(v1)',
|
||||
];
|
||||
|
||||
return [
|
||||
'ocs' => [
|
||||
/** @see \OCA\Talk\Controller\MatterbridgeSettingsController::stopAllBridges() */
|
||||
['name' => 'MatterbridgeSettings#stopAllBridges', 'url' => '/api/{apiVersion}/bridge', 'verb' => 'DELETE', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\MatterbridgeSettingsController::getMatterbridgeVersion() */
|
||||
['name' => 'MatterbridgeSettings#getMatterbridgeVersion', 'url' => '/api/{apiVersion}/bridge/version', 'verb' => 'GET', 'requirements' => $requirements],
|
||||
],
|
||||
];
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
$requirements = [
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
];
|
||||
|
||||
return [
|
||||
'routes' => [
|
||||
/** @see \OCA\Talk\Controller\PageController::index() */
|
||||
['name' => 'Page#index', 'url' => '/', 'verb' => 'GET'],
|
||||
/** @see \OCA\Talk\Controller\PageController::notFound() */
|
||||
['name' => 'Page#notFound', 'url' => '/not-found', 'verb' => 'GET'],
|
||||
/** @see \OCA\Talk\Controller\PageController::duplicateSession() */
|
||||
['name' => 'Page#duplicateSession', 'url' => '/duplicate-session', 'verb' => 'GET'],
|
||||
/** @see \OCA\Talk\Controller\PageController::showCall() */
|
||||
['name' => 'Page#showCall', 'url' => '/call/{token}', 'root' => '', 'verb' => 'GET', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\PageController::authenticatePassword() */
|
||||
['name' => 'Page#authenticatePassword', 'url' => '/call/{token}', 'root' => '', 'verb' => 'POST', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\PageController::recording() */
|
||||
['name' => 'Page#recording', 'url' => '/call/{token}/recording', 'root' => '', 'verb' => 'GET', 'requirements' => $requirements],
|
||||
],
|
||||
];
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
$requirements = [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
];
|
||||
|
||||
$requirementsWithPollId = [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
'pollId' => '\d+',
|
||||
];
|
||||
|
||||
return [
|
||||
'ocs' => [
|
||||
/** @see \OCA\Talk\Controller\PollController::createPoll() */
|
||||
['name' => 'Poll#createPoll', 'url' => '/api/{apiVersion}/poll/{token}', 'verb' => 'POST', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\PollController::updateDraftPoll() */
|
||||
['name' => 'Poll#updateDraftPoll', 'url' => '/api/{apiVersion}/poll/{token}/draft/{pollId}', 'verb' => 'POST', 'requirements' => $requirementsWithPollId],
|
||||
/** @see \OCA\Talk\Controller\PollController::getAllDraftPolls() */
|
||||
['name' => 'Poll#getAllDraftPolls', 'url' => '/api/{apiVersion}/poll/{token}/drafts', 'verb' => 'GET', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\PollController::showPoll() */
|
||||
['name' => 'Poll#showPoll', 'url' => '/api/{apiVersion}/poll/{token}/{pollId}', 'verb' => 'GET', 'requirements' => $requirementsWithPollId],
|
||||
/** @see \OCA\Talk\Controller\PollController::votePoll() */
|
||||
['name' => 'Poll#votePoll', 'url' => '/api/{apiVersion}/poll/{token}/{pollId}', 'verb' => 'POST', 'requirements' => $requirementsWithPollId],
|
||||
/** @see \OCA\Talk\Controller\PollController::closePoll() */
|
||||
['name' => 'Poll#closePoll', 'url' => '/api/{apiVersion}/poll/{token}/{pollId}', 'verb' => 'DELETE', 'requirements' => $requirementsWithPollId],
|
||||
],
|
||||
];
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
$requirements = [
|
||||
'apiVersion' => '(v1)',
|
||||
];
|
||||
|
||||
return [
|
||||
'ocs' => [
|
||||
/** @see \OCA\Talk\Controller\PublicShareAuthController::createRoom() */
|
||||
['name' => 'PublicShareAuth#createRoom', 'url' => '/api/{apiVersion}/publicshareauth', 'verb' => 'POST', 'requirements' => $requirements],
|
||||
],
|
||||
];
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
$requirements = [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
'messageId' => '[0-9]+',
|
||||
];
|
||||
|
||||
return [
|
||||
'ocs' => [
|
||||
/** @see \OCA\Talk\Controller\ReactionController::react() */
|
||||
['name' => 'Reaction#react', 'url' => '/api/{apiVersion}/reaction/{token}/{messageId}', 'verb' => 'POST', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\ReactionController::delete() */
|
||||
['name' => 'Reaction#delete', 'url' => '/api/{apiVersion}/reaction/{token}/{messageId}', 'verb' => 'DELETE', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\ReactionController::getReactions() */
|
||||
['name' => 'Reaction#getReactions', 'url' => '/api/{apiVersion}/reaction/{token}/{messageId}', 'verb' => 'GET', 'requirements' => $requirements],
|
||||
],
|
||||
];
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
$requirements = [
|
||||
'apiVersion' => '(v1)',
|
||||
];
|
||||
|
||||
$requirementsWithToken = [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
];
|
||||
|
||||
return [
|
||||
'ocs' => [
|
||||
/** @see \OCA\Talk\Controller\RecordingController::getWelcomeMessage() */
|
||||
['name' => 'Recording#getWelcomeMessage', 'url' => '/api/{apiVersion}/recording/welcome/{serverId}', 'verb' => 'GET', 'requirements' => array_merge($requirements, [
|
||||
'serverId' => '\d+',
|
||||
])],
|
||||
/** @see \OCA\Talk\Controller\RecordingController::backend() */
|
||||
['name' => 'Recording#backend', 'url' => '/api/{apiVersion}/recording/backend', 'verb' => 'POST', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\RecordingController::start() */
|
||||
['name' => 'Recording#start', 'url' => '/api/{apiVersion}/recording/{token}', 'verb' => 'POST', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RecordingController::stop() */
|
||||
['name' => 'Recording#stop', 'url' => '/api/{apiVersion}/recording/{token}', 'verb' => 'DELETE', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RecordingController::store() */
|
||||
['name' => 'Recording#store', 'url' => '/api/{apiVersion}/recording/{token}/store', 'verb' => 'POST', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RecordingController::notificationDismiss() */
|
||||
['name' => 'Recording#notificationDismiss', 'url' => '/api/{apiVersion}/recording/{token}/notification', 'verb' => 'DELETE', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RecordingController::shareToChat() */
|
||||
['name' => 'Recording#shareToChat', 'url' => '/api/{apiVersion}/recording/{token}/share-chat', 'verb' => 'POST', 'requirements' => $requirementsWithToken],
|
||||
],
|
||||
];
|
||||
|
|
@ -1,135 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
$requirements = [
|
||||
'apiVersion' => '(v4)',
|
||||
];
|
||||
|
||||
$requirementsWithToken = [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
];
|
||||
|
||||
return [
|
||||
'ocs' => [
|
||||
/** @see \OCA\Talk\Controller\RoomController::getRooms() */
|
||||
['name' => 'Room#getRooms', 'url' => '/api/{apiVersion}/room', 'verb' => 'GET', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\RoomController::getListedRooms() */
|
||||
['name' => 'Room#getListedRooms', 'url' => '/api/{apiVersion}/listed-room', 'verb' => 'GET', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\RoomController::createRoom() */
|
||||
['name' => 'Room#createRoom', 'url' => '/api/{apiVersion}/room', 'verb' => 'POST', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\RoomController::getNoteToSelfConversation() */
|
||||
['name' => 'Room#getNoteToSelfConversation', 'url' => '/api/{apiVersion}/room/note-to-self', 'verb' => 'GET', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\RoomController::getSingleRoom() */
|
||||
['name' => 'Room#getSingleRoom', 'url' => '/api/{apiVersion}/room/{token}', 'verb' => 'GET', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::getBreakoutRooms() */
|
||||
['name' => 'Room#getBreakoutRooms', 'url' => '/api/{apiVersion}/room/{token}/breakout-rooms', 'verb' => 'GET', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::renameRoom() */
|
||||
['name' => 'Room#renameRoom', 'url' => '/api/{apiVersion}/room/{token}', 'verb' => 'PUT', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::deleteRoom() */
|
||||
['name' => 'Room#deleteRoom', 'url' => '/api/{apiVersion}/room/{token}', 'verb' => 'DELETE', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::unbindRoomFromObject() */
|
||||
['name' => 'Room#unbindRoomFromObject', 'url' => '/api/{apiVersion}/room/{token}/object', 'verb' => 'DELETE', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::makePublic() */
|
||||
['name' => 'Room#makePublic', 'url' => '/api/{apiVersion}/room/{token}/public', 'verb' => 'POST', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::makePrivate() */
|
||||
['name' => 'Room#makePrivate', 'url' => '/api/{apiVersion}/room/{token}/public', 'verb' => 'DELETE', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::setDescription() */
|
||||
['name' => 'Room#setDescription', 'url' => '/api/{apiVersion}/room/{token}/description', 'verb' => 'PUT', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::setReadOnly() */
|
||||
['name' => 'Room#setReadOnly', 'url' => '/api/{apiVersion}/room/{token}/read-only', 'verb' => 'PUT', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::setListable() */
|
||||
['name' => 'Room#setListable', 'url' => '/api/{apiVersion}/room/{token}/listable', 'verb' => 'PUT', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::setPassword() */
|
||||
['name' => 'Room#setPassword', 'url' => '/api/{apiVersion}/room/{token}/password', 'verb' => 'PUT', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::setPermissions() */
|
||||
['name' => 'Room#setPermissions', 'url' => '/api/{apiVersion}/room/{token}/permissions/{mode}', 'verb' => 'PUT', 'requirements' => array_merge($requirementsWithToken, [
|
||||
'mode' => '(call|default)',
|
||||
])],
|
||||
/** @see \OCA\Talk\Controller\RoomController::getParticipants() */
|
||||
['name' => 'Room#getParticipants', 'url' => '/api/{apiVersion}/room/{token}/participants', 'verb' => 'GET', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::getBreakoutRoomParticipants() */
|
||||
['name' => 'Room#getBreakoutRoomParticipants', 'url' => '/api/{apiVersion}/room/{token}/breakout-rooms/participants', 'verb' => 'GET', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::addParticipantToRoom() */
|
||||
['name' => 'Room#addParticipantToRoom', 'url' => '/api/{apiVersion}/room/{token}/participants', 'verb' => 'POST', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::removeSelfFromRoom() */
|
||||
['name' => 'Room#removeSelfFromRoom', 'url' => '/api/{apiVersion}/room/{token}/participants/self', 'verb' => 'DELETE', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::removeAttendeeFromRoom() */
|
||||
['name' => 'Room#removeAttendeeFromRoom', 'url' => '/api/{apiVersion}/room/{token}/attendees', 'verb' => 'DELETE', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::setAttendeePermissions() */
|
||||
['name' => 'Room#setAttendeePermissions', 'url' => '/api/{apiVersion}/room/{token}/attendees/permissions', 'verb' => 'PUT', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::setAllAttendeesPermissions() */
|
||||
['name' => 'Room#setAllAttendeesPermissions', 'url' => '/api/{apiVersion}/room/{token}/attendees/permissions/all', 'verb' => 'PUT', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::joinRoom() */
|
||||
['name' => 'Room#joinRoom', 'url' => '/api/{apiVersion}/room/{token}/participants/active', 'verb' => 'POST', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::joinFederatedRoom() */
|
||||
['name' => 'Room#joinFederatedRoom', 'url' => '/api/{apiVersion}/room/{token}/federation/active', 'verb' => 'POST', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::resendInvitations() */
|
||||
['name' => 'Room#resendInvitations', 'url' => '/api/{apiVersion}/room/{token}/participants/resend-invitations', 'verb' => 'POST', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::leaveRoom() */
|
||||
['name' => 'Room#leaveRoom', 'url' => '/api/{apiVersion}/room/{token}/participants/active', 'verb' => 'DELETE', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::leaveFederatedRoom() */
|
||||
['name' => 'Room#leaveFederatedRoom', 'url' => '/api/{apiVersion}/room/{token}/federation/active', 'verb' => 'DELETE', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::setSessionState() */
|
||||
['name' => 'Room#setSessionState', 'url' => '/api/{apiVersion}/room/{token}/participants/state', 'verb' => 'PUT', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::promoteModerator() */
|
||||
['name' => 'Room#promoteModerator', 'url' => '/api/{apiVersion}/room/{token}/moderators', 'verb' => 'POST', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::demoteModerator() */
|
||||
['name' => 'Room#demoteModerator', 'url' => '/api/{apiVersion}/room/{token}/moderators', 'verb' => 'DELETE', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::addToFavorites() */
|
||||
['name' => 'Room#addToFavorites', 'url' => '/api/{apiVersion}/room/{token}/favorite', 'verb' => 'POST', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::removeFromFavorites() */
|
||||
['name' => 'Room#removeFromFavorites', 'url' => '/api/{apiVersion}/room/{token}/favorite', 'verb' => 'DELETE', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::markConversationAsImportant() */
|
||||
['name' => 'Room#markConversationAsImportant', 'url' => '/api/{apiVersion}/room/{token}/important', 'verb' => 'POST', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::markConversationAsUnimportant() */
|
||||
['name' => 'Room#markConversationAsUnimportant', 'url' => '/api/{apiVersion}/room/{token}/important', 'verb' => 'DELETE', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::markConversationAsSensitive() */
|
||||
['name' => 'Room#markConversationAsSensitive', 'url' => '/api/{apiVersion}/room/{token}/sensitive', 'verb' => 'POST', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::markConversationAsInsensitive() */
|
||||
['name' => 'Room#markConversationAsInsensitive', 'url' => '/api/{apiVersion}/room/{token}/sensitive', 'verb' => 'DELETE', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::verifyDialInPin() */
|
||||
['name' => 'Room#verifyDialInPin', 'url' => '/api/{apiVersion}/room/{token}/pin/{pin}', 'verb' => 'GET', 'requirements' => array_merge($requirementsWithToken, [
|
||||
'pin' => '\d{7,32}',
|
||||
]), 'postfix' => 'deprecated'],
|
||||
/** @see \OCA\Talk\Controller\RoomController::verifyDialInPin() */
|
||||
['name' => 'Room#verifyDialInPin', 'url' => '/api/{apiVersion}/room/{token}/verify-dialin', 'verb' => 'POST', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::verifyDialOutNumber() */
|
||||
['name' => 'Room#verifyDialOutNumber', 'url' => '/api/{apiVersion}/room/{token}/verify-dialout', 'verb' => 'POST', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::directDialIn() */
|
||||
['name' => 'Room#directDialIn', 'url' => '/api/{apiVersion}/room/direct-dial-in', 'verb' => 'POST', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\RoomController::createGuestByDialIn() */
|
||||
['name' => 'Room#createGuestByDialIn', 'url' => '/api/{apiVersion}/room/{token}/open-dial-in', 'verb' => 'POST', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::rejectedDialOutRequest() */
|
||||
['name' => 'Room#rejectedDialOutRequest', 'url' => '/api/{apiVersion}/room/{token}/rejected-dialout', 'verb' => 'DELETE', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::setNotificationLevel() */
|
||||
['name' => 'Room#setNotificationLevel', 'url' => '/api/{apiVersion}/room/{token}/notify', 'verb' => 'POST', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::setNotificationCalls() */
|
||||
['name' => 'Room#setNotificationCalls', 'url' => '/api/{apiVersion}/room/{token}/notify-calls', 'verb' => 'POST', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::setLobby() */
|
||||
['name' => 'Room#setLobby', 'url' => '/api/{apiVersion}/room/{token}/webinar/lobby', 'verb' => 'PUT', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::setSIPEnabled() */
|
||||
['name' => 'Room#setSIPEnabled', 'url' => '/api/{apiVersion}/room/{token}/webinar/sip', 'verb' => 'PUT', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::setRecordingConsent() */
|
||||
['name' => 'Room#setRecordingConsent', 'url' => '/api/{apiVersion}/room/{token}/recording-consent', 'verb' => 'PUT', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::setMessageExpiration() */
|
||||
['name' => 'Room#setMessageExpiration', 'url' => '/api/{apiVersion}/room/{token}/message-expiration', 'verb' => 'POST', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::getCapabilities() */
|
||||
['name' => 'Room#getCapabilities', 'url' => '/api/{apiVersion}/room/{token}/capabilities', 'verb' => 'GET', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::setMentionPermissions() */
|
||||
['name' => 'Room#setMentionPermissions', 'url' => '/api/{apiVersion}/room/{token}/mention-permissions', 'verb' => 'PUT', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::archiveConversation() */
|
||||
['name' => 'Room#archiveConversation', 'url' => '/api/{apiVersion}/room/{token}/archive', 'verb' => 'POST', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::unarchiveConversation() */
|
||||
['name' => 'Room#unarchiveConversation', 'url' => '/api/{apiVersion}/room/{token}/archive', 'verb' => 'DELETE', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::importEmailsAsParticipants() */
|
||||
['name' => 'Room#importEmailsAsParticipants', 'url' => '/api/{apiVersion}/room/{token}/import-emails', 'verb' => 'POST', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\RoomController::scheduleMeeting() */
|
||||
['name' => 'Room#scheduleMeeting', 'url' => '/api/{apiVersion}/room/{token}/meeting', 'verb' => 'POST', 'requirements' => $requirementsWithToken],
|
||||
],
|
||||
];
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
$requirements = [
|
||||
'apiVersion' => '(v1)',
|
||||
];
|
||||
|
||||
return [
|
||||
'ocs' => [
|
||||
/** @see \OCA\Talk\Controller\SettingsController::setSIPSettings() */
|
||||
['name' => 'Settings#setSIPSettings', 'url' => '/api/{apiVersion}/settings/sip', 'verb' => 'POST', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\SettingsController::setUserSetting() */
|
||||
['name' => 'Settings#setUserSetting', 'url' => '/api/{apiVersion}/settings/user', 'verb' => 'POST', 'requirements' => $requirements],
|
||||
],
|
||||
];
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
$requirements = [
|
||||
'apiVersion' => '(v3)',
|
||||
];
|
||||
|
||||
|
||||
$requirementsWithToken = [
|
||||
'apiVersion' => '(v3)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
];
|
||||
|
||||
return [
|
||||
'ocs' => [
|
||||
/** @see \OCA\Talk\Controller\SignalingController::getSettings() */
|
||||
['name' => 'Signaling#getSettings', 'url' => '/api/{apiVersion}/signaling/settings', 'verb' => 'GET', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\SignalingController::getWelcomeMessage() */
|
||||
['name' => 'Signaling#getWelcomeMessage', 'url' => '/api/{apiVersion}/signaling/welcome/{serverId}', 'verb' => 'GET', 'requirements' => array_merge($requirements, [
|
||||
'serverId' => '\d+',
|
||||
])],
|
||||
/** @see \OCA\Talk\Controller\SignalingController::backend() */
|
||||
['name' => 'Signaling#backend', 'url' => '/api/{apiVersion}/signaling/backend', 'verb' => 'POST', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\SignalingController::sendMessages() */
|
||||
['name' => 'Signaling#sendMessages', 'url' => '/api/{apiVersion}/signaling/{token}', 'verb' => 'POST', 'requirements' => $requirementsWithToken],
|
||||
/** @see \OCA\Talk\Controller\SignalingController::pullMessages() */
|
||||
['name' => 'Signaling#pullMessages', 'url' => '/api/{apiVersion}/signaling/{token}', 'verb' => 'GET', 'requirements' => $requirementsWithToken],
|
||||
],
|
||||
];
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
return [
|
||||
'ocs' => [
|
||||
/** @see \OCA\Talk\Controller\TempAvatarController::postAvatar() */
|
||||
['name' => 'TempAvatar#postAvatar', 'url' => '/temp-user-avatar', 'verb' => 'POST'],
|
||||
/** @see \OCA\Talk\Controller\TempAvatarController::deleteAvatar() */
|
||||
['name' => 'TempAvatar#deleteAvatar', 'url' => '/temp-user-avatar', 'verb' => 'DELETE'],
|
||||
],
|
||||
];
|
||||
|
|
@ -20,6 +20,7 @@ use OCA\Talk\ResponseDefinitions;
|
|||
use OCA\Talk\Service\AvatarService;
|
||||
use OCA\Talk\Service\RoomFormatter;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\Attribute\ApiRoute;
|
||||
use OCP\AppFramework\Http\Attribute\BruteForceProtection;
|
||||
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
||||
|
|
@ -64,6 +65,10 @@ class AvatarController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[PublicPage]
|
||||
#[RequireModeratorParticipant]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/room/{token}/avatar', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function uploadAvatar(): DataResponse {
|
||||
try {
|
||||
$file = $this->request->getUploadedFile('file');
|
||||
|
|
@ -97,6 +102,10 @@ class AvatarController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[PublicPage]
|
||||
#[RequireModeratorParticipant]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/room/{token}/avatar/emoji', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function emojiAvatar(string $emoji, ?string $color): DataResponse {
|
||||
try {
|
||||
$this->avatarService->setAvatarFromEmoji($this->getRoom(), $emoji, $color);
|
||||
|
|
@ -131,6 +140,10 @@ class AvatarController extends AEnvironmentAwareOCSController {
|
|||
#[AllowWithoutParticipantWhenPendingInvitation]
|
||||
#[RequireParticipantOrLoggedInAndListedConversation]
|
||||
#[RequestHeader(name: 'x-nextcloud-federation', description: 'Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request', indirect: true)]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/room/{token}/avatar', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function getAvatar(bool $darkTheme = false): FileDisplayResponse {
|
||||
// Cache for 1 day
|
||||
$cacheDuration = 60 * 60 * 24;
|
||||
|
|
@ -165,6 +178,10 @@ class AvatarController extends AEnvironmentAwareOCSController {
|
|||
#[AllowWithoutParticipantWhenPendingInvitation]
|
||||
#[RequireParticipantOrLoggedInAndListedConversation]
|
||||
#[RequestHeader(name: 'x-nextcloud-federation', description: 'Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request', indirect: true)]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/room/{token}/avatar/dark', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function getAvatarDark(): FileDisplayResponse {
|
||||
return $this->getAvatar(true);
|
||||
}
|
||||
|
|
@ -185,6 +202,10 @@ class AvatarController extends AEnvironmentAwareOCSController {
|
|||
#[NoAdminRequired]
|
||||
#[NoCSRFRequired]
|
||||
#[RequestHeader(name: 'x-nextcloud-federation', description: 'Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request', indirect: true)]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/proxy/new/user-avatar/{size}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'size' => '(64|512)',
|
||||
])]
|
||||
public function getUserProxyAvatarWithoutRoom(int $size, string $cloudId, bool $darkTheme = false): FileDisplayResponse {
|
||||
return $this->getUserProxyAvatar($size, $cloudId, $darkTheme);
|
||||
}
|
||||
|
|
@ -204,6 +225,10 @@ class AvatarController extends AEnvironmentAwareOCSController {
|
|||
#[NoAdminRequired]
|
||||
#[NoCSRFRequired]
|
||||
#[RequestHeader(name: 'x-nextcloud-federation', description: 'Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request', indirect: true)]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/proxy/new/user-avatar/{size}/dark', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'size' => '(64|512)',
|
||||
])]
|
||||
public function getUserProxyAvatarDarkWithoutRoom(int $size, string $cloudId): FileDisplayResponse {
|
||||
return $this->getUserProxyAvatar($size, $cloudId, true);
|
||||
}
|
||||
|
|
@ -227,6 +252,11 @@ class AvatarController extends AEnvironmentAwareOCSController {
|
|||
#[AllowWithoutParticipantWhenPendingInvitation]
|
||||
#[RequireLoggedInParticipant]
|
||||
#[RequestHeader(name: 'x-nextcloud-federation', description: 'Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request', indirect: true)]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/proxy/{token}/user-avatar/{size}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
'size' => '(64|512)',
|
||||
])]
|
||||
public function getUserProxyAvatar(int $size, string $cloudId, bool $darkTheme = false): FileDisplayResponse {
|
||||
try {
|
||||
$resolvedCloudId = $this->cloudIdManager->resolveCloudId($cloudId);
|
||||
|
|
@ -288,6 +318,11 @@ class AvatarController extends AEnvironmentAwareOCSController {
|
|||
#[AllowWithoutParticipantWhenPendingInvitation]
|
||||
#[RequireLoggedInParticipant]
|
||||
#[RequestHeader(name: 'x-nextcloud-federation', description: 'Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request', indirect: true)]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/proxy/{token}/user-avatar/{size}/dark', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
'size' => '(64|512)',
|
||||
])]
|
||||
public function getUserProxyAvatarDark(int $size, string $cloudId): FileDisplayResponse {
|
||||
return $this->getUserProxyAvatar($size, $cloudId, true);
|
||||
}
|
||||
|
|
@ -321,6 +356,10 @@ class AvatarController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[PublicPage]
|
||||
#[RequireModeratorParticipant]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/room/{token}/avatar', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function deleteAvatar(): DataResponse {
|
||||
$this->avatarService->deleteAvatar($this->getRoom());
|
||||
return new DataResponse($this->roomFormatter->formatRoom(
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ use OCA\Talk\Model\Ban;
|
|||
use OCA\Talk\ResponseDefinitions;
|
||||
use OCA\Talk\Service\BanService;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\Attribute\ApiRoute;
|
||||
use OCP\AppFramework\Http\Attribute\PublicPage;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
use OCP\AppFramework\Utility\ITimeFactory;
|
||||
|
|
@ -47,6 +48,10 @@ class BanController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[PublicPage]
|
||||
#[RequireModeratorParticipant]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/ban/{token}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function banActor(string $actorType, string $actorId, string $internalNote = ''): DataResponse {
|
||||
try {
|
||||
$moderator = $this->participant->getAttendee();
|
||||
|
|
@ -83,6 +88,10 @@ class BanController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[PublicPage]
|
||||
#[RequireModeratorParticipant]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/ban/{token}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function listBans(): DataResponse {
|
||||
$bans = $this->banService->getBansForRoom($this->room->getId());
|
||||
$result = array_map(static fn (Ban $ban): array => $ban->jsonSerialize(), $bans);
|
||||
|
|
@ -101,6 +110,11 @@ class BanController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[PublicPage]
|
||||
#[RequireModeratorParticipant]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/ban/{token}/{banId}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
'banId' => '[0-9]{1,64}',
|
||||
])]
|
||||
public function unbanActor(int $banId): DataResponse {
|
||||
$this->banService->findAndDeleteBanByIdForRoom($banId, $this->room->getId());
|
||||
return new DataResponse(null, Http::STATUS_OK);
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ use OCA\Talk\Service\ChecksumVerificationService;
|
|||
use OCA\Talk\Service\ParticipantService;
|
||||
use OCP\AppFramework\Db\DoesNotExistException;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\Attribute\ApiRoute;
|
||||
use OCP\AppFramework\Http\Attribute\BruteForceProtection;
|
||||
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||
use OCP\AppFramework\Http\Attribute\OpenAPI;
|
||||
|
|
@ -133,6 +134,10 @@ class BotController extends AEnvironmentAwareOCSController {
|
|||
#[BruteForceProtection(action: 'bot')]
|
||||
#[OpenAPI(scope: 'bots')]
|
||||
#[PublicPage]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/bot/{token}/message', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function sendMessage(string $token, string $message, string $referenceId = '', int $replyTo = 0, bool $silent = false): DataResponse {
|
||||
if (trim($message) === '') {
|
||||
return new DataResponse(null, Http::STATUS_BAD_REQUEST);
|
||||
|
|
@ -196,6 +201,11 @@ class BotController extends AEnvironmentAwareOCSController {
|
|||
#[BruteForceProtection(action: 'bot')]
|
||||
#[OpenAPI(scope: 'bots')]
|
||||
#[PublicPage]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/bot/{token}/reaction/{messageId}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
'messageId' => '[0-9]+',
|
||||
])]
|
||||
public function react(string $token, int $messageId, string $reaction): DataResponse {
|
||||
try {
|
||||
$bot = $this->getBotFromHeaders($token, $reaction);
|
||||
|
|
@ -250,6 +260,11 @@ class BotController extends AEnvironmentAwareOCSController {
|
|||
#[BruteForceProtection(action: 'bot')]
|
||||
#[OpenAPI(scope: 'bots')]
|
||||
#[PublicPage]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/bot/{token}/reaction/{messageId}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
'messageId' => '[0-9]+',
|
||||
])]
|
||||
public function deleteReaction(string $token, int $messageId, string $reaction): DataResponse {
|
||||
try {
|
||||
$bot = $this->getBotFromHeaders($token, $reaction);
|
||||
|
|
@ -294,6 +309,9 @@ class BotController extends AEnvironmentAwareOCSController {
|
|||
* 200: Bot list returned
|
||||
*/
|
||||
#[OpenAPI(scope: OpenAPI::SCOPE_ADMINISTRATION, tags: ['settings'])]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/bot/admin', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
])]
|
||||
public function adminListBots(): DataResponse {
|
||||
$data = [];
|
||||
$bots = $this->botServerMapper->getAllBots();
|
||||
|
|
@ -315,6 +333,10 @@ class BotController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireLoggedInModeratorParticipant]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/bot/{token}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function listBots(): DataResponse {
|
||||
$alreadyInstalled = array_map(static function (BotConversation $bot): int {
|
||||
return $bot->getBotId();
|
||||
|
|
@ -344,6 +366,11 @@ class BotController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireLoggedInModeratorParticipant]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/bot/{token}/{botId}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
'botId' => '[0-9]+',
|
||||
])]
|
||||
public function enableBot(int $botId): DataResponse {
|
||||
if ($this->room->isFederatedConversation() || $this->room->getType() === ROOM::TYPE_ONE_TO_ONE_FORMER) {
|
||||
return new DataResponse([
|
||||
|
|
@ -397,6 +424,11 @@ class BotController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireLoggedInModeratorParticipant]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/bot/{token}/{botId}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
'botId' => '[0-9]+',
|
||||
])]
|
||||
public function disableBot(int $botId): DataResponse {
|
||||
try {
|
||||
$bot = $this->botServerMapper->findById($botId);
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ use OCA\Talk\Service\BreakoutRoomService;
|
|||
use OCA\Talk\Service\ParticipantService;
|
||||
use OCA\Talk\Service\RoomFormatter;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\Attribute\ApiRoute;
|
||||
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
use OCP\Comments\MessageTooLongException;
|
||||
|
|
@ -52,6 +53,10 @@ class BreakoutRoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireLoggedInModeratorParticipant]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/breakout-rooms/{token}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function configureBreakoutRooms(int $mode, int $amount, string $attendeeMap = '[]'): DataResponse {
|
||||
try {
|
||||
$rooms = $this->breakoutRoomService->setupBreakoutRooms($this->room, $mode, $amount, $attendeeMap);
|
||||
|
|
@ -72,6 +77,10 @@ class BreakoutRoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireLoggedInModeratorParticipant]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/breakout-rooms/{token}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function removeBreakoutRooms(): DataResponse {
|
||||
$this->breakoutRoomService->removeBreakoutRooms($this->room);
|
||||
|
||||
|
|
@ -95,6 +104,10 @@ class BreakoutRoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireLoggedInModeratorParticipant]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/breakout-rooms/{token}/broadcast', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function broadcastChatMessage(string $message): DataResponse {
|
||||
try {
|
||||
$rooms = $this->breakoutRoomService->broadcastChatMessage($this->room, $this->participant, $message);
|
||||
|
|
@ -118,6 +131,10 @@ class BreakoutRoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireLoggedInModeratorParticipant]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/breakout-rooms/{token}/attendees', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function applyAttendeeMap(string $attendeeMap): DataResponse {
|
||||
try {
|
||||
$rooms = $this->breakoutRoomService->applyAttendeeMap($this->room, $attendeeMap);
|
||||
|
|
@ -138,6 +155,10 @@ class BreakoutRoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireLoggedInParticipant]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/breakout-rooms/{token}/request-assistance', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function requestAssistance(): DataResponse {
|
||||
try {
|
||||
$this->breakoutRoomService->requestAssistance($this->room);
|
||||
|
|
@ -163,6 +184,10 @@ class BreakoutRoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireLoggedInParticipant]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/breakout-rooms/{token}/request-assistance', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function resetRequestForAssistance(): DataResponse {
|
||||
try {
|
||||
$this->breakoutRoomService->resetRequestForAssistance($this->room);
|
||||
|
|
@ -188,6 +213,10 @@ class BreakoutRoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireLoggedInModeratorParticipant]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/breakout-rooms/{token}/rooms', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function startBreakoutRooms(): DataResponse {
|
||||
try {
|
||||
$rooms = $this->breakoutRoomService->startBreakoutRooms($this->room);
|
||||
|
|
@ -209,6 +238,10 @@ class BreakoutRoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireLoggedInModeratorParticipant]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/breakout-rooms/{token}/rooms', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function stopBreakoutRooms(): DataResponse {
|
||||
try {
|
||||
$rooms = $this->breakoutRoomService->stopBreakoutRooms($this->room);
|
||||
|
|
@ -231,6 +264,10 @@ class BreakoutRoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireLoggedInParticipant]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/breakout-rooms/{token}/switch', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function switchBreakoutRoom(string $target): DataResponse {
|
||||
try {
|
||||
$room = $this->breakoutRoomService->switchBreakoutRoom($this->room, $this->participant, $target);
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ use OCA\Talk\Middleware\Attribute\RequireParticipant;
|
|||
use OCA\Talk\ResponseDefinitions;
|
||||
use OCA\Talk\Service\CalendarIntegrationService;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\Attribute\ApiRoute;
|
||||
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
use OCP\IRequest;
|
||||
|
|
@ -46,6 +47,9 @@ class CalendarIntegrationController extends AEnvironmentAwareOCSController {
|
|||
* 200: A list of dashboard entries or an empty array
|
||||
*/
|
||||
#[NoAdminRequired]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/dashboard/events', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
])]
|
||||
public function getDashboardEvents(): DataResponse {
|
||||
$userId = $this->userSession->getUser()?->getUID();
|
||||
$entries = $this->service->getDashboardEvents($userId);
|
||||
|
|
@ -65,6 +69,10 @@ class CalendarIntegrationController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireParticipant]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/room/{token}/mutual-events', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function getMutualEvents(): DataResponse {
|
||||
$userId = $this->userSession->getUser()?->getUID();
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ use OCA\Talk\Service\RoomService;
|
|||
use OCA\Talk\Service\SIPDialOutService;
|
||||
use OCP\AppFramework\Db\DoesNotExistException;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\Attribute\ApiRoute;
|
||||
use OCP\AppFramework\Http\Attribute\BruteForceProtection;
|
||||
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
||||
use OCP\AppFramework\Http\Attribute\PublicPage;
|
||||
|
|
@ -84,6 +85,10 @@ class CallController extends AEnvironmentAwareOCSController {
|
|||
#[RequireParticipant]
|
||||
#[RequireReadWriteConversation]
|
||||
#[RequestHeader(name: 'x-nextcloud-federation', description: 'Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request', indirect: true)]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/call/{token}', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function getPeersForCall(): DataResponse {
|
||||
if ($this->room->isFederatedConversation()) {
|
||||
/** @var \OCA\Talk\Federation\Proxy\TalkV1\Controller\CallController $proxy */
|
||||
|
|
@ -137,6 +142,10 @@ class CallController extends AEnvironmentAwareOCSController {
|
|||
#[PublicPage]
|
||||
#[RequireModeratorParticipant]
|
||||
#[NoCSRFRequired]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/call/{token}/download', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function downloadParticipantsForCall(string $format = 'csv'): DataDownloadResponse|Response {
|
||||
$callStart = $this->room->getActiveSince()?->getTimestamp() ?? 0;
|
||||
if ($callStart === 0) {
|
||||
|
|
@ -231,6 +240,10 @@ class CallController extends AEnvironmentAwareOCSController {
|
|||
#[RequireParticipant]
|
||||
#[RequireReadWriteConversation]
|
||||
#[RequestHeader(name: 'x-nextcloud-federation', description: 'Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request', indirect: true)]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/call/{token}', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function joinCall(?int $flags = null, bool $silent = false, bool $recordingConsent = false, array $silentFor = []): DataResponse {
|
||||
try {
|
||||
$this->validateRecordingConsent($recordingConsent);
|
||||
|
|
@ -314,6 +327,10 @@ class CallController extends AEnvironmentAwareOCSController {
|
|||
#[RequireReadWriteConversation]
|
||||
#[BruteForceProtection(action: 'talkFederationAccess')]
|
||||
#[BruteForceProtection(action: 'talkRoomToken')]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/call/{token}/federation', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function joinFederatedCall(string $sessionId, ?int $flags = null, bool $silent = false, bool $recordingConsent = false): DataResponse {
|
||||
if (!$this->federationAuthenticator->isFederationRequest()) {
|
||||
$response = new DataResponse(null, Http::STATUS_NOT_FOUND);
|
||||
|
|
@ -353,6 +370,10 @@ class CallController extends AEnvironmentAwareOCSController {
|
|||
#[RequireParticipant]
|
||||
#[RequirePermission(permission: RequirePermission::START_CALL)]
|
||||
#[RequestHeader(name: 'x-nextcloud-federation', description: 'Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request', indirect: true)]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/call/{token}/ring/{attendeeId}', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function ringAttendee(int $attendeeId): DataResponse {
|
||||
if ($this->room->isFederatedConversation()) {
|
||||
/** @var \OCA\Talk\Federation\Proxy\TalkV1\Controller\CallController $proxy */
|
||||
|
|
@ -394,6 +415,10 @@ class CallController extends AEnvironmentAwareOCSController {
|
|||
#[RequireCallEnabled]
|
||||
#[RequireParticipant]
|
||||
#[RequirePermission(permission: RequirePermission::START_CALL)]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/call/{token}/dialout/{attendeeId}', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function sipDialOut(int $attendeeId): DataResponse {
|
||||
if ($this->room->getCallFlag() === Participant::FLAG_DISCONNECTED) {
|
||||
return new DataResponse(null, Http::STATUS_BAD_REQUEST);
|
||||
|
|
@ -454,6 +479,10 @@ class CallController extends AEnvironmentAwareOCSController {
|
|||
#[PublicPage]
|
||||
#[RequireParticipant]
|
||||
#[RequestHeader(name: 'x-nextcloud-federation', description: 'Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request', indirect: true)]
|
||||
#[ApiRoute(verb: 'PUT', url: '/api/{apiVersion}/call/{token}', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function updateCallFlags(int $flags): DataResponse {
|
||||
$session = $this->participant->getSession();
|
||||
if (!$session instanceof Session) {
|
||||
|
|
@ -498,6 +527,10 @@ class CallController extends AEnvironmentAwareOCSController {
|
|||
#[RequireFederatedParticipant]
|
||||
#[BruteForceProtection(action: 'talkFederationAccess')]
|
||||
#[BruteForceProtection(action: 'talkRoomToken')]
|
||||
#[ApiRoute(verb: 'PUT', url: '/api/{apiVersion}/call/{token}/federation', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function updateFederatedCallFlags(string $sessionId, int $flags): DataResponse {
|
||||
if (!$this->federationAuthenticator->isFederationRequest()) {
|
||||
$response = new DataResponse(null, Http::STATUS_NOT_FOUND);
|
||||
|
|
@ -527,6 +560,10 @@ class CallController extends AEnvironmentAwareOCSController {
|
|||
#[PublicPage]
|
||||
#[RequireParticipant]
|
||||
#[RequestHeader(name: 'x-nextcloud-federation', description: 'Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request', indirect: true)]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/call/{token}', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function leaveCall(bool $all = false): DataResponse {
|
||||
$session = $this->participant->getSession();
|
||||
if (!$session instanceof Session) {
|
||||
|
|
@ -578,6 +615,10 @@ class CallController extends AEnvironmentAwareOCSController {
|
|||
#[RequireFederatedParticipant]
|
||||
#[BruteForceProtection(action: 'talkFederationAccess')]
|
||||
#[BruteForceProtection(action: 'talkRoomToken')]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/call/{token}/federation', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function leaveFederatedCall(string $sessionId): DataResponse {
|
||||
if (!$this->federationAuthenticator->isFederationRequest()) {
|
||||
$response = new DataResponse(null, Http::STATUS_NOT_FOUND);
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ namespace OCA\Talk\Controller;
|
|||
|
||||
use OCA\Talk\Service\ParticipantService;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\Attribute\ApiRoute;
|
||||
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||
use OCP\AppFramework\Http\Attribute\OpenAPI;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
|
|
@ -48,6 +49,10 @@ class CallNotificationController extends OCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[OpenAPI(tags: ['call'])]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/call/{token}/notification-state', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function state(string $token): DataResponse {
|
||||
if ($this->userId === null) {
|
||||
return new DataResponse(null, Http::STATUS_FORBIDDEN);
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ namespace OCA\Talk\Controller;
|
|||
|
||||
use OCA\Talk\Service\CertificateService;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\Attribute\ApiRoute;
|
||||
use OCP\AppFramework\Http\Attribute\OpenAPI;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
use OCP\AppFramework\OCSController;
|
||||
|
|
@ -38,6 +39,9 @@ class CertificateController extends OCSController {
|
|||
* 400: Getting certificate expiration is not possible
|
||||
*/
|
||||
#[OpenAPI(scope: OpenAPI::SCOPE_ADMINISTRATION, tags: ['settings'])]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/certificate/expiration', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
])]
|
||||
public function getCertificateExpiration(string $host): DataResponse {
|
||||
try {
|
||||
$expirationInDays = $this->certificateService->getCertificateExpirationInDays($host);
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ use OCA\Talk\Model\Invitation;
|
|||
use OCA\Talk\ResponseDefinitions;
|
||||
use OCA\Talk\Service\RoomFormatter;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\Attribute\ApiRoute;
|
||||
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||
use OCP\AppFramework\Http\Attribute\OpenAPI;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
|
|
@ -79,6 +80,10 @@ class FederationController extends OCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[OpenAPI(scope: OpenAPI::SCOPE_FEDERATION)]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/federation/invitation/{id}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'id' => '[0-9]{1,64}',
|
||||
])]
|
||||
public function acceptShare(int $id): DataResponse {
|
||||
$user = $this->userSession->getUser();
|
||||
if (!$user instanceof IUser) {
|
||||
|
|
@ -116,6 +121,10 @@ class FederationController extends OCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[OpenAPI(scope: OpenAPI::SCOPE_FEDERATION)]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/federation/invitation/{id}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'id' => '[0-9]{1,64}',
|
||||
])]
|
||||
public function rejectShare(int $id): DataResponse {
|
||||
$user = $this->userSession->getUser();
|
||||
if (!$user instanceof IUser) {
|
||||
|
|
@ -142,6 +151,9 @@ class FederationController extends OCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[OpenAPI(scope: OpenAPI::SCOPE_FEDERATION)]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/federation/invitation', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
])]
|
||||
public function getShares(): DataResponse {
|
||||
$user = $this->userSession->getUser();
|
||||
if (!$user instanceof IUser) {
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ use OCA\Talk\Room;
|
|||
use OCA\Talk\Service\RoomService;
|
||||
use OCA\Talk\TalkSession;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\Attribute\ApiRoute;
|
||||
use OCP\AppFramework\Http\Attribute\BruteForceProtection;
|
||||
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||
use OCP\AppFramework\Http\Attribute\PublicPage;
|
||||
|
|
@ -83,6 +84,10 @@ class FilesIntegrationController extends OCSController {
|
|||
* 400: Rooms not allowed for shares
|
||||
*/
|
||||
#[NoAdminRequired]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/file/{fileId}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'fileId' => '.+',
|
||||
])]
|
||||
public function getRoomByFileId(string $fileId): DataResponse {
|
||||
if ($this->config->getAppValue('spreed', 'conversations_files', '1') !== '1') {
|
||||
return new DataResponse(null, Http::STATUS_BAD_REQUEST);
|
||||
|
|
@ -158,6 +163,10 @@ class FilesIntegrationController extends OCSController {
|
|||
#[PublicPage]
|
||||
#[UseSession]
|
||||
#[BruteForceProtection(action: 'shareinfo')]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/publicshare/{shareToken}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'shareToken' => '.+',
|
||||
])]
|
||||
public function getRoomByShareToken(string $shareToken): DataResponse {
|
||||
if ($this->config->getAppValue('spreed', 'conversations_files', '1') !== '1'
|
||||
|| $this->config->getAppValue('spreed', 'conversations_files_public_shares', '1') !== '1') {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ use OCA\Talk\GuestManager;
|
|||
use OCA\Talk\Middleware\Attribute\RequireParticipant;
|
||||
use OCA\Talk\Participant;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\Attribute\ApiRoute;
|
||||
use OCP\AppFramework\Http\Attribute\PublicPage;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
use OCP\IRequest;
|
||||
|
|
@ -38,6 +39,10 @@ class GuestController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[PublicPage]
|
||||
#[RequireParticipant]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/guest/{token}/name', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function setDisplayName(string $displayName): DataResponse {
|
||||
$participant = $this->getParticipant();
|
||||
if (!$participant instanceof Participant) {
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ use OCA\Talk\Exceptions\HostedSignalingServerAPIException;
|
|||
use OCA\Talk\Exceptions\HostedSignalingServerInputException;
|
||||
use OCA\Talk\Service\HostedSignalingServerService;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\Attribute\ApiRoute;
|
||||
use OCP\AppFramework\Http\Attribute\OpenAPI;
|
||||
use OCP\AppFramework\Http\Attribute\PublicPage;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
|
|
@ -48,6 +49,9 @@ class HostedSignalingServerController extends OCSController {
|
|||
*/
|
||||
#[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)]
|
||||
#[PublicPage]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/hostedsignalingserver/auth', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
])]
|
||||
public function auth(): DataResponse {
|
||||
$storedNonce = $this->config->getAppValue('spreed', 'hosted-signaling-server-nonce', '');
|
||||
// reset nonce after one request
|
||||
|
|
@ -75,6 +79,9 @@ class HostedSignalingServerController extends OCSController {
|
|||
* 200: Trial requested successfully
|
||||
* 400: Requesting trial is not possible
|
||||
*/
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/hostedsignalingserver/requesttrial', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
])]
|
||||
public function requestTrial(string $url, string $name, string $email, string $language, string $country): DataResponse {
|
||||
try {
|
||||
$registerAccountData = new RegisterAccountData(
|
||||
|
|
@ -106,6 +113,9 @@ class HostedSignalingServerController extends OCSController {
|
|||
* 204: Account deleted successfully
|
||||
* 400: Deleting account is not possible
|
||||
*/
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/hostedsignalingserver/delete', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
])]
|
||||
public function deleteAccount(): DataResponse {
|
||||
$accountId = $this->config->getAppValue('spreed', 'hosted-signaling-server-account-id');
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ use OCA\Talk\MatterbridgeManager;
|
|||
use OCA\Talk\Middleware\Attribute\RequireLoggedInModeratorParticipant;
|
||||
use OCA\Talk\ResponseDefinitions;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\Attribute\ApiRoute;
|
||||
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
use OCP\IRequest;
|
||||
|
|
@ -45,6 +46,10 @@ class MatterbridgeController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireLoggedInModeratorParticipant]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/bridge/{token}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function getBridgeOfRoom(): DataResponse {
|
||||
$pid = $this->bridgeManager->checkBridge($this->room);
|
||||
$logContent = $this->bridgeManager->getBridgeLog($this->room);
|
||||
|
|
@ -63,6 +68,10 @@ class MatterbridgeController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireLoggedInModeratorParticipant]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/bridge/{token}/process', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function getBridgeProcessState(): DataResponse {
|
||||
$state = $this->bridgeManager->getBridgeProcessState($this->room);
|
||||
return new DataResponse($state);
|
||||
|
|
@ -80,6 +89,10 @@ class MatterbridgeController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireLoggedInModeratorParticipant]
|
||||
#[ApiRoute(verb: 'PUT', url: '/api/{apiVersion}/bridge/{token}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function editBridgeOfRoom(bool $enabled, array $parts = []): DataResponse {
|
||||
try {
|
||||
$state = $this->bridgeManager->editBridgeOfRoom($this->room, $this->userId, $enabled, $parts);
|
||||
|
|
@ -99,6 +112,10 @@ class MatterbridgeController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireLoggedInModeratorParticipant]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/bridge/{token}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function deleteBridgeOfRoom(): DataResponse {
|
||||
try {
|
||||
$success = $this->bridgeManager->deleteBridgeOfRoom($this->room);
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ use OCA\Talk\Exceptions\ImpossibleToKillException;
|
|||
use OCA\Talk\Exceptions\WrongPermissionsException;
|
||||
use OCA\Talk\MatterbridgeManager;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\Attribute\ApiRoute;
|
||||
use OCP\AppFramework\Http\Attribute\OpenAPI;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
use OCP\AppFramework\OCSController;
|
||||
|
|
@ -36,6 +37,9 @@ class MatterbridgeSettingsController extends OCSController {
|
|||
* 400: Getting bridge version is not possible
|
||||
*/
|
||||
#[OpenAPI(scope: OpenAPI::SCOPE_ADMINISTRATION, tags: ['matterbridge'])]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/bridge/version', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
])]
|
||||
public function getMatterbridgeVersion(): DataResponse {
|
||||
try {
|
||||
$version = $this->bridgeManager->getCurrentVersionFromBinary();
|
||||
|
|
@ -64,6 +68,9 @@ class MatterbridgeSettingsController extends OCSController {
|
|||
* 406: Stopping all bridges is not possible
|
||||
*/
|
||||
#[OpenAPI(scope: OpenAPI::SCOPE_ADMINISTRATION, tags: ['matterbridge'])]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/bridge', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
])]
|
||||
public function stopAllBridges(): DataResponse {
|
||||
try {
|
||||
$success = $this->bridgeManager->stopAllBridges();
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ use OCP\App\IAppManager;
|
|||
use OCP\AppFramework\Controller;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\Attribute\BruteForceProtection;
|
||||
use OCP\AppFramework\Http\Attribute\FrontpageRoute;
|
||||
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
||||
use OCP\AppFramework\Http\Attribute\OpenAPI;
|
||||
use OCP\AppFramework\Http\Attribute\PublicPage;
|
||||
|
|
@ -100,6 +101,9 @@ class PageController extends Controller {
|
|||
#[PublicPage]
|
||||
#[UseSession]
|
||||
#[BruteForceProtection(action: 'talkRoomToken')]
|
||||
#[FrontpageRoute(verb: 'GET', url: '/call/{token}', requirements: [
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
], root: '')]
|
||||
public function showCall(string $token, string $email = '', string $access = ''): Response {
|
||||
// This is the entry point from the `/call/{token}` URL which is hardcoded in the server.
|
||||
return $this->pageHandler($token, email: $email, accessToken: $access);
|
||||
|
|
@ -115,6 +119,9 @@ class PageController extends Controller {
|
|||
#[PublicPage]
|
||||
#[UseSession]
|
||||
#[BruteForceProtection(action: 'talkRoomPassword')]
|
||||
#[FrontpageRoute(verb: 'POST', url: '/call/{token}', requirements: [
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
], root: '')]
|
||||
public function authenticatePassword(string $token, string $password = ''): Response {
|
||||
// This is the entry point from the `/call/{token}` URL which is hardcoded in the server.
|
||||
return $this->pageHandler($token, password: $password);
|
||||
|
|
@ -122,12 +129,14 @@ class PageController extends Controller {
|
|||
|
||||
#[NoCSRFRequired]
|
||||
#[PublicPage]
|
||||
#[FrontpageRoute(verb: 'GET', url: '/not-found')]
|
||||
public function notFound(): Response {
|
||||
return $this->pageHandler();
|
||||
}
|
||||
|
||||
#[NoCSRFRequired]
|
||||
#[PublicPage]
|
||||
#[FrontpageRoute(verb: 'GET', url: '/duplicate-session')]
|
||||
public function duplicateSession(): Response {
|
||||
return $this->pageHandler();
|
||||
}
|
||||
|
|
@ -142,6 +151,7 @@ class PageController extends Controller {
|
|||
#[PublicPage]
|
||||
#[BruteForceProtection(action: 'talkRoomToken')]
|
||||
#[UseSession]
|
||||
#[FrontpageRoute(verb: 'GET', url: '/')]
|
||||
public function index(string $token = '', string $callUser = ''): Response {
|
||||
if ($callUser !== '') {
|
||||
$token = '';
|
||||
|
|
@ -296,6 +306,9 @@ class PageController extends Controller {
|
|||
#[PublicPage]
|
||||
#[BruteForceProtection(action: 'talkRoomToken')]
|
||||
#[BruteForceProtection(action: 'talkRecordingStatus')]
|
||||
#[FrontpageRoute(verb: 'GET', url: '/call/{token}/recording', requirements: [
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
], root: '')]
|
||||
public function recording(string $token): Response {
|
||||
try {
|
||||
$room = $this->manager->getRoomByToken($token);
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ use OCA\Talk\Service\PollService;
|
|||
use OCA\Talk\Service\ThreadService;
|
||||
use OCP\AppFramework\Db\DoesNotExistException;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\Attribute\ApiRoute;
|
||||
use OCP\AppFramework\Http\Attribute\PublicPage;
|
||||
use OCP\AppFramework\Http\Attribute\RequestHeader;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
|
|
@ -78,6 +79,10 @@ class PollController extends AEnvironmentAwareOCSController {
|
|||
#[RequirePermission(permission: RequirePermission::CHAT)]
|
||||
#[RequireReadWriteConversation]
|
||||
#[RequestHeader(name: 'x-nextcloud-federation', description: 'Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request', indirect: true)]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/poll/{token}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function createPoll(string $question, array $options, int $resultMode, int $maxVotes, bool $draft = false, int $threadId = 0): DataResponse {
|
||||
if ($this->room->isFederatedConversation()) {
|
||||
/** @var \OCA\Talk\Federation\Proxy\TalkV1\Controller\PollController $proxy */
|
||||
|
|
@ -173,6 +178,11 @@ class PollController extends AEnvironmentAwareOCSController {
|
|||
#[RequirePermission(permission: RequirePermission::CHAT)]
|
||||
#[RequireReadWriteConversation]
|
||||
#[RequestHeader(name: 'x-nextcloud-federation', description: 'Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request', indirect: true)]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/poll/{token}/draft/{pollId}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
'pollId' => '\d+',
|
||||
])]
|
||||
public function updateDraftPoll(int $pollId, string $question, array $options, int $resultMode, int $maxVotes): DataResponse {
|
||||
if ($this->room->isFederatedConversation()) {
|
||||
/** @var \OCA\Talk\Federation\Proxy\TalkV1\Controller\PollController $proxy */
|
||||
|
|
@ -236,6 +246,10 @@ class PollController extends AEnvironmentAwareOCSController {
|
|||
#[PublicPage]
|
||||
#[RequireModeratorParticipant]
|
||||
#[RequestHeader(name: 'x-nextcloud-federation', description: 'Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request', indirect: true)]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/poll/{token}/drafts', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function getAllDraftPolls(): DataResponse {
|
||||
if ($this->room->isFederatedConversation()) {
|
||||
/** @var \OCA\Talk\Federation\Proxy\TalkV1\Controller\PollController $proxy */
|
||||
|
|
@ -267,6 +281,11 @@ class PollController extends AEnvironmentAwareOCSController {
|
|||
#[RequireModeratorOrNoLobby]
|
||||
#[RequireParticipant]
|
||||
#[RequestHeader(name: 'x-nextcloud-federation', description: 'Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request', indirect: true)]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/poll/{token}/{pollId}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
'pollId' => '\d+',
|
||||
])]
|
||||
public function showPoll(int $pollId): DataResponse {
|
||||
if ($this->room->isFederatedConversation()) {
|
||||
/** @var \OCA\Talk\Federation\Proxy\TalkV1\Controller\PollController $proxy */
|
||||
|
|
@ -310,6 +329,11 @@ class PollController extends AEnvironmentAwareOCSController {
|
|||
#[RequireModeratorOrNoLobby]
|
||||
#[RequireParticipant]
|
||||
#[RequestHeader(name: 'x-nextcloud-federation', description: 'Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request', indirect: true)]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/poll/{token}/{pollId}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
'pollId' => '\d+',
|
||||
])]
|
||||
public function votePoll(int $pollId, array $optionIds = []): DataResponse {
|
||||
if ($this->room->isFederatedConversation()) {
|
||||
/** @var \OCA\Talk\Federation\Proxy\TalkV1\Controller\PollController $proxy */
|
||||
|
|
@ -377,6 +401,11 @@ class PollController extends AEnvironmentAwareOCSController {
|
|||
#[RequireModeratorOrNoLobby]
|
||||
#[RequireParticipant]
|
||||
#[RequestHeader(name: 'x-nextcloud-federation', description: 'Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request', indirect: true)]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/poll/{token}/{pollId}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
'pollId' => '\d+',
|
||||
])]
|
||||
public function closePoll(int $pollId): DataResponse {
|
||||
if ($this->room->isFederatedConversation()) {
|
||||
/** @var \OCA\Talk\Federation\Proxy\TalkV1\Controller\PollController $proxy */
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ namespace OCA\Talk\Controller;
|
|||
use OCA\Talk\Room;
|
||||
use OCA\Talk\Service\RoomService;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\Attribute\ApiRoute;
|
||||
use OCP\AppFramework\Http\Attribute\OpenAPI;
|
||||
use OCP\AppFramework\Http\Attribute\PublicPage;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
|
|
@ -56,6 +57,9 @@ class PublicShareAuthController extends OCSController {
|
|||
*/
|
||||
#[PublicPage]
|
||||
#[OpenAPI(tags: ['files_integration'])]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/publicshareauth', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
])]
|
||||
public function createRoom(string $shareToken): DataResponse {
|
||||
try {
|
||||
$share = $this->shareManager->getShareByToken($shareToken);
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ use OCA\Talk\Middleware\Attribute\RequirePermission;
|
|||
use OCA\Talk\Middleware\Attribute\RequireReadWriteConversation;
|
||||
use OCA\Talk\ResponseDefinitions;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\Attribute\ApiRoute;
|
||||
use OCP\AppFramework\Http\Attribute\PublicPage;
|
||||
use OCP\AppFramework\Http\Attribute\RequestHeader;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
|
|
@ -58,6 +59,11 @@ class ReactionController extends AEnvironmentAwareOCSController {
|
|||
#[RequirePermission(permission: RequirePermission::CHAT)]
|
||||
#[RequireReadWriteConversation]
|
||||
#[RequestHeader(name: 'x-nextcloud-federation', description: 'Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request', indirect: true)]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/reaction/{token}/{messageId}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
'messageId' => '[0-9]+',
|
||||
])]
|
||||
public function react(int $messageId, string $reaction): DataResponse {
|
||||
if ($this->room->isFederatedConversation()) {
|
||||
/** @var \OCA\Talk\Federation\Proxy\TalkV1\Controller\ReactionController $proxy */
|
||||
|
|
@ -105,6 +111,11 @@ class ReactionController extends AEnvironmentAwareOCSController {
|
|||
#[RequirePermission(permission: RequirePermission::CHAT)]
|
||||
#[RequireReadWriteConversation]
|
||||
#[RequestHeader(name: 'x-nextcloud-federation', description: 'Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request', indirect: true)]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/reaction/{token}/{messageId}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
'messageId' => '[0-9]+',
|
||||
])]
|
||||
public function delete(int $messageId, string $reaction): DataResponse {
|
||||
if ($this->room->isFederatedConversation()) {
|
||||
/** @var \OCA\Talk\Federation\Proxy\TalkV1\Controller\ReactionController $proxy */
|
||||
|
|
@ -147,6 +158,11 @@ class ReactionController extends AEnvironmentAwareOCSController {
|
|||
#[RequireModeratorOrNoLobby]
|
||||
#[RequireParticipant]
|
||||
#[RequestHeader(name: 'x-nextcloud-federation', description: 'Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request', indirect: true)]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/reaction/{token}/{messageId}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
'messageId' => '[0-9]+',
|
||||
])]
|
||||
public function getReactions(int $messageId, ?string $reaction): DataResponse {
|
||||
if ($this->room->isFederatedConversation()) {
|
||||
/** @var \OCA\Talk\Federation\Proxy\TalkV1\Controller\ReactionController $proxy */
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ use OCA\Talk\Vendor\CuyZ\Valinor\Mapper\MappingError;
|
|||
use OCA\Talk\Vendor\CuyZ\Valinor\Mapper\Source\Source;
|
||||
use OCA\Talk\Vendor\CuyZ\Valinor\MapperBuilder;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\Attribute\ApiRoute;
|
||||
use OCP\AppFramework\Http\Attribute\BruteForceProtection;
|
||||
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||
use OCP\AppFramework\Http\Attribute\OpenAPI;
|
||||
|
|
@ -70,6 +71,10 @@ class RecordingController extends AEnvironmentAwareOCSController {
|
|||
* 404: Recording server not found or not configured
|
||||
*/
|
||||
#[OpenAPI(scope: OpenAPI::SCOPE_ADMINISTRATION, tags: ['settings'])]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/recording/welcome/{serverId}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'serverId' => '\d+',
|
||||
])]
|
||||
public function getWelcomeMessage(int $serverId): DataResponse {
|
||||
$recordingServers = $this->talkConfig->getRecordingServers();
|
||||
if (empty($recordingServers) || !isset($recordingServers[$serverId])) {
|
||||
|
|
@ -182,6 +187,9 @@ class RecordingController extends AEnvironmentAwareOCSController {
|
|||
#[BruteForceProtection(action: 'talkRecordingStatus')]
|
||||
#[RequestHeader(name: 'talk-recording-random', description: 'Random seed used to generate the request checksum', indirect: true)]
|
||||
#[RequestHeader(name: 'talk-recording-checksum', description: 'Checksum over the request body to verify authenticity from the recording backend', indirect: true)]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/recording/backend', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
])]
|
||||
public function backend(): DataResponse {
|
||||
$json = $this->getInputStream();
|
||||
if (!$this->validateBackendRequest($json)) {
|
||||
|
|
@ -346,6 +354,10 @@ class RecordingController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireLoggedInModeratorParticipant]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/recording/{token}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function start(int $status): DataResponse {
|
||||
try {
|
||||
$this->recordingService->start($this->room, $status, $this->userId, $this->participant);
|
||||
|
|
@ -365,6 +377,10 @@ class RecordingController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireLoggedInModeratorParticipant]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/recording/{token}', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function stop(): DataResponse {
|
||||
try {
|
||||
$this->recordingService->stop($this->room, $this->participant);
|
||||
|
|
@ -390,6 +406,10 @@ class RecordingController extends AEnvironmentAwareOCSController {
|
|||
#[RequireRoom]
|
||||
#[RequestHeader(name: 'talk-recording-random', description: 'Random seed used to generate the request checksum', indirect: true)]
|
||||
#[RequestHeader(name: 'talk-recording-checksum', description: 'Checksum over the request body to verify authenticity from the recording backend', indirect: true)]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/recording/{token}/store', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function store(?string $owner): DataResponse {
|
||||
$data = $this->room->getToken();
|
||||
if (!$this->validateBackendRequest($data)) {
|
||||
|
|
@ -435,6 +455,10 @@ class RecordingController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireModeratorParticipant]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/recording/{token}/notification', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function notificationDismiss(int $timestamp): DataResponse {
|
||||
try {
|
||||
$this->recordingService->notificationDismiss(
|
||||
|
|
@ -463,6 +487,10 @@ class RecordingController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireModeratorParticipant]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/recording/{token}/share-chat', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function shareToChat(int $fileId, int $timestamp): DataResponse {
|
||||
try {
|
||||
$this->recordingService->shareToChat(
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ use OCA\Talk\Webinary;
|
|||
use OCP\App\IAppManager;
|
||||
use OCP\AppFramework\Db\DoesNotExistException;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\Attribute\ApiRoute;
|
||||
use OCP\AppFramework\Http\Attribute\BruteForceProtection;
|
||||
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||
use OCP\AppFramework\Http\Attribute\OpenAPI;
|
||||
|
|
@ -221,6 +222,9 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
* 200: Return list of rooms
|
||||
*/
|
||||
#[NoAdminRequired]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/room', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
])]
|
||||
public function getRooms(int $noStatusUpdate = 0, bool $includeStatus = false, int $modifiedSince = 0, bool $includeLastMessage = true): DataResponse {
|
||||
$nextModifiedSince = $this->timeFactory->getTime();
|
||||
|
||||
|
|
@ -347,6 +351,9 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
* 200: Return list of matching rooms
|
||||
*/
|
||||
#[NoAdminRequired]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/listed-room', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
])]
|
||||
public function getListedRooms(string $searchTerm = ''): DataResponse {
|
||||
$rooms = $this->manager->getListedRoomsForUser($this->userId, $searchTerm);
|
||||
|
||||
|
|
@ -371,6 +378,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
#[NoAdminRequired]
|
||||
#[BruteForceProtection(action: 'talkRoomToken')]
|
||||
#[RequireLoggedInParticipant]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/room/{token}/breakout-rooms', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function getBreakoutRooms(): DataResponse {
|
||||
try {
|
||||
$rooms = $this->breakoutRoomService->getBreakoutRooms($this->room, $this->participant);
|
||||
|
|
@ -412,6 +423,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
#[RequestHeader(name: 'x-nextcloud-federation', description: 'Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request', indirect: true)]
|
||||
#[RequestHeader(name: 'talk-sipbridge-random', description: 'Random seed used to generate the request checksum', indirect: true)]
|
||||
#[RequestHeader(name: 'talk-sipbridge-checksum', description: 'Checksum over the request body to verify authenticity from the Sipbridge', indirect: true)]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/room/{token}', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function getSingleRoom(string $token): DataResponse {
|
||||
try {
|
||||
$isSIPBridgeRequest = $this->validateSIPBridgeRequest($token);
|
||||
|
|
@ -509,6 +524,9 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
* 200: Room returned successfully
|
||||
*/
|
||||
#[NoAdminRequired]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/room/note-to-self', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
])]
|
||||
public function getNoteToSelfConversation(): DataResponse {
|
||||
$room = $this->noteToSelfService->ensureNoteToSelfExistsForUser($this->userId);
|
||||
$participant = $this->participantService->getParticipant($room, $this->userId, false);
|
||||
|
|
@ -614,6 +632,9 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
* 404: User, group or other target to invite was not found
|
||||
*/
|
||||
#[NoAdminRequired]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/room', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
])]
|
||||
public function createRoom(
|
||||
int $roomType = Room::TYPE_GROUP,
|
||||
string $invite = '', /* @deprecated */
|
||||
|
|
@ -830,6 +851,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
#[FederationSupported]
|
||||
#[NoAdminRequired]
|
||||
#[RequireLoggedInParticipant]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/room/{token}/favorite', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function addToFavorites(): DataResponse {
|
||||
$this->participantService->updateFavoriteStatus($this->participant, true);
|
||||
return new DataResponse($this->formatRoom($this->room, $this->participant));
|
||||
|
|
@ -845,6 +870,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
#[FederationSupported]
|
||||
#[NoAdminRequired]
|
||||
#[RequireLoggedInParticipant]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/room/{token}/favorite', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function removeFromFavorites(): DataResponse {
|
||||
$this->participantService->updateFavoriteStatus($this->participant, false);
|
||||
return new DataResponse($this->formatRoom($this->room, $this->participant));
|
||||
|
|
@ -863,6 +892,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
#[FederationSupported]
|
||||
#[NoAdminRequired]
|
||||
#[RequireLoggedInParticipant]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/room/{token}/notify', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function setNotificationLevel(int $level): DataResponse {
|
||||
try {
|
||||
$this->participantService->updateNotificationLevel($this->participant, $level);
|
||||
|
|
@ -886,6 +919,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
#[FederationSupported]
|
||||
#[NoAdminRequired]
|
||||
#[RequireLoggedInParticipant]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/room/{token}/notify-calls', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function setNotificationCalls(int $level): DataResponse {
|
||||
try {
|
||||
$this->participantService->updateNotificationCalls($this->participant, $level);
|
||||
|
|
@ -907,6 +944,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[PublicPage]
|
||||
#[RequireModeratorParticipant]
|
||||
#[ApiRoute(verb: 'PUT', url: '/api/{apiVersion}/room/{token}', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function renameRoom(string $roomName): DataResponse {
|
||||
if ($this->room->getObjectType() === Room::OBJECT_TYPE_EVENT) {
|
||||
return new DataResponse(['error' => Room::OBJECT_TYPE_EVENT], Http::STATUS_BAD_REQUEST);
|
||||
|
|
@ -931,6 +972,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[PublicPage]
|
||||
#[RequireModeratorParticipant]
|
||||
#[ApiRoute(verb: 'PUT', url: '/api/{apiVersion}/room/{token}/description', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function setDescription(string $description): DataResponse {
|
||||
if ($this->room->getObjectType() === Room::OBJECT_TYPE_EVENT) {
|
||||
return new DataResponse(['error' => Room::OBJECT_TYPE_EVENT], Http::STATUS_BAD_REQUEST);
|
||||
|
|
@ -955,6 +1000,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[PublicPage]
|
||||
#[RequireModeratorParticipant]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/room/{token}', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function deleteRoom(): DataResponse {
|
||||
if (!$this->appConfig->getAppValueBool('delete_one_to_one_conversations')
|
||||
&& in_array($this->room->getType(), [Room::TYPE_ONE_TO_ONE, Room::TYPE_ONE_TO_ONE_FORMER], true)) {
|
||||
|
|
@ -978,6 +1027,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[PublicPage]
|
||||
#[RequireModeratorParticipant]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/room/{token}/object', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function unbindRoomFromObject(): DataResponse {
|
||||
if ($this->room->getObjectType() === Room::OBJECT_TYPE_EVENT || $this->room->getObjectType() === Room::OBJECT_TYPE_INSTANT_MEETING) {
|
||||
$this->roomService->resetObject($this->room);
|
||||
|
|
@ -1005,6 +1058,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
#[RequireModeratorOrNoLobby]
|
||||
#[RequireParticipant]
|
||||
#[RequestHeader(name: 'x-nextcloud-federation', description: 'Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request', indirect: true)]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/room/{token}/participants', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function getParticipants(bool $includeStatus = false): DataResponse {
|
||||
if ($this->room->isFederatedConversation()) {
|
||||
/** @var \OCA\Talk\Federation\Proxy\TalkV1\Controller\RoomController $proxy */
|
||||
|
|
@ -1070,6 +1127,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
#[PublicPage]
|
||||
#[RequireModeratorOrNoLobby]
|
||||
#[RequireParticipant]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/room/{token}/breakout-rooms/participants', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function getBreakoutRoomParticipants(bool $includeStatus = false): DataResponse {
|
||||
if ($this->participant->getAttendee()->getParticipantType() === Participant::GUEST) {
|
||||
return new DataResponse(null, Http::STATUS_FORBIDDEN);
|
||||
|
|
@ -1273,6 +1334,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireLoggedInModeratorParticipant]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/room/{token}/participants', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function addParticipantToRoom(string $newParticipant, string $source = 'users'): DataResponse {
|
||||
if ($this->room->getType() === Room::TYPE_ONE_TO_ONE
|
||||
|| $this->room->getType() === Room::TYPE_ONE_TO_ONE_FORMER
|
||||
|
|
@ -1480,6 +1545,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
#[NoAdminRequired]
|
||||
#[RequireLoggedInParticipant]
|
||||
#[RequestHeader(name: 'x-nextcloud-federation', description: 'Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request', indirect: true)]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/room/{token}/participants/self', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function removeSelfFromRoom(): DataResponse {
|
||||
return $this->removeSelfFromRoomLogic($this->room, $this->participant);
|
||||
}
|
||||
|
|
@ -1542,6 +1611,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[PublicPage]
|
||||
#[RequireModeratorParticipant]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/room/{token}/attendees', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function removeAttendeeFromRoom(int $attendeeId): DataResponse {
|
||||
try {
|
||||
$targetParticipant = $this->participantService->getParticipantByAttendeeId($this->room, $attendeeId);
|
||||
|
|
@ -1583,6 +1656,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireLoggedInModeratorParticipant]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/room/{token}/public', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function makePublic(string $password = ''): DataResponse {
|
||||
if ($this->talkConfig->isPasswordEnforced() && $password === '') {
|
||||
return new DataResponse(['error' => 'password', 'message' => $this->l->t('Password needs to be set')], Http::STATUS_BAD_REQUEST);
|
||||
|
|
@ -1613,6 +1690,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireLoggedInModeratorParticipant]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/room/{token}/public', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function makePrivate(): DataResponse {
|
||||
try {
|
||||
$this->roomService->setType($this->room, Room::TYPE_GROUP);
|
||||
|
|
@ -1635,6 +1716,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireModeratorParticipant]
|
||||
#[ApiRoute(verb: 'PUT', url: '/api/{apiVersion}/room/{token}/read-only', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function setReadOnly(int $state): DataResponse {
|
||||
try {
|
||||
$this->roomService->setReadOnly($this->room, $state);
|
||||
|
|
@ -1666,6 +1751,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireModeratorParticipant]
|
||||
#[ApiRoute(verb: 'PUT', url: '/api/{apiVersion}/room/{token}/listable', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function setListable(int $scope): DataResponse {
|
||||
try {
|
||||
$this->roomService->setListable($this->room, $scope);
|
||||
|
|
@ -1688,6 +1777,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireModeratorParticipant]
|
||||
#[ApiRoute(verb: 'PUT', url: '/api/{apiVersion}/room/{token}/mention-permissions', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function setMentionPermissions(int $mentionPermissions): DataResponse {
|
||||
try {
|
||||
$this->roomService->setMentionPermissions($this->room, $mentionPermissions);
|
||||
|
|
@ -1709,6 +1802,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[PublicPage]
|
||||
#[RequireModeratorParticipant]
|
||||
#[ApiRoute(verb: 'PUT', url: '/api/{apiVersion}/room/{token}/password', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function setPassword(string $password): DataResponse {
|
||||
try {
|
||||
$this->roomService->setPassword($this->room, $password);
|
||||
|
|
@ -1735,6 +1832,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
#[NoAdminRequired]
|
||||
#[FederationSupported]
|
||||
#[RequireLoggedInParticipant]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/room/{token}/archive', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function archiveConversation(): DataResponse {
|
||||
$this->participantService->archiveConversation($this->participant);
|
||||
return new DataResponse($this->formatRoom($this->room, $this->participant));
|
||||
|
|
@ -1752,6 +1853,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
#[NoAdminRequired]
|
||||
#[FederationSupported]
|
||||
#[RequireLoggedInParticipant]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/room/{token}/archive', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function unarchiveConversation(): DataResponse {
|
||||
$this->participantService->unarchiveConversation($this->participant);
|
||||
return new DataResponse($this->formatRoom($this->room, $this->participant));
|
||||
|
|
@ -1769,6 +1874,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
#[NoAdminRequired]
|
||||
#[FederationSupported]
|
||||
#[RequireLoggedInParticipant]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/room/{token}/important', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function markConversationAsImportant(): DataResponse {
|
||||
$this->participantService->markConversationAsImportant($this->participant);
|
||||
return new DataResponse($this->formatRoom($this->room, $this->participant));
|
||||
|
|
@ -1786,6 +1895,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
#[NoAdminRequired]
|
||||
#[FederationSupported]
|
||||
#[RequireLoggedInParticipant]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/room/{token}/important', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function markConversationAsUnimportant(): DataResponse {
|
||||
$this->participantService->markConversationAsUnimportant($this->participant);
|
||||
return new DataResponse($this->formatRoom($this->room, $this->participant));
|
||||
|
|
@ -1803,6 +1916,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
#[NoAdminRequired]
|
||||
#[FederationSupported]
|
||||
#[RequireLoggedInParticipant]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/room/{token}/sensitive', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function markConversationAsSensitive(): DataResponse {
|
||||
$this->participantService->markConversationAsSensitive($this->participant);
|
||||
return new DataResponse($this->formatRoom($this->room, $this->participant));
|
||||
|
|
@ -1820,6 +1937,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
#[NoAdminRequired]
|
||||
#[FederationSupported]
|
||||
#[RequireLoggedInParticipant]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/room/{token}/sensitive', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function markConversationAsInsensitive(): DataResponse {
|
||||
$this->participantService->markConversationAsInsensitive($this->participant);
|
||||
return new DataResponse($this->formatRoom($this->room, $this->participant));
|
||||
|
|
@ -1841,6 +1962,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
#[PublicPage]
|
||||
#[BruteForceProtection(action: 'talkRoomPassword')]
|
||||
#[BruteForceProtection(action: 'talkRoomToken')]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/room/{token}/participants/active', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function joinRoom(string $token, string $password = '', bool $force = true): DataResponse {
|
||||
$sessionId = $this->session->getSessionForRoom($token);
|
||||
try {
|
||||
|
|
@ -2003,6 +2128,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
#[BruteForceProtection(action: 'talkRoomToken')]
|
||||
#[BruteForceProtection(action: 'talkFederationAccess')]
|
||||
#[RequestHeader(name: 'x-nextcloud-federation', description: 'Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request', indirect: true)]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/room/{token}/federation/active', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function joinFederatedRoom(string $token, ?string $sessionId): DataResponse {
|
||||
if (!$this->federationAuthenticator->isFederationRequest()) {
|
||||
$response = new DataResponse(null, Http::STATUS_NOT_FOUND);
|
||||
|
|
@ -2057,6 +2186,15 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
#[RequireRoom]
|
||||
#[RequestHeader(name: 'talk-sipbridge-random', description: 'Random seed used to generate the request checksum', indirect: true)]
|
||||
#[RequestHeader(name: 'talk-sipbridge-checksum', description: 'Checksum over the request body to verify authenticity from the Sipbridge', indirect: true)]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/room/{token}/pin/{pin}', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
'pin' => '\d{7,32}',
|
||||
], postfix: 'deprecated')]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/room/{token}/verify-dialin', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function verifyDialInPin(string $pin): DataResponse {
|
||||
if (!$this->talkConfig->isSIPConfigured()) {
|
||||
return new DataResponse(null, Http::STATUS_NOT_IMPLEMENTED);
|
||||
|
|
@ -2103,6 +2241,9 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
#[OpenAPI(scope: 'backend-sipbridge')]
|
||||
#[RequestHeader(name: 'talk-sipbridge-random', description: 'Random seed used to generate the request checksum', indirect: true)]
|
||||
#[RequestHeader(name: 'talk-sipbridge-checksum', description: 'Checksum over the request body to verify authenticity from the Sipbridge', indirect: true)]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/room/direct-dial-in', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
])]
|
||||
public function directDialIn(string $phoneNumber, string $caller): DataResponse {
|
||||
if (!$this->talkConfig->isSIPConfigured()) {
|
||||
return new DataResponse(null, Http::STATUS_NOT_IMPLEMENTED);
|
||||
|
|
@ -2167,6 +2308,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
#[RequireRoom]
|
||||
#[RequestHeader(name: 'talk-sipbridge-random', description: 'Random seed used to generate the request checksum', indirect: true)]
|
||||
#[RequestHeader(name: 'talk-sipbridge-checksum', description: 'Checksum over the request body to verify authenticity from the Sipbridge', indirect: true)]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/room/{token}/verify-dialout', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function verifyDialOutNumber(string $number, array $options = []): DataResponse {
|
||||
if (!$this->talkConfig->isSIPConfigured() || !$this->talkConfig->isSIPDialOutEnabled()) {
|
||||
return new DataResponse(null, Http::STATUS_NOT_IMPLEMENTED);
|
||||
|
|
@ -2216,6 +2361,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
#[RequireRoom]
|
||||
#[RequestHeader(name: 'talk-sipbridge-random', description: 'Random seed used to generate the request checksum', indirect: true)]
|
||||
#[RequestHeader(name: 'talk-sipbridge-checksum', description: 'Checksum over the request body to verify authenticity from the Sipbridge', indirect: true)]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/room/{token}/open-dial-in', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function createGuestByDialIn(): DataResponse {
|
||||
try {
|
||||
if (!$this->validateSIPBridgeRequest($this->room->getToken())) {
|
||||
|
|
@ -2257,6 +2406,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
#[RequireRoom]
|
||||
#[RequestHeader(name: 'talk-sipbridge-random', description: 'Random seed used to generate the request checksum', indirect: true)]
|
||||
#[RequestHeader(name: 'talk-sipbridge-checksum', description: 'Checksum over the request body to verify authenticity from the Sipbridge', indirect: true)]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/room/{token}/rejected-dialout', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function rejectedDialOutRequest(string $callId, array $options = []): DataResponse {
|
||||
if (!$this->talkConfig->isSIPConfigured() || !$this->talkConfig->isSIPDialOutEnabled()) {
|
||||
return new DataResponse(null, Http::STATUS_NOT_IMPLEMENTED);
|
||||
|
|
@ -2303,6 +2456,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
#[FederationSupported]
|
||||
#[PublicPage]
|
||||
#[RequireParticipant]
|
||||
#[ApiRoute(verb: 'PUT', url: '/api/{apiVersion}/room/{token}/participants/state', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function setSessionState(int $state): DataResponse {
|
||||
if (!$this->participant->getSession() instanceof Session) {
|
||||
return new DataResponse(null, Http::STATUS_NOT_FOUND);
|
||||
|
|
@ -2326,6 +2483,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
* 200: Successfully left the room
|
||||
*/
|
||||
#[PublicPage]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/room/{token}/participants/active', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function leaveRoom(string $token): DataResponse {
|
||||
$sessionId = $this->session->getSessionForRoom($token);
|
||||
$this->session->removeSessionForRoom($token);
|
||||
|
|
@ -2361,6 +2522,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
#[PublicPage]
|
||||
#[BruteForceProtection(action: 'talkRoomToken')]
|
||||
#[RequestHeader(name: 'x-nextcloud-federation', description: 'Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request', indirect: true)]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/room/{token}/federation/active', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function leaveFederatedRoom(string $token, string $sessionId): DataResponse {
|
||||
if (!$this->federationAuthenticator->isFederationRequest()) {
|
||||
$response = new DataResponse(null, Http::STATUS_NOT_FOUND);
|
||||
|
|
@ -2411,6 +2576,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[PublicPage]
|
||||
#[RequireModeratorParticipant]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/room/{token}/moderators', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function promoteModerator(int $attendeeId): DataResponse {
|
||||
return $this->changeParticipantType($attendeeId, true);
|
||||
}
|
||||
|
|
@ -2429,6 +2598,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[PublicPage]
|
||||
#[RequireModeratorParticipant]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/room/{token}/moderators', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function demoteModerator(int $attendeeId): DataResponse {
|
||||
return $this->changeParticipantType($attendeeId, false);
|
||||
}
|
||||
|
|
@ -2502,6 +2675,11 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[PublicPage]
|
||||
#[RequireModeratorParticipant]
|
||||
#[ApiRoute(verb: 'PUT', url: '/api/{apiVersion}/room/{token}/permissions/{mode}', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
'mode' => '(call|default)',
|
||||
])]
|
||||
public function setPermissions(string $mode, int $permissions): DataResponse {
|
||||
if ($mode !== 'default') {
|
||||
return new DataResponse(['error' => 'mode'], Http::STATUS_BAD_REQUEST);
|
||||
|
|
@ -2533,6 +2711,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[PublicPage]
|
||||
#[RequireModeratorParticipant]
|
||||
#[ApiRoute(verb: 'PUT', url: '/api/{apiVersion}/room/{token}/attendees/permissions', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function setAttendeePermissions(int $attendeeId, string $method, int $permissions): DataResponse {
|
||||
try {
|
||||
$targetParticipant = $this->participantService->getParticipantByAttendeeId($this->room, $attendeeId);
|
||||
|
|
@ -2567,6 +2749,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[PublicPage]
|
||||
#[RequireModeratorParticipant]
|
||||
#[ApiRoute(verb: 'PUT', url: '/api/{apiVersion}/room/{token}/attendees/permissions/all', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function setAllAttendeesPermissions(string $method, int $permissions): DataResponse {
|
||||
return new DataResponse(null, Http::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
|
@ -2585,6 +2771,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireModeratorParticipant]
|
||||
#[ApiRoute(verb: 'PUT', url: '/api/{apiVersion}/room/{token}/webinar/lobby', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function setLobby(int $state, ?int $timer = null): DataResponse {
|
||||
$timerDateTime = null;
|
||||
if ($timer !== null && $timer > 0) {
|
||||
|
|
@ -2636,6 +2826,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireModeratorParticipant]
|
||||
#[ApiRoute(verb: 'PUT', url: '/api/{apiVersion}/room/{token}/webinar/sip', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function setSIPEnabled(int $state): DataResponse {
|
||||
$user = $this->userManager->get($this->userId);
|
||||
if (!$user instanceof IUser) {
|
||||
|
|
@ -2673,6 +2867,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireLoggedInModeratorParticipant]
|
||||
#[ApiRoute(verb: 'PUT', url: '/api/{apiVersion}/room/{token}/recording-consent', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function setRecordingConsent(int $recordingConsent): DataResponse {
|
||||
if (!$this->talkConfig->isRecordingEnabled()) {
|
||||
return new DataResponse(['error' => 'config'], Http::STATUS_PRECONDITION_FAILED);
|
||||
|
|
@ -2699,6 +2897,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireModeratorParticipant]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/room/{token}/participants/resend-invitations', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function resendInvitations(?int $attendeeId): DataResponse {
|
||||
/** @var Participant[] $participants */
|
||||
$participants = [];
|
||||
|
|
@ -2736,6 +2938,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[PublicPage]
|
||||
#[RequireModeratorParticipant]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/room/{token}/message-expiration', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function setMessageExpiration(int $seconds): DataResponse {
|
||||
try {
|
||||
$this->roomService->setMessageExpiration($this->room, $seconds);
|
||||
|
|
@ -2763,6 +2969,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireModeratorParticipant]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/room/{token}/import-emails', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function importEmailsAsParticipants(bool $testRun = false): DataResponse {
|
||||
$file = $this->request->getUploadedFile('file');
|
||||
if ($file === null) {
|
||||
|
|
@ -2802,6 +3012,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
#[PublicPage]
|
||||
#[RequireParticipant]
|
||||
#[RequestHeader(name: 'x-nextcloud-federation', description: 'Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request', indirect: true)]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/room/{token}/capabilities', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function getCapabilities(): DataResponse {
|
||||
$headers = [];
|
||||
if ($this->room->isFederatedConversation()) {
|
||||
|
|
@ -2867,6 +3081,10 @@ class RoomController extends AEnvironmentAwareOCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[RequireLoggedInModeratorParticipant]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/room/{token}/meeting', requirements: [
|
||||
'apiVersion' => '(v4)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function scheduleMeeting(string $calendarUri, int $start, ?array $attendeeIds = null, ?int $end = null, ?string $title = null, ?string $description = null): DataResponse {
|
||||
if ($this->room->getType() === Room::TYPE_ONE_TO_ONE_FORMER) {
|
||||
return new DataResponse(['error' => 'conversation'], Http::STATUS_BAD_REQUEST);
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ namespace OCA\Talk\Controller;
|
|||
|
||||
use OCA\Talk\Settings\BeforePreferenceSetEventListener;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\Attribute\ApiRoute;
|
||||
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||
use OCP\AppFramework\Http\Attribute\OpenAPI;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
|
|
@ -47,6 +48,9 @@ class SettingsController extends OCSController {
|
|||
* 400: Updating user setting is not possible
|
||||
*/
|
||||
#[NoAdminRequired]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/settings/user', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
])]
|
||||
public function setUserSetting(string $key, string|int|null $value): DataResponse {
|
||||
if (!$this->preferenceListener->validatePreference($this->userId, $key, $value)) {
|
||||
return new DataResponse(null, Http::STATUS_BAD_REQUEST);
|
||||
|
|
@ -68,6 +72,9 @@ class SettingsController extends OCSController {
|
|||
* 200: Successfully set new SIP settings
|
||||
*/
|
||||
#[OpenAPI(scope: OpenAPI::SCOPE_ADMINISTRATION, tags: ['settings'])]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/settings/sip', requirements: [
|
||||
'apiVersion' => '(v1)',
|
||||
])]
|
||||
public function setSIPSettings(
|
||||
array $sipGroups = [],
|
||||
string $dialInInfo = '',
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ use OCA\Talk\Service\SessionService;
|
|||
use OCA\Talk\Signaling\Messages;
|
||||
use OCA\Talk\TalkSession;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\Attribute\ApiRoute;
|
||||
use OCP\AppFramework\Http\Attribute\BruteForceProtection;
|
||||
use OCP\AppFramework\Http\Attribute\OpenAPI;
|
||||
use OCP\AppFramework\Http\Attribute\PublicPage;
|
||||
|
|
@ -120,6 +121,9 @@ class SignalingController extends OCSController {
|
|||
#[OpenAPI(tags: ['internal_signaling', 'external_signaling'])]
|
||||
#[RequestHeader(name: 'talk-recording-random', description: 'Random seed used to generate the request checksum', indirect: true)]
|
||||
#[RequestHeader(name: 'talk-recording-checksum', description: 'Checksum over the request body to verify authenticity from the recording backend', indirect: true)]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/signaling/settings', requirements: [
|
||||
'apiVersion' => '(v3)',
|
||||
])]
|
||||
public function getSettings(string $token = ''): DataResponse {
|
||||
$isRecordingRequest = false;
|
||||
|
||||
|
|
@ -283,6 +287,10 @@ class SignalingController extends OCSController {
|
|||
* 404: Signaling server not found
|
||||
*/
|
||||
#[OpenAPI(scope: OpenAPI::SCOPE_ADMINISTRATION, tags: ['settings'])]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/signaling/welcome/{serverId}', requirements: [
|
||||
'apiVersion' => '(v3)',
|
||||
'serverId' => '\d+',
|
||||
])]
|
||||
public function getWelcomeMessage(int $serverId): DataResponse {
|
||||
try {
|
||||
$testResult = $this->signalingManager->checkServerCompatibility($serverId);
|
||||
|
|
@ -304,6 +312,10 @@ class SignalingController extends OCSController {
|
|||
*/
|
||||
#[PublicPage]
|
||||
#[OpenAPI(tags: ['internal_signaling'])]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/signaling/{token}', requirements: [
|
||||
'apiVersion' => '(v3)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function sendMessages(string $token, string $messages): DataResponse {
|
||||
if ($this->talkConfig->getSignalingMode() !== Config::SIGNALING_INTERNAL) {
|
||||
return new DataResponse('Internal signaling disabled.', Http::STATUS_BAD_REQUEST);
|
||||
|
|
@ -451,6 +463,10 @@ class SignalingController extends OCSController {
|
|||
*/
|
||||
#[PublicPage]
|
||||
#[OpenAPI(tags: ['internal_signaling'])]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/signaling/{token}', requirements: [
|
||||
'apiVersion' => '(v3)',
|
||||
'token' => '[a-z0-9]{4,30}',
|
||||
])]
|
||||
public function pullMessages(string $token): DataResponse {
|
||||
if ($this->talkConfig->getSignalingMode() !== Config::SIGNALING_INTERNAL) {
|
||||
return new DataResponse('Internal signaling disabled.', Http::STATUS_BAD_REQUEST);
|
||||
|
|
@ -656,6 +672,9 @@ class SignalingController extends OCSController {
|
|||
#[BruteForceProtection(action: 'talkSignalingSecret')]
|
||||
#[RequestHeader(name: 'spreed-signaling-random', description: 'Random seed used to generate the request checksum', indirect: true)]
|
||||
#[RequestHeader(name: 'spreed-signaling-checksum', description: 'Checksum over the request body to verify authenticity from the signaling backend', indirect: true)]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/signaling/backend', requirements: [
|
||||
'apiVersion' => '(v3)',
|
||||
])]
|
||||
public function backend(): DataResponse {
|
||||
$json = $this->getInputStream();
|
||||
if (!$this->validateBackendRequest($json)) {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ namespace OCA\Talk\Controller;
|
|||
|
||||
use OC\NotSquareException;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\Attribute\ApiRoute;
|
||||
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||
use OCP\AppFramework\Http\Attribute\OpenAPI;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
|
|
@ -44,6 +45,7 @@ class TempAvatarController extends OCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[OpenAPI(tags: ['user_avatar'])]
|
||||
#[ApiRoute(verb: 'POST', url: '/temp-user-avatar')]
|
||||
public function postAvatar(): DataResponse {
|
||||
$files = $this->request->getUploadedFile('files');
|
||||
|
||||
|
|
@ -116,6 +118,7 @@ class TempAvatarController extends OCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[OpenAPI(tags: ['user_avatar'])]
|
||||
#[ApiRoute(verb: 'DELETE', url: '/temp-user-avatar')]
|
||||
public function deleteAvatar(): DataResponse {
|
||||
try {
|
||||
$avatar = $this->avatarManager->getAvatar($this->userId);
|
||||
|
|
|
|||
|
|
@ -1175,10 +1175,10 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge": {
|
||||
"delete": {
|
||||
"operationId": "matterbridge_settings-stop-all-bridges",
|
||||
"summary": "Stop all bridges",
|
||||
"/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge/version": {
|
||||
"get": {
|
||||
"operationId": "matterbridge_settings-get-matterbridge-version",
|
||||
"summary": "Get Matterbridge version",
|
||||
"description": "This endpoint requires admin access",
|
||||
"tags": [
|
||||
"matterbridge"
|
||||
|
|
@ -1217,7 +1217,7 @@
|
|||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "All bridges stopped successfully",
|
||||
"description": "Bridge version returned",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
|
|
@ -1237,7 +1237,15 @@
|
|||
"$ref": "#/components/schemas/OCSMeta"
|
||||
},
|
||||
"data": {
|
||||
"type": "boolean"
|
||||
"type": "object",
|
||||
"required": [
|
||||
"version"
|
||||
],
|
||||
"properties": {
|
||||
"version": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1246,8 +1254,8 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"406": {
|
||||
"description": "Stopping all bridges is not possible",
|
||||
"400": {
|
||||
"description": "Getting bridge version is not possible",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
|
|
@ -1343,10 +1351,10 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge/version": {
|
||||
"get": {
|
||||
"operationId": "matterbridge_settings-get-matterbridge-version",
|
||||
"summary": "Get Matterbridge version",
|
||||
"/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge": {
|
||||
"delete": {
|
||||
"operationId": "matterbridge_settings-stop-all-bridges",
|
||||
"summary": "Stop all bridges",
|
||||
"description": "This endpoint requires admin access",
|
||||
"tags": [
|
||||
"matterbridge"
|
||||
|
|
@ -1385,7 +1393,7 @@
|
|||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Bridge version returned",
|
||||
"description": "All bridges stopped successfully",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
|
|
@ -1405,15 +1413,7 @@
|
|||
"$ref": "#/components/schemas/OCSMeta"
|
||||
},
|
||||
"data": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"version"
|
||||
],
|
||||
"properties": {
|
||||
"version": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1422,8 +1422,8 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Getting bridge version is not possible",
|
||||
"406": {
|
||||
"description": "Stopping all bridges is not possible",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
|
|
|
|||
|
|
@ -1601,6 +1601,241 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/ocs/v2.php/apps/spreed/api/{apiVersion}/room/direct-dial-in": {
|
||||
"post": {
|
||||
"operationId": "room-direct-dial-in",
|
||||
"summary": "Direct dial-in (SIP bridge)",
|
||||
"description": "Required capability: `sip-direct-dialin`",
|
||||
"tags": [
|
||||
"room"
|
||||
],
|
||||
"security": [
|
||||
{},
|
||||
{
|
||||
"bearer_auth": []
|
||||
},
|
||||
{
|
||||
"basic_auth": []
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"phoneNumber",
|
||||
"caller"
|
||||
],
|
||||
"properties": {
|
||||
"phoneNumber": {
|
||||
"type": "string",
|
||||
"description": "Phone number that is called"
|
||||
},
|
||||
"caller": {
|
||||
"type": "string",
|
||||
"description": "Phone number of the person calling in"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "apiVersion",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"v4"
|
||||
],
|
||||
"default": "v4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "talk-sipbridge-random",
|
||||
"in": "header",
|
||||
"description": "Random seed used to generate the request checksum",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "talk-sipbridge-checksum",
|
||||
"in": "header",
|
||||
"description": "Checksum over the request body to verify authenticity from the Sipbridge",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
"description": "Required to be true for the API request to pass",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Call conversation created",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"ocs"
|
||||
],
|
||||
"properties": {
|
||||
"ocs": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"meta",
|
||||
"data"
|
||||
],
|
||||
"properties": {
|
||||
"meta": {
|
||||
"$ref": "#/components/schemas/OCSMeta"
|
||||
},
|
||||
"data": {
|
||||
"$ref": "#/components/schemas/Room"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "SIP request invalid",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"ocs"
|
||||
],
|
||||
"properties": {
|
||||
"ocs": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"meta",
|
||||
"data"
|
||||
],
|
||||
"properties": {
|
||||
"meta": {
|
||||
"$ref": "#/components/schemas/OCSMeta"
|
||||
},
|
||||
"data": {
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Number is not assigned to any user",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"ocs"
|
||||
],
|
||||
"properties": {
|
||||
"ocs": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"meta",
|
||||
"data"
|
||||
],
|
||||
"properties": {
|
||||
"meta": {
|
||||
"$ref": "#/components/schemas/OCSMeta"
|
||||
},
|
||||
"data": {
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Error occurred while creating conversation",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"ocs"
|
||||
],
|
||||
"properties": {
|
||||
"ocs": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"meta",
|
||||
"data"
|
||||
],
|
||||
"properties": {
|
||||
"meta": {
|
||||
"$ref": "#/components/schemas/OCSMeta"
|
||||
},
|
||||
"data": {
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"501": {
|
||||
"description": "SIP dial-in is not configured",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"ocs"
|
||||
],
|
||||
"properties": {
|
||||
"ocs": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"meta",
|
||||
"data"
|
||||
],
|
||||
"properties": {
|
||||
"meta": {
|
||||
"$ref": "#/components/schemas/OCSMeta"
|
||||
},
|
||||
"data": {
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/verify-dialout": {
|
||||
"post": {
|
||||
"operationId": "room-verify-dial-out-number",
|
||||
|
|
@ -1856,241 +2091,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/ocs/v2.php/apps/spreed/api/{apiVersion}/room/direct-dial-in": {
|
||||
"post": {
|
||||
"operationId": "room-direct-dial-in",
|
||||
"summary": "Direct dial-in (SIP bridge)",
|
||||
"description": "Required capability: `sip-direct-dialin`",
|
||||
"tags": [
|
||||
"room"
|
||||
],
|
||||
"security": [
|
||||
{},
|
||||
{
|
||||
"bearer_auth": []
|
||||
},
|
||||
{
|
||||
"basic_auth": []
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"phoneNumber",
|
||||
"caller"
|
||||
],
|
||||
"properties": {
|
||||
"phoneNumber": {
|
||||
"type": "string",
|
||||
"description": "Phone number that is called"
|
||||
},
|
||||
"caller": {
|
||||
"type": "string",
|
||||
"description": "Phone number of the person calling in"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "apiVersion",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"v4"
|
||||
],
|
||||
"default": "v4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "talk-sipbridge-random",
|
||||
"in": "header",
|
||||
"description": "Random seed used to generate the request checksum",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "talk-sipbridge-checksum",
|
||||
"in": "header",
|
||||
"description": "Checksum over the request body to verify authenticity from the Sipbridge",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
"description": "Required to be true for the API request to pass",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Call conversation created",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"ocs"
|
||||
],
|
||||
"properties": {
|
||||
"ocs": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"meta",
|
||||
"data"
|
||||
],
|
||||
"properties": {
|
||||
"meta": {
|
||||
"$ref": "#/components/schemas/OCSMeta"
|
||||
},
|
||||
"data": {
|
||||
"$ref": "#/components/schemas/Room"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "SIP request invalid",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"ocs"
|
||||
],
|
||||
"properties": {
|
||||
"ocs": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"meta",
|
||||
"data"
|
||||
],
|
||||
"properties": {
|
||||
"meta": {
|
||||
"$ref": "#/components/schemas/OCSMeta"
|
||||
},
|
||||
"data": {
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Number is not assigned to any user",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"ocs"
|
||||
],
|
||||
"properties": {
|
||||
"ocs": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"meta",
|
||||
"data"
|
||||
],
|
||||
"properties": {
|
||||
"meta": {
|
||||
"$ref": "#/components/schemas/OCSMeta"
|
||||
},
|
||||
"data": {
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Error occurred while creating conversation",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"ocs"
|
||||
],
|
||||
"properties": {
|
||||
"ocs": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"meta",
|
||||
"data"
|
||||
],
|
||||
"properties": {
|
||||
"meta": {
|
||||
"$ref": "#/components/schemas/OCSMeta"
|
||||
},
|
||||
"data": {
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"501": {
|
||||
"description": "SIP dial-in is not configured",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"ocs"
|
||||
],
|
||||
"properties": {
|
||||
"ocs": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"meta",
|
||||
"data"
|
||||
],
|
||||
"properties": {
|
||||
"meta": {
|
||||
"$ref": "#/components/schemas/OCSMeta"
|
||||
},
|
||||
"data": {
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/open-dial-in": {
|
||||
"post": {
|
||||
"operationId": "room-create-guest-by-dial-in",
|
||||
|
|
|
|||
13846
openapi-full.json
13846
openapi-full.json
File diff suppressed because it is too large
Load diff
13328
openapi.json
13328
openapi.json
File diff suppressed because it is too large
Load diff
|
|
@ -84,26 +84,6 @@ export type paths = {
|
|||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get?: never;
|
||||
put?: never;
|
||||
post?: never;
|
||||
/**
|
||||
* Stop all bridges
|
||||
* @description This endpoint requires admin access
|
||||
*/
|
||||
delete: operations["matterbridge_settings-stop-all-bridges"];
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge/version": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
|
|
@ -124,6 +104,26 @@ export type paths = {
|
|||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get?: never;
|
||||
put?: never;
|
||||
post?: never;
|
||||
/**
|
||||
* Stop all bridges
|
||||
* @description This endpoint requires admin access
|
||||
*/
|
||||
delete: operations["matterbridge_settings-stop-all-bridges"];
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/ocs/v2.php/apps/spreed/api/{apiVersion}/recording/welcome/{serverId}": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
|
|
@ -636,80 +636,6 @@ export interface operations {
|
|||
};
|
||||
};
|
||||
};
|
||||
"matterbridge_settings-stop-all-bridges": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header: {
|
||||
/** @description Required to be true for the API request to pass */
|
||||
"OCS-APIRequest": boolean;
|
||||
};
|
||||
path: {
|
||||
apiVersion: "v1";
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
/** @description All bridges stopped successfully */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": {
|
||||
ocs: {
|
||||
meta: components["schemas"]["OCSMeta"];
|
||||
data: boolean;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/** @description Current user is not logged in */
|
||||
401: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": {
|
||||
ocs: {
|
||||
meta: components["schemas"]["OCSMeta"];
|
||||
data: unknown;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/** @description Logged in account must be an admin */
|
||||
403: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": {
|
||||
ocs: {
|
||||
meta: components["schemas"]["OCSMeta"];
|
||||
data: unknown;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/** @description Stopping all bridges is not possible */
|
||||
406: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": {
|
||||
ocs: {
|
||||
meta: components["schemas"]["OCSMeta"];
|
||||
data: {
|
||||
error: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
"matterbridge_settings-get-matterbridge-version": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
|
|
@ -786,6 +712,80 @@ export interface operations {
|
|||
};
|
||||
};
|
||||
};
|
||||
"matterbridge_settings-stop-all-bridges": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header: {
|
||||
/** @description Required to be true for the API request to pass */
|
||||
"OCS-APIRequest": boolean;
|
||||
};
|
||||
path: {
|
||||
apiVersion: "v1";
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
/** @description All bridges stopped successfully */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": {
|
||||
ocs: {
|
||||
meta: components["schemas"]["OCSMeta"];
|
||||
data: boolean;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/** @description Current user is not logged in */
|
||||
401: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": {
|
||||
ocs: {
|
||||
meta: components["schemas"]["OCSMeta"];
|
||||
data: unknown;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/** @description Logged in account must be an admin */
|
||||
403: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": {
|
||||
ocs: {
|
||||
meta: components["schemas"]["OCSMeta"];
|
||||
data: unknown;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/** @description Stopping all bridges is not possible */
|
||||
406: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": {
|
||||
ocs: {
|
||||
meta: components["schemas"]["OCSMeta"];
|
||||
data: {
|
||||
error: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
"recording-get-welcome-message": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
|
|
|
|||
|
|
@ -55,23 +55,6 @@ export type paths = {
|
|||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/verify-dialout": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get?: never;
|
||||
put?: never;
|
||||
/** Verify a dial-out number (SIP bridge) */
|
||||
post: operations["room-verify-dial-out-number"];
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/ocs/v2.php/apps/spreed/api/{apiVersion}/room/direct-dial-in": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
|
|
@ -92,6 +75,23 @@ export type paths = {
|
|||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/verify-dialout": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get?: never;
|
||||
put?: never;
|
||||
/** Verify a dial-out number (SIP bridge) */
|
||||
post: operations["room-verify-dial-out-number"];
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/open-dial-in": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
|
|
@ -783,6 +783,105 @@ export interface operations {
|
|||
};
|
||||
};
|
||||
};
|
||||
"room-direct-dial-in": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header: {
|
||||
/** @description Random seed used to generate the request checksum */
|
||||
"talk-sipbridge-random"?: string;
|
||||
/** @description Checksum over the request body to verify authenticity from the Sipbridge */
|
||||
"talk-sipbridge-checksum"?: string;
|
||||
/** @description Required to be true for the API request to pass */
|
||||
"OCS-APIRequest": boolean;
|
||||
};
|
||||
path: {
|
||||
apiVersion: "v4";
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody: {
|
||||
content: {
|
||||
"application/json": {
|
||||
/** @description Phone number that is called */
|
||||
phoneNumber: string;
|
||||
/** @description Phone number of the person calling in */
|
||||
caller: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
/** @description Call conversation created */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": {
|
||||
ocs: {
|
||||
meta: components["schemas"]["OCSMeta"];
|
||||
data: components["schemas"]["Room"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/** @description SIP request invalid */
|
||||
401: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": {
|
||||
ocs: {
|
||||
meta: components["schemas"]["OCSMeta"];
|
||||
data: unknown;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/** @description Number is not assigned to any user */
|
||||
404: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": {
|
||||
ocs: {
|
||||
meta: components["schemas"]["OCSMeta"];
|
||||
data: unknown;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/** @description Error occurred while creating conversation */
|
||||
500: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": {
|
||||
ocs: {
|
||||
meta: components["schemas"]["OCSMeta"];
|
||||
data: unknown;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/** @description SIP dial-in is not configured */
|
||||
501: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": {
|
||||
ocs: {
|
||||
meta: components["schemas"]["OCSMeta"];
|
||||
data: unknown;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
"room-verify-dial-out-number": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
|
|
@ -891,105 +990,6 @@ export interface operations {
|
|||
};
|
||||
};
|
||||
};
|
||||
"room-direct-dial-in": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header: {
|
||||
/** @description Random seed used to generate the request checksum */
|
||||
"talk-sipbridge-random"?: string;
|
||||
/** @description Checksum over the request body to verify authenticity from the Sipbridge */
|
||||
"talk-sipbridge-checksum"?: string;
|
||||
/** @description Required to be true for the API request to pass */
|
||||
"OCS-APIRequest": boolean;
|
||||
};
|
||||
path: {
|
||||
apiVersion: "v4";
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody: {
|
||||
content: {
|
||||
"application/json": {
|
||||
/** @description Phone number that is called */
|
||||
phoneNumber: string;
|
||||
/** @description Phone number of the person calling in */
|
||||
caller: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
/** @description Call conversation created */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": {
|
||||
ocs: {
|
||||
meta: components["schemas"]["OCSMeta"];
|
||||
data: components["schemas"]["Room"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/** @description SIP request invalid */
|
||||
401: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": {
|
||||
ocs: {
|
||||
meta: components["schemas"]["OCSMeta"];
|
||||
data: unknown;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/** @description Number is not assigned to any user */
|
||||
404: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": {
|
||||
ocs: {
|
||||
meta: components["schemas"]["OCSMeta"];
|
||||
data: unknown;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/** @description Error occurred while creating conversation */
|
||||
500: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": {
|
||||
ocs: {
|
||||
meta: components["schemas"]["OCSMeta"];
|
||||
data: unknown;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/** @description SIP dial-in is not configured */
|
||||
501: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": {
|
||||
ocs: {
|
||||
meta: components["schemas"]["OCSMeta"];
|
||||
data: unknown;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
"room-create-guest-by-dial-in": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue