diff --git a/appinfo/routes.php b/appinfo/routes.php deleted file mode 100644 index 19a0d2194e..0000000000 --- a/appinfo/routes.php +++ /dev/null @@ -1,33 +0,0 @@ - '(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], - ], -]; diff --git a/appinfo/routes/routesBanController.php b/appinfo/routes/routesBanController.php deleted file mode 100644 index cdda427a82..0000000000 --- a/appinfo/routes/routesBanController.php +++ /dev/null @@ -1,22 +0,0 @@ - '(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], - ], -]; diff --git a/appinfo/routes/routesBotController.php b/appinfo/routes/routesBotController.php deleted file mode 100644 index c008f8e826..0000000000 --- a/appinfo/routes/routesBotController.php +++ /dev/null @@ -1,47 +0,0 @@ - '(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], - ], -]; diff --git a/appinfo/routes/routesBreakoutRoomController.php b/appinfo/routes/routesBreakoutRoomController.php deleted file mode 100644 index 94bc9ffff8..0000000000 --- a/appinfo/routes/routesBreakoutRoomController.php +++ /dev/null @@ -1,35 +0,0 @@ - '(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], - ], -]; diff --git a/appinfo/routes/routesCalendarIntegrationController.php b/appinfo/routes/routesCalendarIntegrationController.php deleted file mode 100644 index e506236de1..0000000000 --- a/appinfo/routes/routesCalendarIntegrationController.php +++ /dev/null @@ -1,25 +0,0 @@ - '(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], - ], -]; diff --git a/appinfo/routes/routesCallController.php b/appinfo/routes/routesCallController.php deleted file mode 100644 index 2a878c7715..0000000000 --- a/appinfo/routes/routesCallController.php +++ /dev/null @@ -1,39 +0,0 @@ - '(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], - ], -]; diff --git a/appinfo/routes/routesCertificateController.php b/appinfo/routes/routesCertificateController.php deleted file mode 100644 index 0f67d186a0..0000000000 --- a/appinfo/routes/routesCertificateController.php +++ /dev/null @@ -1,18 +0,0 @@ - '(v1)', -]; - -return [ - 'ocs' => [ - /** @see \OCA\Talk\Controller\CertificateController::getCertificateExpiration() */ - ['name' => 'Certificate#getCertificateExpiration', 'url' => '/api/{apiVersion}/certificate/expiration', 'verb' => 'GET', 'requirements' => $requirements], - ], -]; diff --git a/appinfo/routes/routesFederationController.php b/appinfo/routes/routesFederationController.php deleted file mode 100644 index 967e603175..0000000000 --- a/appinfo/routes/routesFederationController.php +++ /dev/null @@ -1,22 +0,0 @@ - '(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], - ], -]; diff --git a/appinfo/routes/routesFilesIntegrationController.php b/appinfo/routes/routesFilesIntegrationController.php deleted file mode 100644 index e60c90f55d..0000000000 --- a/appinfo/routes/routesFilesIntegrationController.php +++ /dev/null @@ -1,25 +0,0 @@ - '(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], - ], -]; diff --git a/appinfo/routes/routesGuestController.php b/appinfo/routes/routesGuestController.php deleted file mode 100644 index ea0c1ee87e..0000000000 --- a/appinfo/routes/routesGuestController.php +++ /dev/null @@ -1,19 +0,0 @@ - '(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], - ], -]; diff --git a/appinfo/routes/routesHostedSignalingServerController.php b/appinfo/routes/routesHostedSignalingServerController.php deleted file mode 100644 index eff36ce83d..0000000000 --- a/appinfo/routes/routesHostedSignalingServerController.php +++ /dev/null @@ -1,22 +0,0 @@ - '(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], - ], -]; diff --git a/appinfo/routes/routesMatterbridgeController.php b/appinfo/routes/routesMatterbridgeController.php deleted file mode 100644 index 2c186db95a..0000000000 --- a/appinfo/routes/routesMatterbridgeController.php +++ /dev/null @@ -1,25 +0,0 @@ - '(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], - ], -]; diff --git a/appinfo/routes/routesMatterbridgeSettingsController.php b/appinfo/routes/routesMatterbridgeSettingsController.php deleted file mode 100644 index a947c700b0..0000000000 --- a/appinfo/routes/routesMatterbridgeSettingsController.php +++ /dev/null @@ -1,20 +0,0 @@ - '(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], - ], -]; diff --git a/appinfo/routes/routesPageController.php b/appinfo/routes/routesPageController.php deleted file mode 100644 index 81754e9cec..0000000000 --- a/appinfo/routes/routesPageController.php +++ /dev/null @@ -1,28 +0,0 @@ - '[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], - ], -]; diff --git a/appinfo/routes/routesPollController.php b/appinfo/routes/routesPollController.php deleted file mode 100644 index bcb89470d6..0000000000 --- a/appinfo/routes/routesPollController.php +++ /dev/null @@ -1,35 +0,0 @@ - '(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], - ], -]; diff --git a/appinfo/routes/routesPublicShareAuthController.php b/appinfo/routes/routesPublicShareAuthController.php deleted file mode 100644 index c84f1008d1..0000000000 --- a/appinfo/routes/routesPublicShareAuthController.php +++ /dev/null @@ -1,18 +0,0 @@ - '(v1)', -]; - -return [ - 'ocs' => [ - /** @see \OCA\Talk\Controller\PublicShareAuthController::createRoom() */ - ['name' => 'PublicShareAuth#createRoom', 'url' => '/api/{apiVersion}/publicshareauth', 'verb' => 'POST', 'requirements' => $requirements], - ], -]; diff --git a/appinfo/routes/routesReactionController.php b/appinfo/routes/routesReactionController.php deleted file mode 100644 index b9c0e3dafd..0000000000 --- a/appinfo/routes/routesReactionController.php +++ /dev/null @@ -1,24 +0,0 @@ - '(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], - ], -]; diff --git a/appinfo/routes/routesRecordingController.php b/appinfo/routes/routesRecordingController.php deleted file mode 100644 index 7826d663ec..0000000000 --- a/appinfo/routes/routesRecordingController.php +++ /dev/null @@ -1,37 +0,0 @@ - '(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], - ], -]; diff --git a/appinfo/routes/routesRoomController.php b/appinfo/routes/routesRoomController.php deleted file mode 100644 index 196281c5c1..0000000000 --- a/appinfo/routes/routesRoomController.php +++ /dev/null @@ -1,135 +0,0 @@ - '(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], - ], -]; diff --git a/appinfo/routes/routesSettingsController.php b/appinfo/routes/routesSettingsController.php deleted file mode 100644 index b707fcf5c3..0000000000 --- a/appinfo/routes/routesSettingsController.php +++ /dev/null @@ -1,20 +0,0 @@ - '(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], - ], -]; diff --git a/appinfo/routes/routesSignalingController.php b/appinfo/routes/routesSignalingController.php deleted file mode 100644 index d3b1fcf032..0000000000 --- a/appinfo/routes/routesSignalingController.php +++ /dev/null @@ -1,34 +0,0 @@ - '(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], - ], -]; diff --git a/appinfo/routes/routesTempAvatarController.php b/appinfo/routes/routesTempAvatarController.php deleted file mode 100644 index 5d4befe7e9..0000000000 --- a/appinfo/routes/routesTempAvatarController.php +++ /dev/null @@ -1,16 +0,0 @@ - [ - /** @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'], - ], -]; diff --git a/lib/Controller/AvatarController.php b/lib/Controller/AvatarController.php index ce731ec049..789dd7cada 100644 --- a/lib/Controller/AvatarController.php +++ b/lib/Controller/AvatarController.php @@ -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( diff --git a/lib/Controller/BanController.php b/lib/Controller/BanController.php index 6501a76e8e..cc3c687c0a 100644 --- a/lib/Controller/BanController.php +++ b/lib/Controller/BanController.php @@ -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); diff --git a/lib/Controller/BotController.php b/lib/Controller/BotController.php index 0b018c8f48..913c77c8ff 100644 --- a/lib/Controller/BotController.php +++ b/lib/Controller/BotController.php @@ -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); diff --git a/lib/Controller/BreakoutRoomController.php b/lib/Controller/BreakoutRoomController.php index 71578c6e56..90eb03ff6c 100644 --- a/lib/Controller/BreakoutRoomController.php +++ b/lib/Controller/BreakoutRoomController.php @@ -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); diff --git a/lib/Controller/CalendarIntegrationController.php b/lib/Controller/CalendarIntegrationController.php index b729cd197d..b5b5981e02 100644 --- a/lib/Controller/CalendarIntegrationController.php +++ b/lib/Controller/CalendarIntegrationController.php @@ -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 { diff --git a/lib/Controller/CallController.php b/lib/Controller/CallController.php index 1e14e254b6..59ce43c58a 100644 --- a/lib/Controller/CallController.php +++ b/lib/Controller/CallController.php @@ -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); diff --git a/lib/Controller/CallNotificationController.php b/lib/Controller/CallNotificationController.php index 31f1a88154..3446bcd241 100644 --- a/lib/Controller/CallNotificationController.php +++ b/lib/Controller/CallNotificationController.php @@ -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); diff --git a/lib/Controller/CertificateController.php b/lib/Controller/CertificateController.php index 922bdd1733..237f1f3643 100644 --- a/lib/Controller/CertificateController.php +++ b/lib/Controller/CertificateController.php @@ -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); diff --git a/lib/Controller/FederationController.php b/lib/Controller/FederationController.php index 1267bccb70..744c6ca6eb 100644 --- a/lib/Controller/FederationController.php +++ b/lib/Controller/FederationController.php @@ -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) { diff --git a/lib/Controller/FilesIntegrationController.php b/lib/Controller/FilesIntegrationController.php index 1ea2a40dbc..c5d276ed1d 100644 --- a/lib/Controller/FilesIntegrationController.php +++ b/lib/Controller/FilesIntegrationController.php @@ -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') { diff --git a/lib/Controller/GuestController.php b/lib/Controller/GuestController.php index 9fbadc4882..672a460143 100644 --- a/lib/Controller/GuestController.php +++ b/lib/Controller/GuestController.php @@ -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) { diff --git a/lib/Controller/HostedSignalingServerController.php b/lib/Controller/HostedSignalingServerController.php index 0f1760790a..f88abfc4dc 100644 --- a/lib/Controller/HostedSignalingServerController.php +++ b/lib/Controller/HostedSignalingServerController.php @@ -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'); diff --git a/lib/Controller/MatterbridgeController.php b/lib/Controller/MatterbridgeController.php index 495687a1fa..4732d423e3 100644 --- a/lib/Controller/MatterbridgeController.php +++ b/lib/Controller/MatterbridgeController.php @@ -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); diff --git a/lib/Controller/MatterbridgeSettingsController.php b/lib/Controller/MatterbridgeSettingsController.php index 4544779a7f..b64f8b8438 100644 --- a/lib/Controller/MatterbridgeSettingsController.php +++ b/lib/Controller/MatterbridgeSettingsController.php @@ -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(); diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index 91a89b7d8a..eea0307aeb 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -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); diff --git a/lib/Controller/PollController.php b/lib/Controller/PollController.php index 078e6b4989..f2d68a1d02 100644 --- a/lib/Controller/PollController.php +++ b/lib/Controller/PollController.php @@ -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 */ diff --git a/lib/Controller/PublicShareAuthController.php b/lib/Controller/PublicShareAuthController.php index 803791014d..d905be60cb 100644 --- a/lib/Controller/PublicShareAuthController.php +++ b/lib/Controller/PublicShareAuthController.php @@ -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); diff --git a/lib/Controller/ReactionController.php b/lib/Controller/ReactionController.php index 8fa1e21511..bcd23d6f47 100644 --- a/lib/Controller/ReactionController.php +++ b/lib/Controller/ReactionController.php @@ -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 */ diff --git a/lib/Controller/RecordingController.php b/lib/Controller/RecordingController.php index e9dc2fb7ad..f0d2313e6f 100644 --- a/lib/Controller/RecordingController.php +++ b/lib/Controller/RecordingController.php @@ -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( diff --git a/lib/Controller/RoomController.php b/lib/Controller/RoomController.php index 4ad4b6c116..e62568609e 100644 --- a/lib/Controller/RoomController.php +++ b/lib/Controller/RoomController.php @@ -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); diff --git a/lib/Controller/SettingsController.php b/lib/Controller/SettingsController.php index 55c90506f2..4b1e71c1ca 100644 --- a/lib/Controller/SettingsController.php +++ b/lib/Controller/SettingsController.php @@ -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 = '', diff --git a/lib/Controller/SignalingController.php b/lib/Controller/SignalingController.php index 7699278163..c221604150 100644 --- a/lib/Controller/SignalingController.php +++ b/lib/Controller/SignalingController.php @@ -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)) { diff --git a/lib/Controller/TempAvatarController.php b/lib/Controller/TempAvatarController.php index 59b00993d3..e7c6e1ddec 100644 --- a/lib/Controller/TempAvatarController.php +++ b/lib/Controller/TempAvatarController.php @@ -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); diff --git a/openapi-administration.json b/openapi-administration.json index 97284c754a..8741cabd54 100644 --- a/openapi-administration.json +++ b/openapi-administration.json @@ -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": { diff --git a/openapi-backend-sipbridge.json b/openapi-backend-sipbridge.json index 18185dc434..60325ee754 100644 --- a/openapi-backend-sipbridge.json +++ b/openapi-backend-sipbridge.json @@ -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", diff --git a/openapi-full.json b/openapi-full.json index 3afe12982c..48dd07be52 100644 --- a/openapi-full.json +++ b/openapi-full.json @@ -5789,208 +5789,6 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/call/{token}/notification-state": { - "get": { - "operationId": "call_notification-state", - "summary": "Check the expected state of a call notification", - "description": "Required capability: `call-notification-state-api`", - "tags": [ - "call" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "description": "Conversation token to check", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Notification should be kept alive", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "nullable": true - } - } - } - } - } - } - } - }, - "201": { - "description": "Dismiss call notification and show \"Missed call\"-notification instead", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "nullable": true - } - } - } - } - } - } - } - }, - "403": { - "description": "Not logged in, try again with auth data sent", - "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": "Dismiss call notification", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "nullable": true - } - } - } - } - } - } - } - }, - "401": { - "description": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, "/ocs/v2.php/apps/spreed/api/{apiVersion}/call/{token}/download": { "get": { "operationId": "call-download-participants-for-call", @@ -6911,6 +6709,3890 @@ } } }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/call/{token}/notification-state": { + "get": { + "operationId": "call_notification-state", + "summary": "Check the expected state of a call notification", + "description": "Required capability: `call-notification-state-api`", + "tags": [ + "call" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "description": "Conversation token to check", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Notification should be kept alive", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true + } + } + } + } + } + } + } + }, + "201": { + "description": "Dismiss call notification and show \"Missed call\"-notification instead", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true + } + } + } + } + } + } + } + }, + "403": { + "description": "Not logged in, try again with auth data sent", + "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": "Dismiss call notification", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}": { + "post": { + "operationId": "chat-send-message", + "summary": "Sends a new chat message to the given room", + "description": "The author and timestamp are automatically set to the current user/guest and time.", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string", + "description": "the message to send" + }, + "actorDisplayName": { + "type": "string", + "default": "", + "description": "for guests" + }, + "referenceId": { + "type": "string", + "default": "", + "description": "for the message to be able to later identify it again" + }, + "replyTo": { + "type": "integer", + "format": "int64", + "default": 0, + "description": "Parent id which this message is a reply to", + "minimum": 0 + }, + "silent": { + "type": "boolean", + "default": false, + "description": "If sent silent the chat message will not create any notifications" + }, + "threadTitle": { + "type": "string", + "default": "", + "description": "Only supported when not replying, when given will create a thread (requires `threads` capability)" + }, + "threadId": { + "type": "integer", + "format": "int64", + "default": 0, + "description": "Thread id which this message is a reply to without quoting a specific message (ignored when $replyTo is given, also requires `threads` capability)" + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": { + "201": { + "description": "Message sent successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/ChatMessageWithParent" + } + ] + } + } + } + } + } + } + } + }, + "400": { + "description": "Sending message is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Actor not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "413": { + "description": "Message too long", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "429": { + "description": "Mention rate limit exceeded (guests only)", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "get": { + "operationId": "chat-receive-messages", + "summary": "Receives chat messages from the given room", + "description": "- Receiving the history ($lookIntoFuture=0): The next $limit messages after $lastKnownMessageId will be returned. The new $lastKnownMessageId for the follow up query is available as `X-Chat-Last-Given` header.\n- Looking into the future ($lookIntoFuture=1): If there are currently no messages the response will not be sent immediately. Instead, HTTP connection will be kept open waiting for new messages to arrive and, when they do, then the response will be sent. The connection will not be kept open indefinitely, though; the number of seconds to wait for new messages to arrive can be set using the timeout parameter; the default timeout is 30 seconds, maximum timeout is 60 seconds. If the timeout ends a successful but empty response will be sent. If messages have been returned (status=200) the new $lastKnownMessageId for the follow up query is available as `X-Chat-Last-Given` header.\nThe limit specifies the maximum number of messages that will be returned, although the actual number of returned messages could be lower if some messages are not visible to the participant. Note that if none of the messages are visible to the participant the returned number of messages will be 0, yet the status will still be 200. Also note that `X-Chat-Last-Given` may reference a message not visible and thus not returned, but it should be used nevertheless as the $lastKnownMessageId for the follow-up query.", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "lookIntoFuture", + "in": "query", + "description": "Polling for new messages (1) or getting the history of the chat (0)", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of chat messages to receive (100 by default, 200 at most)", + "schema": { + "type": "integer", + "format": "int64", + "default": 100 + } + }, + { + "name": "lastKnownMessageId", + "in": "query", + "description": "The last known message (serves as offset)", + "schema": { + "type": "integer", + "format": "int64", + "default": 0, + "minimum": 0 + } + }, + { + "name": "lastCommonReadId", + "in": "query", + "description": "The last known common read message (so the response is 200 instead of 304 when it changes even when there are no messages)", + "schema": { + "type": "integer", + "format": "int64", + "default": 0, + "minimum": 0 + } + }, + { + "name": "timeout", + "in": "query", + "description": "Number of seconds to wait for new messages (30 by default, 30 at most)", + "schema": { + "type": "integer", + "format": "int64", + "default": 30, + "minimum": 0, + "maximum": 30 + } + }, + { + "name": "setReadMarker", + "in": "query", + "description": "Automatically set the last read marker when 1, if your client does this itself via chat/{token}/read set to 0", + "schema": { + "type": "integer", + "format": "int64", + "default": 1, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "includeLastKnown", + "in": "query", + "description": "Include the $lastKnownMessageId in the messages when 1 (default 0)", + "schema": { + "type": "integer", + "format": "int64", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "noStatusUpdate", + "in": "query", + "description": "When the user status should not be automatically set to online set to 1 (default 0)", + "schema": { + "type": "integer", + "format": "int64", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "markNotificationsAsRead", + "in": "query", + "description": "Set to 0 when notifications should not be marked as read (default 1)", + "schema": { + "type": "integer", + "format": "int64", + "default": 1, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "threadId", + "in": "query", + "description": "Limit the chat message list to a given thread", + "schema": { + "type": "integer", + "format": "int64", + "default": 0, + "minimum": 0 + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": "Messages returned", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + }, + "X-Chat-Last-Given": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatMessageWithParent" + } + } + } + } + } + } + } + } + }, + "304": { + "description": "No messages" + } + } + }, + "delete": { + "operationId": "chat-clear-history", + "summary": "Clear the chat history", + "tags": [ + "chat" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "History cleared successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "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/ChatMessage" + } + } + } + } + } + } + } + }, + "202": { + "description": "History cleared successfully, but Federation or Matterbridge is configured, so the information can be replicated elsewhere", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "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/ChatMessage" + } + } + } + } + } + } + } + }, + "403": { + "description": "Missing permissions to clear history", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/share": { + "post": { + "operationId": "chat-share-object-to-chat", + "summary": "Sends a rich-object to the given room", + "description": "The author and timestamp are automatically set to the current user/guest and time.", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "objectType", + "objectId" + ], + "properties": { + "objectType": { + "type": "string", + "description": "Type of the object" + }, + "objectId": { + "type": "string", + "description": "ID of the object" + }, + "metaData": { + "type": "string", + "default": "", + "description": "Additional metadata, sample value: `{\\\"type\\\":\\\"geo-location\\\",\\\"id\\\":\\\"geo:52.5450511,13.3741463\\\",\\\"name\\\":\\\"Nextcloud Berlin Office\\\",\\\"latitude\\\":\\\"52.5450511\\\",\\\"longitude\\\":\\\"13.3741463\\\"}`" + }, + "actorDisplayName": { + "type": "string", + "default": "", + "description": "Guest name" + }, + "referenceId": { + "type": "string", + "default": "", + "description": "Reference ID" + }, + "threadId": { + "type": "integer", + "format": "int64", + "default": 0, + "description": "Thread id which this message is a reply to without quoting a specific message (also requires `threads` capability)" + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "201": { + "description": "Object shared successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/ChatMessageWithParent" + } + ] + } + } + } + } + } + } + } + }, + "400": { + "description": "Sharing object is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Actor not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "413": { + "description": "Message too long", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "get": { + "operationId": "chat-get-objects-shared-in-room", + "summary": "Get objects that are shared in the room", + "description": "Federated conversations are supported with the `federated-shared-items` capability", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "objectType", + "in": "query", + "description": "Type of the objects", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "lastKnownMessageId", + "in": "query", + "description": "ID of the last known message", + "schema": { + "type": "integer", + "format": "int64", + "default": 0, + "minimum": 0 + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of objects", + "schema": { + "type": "integer", + "format": "int64", + "default": 100, + "minimum": 1, + "maximum": 200 + } + }, + { + "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": "List of shared objects messages returned", + "headers": { + "X-Chat-Last-Given": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ChatMessage" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/summarize": { + "post": { + "operationId": "chat-summarize-chat", + "summary": "Summarize the next bunch of chat messages from a given offset", + "description": "Required capability: `chat-summary-api`", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "fromMessageId" + ], + "properties": { + "fromMessageId": { + "type": "integer", + "format": "int64", + "description": "Offset from where on the summary should be generated", + "minimum": 1 + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "201": { + "description": "Summary was scheduled, use the returned taskId to get the status information and output from the TaskProcessing API: [OCS TaskProcessing API](https://docs.nextcloud.com/server/latest/developer_manual/client_apis/OCS/ocs-taskprocessing-api.html#fetch-a-task-by-id). If the response data contains nextOffset, not all messages could be handled in a single request. After receiving the response a second summary should be requested with the provided nextOffset.", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "taskId" + ], + "properties": { + "taskId": { + "type": "integer", + "format": "int64" + }, + "nextOffset": { + "type": "integer", + "format": "int64" + } + } + } + } + } + } + } + } + } + }, + "400": { + "description": "No AI provider available or summarizing failed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "ai-no-provider", + "ai-error" + ] + } + } + } + } + } + } + } + } + } + }, + "204": { + "description": "No messages found to summarize" + }, + "500": { + "description": "", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}/context": { + "get": { + "operationId": "chat-get-message-context", + "summary": "Get the context of a message", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "The focused message which should be in the \"middle\" of the returned context", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of chat messages to receive in both directions (50 by default, 100 at most, might return 201 messages)", + "schema": { + "type": "integer", + "format": "int64", + "default": 50, + "minimum": 1, + "maximum": 100 + } + }, + { + "name": "threadId", + "in": "query", + "description": "Limit the chat message list to a given thread", + "schema": { + "type": "integer", + "format": "int64", + "default": 0, + "minimum": 0 + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": "Message context returned", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + }, + "X-Chat-Last-Given": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatMessageWithParent" + } + } + } + } + } + } + } + } + }, + "304": { + "description": "No messages" + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}": { + "delete": { + "operationId": "chat-delete-message", + "summary": "Delete a chat message", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": "Message deleted successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "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/ChatMessageWithParent" + } + } + } + } + } + } + } + }, + "202": { + "description": "Message deleted successfully, but a bot or Matterbridge is configured, so the information can be replicated elsewhere", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "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/ChatMessageWithParent" + } + } + } + } + } + } + } + }, + "400": { + "description": "Deleting message is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "403": { + "description": "Missing permissions to delete message", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Message not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "405": { + "description": "Deleting this message type is not allowed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "put": { + "operationId": "chat-edit-message", + "summary": "Edit a chat message", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string", + "description": "the message to send" + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": "Message edited successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "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/ChatMessageWithParent" + } + } + } + } + } + } + } + }, + "202": { + "description": "Message edited successfully, but a bot or Matterbridge is configured, so the information can be replicated to other services", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "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/ChatMessageWithParent" + } + } + } + } + } + } + } + }, + "400": { + "description": "Editing message is not possible, e.g. when the new message is empty or the message is too old", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "403": { + "description": "Missing permissions to edit message", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Message not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "405": { + "description": "Editing this message type is not allowed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "413": { + "description": "Message too long", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}/reminder": { + "post": { + "operationId": "chat-set-reminder", + "summary": "Set a reminder for a chat message", + "tags": [ + "chat" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "timestamp" + ], + "properties": { + "timestamp": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the reminder", + "minimum": 0 + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": { + "201": { + "description": "Reminder created successfully", + "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/ChatReminder" + } + } + } + } + } + } + } + }, + "404": { + "description": "Message not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "get": { + "operationId": "chat-get-reminder", + "summary": "Get the reminder for a chat message", + "tags": [ + "chat" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": "Reminder returned", + "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/ChatReminder" + } + } + } + } + } + } + } + }, + "404": { + "description": "Message not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "chat-delete-reminder", + "summary": "Delete a chat reminder", + "tags": [ + "chat" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": "Reminder deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Message not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/upcoming-reminders": { + "get": { + "operationId": "chat-get-upcoming-reminders", + "summary": "Get all upcoming reminders", + "description": "Required capability: `upcoming-reminders`", + "tags": [ + "chat" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "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": "Reminders returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatReminderUpcoming" + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/read": { + "post": { + "operationId": "chat-set-read-marker", + "summary": "Set the read marker to a specific message", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "lastReadMessage": { + "type": "integer", + "format": "int64", + "nullable": true, + "default": null, + "description": "ID if the last read message (Optional only with `chat-read-last` capability)", + "minimum": -2 + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": "Read marker set successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "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" + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "chat-mark-unread", + "summary": "Mark a chat as unread", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": "Read marker set successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "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" + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/share/overview": { + "get": { + "operationId": "chat-get-objects-shared-in-room-overview", + "summary": "Get objects that are shared in the room overview", + "description": "Federated conversations are supported with the `federated-shared-items` capability", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of objects", + "schema": { + "type": "integer", + "format": "int64", + "default": 7, + "minimum": 1, + "maximum": 20 + } + }, + { + "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": "List of shared objects messages of each type returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatMessage" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}/pin": { + "post": { + "operationId": "chat-pin-message", + "summary": "Pin a message in a chat as a moderator", + "description": "Required capability: `pinned-messages`", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "pinUntil": { + "type": "integer", + "format": "int64", + "default": 0, + "description": "Unix timestamp when to unpin the message", + "minimum": 0 + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": "Message was pinned successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/ChatMessageWithParent" + } + ] + } + } + } + } + } + } + } + }, + "400": { + "description": "Message could not be pinned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "message", + "until", + "status" + ] + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Message was not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "message", + "until", + "status" + ] + } + } + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "chat-unpin-message", + "summary": "Unpin a message in a chat as a moderator", + "description": "Required capability: `pinned-messages`", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": "Message is not pinned now", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/ChatMessageWithParent" + } + ] + } + } + } + } + } + } + } + }, + "400": { + "description": "Federation request answered with an unknown status code", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "status" + ] + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Message was not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "message" + ] + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}/pin/self": { + "delete": { + "operationId": "chat-hide-pinned-message", + "summary": "Hide a message in a chat as a user", + "description": "Required capability: `pinned-messages`", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": "Pinned message is now hidden", + "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": "Message was not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/mentions": { + "get": { + "operationId": "chat-mentions", + "summary": "Search for mentions", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "search", + "in": "query", + "description": "Text to search for", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of results", + "schema": { + "type": "integer", + "format": "int64", + "default": 20 + } + }, + { + "name": "includeStatus", + "in": "query", + "description": "Include the user statuses", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": "List of mention suggestions returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatMentionSuggestion" + } + } + } + } + } + } + } + } + } + } + } + }, "/ocs/v2.php/apps/spreed/api/{apiVersion}/file/{fileId}": { "get": { "operationId": "files_integration-get-room-by-file-id", @@ -7412,6 +11094,556 @@ } } }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/live-transcription/{token}": { + "post": { + "operationId": "live_transcription-enable", + "summary": "Enable the live transcription", + "tags": [ + "live_transcription" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Live transcription enabled successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true + } + } + } + } + } + } + } + }, + "400": { + "description": "The participant is not in the call", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "app", + "in-call" + ] + } + } + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "live_transcription-disable", + "summary": "Disable the live transcription", + "tags": [ + "live_transcription" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Live transcription stopped successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true + } + } + } + } + } + } + } + }, + "400": { + "description": "The participant is not in the call", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "app", + "in-call" + ] + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/live-transcription/languages": { + "get": { + "operationId": "live_transcription-get-available-languages", + "summary": "Get available languages for live transcriptions", + "tags": [ + "live_transcription" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "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": "Available languages got successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/LiveTranscriptionLanguage" + } + } + } + } + } + } + } + } + }, + "400": { + "description": "The external app \"live_transcription\" is not available", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "app" + ] + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/live-transcription/{token}/language": { + "post": { + "operationId": "live_transcription-set-language", + "summary": "Set language for live transcriptions", + "tags": [ + "live_transcription" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "languageId" + ], + "properties": { + "languageId": { + "type": "string", + "description": "the ID of the language to set" + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Language set successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true + } + } + } + } + } + } + } + }, + "400": { + "description": "The external app \"live_transcription\" is not available", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "app" + ] + } + } + } + } + } + } + } + } + } + }, + "403": { + "description": "Participant is not a moderator", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "app" + ] + } + } + } + } + } + } + } + } + } + } + } + } + }, "/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge/{token}": { "get": { "operationId": "matterbridge-get-bridge-of-room", @@ -11314,11 +15546,11 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/note-to-self": { + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/breakout-rooms": { "get": { - "operationId": "room-get-note-to-self-conversation", - "summary": "Get the \"Note to self\" conversation for the user", - "description": "It will be automatically created when it is currently missing", + "operationId": "room-get-breakout-rooms", + "summary": "Get breakout rooms", + "description": "All for moderators and in case of \"free selection\", or the assigned breakout room for other participants", "tags": [ "room" ], @@ -11343,6 +15575,15 @@ "default": "v4" } }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, { "name": "OCS-APIRequest", "in": "header", @@ -11356,14 +15597,7 @@ ], "responses": { "200": { - "description": "Room returned successfully", - "headers": { - "X-Nextcloud-Talk-Hash": { - "schema": { - "type": "string" - } - } - }, + "description": "Breakout rooms returned", "content": { "application/json": { "schema": { @@ -11383,7 +15617,48 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "$ref": "#/components/schemas/Room" + "type": "array", + "items": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Getting breakout rooms is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } } } } @@ -11852,11 +16127,11 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/breakout-rooms": { + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/note-to-self": { "get": { - "operationId": "room-get-breakout-rooms", - "summary": "Get breakout rooms", - "description": "All for moderators and in case of \"free selection\", or the assigned breakout room for other participants", + "operationId": "room-get-note-to-self-conversation", + "summary": "Get the \"Note to self\" conversation for the user", + "description": "It will be automatically created when it is currently missing", "tags": [ "room" ], @@ -11881,15 +16156,6 @@ "default": "v4" } }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, { "name": "OCS-APIRequest", "in": "header", @@ -11903,40 +16169,14 @@ ], "responses": { "200": { - "description": "Breakout rooms returned", - "content": { - "application/json": { + "description": "Room returned successfully", + "headers": { + "X-Nextcloud-Talk-Hash": { "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Room" - } - } - } - } - } + "type": "string" } } - } - }, - "400": { - "description": "Getting breakout rooms is not possible", + }, "content": { "application/json": { "schema": { @@ -11956,15 +16196,7 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } + "$ref": "#/components/schemas/Room" } } } @@ -12004,16 +16236,14 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/object": { - "delete": { - "operationId": "room-unbind-room-from-object", - "summary": "Unbind a room from its object to prevent automatic retention", - "description": "Required capability: `unbind-conversation`", + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/favorite": { + "post": { + "operationId": "room-add-to-favorites", + "summary": "Add a room to the favorites", "tags": [ "room" ], "security": [ - {}, { "bearer_auth": [] }, @@ -12056,7 +16286,7 @@ ], "responses": { "200": { - "description": "Room successfully unbound", + "description": "Successfully added room to favorites", "content": { "application/json": { "schema": { @@ -12085,8 +16315,86 @@ } } }, - "400": { - "description": "Unbinding room is not possible", + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "room-remove-from-favorites", + "summary": "Remove a room from the favorites", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Successfully removed room from favorites", "content": { "application/json": { "schema": { @@ -12106,18 +16414,7 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "object-type" - ] - } - } + "$ref": "#/components/schemas/Room" } } } @@ -12125,15 +16422,42 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/public": { + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/notify": { "post": { - "operationId": "room-make-public", - "summary": "Allowed guests to join conversation", - "description": "Required capability: `conversation-creation-password` for `string $password` parameter", + "operationId": "room-set-notification-level", + "summary": "Update the notification level for a room", "tags": [ "room" ], @@ -12146,16 +16470,19 @@ } ], "requestBody": { - "required": false, + "required": true, "content": { "application/json": { "schema": { "type": "object", + "required": [ + "level" + ], "properties": { - "password": { - "type": "string", - "default": "", - "description": "New password (only available with `conversation-creation-password` capability)" + "level": { + "type": "integer", + "format": "int64", + "description": "New level" } } } @@ -12197,7 +16524,7 @@ ], "responses": { "200": { - "description": "Allowed guests successfully", + "description": "Notification level updated successfully", "content": { "application/json": { "schema": { @@ -12227,7 +16554,7 @@ } }, "400": { - "description": "Allowing guests is not possible", + "description": "Updating notification level is not possible", "content": { "application/json": { "schema": { @@ -12255,14 +16582,8 @@ "error": { "type": "string", "enum": [ - "breakout-room", - "type", - "value", - "password" + "level" ] - }, - "message": { - "type": "string" } } } @@ -12302,10 +16623,12 @@ } } } - }, - "delete": { - "operationId": "room-make-private", - "summary": "Disallowed guests to join conversation", + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/notify-calls": { + "post": { + "operationId": "room-set-notification-calls", + "summary": "Update call notifications", "tags": [ "room" ], @@ -12317,6 +16640,26 @@ "basic_auth": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "level" + ], + "properties": { + "level": { + "type": "integer", + "format": "int64", + "description": "New level" + } + } + } + } + } + }, "parameters": [ { "name": "apiVersion", @@ -12352,7 +16695,7 @@ ], "responses": { "200": { - "description": "Room unpublished Disallowing guests successfully", + "description": "Call notification level updated successfully", "content": { "application/json": { "schema": { @@ -12382,7 +16725,7 @@ } }, "400": { - "description": "Disallowing guests is not possible", + "description": "Updating call notification level is not possible", "content": { "application/json": { "schema": { @@ -12410,9 +16753,7 @@ "error": { "type": "string", "enum": [ - "breakout-room", - "type", - "value" + "level" ] } } @@ -12600,364 +16941,11 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/read-only": { - "put": { - "operationId": "room-set-read-only", - "summary": "Set read-only state of a room", - "tags": [ - "room" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "state" - ], - "properties": { - "state": { - "type": "integer", - "format": "int64", - "enum": [ - 0, - 1 - ], - "description": "New read-only state" - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Read-only state updated successfully", - "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" - } - } - } - } - } - } - } - }, - "400": { - "description": "Updating read-only state is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "type", - "value" - ] - } - } - } - } - } - } - } - } - } - }, - "401": { - "description": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/listable": { - "put": { - "operationId": "room-set-listable", - "summary": "Make a room listable", - "tags": [ - "room" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "scope" - ], - "properties": { - "scope": { - "type": "integer", - "format": "int64", - "enum": [ - 0, - 1, - 2 - ], - "description": "Scope where the room is listable" - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Made room listable successfully", - "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" - } - } - } - } - } - } - } - }, - "400": { - "description": "Making room listable is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "breakout-room", - "type", - "value" - ] - } - } - } - } - } - } - } - } - } - }, - "401": { - "description": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/password": { - "put": { - "operationId": "room-set-password", - "summary": "Set a password for a room", + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/object": { + "delete": { + "operationId": "room-unbind-room-from-object", + "summary": "Unbind a room from its object to prevent automatic retention", + "description": "Required capability: `unbind-conversation`", "tags": [ "room" ], @@ -12970,25 +16958,6 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "password" - ], - "properties": { - "password": { - "type": "string", - "description": "New password" - } - } - } - } - } - }, "parameters": [ { "name": "apiVersion", @@ -13024,7 +16993,7 @@ ], "responses": { "200": { - "description": "Password set successfully", + "description": "Room successfully unbound", "content": { "application/json": { "schema": { @@ -13054,7 +17023,7 @@ } }, "400": { - "description": "Setting password is not possible", + "description": "Unbinding room is not possible", "content": { "application/json": { "schema": { @@ -13082,175 +17051,7 @@ "error": { "type": "string", "enum": [ - "breakout-room", - "type", - "value" - ] - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/permissions/{mode}": { - "put": { - "operationId": "room-set-permissions", - "summary": "Update the permissions of a room", - "tags": [ - "room" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "permissions" - ], - "properties": { - "permissions": { - "type": "integer", - "format": "int64", - "description": "New permissions", - "minimum": 0, - "maximum": 255 - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "mode", - "in": "path", - "description": "Level of the permissions ('call' (removed in Talk 20), 'default')", - "required": true, - "schema": { - "type": "string", - "enum": [ - "call", - "default" - ], - "pattern": "^(call|default)$" - } - }, - { - "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": "Permissions updated successfully", - "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" - } - } - } - } - } - } - } - }, - "400": { - "description": "Updating permissions is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "breakout-room", - "mode", - "type", - "value" + "object-type" ] } } @@ -14303,15 +18104,15 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/attendees/permissions": { - "put": { - "operationId": "room-set-attendee-permissions", - "summary": "Update the permissions of an attendee", + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/public": { + "post": { + "operationId": "room-make-public", + "summary": "Allowed guests to join conversation", + "description": "Required capability: `conversation-creation-password` for `string $password` parameter", "tags": [ "room" ], "security": [ - {}, { "bearer_auth": [] }, @@ -14320,38 +18121,16 @@ } ], "requestBody": { - "required": true, + "required": false, "content": { "application/json": { "schema": { "type": "object", - "required": [ - "attendeeId", - "method", - "permissions" - ], "properties": { - "attendeeId": { - "type": "integer", - "format": "int64", - "description": "ID of the attendee", - "minimum": 0 - }, - "method": { + "password": { "type": "string", - "enum": [ - "set", - "remove", - "add" - ], - "description": "Method of updating permissions ('set', 'remove', 'add')" - }, - "permissions": { - "type": "integer", - "format": "int64", - "description": "New permissions", - "minimum": 0, - "maximum": 255 + "default": "", + "description": "New password (only available with `conversation-creation-password` capability)" } } } @@ -14393,17 +18172,7 @@ ], "responses": { "200": { - "description": "Permissions updated successfully", - "headers": { - "X-Nextcloud-Has-User-Statuses": { - "schema": { - "type": "boolean", - "enum": [ - true - ] - } - } - }, + "description": "Allowed guests successfully", "content": { "application/json": { "schema": { @@ -14423,10 +18192,7 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Participant" - } + "$ref": "#/components/schemas/Room" } } } @@ -14436,7 +18202,7 @@ } }, "400": { - "description": "Updating permissions is not possible", + "description": "Allowing guests is not possible", "content": { "application/json": { "schema": { @@ -14464,10 +18230,162 @@ "error": { "type": "string", "enum": [ - "participant", - "method", - "moderator", - "room-type", + "breakout-room", + "type", + "value", + "password" + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "room-make-private", + "summary": "Disallowed guests to join conversation", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Room unpublished Disallowing guests successfully", + "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" + } + } + } + } + } + } + } + }, + "400": { + "description": "Disallowing guests is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "breakout-room", "type", "value" ] @@ -14481,8 +18399,8 @@ } } }, - "403": { - "description": "Missing permissions to update permissions", + "401": { + "description": "Current user is not logged in", "content": { "application/json": { "schema": { @@ -14501,71 +18419,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "participant", - "method", - "moderator", - "room-type", - "type", - "value" - ] - } - } - } - } - } - } - } - } - } - }, - "404": { - "description": "Attendee not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "participant", - "method", - "moderator", - "room-type", - "type", - "value" - ] - } - } - } + "data": {} } } } @@ -14576,16 +18430,14 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/attendees/permissions/all": { + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/read-only": { "put": { - "operationId": "room-set-all-attendees-permissions", - "summary": "Update the permissions of all attendees", - "deprecated": true, + "operationId": "room-set-read-only", + "summary": "Set read-only state of a room", "tags": [ "room" ], "security": [ - {}, { "bearer_auth": [] }, @@ -14600,25 +18452,371 @@ "schema": { "type": "object", "required": [ - "method", - "permissions" + "state" ], "properties": { - "method": { - "type": "string", - "enum": [ - "set", - "remove", - "add" - ], - "description": "Method of updating permissions ('set', 'remove', 'add')" - }, - "permissions": { + "state": { "type": "integer", "format": "int64", - "description": "New permissions", - "minimum": 0, - "maximum": 255 + "enum": [ + 0, + 1 + ], + "description": "New read-only state" + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Read-only state updated successfully", + "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" + } + } + } + } + } + } + } + }, + "400": { + "description": "Updating read-only state is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "type", + "value" + ] + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/listable": { + "put": { + "operationId": "room-set-listable", + "summary": "Make a room listable", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "scope" + ], + "properties": { + "scope": { + "type": "integer", + "format": "int64", + "enum": [ + 0, + 1, + 2 + ], + "description": "Scope where the room is listable" + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Made room listable successfully", + "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" + } + } + } + } + } + } + } + }, + "400": { + "description": "Making room listable is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "breakout-room", + "type", + "value" + ] + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/mention-permissions": { + "put": { + "operationId": "room-set-mention-permissions", + "summary": "Update the mention permissions for a room", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "mentionPermissions" + ], + "properties": { + "mentionPermissions": { + "type": "integer", + "format": "int64", + "enum": [ + 0, + 1 + ], + "description": "New mention permissions" } } } @@ -14710,7 +18908,20 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "nullable": true + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "breakout-room", + "type", + "value" + ] + } + } } } } @@ -14718,6 +18929,842 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/password": { + "put": { + "operationId": "room-set-password", + "summary": "Set a password for a room", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "password" + ], + "properties": { + "password": { + "type": "string", + "description": "New password" + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Password set successfully", + "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" + } + } + } + } + } + } + } + }, + "400": { + "description": "Setting password is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "breakout-room", + "type", + "value" + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/archive": { + "post": { + "operationId": "room-archive-conversation", + "summary": "Archive a conversation", + "description": "Required capability: `archived-conversations-v2`", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Conversation was archived", + "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": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "room-unarchive-conversation", + "summary": "Unarchive a conversation", + "description": "Required capability: `archived-conversations-v2`", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Conversation was unarchived", + "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": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/important": { + "post": { + "operationId": "room-mark-conversation-as-important", + "summary": "Mark a conversation as important (still sending notifications while on DND)", + "description": "Required capability: `important-conversations`", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Conversation was marked as important", + "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": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "room-mark-conversation-as-unimportant", + "summary": "Mark a conversation as unimportant (no longer sending notifications while on DND)", + "description": "Required capability: `important-conversations`", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Conversation was marked as unimportant", + "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": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/sensitive": { + "post": { + "operationId": "room-mark-conversation-as-sensitive", + "summary": "Mark a conversation as sensitive (no last message is visible / no push preview is shown)", + "description": "Required capability: `sensitive-conversations`", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Conversation was marked as sensitive", + "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": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "room-mark-conversation-as-insensitive", + "summary": "Mark a conversation as insensitive (last message is visible / push preview is shown)", + "description": "Required capability: `sensitive-conversations`", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Conversation was marked as insensitive", + "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": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -15037,165 +20084,6 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants/resend-invitations": { - "post": { - "operationId": "room-resend-invitations", - "summary": "Resend invitations", - "tags": [ - "room" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": false, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "attendeeId": { - "type": "integer", - "format": "int64", - "nullable": true, - "description": "ID of the attendee", - "minimum": 0 - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Invitation resent successfully", - "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": "Attendee not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "nullable": true - } - } - } - } - } - } - } - }, - "401": { - "description": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants/state": { "put": { "operationId": "room-set-session-state", @@ -15739,672 +20627,15 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/favorite": { - "post": { - "operationId": "room-add-to-favorites", - "summary": "Add a room to the favorites", - "tags": [ - "room" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Successfully added room to favorites", - "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": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - }, - "delete": { - "operationId": "room-remove-from-favorites", - "summary": "Remove a room from the favorites", - "tags": [ - "room" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Successfully removed room from favorites", - "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": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/important": { - "post": { - "operationId": "room-mark-conversation-as-important", - "summary": "Mark a conversation as important (still sending notifications while on DND)", - "description": "Required capability: `important-conversations`", - "tags": [ - "room" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Conversation was marked as important", - "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": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - }, - "delete": { - "operationId": "room-mark-conversation-as-unimportant", - "summary": "Mark a conversation as unimportant (no longer sending notifications while on DND)", - "description": "Required capability: `important-conversations`", - "tags": [ - "room" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Conversation was marked as unimportant", - "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": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/sensitive": { - "post": { - "operationId": "room-mark-conversation-as-sensitive", - "summary": "Mark a conversation as sensitive (no last message is visible / no push preview is shown)", - "description": "Required capability: `sensitive-conversations`", - "tags": [ - "room" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Conversation was marked as sensitive", - "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": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - }, - "delete": { - "operationId": "room-mark-conversation-as-insensitive", - "summary": "Mark a conversation as insensitive (last message is visible / push preview is shown)", - "description": "Required capability: `sensitive-conversations`", - "tags": [ - "room" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Conversation was marked as insensitive", - "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": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/notify": { - "post": { - "operationId": "room-set-notification-level", - "summary": "Update the notification level for a room", + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/permissions/{mode}": { + "put": { + "operationId": "room-set-permissions", + "summary": "Update the permissions of a room", "tags": [ "room" ], "security": [ + {}, { "bearer_auth": [] }, @@ -16419,13 +20650,195 @@ "schema": { "type": "object", "required": [ - "level" + "permissions" ], "properties": { - "level": { + "permissions": { "type": "integer", "format": "int64", - "description": "New level" + "description": "New permissions", + "minimum": 0, + "maximum": 255 + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "mode", + "in": "path", + "description": "Level of the permissions ('call' (removed in Talk 20), 'default')", + "required": true, + "schema": { + "type": "string", + "enum": [ + "call", + "default" + ], + "pattern": "^(call|default)$" + } + }, + { + "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": "Permissions updated successfully", + "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" + } + } + } + } + } + } + } + }, + "400": { + "description": "Updating permissions is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "breakout-room", + "mode", + "type", + "value" + ] + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/attendees/permissions": { + "put": { + "operationId": "room-set-attendee-permissions", + "summary": "Update the permissions of an attendee", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "attendeeId", + "method", + "permissions" + ], + "properties": { + "attendeeId": { + "type": "integer", + "format": "int64", + "description": "ID of the attendee", + "minimum": 0 + }, + "method": { + "type": "string", + "enum": [ + "set", + "remove", + "add" + ], + "description": "Method of updating permissions ('set', 'remove', 'add')" + }, + "permissions": { + "type": "integer", + "format": "int64", + "description": "New permissions", + "minimum": 0, + "maximum": 255 } } } @@ -16467,7 +20880,17 @@ ], "responses": { "200": { - "description": "Notification level updated successfully", + "description": "Permissions updated successfully", + "headers": { + "X-Nextcloud-Has-User-Statuses": { + "schema": { + "type": "boolean", + "enum": [ + true + ] + } + } + }, "content": { "application/json": { "schema": { @@ -16487,7 +20910,10 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "$ref": "#/components/schemas/Room" + "type": "array", + "items": { + "$ref": "#/components/schemas/Participant" + } } } } @@ -16497,7 +20923,7 @@ } }, "400": { - "description": "Updating notification level is not possible", + "description": "Updating permissions is not possible", "content": { "application/json": { "schema": { @@ -16525,7 +20951,12 @@ "error": { "type": "string", "enum": [ - "level" + "participant", + "method", + "moderator", + "room-type", + "type", + "value" ] } } @@ -16537,8 +20968,8 @@ } } }, - "401": { - "description": "Current user is not logged in", + "403": { + "description": "Missing permissions to update permissions", "content": { "application/json": { "schema": { @@ -16557,7 +20988,71 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": {} + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "participant", + "method", + "moderator", + "room-type", + "type", + "value" + ] + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Attendee not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "participant", + "method", + "moderator", + "room-type", + "type", + "value" + ] + } + } + } } } } @@ -16568,14 +21063,16 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/notify-calls": { - "post": { - "operationId": "room-set-notification-calls", - "summary": "Update call notifications", + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/attendees/permissions/all": { + "put": { + "operationId": "room-set-all-attendees-permissions", + "summary": "Update the permissions of all attendees", + "deprecated": true, "tags": [ "room" ], "security": [ + {}, { "bearer_auth": [] }, @@ -16590,13 +21087,25 @@ "schema": { "type": "object", "required": [ - "level" + "method", + "permissions" ], "properties": { - "level": { + "method": { + "type": "string", + "enum": [ + "set", + "remove", + "add" + ], + "description": "Method of updating permissions ('set', 'remove', 'add')" + }, + "permissions": { "type": "integer", "format": "int64", - "description": "New level" + "description": "New permissions", + "minimum": 0, + "maximum": 255 } } } @@ -16638,7 +21147,7 @@ ], "responses": { "200": { - "description": "Call notification level updated successfully", + "description": "Permissions updated successfully", "content": { "application/json": { "schema": { @@ -16668,7 +21177,7 @@ } }, "400": { - "description": "Updating call notification level is not possible", + "description": "Updating permissions is not possible", "content": { "application/json": { "schema": { @@ -16688,18 +21197,7 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "level" - ] - } - } + "nullable": true } } } @@ -16707,34 +21205,6 @@ } } } - }, - "401": { - "description": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } } } } @@ -17438,6 +21908,165 @@ } } }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants/resend-invitations": { + "post": { + "operationId": "room-resend-invitations", + "summary": "Resend invitations", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "attendeeId": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "ID of the attendee", + "minimum": 0 + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Invitation resent successfully", + "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": "Attendee not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/message-expiration": { "post": { "operationId": "room-set-message-expiration", @@ -17585,515 +22214,6 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/capabilities": { - "get": { - "operationId": "room-get-capabilities", - "summary": "Get capabilities for a room", - "description": "See \"Capability handling in federated conversations\" in https://github.com/nextcloud/spreed/issues/10680 to learn which capabilities should be considered from the local server or from the remote server.", - "tags": [ - "room" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": "Get capabilities successfully", - "headers": { - "X-Nextcloud-Talk-Hash": { - "schema": { - "type": "string" - } - }, - "X-Nextcloud-Talk-Proxy-Hash": { - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "anyOf": [ - { - "$ref": "#/components/schemas/Capabilities" - }, - { - "type": "object", - "additionalProperties": true - } - ] - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/mention-permissions": { - "put": { - "operationId": "room-set-mention-permissions", - "summary": "Update the mention permissions for a room", - "tags": [ - "room" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "mentionPermissions" - ], - "properties": { - "mentionPermissions": { - "type": "integer", - "format": "int64", - "enum": [ - 0, - 1 - ], - "description": "New mention permissions" - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Permissions updated successfully", - "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" - } - } - } - } - } - } - } - }, - "400": { - "description": "Updating permissions is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "breakout-room", - "type", - "value" - ] - } - } - } - } - } - } - } - } - } - }, - "401": { - "description": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/archive": { - "post": { - "operationId": "room-archive-conversation", - "summary": "Archive a conversation", - "description": "Required capability: `archived-conversations-v2`", - "tags": [ - "room" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Conversation was archived", - "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": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - }, - "delete": { - "operationId": "room-unarchive-conversation", - "summary": "Unarchive a conversation", - "description": "Required capability: `archived-conversations-v2`", - "tags": [ - "room" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Conversation was unarchived", - "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": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/import-emails": { "post": { "operationId": "room-import-emails-as-participants", @@ -18334,6 +22454,118 @@ } } }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/capabilities": { + "get": { + "operationId": "room-get-capabilities", + "summary": "Get capabilities for a room", + "description": "See \"Capability handling in federated conversations\" in https://github.com/nextcloud/spreed/issues/10680 to learn which capabilities should be considered from the local server or from the remote server.", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": "Get capabilities successfully", + "headers": { + "X-Nextcloud-Talk-Hash": { + "schema": { + "type": "string" + } + }, + "X-Nextcloud-Talk-Proxy-Hash": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "anyOf": [ + { + "$ref": "#/components/schemas/Capabilities" + }, + { + "type": "object", + "additionalProperties": true + } + ] + } + } + } + } + } + } + } + } + } + } + }, "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/meeting": { "post": { "operationId": "room-schedule-meeting", @@ -19508,4238 +23740,6 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}": { - "post": { - "operationId": "chat-send-message", - "summary": "Sends a new chat message to the given room", - "description": "The author and timestamp are automatically set to the current user/guest and time.", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string", - "description": "the message to send" - }, - "actorDisplayName": { - "type": "string", - "default": "", - "description": "for guests" - }, - "referenceId": { - "type": "string", - "default": "", - "description": "for the message to be able to later identify it again" - }, - "replyTo": { - "type": "integer", - "format": "int64", - "default": 0, - "description": "Parent id which this message is a reply to", - "minimum": 0 - }, - "silent": { - "type": "boolean", - "default": false, - "description": "If sent silent the chat message will not create any notifications" - }, - "threadTitle": { - "type": "string", - "default": "", - "description": "Only supported when not replying, when given will create a thread (requires `threads` capability)" - }, - "threadId": { - "type": "integer", - "format": "int64", - "default": 0, - "description": "Thread id which this message is a reply to without quoting a specific message (ignored when $replyTo is given, also requires `threads` capability)" - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": { - "201": { - "description": "Message sent successfully", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/ChatMessageWithParent" - } - ] - } - } - } - } - } - } - } - }, - "400": { - "description": "Sending message is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "404": { - "description": "Actor not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "413": { - "description": "Message too long", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "429": { - "description": "Mention rate limit exceeded (guests only)", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - } - } - }, - "get": { - "operationId": "chat-receive-messages", - "summary": "Receives chat messages from the given room", - "description": "- Receiving the history ($lookIntoFuture=0): The next $limit messages after $lastKnownMessageId will be returned. The new $lastKnownMessageId for the follow up query is available as `X-Chat-Last-Given` header.\n- Looking into the future ($lookIntoFuture=1): If there are currently no messages the response will not be sent immediately. Instead, HTTP connection will be kept open waiting for new messages to arrive and, when they do, then the response will be sent. The connection will not be kept open indefinitely, though; the number of seconds to wait for new messages to arrive can be set using the timeout parameter; the default timeout is 30 seconds, maximum timeout is 60 seconds. If the timeout ends a successful but empty response will be sent. If messages have been returned (status=200) the new $lastKnownMessageId for the follow up query is available as `X-Chat-Last-Given` header.\nThe limit specifies the maximum number of messages that will be returned, although the actual number of returned messages could be lower if some messages are not visible to the participant. Note that if none of the messages are visible to the participant the returned number of messages will be 0, yet the status will still be 200. Also note that `X-Chat-Last-Given` may reference a message not visible and thus not returned, but it should be used nevertheless as the $lastKnownMessageId for the follow-up query.", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "lookIntoFuture", - "in": "query", - "description": "Polling for new messages (1) or getting the history of the chat (0)", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "limit", - "in": "query", - "description": "Number of chat messages to receive (100 by default, 200 at most)", - "schema": { - "type": "integer", - "format": "int64", - "default": 100 - } - }, - { - "name": "lastKnownMessageId", - "in": "query", - "description": "The last known message (serves as offset)", - "schema": { - "type": "integer", - "format": "int64", - "default": 0, - "minimum": 0 - } - }, - { - "name": "lastCommonReadId", - "in": "query", - "description": "The last known common read message (so the response is 200 instead of 304 when it changes even when there are no messages)", - "schema": { - "type": "integer", - "format": "int64", - "default": 0, - "minimum": 0 - } - }, - { - "name": "timeout", - "in": "query", - "description": "Number of seconds to wait for new messages (30 by default, 30 at most)", - "schema": { - "type": "integer", - "format": "int64", - "default": 30, - "minimum": 0, - "maximum": 30 - } - }, - { - "name": "setReadMarker", - "in": "query", - "description": "Automatically set the last read marker when 1, if your client does this itself via chat/{token}/read set to 0", - "schema": { - "type": "integer", - "format": "int64", - "default": 1, - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "includeLastKnown", - "in": "query", - "description": "Include the $lastKnownMessageId in the messages when 1 (default 0)", - "schema": { - "type": "integer", - "format": "int64", - "default": 0, - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "noStatusUpdate", - "in": "query", - "description": "When the user status should not be automatically set to online set to 1 (default 0)", - "schema": { - "type": "integer", - "format": "int64", - "default": 0, - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "markNotificationsAsRead", - "in": "query", - "description": "Set to 0 when notifications should not be marked as read (default 1)", - "schema": { - "type": "integer", - "format": "int64", - "default": 1, - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "threadId", - "in": "query", - "description": "Limit the chat message list to a given thread", - "schema": { - "type": "integer", - "format": "int64", - "default": 0, - "minimum": 0 - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": "Messages returned", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - }, - "X-Chat-Last-Given": { - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChatMessageWithParent" - } - } - } - } - } - } - } - } - }, - "304": { - "description": "No messages" - } - } - }, - "delete": { - "operationId": "chat-clear-history", - "summary": "Clear the chat history", - "tags": [ - "chat" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "History cleared successfully", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, - "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/ChatMessage" - } - } - } - } - } - } - } - }, - "202": { - "description": "History cleared successfully, but Federation or Matterbridge is configured, so the information can be replicated elsewhere", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, - "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/ChatMessage" - } - } - } - } - } - } - } - }, - "403": { - "description": "Missing permissions to clear history", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "nullable": true - } - } - } - } - } - } - } - }, - "401": { - "description": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/share": { - "post": { - "operationId": "chat-share-object-to-chat", - "summary": "Sends a rich-object to the given room", - "description": "The author and timestamp are automatically set to the current user/guest and time.", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "objectType", - "objectId" - ], - "properties": { - "objectType": { - "type": "string", - "description": "Type of the object" - }, - "objectId": { - "type": "string", - "description": "ID of the object" - }, - "metaData": { - "type": "string", - "default": "", - "description": "Additional metadata, sample value: `{\\\"type\\\":\\\"geo-location\\\",\\\"id\\\":\\\"geo:52.5450511,13.3741463\\\",\\\"name\\\":\\\"Nextcloud Berlin Office\\\",\\\"latitude\\\":\\\"52.5450511\\\",\\\"longitude\\\":\\\"13.3741463\\\"}`" - }, - "actorDisplayName": { - "type": "string", - "default": "", - "description": "Guest name" - }, - "referenceId": { - "type": "string", - "default": "", - "description": "Reference ID" - }, - "threadId": { - "type": "integer", - "format": "int64", - "default": 0, - "description": "Thread id which this message is a reply to without quoting a specific message (also requires `threads` capability)" - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "201": { - "description": "Object shared successfully", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/ChatMessageWithParent" - } - ] - } - } - } - } - } - } - } - }, - "400": { - "description": "Sharing object is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "404": { - "description": "Actor not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "413": { - "description": "Message too long", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - } - } - }, - "get": { - "operationId": "chat-get-objects-shared-in-room", - "summary": "Get objects that are shared in the room", - "description": "Federated conversations are supported with the `federated-shared-items` capability", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "objectType", - "in": "query", - "description": "Type of the objects", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "lastKnownMessageId", - "in": "query", - "description": "ID of the last known message", - "schema": { - "type": "integer", - "format": "int64", - "default": 0, - "minimum": 0 - } - }, - { - "name": "limit", - "in": "query", - "description": "Maximum number of objects", - "schema": { - "type": "integer", - "format": "int64", - "default": 100, - "minimum": 1, - "maximum": 200 - } - }, - { - "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": "List of shared objects messages returned", - "headers": { - "X-Chat-Last-Given": { - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ChatMessage" - } - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/summarize": { - "post": { - "operationId": "chat-summarize-chat", - "summary": "Summarize the next bunch of chat messages from a given offset", - "description": "Required capability: `chat-summary-api`", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "fromMessageId" - ], - "properties": { - "fromMessageId": { - "type": "integer", - "format": "int64", - "description": "Offset from where on the summary should be generated", - "minimum": 1 - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "201": { - "description": "Summary was scheduled, use the returned taskId to get the status information and output from the TaskProcessing API: [OCS TaskProcessing API](https://docs.nextcloud.com/server/latest/developer_manual/client_apis/OCS/ocs-taskprocessing-api.html#fetch-a-task-by-id). If the response data contains nextOffset, not all messages could be handled in a single request. After receiving the response a second summary should be requested with the provided nextOffset.", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "taskId" - ], - "properties": { - "taskId": { - "type": "integer", - "format": "int64" - }, - "nextOffset": { - "type": "integer", - "format": "int64" - } - } - } - } - } - } - } - } - } - }, - "400": { - "description": "No AI provider available or summarizing failed", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "ai-no-provider", - "ai-error" - ] - } - } - } - } - } - } - } - } - } - }, - "204": { - "description": "No messages found to summarize" - }, - "500": { - "description": "", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}/context": { - "get": { - "operationId": "chat-get-message-context", - "summary": "Get the context of a message", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "messageId", - "in": "path", - "description": "The focused message which should be in the \"middle\" of the returned context", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - } - }, - { - "name": "limit", - "in": "query", - "description": "Number of chat messages to receive in both directions (50 by default, 100 at most, might return 201 messages)", - "schema": { - "type": "integer", - "format": "int64", - "default": 50, - "minimum": 1, - "maximum": 100 - } - }, - { - "name": "threadId", - "in": "query", - "description": "Limit the chat message list to a given thread", - "schema": { - "type": "integer", - "format": "int64", - "default": 0, - "minimum": 0 - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": "Message context returned", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - }, - "X-Chat-Last-Given": { - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChatMessageWithParent" - } - } - } - } - } - } - } - } - }, - "304": { - "description": "No messages" - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}": { - "delete": { - "operationId": "chat-delete-message", - "summary": "Delete a chat message", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "messageId", - "in": "path", - "description": "ID of the message", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": "Message deleted successfully", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, - "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/ChatMessageWithParent" - } - } - } - } - } - } - } - }, - "202": { - "description": "Message deleted successfully, but a bot or Matterbridge is configured, so the information can be replicated elsewhere", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, - "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/ChatMessageWithParent" - } - } - } - } - } - } - } - }, - "400": { - "description": "Deleting message is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "403": { - "description": "Missing permissions to delete message", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "404": { - "description": "Message not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "405": { - "description": "Deleting this message type is not allowed", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - } - } - }, - "put": { - "operationId": "chat-edit-message", - "summary": "Edit a chat message", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string", - "description": "the message to send" - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "messageId", - "in": "path", - "description": "ID of the message", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": "Message edited successfully", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, - "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/ChatMessageWithParent" - } - } - } - } - } - } - } - }, - "202": { - "description": "Message edited successfully, but a bot or Matterbridge is configured, so the information can be replicated to other services", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, - "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/ChatMessageWithParent" - } - } - } - } - } - } - } - }, - "400": { - "description": "Editing message is not possible, e.g. when the new message is empty or the message is too old", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "403": { - "description": "Missing permissions to edit message", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "404": { - "description": "Message not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "405": { - "description": "Editing this message type is not allowed", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "413": { - "description": "Message too long", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}/reminder": { - "post": { - "operationId": "chat-set-reminder", - "summary": "Set a reminder for a chat message", - "tags": [ - "chat" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "timestamp" - ], - "properties": { - "timestamp": { - "type": "integer", - "format": "int64", - "description": "Timestamp of the reminder", - "minimum": 0 - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "messageId", - "in": "path", - "description": "ID of the message", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": { - "201": { - "description": "Reminder created successfully", - "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/ChatReminder" - } - } - } - } - } - } - } - }, - "404": { - "description": "Message not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "401": { - "description": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - }, - "get": { - "operationId": "chat-get-reminder", - "summary": "Get the reminder for a chat message", - "tags": [ - "chat" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "messageId", - "in": "path", - "description": "ID of the message", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": "Reminder returned", - "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/ChatReminder" - } - } - } - } - } - } - } - }, - "404": { - "description": "Message not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "401": { - "description": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - }, - "delete": { - "operationId": "chat-delete-reminder", - "summary": "Delete a chat reminder", - "tags": [ - "chat" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "messageId", - "in": "path", - "description": "ID of the message", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": "Reminder deleted successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "404": { - "description": "Message not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "401": { - "description": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/upcoming-reminders": { - "get": { - "operationId": "chat-get-upcoming-reminders", - "summary": "Get all upcoming reminders", - "description": "Required capability: `upcoming-reminders`", - "tags": [ - "chat" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "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": "Reminders returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChatReminderUpcoming" - } - } - } - } - } - } - } - } - }, - "401": { - "description": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/read": { - "post": { - "operationId": "chat-set-read-marker", - "summary": "Set the read marker to a specific message", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": false, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "lastReadMessage": { - "type": "integer", - "format": "int64", - "nullable": true, - "default": null, - "description": "ID if the last read message (Optional only with `chat-read-last` capability)", - "minimum": -2 - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": "Read marker set successfully", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, - "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" - } - } - } - } - } - } - } - } - } - }, - "delete": { - "operationId": "chat-mark-unread", - "summary": "Mark a chat as unread", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": "Read marker set successfully", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, - "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" - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/share/overview": { - "get": { - "operationId": "chat-get-objects-shared-in-room-overview", - "summary": "Get objects that are shared in the room overview", - "description": "Federated conversations are supported with the `federated-shared-items` capability", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "limit", - "in": "query", - "description": "Maximum number of objects", - "schema": { - "type": "integer", - "format": "int64", - "default": 7, - "minimum": 1, - "maximum": 20 - } - }, - { - "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": "List of shared objects messages of each type returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChatMessage" - } - } - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}/pin": { - "post": { - "operationId": "chat-pin-message", - "summary": "Pin a message in a chat as a moderator", - "description": "Required capability: `pinned-messages`", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": false, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "pinUntil": { - "type": "integer", - "format": "int64", - "default": 0, - "description": "Unix timestamp when to unpin the message", - "minimum": 0 - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "messageId", - "in": "path", - "description": "ID of the message", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": "Message was pinned successfully", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/ChatMessageWithParent" - } - ] - } - } - } - } - } - } - } - }, - "400": { - "description": "Message could not be pinned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "message", - "until", - "status" - ] - } - } - } - } - } - } - } - } - } - }, - "404": { - "description": "Message was not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "message", - "until", - "status" - ] - } - } - } - } - } - } - } - } - } - } - } - }, - "delete": { - "operationId": "chat-unpin-message", - "summary": "Unpin a message in a chat as a moderator", - "description": "Required capability: `pinned-messages`", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "messageId", - "in": "path", - "description": "ID of the message", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": "Message is not pinned now", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/ChatMessageWithParent" - } - ] - } - } - } - } - } - } - } - }, - "400": { - "description": "Federation request answered with an unknown status code", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "status" - ] - } - } - } - } - } - } - } - } - } - }, - "404": { - "description": "Message was not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "message" - ] - } - } - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}/pin/self": { - "delete": { - "operationId": "chat-hide-pinned-message", - "summary": "Hide a message in a chat as a user", - "description": "Required capability: `pinned-messages`", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "messageId", - "in": "path", - "description": "ID of the message", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": "Pinned message is now hidden", - "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": "Message was not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/mentions": { - "get": { - "operationId": "chat-mentions", - "summary": "Search for mentions", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "search", - "in": "query", - "description": "Text to search for", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "in": "query", - "description": "Maximum number of results", - "schema": { - "type": "integer", - "format": "int64", - "default": 20 - } - }, - { - "name": "includeStatus", - "in": "query", - "description": "Include the user statuses", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": "List of mention suggestions returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChatMentionSuggestion" - } - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/live-transcription/{token}": { - "post": { - "operationId": "live_transcription-enable", - "summary": "Enable the live transcription", - "tags": [ - "live_transcription" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Live transcription enabled successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "nullable": true - } - } - } - } - } - } - } - }, - "400": { - "description": "The participant is not in the call", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "app", - "in-call" - ] - } - } - } - } - } - } - } - } - } - } - } - }, - "delete": { - "operationId": "live_transcription-disable", - "summary": "Disable the live transcription", - "tags": [ - "live_transcription" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Live transcription stopped successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "nullable": true - } - } - } - } - } - } - } - }, - "400": { - "description": "The participant is not in the call", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "app", - "in-call" - ] - } - } - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/live-transcription/languages": { - "get": { - "operationId": "live_transcription-get-available-languages", - "summary": "Get available languages for live transcriptions", - "tags": [ - "live_transcription" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "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": "Available languages got successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/LiveTranscriptionLanguage" - } - } - } - } - } - } - } - } - }, - "400": { - "description": "The external app \"live_transcription\" is not available", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "app" - ] - } - } - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/live-transcription/{token}/language": { - "post": { - "operationId": "live_transcription-set-language", - "summary": "Set language for live transcriptions", - "tags": [ - "live_transcription" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "languageId" - ], - "properties": { - "languageId": { - "type": "string", - "description": "the ID of the language to set" - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Language set successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "nullable": true - } - } - } - } - } - } - } - }, - "400": { - "description": "The external app \"live_transcription\" is not available", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "app" - ] - } - } - } - } - } - } - } - } - } - }, - "403": { - "description": "Participant is not a moderator", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "app" - ] - } - } - } - } - } - } - } - } - } - } - } - } - }, "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/threads/recent": { "get": { "operationId": "thread-get-recent-active-threads", @@ -27184,10 +27184,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" @@ -27226,7 +27226,7 @@ ], "responses": { "200": { - "description": "All bridges stopped successfully", + "description": "Bridge version returned", "content": { "application/json": { "schema": { @@ -27246,7 +27246,15 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "boolean" + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + } + } } } } @@ -27255,8 +27263,8 @@ } } }, - "406": { - "description": "Stopping all bridges is not possible", + "400": { + "description": "Getting bridge version is not possible", "content": { "application/json": { "schema": { @@ -27352,10 +27360,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" @@ -27394,7 +27402,7 @@ ], "responses": { "200": { - "description": "Bridge version returned", + "description": "All bridges stopped successfully", "content": { "application/json": { "schema": { @@ -27414,15 +27422,7 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "object", - "required": [ - "version" - ], - "properties": { - "version": { - "type": "string" - } - } + "type": "boolean" } } } @@ -27431,8 +27431,8 @@ } } }, - "400": { - "description": "Getting bridge version is not possible", + "406": { + "description": "Stopping all bridges is not possible", "content": { "application/json": { "schema": { @@ -29003,6 +29003,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", @@ -29258,241 +29493,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", diff --git a/openapi.json b/openapi.json index b6c8d71ba4..de72365fd1 100644 --- a/openapi.json +++ b/openapi.json @@ -5694,208 +5694,6 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/call/{token}/notification-state": { - "get": { - "operationId": "call_notification-state", - "summary": "Check the expected state of a call notification", - "description": "Required capability: `call-notification-state-api`", - "tags": [ - "call" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "description": "Conversation token to check", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Notification should be kept alive", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "nullable": true - } - } - } - } - } - } - } - }, - "201": { - "description": "Dismiss call notification and show \"Missed call\"-notification instead", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "nullable": true - } - } - } - } - } - } - } - }, - "403": { - "description": "Not logged in, try again with auth data sent", - "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": "Dismiss call notification", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "nullable": true - } - } - } - } - } - } - } - }, - "401": { - "description": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, "/ocs/v2.php/apps/spreed/api/{apiVersion}/call/{token}/download": { "get": { "operationId": "call-download-participants-for-call", @@ -6816,6 +6614,3890 @@ } } }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/call/{token}/notification-state": { + "get": { + "operationId": "call_notification-state", + "summary": "Check the expected state of a call notification", + "description": "Required capability: `call-notification-state-api`", + "tags": [ + "call" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "description": "Conversation token to check", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Notification should be kept alive", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true + } + } + } + } + } + } + } + }, + "201": { + "description": "Dismiss call notification and show \"Missed call\"-notification instead", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true + } + } + } + } + } + } + } + }, + "403": { + "description": "Not logged in, try again with auth data sent", + "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": "Dismiss call notification", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}": { + "post": { + "operationId": "chat-send-message", + "summary": "Sends a new chat message to the given room", + "description": "The author and timestamp are automatically set to the current user/guest and time.", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string", + "description": "the message to send" + }, + "actorDisplayName": { + "type": "string", + "default": "", + "description": "for guests" + }, + "referenceId": { + "type": "string", + "default": "", + "description": "for the message to be able to later identify it again" + }, + "replyTo": { + "type": "integer", + "format": "int64", + "default": 0, + "description": "Parent id which this message is a reply to", + "minimum": 0 + }, + "silent": { + "type": "boolean", + "default": false, + "description": "If sent silent the chat message will not create any notifications" + }, + "threadTitle": { + "type": "string", + "default": "", + "description": "Only supported when not replying, when given will create a thread (requires `threads` capability)" + }, + "threadId": { + "type": "integer", + "format": "int64", + "default": 0, + "description": "Thread id which this message is a reply to without quoting a specific message (ignored when $replyTo is given, also requires `threads` capability)" + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": { + "201": { + "description": "Message sent successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/ChatMessageWithParent" + } + ] + } + } + } + } + } + } + } + }, + "400": { + "description": "Sending message is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Actor not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "413": { + "description": "Message too long", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "429": { + "description": "Mention rate limit exceeded (guests only)", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "get": { + "operationId": "chat-receive-messages", + "summary": "Receives chat messages from the given room", + "description": "- Receiving the history ($lookIntoFuture=0): The next $limit messages after $lastKnownMessageId will be returned. The new $lastKnownMessageId for the follow up query is available as `X-Chat-Last-Given` header.\n- Looking into the future ($lookIntoFuture=1): If there are currently no messages the response will not be sent immediately. Instead, HTTP connection will be kept open waiting for new messages to arrive and, when they do, then the response will be sent. The connection will not be kept open indefinitely, though; the number of seconds to wait for new messages to arrive can be set using the timeout parameter; the default timeout is 30 seconds, maximum timeout is 60 seconds. If the timeout ends a successful but empty response will be sent. If messages have been returned (status=200) the new $lastKnownMessageId for the follow up query is available as `X-Chat-Last-Given` header.\nThe limit specifies the maximum number of messages that will be returned, although the actual number of returned messages could be lower if some messages are not visible to the participant. Note that if none of the messages are visible to the participant the returned number of messages will be 0, yet the status will still be 200. Also note that `X-Chat-Last-Given` may reference a message not visible and thus not returned, but it should be used nevertheless as the $lastKnownMessageId for the follow-up query.", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "lookIntoFuture", + "in": "query", + "description": "Polling for new messages (1) or getting the history of the chat (0)", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of chat messages to receive (100 by default, 200 at most)", + "schema": { + "type": "integer", + "format": "int64", + "default": 100 + } + }, + { + "name": "lastKnownMessageId", + "in": "query", + "description": "The last known message (serves as offset)", + "schema": { + "type": "integer", + "format": "int64", + "default": 0, + "minimum": 0 + } + }, + { + "name": "lastCommonReadId", + "in": "query", + "description": "The last known common read message (so the response is 200 instead of 304 when it changes even when there are no messages)", + "schema": { + "type": "integer", + "format": "int64", + "default": 0, + "minimum": 0 + } + }, + { + "name": "timeout", + "in": "query", + "description": "Number of seconds to wait for new messages (30 by default, 30 at most)", + "schema": { + "type": "integer", + "format": "int64", + "default": 30, + "minimum": 0, + "maximum": 30 + } + }, + { + "name": "setReadMarker", + "in": "query", + "description": "Automatically set the last read marker when 1, if your client does this itself via chat/{token}/read set to 0", + "schema": { + "type": "integer", + "format": "int64", + "default": 1, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "includeLastKnown", + "in": "query", + "description": "Include the $lastKnownMessageId in the messages when 1 (default 0)", + "schema": { + "type": "integer", + "format": "int64", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "noStatusUpdate", + "in": "query", + "description": "When the user status should not be automatically set to online set to 1 (default 0)", + "schema": { + "type": "integer", + "format": "int64", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "markNotificationsAsRead", + "in": "query", + "description": "Set to 0 when notifications should not be marked as read (default 1)", + "schema": { + "type": "integer", + "format": "int64", + "default": 1, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "threadId", + "in": "query", + "description": "Limit the chat message list to a given thread", + "schema": { + "type": "integer", + "format": "int64", + "default": 0, + "minimum": 0 + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": "Messages returned", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + }, + "X-Chat-Last-Given": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatMessageWithParent" + } + } + } + } + } + } + } + } + }, + "304": { + "description": "No messages" + } + } + }, + "delete": { + "operationId": "chat-clear-history", + "summary": "Clear the chat history", + "tags": [ + "chat" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "History cleared successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "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/ChatMessage" + } + } + } + } + } + } + } + }, + "202": { + "description": "History cleared successfully, but Federation or Matterbridge is configured, so the information can be replicated elsewhere", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "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/ChatMessage" + } + } + } + } + } + } + } + }, + "403": { + "description": "Missing permissions to clear history", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/share": { + "post": { + "operationId": "chat-share-object-to-chat", + "summary": "Sends a rich-object to the given room", + "description": "The author and timestamp are automatically set to the current user/guest and time.", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "objectType", + "objectId" + ], + "properties": { + "objectType": { + "type": "string", + "description": "Type of the object" + }, + "objectId": { + "type": "string", + "description": "ID of the object" + }, + "metaData": { + "type": "string", + "default": "", + "description": "Additional metadata, sample value: `{\\\"type\\\":\\\"geo-location\\\",\\\"id\\\":\\\"geo:52.5450511,13.3741463\\\",\\\"name\\\":\\\"Nextcloud Berlin Office\\\",\\\"latitude\\\":\\\"52.5450511\\\",\\\"longitude\\\":\\\"13.3741463\\\"}`" + }, + "actorDisplayName": { + "type": "string", + "default": "", + "description": "Guest name" + }, + "referenceId": { + "type": "string", + "default": "", + "description": "Reference ID" + }, + "threadId": { + "type": "integer", + "format": "int64", + "default": 0, + "description": "Thread id which this message is a reply to without quoting a specific message (also requires `threads` capability)" + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "201": { + "description": "Object shared successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/ChatMessageWithParent" + } + ] + } + } + } + } + } + } + } + }, + "400": { + "description": "Sharing object is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Actor not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "413": { + "description": "Message too long", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "get": { + "operationId": "chat-get-objects-shared-in-room", + "summary": "Get objects that are shared in the room", + "description": "Federated conversations are supported with the `federated-shared-items` capability", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "objectType", + "in": "query", + "description": "Type of the objects", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "lastKnownMessageId", + "in": "query", + "description": "ID of the last known message", + "schema": { + "type": "integer", + "format": "int64", + "default": 0, + "minimum": 0 + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of objects", + "schema": { + "type": "integer", + "format": "int64", + "default": 100, + "minimum": 1, + "maximum": 200 + } + }, + { + "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": "List of shared objects messages returned", + "headers": { + "X-Chat-Last-Given": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ChatMessage" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/summarize": { + "post": { + "operationId": "chat-summarize-chat", + "summary": "Summarize the next bunch of chat messages from a given offset", + "description": "Required capability: `chat-summary-api`", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "fromMessageId" + ], + "properties": { + "fromMessageId": { + "type": "integer", + "format": "int64", + "description": "Offset from where on the summary should be generated", + "minimum": 1 + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "201": { + "description": "Summary was scheduled, use the returned taskId to get the status information and output from the TaskProcessing API: [OCS TaskProcessing API](https://docs.nextcloud.com/server/latest/developer_manual/client_apis/OCS/ocs-taskprocessing-api.html#fetch-a-task-by-id). If the response data contains nextOffset, not all messages could be handled in a single request. After receiving the response a second summary should be requested with the provided nextOffset.", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "taskId" + ], + "properties": { + "taskId": { + "type": "integer", + "format": "int64" + }, + "nextOffset": { + "type": "integer", + "format": "int64" + } + } + } + } + } + } + } + } + } + }, + "400": { + "description": "No AI provider available or summarizing failed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "ai-no-provider", + "ai-error" + ] + } + } + } + } + } + } + } + } + } + }, + "204": { + "description": "No messages found to summarize" + }, + "500": { + "description": "", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}/context": { + "get": { + "operationId": "chat-get-message-context", + "summary": "Get the context of a message", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "The focused message which should be in the \"middle\" of the returned context", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of chat messages to receive in both directions (50 by default, 100 at most, might return 201 messages)", + "schema": { + "type": "integer", + "format": "int64", + "default": 50, + "minimum": 1, + "maximum": 100 + } + }, + { + "name": "threadId", + "in": "query", + "description": "Limit the chat message list to a given thread", + "schema": { + "type": "integer", + "format": "int64", + "default": 0, + "minimum": 0 + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": "Message context returned", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + }, + "X-Chat-Last-Given": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatMessageWithParent" + } + } + } + } + } + } + } + } + }, + "304": { + "description": "No messages" + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}": { + "delete": { + "operationId": "chat-delete-message", + "summary": "Delete a chat message", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": "Message deleted successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "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/ChatMessageWithParent" + } + } + } + } + } + } + } + }, + "202": { + "description": "Message deleted successfully, but a bot or Matterbridge is configured, so the information can be replicated elsewhere", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "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/ChatMessageWithParent" + } + } + } + } + } + } + } + }, + "400": { + "description": "Deleting message is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "403": { + "description": "Missing permissions to delete message", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Message not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "405": { + "description": "Deleting this message type is not allowed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "put": { + "operationId": "chat-edit-message", + "summary": "Edit a chat message", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string", + "description": "the message to send" + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": "Message edited successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "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/ChatMessageWithParent" + } + } + } + } + } + } + } + }, + "202": { + "description": "Message edited successfully, but a bot or Matterbridge is configured, so the information can be replicated to other services", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "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/ChatMessageWithParent" + } + } + } + } + } + } + } + }, + "400": { + "description": "Editing message is not possible, e.g. when the new message is empty or the message is too old", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "403": { + "description": "Missing permissions to edit message", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Message not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "405": { + "description": "Editing this message type is not allowed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "413": { + "description": "Message too long", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}/reminder": { + "post": { + "operationId": "chat-set-reminder", + "summary": "Set a reminder for a chat message", + "tags": [ + "chat" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "timestamp" + ], + "properties": { + "timestamp": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the reminder", + "minimum": 0 + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": { + "201": { + "description": "Reminder created successfully", + "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/ChatReminder" + } + } + } + } + } + } + } + }, + "404": { + "description": "Message not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "get": { + "operationId": "chat-get-reminder", + "summary": "Get the reminder for a chat message", + "tags": [ + "chat" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": "Reminder returned", + "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/ChatReminder" + } + } + } + } + } + } + } + }, + "404": { + "description": "Message not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "chat-delete-reminder", + "summary": "Delete a chat reminder", + "tags": [ + "chat" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": "Reminder deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Message not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/upcoming-reminders": { + "get": { + "operationId": "chat-get-upcoming-reminders", + "summary": "Get all upcoming reminders", + "description": "Required capability: `upcoming-reminders`", + "tags": [ + "chat" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "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": "Reminders returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatReminderUpcoming" + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/read": { + "post": { + "operationId": "chat-set-read-marker", + "summary": "Set the read marker to a specific message", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "lastReadMessage": { + "type": "integer", + "format": "int64", + "nullable": true, + "default": null, + "description": "ID if the last read message (Optional only with `chat-read-last` capability)", + "minimum": -2 + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": "Read marker set successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "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" + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "chat-mark-unread", + "summary": "Mark a chat as unread", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": "Read marker set successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "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" + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/share/overview": { + "get": { + "operationId": "chat-get-objects-shared-in-room-overview", + "summary": "Get objects that are shared in the room overview", + "description": "Federated conversations are supported with the `federated-shared-items` capability", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of objects", + "schema": { + "type": "integer", + "format": "int64", + "default": 7, + "minimum": 1, + "maximum": 20 + } + }, + { + "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": "List of shared objects messages of each type returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatMessage" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}/pin": { + "post": { + "operationId": "chat-pin-message", + "summary": "Pin a message in a chat as a moderator", + "description": "Required capability: `pinned-messages`", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "pinUntil": { + "type": "integer", + "format": "int64", + "default": 0, + "description": "Unix timestamp when to unpin the message", + "minimum": 0 + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": "Message was pinned successfully", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/ChatMessageWithParent" + } + ] + } + } + } + } + } + } + } + }, + "400": { + "description": "Message could not be pinned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "message", + "until", + "status" + ] + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Message was not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "message", + "until", + "status" + ] + } + } + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "chat-unpin-message", + "summary": "Unpin a message in a chat as a moderator", + "description": "Required capability: `pinned-messages`", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": "Message is not pinned now", + "headers": { + "X-Chat-Last-Common-Read": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/ChatMessageWithParent" + } + ] + } + } + } + } + } + } + } + }, + "400": { + "description": "Federation request answered with an unknown status code", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "status" + ] + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Message was not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "message" + ] + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}/pin/self": { + "delete": { + "operationId": "chat-hide-pinned-message", + "summary": "Hide a message in a chat as a user", + "description": "Required capability: `pinned-messages`", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "messageId", + "in": "path", + "description": "ID of the message", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": "Pinned message is now hidden", + "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": "Message was not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/mentions": { + "get": { + "operationId": "chat-mentions", + "summary": "Search for mentions", + "tags": [ + "chat" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "search", + "in": "query", + "description": "Text to search for", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of results", + "schema": { + "type": "integer", + "format": "int64", + "default": 20 + } + }, + { + "name": "includeStatus", + "in": "query", + "description": "Include the user statuses", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": "List of mention suggestions returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatMentionSuggestion" + } + } + } + } + } + } + } + } + } + } + } + }, "/ocs/v2.php/apps/spreed/api/{apiVersion}/file/{fileId}": { "get": { "operationId": "files_integration-get-room-by-file-id", @@ -7317,6 +10999,556 @@ } } }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/live-transcription/{token}": { + "post": { + "operationId": "live_transcription-enable", + "summary": "Enable the live transcription", + "tags": [ + "live_transcription" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Live transcription enabled successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true + } + } + } + } + } + } + } + }, + "400": { + "description": "The participant is not in the call", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "app", + "in-call" + ] + } + } + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "live_transcription-disable", + "summary": "Disable the live transcription", + "tags": [ + "live_transcription" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Live transcription stopped successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true + } + } + } + } + } + } + } + }, + "400": { + "description": "The participant is not in the call", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "app", + "in-call" + ] + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/live-transcription/languages": { + "get": { + "operationId": "live_transcription-get-available-languages", + "summary": "Get available languages for live transcriptions", + "tags": [ + "live_transcription" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "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": "Available languages got successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/LiveTranscriptionLanguage" + } + } + } + } + } + } + } + } + }, + "400": { + "description": "The external app \"live_transcription\" is not available", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "app" + ] + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/live-transcription/{token}/language": { + "post": { + "operationId": "live_transcription-set-language", + "summary": "Set language for live transcriptions", + "tags": [ + "live_transcription" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "languageId" + ], + "properties": { + "languageId": { + "type": "string", + "description": "the ID of the language to set" + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Language set successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true + } + } + } + } + } + } + } + }, + "400": { + "description": "The external app \"live_transcription\" is not available", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "app" + ] + } + } + } + } + } + } + } + } + } + }, + "403": { + "description": "Participant is not a moderator", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "app" + ] + } + } + } + } + } + } + } + } + } + } + } + } + }, "/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge/{token}": { "get": { "operationId": "matterbridge-get-bridge-of-room", @@ -11219,11 +15451,11 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/note-to-self": { + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/breakout-rooms": { "get": { - "operationId": "room-get-note-to-self-conversation", - "summary": "Get the \"Note to self\" conversation for the user", - "description": "It will be automatically created when it is currently missing", + "operationId": "room-get-breakout-rooms", + "summary": "Get breakout rooms", + "description": "All for moderators and in case of \"free selection\", or the assigned breakout room for other participants", "tags": [ "room" ], @@ -11248,6 +15480,15 @@ "default": "v4" } }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, { "name": "OCS-APIRequest", "in": "header", @@ -11261,14 +15502,7 @@ ], "responses": { "200": { - "description": "Room returned successfully", - "headers": { - "X-Nextcloud-Talk-Hash": { - "schema": { - "type": "string" - } - } - }, + "description": "Breakout rooms returned", "content": { "application/json": { "schema": { @@ -11288,7 +15522,48 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "$ref": "#/components/schemas/Room" + "type": "array", + "items": { + "$ref": "#/components/schemas/Room" + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Getting breakout rooms is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } } } } @@ -11757,11 +16032,11 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/breakout-rooms": { + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/note-to-self": { "get": { - "operationId": "room-get-breakout-rooms", - "summary": "Get breakout rooms", - "description": "All for moderators and in case of \"free selection\", or the assigned breakout room for other participants", + "operationId": "room-get-note-to-self-conversation", + "summary": "Get the \"Note to self\" conversation for the user", + "description": "It will be automatically created when it is currently missing", "tags": [ "room" ], @@ -11786,15 +16061,6 @@ "default": "v4" } }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, { "name": "OCS-APIRequest", "in": "header", @@ -11808,40 +16074,14 @@ ], "responses": { "200": { - "description": "Breakout rooms returned", - "content": { - "application/json": { + "description": "Room returned successfully", + "headers": { + "X-Nextcloud-Talk-Hash": { "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Room" - } - } - } - } - } + "type": "string" } } - } - }, - "400": { - "description": "Getting breakout rooms is not possible", + }, "content": { "application/json": { "schema": { @@ -11861,15 +16101,7 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } + "$ref": "#/components/schemas/Room" } } } @@ -11909,16 +16141,14 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/object": { - "delete": { - "operationId": "room-unbind-room-from-object", - "summary": "Unbind a room from its object to prevent automatic retention", - "description": "Required capability: `unbind-conversation`", + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/favorite": { + "post": { + "operationId": "room-add-to-favorites", + "summary": "Add a room to the favorites", "tags": [ "room" ], "security": [ - {}, { "bearer_auth": [] }, @@ -11961,7 +16191,7 @@ ], "responses": { "200": { - "description": "Room successfully unbound", + "description": "Successfully added room to favorites", "content": { "application/json": { "schema": { @@ -11990,8 +16220,86 @@ } } }, - "400": { - "description": "Unbinding room is not possible", + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "room-remove-from-favorites", + "summary": "Remove a room from the favorites", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Successfully removed room from favorites", "content": { "application/json": { "schema": { @@ -12011,18 +16319,7 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "object-type" - ] - } - } + "$ref": "#/components/schemas/Room" } } } @@ -12030,15 +16327,42 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/public": { + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/notify": { "post": { - "operationId": "room-make-public", - "summary": "Allowed guests to join conversation", - "description": "Required capability: `conversation-creation-password` for `string $password` parameter", + "operationId": "room-set-notification-level", + "summary": "Update the notification level for a room", "tags": [ "room" ], @@ -12051,16 +16375,19 @@ } ], "requestBody": { - "required": false, + "required": true, "content": { "application/json": { "schema": { "type": "object", + "required": [ + "level" + ], "properties": { - "password": { - "type": "string", - "default": "", - "description": "New password (only available with `conversation-creation-password` capability)" + "level": { + "type": "integer", + "format": "int64", + "description": "New level" } } } @@ -12102,7 +16429,7 @@ ], "responses": { "200": { - "description": "Allowed guests successfully", + "description": "Notification level updated successfully", "content": { "application/json": { "schema": { @@ -12132,7 +16459,7 @@ } }, "400": { - "description": "Allowing guests is not possible", + "description": "Updating notification level is not possible", "content": { "application/json": { "schema": { @@ -12160,14 +16487,8 @@ "error": { "type": "string", "enum": [ - "breakout-room", - "type", - "value", - "password" + "level" ] - }, - "message": { - "type": "string" } } } @@ -12207,10 +16528,12 @@ } } } - }, - "delete": { - "operationId": "room-make-private", - "summary": "Disallowed guests to join conversation", + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/notify-calls": { + "post": { + "operationId": "room-set-notification-calls", + "summary": "Update call notifications", "tags": [ "room" ], @@ -12222,6 +16545,26 @@ "basic_auth": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "level" + ], + "properties": { + "level": { + "type": "integer", + "format": "int64", + "description": "New level" + } + } + } + } + } + }, "parameters": [ { "name": "apiVersion", @@ -12257,7 +16600,7 @@ ], "responses": { "200": { - "description": "Room unpublished Disallowing guests successfully", + "description": "Call notification level updated successfully", "content": { "application/json": { "schema": { @@ -12287,7 +16630,7 @@ } }, "400": { - "description": "Disallowing guests is not possible", + "description": "Updating call notification level is not possible", "content": { "application/json": { "schema": { @@ -12315,9 +16658,7 @@ "error": { "type": "string", "enum": [ - "breakout-room", - "type", - "value" + "level" ] } } @@ -12505,364 +16846,11 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/read-only": { - "put": { - "operationId": "room-set-read-only", - "summary": "Set read-only state of a room", - "tags": [ - "room" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "state" - ], - "properties": { - "state": { - "type": "integer", - "format": "int64", - "enum": [ - 0, - 1 - ], - "description": "New read-only state" - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Read-only state updated successfully", - "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" - } - } - } - } - } - } - } - }, - "400": { - "description": "Updating read-only state is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "type", - "value" - ] - } - } - } - } - } - } - } - } - } - }, - "401": { - "description": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/listable": { - "put": { - "operationId": "room-set-listable", - "summary": "Make a room listable", - "tags": [ - "room" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "scope" - ], - "properties": { - "scope": { - "type": "integer", - "format": "int64", - "enum": [ - 0, - 1, - 2 - ], - "description": "Scope where the room is listable" - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Made room listable successfully", - "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" - } - } - } - } - } - } - } - }, - "400": { - "description": "Making room listable is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "breakout-room", - "type", - "value" - ] - } - } - } - } - } - } - } - } - } - }, - "401": { - "description": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/password": { - "put": { - "operationId": "room-set-password", - "summary": "Set a password for a room", + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/object": { + "delete": { + "operationId": "room-unbind-room-from-object", + "summary": "Unbind a room from its object to prevent automatic retention", + "description": "Required capability: `unbind-conversation`", "tags": [ "room" ], @@ -12875,25 +16863,6 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "password" - ], - "properties": { - "password": { - "type": "string", - "description": "New password" - } - } - } - } - } - }, "parameters": [ { "name": "apiVersion", @@ -12929,7 +16898,7 @@ ], "responses": { "200": { - "description": "Password set successfully", + "description": "Room successfully unbound", "content": { "application/json": { "schema": { @@ -12959,7 +16928,7 @@ } }, "400": { - "description": "Setting password is not possible", + "description": "Unbinding room is not possible", "content": { "application/json": { "schema": { @@ -12987,175 +16956,7 @@ "error": { "type": "string", "enum": [ - "breakout-room", - "type", - "value" - ] - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/permissions/{mode}": { - "put": { - "operationId": "room-set-permissions", - "summary": "Update the permissions of a room", - "tags": [ - "room" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "permissions" - ], - "properties": { - "permissions": { - "type": "integer", - "format": "int64", - "description": "New permissions", - "minimum": 0, - "maximum": 255 - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "mode", - "in": "path", - "description": "Level of the permissions ('call' (removed in Talk 20), 'default')", - "required": true, - "schema": { - "type": "string", - "enum": [ - "call", - "default" - ], - "pattern": "^(call|default)$" - } - }, - { - "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": "Permissions updated successfully", - "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" - } - } - } - } - } - } - } - }, - "400": { - "description": "Updating permissions is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "breakout-room", - "mode", - "type", - "value" + "object-type" ] } } @@ -14208,15 +18009,15 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/attendees/permissions": { - "put": { - "operationId": "room-set-attendee-permissions", - "summary": "Update the permissions of an attendee", + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/public": { + "post": { + "operationId": "room-make-public", + "summary": "Allowed guests to join conversation", + "description": "Required capability: `conversation-creation-password` for `string $password` parameter", "tags": [ "room" ], "security": [ - {}, { "bearer_auth": [] }, @@ -14225,38 +18026,16 @@ } ], "requestBody": { - "required": true, + "required": false, "content": { "application/json": { "schema": { "type": "object", - "required": [ - "attendeeId", - "method", - "permissions" - ], "properties": { - "attendeeId": { - "type": "integer", - "format": "int64", - "description": "ID of the attendee", - "minimum": 0 - }, - "method": { + "password": { "type": "string", - "enum": [ - "set", - "remove", - "add" - ], - "description": "Method of updating permissions ('set', 'remove', 'add')" - }, - "permissions": { - "type": "integer", - "format": "int64", - "description": "New permissions", - "minimum": 0, - "maximum": 255 + "default": "", + "description": "New password (only available with `conversation-creation-password` capability)" } } } @@ -14298,17 +18077,7 @@ ], "responses": { "200": { - "description": "Permissions updated successfully", - "headers": { - "X-Nextcloud-Has-User-Statuses": { - "schema": { - "type": "boolean", - "enum": [ - true - ] - } - } - }, + "description": "Allowed guests successfully", "content": { "application/json": { "schema": { @@ -14328,10 +18097,7 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Participant" - } + "$ref": "#/components/schemas/Room" } } } @@ -14341,7 +18107,7 @@ } }, "400": { - "description": "Updating permissions is not possible", + "description": "Allowing guests is not possible", "content": { "application/json": { "schema": { @@ -14369,10 +18135,162 @@ "error": { "type": "string", "enum": [ - "participant", - "method", - "moderator", - "room-type", + "breakout-room", + "type", + "value", + "password" + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "room-make-private", + "summary": "Disallowed guests to join conversation", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Room unpublished Disallowing guests successfully", + "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" + } + } + } + } + } + } + } + }, + "400": { + "description": "Disallowing guests is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "breakout-room", "type", "value" ] @@ -14386,8 +18304,8 @@ } } }, - "403": { - "description": "Missing permissions to update permissions", + "401": { + "description": "Current user is not logged in", "content": { "application/json": { "schema": { @@ -14406,71 +18324,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "participant", - "method", - "moderator", - "room-type", - "type", - "value" - ] - } - } - } - } - } - } - } - } - } - }, - "404": { - "description": "Attendee not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "participant", - "method", - "moderator", - "room-type", - "type", - "value" - ] - } - } - } + "data": {} } } } @@ -14481,16 +18335,14 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/attendees/permissions/all": { + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/read-only": { "put": { - "operationId": "room-set-all-attendees-permissions", - "summary": "Update the permissions of all attendees", - "deprecated": true, + "operationId": "room-set-read-only", + "summary": "Set read-only state of a room", "tags": [ "room" ], "security": [ - {}, { "bearer_auth": [] }, @@ -14505,25 +18357,371 @@ "schema": { "type": "object", "required": [ - "method", - "permissions" + "state" ], "properties": { - "method": { - "type": "string", - "enum": [ - "set", - "remove", - "add" - ], - "description": "Method of updating permissions ('set', 'remove', 'add')" - }, - "permissions": { + "state": { "type": "integer", "format": "int64", - "description": "New permissions", - "minimum": 0, - "maximum": 255 + "enum": [ + 0, + 1 + ], + "description": "New read-only state" + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Read-only state updated successfully", + "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" + } + } + } + } + } + } + } + }, + "400": { + "description": "Updating read-only state is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "type", + "value" + ] + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/listable": { + "put": { + "operationId": "room-set-listable", + "summary": "Make a room listable", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "scope" + ], + "properties": { + "scope": { + "type": "integer", + "format": "int64", + "enum": [ + 0, + 1, + 2 + ], + "description": "Scope where the room is listable" + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Made room listable successfully", + "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" + } + } + } + } + } + } + } + }, + "400": { + "description": "Making room listable is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "breakout-room", + "type", + "value" + ] + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/mention-permissions": { + "put": { + "operationId": "room-set-mention-permissions", + "summary": "Update the mention permissions for a room", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "mentionPermissions" + ], + "properties": { + "mentionPermissions": { + "type": "integer", + "format": "int64", + "enum": [ + 0, + 1 + ], + "description": "New mention permissions" } } } @@ -14615,7 +18813,20 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "nullable": true + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "breakout-room", + "type", + "value" + ] + } + } } } } @@ -14623,6 +18834,842 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/password": { + "put": { + "operationId": "room-set-password", + "summary": "Set a password for a room", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "password" + ], + "properties": { + "password": { + "type": "string", + "description": "New password" + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Password set successfully", + "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" + } + } + } + } + } + } + } + }, + "400": { + "description": "Setting password is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "breakout-room", + "type", + "value" + ] + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/archive": { + "post": { + "operationId": "room-archive-conversation", + "summary": "Archive a conversation", + "description": "Required capability: `archived-conversations-v2`", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Conversation was archived", + "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": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "room-unarchive-conversation", + "summary": "Unarchive a conversation", + "description": "Required capability: `archived-conversations-v2`", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Conversation was unarchived", + "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": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/important": { + "post": { + "operationId": "room-mark-conversation-as-important", + "summary": "Mark a conversation as important (still sending notifications while on DND)", + "description": "Required capability: `important-conversations`", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Conversation was marked as important", + "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": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "room-mark-conversation-as-unimportant", + "summary": "Mark a conversation as unimportant (no longer sending notifications while on DND)", + "description": "Required capability: `important-conversations`", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Conversation was marked as unimportant", + "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": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/sensitive": { + "post": { + "operationId": "room-mark-conversation-as-sensitive", + "summary": "Mark a conversation as sensitive (no last message is visible / no push preview is shown)", + "description": "Required capability: `sensitive-conversations`", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Conversation was marked as sensitive", + "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": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "room-mark-conversation-as-insensitive", + "summary": "Mark a conversation as insensitive (last message is visible / push preview is shown)", + "description": "Required capability: `sensitive-conversations`", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Conversation was marked as insensitive", + "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": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -14942,165 +19989,6 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants/resend-invitations": { - "post": { - "operationId": "room-resend-invitations", - "summary": "Resend invitations", - "tags": [ - "room" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": false, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "attendeeId": { - "type": "integer", - "format": "int64", - "nullable": true, - "description": "ID of the attendee", - "minimum": 0 - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Invitation resent successfully", - "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": "Attendee not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "nullable": true - } - } - } - } - } - } - } - }, - "401": { - "description": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants/state": { "put": { "operationId": "room-set-session-state", @@ -15644,672 +20532,15 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/favorite": { - "post": { - "operationId": "room-add-to-favorites", - "summary": "Add a room to the favorites", - "tags": [ - "room" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Successfully added room to favorites", - "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": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - }, - "delete": { - "operationId": "room-remove-from-favorites", - "summary": "Remove a room from the favorites", - "tags": [ - "room" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Successfully removed room from favorites", - "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": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/important": { - "post": { - "operationId": "room-mark-conversation-as-important", - "summary": "Mark a conversation as important (still sending notifications while on DND)", - "description": "Required capability: `important-conversations`", - "tags": [ - "room" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Conversation was marked as important", - "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": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - }, - "delete": { - "operationId": "room-mark-conversation-as-unimportant", - "summary": "Mark a conversation as unimportant (no longer sending notifications while on DND)", - "description": "Required capability: `important-conversations`", - "tags": [ - "room" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Conversation was marked as unimportant", - "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": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/sensitive": { - "post": { - "operationId": "room-mark-conversation-as-sensitive", - "summary": "Mark a conversation as sensitive (no last message is visible / no push preview is shown)", - "description": "Required capability: `sensitive-conversations`", - "tags": [ - "room" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Conversation was marked as sensitive", - "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": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - }, - "delete": { - "operationId": "room-mark-conversation-as-insensitive", - "summary": "Mark a conversation as insensitive (last message is visible / push preview is shown)", - "description": "Required capability: `sensitive-conversations`", - "tags": [ - "room" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Conversation was marked as insensitive", - "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": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/notify": { - "post": { - "operationId": "room-set-notification-level", - "summary": "Update the notification level for a room", + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/permissions/{mode}": { + "put": { + "operationId": "room-set-permissions", + "summary": "Update the permissions of a room", "tags": [ "room" ], "security": [ + {}, { "bearer_auth": [] }, @@ -16324,13 +20555,195 @@ "schema": { "type": "object", "required": [ - "level" + "permissions" ], "properties": { - "level": { + "permissions": { "type": "integer", "format": "int64", - "description": "New level" + "description": "New permissions", + "minimum": 0, + "maximum": 255 + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "mode", + "in": "path", + "description": "Level of the permissions ('call' (removed in Talk 20), 'default')", + "required": true, + "schema": { + "type": "string", + "enum": [ + "call", + "default" + ], + "pattern": "^(call|default)$" + } + }, + { + "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": "Permissions updated successfully", + "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" + } + } + } + } + } + } + } + }, + "400": { + "description": "Updating permissions is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "breakout-room", + "mode", + "type", + "value" + ] + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/attendees/permissions": { + "put": { + "operationId": "room-set-attendee-permissions", + "summary": "Update the permissions of an attendee", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "attendeeId", + "method", + "permissions" + ], + "properties": { + "attendeeId": { + "type": "integer", + "format": "int64", + "description": "ID of the attendee", + "minimum": 0 + }, + "method": { + "type": "string", + "enum": [ + "set", + "remove", + "add" + ], + "description": "Method of updating permissions ('set', 'remove', 'add')" + }, + "permissions": { + "type": "integer", + "format": "int64", + "description": "New permissions", + "minimum": 0, + "maximum": 255 } } } @@ -16372,7 +20785,17 @@ ], "responses": { "200": { - "description": "Notification level updated successfully", + "description": "Permissions updated successfully", + "headers": { + "X-Nextcloud-Has-User-Statuses": { + "schema": { + "type": "boolean", + "enum": [ + true + ] + } + } + }, "content": { "application/json": { "schema": { @@ -16392,7 +20815,10 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "$ref": "#/components/schemas/Room" + "type": "array", + "items": { + "$ref": "#/components/schemas/Participant" + } } } } @@ -16402,7 +20828,7 @@ } }, "400": { - "description": "Updating notification level is not possible", + "description": "Updating permissions is not possible", "content": { "application/json": { "schema": { @@ -16430,7 +20856,12 @@ "error": { "type": "string", "enum": [ - "level" + "participant", + "method", + "moderator", + "room-type", + "type", + "value" ] } } @@ -16442,8 +20873,8 @@ } } }, - "401": { - "description": "Current user is not logged in", + "403": { + "description": "Missing permissions to update permissions", "content": { "application/json": { "schema": { @@ -16462,7 +20893,71 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": {} + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "participant", + "method", + "moderator", + "room-type", + "type", + "value" + ] + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Attendee not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "participant", + "method", + "moderator", + "room-type", + "type", + "value" + ] + } + } + } } } } @@ -16473,14 +20968,16 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/notify-calls": { - "post": { - "operationId": "room-set-notification-calls", - "summary": "Update call notifications", + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/attendees/permissions/all": { + "put": { + "operationId": "room-set-all-attendees-permissions", + "summary": "Update the permissions of all attendees", + "deprecated": true, "tags": [ "room" ], "security": [ + {}, { "bearer_auth": [] }, @@ -16495,13 +20992,25 @@ "schema": { "type": "object", "required": [ - "level" + "method", + "permissions" ], "properties": { - "level": { + "method": { + "type": "string", + "enum": [ + "set", + "remove", + "add" + ], + "description": "Method of updating permissions ('set', 'remove', 'add')" + }, + "permissions": { "type": "integer", "format": "int64", - "description": "New level" + "description": "New permissions", + "minimum": 0, + "maximum": 255 } } } @@ -16543,7 +21052,7 @@ ], "responses": { "200": { - "description": "Call notification level updated successfully", + "description": "Permissions updated successfully", "content": { "application/json": { "schema": { @@ -16573,7 +21082,7 @@ } }, "400": { - "description": "Updating call notification level is not possible", + "description": "Updating permissions is not possible", "content": { "application/json": { "schema": { @@ -16593,18 +21102,7 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "level" - ] - } - } + "nullable": true } } } @@ -16612,34 +21110,6 @@ } } } - }, - "401": { - "description": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } } } } @@ -17343,6 +21813,165 @@ } } }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants/resend-invitations": { + "post": { + "operationId": "room-resend-invitations", + "summary": "Resend invitations", + "tags": [ + "room" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "attendeeId": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "ID of the attendee", + "minimum": 0 + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "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": "Invitation resent successfully", + "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": "Attendee not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/message-expiration": { "post": { "operationId": "room-set-message-expiration", @@ -17490,515 +22119,6 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/capabilities": { - "get": { - "operationId": "room-get-capabilities", - "summary": "Get capabilities for a room", - "description": "See \"Capability handling in federated conversations\" in https://github.com/nextcloud/spreed/issues/10680 to learn which capabilities should be considered from the local server or from the remote server.", - "tags": [ - "room" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": "Get capabilities successfully", - "headers": { - "X-Nextcloud-Talk-Hash": { - "schema": { - "type": "string" - } - }, - "X-Nextcloud-Talk-Proxy-Hash": { - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "anyOf": [ - { - "$ref": "#/components/schemas/Capabilities" - }, - { - "type": "object", - "additionalProperties": true - } - ] - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/mention-permissions": { - "put": { - "operationId": "room-set-mention-permissions", - "summary": "Update the mention permissions for a room", - "tags": [ - "room" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "mentionPermissions" - ], - "properties": { - "mentionPermissions": { - "type": "integer", - "format": "int64", - "enum": [ - 0, - 1 - ], - "description": "New mention permissions" - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Permissions updated successfully", - "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" - } - } - } - } - } - } - } - }, - "400": { - "description": "Updating permissions is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "breakout-room", - "type", - "value" - ] - } - } - } - } - } - } - } - } - } - }, - "401": { - "description": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/archive": { - "post": { - "operationId": "room-archive-conversation", - "summary": "Archive a conversation", - "description": "Required capability: `archived-conversations-v2`", - "tags": [ - "room" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Conversation was archived", - "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": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - }, - "delete": { - "operationId": "room-unarchive-conversation", - "summary": "Unarchive a conversation", - "description": "Required capability: `archived-conversations-v2`", - "tags": [ - "room" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v4" - ], - "default": "v4" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Conversation was unarchived", - "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": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/import-emails": { "post": { "operationId": "room-import-emails-as-participants", @@ -18239,6 +22359,118 @@ } } }, + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/capabilities": { + "get": { + "operationId": "room-get-capabilities", + "summary": "Get capabilities for a room", + "description": "See \"Capability handling in federated conversations\" in https://github.com/nextcloud/spreed/issues/10680 to learn which capabilities should be considered from the local server or from the remote server.", + "tags": [ + "room" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v4" + ], + "default": "v4" + } + }, + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[a-z0-9]{4,30}$" + } + }, + { + "name": "x-nextcloud-federation", + "in": "header", + "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", + "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": "Get capabilities successfully", + "headers": { + "X-Nextcloud-Talk-Hash": { + "schema": { + "type": "string" + } + }, + "X-Nextcloud-Talk-Proxy-Hash": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "anyOf": [ + { + "$ref": "#/components/schemas/Capabilities" + }, + { + "type": "object", + "additionalProperties": true + } + ] + } + } + } + } + } + } + } + } + } + } + }, "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/meeting": { "post": { "operationId": "room-schedule-meeting", @@ -19413,4238 +23645,6 @@ } } }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}": { - "post": { - "operationId": "chat-send-message", - "summary": "Sends a new chat message to the given room", - "description": "The author and timestamp are automatically set to the current user/guest and time.", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string", - "description": "the message to send" - }, - "actorDisplayName": { - "type": "string", - "default": "", - "description": "for guests" - }, - "referenceId": { - "type": "string", - "default": "", - "description": "for the message to be able to later identify it again" - }, - "replyTo": { - "type": "integer", - "format": "int64", - "default": 0, - "description": "Parent id which this message is a reply to", - "minimum": 0 - }, - "silent": { - "type": "boolean", - "default": false, - "description": "If sent silent the chat message will not create any notifications" - }, - "threadTitle": { - "type": "string", - "default": "", - "description": "Only supported when not replying, when given will create a thread (requires `threads` capability)" - }, - "threadId": { - "type": "integer", - "format": "int64", - "default": 0, - "description": "Thread id which this message is a reply to without quoting a specific message (ignored when $replyTo is given, also requires `threads` capability)" - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": { - "201": { - "description": "Message sent successfully", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/ChatMessageWithParent" - } - ] - } - } - } - } - } - } - } - }, - "400": { - "description": "Sending message is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "404": { - "description": "Actor not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "413": { - "description": "Message too long", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "429": { - "description": "Mention rate limit exceeded (guests only)", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - } - } - }, - "get": { - "operationId": "chat-receive-messages", - "summary": "Receives chat messages from the given room", - "description": "- Receiving the history ($lookIntoFuture=0): The next $limit messages after $lastKnownMessageId will be returned. The new $lastKnownMessageId for the follow up query is available as `X-Chat-Last-Given` header.\n- Looking into the future ($lookIntoFuture=1): If there are currently no messages the response will not be sent immediately. Instead, HTTP connection will be kept open waiting for new messages to arrive and, when they do, then the response will be sent. The connection will not be kept open indefinitely, though; the number of seconds to wait for new messages to arrive can be set using the timeout parameter; the default timeout is 30 seconds, maximum timeout is 60 seconds. If the timeout ends a successful but empty response will be sent. If messages have been returned (status=200) the new $lastKnownMessageId for the follow up query is available as `X-Chat-Last-Given` header.\nThe limit specifies the maximum number of messages that will be returned, although the actual number of returned messages could be lower if some messages are not visible to the participant. Note that if none of the messages are visible to the participant the returned number of messages will be 0, yet the status will still be 200. Also note that `X-Chat-Last-Given` may reference a message not visible and thus not returned, but it should be used nevertheless as the $lastKnownMessageId for the follow-up query.", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "lookIntoFuture", - "in": "query", - "description": "Polling for new messages (1) or getting the history of the chat (0)", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "limit", - "in": "query", - "description": "Number of chat messages to receive (100 by default, 200 at most)", - "schema": { - "type": "integer", - "format": "int64", - "default": 100 - } - }, - { - "name": "lastKnownMessageId", - "in": "query", - "description": "The last known message (serves as offset)", - "schema": { - "type": "integer", - "format": "int64", - "default": 0, - "minimum": 0 - } - }, - { - "name": "lastCommonReadId", - "in": "query", - "description": "The last known common read message (so the response is 200 instead of 304 when it changes even when there are no messages)", - "schema": { - "type": "integer", - "format": "int64", - "default": 0, - "minimum": 0 - } - }, - { - "name": "timeout", - "in": "query", - "description": "Number of seconds to wait for new messages (30 by default, 30 at most)", - "schema": { - "type": "integer", - "format": "int64", - "default": 30, - "minimum": 0, - "maximum": 30 - } - }, - { - "name": "setReadMarker", - "in": "query", - "description": "Automatically set the last read marker when 1, if your client does this itself via chat/{token}/read set to 0", - "schema": { - "type": "integer", - "format": "int64", - "default": 1, - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "includeLastKnown", - "in": "query", - "description": "Include the $lastKnownMessageId in the messages when 1 (default 0)", - "schema": { - "type": "integer", - "format": "int64", - "default": 0, - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "noStatusUpdate", - "in": "query", - "description": "When the user status should not be automatically set to online set to 1 (default 0)", - "schema": { - "type": "integer", - "format": "int64", - "default": 0, - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "markNotificationsAsRead", - "in": "query", - "description": "Set to 0 when notifications should not be marked as read (default 1)", - "schema": { - "type": "integer", - "format": "int64", - "default": 1, - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "threadId", - "in": "query", - "description": "Limit the chat message list to a given thread", - "schema": { - "type": "integer", - "format": "int64", - "default": 0, - "minimum": 0 - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": "Messages returned", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - }, - "X-Chat-Last-Given": { - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChatMessageWithParent" - } - } - } - } - } - } - } - } - }, - "304": { - "description": "No messages" - } - } - }, - "delete": { - "operationId": "chat-clear-history", - "summary": "Clear the chat history", - "tags": [ - "chat" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "History cleared successfully", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, - "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/ChatMessage" - } - } - } - } - } - } - } - }, - "202": { - "description": "History cleared successfully, but Federation or Matterbridge is configured, so the information can be replicated elsewhere", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, - "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/ChatMessage" - } - } - } - } - } - } - } - }, - "403": { - "description": "Missing permissions to clear history", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "nullable": true - } - } - } - } - } - } - } - }, - "401": { - "description": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/share": { - "post": { - "operationId": "chat-share-object-to-chat", - "summary": "Sends a rich-object to the given room", - "description": "The author and timestamp are automatically set to the current user/guest and time.", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "objectType", - "objectId" - ], - "properties": { - "objectType": { - "type": "string", - "description": "Type of the object" - }, - "objectId": { - "type": "string", - "description": "ID of the object" - }, - "metaData": { - "type": "string", - "default": "", - "description": "Additional metadata, sample value: `{\\\"type\\\":\\\"geo-location\\\",\\\"id\\\":\\\"geo:52.5450511,13.3741463\\\",\\\"name\\\":\\\"Nextcloud Berlin Office\\\",\\\"latitude\\\":\\\"52.5450511\\\",\\\"longitude\\\":\\\"13.3741463\\\"}`" - }, - "actorDisplayName": { - "type": "string", - "default": "", - "description": "Guest name" - }, - "referenceId": { - "type": "string", - "default": "", - "description": "Reference ID" - }, - "threadId": { - "type": "integer", - "format": "int64", - "default": 0, - "description": "Thread id which this message is a reply to without quoting a specific message (also requires `threads` capability)" - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "201": { - "description": "Object shared successfully", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/ChatMessageWithParent" - } - ] - } - } - } - } - } - } - } - }, - "400": { - "description": "Sharing object is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "404": { - "description": "Actor not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "413": { - "description": "Message too long", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - } - } - }, - "get": { - "operationId": "chat-get-objects-shared-in-room", - "summary": "Get objects that are shared in the room", - "description": "Federated conversations are supported with the `federated-shared-items` capability", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "objectType", - "in": "query", - "description": "Type of the objects", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "lastKnownMessageId", - "in": "query", - "description": "ID of the last known message", - "schema": { - "type": "integer", - "format": "int64", - "default": 0, - "minimum": 0 - } - }, - { - "name": "limit", - "in": "query", - "description": "Maximum number of objects", - "schema": { - "type": "integer", - "format": "int64", - "default": 100, - "minimum": 1, - "maximum": 200 - } - }, - { - "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": "List of shared objects messages returned", - "headers": { - "X-Chat-Last-Given": { - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ChatMessage" - } - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/summarize": { - "post": { - "operationId": "chat-summarize-chat", - "summary": "Summarize the next bunch of chat messages from a given offset", - "description": "Required capability: `chat-summary-api`", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "fromMessageId" - ], - "properties": { - "fromMessageId": { - "type": "integer", - "format": "int64", - "description": "Offset from where on the summary should be generated", - "minimum": 1 - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "201": { - "description": "Summary was scheduled, use the returned taskId to get the status information and output from the TaskProcessing API: [OCS TaskProcessing API](https://docs.nextcloud.com/server/latest/developer_manual/client_apis/OCS/ocs-taskprocessing-api.html#fetch-a-task-by-id). If the response data contains nextOffset, not all messages could be handled in a single request. After receiving the response a second summary should be requested with the provided nextOffset.", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "taskId" - ], - "properties": { - "taskId": { - "type": "integer", - "format": "int64" - }, - "nextOffset": { - "type": "integer", - "format": "int64" - } - } - } - } - } - } - } - } - } - }, - "400": { - "description": "No AI provider available or summarizing failed", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "ai-no-provider", - "ai-error" - ] - } - } - } - } - } - } - } - } - } - }, - "204": { - "description": "No messages found to summarize" - }, - "500": { - "description": "", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}/context": { - "get": { - "operationId": "chat-get-message-context", - "summary": "Get the context of a message", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "messageId", - "in": "path", - "description": "The focused message which should be in the \"middle\" of the returned context", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - } - }, - { - "name": "limit", - "in": "query", - "description": "Number of chat messages to receive in both directions (50 by default, 100 at most, might return 201 messages)", - "schema": { - "type": "integer", - "format": "int64", - "default": 50, - "minimum": 1, - "maximum": 100 - } - }, - { - "name": "threadId", - "in": "query", - "description": "Limit the chat message list to a given thread", - "schema": { - "type": "integer", - "format": "int64", - "default": 0, - "minimum": 0 - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": "Message context returned", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - }, - "X-Chat-Last-Given": { - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChatMessageWithParent" - } - } - } - } - } - } - } - } - }, - "304": { - "description": "No messages" - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}": { - "delete": { - "operationId": "chat-delete-message", - "summary": "Delete a chat message", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "messageId", - "in": "path", - "description": "ID of the message", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": "Message deleted successfully", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, - "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/ChatMessageWithParent" - } - } - } - } - } - } - } - }, - "202": { - "description": "Message deleted successfully, but a bot or Matterbridge is configured, so the information can be replicated elsewhere", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, - "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/ChatMessageWithParent" - } - } - } - } - } - } - } - }, - "400": { - "description": "Deleting message is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "403": { - "description": "Missing permissions to delete message", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "404": { - "description": "Message not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "405": { - "description": "Deleting this message type is not allowed", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - } - } - }, - "put": { - "operationId": "chat-edit-message", - "summary": "Edit a chat message", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string", - "description": "the message to send" - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "messageId", - "in": "path", - "description": "ID of the message", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": "Message edited successfully", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, - "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/ChatMessageWithParent" - } - } - } - } - } - } - } - }, - "202": { - "description": "Message edited successfully, but a bot or Matterbridge is configured, so the information can be replicated to other services", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, - "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/ChatMessageWithParent" - } - } - } - } - } - } - } - }, - "400": { - "description": "Editing message is not possible, e.g. when the new message is empty or the message is too old", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "403": { - "description": "Missing permissions to edit message", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "404": { - "description": "Message not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "405": { - "description": "Editing this message type is not allowed", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "413": { - "description": "Message too long", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}/reminder": { - "post": { - "operationId": "chat-set-reminder", - "summary": "Set a reminder for a chat message", - "tags": [ - "chat" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "timestamp" - ], - "properties": { - "timestamp": { - "type": "integer", - "format": "int64", - "description": "Timestamp of the reminder", - "minimum": 0 - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "messageId", - "in": "path", - "description": "ID of the message", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": { - "201": { - "description": "Reminder created successfully", - "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/ChatReminder" - } - } - } - } - } - } - } - }, - "404": { - "description": "Message not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "401": { - "description": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - }, - "get": { - "operationId": "chat-get-reminder", - "summary": "Get the reminder for a chat message", - "tags": [ - "chat" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "messageId", - "in": "path", - "description": "ID of the message", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": "Reminder returned", - "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/ChatReminder" - } - } - } - } - } - } - } - }, - "404": { - "description": "Message not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "401": { - "description": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - }, - "delete": { - "operationId": "chat-delete-reminder", - "summary": "Delete a chat reminder", - "tags": [ - "chat" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "messageId", - "in": "path", - "description": "ID of the message", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": "Reminder deleted successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "404": { - "description": "Message not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "401": { - "description": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/upcoming-reminders": { - "get": { - "operationId": "chat-get-upcoming-reminders", - "summary": "Get all upcoming reminders", - "description": "Required capability: `upcoming-reminders`", - "tags": [ - "chat" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "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": "Reminders returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChatReminderUpcoming" - } - } - } - } - } - } - } - } - }, - "401": { - "description": "Current user is not logged in", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/read": { - "post": { - "operationId": "chat-set-read-marker", - "summary": "Set the read marker to a specific message", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": false, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "lastReadMessage": { - "type": "integer", - "format": "int64", - "nullable": true, - "default": null, - "description": "ID if the last read message (Optional only with `chat-read-last` capability)", - "minimum": -2 - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": "Read marker set successfully", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, - "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" - } - } - } - } - } - } - } - } - } - }, - "delete": { - "operationId": "chat-mark-unread", - "summary": "Mark a chat as unread", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": "Read marker set successfully", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, - "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" - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/share/overview": { - "get": { - "operationId": "chat-get-objects-shared-in-room-overview", - "summary": "Get objects that are shared in the room overview", - "description": "Federated conversations are supported with the `federated-shared-items` capability", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "limit", - "in": "query", - "description": "Maximum number of objects", - "schema": { - "type": "integer", - "format": "int64", - "default": 7, - "minimum": 1, - "maximum": 20 - } - }, - { - "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": "List of shared objects messages of each type returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChatMessage" - } - } - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}/pin": { - "post": { - "operationId": "chat-pin-message", - "summary": "Pin a message in a chat as a moderator", - "description": "Required capability: `pinned-messages`", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": false, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "pinUntil": { - "type": "integer", - "format": "int64", - "default": 0, - "description": "Unix timestamp when to unpin the message", - "minimum": 0 - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "messageId", - "in": "path", - "description": "ID of the message", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": "Message was pinned successfully", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/ChatMessageWithParent" - } - ] - } - } - } - } - } - } - } - }, - "400": { - "description": "Message could not be pinned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "message", - "until", - "status" - ] - } - } - } - } - } - } - } - } - } - }, - "404": { - "description": "Message was not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "message", - "until", - "status" - ] - } - } - } - } - } - } - } - } - } - } - } - }, - "delete": { - "operationId": "chat-unpin-message", - "summary": "Unpin a message in a chat as a moderator", - "description": "Required capability: `pinned-messages`", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "messageId", - "in": "path", - "description": "ID of the message", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": "Message is not pinned now", - "headers": { - "X-Chat-Last-Common-Read": { - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/ChatMessageWithParent" - } - ] - } - } - } - } - } - } - } - }, - "400": { - "description": "Federation request answered with an unknown status code", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "status" - ] - } - } - } - } - } - } - } - } - } - }, - "404": { - "description": "Message was not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "message" - ] - } - } - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/{messageId}/pin/self": { - "delete": { - "operationId": "chat-hide-pinned-message", - "summary": "Hide a message in a chat as a user", - "description": "Required capability: `pinned-messages`", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "messageId", - "in": "path", - "description": "ID of the message", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": "Pinned message is now hidden", - "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": "Message was not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } - } - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/mentions": { - "get": { - "operationId": "chat-mentions", - "summary": "Search for mentions", - "tags": [ - "chat" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "name": "search", - "in": "query", - "description": "Text to search for", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "in": "query", - "description": "Maximum number of results", - "schema": { - "type": "integer", - "format": "int64", - "default": 20 - } - }, - { - "name": "includeStatus", - "in": "query", - "description": "Include the user statuses", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "name": "x-nextcloud-federation", - "in": "header", - "description": "Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request", - "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": "List of mention suggestions returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChatMentionSuggestion" - } - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/live-transcription/{token}": { - "post": { - "operationId": "live_transcription-enable", - "summary": "Enable the live transcription", - "tags": [ - "live_transcription" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Live transcription enabled successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "nullable": true - } - } - } - } - } - } - } - }, - "400": { - "description": "The participant is not in the call", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "app", - "in-call" - ] - } - } - } - } - } - } - } - } - } - } - } - }, - "delete": { - "operationId": "live_transcription-disable", - "summary": "Disable the live transcription", - "tags": [ - "live_transcription" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Live transcription stopped successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "nullable": true - } - } - } - } - } - } - } - }, - "400": { - "description": "The participant is not in the call", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "app", - "in-call" - ] - } - } - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/live-transcription/languages": { - "get": { - "operationId": "live_transcription-get-available-languages", - "summary": "Get available languages for live transcriptions", - "tags": [ - "live_transcription" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "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": "Available languages got successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/LiveTranscriptionLanguage" - } - } - } - } - } - } - } - } - }, - "400": { - "description": "The external app \"live_transcription\" is not available", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "app" - ] - } - } - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/apps/spreed/api/{apiVersion}/live-transcription/{token}/language": { - "post": { - "operationId": "live_transcription-set-language", - "summary": "Set language for live transcriptions", - "tags": [ - "live_transcription" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "languageId" - ], - "properties": { - "languageId": { - "type": "string", - "description": "the ID of the language to set" - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v1" - ], - "default": "v1" - } - }, - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z0-9]{4,30}$" - } - }, - { - "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": "Language set successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "nullable": true - } - } - } - } - } - } - } - }, - "400": { - "description": "The external app \"live_transcription\" is not available", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "app" - ] - } - } - } - } - } - } - } - } - } - }, - "403": { - "description": "Participant is not a moderator", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string", - "enum": [ - "app" - ] - } - } - } - } - } - } - } - } - } - } - } - } - }, "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/threads/recent": { "get": { "operationId": "thread-get-recent-active-threads", diff --git a/src/types/openapi/openapi-administration.ts b/src/types/openapi/openapi-administration.ts index 9c3ccd6a02..35ebcb10a4 100644 --- a/src/types/openapi/openapi-administration.ts +++ b/src/types/openapi/openapi-administration.ts @@ -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; diff --git a/src/types/openapi/openapi-backend-sipbridge.ts b/src/types/openapi/openapi-backend-sipbridge.ts index f465b58780..9b466d3ba2 100644 --- a/src/types/openapi/openapi-backend-sipbridge.ts +++ b/src/types/openapi/openapi-backend-sipbridge.ts @@ -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; diff --git a/src/types/openapi/openapi-full.ts b/src/types/openapi/openapi-full.ts index 20053457d8..cde479c18a 100644 --- a/src/types/openapi/openapi-full.ts +++ b/src/types/openapi/openapi-full.ts @@ -301,26 +301,6 @@ export type paths = { patch?: never; trace?: never; }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/call/{token}/notification-state": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Check the expected state of a call notification - * @description Required capability: `call-notification-state-api` - */ - get: operations["call_notification-state"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; "/ocs/v2.php/apps/spreed/api/{apiVersion}/call/{token}/download": { parameters: { query?: never; @@ -394,7 +374,7 @@ export type paths = { patch?: never; trace?: never; }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/file/{fileId}": { + "/ocs/v2.php/apps/spreed/api/{apiVersion}/call/{token}/notification-state": { parameters: { query?: never; header?: never; @@ -402,12 +382,10 @@ export type paths = { cookie?: never; }; /** - * Get the token of the room associated to the given file id - * @description This is the counterpart of self::getRoomByShareToken() for file ids instead of share tokens, although both return the same room token if the given file id and share token refer to the same file. - * If there is no room associated to the given file id a new room is created; the new room is a public room associated with a "file" object with the given file id. Unlike normal rooms in which the owner is the user that created the room these are special rooms without owner (although self joined users with direct access to the file become persistent participants automatically when they join until they explicitly leave or no longer have access to the file). - * In any case, to create or even get the token of the room, the file must be shared and the user must be the owner of a public share of the file (like a link share, for example) or have direct access to that file; an error is returned otherwise. A user has direct access to a file if they have access to it (or to an ancestor) through a user, group, circle or room share (but not through a link share, for example), or if they are the owner of such a file. + * Check the expected state of a call notification + * @description Required capability: `call-notification-state-api` */ - get: operations["files_integration-get-room-by-file-id"]; + get: operations["call_notification-state"]; put?: never; post?: never; delete?: never; @@ -416,989 +394,6 @@ export type paths = { patch?: never; trace?: never; }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/publicshare/{shareToken}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Returns the token of the room associated to the file of the given share token - * @description This is the counterpart of self::getRoomByFileId() for share tokens instead of file ids, although both return the same room token if the given file id and share token refer to the same file. - * If there is no room associated to the file id of the given share token a new room is created; the new room is a public room associated with a "file" object with the file id of the given share token. Unlike normal rooms in which the owner is the user that created the room these are special rooms without owner (although self joined users with direct access to the file become persistent participants automatically when they join until they explicitly leave or no longer have access to the file). - * In any case, to create or even get the token of the room, the file must be publicly shared (like a link share, for example); an error is returned otherwise. - * Besides the token of the room this also returns the current user ID and display name, if any; this is needed by the Talk sidebar to know the actual current user, as the public share page uses the incognito mode and thus logged-in users as seen as guests. - */ - get: operations["files_integration-get-room-by-share-token"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/guest/{token}/name": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Set the display name as a guest */ - post: operations["guest-set-display-name"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge/{token}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get bridge information of one room */ - get: operations["matterbridge-get-bridge-of-room"]; - /** Edit bridge information of one room */ - put: operations["matterbridge-edit-bridge-of-room"]; - post?: never; - /** Delete bridge of one room */ - delete: operations["matterbridge-delete-bridge-of-room"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge/{token}/process": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get bridge process information */ - get: operations["matterbridge-get-bridge-process-state"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/poll/{token}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Create a poll */ - post: operations["poll-create-poll"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/poll/{token}/draft/{pollId}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Modify a draft poll - * @description Required capability: `edit-draft-poll` - */ - post: operations["poll-update-draft-poll"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/poll/{token}/drafts": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Get all drafted polls - * @description Required capability: `talk-polls-drafts` - */ - get: operations["poll-get-all-draft-polls"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/poll/{token}/{pollId}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get a poll */ - get: operations["poll-show-poll"]; - put?: never; - /** Vote on a poll */ - post: operations["poll-vote-poll"]; - /** Close a poll */ - delete: operations["poll-close-poll"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/publicshareauth": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Creates a new room for video verification (requesting the password of a share) - * @description The new room is a public room associated with a "share:password" object with the ID of the share token. Unlike normal rooms in which the owner is the user that created the room these are special rooms always created by a guest or user on behalf of a registered user, the sharer, who will be the owner of the room. - * The share must have "send password by Talk" enabled; an error is returned otherwise. - */ - post: operations["public_share_auth-create-room"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/reaction/{token}/{messageId}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get a list of reactions for a message */ - get: operations["reaction-get-reactions"]; - put?: never; - /** Add a reaction to a message */ - post: operations["reaction-react"]; - /** Delete a reaction from a message */ - delete: operations["reaction-delete"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/recording/{token}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Start the recording */ - post: operations["recording-start"]; - /** Stop the recording */ - delete: operations["recording-stop"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/recording/{token}/notification": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post?: never; - /** Dismiss the store call recording notification */ - delete: operations["recording-notification-dismiss"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/recording/{token}/share-chat": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Share the recorded file to the chat */ - post: operations["recording-share-to-chat"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get all currently existent rooms which the user has joined */ - get: operations["room-get-rooms"]; - put?: never; - /** - * Create a room with a user, a group or a circle - * @description With the `conversation-creation-all` capability a lot of new options where introduced. Before that only `$roomType`, `$roomName`, `$objectType` and `$objectId` were supported all the time, and `$password` with the `conversation-creation-password` capability In case the `$roomType` is {@see Room::TYPE_ONE_TO_ONE} only the `$invite` or `$participants` parameter is supported. - */ - post: operations["room-create-room"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/listed-room": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get listed rooms with optional search term */ - get: operations["room-get-listed-rooms"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/note-to-self": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Get the "Note to self" conversation for the user - * @description It will be automatically created when it is currently missing - */ - get: operations["room-get-note-to-self-conversation"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get a room */ - get: operations["room-get-single-room"]; - /** Rename a room */ - put: operations["room-rename-room"]; - post?: never; - /** Delete a room */ - delete: operations["room-delete-room"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/breakout-rooms": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Get breakout rooms - * @description All for moderators and in case of "free selection", or the assigned breakout room for other participants - */ - get: operations["room-get-breakout-rooms"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/object": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post?: never; - /** - * Unbind a room from its object to prevent automatic retention - * @description Required capability: `unbind-conversation` - */ - delete: operations["room-unbind-room-from-object"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/public": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Allowed guests to join conversation - * @description Required capability: `conversation-creation-password` for `string $password` parameter - */ - post: operations["room-make-public"]; - /** Disallowed guests to join conversation */ - delete: operations["room-make-private"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/description": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Update the description of a room */ - put: operations["room-set-description"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/read-only": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Set read-only state of a room */ - put: operations["room-set-read-only"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/listable": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Make a room listable */ - put: operations["room-set-listable"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/password": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Set a password for a room */ - put: operations["room-set-password"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/permissions/{mode}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Update the permissions of a room */ - put: operations["room-set-permissions"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get a list of participants for a room */ - get: operations["room-get-participants"]; - put?: never; - /** Add a participant to a room */ - post: operations["room-add-participant-to-room"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/breakout-rooms/participants": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get the breakout room participants for a room */ - get: operations["room-get-breakout-room-participants"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants/self": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post?: never; - /** Remove the current user from a room */ - delete: operations["room-remove-self-from-room"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/attendees": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post?: never; - /** Remove an attendee from a room */ - delete: operations["room-remove-attendee-from-room"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/attendees/permissions": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Update the permissions of an attendee */ - put: operations["room-set-attendee-permissions"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/attendees/permissions/all": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** - * Update the permissions of all attendees - * @deprecated - */ - put: operations["room-set-all-attendees-permissions"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants/active": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Join a room */ - post: operations["room-join-room"]; - /** Leave a room */ - delete: operations["room-leave-room"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants/resend-invitations": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Resend invitations */ - post: operations["room-resend-invitations"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants/state": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Set active state for a session */ - put: operations["room-set-session-state"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/moderators": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Promote an attendee to moderator */ - post: operations["room-promote-moderator"]; - /** Demote an attendee from moderator */ - delete: operations["room-demote-moderator"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/favorite": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Add a room to the favorites */ - post: operations["room-add-to-favorites"]; - /** Remove a room from the favorites */ - delete: operations["room-remove-from-favorites"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/important": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Mark a conversation as important (still sending notifications while on DND) - * @description Required capability: `important-conversations` - */ - post: operations["room-mark-conversation-as-important"]; - /** - * Mark a conversation as unimportant (no longer sending notifications while on DND) - * @description Required capability: `important-conversations` - */ - delete: operations["room-mark-conversation-as-unimportant"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/sensitive": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Mark a conversation as sensitive (no last message is visible / no push preview is shown) - * @description Required capability: `sensitive-conversations` - */ - post: operations["room-mark-conversation-as-sensitive"]; - /** - * Mark a conversation as insensitive (last message is visible / push preview is shown) - * @description Required capability: `sensitive-conversations` - */ - delete: operations["room-mark-conversation-as-insensitive"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/notify": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Update the notification level for a room */ - post: operations["room-set-notification-level"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/notify-calls": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Update call notifications */ - post: operations["room-set-notification-calls"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/webinar/lobby": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Update the lobby state for a room */ - put: operations["room-set-lobby"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/webinar/sip": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Update SIP enabled state */ - put: operations["room-setsip-enabled"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/recording-consent": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Set recording consent requirement for this conversation */ - put: operations["room-set-recording-consent"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/message-expiration": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Update message expiration time */ - post: operations["room-set-message-expiration"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/capabilities": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Get capabilities for a room - * @description See "Capability handling in federated conversations" in https://github.com/nextcloud/spreed/issues/10680 to learn which capabilities should be considered from the local server or from the remote server. - */ - get: operations["room-get-capabilities"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/mention-permissions": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Update the mention permissions for a room */ - put: operations["room-set-mention-permissions"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/archive": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Archive a conversation - * @description Required capability: `archived-conversations-v2` - */ - post: operations["room-archive-conversation"]; - /** - * Unarchive a conversation - * @description Required capability: `archived-conversations-v2` - */ - delete: operations["room-unarchive-conversation"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/import-emails": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Import a list of email attendees - * @description Content format is comma separated values: - Header line is required and must match `"email","name"` or `"email"` - One entry per line (e.g. `"John Doe","john@example.tld"`) - * Required capability: `email-csv-import` - */ - post: operations["room-import-emails-as-participants"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/meeting": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Schedule a meeting for a conversation - * @description Required capability: `schedule-meeting` - */ - post: operations["room-schedule-meeting"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/settings/user": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Update user setting */ - post: operations["settings-set-user-setting"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/signaling/settings": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get the signaling settings */ - get: operations["signaling-get-settings"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/signaling/{token}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get signaling messages */ - get: operations["signaling-pull-messages"]; - put?: never; - /** Send signaling messages */ - post: operations["signaling-send-messages"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/temp-user-avatar": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Upload your avatar as a user */ - post: operations["temp_avatar-post-avatar"]; - /** Delete your avatar as a user */ - delete: operations["temp_avatar-delete-avatar"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}": { parameters: { query?: never; @@ -1643,6 +638,68 @@ export type paths = { patch?: never; trace?: never; }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/file/{fileId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get the token of the room associated to the given file id + * @description This is the counterpart of self::getRoomByShareToken() for file ids instead of share tokens, although both return the same room token if the given file id and share token refer to the same file. + * If there is no room associated to the given file id a new room is created; the new room is a public room associated with a "file" object with the given file id. Unlike normal rooms in which the owner is the user that created the room these are special rooms without owner (although self joined users with direct access to the file become persistent participants automatically when they join until they explicitly leave or no longer have access to the file). + * In any case, to create or even get the token of the room, the file must be shared and the user must be the owner of a public share of the file (like a link share, for example) or have direct access to that file; an error is returned otherwise. A user has direct access to a file if they have access to it (or to an ancestor) through a user, group, circle or room share (but not through a link share, for example), or if they are the owner of such a file. + */ + get: operations["files_integration-get-room-by-file-id"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/publicshare/{shareToken}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Returns the token of the room associated to the file of the given share token + * @description This is the counterpart of self::getRoomByFileId() for share tokens instead of file ids, although both return the same room token if the given file id and share token refer to the same file. + * If there is no room associated to the file id of the given share token a new room is created; the new room is a public room associated with a "file" object with the file id of the given share token. Unlike normal rooms in which the owner is the user that created the room these are special rooms without owner (although self joined users with direct access to the file become persistent participants automatically when they join until they explicitly leave or no longer have access to the file). + * In any case, to create or even get the token of the room, the file must be publicly shared (like a link share, for example); an error is returned otherwise. + * Besides the token of the room this also returns the current user ID and display name, if any; this is needed by the Talk sidebar to know the actual current user, as the public share page uses the incognito mode and thus logged-in users as seen as guests. + */ + get: operations["files_integration-get-room-by-share-token"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/guest/{token}/name": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Set the display name as a guest */ + post: operations["guest-set-display-name"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/ocs/v2.php/apps/spreed/api/{apiVersion}/live-transcription/{token}": { parameters: { query?: never; @@ -1695,6 +752,949 @@ export type paths = { patch?: never; trace?: never; }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge/{token}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get bridge information of one room */ + get: operations["matterbridge-get-bridge-of-room"]; + /** Edit bridge information of one room */ + put: operations["matterbridge-edit-bridge-of-room"]; + post?: never; + /** Delete bridge of one room */ + delete: operations["matterbridge-delete-bridge-of-room"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge/{token}/process": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get bridge process information */ + get: operations["matterbridge-get-bridge-process-state"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/poll/{token}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Create a poll */ + post: operations["poll-create-poll"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/poll/{token}/draft/{pollId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Modify a draft poll + * @description Required capability: `edit-draft-poll` + */ + post: operations["poll-update-draft-poll"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/poll/{token}/drafts": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get all drafted polls + * @description Required capability: `talk-polls-drafts` + */ + get: operations["poll-get-all-draft-polls"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/poll/{token}/{pollId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get a poll */ + get: operations["poll-show-poll"]; + put?: never; + /** Vote on a poll */ + post: operations["poll-vote-poll"]; + /** Close a poll */ + delete: operations["poll-close-poll"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/publicshareauth": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Creates a new room for video verification (requesting the password of a share) + * @description The new room is a public room associated with a "share:password" object with the ID of the share token. Unlike normal rooms in which the owner is the user that created the room these are special rooms always created by a guest or user on behalf of a registered user, the sharer, who will be the owner of the room. + * The share must have "send password by Talk" enabled; an error is returned otherwise. + */ + post: operations["public_share_auth-create-room"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/reaction/{token}/{messageId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get a list of reactions for a message */ + get: operations["reaction-get-reactions"]; + put?: never; + /** Add a reaction to a message */ + post: operations["reaction-react"]; + /** Delete a reaction from a message */ + delete: operations["reaction-delete"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/recording/{token}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Start the recording */ + post: operations["recording-start"]; + /** Stop the recording */ + delete: operations["recording-stop"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/recording/{token}/notification": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** Dismiss the store call recording notification */ + delete: operations["recording-notification-dismiss"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/recording/{token}/share-chat": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Share the recorded file to the chat */ + post: operations["recording-share-to-chat"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get all currently existent rooms which the user has joined */ + get: operations["room-get-rooms"]; + put?: never; + /** + * Create a room with a user, a group or a circle + * @description With the `conversation-creation-all` capability a lot of new options where introduced. Before that only `$roomType`, `$roomName`, `$objectType` and `$objectId` were supported all the time, and `$password` with the `conversation-creation-password` capability In case the `$roomType` is {@see Room::TYPE_ONE_TO_ONE} only the `$invite` or `$participants` parameter is supported. + */ + post: operations["room-create-room"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/listed-room": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get listed rooms with optional search term */ + get: operations["room-get-listed-rooms"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/breakout-rooms": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get breakout rooms + * @description All for moderators and in case of "free selection", or the assigned breakout room for other participants + */ + get: operations["room-get-breakout-rooms"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get a room */ + get: operations["room-get-single-room"]; + /** Rename a room */ + put: operations["room-rename-room"]; + post?: never; + /** Delete a room */ + delete: operations["room-delete-room"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/note-to-self": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get the "Note to self" conversation for the user + * @description It will be automatically created when it is currently missing + */ + get: operations["room-get-note-to-self-conversation"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/favorite": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Add a room to the favorites */ + post: operations["room-add-to-favorites"]; + /** Remove a room from the favorites */ + delete: operations["room-remove-from-favorites"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/notify": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Update the notification level for a room */ + post: operations["room-set-notification-level"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/notify-calls": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Update call notifications */ + post: operations["room-set-notification-calls"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/description": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Update the description of a room */ + put: operations["room-set-description"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/object": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** + * Unbind a room from its object to prevent automatic retention + * @description Required capability: `unbind-conversation` + */ + delete: operations["room-unbind-room-from-object"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get a list of participants for a room */ + get: operations["room-get-participants"]; + put?: never; + /** Add a participant to a room */ + post: operations["room-add-participant-to-room"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/breakout-rooms/participants": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get the breakout room participants for a room */ + get: operations["room-get-breakout-room-participants"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants/self": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** Remove the current user from a room */ + delete: operations["room-remove-self-from-room"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/attendees": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** Remove an attendee from a room */ + delete: operations["room-remove-attendee-from-room"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/public": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Allowed guests to join conversation + * @description Required capability: `conversation-creation-password` for `string $password` parameter + */ + post: operations["room-make-public"]; + /** Disallowed guests to join conversation */ + delete: operations["room-make-private"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/read-only": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Set read-only state of a room */ + put: operations["room-set-read-only"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/listable": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Make a room listable */ + put: operations["room-set-listable"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/mention-permissions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Update the mention permissions for a room */ + put: operations["room-set-mention-permissions"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/password": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Set a password for a room */ + put: operations["room-set-password"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/archive": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Archive a conversation + * @description Required capability: `archived-conversations-v2` + */ + post: operations["room-archive-conversation"]; + /** + * Unarchive a conversation + * @description Required capability: `archived-conversations-v2` + */ + delete: operations["room-unarchive-conversation"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/important": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Mark a conversation as important (still sending notifications while on DND) + * @description Required capability: `important-conversations` + */ + post: operations["room-mark-conversation-as-important"]; + /** + * Mark a conversation as unimportant (no longer sending notifications while on DND) + * @description Required capability: `important-conversations` + */ + delete: operations["room-mark-conversation-as-unimportant"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/sensitive": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Mark a conversation as sensitive (no last message is visible / no push preview is shown) + * @description Required capability: `sensitive-conversations` + */ + post: operations["room-mark-conversation-as-sensitive"]; + /** + * Mark a conversation as insensitive (last message is visible / push preview is shown) + * @description Required capability: `sensitive-conversations` + */ + delete: operations["room-mark-conversation-as-insensitive"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants/active": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Join a room */ + post: operations["room-join-room"]; + /** Leave a room */ + delete: operations["room-leave-room"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants/state": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Set active state for a session */ + put: operations["room-set-session-state"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/moderators": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Promote an attendee to moderator */ + post: operations["room-promote-moderator"]; + /** Demote an attendee from moderator */ + delete: operations["room-demote-moderator"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/permissions/{mode}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Update the permissions of a room */ + put: operations["room-set-permissions"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/attendees/permissions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Update the permissions of an attendee */ + put: operations["room-set-attendee-permissions"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/attendees/permissions/all": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** + * Update the permissions of all attendees + * @deprecated + */ + put: operations["room-set-all-attendees-permissions"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/webinar/lobby": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Update the lobby state for a room */ + put: operations["room-set-lobby"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/webinar/sip": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Update SIP enabled state */ + put: operations["room-setsip-enabled"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/recording-consent": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Set recording consent requirement for this conversation */ + put: operations["room-set-recording-consent"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants/resend-invitations": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Resend invitations */ + post: operations["room-resend-invitations"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/message-expiration": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Update message expiration time */ + post: operations["room-set-message-expiration"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/import-emails": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Import a list of email attendees + * @description Content format is comma separated values: - Header line is required and must match `"email","name"` or `"email"` - One entry per line (e.g. `"John Doe","john@example.tld"`) + * Required capability: `email-csv-import` + */ + post: operations["room-import-emails-as-participants"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/capabilities": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get capabilities for a room + * @description See "Capability handling in federated conversations" in https://github.com/nextcloud/spreed/issues/10680 to learn which capabilities should be considered from the local server or from the remote server. + */ + get: operations["room-get-capabilities"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/meeting": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Schedule a meeting for a conversation + * @description Required capability: `schedule-meeting` + */ + post: operations["room-schedule-meeting"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/settings/user": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Update user setting */ + post: operations["settings-set-user-setting"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/signaling/settings": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get the signaling settings */ + get: operations["signaling-get-settings"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/signaling/{token}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get signaling messages */ + get: operations["signaling-pull-messages"]; + put?: never; + /** Send signaling messages */ + post: operations["signaling-send-messages"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/temp-user-avatar": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Upload your avatar as a user */ + post: operations["temp_avatar-post-avatar"]; + /** Delete your avatar as a user */ + delete: operations["temp_avatar-delete-avatar"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/threads/recent": { parameters: { query?: never; @@ -2030,26 +2030,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; @@ -2070,6 +2050,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; @@ -2199,23 +2199,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; @@ -2236,6 +2219,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; @@ -4483,94 +4483,6 @@ export interface operations { }; }; }; - "call_notification-state": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v4"; - /** @description Conversation token to check */ - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Notification should be kept alive */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - /** @description Dismiss call notification and show "Missed call"-notification instead */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - /** @description Not logged in, try again with auth data sent */ - 403: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - /** @description Dismiss call notification */ - 404: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - }; - }; "call-download-participants-for-call": { parameters: { query?: { @@ -4953,6 +4865,1508 @@ export interface operations { }; }; }; + "call_notification-state": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v4"; + /** @description Conversation token to check */ + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Notification should be kept alive */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + /** @description Dismiss call notification and show "Missed call"-notification instead */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + /** @description Not logged in, try again with auth data sent */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + /** @description Dismiss call notification */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + }; + }; + "chat-receive-messages": { + parameters: { + query: { + /** @description Polling for new messages (1) or getting the history of the chat (0) */ + lookIntoFuture: 0 | 1; + /** @description Number of chat messages to receive (100 by default, 200 at most) */ + limit?: number; + /** @description The last known message (serves as offset) */ + lastKnownMessageId?: number; + /** @description The last known common read message (so the response is 200 instead of 304 when it changes even when there are no messages) */ + lastCommonReadId?: number; + /** @description Number of seconds to wait for new messages (30 by default, 30 at most) */ + timeout?: number; + /** @description Automatically set the last read marker when 1, if your client does this itself via chat/{token}/read set to 0 */ + setReadMarker?: 0 | 1; + /** @description Include the $lastKnownMessageId in the messages when 1 (default 0) */ + includeLastKnown?: 0 | 1; + /** @description When the user status should not be automatically set to online set to 1 (default 0) */ + noStatusUpdate?: 0 | 1; + /** @description Set to 0 when notifications should not be marked as read (default 1) */ + markNotificationsAsRead?: 0 | 1; + /** @description Limit the chat message list to a given thread */ + threadId?: number; + }; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Messages returned */ + 200: { + headers: { + "X-Chat-Last-Common-Read"?: string; + "X-Chat-Last-Given"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatMessageWithParent"][]; + }; + }; + }; + }; + /** @description No messages */ + 304: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + "chat-send-message": { + parameters: { + query?: never; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + /** @description the message to send */ + message: string; + /** + * @description for guests + * @default + */ + actorDisplayName?: string; + /** + * @description for the message to be able to later identify it again + * @default + */ + referenceId?: string; + /** + * Format: int64 + * @description Parent id which this message is a reply to + * @default 0 + */ + replyTo?: number; + /** + * @description If sent silent the chat message will not create any notifications + * @default false + */ + silent?: boolean; + /** + * @description Only supported when not replying, when given will create a thread (requires `threads` capability) + * @default + */ + threadTitle?: string; + /** + * Format: int64 + * @description Thread id which this message is a reply to without quoting a specific message (ignored when $replyTo is given, also requires `threads` capability) + * @default 0 + */ + threadId?: number; + }; + }; + }; + responses: { + /** @description Message sent successfully */ + 201: { + headers: { + "X-Chat-Last-Common-Read"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatMessageWithParent"] | null; + }; + }; + }; + }; + /** @description Sending message is not possible */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + /** @description Actor not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + /** @description Message too long */ + 413: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + /** @description Mention rate limit exceeded (guests only) */ + 429: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + }; + }; + "chat-clear-history": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description History cleared successfully */ + 200: { + headers: { + "X-Chat-Last-Common-Read"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatMessage"]; + }; + }; + }; + }; + /** @description History cleared successfully, but Federation or Matterbridge is configured, so the information can be replicated elsewhere */ + 202: { + headers: { + "X-Chat-Last-Common-Read"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatMessage"]; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + /** @description Missing permissions to clear history */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + }; + }; + "chat-get-objects-shared-in-room": { + parameters: { + query: { + /** @description Type of the objects */ + objectType: string; + /** @description ID of the last known message */ + lastKnownMessageId?: number; + /** @description Maximum number of objects */ + limit?: number; + }; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description List of shared objects messages returned */ + 200: { + headers: { + "X-Chat-Last-Given"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + [key: string]: components["schemas"]["ChatMessage"]; + }; + }; + }; + }; + }; + }; + }; + "chat-share-object-to-chat": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Type of the object */ + objectType: string; + /** @description ID of the object */ + objectId: string; + /** + * @description Additional metadata, sample value: `{\"type\":\"geo-location\",\"id\":\"geo:52.5450511,13.3741463\",\"name\":\"Nextcloud Berlin Office\",\"latitude\":\"52.5450511\",\"longitude\":\"13.3741463\"}` + * @default + */ + metaData?: string; + /** + * @description Guest name + * @default + */ + actorDisplayName?: string; + /** + * @description Reference ID + * @default + */ + referenceId?: string; + /** + * Format: int64 + * @description Thread id which this message is a reply to without quoting a specific message (also requires `threads` capability) + * @default 0 + */ + threadId?: number; + }; + }; + }; + responses: { + /** @description Object shared successfully */ + 201: { + headers: { + "X-Chat-Last-Common-Read"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatMessageWithParent"] | null; + }; + }; + }; + }; + /** @description Sharing object is not possible */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + /** @description Actor not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + /** @description Message too long */ + 413: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + }; + }; + "chat-summarize-chat": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + /** + * Format: int64 + * @description Offset from where on the summary should be generated + */ + fromMessageId: number; + }; + }; + }; + responses: { + /** @description Summary was scheduled, use the returned taskId to get the status information and output from the TaskProcessing API: [OCS TaskProcessing API](https://docs.nextcloud.com/server/latest/developer_manual/client_apis/OCS/ocs-taskprocessing-api.html#fetch-a-task-by-id). If the response data contains nextOffset, not all messages could be handled in a single request. After receiving the response a second summary should be requested with the provided nextOffset. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** Format: int64 */ + taskId: number; + /** Format: int64 */ + nextOffset?: number; + }; + }; + }; + }; + }; + /** @description No messages found to summarize */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description No AI provider available or summarizing failed */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "ai-no-provider" | "ai-error"; + }; + }; + }; + }; + }; + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + "chat-get-message-context": { + parameters: { + query?: { + /** @description Number of chat messages to receive in both directions (50 by default, 100 at most, might return 201 messages) */ + limit?: number; + /** @description Limit the chat message list to a given thread */ + threadId?: number; + }; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + /** @description The focused message which should be in the "middle" of the returned context */ + messageId: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Message context returned */ + 200: { + headers: { + "X-Chat-Last-Common-Read"?: string; + "X-Chat-Last-Given"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatMessageWithParent"][]; + }; + }; + }; + }; + /** @description No messages */ + 304: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + "chat-edit-message": { + parameters: { + query?: never; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + /** @description ID of the message */ + messageId: number; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + /** @description the message to send */ + message: string; + }; + }; + }; + responses: { + /** @description Message edited successfully */ + 200: { + headers: { + "X-Chat-Last-Common-Read"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatMessageWithParent"]; + }; + }; + }; + }; + /** @description Message edited successfully, but a bot or Matterbridge is configured, so the information can be replicated to other services */ + 202: { + headers: { + "X-Chat-Last-Common-Read"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatMessageWithParent"]; + }; + }; + }; + }; + /** @description Editing message is not possible, e.g. when the new message is empty or the message is too old */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + /** @description Missing permissions to edit message */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + /** @description Message not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + /** @description Editing this message type is not allowed */ + 405: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + /** @description Message too long */ + 413: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + }; + }; + "chat-delete-message": { + parameters: { + query?: never; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + /** @description ID of the message */ + messageId: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Message deleted successfully */ + 200: { + headers: { + "X-Chat-Last-Common-Read"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatMessageWithParent"]; + }; + }; + }; + }; + /** @description Message deleted successfully, but a bot or Matterbridge is configured, so the information can be replicated elsewhere */ + 202: { + headers: { + "X-Chat-Last-Common-Read"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatMessageWithParent"]; + }; + }; + }; + }; + /** @description Deleting message is not possible */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + /** @description Missing permissions to delete message */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + /** @description Message not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + /** @description Deleting this message type is not allowed */ + 405: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + }; + }; + "chat-get-reminder": { + parameters: { + query?: never; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + /** @description ID of the message */ + messageId: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Reminder returned */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatReminder"]; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + /** @description Message not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error?: string; + }; + }; + }; + }; + }; + }; + }; + "chat-set-reminder": { + parameters: { + query?: never; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + /** @description ID of the message */ + messageId: number; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + /** + * Format: int64 + * @description Timestamp of the reminder + */ + timestamp: number; + }; + }; + }; + responses: { + /** @description Reminder created successfully */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatReminder"]; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + /** @description Message not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error?: string; + }; + }; + }; + }; + }; + }; + }; + "chat-delete-reminder": { + parameters: { + query?: never; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + /** @description ID of the message */ + messageId: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Reminder deleted successfully */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error?: string; + }; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + /** @description Message not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error?: string; + }; + }; + }; + }; + }; + }; + }; + "chat-get-upcoming-reminders": { + 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 Reminders returned */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatReminderUpcoming"][]; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + }; + }; + "chat-set-read-marker": { + parameters: { + query?: never; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * Format: int64 + * @description ID if the last read message (Optional only with `chat-read-last` capability) + * @default null + */ + lastReadMessage?: number | null; + }; + }; + }; + responses: { + /** @description Read marker set successfully */ + 200: { + headers: { + "X-Chat-Last-Common-Read"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["Room"]; + }; + }; + }; + }; + }; + }; + "chat-mark-unread": { + parameters: { + query?: never; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Read marker set successfully */ + 200: { + headers: { + "X-Chat-Last-Common-Read"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["Room"]; + }; + }; + }; + }; + }; + }; + "chat-get-objects-shared-in-room-overview": { + parameters: { + query?: { + /** @description Maximum number of objects */ + limit?: number; + }; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description List of shared objects messages of each type returned */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + [key: string]: components["schemas"]["ChatMessage"][]; + }; + }; + }; + }; + }; + }; + }; + "chat-pin-message": { + parameters: { + query?: never; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + /** @description ID of the message */ + messageId: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * Format: int64 + * @description Unix timestamp when to unpin the message + * @default 0 + */ + pinUntil?: number; + }; + }; + }; + responses: { + /** @description Message was pinned successfully */ + 200: { + headers: { + "X-Chat-Last-Common-Read"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatMessageWithParent"] | null; + }; + }; + }; + }; + /** @description Message could not be pinned */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "message" | "until" | "status"; + }; + }; + }; + }; + }; + /** @description Message was not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "message" | "until" | "status"; + }; + }; + }; + }; + }; + }; + }; + "chat-unpin-message": { + parameters: { + query?: never; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + /** @description ID of the message */ + messageId: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Message is not pinned now */ + 200: { + headers: { + "X-Chat-Last-Common-Read"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatMessageWithParent"] | null; + }; + }; + }; + }; + /** @description Federation request answered with an unknown status code */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "status"; + }; + }; + }; + }; + }; + /** @description Message was not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "message"; + }; + }; + }; + }; + }; + }; + }; + "chat-hide-pinned-message": { + parameters: { + query?: never; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + /** @description ID of the message */ + messageId: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Pinned message is now hidden */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + /** @description Message was not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + }; + }; + "chat-mentions": { + parameters: { + query: { + /** @description Text to search for */ + search: string; + /** @description Maximum number of results */ + limit?: number; + /** @description Include the user statuses */ + includeStatus?: boolean; + }; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description List of mention suggestions returned */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatMentionSuggestion"][]; + }; + }; + }; + }; + }; + }; "files_integration-get-room-by-file-id": { parameters: { query?: never; @@ -5159,6 +6573,223 @@ export interface operations { }; }; }; + "live_transcription-enable": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Live transcription enabled successfully */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + /** @description The participant is not in the call */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "app" | "in-call"; + }; + }; + }; + }; + }; + }; + }; + "live_transcription-disable": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Live transcription stopped successfully */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + /** @description The participant is not in the call */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "app" | "in-call"; + }; + }; + }; + }; + }; + }; + }; + "live_transcription-get-available-languages": { + 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 Available languages got successfully */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + [key: string]: components["schemas"]["LiveTranscriptionLanguage"]; + }; + }; + }; + }; + }; + /** @description The external app "live_transcription" is not available */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "app"; + }; + }; + }; + }; + }; + }; + }; + "live_transcription-set-language": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + /** @description the ID of the language to set */ + languageId: string; + }; + }; + }; + responses: { + /** @description Language set successfully */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + /** @description The external app "live_transcription" is not available */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "app"; + }; + }; + }; + }; + }; + /** @description Participant is not a moderator */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "app"; + }; + }; + }; + }; + }; + }; + }; "matterbridge-get-bridge-of-room": { parameters: { query?: never; @@ -6754,7 +8385,7 @@ export interface operations { }; }; }; - "room-get-note-to-self-conversation": { + "room-get-breakout-rooms": { parameters: { query?: never; header: { @@ -6763,22 +8394,38 @@ export interface operations { }; path: { apiVersion: "v4"; + token: string; }; cookie?: never; }; requestBody?: never; responses: { - /** @description Room returned successfully */ + /** @description Breakout rooms returned */ 200: { headers: { - "X-Nextcloud-Talk-Hash"?: string; [name: string]: unknown; }; content: { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; + data: components["schemas"]["Room"][]; + }; + }; + }; + }; + /** @description Getting breakout rooms is not possible */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; }; }; }; @@ -6966,7 +8613,7 @@ export interface operations { }; }; }; - "room-get-breakout-rooms": { + "room-get-note-to-self-conversation": { parameters: { query?: never; header: { @@ -6975,38 +8622,22 @@ export interface operations { }; path: { apiVersion: "v4"; - token: string; }; cookie?: never; }; requestBody?: never; responses: { - /** @description Breakout rooms returned */ + /** @description Room returned successfully */ 200: { headers: { + "X-Nextcloud-Talk-Hash"?: string; [name: string]: unknown; }; content: { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"][]; - }; - }; - }; - }; - /** @description Getting breakout rooms is not possible */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; + data: components["schemas"]["Room"]; }; }; }; @@ -7027,7 +8658,7 @@ export interface operations { }; }; }; - "room-unbind-room-from-object": { + "room-add-to-favorites": { parameters: { query?: never; header: { @@ -7042,7 +8673,7 @@ export interface operations { }; requestBody?: never; responses: { - /** @description Room successfully unbound */ + /** @description Successfully added room to favorites */ 200: { headers: { [name: string]: unknown; @@ -7056,8 +8687,8 @@ export interface operations { }; }; }; - /** @description Unbinding room is not possible */ - 400: { + /** @description Current user is not logged in */ + 401: { headers: { [name: string]: unknown; }; @@ -7065,17 +8696,14 @@ export interface operations { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "object-type"; - }; + data: unknown; }; }; }; }; }; }; - "room-make-public": { + "room-remove-from-favorites": { parameters: { query?: never; header: { @@ -7088,19 +8716,64 @@ export interface operations { }; cookie?: never; }; - requestBody?: { + requestBody?: never; + responses: { + /** @description Successfully removed room from favorites */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["Room"]; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + }; + }; + "room-set-notification-level": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v4"; + token: string; + }; + cookie?: never; + }; + requestBody: { content: { "application/json": { /** - * @description New password (only available with `conversation-creation-password` capability) - * @default + * Format: int64 + * @description New level */ - password?: string; + level: number; }; }; }; responses: { - /** @description Allowed guests successfully */ + /** @description Notification level updated successfully */ 200: { headers: { [name: string]: unknown; @@ -7114,7 +8787,7 @@ export interface operations { }; }; }; - /** @description Allowing guests is not possible */ + /** @description Updating notification level is not possible */ 400: { headers: { [name: string]: unknown; @@ -7125,8 +8798,7 @@ export interface operations { meta: components["schemas"]["OCSMeta"]; data: { /** @enum {string} */ - error: "breakout-room" | "type" | "value" | "password"; - message?: string; + error: "level"; }; }; }; @@ -7148,7 +8820,7 @@ export interface operations { }; }; }; - "room-make-private": { + "room-set-notification-calls": { parameters: { query?: never; header: { @@ -7161,9 +8833,19 @@ export interface operations { }; cookie?: never; }; - requestBody?: never; + requestBody: { + content: { + "application/json": { + /** + * Format: int64 + * @description New level + */ + level: number; + }; + }; + }; responses: { - /** @description Room unpublished Disallowing guests successfully */ + /** @description Call notification level updated successfully */ 200: { headers: { [name: string]: unknown; @@ -7177,7 +8859,7 @@ export interface operations { }; }; }; - /** @description Disallowing guests is not possible */ + /** @description Updating call notification level is not possible */ 400: { headers: { [name: string]: unknown; @@ -7188,7 +8870,7 @@ export interface operations { meta: components["schemas"]["OCSMeta"]; data: { /** @enum {string} */ - error: "breakout-room" | "type" | "value"; + error: "level"; }; }; }; @@ -7265,7 +8947,7 @@ export interface operations { }; }; }; - "room-set-read-only": { + "room-unbind-room-from-object": { parameters: { query?: never; header: { @@ -7278,20 +8960,9 @@ export interface operations { }; cookie?: never; }; - requestBody: { - content: { - "application/json": { - /** - * Format: int64 - * @description New read-only state - * @enum {integer} - */ - state: 0 | 1; - }; - }; - }; + requestBody?: never; responses: { - /** @description Read-only state updated successfully */ + /** @description Room successfully unbound */ 200: { headers: { [name: string]: unknown; @@ -7305,7 +8976,7 @@ export interface operations { }; }; }; - /** @description Updating read-only state is not possible */ + /** @description Unbinding room is not possible */ 400: { headers: { [name: string]: unknown; @@ -7316,210 +8987,7 @@ export interface operations { meta: components["schemas"]["OCSMeta"]; data: { /** @enum {string} */ - error: "type" | "value"; - }; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - }; - }; - "room-set-listable": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v4"; - token: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** - * Format: int64 - * @description Scope where the room is listable - * @enum {integer} - */ - scope: 0 | 1 | 2; - }; - }; - }; - responses: { - /** @description Made room listable successfully */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; - }; - }; - }; - }; - /** @description Making room listable is not possible */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "breakout-room" | "type" | "value"; - }; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - }; - }; - "room-set-password": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v4"; - token: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** @description New password */ - password: string; - }; - }; - }; - responses: { - /** @description Password set successfully */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; - }; - }; - }; - }; - /** @description Setting password is not possible */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "breakout-room" | "type" | "value"; - message?: string; - }; - }; - }; - }; - }; - }; - }; - "room-set-permissions": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v4"; - token: string; - /** @description Level of the permissions ('call' (removed in Talk 20), 'default') */ - mode: "call" | "default"; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** - * Format: int64 - * @description New permissions - */ - permissions: number; - }; - }; - }; - responses: { - /** @description Permissions updated successfully */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; - }; - }; - }; - }; - /** @description Updating permissions is not possible */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "breakout-room" | "mode" | "type" | "value"; + error: "object-type"; }; }; }; @@ -7921,7 +9389,7 @@ export interface operations { }; }; }; - "room-set-attendee-permissions": { + "room-make-public": { parameters: { query?: never; header: { @@ -7934,44 +9402,33 @@ export interface operations { }; cookie?: never; }; - requestBody: { + requestBody?: { content: { "application/json": { /** - * Format: int64 - * @description ID of the attendee + * @description New password (only available with `conversation-creation-password` capability) + * @default */ - attendeeId: number; - /** - * @description Method of updating permissions ('set', 'remove', 'add') - * @enum {string} - */ - method: "set" | "remove" | "add"; - /** - * Format: int64 - * @description New permissions - */ - permissions: number; + password?: string; }; }; }; responses: { - /** @description Permissions updated successfully */ + /** @description Allowed guests successfully */ 200: { headers: { - "X-Nextcloud-Has-User-Statuses"?: true; [name: string]: unknown; }; content: { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Participant"][]; + data: components["schemas"]["Room"]; }; }; }; }; - /** @description Updating permissions is not possible */ + /** @description Allowing guests is not possible */ 400: { headers: { [name: string]: unknown; @@ -7982,14 +9439,15 @@ export interface operations { meta: components["schemas"]["OCSMeta"]; data: { /** @enum {string} */ - error: "participant" | "method" | "moderator" | "room-type" | "type" | "value"; + error: "breakout-room" | "type" | "value" | "password"; + message?: string; }; }; }; }; }; - /** @description Missing permissions to update permissions */ - 403: { + /** @description Current user is not logged in */ + 401: { headers: { [name: string]: unknown; }; @@ -7997,34 +9455,76 @@ export interface operations { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "participant" | "method" | "moderator" | "room-type" | "type" | "value"; - }; - }; - }; - }; - }; - /** @description Attendee not found */ - 404: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "participant" | "method" | "moderator" | "room-type" | "type" | "value"; - }; + data: unknown; }; }; }; }; }; }; - "room-set-all-attendees-permissions": { + "room-make-private": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v4"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Room unpublished Disallowing guests successfully */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["Room"]; + }; + }; + }; + }; + /** @description Disallowing guests is not possible */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "breakout-room" | "type" | "value"; + }; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + }; + }; + "room-set-read-only": { parameters: { query?: never; header: { @@ -8041,15 +9541,157 @@ export interface operations { content: { "application/json": { /** - * @description Method of updating permissions ('set', 'remove', 'add') - * @enum {string} + * Format: int64 + * @description New read-only state + * @enum {integer} */ - method: "set" | "remove" | "add"; + state: 0 | 1; + }; + }; + }; + responses: { + /** @description Read-only state updated successfully */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["Room"]; + }; + }; + }; + }; + /** @description Updating read-only state is not possible */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "type" | "value"; + }; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + }; + }; + "room-set-listable": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v4"; + token: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { /** * Format: int64 - * @description New permissions + * @description Scope where the room is listable + * @enum {integer} */ - permissions: number; + scope: 0 | 1 | 2; + }; + }; + }; + responses: { + /** @description Made room listable successfully */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["Room"]; + }; + }; + }; + }; + /** @description Making room listable is not possible */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "breakout-room" | "type" | "value"; + }; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + }; + }; + "room-set-mention-permissions": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v4"; + token: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + /** + * Format: int64 + * @description New mention permissions + * @enum {integer} + */ + mentionPermissions: 0 | 1; }; }; }; @@ -8070,6 +9712,349 @@ export interface operations { }; /** @description Updating permissions is not possible */ 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "breakout-room" | "type" | "value"; + }; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + }; + }; + "room-set-password": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v4"; + token: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + /** @description New password */ + password: string; + }; + }; + }; + responses: { + /** @description Password set successfully */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["Room"]; + }; + }; + }; + }; + /** @description Setting password is not possible */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "breakout-room" | "type" | "value"; + message?: string; + }; + }; + }; + }; + }; + }; + }; + "room-archive-conversation": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v4"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Conversation was archived */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["Room"]; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + }; + }; + "room-unarchive-conversation": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v4"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Conversation was unarchived */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["Room"]; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + }; + }; + "room-mark-conversation-as-important": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v4"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Conversation was marked as important */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["Room"]; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + }; + }; + "room-mark-conversation-as-unimportant": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v4"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Conversation was marked as unimportant */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["Room"]; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + }; + }; + "room-mark-conversation-as-sensitive": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v4"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Conversation was marked as sensitive */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["Room"]; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + }; + }; + "room-mark-conversation-as-insensitive": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v4"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Conversation was marked as insensitive */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["Room"]; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { headers: { [name: string]: unknown; }; @@ -8215,75 +10200,6 @@ export interface operations { }; }; }; - "room-resend-invitations": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v4"; - token: string; - }; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": { - /** - * Format: int64 - * @description ID of the attendee - */ - attendeeId?: number | null; - }; - }; - }; - responses: { - /** @description Invitation resent successfully */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - /** @description Attendee not found */ - 404: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - }; - }; "room-set-session-state": { parameters: { query?: never; @@ -8513,7 +10429,7 @@ export interface operations { }; }; }; - "room-add-to-favorites": { + "room-set-permissions": { parameters: { query?: never; header: { @@ -8523,12 +10439,24 @@ export interface operations { path: { apiVersion: "v4"; token: string; + /** @description Level of the permissions ('call' (removed in Talk 20), 'default') */ + mode: "call" | "default"; }; cookie?: never; }; - requestBody?: never; + requestBody: { + content: { + "application/json": { + /** + * Format: int64 + * @description New permissions + */ + permissions: number; + }; + }; + }; responses: { - /** @description Successfully added room to favorites */ + /** @description Permissions updated successfully */ 200: { headers: { [name: string]: unknown; @@ -8542,8 +10470,8 @@ export interface operations { }; }; }; - /** @description Current user is not logged in */ - 401: { + /** @description Updating permissions is not possible */ + 400: { headers: { [name: string]: unknown; }; @@ -8551,239 +10479,17 @@ export interface operations { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; - data: unknown; + data: { + /** @enum {string} */ + error: "breakout-room" | "mode" | "type" | "value"; + }; }; }; }; }; }; }; - "room-remove-from-favorites": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v4"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully removed room from favorites */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - }; - }; - "room-mark-conversation-as-important": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v4"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Conversation was marked as important */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - }; - }; - "room-mark-conversation-as-unimportant": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v4"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Conversation was marked as unimportant */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - }; - }; - "room-mark-conversation-as-sensitive": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v4"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Conversation was marked as sensitive */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - }; - }; - "room-mark-conversation-as-insensitive": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v4"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Conversation was marked as insensitive */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - }; - }; - "room-set-notification-level": { + "room-set-attendee-permissions": { parameters: { query?: never; header: { @@ -8801,28 +10507,39 @@ export interface operations { "application/json": { /** * Format: int64 - * @description New level + * @description ID of the attendee */ - level: number; + attendeeId: number; + /** + * @description Method of updating permissions ('set', 'remove', 'add') + * @enum {string} + */ + method: "set" | "remove" | "add"; + /** + * Format: int64 + * @description New permissions + */ + permissions: number; }; }; }; responses: { - /** @description Notification level updated successfully */ + /** @description Permissions updated successfully */ 200: { headers: { + "X-Nextcloud-Has-User-Statuses"?: true; [name: string]: unknown; }; content: { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; + data: components["schemas"]["Participant"][]; }; }; }; }; - /** @description Updating notification level is not possible */ + /** @description Updating permissions is not possible */ 400: { headers: { [name: string]: unknown; @@ -8833,14 +10550,14 @@ export interface operations { meta: components["schemas"]["OCSMeta"]; data: { /** @enum {string} */ - error: "level"; + error: "participant" | "method" | "moderator" | "room-type" | "type" | "value"; }; }; }; }; }; - /** @description Current user is not logged in */ - 401: { + /** @description Missing permissions to update permissions */ + 403: { headers: { [name: string]: unknown; }; @@ -8848,14 +10565,34 @@ export interface operations { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; - data: unknown; + data: { + /** @enum {string} */ + error: "participant" | "method" | "moderator" | "room-type" | "type" | "value"; + }; + }; + }; + }; + }; + /** @description Attendee not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "participant" | "method" | "moderator" | "room-type" | "type" | "value"; + }; }; }; }; }; }; }; - "room-set-notification-calls": { + "room-set-all-attendees-permissions": { parameters: { query?: never; header: { @@ -8872,15 +10609,20 @@ export interface operations { content: { "application/json": { /** - * Format: int64 - * @description New level + * @description Method of updating permissions ('set', 'remove', 'add') + * @enum {string} */ - level: number; + method: "set" | "remove" | "add"; + /** + * Format: int64 + * @description New permissions + */ + permissions: number; }; }; }; responses: { - /** @description Call notification level updated successfully */ + /** @description Permissions updated successfully */ 200: { headers: { [name: string]: unknown; @@ -8894,25 +10636,8 @@ export interface operations { }; }; }; - /** @description Updating call notification level is not possible */ + /** @description Updating permissions is not possible */ 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "level"; - }; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { headers: { [name: string]: unknown; }; @@ -9210,6 +10935,75 @@ export interface operations { }; }; }; + "room-resend-invitations": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v4"; + token: string; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * Format: int64 + * @description ID of the attendee + */ + attendeeId?: number | null; + }; + }; + }; + responses: { + /** @description Invitation resent successfully */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + /** @description Attendee not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + }; + }; "room-set-message-expiration": { parameters: { query?: never; @@ -9268,206 +11062,6 @@ export interface operations { }; }; }; - "room-get-capabilities": { - parameters: { - query?: never; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v4"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get capabilities successfully */ - 200: { - headers: { - "X-Nextcloud-Talk-Hash"?: string; - "X-Nextcloud-Talk-Proxy-Hash"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Capabilities"] | { - [key: string]: unknown; - }; - }; - }; - }; - }; - }; - }; - "room-set-mention-permissions": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v4"; - token: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** - * Format: int64 - * @description New mention permissions - * @enum {integer} - */ - mentionPermissions: 0 | 1; - }; - }; - }; - responses: { - /** @description Permissions updated successfully */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; - }; - }; - }; - }; - /** @description Updating permissions is not possible */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "breakout-room" | "type" | "value"; - }; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - }; - }; - "room-archive-conversation": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v4"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Conversation was archived */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - }; - }; - "room-unarchive-conversation": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v4"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Conversation was unarchived */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - }; - }; "room-import-emails-as-participants": { parameters: { query?: never; @@ -9560,6 +11154,43 @@ export interface operations { }; }; }; + "room-get-capabilities": { + parameters: { + query?: never; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v4"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get capabilities successfully */ + 200: { + headers: { + "X-Nextcloud-Talk-Hash"?: string; + "X-Nextcloud-Talk-Proxy-Hash"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["Capabilities"] | { + [key: string]: unknown; + }; + }; + }; + }; + }; + }; + }; "room-schedule-meeting": { parameters: { query?: never; @@ -10043,1637 +11674,6 @@ export interface operations { }; }; }; - "chat-receive-messages": { - parameters: { - query: { - /** @description Polling for new messages (1) or getting the history of the chat (0) */ - lookIntoFuture: 0 | 1; - /** @description Number of chat messages to receive (100 by default, 200 at most) */ - limit?: number; - /** @description The last known message (serves as offset) */ - lastKnownMessageId?: number; - /** @description The last known common read message (so the response is 200 instead of 304 when it changes even when there are no messages) */ - lastCommonReadId?: number; - /** @description Number of seconds to wait for new messages (30 by default, 30 at most) */ - timeout?: number; - /** @description Automatically set the last read marker when 1, if your client does this itself via chat/{token}/read set to 0 */ - setReadMarker?: 0 | 1; - /** @description Include the $lastKnownMessageId in the messages when 1 (default 0) */ - includeLastKnown?: 0 | 1; - /** @description When the user status should not be automatically set to online set to 1 (default 0) */ - noStatusUpdate?: 0 | 1; - /** @description Set to 0 when notifications should not be marked as read (default 1) */ - markNotificationsAsRead?: 0 | 1; - /** @description Limit the chat message list to a given thread */ - threadId?: number; - }; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Messages returned */ - 200: { - headers: { - "X-Chat-Last-Common-Read"?: string; - "X-Chat-Last-Given"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatMessageWithParent"][]; - }; - }; - }; - }; - /** @description No messages */ - 304: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - "chat-send-message": { - parameters: { - query?: never; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** @description the message to send */ - message: string; - /** - * @description for guests - * @default - */ - actorDisplayName?: string; - /** - * @description for the message to be able to later identify it again - * @default - */ - referenceId?: string; - /** - * Format: int64 - * @description Parent id which this message is a reply to - * @default 0 - */ - replyTo?: number; - /** - * @description If sent silent the chat message will not create any notifications - * @default false - */ - silent?: boolean; - /** - * @description Only supported when not replying, when given will create a thread (requires `threads` capability) - * @default - */ - threadTitle?: string; - /** - * Format: int64 - * @description Thread id which this message is a reply to without quoting a specific message (ignored when $replyTo is given, also requires `threads` capability) - * @default 0 - */ - threadId?: number; - }; - }; - }; - responses: { - /** @description Message sent successfully */ - 201: { - headers: { - "X-Chat-Last-Common-Read"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatMessageWithParent"] | null; - }; - }; - }; - }; - /** @description Sending message is not possible */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - /** @description Actor not found */ - 404: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - /** @description Message too long */ - 413: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - /** @description Mention rate limit exceeded (guests only) */ - 429: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - }; - }; - "chat-clear-history": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description History cleared successfully */ - 200: { - headers: { - "X-Chat-Last-Common-Read"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatMessage"]; - }; - }; - }; - }; - /** @description History cleared successfully, but Federation or Matterbridge is configured, so the information can be replicated elsewhere */ - 202: { - headers: { - "X-Chat-Last-Common-Read"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatMessage"]; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - /** @description Missing permissions to clear history */ - 403: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - }; - }; - "chat-get-objects-shared-in-room": { - parameters: { - query: { - /** @description Type of the objects */ - objectType: string; - /** @description ID of the last known message */ - lastKnownMessageId?: number; - /** @description Maximum number of objects */ - limit?: number; - }; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description List of shared objects messages returned */ - 200: { - headers: { - "X-Chat-Last-Given"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - [key: string]: components["schemas"]["ChatMessage"]; - }; - }; - }; - }; - }; - }; - }; - "chat-share-object-to-chat": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** @description Type of the object */ - objectType: string; - /** @description ID of the object */ - objectId: string; - /** - * @description Additional metadata, sample value: `{\"type\":\"geo-location\",\"id\":\"geo:52.5450511,13.3741463\",\"name\":\"Nextcloud Berlin Office\",\"latitude\":\"52.5450511\",\"longitude\":\"13.3741463\"}` - * @default - */ - metaData?: string; - /** - * @description Guest name - * @default - */ - actorDisplayName?: string; - /** - * @description Reference ID - * @default - */ - referenceId?: string; - /** - * Format: int64 - * @description Thread id which this message is a reply to without quoting a specific message (also requires `threads` capability) - * @default 0 - */ - threadId?: number; - }; - }; - }; - responses: { - /** @description Object shared successfully */ - 201: { - headers: { - "X-Chat-Last-Common-Read"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatMessageWithParent"] | null; - }; - }; - }; - }; - /** @description Sharing object is not possible */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - /** @description Actor not found */ - 404: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - /** @description Message too long */ - 413: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - }; - }; - "chat-summarize-chat": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** - * Format: int64 - * @description Offset from where on the summary should be generated - */ - fromMessageId: number; - }; - }; - }; - responses: { - /** @description Summary was scheduled, use the returned taskId to get the status information and output from the TaskProcessing API: [OCS TaskProcessing API](https://docs.nextcloud.com/server/latest/developer_manual/client_apis/OCS/ocs-taskprocessing-api.html#fetch-a-task-by-id). If the response data contains nextOffset, not all messages could be handled in a single request. After receiving the response a second summary should be requested with the provided nextOffset. */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** Format: int64 */ - taskId: number; - /** Format: int64 */ - nextOffset?: number; - }; - }; - }; - }; - }; - /** @description No messages found to summarize */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - /** @description No AI provider available or summarizing failed */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "ai-no-provider" | "ai-error"; - }; - }; - }; - }; - }; - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - "chat-get-message-context": { - parameters: { - query?: { - /** @description Number of chat messages to receive in both directions (50 by default, 100 at most, might return 201 messages) */ - limit?: number; - /** @description Limit the chat message list to a given thread */ - threadId?: number; - }; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - /** @description The focused message which should be in the "middle" of the returned context */ - messageId: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Message context returned */ - 200: { - headers: { - "X-Chat-Last-Common-Read"?: string; - "X-Chat-Last-Given"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatMessageWithParent"][]; - }; - }; - }; - }; - /** @description No messages */ - 304: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - "chat-edit-message": { - parameters: { - query?: never; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - /** @description ID of the message */ - messageId: number; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** @description the message to send */ - message: string; - }; - }; - }; - responses: { - /** @description Message edited successfully */ - 200: { - headers: { - "X-Chat-Last-Common-Read"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatMessageWithParent"]; - }; - }; - }; - }; - /** @description Message edited successfully, but a bot or Matterbridge is configured, so the information can be replicated to other services */ - 202: { - headers: { - "X-Chat-Last-Common-Read"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatMessageWithParent"]; - }; - }; - }; - }; - /** @description Editing message is not possible, e.g. when the new message is empty or the message is too old */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - /** @description Missing permissions to edit message */ - 403: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - /** @description Message not found */ - 404: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - /** @description Editing this message type is not allowed */ - 405: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - /** @description Message too long */ - 413: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - }; - }; - "chat-delete-message": { - parameters: { - query?: never; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - /** @description ID of the message */ - messageId: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Message deleted successfully */ - 200: { - headers: { - "X-Chat-Last-Common-Read"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatMessageWithParent"]; - }; - }; - }; - }; - /** @description Message deleted successfully, but a bot or Matterbridge is configured, so the information can be replicated elsewhere */ - 202: { - headers: { - "X-Chat-Last-Common-Read"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatMessageWithParent"]; - }; - }; - }; - }; - /** @description Deleting message is not possible */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - /** @description Missing permissions to delete message */ - 403: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - /** @description Message not found */ - 404: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - /** @description Deleting this message type is not allowed */ - 405: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - }; - }; - "chat-get-reminder": { - parameters: { - query?: never; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - /** @description ID of the message */ - messageId: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Reminder returned */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatReminder"]; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - /** @description Message not found */ - 404: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error?: string; - }; - }; - }; - }; - }; - }; - }; - "chat-set-reminder": { - parameters: { - query?: never; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - /** @description ID of the message */ - messageId: number; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** - * Format: int64 - * @description Timestamp of the reminder - */ - timestamp: number; - }; - }; - }; - responses: { - /** @description Reminder created successfully */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatReminder"]; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - /** @description Message not found */ - 404: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error?: string; - }; - }; - }; - }; - }; - }; - }; - "chat-delete-reminder": { - parameters: { - query?: never; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - /** @description ID of the message */ - messageId: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Reminder deleted successfully */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error?: string; - }; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - /** @description Message not found */ - 404: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error?: string; - }; - }; - }; - }; - }; - }; - }; - "chat-get-upcoming-reminders": { - 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 Reminders returned */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatReminderUpcoming"][]; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - }; - }; - "chat-set-read-marker": { - parameters: { - query?: never; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - }; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": { - /** - * Format: int64 - * @description ID if the last read message (Optional only with `chat-read-last` capability) - * @default null - */ - lastReadMessage?: number | null; - }; - }; - }; - responses: { - /** @description Read marker set successfully */ - 200: { - headers: { - "X-Chat-Last-Common-Read"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; - }; - }; - }; - }; - }; - }; - "chat-mark-unread": { - parameters: { - query?: never; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Read marker set successfully */ - 200: { - headers: { - "X-Chat-Last-Common-Read"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; - }; - }; - }; - }; - }; - }; - "chat-get-objects-shared-in-room-overview": { - parameters: { - query?: { - /** @description Maximum number of objects */ - limit?: number; - }; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description List of shared objects messages of each type returned */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - [key: string]: components["schemas"]["ChatMessage"][]; - }; - }; - }; - }; - }; - }; - }; - "chat-pin-message": { - parameters: { - query?: never; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - /** @description ID of the message */ - messageId: number; - }; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": { - /** - * Format: int64 - * @description Unix timestamp when to unpin the message - * @default 0 - */ - pinUntil?: number; - }; - }; - }; - responses: { - /** @description Message was pinned successfully */ - 200: { - headers: { - "X-Chat-Last-Common-Read"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatMessageWithParent"] | null; - }; - }; - }; - }; - /** @description Message could not be pinned */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "message" | "until" | "status"; - }; - }; - }; - }; - }; - /** @description Message was not found */ - 404: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "message" | "until" | "status"; - }; - }; - }; - }; - }; - }; - }; - "chat-unpin-message": { - parameters: { - query?: never; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - /** @description ID of the message */ - messageId: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Message is not pinned now */ - 200: { - headers: { - "X-Chat-Last-Common-Read"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatMessageWithParent"] | null; - }; - }; - }; - }; - /** @description Federation request answered with an unknown status code */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "status"; - }; - }; - }; - }; - }; - /** @description Message was not found */ - 404: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "message"; - }; - }; - }; - }; - }; - }; - }; - "chat-hide-pinned-message": { - parameters: { - query?: never; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - /** @description ID of the message */ - messageId: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Pinned message is now hidden */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - /** @description Message was not found */ - 404: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - }; - }; - "chat-mentions": { - parameters: { - query: { - /** @description Text to search for */ - search: string; - /** @description Maximum number of results */ - limit?: number; - /** @description Include the user statuses */ - includeStatus?: boolean; - }; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description List of mention suggestions returned */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatMentionSuggestion"][]; - }; - }; - }; - }; - }; - }; - "live_transcription-enable": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Live transcription enabled successfully */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - /** @description The participant is not in the call */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "app" | "in-call"; - }; - }; - }; - }; - }; - }; - }; - "live_transcription-disable": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Live transcription stopped successfully */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - /** @description The participant is not in the call */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "app" | "in-call"; - }; - }; - }; - }; - }; - }; - }; - "live_transcription-get-available-languages": { - 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 Available languages got successfully */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - [key: string]: components["schemas"]["LiveTranscriptionLanguage"]; - }; - }; - }; - }; - }; - /** @description The external app "live_transcription" is not available */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "app"; - }; - }; - }; - }; - }; - }; - }; - "live_transcription-set-language": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** @description the ID of the language to set */ - languageId: string; - }; - }; - }; - responses: { - /** @description Language set successfully */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - /** @description The external app "live_transcription" is not available */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "app"; - }; - }; - }; - }; - }; - /** @description Participant is not a moderator */ - 403: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "app"; - }; - }; - }; - }; - }; - }; - }; "thread-get-recent-active-threads": { parameters: { query?: { @@ -13067,80 +13067,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; @@ -13217,6 +13143,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; @@ -13816,6 +13816,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; @@ -13924,105 +14023,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; diff --git a/src/types/openapi/openapi.ts b/src/types/openapi/openapi.ts index 1dfd1afc8f..3801d59fc7 100644 --- a/src/types/openapi/openapi.ts +++ b/src/types/openapi/openapi.ts @@ -301,26 +301,6 @@ export type paths = { patch?: never; trace?: never; }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/call/{token}/notification-state": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Check the expected state of a call notification - * @description Required capability: `call-notification-state-api` - */ - get: operations["call_notification-state"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; "/ocs/v2.php/apps/spreed/api/{apiVersion}/call/{token}/download": { parameters: { query?: never; @@ -394,7 +374,7 @@ export type paths = { patch?: never; trace?: never; }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/file/{fileId}": { + "/ocs/v2.php/apps/spreed/api/{apiVersion}/call/{token}/notification-state": { parameters: { query?: never; header?: never; @@ -402,12 +382,10 @@ export type paths = { cookie?: never; }; /** - * Get the token of the room associated to the given file id - * @description This is the counterpart of self::getRoomByShareToken() for file ids instead of share tokens, although both return the same room token if the given file id and share token refer to the same file. - * If there is no room associated to the given file id a new room is created; the new room is a public room associated with a "file" object with the given file id. Unlike normal rooms in which the owner is the user that created the room these are special rooms without owner (although self joined users with direct access to the file become persistent participants automatically when they join until they explicitly leave or no longer have access to the file). - * In any case, to create or even get the token of the room, the file must be shared and the user must be the owner of a public share of the file (like a link share, for example) or have direct access to that file; an error is returned otherwise. A user has direct access to a file if they have access to it (or to an ancestor) through a user, group, circle or room share (but not through a link share, for example), or if they are the owner of such a file. + * Check the expected state of a call notification + * @description Required capability: `call-notification-state-api` */ - get: operations["files_integration-get-room-by-file-id"]; + get: operations["call_notification-state"]; put?: never; post?: never; delete?: never; @@ -416,989 +394,6 @@ export type paths = { patch?: never; trace?: never; }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/publicshare/{shareToken}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Returns the token of the room associated to the file of the given share token - * @description This is the counterpart of self::getRoomByFileId() for share tokens instead of file ids, although both return the same room token if the given file id and share token refer to the same file. - * If there is no room associated to the file id of the given share token a new room is created; the new room is a public room associated with a "file" object with the file id of the given share token. Unlike normal rooms in which the owner is the user that created the room these are special rooms without owner (although self joined users with direct access to the file become persistent participants automatically when they join until they explicitly leave or no longer have access to the file). - * In any case, to create or even get the token of the room, the file must be publicly shared (like a link share, for example); an error is returned otherwise. - * Besides the token of the room this also returns the current user ID and display name, if any; this is needed by the Talk sidebar to know the actual current user, as the public share page uses the incognito mode and thus logged-in users as seen as guests. - */ - get: operations["files_integration-get-room-by-share-token"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/guest/{token}/name": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Set the display name as a guest */ - post: operations["guest-set-display-name"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge/{token}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get bridge information of one room */ - get: operations["matterbridge-get-bridge-of-room"]; - /** Edit bridge information of one room */ - put: operations["matterbridge-edit-bridge-of-room"]; - post?: never; - /** Delete bridge of one room */ - delete: operations["matterbridge-delete-bridge-of-room"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge/{token}/process": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get bridge process information */ - get: operations["matterbridge-get-bridge-process-state"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/poll/{token}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Create a poll */ - post: operations["poll-create-poll"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/poll/{token}/draft/{pollId}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Modify a draft poll - * @description Required capability: `edit-draft-poll` - */ - post: operations["poll-update-draft-poll"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/poll/{token}/drafts": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Get all drafted polls - * @description Required capability: `talk-polls-drafts` - */ - get: operations["poll-get-all-draft-polls"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/poll/{token}/{pollId}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get a poll */ - get: operations["poll-show-poll"]; - put?: never; - /** Vote on a poll */ - post: operations["poll-vote-poll"]; - /** Close a poll */ - delete: operations["poll-close-poll"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/publicshareauth": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Creates a new room for video verification (requesting the password of a share) - * @description The new room is a public room associated with a "share:password" object with the ID of the share token. Unlike normal rooms in which the owner is the user that created the room these are special rooms always created by a guest or user on behalf of a registered user, the sharer, who will be the owner of the room. - * The share must have "send password by Talk" enabled; an error is returned otherwise. - */ - post: operations["public_share_auth-create-room"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/reaction/{token}/{messageId}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get a list of reactions for a message */ - get: operations["reaction-get-reactions"]; - put?: never; - /** Add a reaction to a message */ - post: operations["reaction-react"]; - /** Delete a reaction from a message */ - delete: operations["reaction-delete"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/recording/{token}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Start the recording */ - post: operations["recording-start"]; - /** Stop the recording */ - delete: operations["recording-stop"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/recording/{token}/notification": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post?: never; - /** Dismiss the store call recording notification */ - delete: operations["recording-notification-dismiss"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/recording/{token}/share-chat": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Share the recorded file to the chat */ - post: operations["recording-share-to-chat"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get all currently existent rooms which the user has joined */ - get: operations["room-get-rooms"]; - put?: never; - /** - * Create a room with a user, a group or a circle - * @description With the `conversation-creation-all` capability a lot of new options where introduced. Before that only `$roomType`, `$roomName`, `$objectType` and `$objectId` were supported all the time, and `$password` with the `conversation-creation-password` capability In case the `$roomType` is {@see Room::TYPE_ONE_TO_ONE} only the `$invite` or `$participants` parameter is supported. - */ - post: operations["room-create-room"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/listed-room": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get listed rooms with optional search term */ - get: operations["room-get-listed-rooms"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/note-to-self": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Get the "Note to self" conversation for the user - * @description It will be automatically created when it is currently missing - */ - get: operations["room-get-note-to-self-conversation"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get a room */ - get: operations["room-get-single-room"]; - /** Rename a room */ - put: operations["room-rename-room"]; - post?: never; - /** Delete a room */ - delete: operations["room-delete-room"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/breakout-rooms": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Get breakout rooms - * @description All for moderators and in case of "free selection", or the assigned breakout room for other participants - */ - get: operations["room-get-breakout-rooms"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/object": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post?: never; - /** - * Unbind a room from its object to prevent automatic retention - * @description Required capability: `unbind-conversation` - */ - delete: operations["room-unbind-room-from-object"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/public": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Allowed guests to join conversation - * @description Required capability: `conversation-creation-password` for `string $password` parameter - */ - post: operations["room-make-public"]; - /** Disallowed guests to join conversation */ - delete: operations["room-make-private"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/description": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Update the description of a room */ - put: operations["room-set-description"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/read-only": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Set read-only state of a room */ - put: operations["room-set-read-only"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/listable": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Make a room listable */ - put: operations["room-set-listable"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/password": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Set a password for a room */ - put: operations["room-set-password"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/permissions/{mode}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Update the permissions of a room */ - put: operations["room-set-permissions"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get a list of participants for a room */ - get: operations["room-get-participants"]; - put?: never; - /** Add a participant to a room */ - post: operations["room-add-participant-to-room"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/breakout-rooms/participants": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get the breakout room participants for a room */ - get: operations["room-get-breakout-room-participants"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants/self": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post?: never; - /** Remove the current user from a room */ - delete: operations["room-remove-self-from-room"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/attendees": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post?: never; - /** Remove an attendee from a room */ - delete: operations["room-remove-attendee-from-room"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/attendees/permissions": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Update the permissions of an attendee */ - put: operations["room-set-attendee-permissions"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/attendees/permissions/all": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** - * Update the permissions of all attendees - * @deprecated - */ - put: operations["room-set-all-attendees-permissions"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants/active": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Join a room */ - post: operations["room-join-room"]; - /** Leave a room */ - delete: operations["room-leave-room"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants/resend-invitations": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Resend invitations */ - post: operations["room-resend-invitations"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants/state": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Set active state for a session */ - put: operations["room-set-session-state"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/moderators": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Promote an attendee to moderator */ - post: operations["room-promote-moderator"]; - /** Demote an attendee from moderator */ - delete: operations["room-demote-moderator"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/favorite": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Add a room to the favorites */ - post: operations["room-add-to-favorites"]; - /** Remove a room from the favorites */ - delete: operations["room-remove-from-favorites"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/important": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Mark a conversation as important (still sending notifications while on DND) - * @description Required capability: `important-conversations` - */ - post: operations["room-mark-conversation-as-important"]; - /** - * Mark a conversation as unimportant (no longer sending notifications while on DND) - * @description Required capability: `important-conversations` - */ - delete: operations["room-mark-conversation-as-unimportant"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/sensitive": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Mark a conversation as sensitive (no last message is visible / no push preview is shown) - * @description Required capability: `sensitive-conversations` - */ - post: operations["room-mark-conversation-as-sensitive"]; - /** - * Mark a conversation as insensitive (last message is visible / push preview is shown) - * @description Required capability: `sensitive-conversations` - */ - delete: operations["room-mark-conversation-as-insensitive"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/notify": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Update the notification level for a room */ - post: operations["room-set-notification-level"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/notify-calls": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Update call notifications */ - post: operations["room-set-notification-calls"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/webinar/lobby": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Update the lobby state for a room */ - put: operations["room-set-lobby"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/webinar/sip": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Update SIP enabled state */ - put: operations["room-setsip-enabled"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/recording-consent": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Set recording consent requirement for this conversation */ - put: operations["room-set-recording-consent"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/message-expiration": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Update message expiration time */ - post: operations["room-set-message-expiration"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/capabilities": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Get capabilities for a room - * @description See "Capability handling in federated conversations" in https://github.com/nextcloud/spreed/issues/10680 to learn which capabilities should be considered from the local server or from the remote server. - */ - get: operations["room-get-capabilities"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/mention-permissions": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Update the mention permissions for a room */ - put: operations["room-set-mention-permissions"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/archive": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Archive a conversation - * @description Required capability: `archived-conversations-v2` - */ - post: operations["room-archive-conversation"]; - /** - * Unarchive a conversation - * @description Required capability: `archived-conversations-v2` - */ - delete: operations["room-unarchive-conversation"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/import-emails": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Import a list of email attendees - * @description Content format is comma separated values: - Header line is required and must match `"email","name"` or `"email"` - One entry per line (e.g. `"John Doe","john@example.tld"`) - * Required capability: `email-csv-import` - */ - post: operations["room-import-emails-as-participants"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/meeting": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Schedule a meeting for a conversation - * @description Required capability: `schedule-meeting` - */ - post: operations["room-schedule-meeting"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/settings/user": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Update user setting */ - post: operations["settings-set-user-setting"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/signaling/settings": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get the signaling settings */ - get: operations["signaling-get-settings"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/api/{apiVersion}/signaling/{token}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get signaling messages */ - get: operations["signaling-pull-messages"]; - put?: never; - /** Send signaling messages */ - post: operations["signaling-send-messages"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/ocs/v2.php/apps/spreed/temp-user-avatar": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Upload your avatar as a user */ - post: operations["temp_avatar-post-avatar"]; - /** Delete your avatar as a user */ - delete: operations["temp_avatar-delete-avatar"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}": { parameters: { query?: never; @@ -1643,6 +638,68 @@ export type paths = { patch?: never; trace?: never; }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/file/{fileId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get the token of the room associated to the given file id + * @description This is the counterpart of self::getRoomByShareToken() for file ids instead of share tokens, although both return the same room token if the given file id and share token refer to the same file. + * If there is no room associated to the given file id a new room is created; the new room is a public room associated with a "file" object with the given file id. Unlike normal rooms in which the owner is the user that created the room these are special rooms without owner (although self joined users with direct access to the file become persistent participants automatically when they join until they explicitly leave or no longer have access to the file). + * In any case, to create or even get the token of the room, the file must be shared and the user must be the owner of a public share of the file (like a link share, for example) or have direct access to that file; an error is returned otherwise. A user has direct access to a file if they have access to it (or to an ancestor) through a user, group, circle or room share (but not through a link share, for example), or if they are the owner of such a file. + */ + get: operations["files_integration-get-room-by-file-id"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/publicshare/{shareToken}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Returns the token of the room associated to the file of the given share token + * @description This is the counterpart of self::getRoomByFileId() for share tokens instead of file ids, although both return the same room token if the given file id and share token refer to the same file. + * If there is no room associated to the file id of the given share token a new room is created; the new room is a public room associated with a "file" object with the file id of the given share token. Unlike normal rooms in which the owner is the user that created the room these are special rooms without owner (although self joined users with direct access to the file become persistent participants automatically when they join until they explicitly leave or no longer have access to the file). + * In any case, to create or even get the token of the room, the file must be publicly shared (like a link share, for example); an error is returned otherwise. + * Besides the token of the room this also returns the current user ID and display name, if any; this is needed by the Talk sidebar to know the actual current user, as the public share page uses the incognito mode and thus logged-in users as seen as guests. + */ + get: operations["files_integration-get-room-by-share-token"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/guest/{token}/name": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Set the display name as a guest */ + post: operations["guest-set-display-name"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/ocs/v2.php/apps/spreed/api/{apiVersion}/live-transcription/{token}": { parameters: { query?: never; @@ -1695,6 +752,949 @@ export type paths = { patch?: never; trace?: never; }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge/{token}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get bridge information of one room */ + get: operations["matterbridge-get-bridge-of-room"]; + /** Edit bridge information of one room */ + put: operations["matterbridge-edit-bridge-of-room"]; + post?: never; + /** Delete bridge of one room */ + delete: operations["matterbridge-delete-bridge-of-room"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/bridge/{token}/process": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get bridge process information */ + get: operations["matterbridge-get-bridge-process-state"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/poll/{token}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Create a poll */ + post: operations["poll-create-poll"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/poll/{token}/draft/{pollId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Modify a draft poll + * @description Required capability: `edit-draft-poll` + */ + post: operations["poll-update-draft-poll"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/poll/{token}/drafts": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get all drafted polls + * @description Required capability: `talk-polls-drafts` + */ + get: operations["poll-get-all-draft-polls"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/poll/{token}/{pollId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get a poll */ + get: operations["poll-show-poll"]; + put?: never; + /** Vote on a poll */ + post: operations["poll-vote-poll"]; + /** Close a poll */ + delete: operations["poll-close-poll"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/publicshareauth": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Creates a new room for video verification (requesting the password of a share) + * @description The new room is a public room associated with a "share:password" object with the ID of the share token. Unlike normal rooms in which the owner is the user that created the room these are special rooms always created by a guest or user on behalf of a registered user, the sharer, who will be the owner of the room. + * The share must have "send password by Talk" enabled; an error is returned otherwise. + */ + post: operations["public_share_auth-create-room"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/reaction/{token}/{messageId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get a list of reactions for a message */ + get: operations["reaction-get-reactions"]; + put?: never; + /** Add a reaction to a message */ + post: operations["reaction-react"]; + /** Delete a reaction from a message */ + delete: operations["reaction-delete"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/recording/{token}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Start the recording */ + post: operations["recording-start"]; + /** Stop the recording */ + delete: operations["recording-stop"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/recording/{token}/notification": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** Dismiss the store call recording notification */ + delete: operations["recording-notification-dismiss"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/recording/{token}/share-chat": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Share the recorded file to the chat */ + post: operations["recording-share-to-chat"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get all currently existent rooms which the user has joined */ + get: operations["room-get-rooms"]; + put?: never; + /** + * Create a room with a user, a group or a circle + * @description With the `conversation-creation-all` capability a lot of new options where introduced. Before that only `$roomType`, `$roomName`, `$objectType` and `$objectId` were supported all the time, and `$password` with the `conversation-creation-password` capability In case the `$roomType` is {@see Room::TYPE_ONE_TO_ONE} only the `$invite` or `$participants` parameter is supported. + */ + post: operations["room-create-room"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/listed-room": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get listed rooms with optional search term */ + get: operations["room-get-listed-rooms"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/breakout-rooms": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get breakout rooms + * @description All for moderators and in case of "free selection", or the assigned breakout room for other participants + */ + get: operations["room-get-breakout-rooms"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get a room */ + get: operations["room-get-single-room"]; + /** Rename a room */ + put: operations["room-rename-room"]; + post?: never; + /** Delete a room */ + delete: operations["room-delete-room"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/note-to-self": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get the "Note to self" conversation for the user + * @description It will be automatically created when it is currently missing + */ + get: operations["room-get-note-to-self-conversation"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/favorite": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Add a room to the favorites */ + post: operations["room-add-to-favorites"]; + /** Remove a room from the favorites */ + delete: operations["room-remove-from-favorites"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/notify": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Update the notification level for a room */ + post: operations["room-set-notification-level"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/notify-calls": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Update call notifications */ + post: operations["room-set-notification-calls"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/description": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Update the description of a room */ + put: operations["room-set-description"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/object": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** + * Unbind a room from its object to prevent automatic retention + * @description Required capability: `unbind-conversation` + */ + delete: operations["room-unbind-room-from-object"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get a list of participants for a room */ + get: operations["room-get-participants"]; + put?: never; + /** Add a participant to a room */ + post: operations["room-add-participant-to-room"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/breakout-rooms/participants": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get the breakout room participants for a room */ + get: operations["room-get-breakout-room-participants"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants/self": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** Remove the current user from a room */ + delete: operations["room-remove-self-from-room"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/attendees": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** Remove an attendee from a room */ + delete: operations["room-remove-attendee-from-room"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/public": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Allowed guests to join conversation + * @description Required capability: `conversation-creation-password` for `string $password` parameter + */ + post: operations["room-make-public"]; + /** Disallowed guests to join conversation */ + delete: operations["room-make-private"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/read-only": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Set read-only state of a room */ + put: operations["room-set-read-only"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/listable": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Make a room listable */ + put: operations["room-set-listable"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/mention-permissions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Update the mention permissions for a room */ + put: operations["room-set-mention-permissions"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/password": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Set a password for a room */ + put: operations["room-set-password"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/archive": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Archive a conversation + * @description Required capability: `archived-conversations-v2` + */ + post: operations["room-archive-conversation"]; + /** + * Unarchive a conversation + * @description Required capability: `archived-conversations-v2` + */ + delete: operations["room-unarchive-conversation"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/important": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Mark a conversation as important (still sending notifications while on DND) + * @description Required capability: `important-conversations` + */ + post: operations["room-mark-conversation-as-important"]; + /** + * Mark a conversation as unimportant (no longer sending notifications while on DND) + * @description Required capability: `important-conversations` + */ + delete: operations["room-mark-conversation-as-unimportant"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/sensitive": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Mark a conversation as sensitive (no last message is visible / no push preview is shown) + * @description Required capability: `sensitive-conversations` + */ + post: operations["room-mark-conversation-as-sensitive"]; + /** + * Mark a conversation as insensitive (last message is visible / push preview is shown) + * @description Required capability: `sensitive-conversations` + */ + delete: operations["room-mark-conversation-as-insensitive"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants/active": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Join a room */ + post: operations["room-join-room"]; + /** Leave a room */ + delete: operations["room-leave-room"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants/state": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Set active state for a session */ + put: operations["room-set-session-state"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/moderators": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Promote an attendee to moderator */ + post: operations["room-promote-moderator"]; + /** Demote an attendee from moderator */ + delete: operations["room-demote-moderator"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/permissions/{mode}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Update the permissions of a room */ + put: operations["room-set-permissions"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/attendees/permissions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Update the permissions of an attendee */ + put: operations["room-set-attendee-permissions"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/attendees/permissions/all": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** + * Update the permissions of all attendees + * @deprecated + */ + put: operations["room-set-all-attendees-permissions"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/webinar/lobby": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Update the lobby state for a room */ + put: operations["room-set-lobby"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/webinar/sip": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Update SIP enabled state */ + put: operations["room-setsip-enabled"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/recording-consent": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Set recording consent requirement for this conversation */ + put: operations["room-set-recording-consent"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/participants/resend-invitations": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Resend invitations */ + post: operations["room-resend-invitations"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/message-expiration": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Update message expiration time */ + post: operations["room-set-message-expiration"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/import-emails": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Import a list of email attendees + * @description Content format is comma separated values: - Header line is required and must match `"email","name"` or `"email"` - One entry per line (e.g. `"John Doe","john@example.tld"`) + * Required capability: `email-csv-import` + */ + post: operations["room-import-emails-as-participants"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/capabilities": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get capabilities for a room + * @description See "Capability handling in federated conversations" in https://github.com/nextcloud/spreed/issues/10680 to learn which capabilities should be considered from the local server or from the remote server. + */ + get: operations["room-get-capabilities"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/meeting": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Schedule a meeting for a conversation + * @description Required capability: `schedule-meeting` + */ + post: operations["room-schedule-meeting"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/settings/user": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Update user setting */ + post: operations["settings-set-user-setting"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/signaling/settings": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get the signaling settings */ + get: operations["signaling-get-settings"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/api/{apiVersion}/signaling/{token}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get signaling messages */ + get: operations["signaling-pull-messages"]; + put?: never; + /** Send signaling messages */ + post: operations["signaling-send-messages"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ocs/v2.php/apps/spreed/temp-user-avatar": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Upload your avatar as a user */ + post: operations["temp_avatar-post-avatar"]; + /** Delete your avatar as a user */ + delete: operations["temp_avatar-delete-avatar"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/threads/recent": { parameters: { query?: never; @@ -3945,94 +3945,6 @@ export interface operations { }; }; }; - "call_notification-state": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v4"; - /** @description Conversation token to check */ - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Notification should be kept alive */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - /** @description Dismiss call notification and show "Missed call"-notification instead */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - /** @description Not logged in, try again with auth data sent */ - 403: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - /** @description Dismiss call notification */ - 404: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - }; - }; "call-download-participants-for-call": { parameters: { query?: { @@ -4415,6 +4327,1508 @@ export interface operations { }; }; }; + "call_notification-state": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v4"; + /** @description Conversation token to check */ + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Notification should be kept alive */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + /** @description Dismiss call notification and show "Missed call"-notification instead */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + /** @description Not logged in, try again with auth data sent */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + /** @description Dismiss call notification */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + }; + }; + "chat-receive-messages": { + parameters: { + query: { + /** @description Polling for new messages (1) or getting the history of the chat (0) */ + lookIntoFuture: 0 | 1; + /** @description Number of chat messages to receive (100 by default, 200 at most) */ + limit?: number; + /** @description The last known message (serves as offset) */ + lastKnownMessageId?: number; + /** @description The last known common read message (so the response is 200 instead of 304 when it changes even when there are no messages) */ + lastCommonReadId?: number; + /** @description Number of seconds to wait for new messages (30 by default, 30 at most) */ + timeout?: number; + /** @description Automatically set the last read marker when 1, if your client does this itself via chat/{token}/read set to 0 */ + setReadMarker?: 0 | 1; + /** @description Include the $lastKnownMessageId in the messages when 1 (default 0) */ + includeLastKnown?: 0 | 1; + /** @description When the user status should not be automatically set to online set to 1 (default 0) */ + noStatusUpdate?: 0 | 1; + /** @description Set to 0 when notifications should not be marked as read (default 1) */ + markNotificationsAsRead?: 0 | 1; + /** @description Limit the chat message list to a given thread */ + threadId?: number; + }; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Messages returned */ + 200: { + headers: { + "X-Chat-Last-Common-Read"?: string; + "X-Chat-Last-Given"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatMessageWithParent"][]; + }; + }; + }; + }; + /** @description No messages */ + 304: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + "chat-send-message": { + parameters: { + query?: never; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + /** @description the message to send */ + message: string; + /** + * @description for guests + * @default + */ + actorDisplayName?: string; + /** + * @description for the message to be able to later identify it again + * @default + */ + referenceId?: string; + /** + * Format: int64 + * @description Parent id which this message is a reply to + * @default 0 + */ + replyTo?: number; + /** + * @description If sent silent the chat message will not create any notifications + * @default false + */ + silent?: boolean; + /** + * @description Only supported when not replying, when given will create a thread (requires `threads` capability) + * @default + */ + threadTitle?: string; + /** + * Format: int64 + * @description Thread id which this message is a reply to without quoting a specific message (ignored when $replyTo is given, also requires `threads` capability) + * @default 0 + */ + threadId?: number; + }; + }; + }; + responses: { + /** @description Message sent successfully */ + 201: { + headers: { + "X-Chat-Last-Common-Read"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatMessageWithParent"] | null; + }; + }; + }; + }; + /** @description Sending message is not possible */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + /** @description Actor not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + /** @description Message too long */ + 413: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + /** @description Mention rate limit exceeded (guests only) */ + 429: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + }; + }; + "chat-clear-history": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description History cleared successfully */ + 200: { + headers: { + "X-Chat-Last-Common-Read"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatMessage"]; + }; + }; + }; + }; + /** @description History cleared successfully, but Federation or Matterbridge is configured, so the information can be replicated elsewhere */ + 202: { + headers: { + "X-Chat-Last-Common-Read"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatMessage"]; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + /** @description Missing permissions to clear history */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + }; + }; + "chat-get-objects-shared-in-room": { + parameters: { + query: { + /** @description Type of the objects */ + objectType: string; + /** @description ID of the last known message */ + lastKnownMessageId?: number; + /** @description Maximum number of objects */ + limit?: number; + }; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description List of shared objects messages returned */ + 200: { + headers: { + "X-Chat-Last-Given"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + [key: string]: components["schemas"]["ChatMessage"]; + }; + }; + }; + }; + }; + }; + }; + "chat-share-object-to-chat": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Type of the object */ + objectType: string; + /** @description ID of the object */ + objectId: string; + /** + * @description Additional metadata, sample value: `{\"type\":\"geo-location\",\"id\":\"geo:52.5450511,13.3741463\",\"name\":\"Nextcloud Berlin Office\",\"latitude\":\"52.5450511\",\"longitude\":\"13.3741463\"}` + * @default + */ + metaData?: string; + /** + * @description Guest name + * @default + */ + actorDisplayName?: string; + /** + * @description Reference ID + * @default + */ + referenceId?: string; + /** + * Format: int64 + * @description Thread id which this message is a reply to without quoting a specific message (also requires `threads` capability) + * @default 0 + */ + threadId?: number; + }; + }; + }; + responses: { + /** @description Object shared successfully */ + 201: { + headers: { + "X-Chat-Last-Common-Read"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatMessageWithParent"] | null; + }; + }; + }; + }; + /** @description Sharing object is not possible */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + /** @description Actor not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + /** @description Message too long */ + 413: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + }; + }; + "chat-summarize-chat": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + /** + * Format: int64 + * @description Offset from where on the summary should be generated + */ + fromMessageId: number; + }; + }; + }; + responses: { + /** @description Summary was scheduled, use the returned taskId to get the status information and output from the TaskProcessing API: [OCS TaskProcessing API](https://docs.nextcloud.com/server/latest/developer_manual/client_apis/OCS/ocs-taskprocessing-api.html#fetch-a-task-by-id). If the response data contains nextOffset, not all messages could be handled in a single request. After receiving the response a second summary should be requested with the provided nextOffset. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** Format: int64 */ + taskId: number; + /** Format: int64 */ + nextOffset?: number; + }; + }; + }; + }; + }; + /** @description No messages found to summarize */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description No AI provider available or summarizing failed */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "ai-no-provider" | "ai-error"; + }; + }; + }; + }; + }; + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + "chat-get-message-context": { + parameters: { + query?: { + /** @description Number of chat messages to receive in both directions (50 by default, 100 at most, might return 201 messages) */ + limit?: number; + /** @description Limit the chat message list to a given thread */ + threadId?: number; + }; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + /** @description The focused message which should be in the "middle" of the returned context */ + messageId: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Message context returned */ + 200: { + headers: { + "X-Chat-Last-Common-Read"?: string; + "X-Chat-Last-Given"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatMessageWithParent"][]; + }; + }; + }; + }; + /** @description No messages */ + 304: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + "chat-edit-message": { + parameters: { + query?: never; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + /** @description ID of the message */ + messageId: number; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + /** @description the message to send */ + message: string; + }; + }; + }; + responses: { + /** @description Message edited successfully */ + 200: { + headers: { + "X-Chat-Last-Common-Read"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatMessageWithParent"]; + }; + }; + }; + }; + /** @description Message edited successfully, but a bot or Matterbridge is configured, so the information can be replicated to other services */ + 202: { + headers: { + "X-Chat-Last-Common-Read"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatMessageWithParent"]; + }; + }; + }; + }; + /** @description Editing message is not possible, e.g. when the new message is empty or the message is too old */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + /** @description Missing permissions to edit message */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + /** @description Message not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + /** @description Editing this message type is not allowed */ + 405: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + /** @description Message too long */ + 413: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + }; + }; + "chat-delete-message": { + parameters: { + query?: never; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + /** @description ID of the message */ + messageId: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Message deleted successfully */ + 200: { + headers: { + "X-Chat-Last-Common-Read"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatMessageWithParent"]; + }; + }; + }; + }; + /** @description Message deleted successfully, but a bot or Matterbridge is configured, so the information can be replicated elsewhere */ + 202: { + headers: { + "X-Chat-Last-Common-Read"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatMessageWithParent"]; + }; + }; + }; + }; + /** @description Deleting message is not possible */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + /** @description Missing permissions to delete message */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + /** @description Message not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + /** @description Deleting this message type is not allowed */ + 405: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + }; + }; + "chat-get-reminder": { + parameters: { + query?: never; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + /** @description ID of the message */ + messageId: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Reminder returned */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatReminder"]; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + /** @description Message not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error?: string; + }; + }; + }; + }; + }; + }; + }; + "chat-set-reminder": { + parameters: { + query?: never; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + /** @description ID of the message */ + messageId: number; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + /** + * Format: int64 + * @description Timestamp of the reminder + */ + timestamp: number; + }; + }; + }; + responses: { + /** @description Reminder created successfully */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatReminder"]; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + /** @description Message not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error?: string; + }; + }; + }; + }; + }; + }; + }; + "chat-delete-reminder": { + parameters: { + query?: never; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + /** @description ID of the message */ + messageId: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Reminder deleted successfully */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error?: string; + }; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + /** @description Message not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error?: string; + }; + }; + }; + }; + }; + }; + }; + "chat-get-upcoming-reminders": { + 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 Reminders returned */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatReminderUpcoming"][]; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + }; + }; + "chat-set-read-marker": { + parameters: { + query?: never; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * Format: int64 + * @description ID if the last read message (Optional only with `chat-read-last` capability) + * @default null + */ + lastReadMessage?: number | null; + }; + }; + }; + responses: { + /** @description Read marker set successfully */ + 200: { + headers: { + "X-Chat-Last-Common-Read"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["Room"]; + }; + }; + }; + }; + }; + }; + "chat-mark-unread": { + parameters: { + query?: never; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Read marker set successfully */ + 200: { + headers: { + "X-Chat-Last-Common-Read"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["Room"]; + }; + }; + }; + }; + }; + }; + "chat-get-objects-shared-in-room-overview": { + parameters: { + query?: { + /** @description Maximum number of objects */ + limit?: number; + }; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description List of shared objects messages of each type returned */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + [key: string]: components["schemas"]["ChatMessage"][]; + }; + }; + }; + }; + }; + }; + }; + "chat-pin-message": { + parameters: { + query?: never; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + /** @description ID of the message */ + messageId: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * Format: int64 + * @description Unix timestamp when to unpin the message + * @default 0 + */ + pinUntil?: number; + }; + }; + }; + responses: { + /** @description Message was pinned successfully */ + 200: { + headers: { + "X-Chat-Last-Common-Read"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatMessageWithParent"] | null; + }; + }; + }; + }; + /** @description Message could not be pinned */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "message" | "until" | "status"; + }; + }; + }; + }; + }; + /** @description Message was not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "message" | "until" | "status"; + }; + }; + }; + }; + }; + }; + }; + "chat-unpin-message": { + parameters: { + query?: never; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + /** @description ID of the message */ + messageId: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Message is not pinned now */ + 200: { + headers: { + "X-Chat-Last-Common-Read"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatMessageWithParent"] | null; + }; + }; + }; + }; + /** @description Federation request answered with an unknown status code */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "status"; + }; + }; + }; + }; + }; + /** @description Message was not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "message"; + }; + }; + }; + }; + }; + }; + }; + "chat-hide-pinned-message": { + parameters: { + query?: never; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + /** @description ID of the message */ + messageId: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Pinned message is now hidden */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + /** @description Message was not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; + }; + }; + }; + }; + }; + }; + "chat-mentions": { + parameters: { + query: { + /** @description Text to search for */ + search: string; + /** @description Maximum number of results */ + limit?: number; + /** @description Include the user statuses */ + includeStatus?: boolean; + }; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description List of mention suggestions returned */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["ChatMentionSuggestion"][]; + }; + }; + }; + }; + }; + }; "files_integration-get-room-by-file-id": { parameters: { query?: never; @@ -4621,6 +6035,223 @@ export interface operations { }; }; }; + "live_transcription-enable": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Live transcription enabled successfully */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + /** @description The participant is not in the call */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "app" | "in-call"; + }; + }; + }; + }; + }; + }; + }; + "live_transcription-disable": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Live transcription stopped successfully */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + /** @description The participant is not in the call */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "app" | "in-call"; + }; + }; + }; + }; + }; + }; + }; + "live_transcription-get-available-languages": { + 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 Available languages got successfully */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + [key: string]: components["schemas"]["LiveTranscriptionLanguage"]; + }; + }; + }; + }; + }; + /** @description The external app "live_transcription" is not available */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "app"; + }; + }; + }; + }; + }; + }; + }; + "live_transcription-set-language": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v1"; + token: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + /** @description the ID of the language to set */ + languageId: string; + }; + }; + }; + responses: { + /** @description Language set successfully */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + /** @description The external app "live_transcription" is not available */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "app"; + }; + }; + }; + }; + }; + /** @description Participant is not a moderator */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "app"; + }; + }; + }; + }; + }; + }; + }; "matterbridge-get-bridge-of-room": { parameters: { query?: never; @@ -6216,7 +7847,7 @@ export interface operations { }; }; }; - "room-get-note-to-self-conversation": { + "room-get-breakout-rooms": { parameters: { query?: never; header: { @@ -6225,22 +7856,38 @@ export interface operations { }; path: { apiVersion: "v4"; + token: string; }; cookie?: never; }; requestBody?: never; responses: { - /** @description Room returned successfully */ + /** @description Breakout rooms returned */ 200: { headers: { - "X-Nextcloud-Talk-Hash"?: string; [name: string]: unknown; }; content: { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; + data: components["schemas"]["Room"][]; + }; + }; + }; + }; + /** @description Getting breakout rooms is not possible */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + error: string; + }; }; }; }; @@ -6428,7 +8075,7 @@ export interface operations { }; }; }; - "room-get-breakout-rooms": { + "room-get-note-to-self-conversation": { parameters: { query?: never; header: { @@ -6437,38 +8084,22 @@ export interface operations { }; path: { apiVersion: "v4"; - token: string; }; cookie?: never; }; requestBody?: never; responses: { - /** @description Breakout rooms returned */ + /** @description Room returned successfully */ 200: { headers: { + "X-Nextcloud-Talk-Hash"?: string; [name: string]: unknown; }; content: { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"][]; - }; - }; - }; - }; - /** @description Getting breakout rooms is not possible */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; + data: components["schemas"]["Room"]; }; }; }; @@ -6489,7 +8120,7 @@ export interface operations { }; }; }; - "room-unbind-room-from-object": { + "room-add-to-favorites": { parameters: { query?: never; header: { @@ -6504,7 +8135,7 @@ export interface operations { }; requestBody?: never; responses: { - /** @description Room successfully unbound */ + /** @description Successfully added room to favorites */ 200: { headers: { [name: string]: unknown; @@ -6518,8 +8149,8 @@ export interface operations { }; }; }; - /** @description Unbinding room is not possible */ - 400: { + /** @description Current user is not logged in */ + 401: { headers: { [name: string]: unknown; }; @@ -6527,17 +8158,14 @@ export interface operations { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "object-type"; - }; + data: unknown; }; }; }; }; }; }; - "room-make-public": { + "room-remove-from-favorites": { parameters: { query?: never; header: { @@ -6550,19 +8178,64 @@ export interface operations { }; cookie?: never; }; - requestBody?: { + requestBody?: never; + responses: { + /** @description Successfully removed room from favorites */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["Room"]; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + }; + }; + "room-set-notification-level": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v4"; + token: string; + }; + cookie?: never; + }; + requestBody: { content: { "application/json": { /** - * @description New password (only available with `conversation-creation-password` capability) - * @default + * Format: int64 + * @description New level */ - password?: string; + level: number; }; }; }; responses: { - /** @description Allowed guests successfully */ + /** @description Notification level updated successfully */ 200: { headers: { [name: string]: unknown; @@ -6576,7 +8249,7 @@ export interface operations { }; }; }; - /** @description Allowing guests is not possible */ + /** @description Updating notification level is not possible */ 400: { headers: { [name: string]: unknown; @@ -6587,8 +8260,7 @@ export interface operations { meta: components["schemas"]["OCSMeta"]; data: { /** @enum {string} */ - error: "breakout-room" | "type" | "value" | "password"; - message?: string; + error: "level"; }; }; }; @@ -6610,7 +8282,7 @@ export interface operations { }; }; }; - "room-make-private": { + "room-set-notification-calls": { parameters: { query?: never; header: { @@ -6623,9 +8295,19 @@ export interface operations { }; cookie?: never; }; - requestBody?: never; + requestBody: { + content: { + "application/json": { + /** + * Format: int64 + * @description New level + */ + level: number; + }; + }; + }; responses: { - /** @description Room unpublished Disallowing guests successfully */ + /** @description Call notification level updated successfully */ 200: { headers: { [name: string]: unknown; @@ -6639,7 +8321,7 @@ export interface operations { }; }; }; - /** @description Disallowing guests is not possible */ + /** @description Updating call notification level is not possible */ 400: { headers: { [name: string]: unknown; @@ -6650,7 +8332,7 @@ export interface operations { meta: components["schemas"]["OCSMeta"]; data: { /** @enum {string} */ - error: "breakout-room" | "type" | "value"; + error: "level"; }; }; }; @@ -6727,7 +8409,7 @@ export interface operations { }; }; }; - "room-set-read-only": { + "room-unbind-room-from-object": { parameters: { query?: never; header: { @@ -6740,20 +8422,9 @@ export interface operations { }; cookie?: never; }; - requestBody: { - content: { - "application/json": { - /** - * Format: int64 - * @description New read-only state - * @enum {integer} - */ - state: 0 | 1; - }; - }; - }; + requestBody?: never; responses: { - /** @description Read-only state updated successfully */ + /** @description Room successfully unbound */ 200: { headers: { [name: string]: unknown; @@ -6767,7 +8438,7 @@ export interface operations { }; }; }; - /** @description Updating read-only state is not possible */ + /** @description Unbinding room is not possible */ 400: { headers: { [name: string]: unknown; @@ -6778,210 +8449,7 @@ export interface operations { meta: components["schemas"]["OCSMeta"]; data: { /** @enum {string} */ - error: "type" | "value"; - }; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - }; - }; - "room-set-listable": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v4"; - token: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** - * Format: int64 - * @description Scope where the room is listable - * @enum {integer} - */ - scope: 0 | 1 | 2; - }; - }; - }; - responses: { - /** @description Made room listable successfully */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; - }; - }; - }; - }; - /** @description Making room listable is not possible */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "breakout-room" | "type" | "value"; - }; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - }; - }; - "room-set-password": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v4"; - token: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** @description New password */ - password: string; - }; - }; - }; - responses: { - /** @description Password set successfully */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; - }; - }; - }; - }; - /** @description Setting password is not possible */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "breakout-room" | "type" | "value"; - message?: string; - }; - }; - }; - }; - }; - }; - }; - "room-set-permissions": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v4"; - token: string; - /** @description Level of the permissions ('call' (removed in Talk 20), 'default') */ - mode: "call" | "default"; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** - * Format: int64 - * @description New permissions - */ - permissions: number; - }; - }; - }; - responses: { - /** @description Permissions updated successfully */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; - }; - }; - }; - }; - /** @description Updating permissions is not possible */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "breakout-room" | "mode" | "type" | "value"; + error: "object-type"; }; }; }; @@ -7383,7 +8851,7 @@ export interface operations { }; }; }; - "room-set-attendee-permissions": { + "room-make-public": { parameters: { query?: never; header: { @@ -7396,44 +8864,33 @@ export interface operations { }; cookie?: never; }; - requestBody: { + requestBody?: { content: { "application/json": { /** - * Format: int64 - * @description ID of the attendee + * @description New password (only available with `conversation-creation-password` capability) + * @default */ - attendeeId: number; - /** - * @description Method of updating permissions ('set', 'remove', 'add') - * @enum {string} - */ - method: "set" | "remove" | "add"; - /** - * Format: int64 - * @description New permissions - */ - permissions: number; + password?: string; }; }; }; responses: { - /** @description Permissions updated successfully */ + /** @description Allowed guests successfully */ 200: { headers: { - "X-Nextcloud-Has-User-Statuses"?: true; [name: string]: unknown; }; content: { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Participant"][]; + data: components["schemas"]["Room"]; }; }; }; }; - /** @description Updating permissions is not possible */ + /** @description Allowing guests is not possible */ 400: { headers: { [name: string]: unknown; @@ -7444,14 +8901,15 @@ export interface operations { meta: components["schemas"]["OCSMeta"]; data: { /** @enum {string} */ - error: "participant" | "method" | "moderator" | "room-type" | "type" | "value"; + error: "breakout-room" | "type" | "value" | "password"; + message?: string; }; }; }; }; }; - /** @description Missing permissions to update permissions */ - 403: { + /** @description Current user is not logged in */ + 401: { headers: { [name: string]: unknown; }; @@ -7459,34 +8917,76 @@ export interface operations { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "participant" | "method" | "moderator" | "room-type" | "type" | "value"; - }; - }; - }; - }; - }; - /** @description Attendee not found */ - 404: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "participant" | "method" | "moderator" | "room-type" | "type" | "value"; - }; + data: unknown; }; }; }; }; }; }; - "room-set-all-attendees-permissions": { + "room-make-private": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v4"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Room unpublished Disallowing guests successfully */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["Room"]; + }; + }; + }; + }; + /** @description Disallowing guests is not possible */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "breakout-room" | "type" | "value"; + }; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + }; + }; + "room-set-read-only": { parameters: { query?: never; header: { @@ -7503,15 +9003,157 @@ export interface operations { content: { "application/json": { /** - * @description Method of updating permissions ('set', 'remove', 'add') - * @enum {string} + * Format: int64 + * @description New read-only state + * @enum {integer} */ - method: "set" | "remove" | "add"; + state: 0 | 1; + }; + }; + }; + responses: { + /** @description Read-only state updated successfully */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["Room"]; + }; + }; + }; + }; + /** @description Updating read-only state is not possible */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "type" | "value"; + }; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + }; + }; + "room-set-listable": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v4"; + token: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { /** * Format: int64 - * @description New permissions + * @description Scope where the room is listable + * @enum {integer} */ - permissions: number; + scope: 0 | 1 | 2; + }; + }; + }; + responses: { + /** @description Made room listable successfully */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["Room"]; + }; + }; + }; + }; + /** @description Making room listable is not possible */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "breakout-room" | "type" | "value"; + }; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + }; + }; + "room-set-mention-permissions": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v4"; + token: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + /** + * Format: int64 + * @description New mention permissions + * @enum {integer} + */ + mentionPermissions: 0 | 1; }; }; }; @@ -7532,6 +9174,349 @@ export interface operations { }; /** @description Updating permissions is not possible */ 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "breakout-room" | "type" | "value"; + }; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + }; + }; + "room-set-password": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v4"; + token: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + /** @description New password */ + password: string; + }; + }; + }; + responses: { + /** @description Password set successfully */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["Room"]; + }; + }; + }; + }; + /** @description Setting password is not possible */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "breakout-room" | "type" | "value"; + message?: string; + }; + }; + }; + }; + }; + }; + }; + "room-archive-conversation": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v4"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Conversation was archived */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["Room"]; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + }; + }; + "room-unarchive-conversation": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v4"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Conversation was unarchived */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["Room"]; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + }; + }; + "room-mark-conversation-as-important": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v4"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Conversation was marked as important */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["Room"]; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + }; + }; + "room-mark-conversation-as-unimportant": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v4"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Conversation was marked as unimportant */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["Room"]; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + }; + }; + "room-mark-conversation-as-sensitive": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v4"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Conversation was marked as sensitive */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["Room"]; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + }; + }; + "room-mark-conversation-as-insensitive": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v4"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Conversation was marked as insensitive */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["Room"]; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { headers: { [name: string]: unknown; }; @@ -7677,75 +9662,6 @@ export interface operations { }; }; }; - "room-resend-invitations": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v4"; - token: string; - }; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": { - /** - * Format: int64 - * @description ID of the attendee - */ - attendeeId?: number | null; - }; - }; - }; - responses: { - /** @description Invitation resent successfully */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - /** @description Attendee not found */ - 404: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - }; - }; "room-set-session-state": { parameters: { query?: never; @@ -7975,7 +9891,7 @@ export interface operations { }; }; }; - "room-add-to-favorites": { + "room-set-permissions": { parameters: { query?: never; header: { @@ -7985,12 +9901,24 @@ export interface operations { path: { apiVersion: "v4"; token: string; + /** @description Level of the permissions ('call' (removed in Talk 20), 'default') */ + mode: "call" | "default"; }; cookie?: never; }; - requestBody?: never; + requestBody: { + content: { + "application/json": { + /** + * Format: int64 + * @description New permissions + */ + permissions: number; + }; + }; + }; responses: { - /** @description Successfully added room to favorites */ + /** @description Permissions updated successfully */ 200: { headers: { [name: string]: unknown; @@ -8004,8 +9932,8 @@ export interface operations { }; }; }; - /** @description Current user is not logged in */ - 401: { + /** @description Updating permissions is not possible */ + 400: { headers: { [name: string]: unknown; }; @@ -8013,239 +9941,17 @@ export interface operations { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; - data: unknown; + data: { + /** @enum {string} */ + error: "breakout-room" | "mode" | "type" | "value"; + }; }; }; }; }; }; }; - "room-remove-from-favorites": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v4"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully removed room from favorites */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - }; - }; - "room-mark-conversation-as-important": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v4"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Conversation was marked as important */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - }; - }; - "room-mark-conversation-as-unimportant": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v4"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Conversation was marked as unimportant */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - }; - }; - "room-mark-conversation-as-sensitive": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v4"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Conversation was marked as sensitive */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - }; - }; - "room-mark-conversation-as-insensitive": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v4"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Conversation was marked as insensitive */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - }; - }; - "room-set-notification-level": { + "room-set-attendee-permissions": { parameters: { query?: never; header: { @@ -8263,28 +9969,39 @@ export interface operations { "application/json": { /** * Format: int64 - * @description New level + * @description ID of the attendee */ - level: number; + attendeeId: number; + /** + * @description Method of updating permissions ('set', 'remove', 'add') + * @enum {string} + */ + method: "set" | "remove" | "add"; + /** + * Format: int64 + * @description New permissions + */ + permissions: number; }; }; }; responses: { - /** @description Notification level updated successfully */ + /** @description Permissions updated successfully */ 200: { headers: { + "X-Nextcloud-Has-User-Statuses"?: true; [name: string]: unknown; }; content: { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; + data: components["schemas"]["Participant"][]; }; }; }; }; - /** @description Updating notification level is not possible */ + /** @description Updating permissions is not possible */ 400: { headers: { [name: string]: unknown; @@ -8295,14 +10012,14 @@ export interface operations { meta: components["schemas"]["OCSMeta"]; data: { /** @enum {string} */ - error: "level"; + error: "participant" | "method" | "moderator" | "room-type" | "type" | "value"; }; }; }; }; }; - /** @description Current user is not logged in */ - 401: { + /** @description Missing permissions to update permissions */ + 403: { headers: { [name: string]: unknown; }; @@ -8310,14 +10027,34 @@ export interface operations { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; - data: unknown; + data: { + /** @enum {string} */ + error: "participant" | "method" | "moderator" | "room-type" | "type" | "value"; + }; + }; + }; + }; + }; + /** @description Attendee not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + /** @enum {string} */ + error: "participant" | "method" | "moderator" | "room-type" | "type" | "value"; + }; }; }; }; }; }; }; - "room-set-notification-calls": { + "room-set-all-attendees-permissions": { parameters: { query?: never; header: { @@ -8334,15 +10071,20 @@ export interface operations { content: { "application/json": { /** - * Format: int64 - * @description New level + * @description Method of updating permissions ('set', 'remove', 'add') + * @enum {string} */ - level: number; + method: "set" | "remove" | "add"; + /** + * Format: int64 + * @description New permissions + */ + permissions: number; }; }; }; responses: { - /** @description Call notification level updated successfully */ + /** @description Permissions updated successfully */ 200: { headers: { [name: string]: unknown; @@ -8356,25 +10098,8 @@ export interface operations { }; }; }; - /** @description Updating call notification level is not possible */ + /** @description Updating permissions is not possible */ 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "level"; - }; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { headers: { [name: string]: unknown; }; @@ -8672,6 +10397,75 @@ export interface operations { }; }; }; + "room-resend-invitations": { + parameters: { + query?: never; + header: { + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v4"; + token: string; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * Format: int64 + * @description ID of the attendee + */ + attendeeId?: number | null; + }; + }; + }; + responses: { + /** @description Invitation resent successfully */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + /** @description Current user is not logged in */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + /** @description Attendee not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: unknown; + }; + }; + }; + }; + }; + }; "room-set-message-expiration": { parameters: { query?: never; @@ -8730,206 +10524,6 @@ export interface operations { }; }; }; - "room-get-capabilities": { - parameters: { - query?: never; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v4"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get capabilities successfully */ - 200: { - headers: { - "X-Nextcloud-Talk-Hash"?: string; - "X-Nextcloud-Talk-Proxy-Hash"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Capabilities"] | { - [key: string]: unknown; - }; - }; - }; - }; - }; - }; - }; - "room-set-mention-permissions": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v4"; - token: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** - * Format: int64 - * @description New mention permissions - * @enum {integer} - */ - mentionPermissions: 0 | 1; - }; - }; - }; - responses: { - /** @description Permissions updated successfully */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; - }; - }; - }; - }; - /** @description Updating permissions is not possible */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "breakout-room" | "type" | "value"; - }; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - }; - }; - "room-archive-conversation": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v4"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Conversation was archived */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - }; - }; - "room-unarchive-conversation": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v4"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Conversation was unarchived */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - }; - }; "room-import-emails-as-participants": { parameters: { query?: never; @@ -9022,6 +10616,43 @@ export interface operations { }; }; }; + "room-get-capabilities": { + parameters: { + query?: never; + header: { + /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ + "x-nextcloud-federation"?: string; + /** @description Required to be true for the API request to pass */ + "OCS-APIRequest": boolean; + }; + path: { + apiVersion: "v4"; + token: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get capabilities successfully */ + 200: { + headers: { + "X-Nextcloud-Talk-Hash"?: string; + "X-Nextcloud-Talk-Proxy-Hash"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: components["schemas"]["Capabilities"] | { + [key: string]: unknown; + }; + }; + }; + }; + }; + }; + }; "room-schedule-meeting": { parameters: { query?: never; @@ -9505,1637 +11136,6 @@ export interface operations { }; }; }; - "chat-receive-messages": { - parameters: { - query: { - /** @description Polling for new messages (1) or getting the history of the chat (0) */ - lookIntoFuture: 0 | 1; - /** @description Number of chat messages to receive (100 by default, 200 at most) */ - limit?: number; - /** @description The last known message (serves as offset) */ - lastKnownMessageId?: number; - /** @description The last known common read message (so the response is 200 instead of 304 when it changes even when there are no messages) */ - lastCommonReadId?: number; - /** @description Number of seconds to wait for new messages (30 by default, 30 at most) */ - timeout?: number; - /** @description Automatically set the last read marker when 1, if your client does this itself via chat/{token}/read set to 0 */ - setReadMarker?: 0 | 1; - /** @description Include the $lastKnownMessageId in the messages when 1 (default 0) */ - includeLastKnown?: 0 | 1; - /** @description When the user status should not be automatically set to online set to 1 (default 0) */ - noStatusUpdate?: 0 | 1; - /** @description Set to 0 when notifications should not be marked as read (default 1) */ - markNotificationsAsRead?: 0 | 1; - /** @description Limit the chat message list to a given thread */ - threadId?: number; - }; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Messages returned */ - 200: { - headers: { - "X-Chat-Last-Common-Read"?: string; - "X-Chat-Last-Given"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatMessageWithParent"][]; - }; - }; - }; - }; - /** @description No messages */ - 304: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - "chat-send-message": { - parameters: { - query?: never; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** @description the message to send */ - message: string; - /** - * @description for guests - * @default - */ - actorDisplayName?: string; - /** - * @description for the message to be able to later identify it again - * @default - */ - referenceId?: string; - /** - * Format: int64 - * @description Parent id which this message is a reply to - * @default 0 - */ - replyTo?: number; - /** - * @description If sent silent the chat message will not create any notifications - * @default false - */ - silent?: boolean; - /** - * @description Only supported when not replying, when given will create a thread (requires `threads` capability) - * @default - */ - threadTitle?: string; - /** - * Format: int64 - * @description Thread id which this message is a reply to without quoting a specific message (ignored when $replyTo is given, also requires `threads` capability) - * @default 0 - */ - threadId?: number; - }; - }; - }; - responses: { - /** @description Message sent successfully */ - 201: { - headers: { - "X-Chat-Last-Common-Read"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatMessageWithParent"] | null; - }; - }; - }; - }; - /** @description Sending message is not possible */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - /** @description Actor not found */ - 404: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - /** @description Message too long */ - 413: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - /** @description Mention rate limit exceeded (guests only) */ - 429: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - }; - }; - "chat-clear-history": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description History cleared successfully */ - 200: { - headers: { - "X-Chat-Last-Common-Read"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatMessage"]; - }; - }; - }; - }; - /** @description History cleared successfully, but Federation or Matterbridge is configured, so the information can be replicated elsewhere */ - 202: { - headers: { - "X-Chat-Last-Common-Read"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatMessage"]; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - /** @description Missing permissions to clear history */ - 403: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - }; - }; - "chat-get-objects-shared-in-room": { - parameters: { - query: { - /** @description Type of the objects */ - objectType: string; - /** @description ID of the last known message */ - lastKnownMessageId?: number; - /** @description Maximum number of objects */ - limit?: number; - }; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description List of shared objects messages returned */ - 200: { - headers: { - "X-Chat-Last-Given"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - [key: string]: components["schemas"]["ChatMessage"]; - }; - }; - }; - }; - }; - }; - }; - "chat-share-object-to-chat": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** @description Type of the object */ - objectType: string; - /** @description ID of the object */ - objectId: string; - /** - * @description Additional metadata, sample value: `{\"type\":\"geo-location\",\"id\":\"geo:52.5450511,13.3741463\",\"name\":\"Nextcloud Berlin Office\",\"latitude\":\"52.5450511\",\"longitude\":\"13.3741463\"}` - * @default - */ - metaData?: string; - /** - * @description Guest name - * @default - */ - actorDisplayName?: string; - /** - * @description Reference ID - * @default - */ - referenceId?: string; - /** - * Format: int64 - * @description Thread id which this message is a reply to without quoting a specific message (also requires `threads` capability) - * @default 0 - */ - threadId?: number; - }; - }; - }; - responses: { - /** @description Object shared successfully */ - 201: { - headers: { - "X-Chat-Last-Common-Read"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatMessageWithParent"] | null; - }; - }; - }; - }; - /** @description Sharing object is not possible */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - /** @description Actor not found */ - 404: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - /** @description Message too long */ - 413: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - }; - }; - "chat-summarize-chat": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** - * Format: int64 - * @description Offset from where on the summary should be generated - */ - fromMessageId: number; - }; - }; - }; - responses: { - /** @description Summary was scheduled, use the returned taskId to get the status information and output from the TaskProcessing API: [OCS TaskProcessing API](https://docs.nextcloud.com/server/latest/developer_manual/client_apis/OCS/ocs-taskprocessing-api.html#fetch-a-task-by-id). If the response data contains nextOffset, not all messages could be handled in a single request. After receiving the response a second summary should be requested with the provided nextOffset. */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** Format: int64 */ - taskId: number; - /** Format: int64 */ - nextOffset?: number; - }; - }; - }; - }; - }; - /** @description No messages found to summarize */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - /** @description No AI provider available or summarizing failed */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "ai-no-provider" | "ai-error"; - }; - }; - }; - }; - }; - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - "chat-get-message-context": { - parameters: { - query?: { - /** @description Number of chat messages to receive in both directions (50 by default, 100 at most, might return 201 messages) */ - limit?: number; - /** @description Limit the chat message list to a given thread */ - threadId?: number; - }; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - /** @description The focused message which should be in the "middle" of the returned context */ - messageId: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Message context returned */ - 200: { - headers: { - "X-Chat-Last-Common-Read"?: string; - "X-Chat-Last-Given"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatMessageWithParent"][]; - }; - }; - }; - }; - /** @description No messages */ - 304: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - "chat-edit-message": { - parameters: { - query?: never; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - /** @description ID of the message */ - messageId: number; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** @description the message to send */ - message: string; - }; - }; - }; - responses: { - /** @description Message edited successfully */ - 200: { - headers: { - "X-Chat-Last-Common-Read"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatMessageWithParent"]; - }; - }; - }; - }; - /** @description Message edited successfully, but a bot or Matterbridge is configured, so the information can be replicated to other services */ - 202: { - headers: { - "X-Chat-Last-Common-Read"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatMessageWithParent"]; - }; - }; - }; - }; - /** @description Editing message is not possible, e.g. when the new message is empty or the message is too old */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - /** @description Missing permissions to edit message */ - 403: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - /** @description Message not found */ - 404: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - /** @description Editing this message type is not allowed */ - 405: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - /** @description Message too long */ - 413: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - }; - }; - "chat-delete-message": { - parameters: { - query?: never; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - /** @description ID of the message */ - messageId: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Message deleted successfully */ - 200: { - headers: { - "X-Chat-Last-Common-Read"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatMessageWithParent"]; - }; - }; - }; - }; - /** @description Message deleted successfully, but a bot or Matterbridge is configured, so the information can be replicated elsewhere */ - 202: { - headers: { - "X-Chat-Last-Common-Read"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatMessageWithParent"]; - }; - }; - }; - }; - /** @description Deleting message is not possible */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - /** @description Missing permissions to delete message */ - 403: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - /** @description Message not found */ - 404: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - /** @description Deleting this message type is not allowed */ - 405: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - }; - }; - "chat-get-reminder": { - parameters: { - query?: never; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - /** @description ID of the message */ - messageId: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Reminder returned */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatReminder"]; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - /** @description Message not found */ - 404: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error?: string; - }; - }; - }; - }; - }; - }; - }; - "chat-set-reminder": { - parameters: { - query?: never; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - /** @description ID of the message */ - messageId: number; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** - * Format: int64 - * @description Timestamp of the reminder - */ - timestamp: number; - }; - }; - }; - responses: { - /** @description Reminder created successfully */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatReminder"]; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - /** @description Message not found */ - 404: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error?: string; - }; - }; - }; - }; - }; - }; - }; - "chat-delete-reminder": { - parameters: { - query?: never; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - /** @description ID of the message */ - messageId: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Reminder deleted successfully */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error?: string; - }; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - /** @description Message not found */ - 404: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error?: string; - }; - }; - }; - }; - }; - }; - }; - "chat-get-upcoming-reminders": { - 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 Reminders returned */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatReminderUpcoming"][]; - }; - }; - }; - }; - /** @description Current user is not logged in */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - }; - }; - "chat-set-read-marker": { - parameters: { - query?: never; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - }; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": { - /** - * Format: int64 - * @description ID if the last read message (Optional only with `chat-read-last` capability) - * @default null - */ - lastReadMessage?: number | null; - }; - }; - }; - responses: { - /** @description Read marker set successfully */ - 200: { - headers: { - "X-Chat-Last-Common-Read"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; - }; - }; - }; - }; - }; - }; - "chat-mark-unread": { - parameters: { - query?: never; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Read marker set successfully */ - 200: { - headers: { - "X-Chat-Last-Common-Read"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["Room"]; - }; - }; - }; - }; - }; - }; - "chat-get-objects-shared-in-room-overview": { - parameters: { - query?: { - /** @description Maximum number of objects */ - limit?: number; - }; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description List of shared objects messages of each type returned */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - [key: string]: components["schemas"]["ChatMessage"][]; - }; - }; - }; - }; - }; - }; - }; - "chat-pin-message": { - parameters: { - query?: never; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - /** @description ID of the message */ - messageId: number; - }; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": { - /** - * Format: int64 - * @description Unix timestamp when to unpin the message - * @default 0 - */ - pinUntil?: number; - }; - }; - }; - responses: { - /** @description Message was pinned successfully */ - 200: { - headers: { - "X-Chat-Last-Common-Read"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatMessageWithParent"] | null; - }; - }; - }; - }; - /** @description Message could not be pinned */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "message" | "until" | "status"; - }; - }; - }; - }; - }; - /** @description Message was not found */ - 404: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "message" | "until" | "status"; - }; - }; - }; - }; - }; - }; - }; - "chat-unpin-message": { - parameters: { - query?: never; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - /** @description ID of the message */ - messageId: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Message is not pinned now */ - 200: { - headers: { - "X-Chat-Last-Common-Read"?: string; - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatMessageWithParent"] | null; - }; - }; - }; - }; - /** @description Federation request answered with an unknown status code */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "status"; - }; - }; - }; - }; - }; - /** @description Message was not found */ - 404: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "message"; - }; - }; - }; - }; - }; - }; - }; - "chat-hide-pinned-message": { - parameters: { - query?: never; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - /** @description ID of the message */ - messageId: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Pinned message is now hidden */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - /** @description Message was not found */ - 404: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - error: string; - }; - }; - }; - }; - }; - }; - }; - "chat-mentions": { - parameters: { - query: { - /** @description Text to search for */ - search: string; - /** @description Maximum number of results */ - limit?: number; - /** @description Include the user statuses */ - includeStatus?: boolean; - }; - header: { - /** @description Set to 1 when the request is performed by another Nextcloud Server to indicate a federation request */ - "x-nextcloud-federation"?: string; - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description List of mention suggestions returned */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: components["schemas"]["ChatMentionSuggestion"][]; - }; - }; - }; - }; - }; - }; - "live_transcription-enable": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Live transcription enabled successfully */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - /** @description The participant is not in the call */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "app" | "in-call"; - }; - }; - }; - }; - }; - }; - }; - "live_transcription-disable": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Live transcription stopped successfully */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - /** @description The participant is not in the call */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "app" | "in-call"; - }; - }; - }; - }; - }; - }; - }; - "live_transcription-get-available-languages": { - 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 Available languages got successfully */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - [key: string]: components["schemas"]["LiveTranscriptionLanguage"]; - }; - }; - }; - }; - }; - /** @description The external app "live_transcription" is not available */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "app"; - }; - }; - }; - }; - }; - }; - }; - "live_transcription-set-language": { - parameters: { - query?: never; - header: { - /** @description Required to be true for the API request to pass */ - "OCS-APIRequest": boolean; - }; - path: { - apiVersion: "v1"; - token: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** @description the ID of the language to set */ - languageId: string; - }; - }; - }; - responses: { - /** @description Language set successfully */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: unknown; - }; - }; - }; - }; - /** @description The external app "live_transcription" is not available */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "app"; - }; - }; - }; - }; - }; - /** @description Participant is not a moderator */ - 403: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - ocs: { - meta: components["schemas"]["OCSMeta"]; - data: { - /** @enum {string} */ - error: "app"; - }; - }; - }; - }; - }; - }; - }; "thread-get-recent-active-threads": { parameters: { query?: {