From e0bd715d2d11255d8d6fb1d43f8f6fa310469671 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Sat, 15 Jul 2023 17:25:45 +0200 Subject: [PATCH] feat(tool): Generate specs from source code --- .gitmodules | 3 + external/nextcloud-openapi-extractor | 1 + external/nextcloud-server | 2 +- .../nextcloud/lib/src/api/core.openapi.json | 4655 ++++++++++++----- .../nextcloud/lib/src/api/news.openapi.json | 1 + .../nextcloud/lib/src/api/notes.openapi.json | 22 + .../lib/src/api/notifications.openapi.json | 63 + .../lib/src/api/provisioning_api.openapi.json | 4368 ++++++++++++++-- .../lib/src/api/settings.openapi.json | 66 + .../lib/src/api/theming.openapi.json | 778 +++ .../nextcloud/lib/src/api/uppush.openapi.json | 1 + .../lib/src/api/user_status.openapi.json | 1439 +++-- tool/generate-specs.sh | 30 + 13 files changed, 9340 insertions(+), 2089 deletions(-) create mode 160000 external/nextcloud-openapi-extractor create mode 100644 packages/nextcloud/lib/src/api/settings.openapi.json create mode 100644 packages/nextcloud/lib/src/api/theming.openapi.json create mode 100755 tool/generate-specs.sh diff --git a/.gitmodules b/.gitmodules index 6be3a4a0..eb6ac71b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,3 +19,6 @@ [submodule "external/flathub-shared-modules"] path = external/flathub-shared-modules url = https://github.com/flathub/shared-modules.git +[submodule "external/nextcloud-openapi-extractor"] + path = external/nextcloud-openapi-extractor + url = https://github.com/nextcloud/openapi-extractor diff --git a/external/nextcloud-openapi-extractor b/external/nextcloud-openapi-extractor new file mode 160000 index 00000000..5940a175 --- /dev/null +++ b/external/nextcloud-openapi-extractor @@ -0,0 +1 @@ +Subproject commit 5940a175e352d3cf7780e1c50dd572dfe04523b3 diff --git a/external/nextcloud-server b/external/nextcloud-server index add4e436..752299d0 160000 --- a/external/nextcloud-server +++ b/external/nextcloud-server @@ -1 +1 @@ -Subproject commit add4e4365a4040d2e4e6aa79c0d03c3edd78583c +Subproject commit 752299d063f8c82c329bd73b66ae7efc85ca1e2a diff --git a/packages/nextcloud/lib/src/api/core.openapi.json b/packages/nextcloud/lib/src/api/core.openapi.json index 182584ba..0d231d32 100644 --- a/packages/nextcloud/lib/src/api/core.openapi.json +++ b/packages/nextcloud/lib/src/api/core.openapi.json @@ -2,33 +2,204 @@ "openapi": "3.1.0", "info": { "title": "core", - "version": "27.0.0", + "version": "0.0.1", "description": "Core functionality of Nextcloud", "license": { "name": "agpl", - "identifier": "AGPL-3.0" + "identifier": "AGPL-3.0-only" } }, - "servers": [ - { - "url": "https://{hostname}:{port}", - "variables": { - "hostname": { - "default": "localhost" - }, - "port": { - "default": "8080" - } - } - } - ], - "security": [ - { - "basic_auth": [] - } - ], "components": { + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + }, + "bearer_auth": { + "type": "http", + "scheme": "bearer" + } + }, "schemas": { + "AutocompleteResult": { + "type": "object", + "required": [ + "id", + "label", + "icon", + "source", + "status", + "subline", + "shareWithDisplayNameUnique" + ], + "properties": { + "id": { + "type": "string" + }, + "label": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "source": { + "type": "string" + }, + "status": { + "type": "string" + }, + "subline": { + "type": "string" + }, + "shareWithDisplayNameUnique": { + "type": "string" + } + } + }, + "Collection": { + "type": "object", + "required": [ + "id", + "name", + "resources" + ], + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenGraphObject" + } + } + } + }, + "ContactsAction": { + "type": "object", + "required": [ + "title", + "icon", + "hyperlink", + "appId" + ], + "properties": { + "title": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "hyperlink": { + "type": "string" + }, + "appId": { + "type": "string" + } + } + }, + "LoginFlowV2": { + "type": "object", + "required": [ + "poll", + "login" + ], + "properties": { + "poll": { + "type": "object", + "required": [ + "token", + "endpoint" + ], + "properties": { + "token": { + "type": "string" + }, + "endpoint": { + "type": "string" + } + } + }, + "login": { + "type": "string" + } + } + }, + "LoginFlowV2Credentials": { + "type": "object", + "required": [ + "server", + "loginName", + "appPassword" + ], + "properties": { + "server": { + "type": "string" + }, + "loginName": { + "type": "string" + }, + "appPassword": { + "type": "string" + } + } + }, + "NavigationEntry": { + "type": "object", + "required": [ + "id", + "order", + "href", + "icon", + "type", + "name", + "active", + "classes", + "unread" + ], + "properties": { + "id": { + "type": "string" + }, + "order": { + "oneOf": [ + { + "type": "integer", + "format": "int64" + }, + { + "type": "string" + } + ] + }, + "href": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "classes": { + "type": "string" + }, + "unread": { + "type": "integer", + "format": "int64" + } + } + }, "OCSMeta": { "type": "object", "required": [ @@ -53,30 +224,117 @@ } } }, - "EmptyOCS": { + "OpenGraphObject": { "type": "object", "required": [ - "ocs" + "richObjectType", + "richObject", + "openGraphObject", + "accessible" ], "properties": { - "ocs": { + "richObjectType": { + "type": "string" + }, + "richObject": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "openGraphObject": { "type": "object", "required": [ - "meta", - "data" + "id", + "name", + "description", + "thumb", + "link" ], "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string", + "nullable": true }, - "data": { - "type": "array" + "thumb": { + "type": "string", + "nullable": true + }, + "link": { + "type": "string" } } + }, + "accessible": { + "type": "boolean" + } + } + }, + "Reference": { + "type": "object", + "required": [ + "richObjectType", + "richObject", + "openGraphObject", + "accessible" + ], + "properties": { + "richObjectType": { + "type": "string" + }, + "richObject": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "openGraphObject": { + "$ref": "#/components/schemas/OpenGraphObject" + }, + "accessible": { + "type": "boolean" + } + } + }, + "ReferenceProvider": { + "type": "object", + "required": [ + "id", + "title", + "icon_url", + "order", + "search_providers_ids" + ], + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "icon_url": { + "type": "string" + }, + "order": { + "type": "integer", + "format": "int64" + }, + "search_providers_ids": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } } } }, - "ServerStatus": { + "Status": { "type": "object", "required": [ "installed", @@ -115,663 +373,2349 @@ } } }, - "ServerCapabilities": { + "TextProcessingTask": { "type": "object", "required": [ - "ocs" + "id", + "type", + "status", + "userId", + "appId", + "input", + "output", + "identifier" ], "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "version", - "capabilities" - ], - "properties": { - "version": { - "type": "object", - "properties": { - "major": { - "type": "integer" - }, - "minor": { - "type": "integer" - }, - "micro": { - "type": "integer" - }, - "string": { - "type": "string" - }, - "edition": { - "type": "string" - }, - "extendedSupport": { - "type": "boolean" - } - } - }, - "capabilities": { - "type": "object", - "additionalProperties": true, - "properties": { - "core": { - "type": "object", - "additionalProperties": true, - "properties": { - "pollinterval": { - "type": "integer" - }, - "webdav-root": { - "type": "string" - }, - "reference-api": { - "type": "boolean" - }, - "reference-regex": { - "type": "string" - } - } - }, - "bruteforce": { - "type": "object", - "additionalProperties": true, - "properties": { - "delay": { - "type": "integer" - } - } - }, - "metadataAvailable": { - "type": "object", - "additionalProperties": true, - "properties": { - "size": { - "type": "array", - "items": { - "type": "string" - } - }, - "gps": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "files": { - "type": "object", - "additionalProperties": true, - "properties": { - "bigfilechunking": { - "type": "boolean" - }, - "blacklisted_files": { - "type": "array", - "items": { - "type": "string" - } - }, - "directEditing": { - "type": "object", - "additionalProperties": true, - "properties": { - "url": { - "type": "string" - }, - "etag": { - "type": "string" - } - } - }, - "comments": { - "type": "boolean" - }, - "undelete": { - "type": "boolean" - }, - "versioning": { - "type": "boolean" - } - } - }, - "activity": { - "type": "object", - "additionalProperties": true, - "properties": { - "apiv2": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "circles": { - "type": "object", - "additionalProperties": true, - "properties": { - "version": { - "type": "string" - }, - "status": { - "type": "object", - "additionalProperties": true, - "properties": { - "globalScale": { - "type": "boolean" - } - } - }, - "settings": { - "type": "object", - "additionalProperties": true, - "properties": { - "frontendEnabled": { - "type": "boolean" - }, - "allowedCircles": { - "type": "integer" - }, - "allowedUserTypes": { - "type": "integer" - }, - "membersLimit": { - "type": "integer" - } - } - }, - "circle": { - "type": "object", - "additionalProperties": true, - "properties": { - "constants": { - "type": "object", - "additionalProperties": true, - "properties": { - "flags": { - "type": "object" - }, - "source": { - "type": "object", - "additionalProperties": true, - "properties": { - "core": { - "type": "object" - }, - "extra": { - "type": "object" + "id": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "type": { + "type": "string" + }, + "status": { + "type": "integer", + "format": "int64" + }, + "userId": { + "type": "string", + "nullable": true + }, + "appId": { + "type": "string" + }, + "input": { + "type": "string" + }, + "output": { + "type": "string", + "nullable": true + }, + "identifier": { + "type": "string" + } + } + }, + "UnifiedSearchProvider": { + "type": "object", + "required": [ + "id", + "name", + "order" + ], + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "order": { + "type": "integer", + "format": "int64" + } + } + }, + "UnifiedSearchResult": { + "type": "object", + "required": [ + "name", + "isPaginated", + "entries", + "cursor" + ], + "properties": { + "name": { + "type": "string" + }, + "isPaginated": { + "type": "boolean" + }, + "entries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UnifiedSearchResultEntry" + } + }, + "cursor": { + "nullable": true, + "oneOf": [ + { + "type": "integer", + "format": "int64" + }, + { + "type": "string" + } + ] + } + } + }, + "UnifiedSearchResultEntry": { + "type": "object", + "required": [ + "thumbnailUrl", + "title", + "subline", + "resourceUrl", + "icon", + "rounded", + "attributes" + ], + "properties": { + "thumbnailUrl": { + "type": "string" + }, + "title": { + "type": "string" + }, + "subline": { + "type": "string" + }, + "resourceUrl": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "rounded": { + "type": "boolean" + }, + "attributes": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "paths": { + "/index.php/avatar/{userId}/{size}/dark": { + "get": { + "operationId": "avatar-get-avatar-dark", + "summary": "Get the dark avatar", + "tags": [ + "avatar" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "size", + "in": "path", + "description": "Size of the avatar", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "Avatar returned", + "headers": { + "X-NC-IsCustomAvatar": { + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/index.php/avatar/{userId}/{size}": { + "get": { + "operationId": "avatar-get-avatar", + "summary": "Get the avatar", + "tags": [ + "avatar" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "size", + "in": "path", + "description": "Size of the avatar", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "Avatar returned", + "headers": { + "X-NC-IsCustomAvatar": { + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/index.php/avatar/guest/{guestName}/{size}/dark": { + "get": { + "operationId": "guest_avatar-get-avatar-dark", + "summary": "Returns a dark guest avatar image response", + "tags": [ + "guest_avatar" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "guestName", + "in": "path", + "description": "The guest name, e.g. \"Albert\"", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "size", + "in": "path", + "description": "The desired avatar size, e.g. 64 for 64x64px", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Custom avatar returned", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/index.php/avatar/guest/{guestName}/{size}": { + "get": { + "operationId": "guest_avatar-get-avatar", + "summary": "Returns a guest avatar image response", + "tags": [ + "guest_avatar" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "darkTheme", + "in": "query", + "description": "Return dark avatar", + "schema": { + "type": "integer", + "nullable": true, + "default": 0 + } + }, + { + "name": "guestName", + "in": "path", + "description": "The guest name, e.g. \"Albert\"", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "size", + "in": "path", + "description": "The desired avatar size, e.g. 64 for 64x64px", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Custom avatar returned", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/index.php/login/v2/poll": { + "post": { + "operationId": "client_flow_login_v2-poll", + "summary": "Poll the login flow credentials", + "tags": [ + "client_flow_login_v2" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "token", + "in": "query", + "description": "Token of the flow", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Login flow credentials returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginFlowV2Credentials" + } + } + } + } + } + } + }, + "/index.php/login/v2": { + "post": { + "operationId": "client_flow_login_v2-init", + "summary": "Init a login flow", + "tags": [ + "client_flow_login_v2" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginFlowV2" + } + } + } + } + } + } + }, + "/index.php/core/preview": { + "get": { + "operationId": "preview-get-preview-by-file-id", + "summary": "Get a preview by file ID", + "tags": [ + "preview" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "fileId", + "in": "query", + "description": "ID of the file", + "schema": { + "type": "integer", + "format": "int64", + "default": -1 + } + }, + { + "name": "x", + "in": "query", + "description": "Width of the preview", + "schema": { + "type": "integer", + "format": "int64", + "default": 32 + } + }, + { + "name": "y", + "in": "query", + "description": "Height of the preview", + "schema": { + "type": "integer", + "format": "int64", + "default": 32 + } + }, + { + "name": "a", + "in": "query", + "description": "Whether to not crop the preview", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "forceIcon", + "in": "query", + "description": "Force returning an icon", + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "mode", + "in": "query", + "description": "How to crop the image", + "schema": { + "type": "string", + "default": "fill" + } + } + ], + "responses": { + "200": { + "description": "Preview returned", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/index.php/core/preview.png": { + "get": { + "operationId": "preview-get-preview", + "summary": "Get a preview by file path", + "tags": [ + "preview" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "file", + "in": "query", + "description": "Path of the file", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "x", + "in": "query", + "description": "Width of the preview", + "schema": { + "type": "integer", + "format": "int64", + "default": 32 + } + }, + { + "name": "y", + "in": "query", + "description": "Height of the preview", + "schema": { + "type": "integer", + "format": "int64", + "default": 32 + } + }, + { + "name": "a", + "in": "query", + "description": "Whether to not crop the preview", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "forceIcon", + "in": "query", + "description": "Force returning an icon", + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "mode", + "in": "query", + "description": "How to crop the image", + "schema": { + "type": "string", + "default": "fill" + } + } + ], + "responses": { + "200": { + "description": "Preview returned", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/index.php/core/references/preview/{referenceId}": { + "get": { + "operationId": "reference-preview", + "summary": "Get a preview for a reference", + "tags": [ + "reference" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "referenceId", + "in": "path", + "description": "the reference cache key", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Preview returned", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/index.php/core/wipe/check": { + "post": { + "operationId": "wipe-check-wipe", + "summary": "Check if the device should be wiped", + "tags": [ + "wipe" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "token", + "in": "query", + "description": "App password", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Device should be wiped", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "wipe" + ], + "properties": { + "wipe": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/index.php/core/wipe/success": { + "post": { + "operationId": "wipe-wipe-done", + "summary": "Finish the wipe", + "tags": [ + "wipe" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "token", + "in": "query", + "description": "App password", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Wipe finished successfully", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/ocs/v2.php/cloud/capabilities": { + "get": { + "operationId": "ocs-get-capabilities", + "summary": "Get the capabilities", + "tags": [ + "ocs" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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": [ + "version", + "capabilities" + ], + "properties": { + "version": { + "type": "object", + "required": [ + "major", + "minor", + "micro", + "string", + "edition", + "extendedSupport" + ], + "properties": { + "major": { + "type": "integer", + "format": "int64" + }, + "minor": { + "type": "integer", + "format": "int64" + }, + "micro": { + "type": "integer", + "format": "int64" + }, + "string": { + "type": "string" + }, + "edition": { + "type": "string" + }, + "extendedSupport": { + "type": "boolean" + } + } + }, + "capabilities": { + "type": "object", + "additionalProperties": { + "type": "object" + }, + "properties": { + "notes": { + "type": "object", + "additionalProperties": true, + "properties": { + "api_version": { + "type": "array", + "items": { + "type": "string" } + }, + "version": { + "type": "string" + } + } + }, + "notifications": { + "type": "object", + "additionalProperties": true, + "properties": { + "ocs-endpoints": { + "type": "array", + "items": { + "type": "string" + } + }, + "push": { + "type": "array", + "items": { + "type": "string" + } + }, + "admin-notifications": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "provisioning_api": { + "type": "object", + "required": [ + "version", + "AccountPropertyScopesVersion", + "AccountPropertyScopesFederatedEnabled", + "AccountPropertyScopesPublishedEnabled" + ], + "properties": { + "version": { + "type": "string" + }, + "AccountPropertyScopesVersion": { + "type": "integer", + "format": "int64" + }, + "AccountPropertyScopesFederatedEnabled": { + "type": "boolean" + }, + "AccountPropertyScopesPublishedEnabled": { + "type": "boolean" } } - } - }, - "config": { - "type": "object", - "additionalProperties": true, - "properties": { - "coreFlags": { - "type": "array", - "items": { - "type": "integer" - } - }, - "systemFlags": { - "type": "array", - "items": { - "type": "integer" - } + }, + "theming": { + "type": "object", + "required": [ + "name", + "url", + "slogan", + "color", + "color-text", + "color-element", + "color-element-bright", + "color-element-dark", + "logo", + "background", + "background-plain", + "background-default", + "logoheader", + "favicon" + ], + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string" + }, + "slogan": { + "type": "string" + }, + "color": { + "type": "string" + }, + "color-text": { + "type": "string" + }, + "color-element": { + "type": "string" + }, + "color-element-bright": { + "type": "string" + }, + "color-element-dark": { + "type": "string" + }, + "logo": { + "type": "string" + }, + "background": { + "type": "string" + }, + "background-plain": { + "type": "boolean" + }, + "background-default": { + "type": "boolean" + }, + "logoheader": { + "type": "string" + }, + "favicon": { + "type": "string" + } + } + }, + "user_status": { + "type": "object", + "required": [ + "enabled", + "restore", + "supports_emoji" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "restore": { + "type": "boolean" + }, + "supports_emoji": { + "type": "boolean" + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/core/navigation/apps": { + "get": { + "operationId": "navigation-get-apps-navigation", + "summary": "Get the apps navigation", + "tags": [ + "navigation" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "absolute", + "in": "query", + "description": "Rewrite URLs to absolute ones", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Apps navigation 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/NavigationEntry" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/core/navigation/settings": { + "get": { + "operationId": "navigation-get-settings-navigation", + "summary": "Get the settings navigation", + "tags": [ + "navigation" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "absolute", + "in": "query", + "description": "Rewrite URLs to absolute ones", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Apps navigation 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/NavigationEntry" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/core/autocomplete/get": { + "get": { + "operationId": "auto_complete-get", + "summary": "Autocomplete a query", + "tags": [ + "auto_complete" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "search", + "in": "query", + "description": "Text to search for", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "itemType", + "in": "query", + "description": "Type of the items to search for", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "itemId", + "in": "query", + "description": "ID of the items to search for", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "sorter", + "in": "query", + "description": "can be piped, top prio first, e.g.: \"commenters|share-recipients\"", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "shareTypes[]", + "in": "query", + "description": "Types of shares to search for", + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of results to return", + "schema": { + "type": "integer", + "format": "int64", + "default": 10 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/AutocompleteResult" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/core/whatsnew": { + "get": { + "operationId": "whats_new-get", + "summary": "Get the changes", + "tags": [ + "whats_new" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Changes 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", + "required": [ + "changelogURL", + "product", + "version" + ], + "properties": { + "changelogURL": { + "type": "string" + }, + "product": { + "type": "string" + }, + "version": { + "type": "string" + }, + "whatsNew": { + "type": "object", + "required": [ + "regular", + "admin" + ], + "properties": { + "regular": { + "type": "array", + "items": { + "type": "string" + } + }, + "admin": { + "type": "array", + "items": { + "type": "string" } } } } - }, - "member": { - "type": "object", - "additionalProperties": true, - "properties": { - "constants": { - "type": "object", - "additionalProperties": true, - "properties": { - "level": { - "type": "object" - } - } - }, - "type": { - "type": "object" + } + } + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "whats_new-dismiss", + "summary": "Dismiss the changes", + "tags": [ + "whats_new" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "version", + "in": "query", + "description": "Version to dismiss the changes for", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Changes dismissed", + "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/core/getapppassword": { + "get": { + "operationId": "app_password-get-app-password", + "summary": "Create app password", + "tags": [ + "app_password" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "App password 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", + "required": [ + "apppassword" + ], + "properties": { + "apppassword": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/core/apppassword/rotate": { + "post": { + "operationId": "app_password-rotate-app-password", + "summary": "Rotate app password", + "tags": [ + "app_password" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "App password 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", + "required": [ + "apppassword" + ], + "properties": { + "apppassword": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/core/apppassword": { + "delete": { + "operationId": "app_password-delete-app-password", + "summary": "Delete app password", + "tags": [ + "app_password" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "App password deleted successfully", + "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/hovercard/v1/{userId}": { + "get": { + "operationId": "hover_card-get-user", + "summary": "Get the user details for a hovercard", + "tags": [ + "hover_card" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "User details 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", + "required": [ + "userId", + "displayName", + "actions" + ], + "properties": { + "userId": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContactsAction" } } } } - }, - "ocm": { - "type": "object", - "additionalProperties": true, - "properties": { - "enabled": { - "type": "boolean" - }, - "apiVersion": { - "type": "string" - }, - "endPoint": { - "type": "string" - }, - "resourceTypes": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true, - "properties": { - "name": { - "type": "string" - }, - "shareTypes": { - "type": "array", - "items": { - "type": "string" - } - }, - "protocols": { - "type": "object", - "additionalProperties": true, - "properties": { - "webdav": { - "type": "string" - } - } - } - } - } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/collaboration/resources/collections/search/{filter}": { + "get": { + "operationId": "collaboration_resources-search-collections", + "summary": "Search for collections", + "tags": [ + "collaboration_resources" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "filter", + "in": "path", + "description": "Filter collections", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Collections 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/Collection" } } - }, - "dav": { - "type": "object", - "additionalProperties": true, - "properties": { - "bulkupload": { - "type": "string" - }, - "chunking": { - "type": "string" - } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/collaboration/resources/collections/{collectionId}": { + "get": { + "operationId": "collaboration_resources-list-collection", + "summary": "Get a collection", + "tags": [ + "collaboration_resources" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "collectionId", + "in": "path", + "description": "ID of the collection", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Collection 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/Collection" + } + } + } + } + } + } + } + } + } + }, + "put": { + "operationId": "collaboration_resources-rename-collection", + "summary": "Rename a collection", + "tags": [ + "collaboration_resources" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "collectionName", + "in": "query", + "description": "New name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "collectionId", + "in": "path", + "description": "ID of the collection", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Collection 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/Collection" + } + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "collaboration_resources-add-resource", + "summary": "Add a resource to a collection", + "tags": [ + "collaboration_resources" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "resourceType", + "in": "query", + "description": "Name of the resource", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "resourceId", + "in": "query", + "description": "ID of the resource", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "collectionId", + "in": "path", + "description": "ID of the collection", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Collection 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/Collection" } - }, - "files_sharing": { - "type": "object", - "additionalProperties": true, - "properties": { - "api_enabled": { - "type": "boolean" - }, - "public": { - "type": "object", - "additionalProperties": true, - "properties": { - "enabled": { - "type": "boolean" - }, - "password": { - "type": "object", - "additionalProperties": true, - "properties": { - "enforced": { - "type": "boolean" - }, - "askForOptionalPassword": { - "type": "boolean" - } - } - }, - "expire_date": { - "type": "object", - "additionalProperties": true, - "properties": { - "enabled": { - "type": "boolean" - } - } - }, - "multiple_links": { - "type": "boolean" - }, - "expire_date_internal": { - "type": "object", - "additionalProperties": true, - "properties": { - "enabled": { - "type": "boolean" - } - } - }, - "expire_date_remote": { - "type": "object", - "additionalProperties": true, - "properties": { - "enabled": { - "type": "boolean" - } - } - }, - "send_mail": { - "type": "boolean" - }, - "upload": { - "type": "boolean" - }, - "upload_files_drop": { - "type": "boolean" - } - } - }, - "resharing": { - "type": "boolean" - }, - "user": { - "type": "object", - "additionalProperties": true, - "properties": { - "send_mail": { - "type": "boolean" - }, - "expire_date": { - "type": "object", - "additionalProperties": true, - "properties": { - "enabled": { - "type": "boolean" - } - } - } - } - }, - "group_sharing": { - "type": "boolean" - }, - "group": { - "type": "object", - "additionalProperties": true, - "properties": { - "enabled": { - "type": "boolean" - }, - "expire_date": { - "type": "object", - "additionalProperties": true, - "properties": { - "enabled": { - "type": "boolean" - } - } - } - } - }, - "default_permissions": { - "type": "integer" - }, - "federation": { - "type": "object", - "additionalProperties": true, - "properties": { - "outgoing": { - "type": "boolean" - }, - "incoming": { - "type": "boolean" - }, - "expire_date": { - "type": "object", - "additionalProperties": true, - "properties": { - "enabled": { - "type": "boolean" - } - } - }, - "expire_date_supported": { - "type": "object", - "additionalProperties": true, - "properties": { - "enabled": { - "type": "boolean" - } - } - } - } - }, - "sharee": { - "type": "object", - "additionalProperties": true, - "properties": { - "query_lookup_default": { - "type": "boolean" - }, - "always_show_unique": { - "type": "boolean" - } - } - }, - "sharebymail": { - "type": "object", - "additionalProperties": true, - "properties": { - "enabled": { - "type": "boolean" - }, - "send_password_by_mail": { - "type": "boolean" - }, - "upload_files_drop": { - "type": "object", - "additionalProperties": true, - "properties": { - "enabled": { - "type": "boolean" - } - } - }, - "password": { - "type": "object", - "additionalProperties": true, - "properties": { - "enabled": { - "type": "boolean" - }, - "enforced": { - "type": "boolean" - } - } - }, - "expire_date": { - "type": "object", - "additionalProperties": true, - "properties": { - "enabled": { - "type": "boolean" - }, - "enforced": { - "type": "boolean" - } - } - } - } - } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "collaboration_resources-remove-resource", + "summary": "Remove a resource from a collection", + "tags": [ + "collaboration_resources" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "resourceType", + "in": "query", + "description": "Name of the resource", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "resourceId", + "in": "query", + "description": "ID of the resource", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "collectionId", + "in": "path", + "description": "ID of the collection", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Collection 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/Collection" } - }, - "notes": { - "type": "object", - "additionalProperties": true, - "properties": { - "api_version": { - "type": "array", - "items": { - "type": "string" - } - }, - "version": { - "type": "string" + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/collaboration/resources/{resourceType}/{resourceId}": { + "get": { + "operationId": "collaboration_resources-get-collections-by-resource", + "summary": "Get collections by resource", + "tags": [ + "collaboration_resources" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "resourceType", + "in": "path", + "description": "Type of the resource", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "resourceId", + "in": "path", + "description": "ID of the resource", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Collections 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/Collection" } } - }, - "notifications": { - "type": "object", - "additionalProperties": true, - "properties": { - "ocs-endpoints": { - "type": "array", - "items": { - "type": "string" - } - }, - "push": { - "type": "array", - "items": { - "type": "string" - } - }, - "admin-notifications": { - "type": "array", - "items": { - "type": "string" - } - } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/collaboration/resources/{baseResourceType}/{baseResourceId}": { + "post": { + "operationId": "collaboration_resources-create-collection-on-resource", + "summary": "Create a collection for a resource", + "tags": [ + "collaboration_resources" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "name", + "in": "query", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "baseResourceType", + "in": "path", + "description": "Type of the base resource", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "baseResourceId", + "in": "path", + "description": "ID of the base resource", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Collection 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/Collection" } - }, - "password_policy": { - "type": "object", - "additionalProperties": true, - "properties": { - "minLength": { - "type": "integer" - }, - "enforceNonCommonPassword": { - "type": "boolean" - }, - "enforceNumericCharacters": { - "type": "boolean" - }, - "enforceSpecialCharacters": { - "type": "boolean" - }, - "enforceUpperLowerCase": { - "type": "boolean" - }, - "api": { - "type": "object", - "additionalProperties": true, - "properties": { - "generate": { - "type": "string" - }, - "validate": { - "type": "string" + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/references/resolve": { + "get": { + "operationId": "reference_api-resolve-one", + "summary": "Resolve a reference", + "tags": [ + "reference_api" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "reference", + "in": "query", + "description": "Reference to resolve", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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": [ + "references" + ], + "properties": { + "references": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Reference", + "nullable": true } } } } - }, - "provisioning_api": { - "type": "object", - "additionalProperties": true, - "properties": { - "version": { - "type": "string" - }, - "AccountPropertyScopesVersion": { - "type": "integer" - }, - "AccountPropertyScopesFederatedEnabled": { - "type": "boolean" - }, - "AccountPropertyScopesPublishedEnabled": { - "type": "boolean" - } - } - }, - "theming": { - "type": "object", - "additionalProperties": true, - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string" - }, - "slogan": { - "type": "string" - }, - "color": { - "type": "string" - }, - "color-text": { - "type": "string" - }, - "color-element": { - "type": "string" - }, - "color-element-bright": { - "type": "string" - }, - "color-element-dark": { - "type": "string" - }, - "logo": { - "type": "string" - }, - "background": { - "type": "string" - }, - "background-plain": { - "type": "boolean" - }, - "background-default": { - "type": "boolean" - }, - "logoheader": { - "type": "string" - }, - "favicon": { - "type": "string" - } - } - }, - "user_status": { - "type": "object", - "additionalProperties": true, - "properties": { - "restore": { - "type": "boolean" - }, - "enabled": { - "type": "boolean" - }, - "supports_emoji": { - "type": "boolean" - } - } - }, - "weather_status": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - } - } } } } @@ -781,72 +2725,97 @@ } } }, - "NavigationApps": { - "type": "object", - "required": [ - "ocs" + "post": { + "operationId": "reference_api-resolve", + "summary": "Resolve multiple references", + "tags": [ + "reference_api" ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "references[]", + "in": "query", + "description": "References to resolve", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum amount of references to resolve", + "schema": { + "type": "integer", + "format": "int64", + "default": 1 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "object", "required": [ - "id", - "order", - "href", - "icon", - "type", - "name", - "active", - "classes", - "unread" + "ocs" ], "properties": { - "id": { - "type": "string" - }, - "order": { - "description": "Should always be an integer, but there is a bug. See https://github.com/nextcloud/server/issues/32828", - "oneOf": [ - { - "type": "integer" + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" }, - { - "type": "string" + "data": { + "type": "object", + "required": [ + "references" + ], + "properties": { + "references": { + "type": "object", + "additionalProperties": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/Reference" + }, + { + "type": "object" + } + ] + } + } + } } - ] - }, - "href": { - "type": "string" - }, - "icon": { - "type": "string" - }, - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "classes": { - "type": "string" - }, - "unread": { - "type": "integer" + } } } } @@ -854,113 +2823,169 @@ } } } - }, - "LoginFlowInit": { - "type": "object", - "required": [ - "poll", - "login" + } + }, + "/ocs/v2.php/references/extract": { + "post": { + "operationId": "reference_api-extract", + "summary": "Extract references from a text", + "tags": [ + "reference_api" ], - "properties": { - "poll": { - "type": "object", - "required": [ - "token", - "endpoint" - ], - "properties": { - "token": { - "type": "string" - }, - "endpoint": { - "type": "string" + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "text", + "in": "query", + "description": "Text to extract from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "resolve", + "in": "query", + "description": "Resolve the references", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum amount of references to extract", + "schema": { + "type": "integer", + "format": "int64", + "default": 1 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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": [ + "references" + ], + "properties": { + "references": { + "type": "object", + "additionalProperties": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/Reference" + }, + { + "type": "object" + } + ] + } + } + } + } + } + } + } + } } } - }, - "login": { - "type": "string" } } - }, - "LoginFlowResult": { - "type": "object", - "required": [ - "server", - "loginName", - "appPassword" + } + }, + "/ocs/v2.php/references/providers": { + "get": { + "operationId": "reference_api-get-providers-info", + "summary": "Get the providers", + "tags": [ + "reference_api" ], - "properties": { - "server": { - "type": "string" - }, - "loginName": { - "type": "string" + "security": [ + { + "bearer_auth": [] }, - "appPassword": { - "type": "string" + { + "basic_auth": [] } - } - }, - "AutocompleteResult": { - "type": "object", - "required": [ - "ocs" ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "object", "required": [ - "id", - "label", - "icon", - "source", - "status", - "subline", - "shareWithDisplayNameUnique" + "ocs" ], "properties": { - "id": { - "type": "string" - }, - "label": { - "type": "string" - }, - "icon": { - "type": "string" - }, - "source": { - "type": "string" - }, - "status": { - "oneOf": [ - { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { "type": "array", "items": { - "type": "object" + "$ref": "#/components/schemas/ReferenceProvider" } - }, - { - "type": "string" } - ] - }, - "subline": { - "type": "string" - }, - "shareWithDisplayNameUnique": { - "type": "string" + } } } } @@ -968,120 +2993,88 @@ } } } - }, - "UnifiedSearchProvider": { - "type": "object", - "required": [ - "id", - "name", - "order" + } + }, + "/ocs/v2.php/references/provider/{providerId}": { + "put": { + "operationId": "reference_api-touch-provider", + "summary": "Touch a provider", + "tags": [ + "reference_api" ], - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" + "security": [ + { + "bearer_auth": [] }, - "order": { - "type": "integer", - "format": "int64" + { + "basic_auth": [] } - } - }, - "UnifiedSearchResult": { - "type": "object", - "required": [ - "name", - "isPaginated", - "entries", - "cursor" ], - "properties": { - "name": { - "type": "string" - }, - "isPaginated": { - "type": "boolean" - }, - "entries": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UnifiedSearchResultEntry" + "parameters": [ + { + "name": "timestamp", + "in": "query", + "description": "Timestamp of the last usage", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true } }, - "cursor": { - "nullable": true, - "oneOf": [ - { - "type": "integer", - "format": "int64" - }, - { - "type": "string" - } - ] - } - } - }, - "UnifiedSearchResultEntry": { - "type": "object", - "required": [ - "thumbnailUrl", - "title", - "subline", - "resourceUrl", - "icon", - "rounded", - "attributes" - ], - "properties": { - "thumbnailUrl": { - "type": "string" - }, - "title": { - "type": "string" - }, - "subline": { - "type": "string" - }, - "resourceUrl": { - "type": "string" - }, - "icon": { - "type": "string" - }, - "rounded": { - "type": "boolean" - }, - "attributes": { - "type": "array", - "items": { + { + "name": "providerId", + "in": "path", + "description": "ID of the provider", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } } - } - } - }, - "securitySchemes": { - "basic_auth": { - "type": "http", - "scheme": "basic" - } - } - }, - "paths": { - "/status.php": { - "get": { - "operationId": "get-status", - "security": [], + ], "responses": { "200": { - "description": "Status of the Nextcloud instance", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ServerStatus" + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "success" + ], + "properties": { + "success": { + "type": "boolean" + } + } + } + } + } + } } } } @@ -1089,16 +3082,84 @@ } } }, - "/ocs/v2.php/cloud/capabilities": { - "get": { - "operationId": "get-capabilities", + "/ocs/v2.php/profile/{targetUserId}": { + "put": { + "operationId": "profile_api-set-visibility", + "summary": "Update the visiblity of a parameter", + "tags": [ + "profile_api" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "paramId", + "in": "query", + "description": "ID of the parameter", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "visibility", + "in": "query", + "description": "New visibility", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "targetUserId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], "responses": { "200": { - "description": "Capabilities of the Nextcloud instance", + "description": "Visibility updated successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ServerCapabilities" + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } } } } @@ -1106,34 +3167,71 @@ } } }, - "/ocs/v2.php/core/navigation/apps": { + "/ocs/v2.php/search/providers": { "get": { - "operationId": "get-navigation-apps", - "responses": { - "200": { - "description": "Navigation apps of the Nextcloud instance", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NavigationApps" - } - } + "operationId": "unified_search-get-providers", + "summary": "Get the providers for unified search", + "tags": [ + "unified_search" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "from", + "in": "query", + "description": "the url the user is currently at", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" } } - } - } - }, - "/index.php/login/v2": { - "post": { - "operationId": "init-login-flow", - "security": [], + ], "responses": { "200": { - "description": "Login flow init", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LoginFlowInit" + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UnifiedSearchProvider" + } + } + } + } + } } } } @@ -1141,27 +3239,129 @@ } } }, - "/index.php/login/v2/poll": { - "post": { - "operationId": "get-login-flow-result", - "security": [], + "/ocs/v2.php/search/providers/{providerId}/search": { + "get": { + "operationId": "unified_search-search", + "summary": "Search", + "tags": [ + "unified_search" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], "parameters": [ { - "name": "token", + "name": "term", + "in": "query", + "description": "Term to search", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Order of entries", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum amount of entries", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "cursor", + "in": "query", + "description": "Offset for searching", + "schema": { + "type": "string", + "nullable": true, + "contentMediaType": "application/json", + "contentSchema": { + "nullable": true, + "description": "Offset for searching", + "oneOf": [ + { + "type": "integer", + "format": "int64" + }, + { + "type": "string" + } + ] + } + } + }, + { + "name": "from", "in": "query", + "description": "The current user URL", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "providerId", + "in": "path", + "description": "ID of the provider", "required": true, "schema": { "type": "string" } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } } ], "responses": { "200": { - "description": "Login flow result", + "description": "Search entries returned", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LoginFlowResult" + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/UnifiedSearchResult" + } + } + } + } } } } @@ -1169,109 +3369,95 @@ } } }, - "/index.php/core/preview.png": { - "parameters": [ - { - "name": "file", - "in": "query", - "required": false, - "schema": { - "type": "string", - "default": "" - } - }, - { - "name": "x", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "default": 32 - } - }, - { - "name": "y", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "default": 32 - } - }, - { - "name": "a", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "default": 0 - } - }, - { - "name": "forceIcon", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "mode", - "in": "query", - "required": false, - "schema": { - "type": "string", - "default": "fill" - } - } - ], + "/ocs/v2.php/translation/languages": { "get": { - "operationId": "get-preview", - "responses": { - "200": { - "description": "Preview image of a file", - "content": { - "image/png": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - } - } - } - }, - "/index.php/avatar/{userId}/{size}/dark": { - "parameters": [ - { - "name": "userId", - "in": "path", - "required": true, - "schema": { - "type": "string" + "operationId": "translation_api-languages", + "summary": "Get the list of supported languages", + "tags": [ + "translation_api" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] } - }, - { - "name": "size", - "in": "path", - "required": true, - "schema": { - "type": "integer" + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } } - } - ], - "get": { - "operationId": "get-dark-avatar", + ], "responses": { "200": { "description": "", "content": { - "image/png": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "languages", + "languageDetection" + ], + "properties": { + "languages": { + "type": "array", + "items": { + "type": "object", + "required": [ + "from", + "fromLabel", + "to", + "toLabel" + ], + "properties": { + "from": { + "type": "string" + }, + "fromLabel": { + "type": "string" + }, + "to": { + "type": "string" + }, + "toLabel": { + "type": "string" + } + } + } + }, + "languageDetection": { + "type": "boolean" + } + } + } + } + } + } } } } @@ -1279,124 +3465,100 @@ } } }, - "/index.php/avatar/{userId}/{size}": { - "parameters": [ - { - "name": "userId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "size", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "get": { - "operationId": "get-avatar", - "responses": { - "200": { - "description": "", - "content": { - "image/png": { - "schema": { - "type": "string", - "format": "binary" - } - } - } + "/ocs/v2.php/translation/translate": { + "post": { + "operationId": "translation_api-translate", + "summary": "Translate a text", + "tags": [ + "translation_api" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] } - } - } - }, - "/ocs/v2.php/core/autocomplete/get": { - "get": { - "operationId": "autocomplete", + ], "parameters": [ { - "name": "search", + "name": "text", "in": "query", + "description": "Text to be translated", "required": true, "schema": { "type": "string" } }, { - "name": "itemType", + "name": "fromLanguage", "in": "query", - "required": true, + "description": "Language to translate from", "schema": { - "type": "string" + "type": "string", + "nullable": true } }, { - "name": "itemId", + "name": "toLanguage", "in": "query", + "description": "Language to translate to", "required": true, "schema": { "type": "string" } }, { - "name": "sorter", - "in": "query", - "description": "can be piped, top prio first, e.g.: \"commenters|share-recipients\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "shareTypes", - "in": "query", + "name": "OCS-APIRequest", + "in": "header", "required": true, "schema": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "default": 10 + "type": "string", + "default": "true" } } ], "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AutocompleteResult" - } - } - } - } - } - } - }, - "/ocs/v2.php/core/apppassword": { - "delete": { - "operationId": "delete-app-password", - "responses": { - "200": { - "description": "App password deleted successfully", + "description": "Translated text returned", "content": { "application/json": { "schema": { - "type": "object" + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "text", + "from" + ], + "properties": { + "text": { + "type": "string" + }, + "from": { + "type": "string", + "nullable": true + } + } + } + } + } + } } } } @@ -1404,18 +3566,30 @@ } } }, - "/ocs/v2.php/search/providers": { + "/ocs/v2.php/textprocessing/tasktypes": { "get": { - "operationId": "unified-search-providers", - "summary": "Get the providers for unified search", + "operationId": "text_processing_api-task-types", + "summary": "This endpoint returns all available LanguageModel task types", + "tags": [ + "text_processing_api" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], "parameters": [ { - "name": "from", - "in": "query", - "description": "the url the user is currently at", + "name": "OCS-APIRequest", + "in": "header", + "required": true, "schema": { "type": "string", - "default": "" + "default": "true" } } ], @@ -1441,9 +3615,33 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UnifiedSearchProvider" + "type": "object", + "required": [ + "types" + ], + "properties": { + "types": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "name", + "description" + ], + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + } + } + } + } } } } @@ -1456,85 +3654,151 @@ } } }, - "/ocs/v2.php/search/providers/{providerId}/search": { - "get": { - "operationId": "unified-search", - "summary": "Search", + "/ocs/v2.php/textprocessing/schedule": { + "post": { + "operationId": "text_processing_api-schedule", + "summary": "This endpoint allows scheduling a language model task", + "tags": [ + "text_processing_api" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], "parameters": [ { - "name": "term", + "name": "input", "in": "query", - "description": "Term to search", + "description": "Input text", + "required": true, "schema": { - "type": "string", - "default": "" + "type": "string" } }, { - "name": "sortOrder", + "name": "type", "in": "query", - "description": "Order of entries", + "description": "Type of the task", + "required": true, "schema": { - "type": "integer", - "format": "int64", - "nullable": true + "type": "string" } }, { - "name": "limit", + "name": "appId", "in": "query", - "description": "Maximum amount of entries", + "description": "ID of the app that will execute the task", + "required": true, "schema": { - "type": "integer", - "format": "int64", - "nullable": true + "type": "string" } }, { - "name": "cursor", + "name": "identifier", "in": "query", - "description": "Offset for searching", + "description": "An arbitrary identifier for the task", "schema": { "type": "string", - "nullable": true, - "contentMediaType": "application/json", - "contentSchema": { - "nullable": true, - "description": "Offset for searching", - "oneOf": [ - { - "type": "integer", - "format": "int64" - }, - { - "type": "string" - } - ] - } + "default": "" } }, { - "name": "from", - "in": "query", - "description": "The current user URL", + "name": "OCS-APIRequest", + "in": "header", + "required": true, "schema": { "type": "string", - "default": "" + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Task scheduled 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", + "required": [ + "task" + ], + "properties": { + "task": { + "$ref": "#/components/schemas/TextProcessingTask" + } + } + } + } + } + } + } + } } + } + } + } + }, + "/ocs/v2.php/textprocessing/task/{id}": { + "get": { + "operationId": "text_processing_api-get-task", + "summary": "This endpoint allows checking the status and results of a task. Tasks are removed 1 week after receiving their last update.", + "tags": [ + "text_processing_api" + ], + "security": [ + {}, + { + "bearer_auth": [] }, { - "name": "providerId", + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "id", "in": "path", - "description": "ID of the provider", + "description": "The id of the task", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" } } ], "responses": { "200": { - "description": "Search entries returned", + "description": "Task returned", "content": { "application/json": { "schema": { @@ -1554,7 +3818,15 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "$ref": "#/components/schemas/UnifiedSearchResult" + "type": "object", + "required": [ + "task" + ], + "properties": { + "task": { + "$ref": "#/components/schemas/TextProcessingTask" + } + } } } } @@ -1565,6 +3837,33 @@ } } } + }, + "/status.php": { + "get": { + "operationId": "get-status", + "responses": { + "200": { + "description": "Status returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Status" + } + } + } + } + } + } + } + }, + "tags": [ + { + "name": "avatar", + "description": "Class AvatarController" + }, + { + "name": "guest_avatar", + "description": "This controller handles guest avatar requests." } - } + ] } diff --git a/packages/nextcloud/lib/src/api/news.openapi.json b/packages/nextcloud/lib/src/api/news.openapi.json index 2ade422d..5acfe69d 100644 --- a/packages/nextcloud/lib/src/api/news.openapi.json +++ b/packages/nextcloud/lib/src/api/news.openapi.json @@ -27,6 +27,7 @@ "basic_auth": [] } ], + "tags": [], "components": { "schemas": { "OCSMeta": { diff --git a/packages/nextcloud/lib/src/api/notes.openapi.json b/packages/nextcloud/lib/src/api/notes.openapi.json index a86e13db..29a5ab26 100644 --- a/packages/nextcloud/lib/src/api/notes.openapi.json +++ b/packages/nextcloud/lib/src/api/notes.openapi.json @@ -27,8 +27,30 @@ "basic_auth": [] } ], + "tags": [], "components": { "schemas": { + "Capabilities": { + "type": "object", + "required": ["notes"], + "properties": { + "notes": { + "type": "object", + "additionalProperties": true, + "properties": { + "api_version": { + "type": "array", + "items": { + "type": "string" + } + }, + "version": { + "type": "string" + } + } + } + } + }, "OCSMeta": { "type": "object", "required": [ diff --git a/packages/nextcloud/lib/src/api/notifications.openapi.json b/packages/nextcloud/lib/src/api/notifications.openapi.json index 446bdbe7..6d0f61ae 100644 --- a/packages/nextcloud/lib/src/api/notifications.openapi.json +++ b/packages/nextcloud/lib/src/api/notifications.openapi.json @@ -23,12 +23,46 @@ } ], "security": [ + { + "bearer": [] + }, { "basic_auth": [] } ], + "tags": [], "components": { "schemas": { + "Capabilities": { + "type": "object", + "required": ["notifications"], + "properties": { + "notifications": { + "type": "object", + "additionalProperties": true, + "properties": { + "ocs-endpoints": { + "type": "array", + "items": { + "type": "string" + } + }, + "push": { + "type": "array", + "items": { + "type": "string" + } + }, + "admin-notifications": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, "OCSMeta": { "type": "object", "required": [ @@ -291,6 +325,10 @@ "basic_auth": { "type": "http", "scheme": "basic" + }, + "bearer": { + "type": "http", + "scheme": "bearer" } } }, @@ -313,6 +351,11 @@ }, "delete": { "operationId": "delete-all-notifications", + "security": [ + { + "bearer": [] + } + ], "responses": { "200": { "description": "", @@ -355,6 +398,11 @@ }, "delete": { "operationId": "delete-notification", + "security": [ + { + "bearer": [] + } + ], "responses": { "200": { "description": "", @@ -372,6 +420,11 @@ "/ocs/v2.php/apps/notifications/api/v2/push": { "post": { "operationId": "register-device", + "security": [ + { + "bearer": [] + } + ], "parameters": [ { "name": "pushTokenHash", @@ -414,6 +467,11 @@ }, "delete": { "operationId": "remove-device", + "security": [ + { + "bearer": [] + } + ], "responses": { "202": { "description": "", @@ -440,6 +498,11 @@ } ], "post": { + "security": [ + { + "bearer": [] + } + ], "operationId": "send-admin-notification", "parameters": [ { diff --git a/packages/nextcloud/lib/src/api/provisioning_api.openapi.json b/packages/nextcloud/lib/src/api/provisioning_api.openapi.json index 9fbf4cf0..a1df3d6c 100644 --- a/packages/nextcloud/lib/src/api/provisioning_api.openapi.json +++ b/packages/nextcloud/lib/src/api/provisioning_api.openapi.json @@ -1,367 +1,4029 @@ { - "openapi": "3.1.0", - "info": { - "title": "provisioning_api", - "version": "1.17.0", - "description": "This application enables a set of APIs that external systems can use to manage users, groups and apps.", - "license": { - "name": "agpl", - "identifier": "AGPL-3.0" - } - }, - "servers": [ - { - "url": "https://{hostname}:{port}", - "variables": { - "hostname": { - "default": "localhost" - }, - "port": { - "default": "8080" - } - } - } - ], - "security": [ - { - "basic_auth": [] - } - ], - "components": { - "schemas": { - "OCSMeta": { - "type": "object", - "required": [ - "status", - "statuscode" - ], - "properties": { - "status": { - "type": "string" - }, - "statuscode": { - "type": "integer" - }, - "message": { - "type": "string" - }, - "totalitems": { - "type": "string" - }, - "itemsperpage": { - "type": "string" - } + "openapi": "3.1.0", + "info": { + "title": "provisioning_api", + "version": "0.0.1", + "description": "This application enables a set of APIs that external systems can use to manage users, groups and apps.", + "license": { + "name": "agpl", + "identifier": "AGPL-3.0-only" } - }, - "EmptyOCS": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array" - } + }, + "components": { + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + }, + "bearer_auth": { + "type": "http", + "scheme": "bearer" } - } - } - }, - "User": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "$ref": "#/components/schemas/UserDetails" - } + }, + "schemas": { + "AppInfo": { + "type": "object", + "required": [ + "active", + "activity", + "author", + "background-jobs", + "bugs", + "category", + "collaboration", + "commands", + "default_enable", + "dependencies", + "description", + "discussion", + "documentation", + "groups", + "id", + "info", + "internal", + "level", + "licence", + "name", + "namespace", + "navigations", + "preview", + "previewAsIcon", + "public", + "remote", + "removable", + "repair-steps", + "repository", + "sabre", + "screenshot", + "settings", + "summary", + "trash", + "two-factor-providers", + "types", + "version", + "versions", + "website" + ], + "properties": { + "active": { + "type": "boolean", + "nullable": true + }, + "activity": { + "type": "object", + "nullable": true + }, + "author": { + "type": "object", + "nullable": true + }, + "background-jobs": { + "type": "object", + "nullable": true + }, + "bugs": { + "type": "object", + "nullable": true + }, + "category": { + "type": "object", + "nullable": true + }, + "collaboration": { + "type": "object", + "nullable": true + }, + "commands": { + "type": "object", + "nullable": true + }, + "default_enable": { + "type": "object", + "nullable": true + }, + "dependencies": { + "type": "object", + "nullable": true + }, + "description": { + "type": "string" + }, + "discussion": { + "type": "object", + "nullable": true + }, + "documentation": { + "type": "object", + "nullable": true + }, + "groups": { + "type": "object", + "nullable": true + }, + "id": { + "type": "string" + }, + "info": { + "type": "object", + "nullable": true + }, + "internal": { + "type": "boolean", + "nullable": true + }, + "level": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "licence": { + "type": "object", + "nullable": true + }, + "name": { + "type": "string" + }, + "namespace": { + "type": "object", + "nullable": true + }, + "navigations": { + "type": "object", + "nullable": true + }, + "preview": { + "type": "object", + "nullable": true + }, + "previewAsIcon": { + "type": "boolean", + "nullable": true + }, + "public": { + "type": "object", + "nullable": true + }, + "remote": { + "type": "object", + "nullable": true + }, + "removable": { + "type": "boolean", + "nullable": true + }, + "repair-steps": { + "type": "object", + "nullable": true + }, + "repository": { + "type": "object", + "nullable": true + }, + "sabre": { + "type": "object", + "nullable": true + }, + "screenshot": { + "type": "object", + "nullable": true + }, + "settings": { + "type": "object", + "nullable": true + }, + "summary": { + "type": "string" + }, + "trash": { + "type": "object", + "nullable": true + }, + "two-factor-providers": { + "type": "object", + "nullable": true + }, + "types": { + "type": "object", + "nullable": true + }, + "version": { + "type": "string" + }, + "versions": { + "type": "object", + "nullable": true + }, + "website": { + "type": "object", + "nullable": true + } + } + }, + "Capabilities": { + "type": "object", + "required": [ + "provisioning_api" + ], + "properties": { + "provisioning_api": { + "type": "object", + "required": [ + "version", + "AccountPropertyScopesVersion", + "AccountPropertyScopesFederatedEnabled", + "AccountPropertyScopesPublishedEnabled" + ], + "properties": { + "version": { + "type": "string" + }, + "AccountPropertyScopesVersion": { + "type": "integer", + "format": "int64" + }, + "AccountPropertyScopesFederatedEnabled": { + "type": "boolean" + }, + "AccountPropertyScopesPublishedEnabled": { + "type": "boolean" + } + } + } + } + }, + "GroupDetails": { + "type": "object", + "required": [ + "id", + "displayname", + "usercount", + "disabled", + "canAdd", + "canRemove" + ], + "properties": { + "id": { + "type": "string" + }, + "displayname": { + "type": "string" + }, + "usercount": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "integer", + "format": "int64" + } + ] + }, + "disabled": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "integer", + "format": "int64" + } + ] + }, + "canAdd": { + "type": "boolean" + }, + "canRemove": { + "type": "boolean" + } + } + }, + "OCSMeta": { + "type": "object", + "required": [ + "status", + "statuscode" + ], + "properties": { + "status": { + "type": "string" + }, + "statuscode": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "totalitems": { + "type": "string" + }, + "itemsperpage": { + "type": "string" + } + } + }, + "UserDetails": { + "type": "object", + "required": [ + "additional_mail", + "address", + "backend", + "backendCapabilities", + "biography", + "display-name", + "displayname", + "email", + "fediverse", + "groups", + "headline", + "id", + "language", + "lastLogin", + "locale", + "manager", + "notify_email", + "organisation", + "phone", + "profile_enabled", + "quota", + "role", + "subadmin", + "twitter", + "website" + ], + "properties": { + "additional_mail": { + "type": "array", + "items": { + "type": "string" + } + }, + "additional_mailScope": { + "type": "array", + "items": { + "type": "string" + } + }, + "address": { + "type": "string" + }, + "addressScope": { + "type": "string" + }, + "avatarScope": { + "type": "string" + }, + "backend": { + "type": "string" + }, + "backendCapabilities": { + "type": "object", + "required": [ + "setDisplayName", + "setPassword" + ], + "properties": { + "setDisplayName": { + "type": "boolean" + }, + "setPassword": { + "type": "boolean" + } + } + }, + "biography": { + "type": "string" + }, + "biographyScope": { + "type": "string" + }, + "display-name": { + "type": "string" + }, + "displayname": { + "type": "string" + }, + "displaynameScope": { + "type": "string" + }, + "email": { + "type": "string", + "nullable": true + }, + "emailScope": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "fediverse": { + "type": "string" + }, + "fediverseScope": { + "type": "string" + }, + "groups": { + "type": "array", + "items": { + "type": "string" + } + }, + "headline": { + "type": "string" + }, + "headlineScope": { + "type": "string" + }, + "id": { + "type": "string" + }, + "language": { + "type": "string" + }, + "lastLogin": { + "type": "integer", + "format": "int64" + }, + "locale": { + "type": "string" + }, + "manager": { + "type": "string" + }, + "notify_email": { + "type": "string", + "nullable": true + }, + "organisation": { + "type": "string" + }, + "organisationScope": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "phoneScope": { + "type": "string" + }, + "profile_enabled": { + "type": "string" + }, + "profile_enabledScope": { + "type": "string" + }, + "quota": { + "$ref": "#/components/schemas/UserDetailsQuota" + }, + "role": { + "type": "string" + }, + "roleScope": { + "type": "string" + }, + "storageLocation": { + "type": "string" + }, + "subadmin": { + "type": "array", + "items": { + "type": "string" + } + }, + "twitter": { + "type": "string" + }, + "twitterScope": { + "type": "string" + }, + "website": { + "type": "string" + }, + "websiteScope": { + "type": "string" + } + } + }, + "UserDetailsQuota": { + "type": "object", + "properties": { + "free": { + "type": "number", + "format": "float" + }, + "quota": { + "oneOf": [ + { + "type": "number", + "format": "float" + }, + { + "type": "string" + } + ] + }, + "relative": { + "type": "number", + "format": "float" + }, + "total": { + "type": "number", + "format": "float" + }, + "used": { + "type": "number", + "format": "float" + } + } } - } } - }, - "UserDetails": { - "type": "object", - "required": [ - "id", - "lastLogin", - "backend", - "subadmin", - "quota", - "avatarScope", - "emailScope", - "additional_mail", - "additional_mailScope", - "display-name", - "displayname", - "displaynameScope", - "phone", - "phoneScope", - "address", - "addressScope", - "website", - "websiteScope", - "twitter", - "twitterScope", - "organisation", - "organisationScope", - "role", - "roleScope", - "headline", - "headlineScope", - "biography", - "biographyScope", - "profile_enabled", - "profile_enabledScope", - "fediverse", - "fediverseScope", - "groups", - "language", - "locale", - "backendCapabilities" - ], - "properties": { - "enabled": { - "type": "boolean" - }, - "storageLocation": { - "type": "string" - }, - "id": { - "type": "string" - }, - "lastLogin": { - "type": "integer" - }, - "backend": { - "type": "string" - }, - "subadmin": { - "type": "array", - "items": { - "type": "string" + }, + "paths": { + "/ocs/v2.php/cloud/apps": { + "get": { + "operationId": "apps-get-apps", + "summary": "Get a list of installed apps", + "description": "This endpoint requires admin access", + "tags": [ + "apps" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "filter", + "in": "query", + "description": "Filter for enabled or disabled apps", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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": [ + "apps" + ], + "properties": { + "apps": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } } - }, - "quota": { - "type": "object", - "required": [ - "free", - "used", - "total", - "relative", - "quota" - ], - "properties": { - "free": { - "type": "integer" - }, - "used": { - "type": "integer" - }, - "total": { - "type": "integer" - }, - "relative": { - "type": "number" - }, - "quota": { - "type": "integer" - } + }, + "/ocs/v2.php/cloud/apps/{app}": { + "get": { + "operationId": "apps-get-app-info", + "summary": "Get the app info for an app", + "description": "This endpoint requires admin access", + "tags": [ + "apps" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "app", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/AppInfo" + } + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "apps-enable", + "summary": "Enable an app", + "description": "This endpoint requires admin access", + "tags": [ + "apps" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "app", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "apps-disable", + "summary": "Disable an app", + "description": "This endpoint requires admin access", + "tags": [ + "apps" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "app", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } } - }, - "avatarScope": { - "type": "string" - }, - "email": { - "type": "string" - }, - "emailScope": { - "type": "string" - }, - "additional_mail": { - "type": "array", - "items": { - "type": "string" + }, + "/ocs/v2.php/cloud/groups": { + "get": { + "operationId": "groups-get-groups", + "summary": "Get a list of groups", + "tags": [ + "groups" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "search", + "in": "query", + "description": "Text to search for", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit the amount of groups returned", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "offset", + "in": "query", + "description": "Offset for searching for groups", + "schema": { + "type": "integer", + "format": "int64", + "default": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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": [ + "groups" + ], + "properties": { + "groups": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "groups-add-group", + "summary": "Create a new group", + "description": "This endpoint requires admin access", + "tags": [ + "groups" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "groupid", + "in": "query", + "description": "ID of the group", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "displayname", + "in": "query", + "description": "Display name of the group", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } } - }, - "additional_mailScope": { - "type": "array", - "items": { - "type": "string" + }, + "/ocs/v2.php/cloud/groups/details": { + "get": { + "operationId": "groups-get-groups-details", + "summary": "Get a list of groups details", + "tags": [ + "groups" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "search", + "in": "query", + "description": "Text to search for", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit the amount of groups returned", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "offset", + "in": "query", + "description": "Offset for searching for groups", + "schema": { + "type": "integer", + "format": "int64", + "default": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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": [ + "groups" + ], + "properties": { + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupDetails" + } + } + } + } + } + } + } + } + } + } + } + } } - }, - "displayname": { - "type": "string" - }, - "displaynameScope": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "phoneScope": { - "type": "string" - }, - "address": { - "type": "string" - }, - "addressScope": { - "type": "string" - }, - "website": { - "type": "string" - }, - "websiteScope": { - "type": "string" - }, - "twitter": { - "type": "string" - }, - "twitterScope": { - "type": "string" - }, - "organisation": { - "type": "string" - }, - "organisationScope": { - "type": "string" - }, - "role": { - "type": "string" - }, - "roleScope": { - "type": "string" - }, - "headline": { - "type": "string" - }, - "headlineScope": { - "type": "string" - }, - "biography": { - "type": "string" - }, - "biographyScope": { - "type": "string" - }, - "profile_enabled": { - "type": "string" - }, - "profile_enabledScope": { - "type": "string" - }, - "fediverse": { - "type": "string" - }, - "fediverseScope": { - "type": "string" - }, - "groups": { - "type": "array", - "items": { - "type": "string" + }, + "/ocs/v2.php/cloud/groups/{groupId}/users": { + "get": { + "operationId": "groups-get-group-users", + "summary": "Get a list of users in the specified group", + "tags": [ + "groups" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "groupId", + "in": "path", + "description": "ID of the group", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "User IDs 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", + "required": [ + "users" + ], + "properties": { + "users": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } } - }, - "language": { - "type": "string" - }, - "locale": { - "type": "string" - }, - "notify_email": { - "type": "string" - }, - "backendCapabilities": { - "type": "object", - "required": [ - "setDisplayName", - "setPassword" - ], - "properties": { - "setDisplayName": { - "type": "boolean" - }, - "setPassword": { - "type": "boolean" - } + }, + "/ocs/v2.php/cloud/groups/{groupId}/users/details": { + "get": { + "operationId": "groups-get-group-users-details", + "summary": "Get a list of users details in the specified group", + "tags": [ + "groups" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "search", + "in": "query", + "description": "Text to search for", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit the amount of groups returned", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "offset", + "in": "query", + "description": "Offset for searching for groups", + "schema": { + "type": "integer", + "format": "int64", + "default": 0 + } + }, + { + "name": "groupId", + "in": "path", + "description": "ID of the group", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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": [ + "users" + ], + "properties": { + "users": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/UserDetails" + }, + { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string" + } + } + } + ] + } + } + } + } + } + } + } + } + } + } + } + } } - }, - "display-name": { - "type": "string" - } - } - } - }, - "securitySchemes": { - "basic_auth": { - "type": "http", - "scheme": "basic" - } - } - }, - "paths": { - "/ocs/v2.php/cloud/user": { - "get": { - "operationId": "get-current-user", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } + }, + "/ocs/v2.php/cloud/groups/{groupId}/subadmins": { + "get": { + "operationId": "groups-get-sub-admins-of-group", + "summary": "Get the list of user IDs that are a subadmin of the group", + "description": "This endpoint requires admin access", + "tags": [ + "groups" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "groupId", + "in": "path", + "description": "ID of the group", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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": { + "type": "string" + } + } + } + } + } + } + } + } + } + } } - } - } - } - }, - "/ocs/v2.php/cloud/users/{userId}": { - "parameters": [ - { - "name": "userId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "operationId": "get-user", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } + }, + "/ocs/v2.php/cloud/groups/{groupId}": { + "get": { + "operationId": "groups-get-group", + "summary": "Get a list of users in the specified group", + "deprecated": true, + "tags": [ + "groups" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "groupId", + "in": "path", + "description": "ID of the group", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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": [ + "users" + ], + "properties": { + "users": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "put": { + "operationId": "groups-update-group", + "summary": "Update a group", + "description": "This endpoint requires admin access", + "tags": [ + "groups" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "key", + "in": "query", + "description": "Key to update, only 'displayname'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "value", + "in": "query", + "description": "New value for the key", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "groupId", + "in": "path", + "description": "ID of the group", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "groups-delete-group", + "summary": "Delete a group", + "description": "This endpoint requires admin access", + "tags": [ + "groups" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "groupId", + "in": "path", + "description": "ID of the group", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/cloud/users": { + "get": { + "operationId": "users-get-users", + "summary": "Get a list of users", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "search", + "in": "query", + "description": "Text to search for", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit the amount of groups returned", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "offset", + "in": "query", + "description": "Offset for searching for groups", + "schema": { + "type": "integer", + "format": "int64", + "default": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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": [ + "users" + ], + "properties": { + "users": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "users-add-user", + "summary": "Create a new user", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userid", + "in": "query", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "password", + "in": "query", + "description": "Password of the user", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "displayName", + "in": "query", + "description": "Display name of the user", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "email", + "in": "query", + "description": "Email of the user", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "groups[]", + "in": "query", + "description": "Groups of the user", + "schema": { + "type": "array", + "default": [], + "items": { + "type": "string" + } + } + }, + { + "name": "subadmin[]", + "in": "query", + "description": "Groups where the user is subadmin", + "schema": { + "type": "array", + "default": [], + "items": { + "type": "string" + } + } + }, + { + "name": "quota", + "in": "query", + "description": "Quota of the user", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "language", + "in": "query", + "description": "Language of the user", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "manager", + "in": "query", + "description": "Manager of the user", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "User added 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", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/users/details": { + "get": { + "operationId": "users-get-users-details", + "summary": "Get a list of users and their details", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "search", + "in": "query", + "description": "Text to search for", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit the amount of groups returned", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "offset", + "in": "query", + "description": "Offset for searching for groups", + "schema": { + "type": "integer", + "format": "int64", + "default": 0 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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": [ + "users" + ], + "properties": { + "users": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/UserDetails" + }, + { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string" + } + } + } + ] + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/users/search/by-phone": { + "post": { + "operationId": "users-search-by-phone-numbers", + "summary": "Search users by their phone numbers", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "location", + "in": "query", + "description": "Location of the phone number (for country code)", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "search", + "in": "query", + "description": "Phone numbers to search for", + "required": true, + "schema": { + "type": "string", + "contentMediaType": "application/json", + "contentSchema": { + "type": "object", + "description": "Phone numbers to search for", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Users 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": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/users/{userId}": { + "get": { + "operationId": "users-get-user", + "summary": "Get the details of a user", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/UserDetails" + } + } + } + } + } + } + } + } + } + }, + "put": { + "operationId": "users-edit-user", + "summary": "Update a value of the user's details", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "key", + "in": "query", + "description": "Key that will be updated", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "value", + "in": "query", + "description": "New value for the key", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "users-delete-user", + "summary": "Delete a user", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/cloud/user": { + "get": { + "operationId": "users-get-current-user", + "summary": "Get the details of the current user", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/UserDetails" + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/user/fields": { + "get": { + "operationId": "users-get-editable-fields", + "summary": "Get a list of fields that are editable for the current user", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/user/fields/{userId}": { + "get": { + "operationId": "users-get-editable-fields-for-user", + "summary": "Get a list of fields that are editable for a user", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/users/{userId}/{collectionName}": { + "put": { + "operationId": "users-edit-user-multi-value", + "summary": "Update multiple values of the user's details", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "key", + "in": "query", + "description": "Key that will be updated", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "value", + "in": "query", + "description": "New value for the key", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "collectionName", + "in": "path", + "description": "Collection to update", + "required": true, + "schema": { + "type": "string", + "pattern": "^(?!enable$|disable$)[a-zA-Z0-9_]*$" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/cloud/users/{userId}/wipe": { + "post": { + "operationId": "users-wipe-user-devices", + "summary": "Wipe all devices of a user", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/cloud/users/{userId}/enable": { + "put": { + "operationId": "users-enable-user", + "summary": "Enable a user", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/cloud/users/{userId}/disable": { + "put": { + "operationId": "users-disable-user", + "summary": "Disable a user", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/cloud/users/{userId}/groups": { + "get": { + "operationId": "users-get-users-groups", + "summary": "Get a list of groups the user belongs to", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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": [ + "groups" + ], + "properties": { + "groups": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "users-add-to-group", + "summary": "Add a user to a group", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "groupid", + "in": "query", + "description": "ID of the group", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "users-remove-from-group", + "summary": "Remove a user from a group", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "groupid", + "in": "query", + "description": "ID of the group", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/cloud/users/{userId}/subadmins": { + "get": { + "operationId": "users-get-user-sub-admin-groups", + "summary": "Get the groups a user is a subadmin of", + "description": "This endpoint requires admin access", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID if the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "users-add-sub-admin", + "summary": "Make a user a subadmin of a group", + "description": "This endpoint requires admin access", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "groupid", + "in": "query", + "description": "ID of the group", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "users-remove-sub-admin", + "summary": "Remove a user from the subadmins of a group", + "description": "This endpoint requires admin access", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "groupid", + "in": "query", + "description": "ID of the group", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/cloud/users/{userId}/welcome": { + "post": { + "operationId": "users-resend-welcome-message", + "summary": "Resend the welcome message", + "tags": [ + "users" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID if the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/provisioning_api/api/v1/config/apps": { + "get": { + "operationId": "app_config-get-apps", + "summary": "Get a list of apps", + "description": "This endpoint requires admin access", + "tags": [ + "app_config" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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": [ + "data" + ], + "properties": { + "data": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/provisioning_api/api/v1/config/apps/{app}": { + "get": { + "operationId": "app_config-get-keys", + "summary": "Get the config keys of an app", + "description": "This endpoint requires admin access", + "tags": [ + "app_config" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "app", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Keys 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", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/provisioning_api/api/v1/config/apps/{app}/{key}": { + "get": { + "operationId": "app_config-get-value", + "summary": "Get a the config value of an app", + "description": "This endpoint requires admin access", + "tags": [ + "app_config" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "defaultValue", + "in": "query", + "description": "Default returned value if the value is empty", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "app", + "in": "path", + "description": "ID if the app", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "key", + "in": "path", + "description": "Key", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Value 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", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "app_config-set-value", + "summary": "Update the config value of an app", + "tags": [ + "app_config" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "value", + "in": "query", + "description": "New value for the key", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "app", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "key", + "in": "path", + "description": "Key to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Value updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "app_config-delete-key", + "summary": "Delete a config key of an app", + "description": "This endpoint requires admin access", + "tags": [ + "app_config" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "app", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "key", + "in": "path", + "description": "Key to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Key deleted successfully", + "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/provisioning_api/api/v1/config/users/{appId}/{configKey}": { + "post": { + "operationId": "preferences-set-preference", + "summary": "Update a preference value of an app", + "tags": [ + "preferences" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "configValue", + "in": "query", + "description": "New value", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "appId", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "configKey", + "in": "path", + "description": "Key of the preference", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Preference updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "preferences-delete-preference", + "summary": "Delete a preference for an app", + "tags": [ + "preferences" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "appId", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "configKey", + "in": "path", + "description": "Key to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Preference deleted successfully", + "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/provisioning_api/api/v1/config/users/{appId}": { + "post": { + "operationId": "preferences-set-multiple-preferences", + "summary": "Update multiple preference values of an app", + "tags": [ + "preferences" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "configs", + "in": "query", + "description": "Key-value pairs of the preferences", + "required": true, + "schema": { + "type": "string", + "contentMediaType": "application/json", + "contentSchema": { + "type": "object", + "description": "Key-value pairs of the preferences", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "name": "appId", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Preferences updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "preferences-delete-multiple-preference", + "summary": "Delete multiple preferences for an app", + "tags": [ + "preferences" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "configKeys[]", + "in": "query", + "description": "Keys to delete", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "appId", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Preferences deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } } - } } - } - } - } -} + }, + "tags": [] +} \ No newline at end of file diff --git a/packages/nextcloud/lib/src/api/settings.openapi.json b/packages/nextcloud/lib/src/api/settings.openapi.json new file mode 100644 index 00000000..1e8b1831 --- /dev/null +++ b/packages/nextcloud/lib/src/api/settings.openapi.json @@ -0,0 +1,66 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "settings", + "version": "0.0.1", + "description": "Nextcloud settings", + "license": { + "name": "agpl", + "identifier": "AGPL-3.0-only" + } + }, + "components": { + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + }, + "bearer_auth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": {} + }, + "paths": { + "/index.php/settings/admin/log/download": { + "get": { + "operationId": "log_settings-download", + "summary": "download logfile", + "description": "This endpoint requires admin access", + "tags": [ + "log_settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "responses": { + "200": { + "description": "", + "headers": { + "Content-Disposition": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + } + }, + "tags": [] +} \ No newline at end of file diff --git a/packages/nextcloud/lib/src/api/theming.openapi.json b/packages/nextcloud/lib/src/api/theming.openapi.json new file mode 100644 index 00000000..0ad5e284 --- /dev/null +++ b/packages/nextcloud/lib/src/api/theming.openapi.json @@ -0,0 +1,778 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "theming", + "version": "0.0.1", + "description": "Adjust the Nextcloud theme", + "license": { + "name": "agpl", + "identifier": "AGPL-3.0-only" + } + }, + "components": { + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + }, + "bearer_auth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "Background": { + "type": "object", + "required": [ + "backgroundImage", + "backgroundColor", + "version" + ], + "properties": { + "backgroundImage": { + "type": "string", + "nullable": true + }, + "backgroundColor": { + "type": "string" + }, + "version": { + "type": "integer", + "format": "int64" + } + } + }, + "OCSMeta": { + "type": "object", + "required": [ + "status", + "statuscode" + ], + "properties": { + "status": { + "type": "string" + }, + "statuscode": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "totalitems": { + "type": "string" + }, + "itemsperpage": { + "type": "string" + } + } + }, + "PublicCapabilities": { + "type": "object", + "required": [ + "theming" + ], + "properties": { + "theming": { + "type": "object", + "required": [ + "name", + "url", + "slogan", + "color", + "color-text", + "color-element", + "color-element-bright", + "color-element-dark", + "logo", + "background", + "background-plain", + "background-default", + "logoheader", + "favicon" + ], + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string" + }, + "slogan": { + "type": "string" + }, + "color": { + "type": "string" + }, + "color-text": { + "type": "string" + }, + "color-element": { + "type": "string" + }, + "color-element-bright": { + "type": "string" + }, + "color-element-dark": { + "type": "string" + }, + "logo": { + "type": "string" + }, + "background": { + "type": "string" + }, + "background-plain": { + "type": "boolean" + }, + "background-default": { + "type": "boolean" + }, + "logoheader": { + "type": "string" + }, + "favicon": { + "type": "string" + } + } + } + } + } + } + }, + "paths": { + "/index.php/apps/theming/theme/{themeId}.css": { + "get": { + "operationId": "theming-get-theme-stylesheet", + "summary": "Get the CSS stylesheet for a theme", + "tags": [ + "theming" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "plain", + "in": "query", + "description": "Let the browser decide the CSS priority", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "withCustomCss", + "in": "query", + "description": "Include custom CSS", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "themeId", + "in": "path", + "description": "ID of the theme", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Stylesheet returned", + "content": { + "text/css": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/index.php/apps/theming/image/{key}": { + "get": { + "operationId": "theming-get-image", + "summary": "Get an image", + "tags": [ + "theming" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "useSvg", + "in": "query", + "description": "Return image as SVG", + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "key", + "in": "path", + "description": "Key of the image", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Image returned", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/index.php/apps/theming/manifest/{app}": { + "get": { + "operationId": "theming-get-manifest", + "summary": "Get the manifest for an app", + "tags": [ + "theming" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "app", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "name", + "short_name", + "start_url", + "theme_color", + "background_color", + "description", + "icons", + "display" + ], + "properties": { + "name": { + "type": "string" + }, + "short_name": { + "type": "string" + }, + "start_url": { + "type": "string" + }, + "theme_color": { + "type": "string" + }, + "background_color": { + "type": "string" + }, + "description": { + "type": "string" + }, + "icons": { + "type": "array", + "items": { + "type": "object", + "required": [ + "src", + "type", + "sizes" + ], + "properties": { + "src": { + "type": "string", + "minLength": 1 + }, + "type": { + "type": "string" + }, + "sizes": { + "type": "string" + } + } + } + }, + "display": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/index.php/apps/theming/favicon/{app}": { + "get": { + "operationId": "icon-get-favicon", + "summary": "Return a 32x32 favicon as png", + "tags": [ + "icon" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "app", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string", + "default": "core" + } + } + ], + "responses": { + "200": { + "description": "Favicon returned", + "content": { + "image/x-icon": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/index.php/apps/theming/icon/{app}": { + "get": { + "operationId": "icon-get-touch-icon", + "summary": "Return a 512x512 icon for touch devices", + "tags": [ + "icon" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "app", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string", + "default": "core" + } + } + ], + "responses": { + "200": { + "description": "Touch icon returned", + "content": { + "image/png": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/index.php/apps/theming/img/{app}/{image}": { + "get": { + "operationId": "icon-get-themed-icon", + "summary": "Get a themed icon", + "tags": [ + "icon" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "app", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "image", + "in": "path", + "description": "image file name (svg required)", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+$" + } + } + ], + "responses": { + "200": { + "description": "Themed icon returned", + "content": { + "image/svg+xml": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/index.php/apps/theming/background": { + "get": { + "operationId": "user_theme-get-background", + "summary": "Get the background image", + "tags": [ + "user_theme" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Background image returned", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/index.php/apps/theming/background/{type}": { + "post": { + "operationId": "user_theme-set-background", + "summary": "Set the background", + "tags": [ + "user_theme" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "value", + "in": "query", + "description": "Path of the background image", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "color", + "in": "query", + "description": "Color for the background", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "type", + "in": "path", + "description": "Type of background", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Background set successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Background" + } + } + } + } + } + } + }, + "/index.php/apps/theming/background/custom": { + "delete": { + "operationId": "user_theme-delete-background", + "summary": "Delete the background", + "tags": [ + "user_theme" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Background" + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/theming/api/v1/theme/{themeId}/enable": { + "put": { + "operationId": "user_theme-enable-theme", + "summary": "Enable theme", + "tags": [ + "user_theme" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "themeId", + "in": "path", + "description": "the theme ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Theme enabled successfully", + "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/theming/api/v1/theme/{themeId}": { + "delete": { + "operationId": "user_theme-disable-theme", + "summary": "Disable theme", + "tags": [ + "user_theme" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "themeId", + "in": "path", + "description": "the theme ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Theme disabled successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + } + }, + "tags": [ + { + "name": "theming", + "description": "Class ThemingController\nhandle ajax requests to update the theme" + } + ] +} \ No newline at end of file diff --git a/packages/nextcloud/lib/src/api/uppush.openapi.json b/packages/nextcloud/lib/src/api/uppush.openapi.json index 3a48aa66..28460b61 100644 --- a/packages/nextcloud/lib/src/api/uppush.openapi.json +++ b/packages/nextcloud/lib/src/api/uppush.openapi.json @@ -8,6 +8,7 @@ }, "version": "1.4.0" }, + "tags": [], "paths": { "/index.php/apps/uppush": { "get": { diff --git a/packages/nextcloud/lib/src/api/user_status.openapi.json b/packages/nextcloud/lib/src/api/user_status.openapi.json index d7175e90..da99184d 100644 --- a/packages/nextcloud/lib/src/api/user_status.openapi.json +++ b/packages/nextcloud/lib/src/api/user_status.openapi.json @@ -1,588 +1,913 @@ { - "openapi": "3.1.0", - "info": { - "title": "user_status", - "version": "1.7.0", - "description": "User status", - "license": { - "name": "agpl", - "identifier": "AGPL-3.0" - } - }, - "servers": [ - { - "url": "https://{hostname}:{port}", - "variables": { - "hostname": { - "default": "localhost" - }, - "port": { - "default": "8080" - } - } - } - ], - "security": [ - { - "basic_auth": [] - } - ], - "components": { - "schemas": { - "OCSMeta": { - "type": "object", - "required": [ - "status", - "statuscode" - ], - "properties": { - "status": { - "type": "string" - }, - "statuscode": { - "type": "integer" - }, - "message": { - "type": "string" - }, - "totalitems": { - "type": "string" - }, - "itemsperpage": { - "type": "string" - } + "openapi": "3.1.0", + "info": { + "title": "user_status", + "version": "0.0.1", + "description": "User status", + "license": { + "name": "agpl", + "identifier": "AGPL-3.0-only" } - }, - "EmptyOCS": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array" - } + }, + "components": { + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + }, + "bearer_auth": { + "type": "http", + "scheme": "bearer" } - } - } - }, - "PredefinedStatuses": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PredefinedStatus" + }, + "schemas": { + "Capabilities": { + "type": "object", + "required": [ + "user_status" + ], + "properties": { + "user_status": { + "type": "object", + "required": [ + "enabled", + "restore", + "supports_emoji" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "restore": { + "type": "boolean" + }, + "supports_emoji": { + "type": "boolean" + } + } + } } - } - } - } - } - }, - "PredefinedStatus": { - "type": "object", - "required": [ - "id", - "icon", - "message" - ], - "properties": { - "id": { - "type": "string" - }, - "icon": { - "type": "string" - }, - "message": { - "type": "string" - }, - "clearAt": { - "oneOf": [ - { - "$ref": "#/components/schemas/ClearAt" - }, - { - "type": "integer", - "description": "Time as unix timestamp" - } - ] - } - } - }, - "ClearAt": { - "type": "object", - "required": [ - "type", - "time" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "period", - "end-of" - ] - }, - "time": { - "oneOf": [ - { + }, + "ClearAt": { + "type": "object", + "required": [ + "type", + "time" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "period", + "end-of" + ] + }, + "time": { + "oneOf": [ + { + "type": "integer", + "format": "int64" + }, + { + "$ref": "#/components/schemas/ClearAtTimeType" + } + ] + } + } + }, + "ClearAtTimeType": { "type": "string", "enum": [ - "day", - "week" + "day", + "week" ] - }, - { - "type": "integer", - "description": "Time offset in seconds" - } - ] - } - } - }, - "Type": { - "type": "string", - "enum": [ - "online", - "offline", - "dnd", - "away", - "invisible" - ] - }, - "GetStatus": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "oneOf": [ - { - "type": "array", - "items": { - "type": "object" - } - }, - { - "$ref": "#/components/schemas/Status" - } - ] - } - } - } - } - }, - "GetPublicStatuses": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PublicStatus" + }, + "OCSMeta": { + "type": "object", + "required": [ + "status", + "statuscode" + ], + "properties": { + "status": { + "type": "string" + }, + "statuscode": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "totalitems": { + "type": "string" + }, + "itemsperpage": { + "type": "string" + } } - } - } - } - } - }, - "GetPublicStatus": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "oneOf": [ - { - "type": "array", - "items": { - "type": "object" - } - }, - { - "$ref": "#/components/schemas/PublicStatus" - } - ] - } - } - } - } - }, - "Status": { - "allOf": [ - { - "$ref": "#/components/schemas/PublicStatus" - }, - { - "type": "object", - "required": [ - "messageIsPredefined", - "statusIsUserDefined" - ], - "properties": { - "messageId": { - "type": "string" - }, - "messageIsPredefined": { - "type": "boolean" - }, - "statusIsUserDefined": { - "type": "boolean" - } - } - } - ] - }, - "PublicStatus": { - "type": "object", - "required": [ - "userId", - "status" - ], - "properties": { - "userId": { - "type": "string" - }, - "message": { - "type": "string" - }, - "icon": { - "type": "string" - }, - "clearAt": { - "oneOf": [ - { - "$ref": "#/components/schemas/ClearAt" - }, - { - "type": "integer", - "description": "Time as unix timestamp" - } - ] - }, - "status": { - "$ref": "#/components/schemas/Type" - } - } - }, - "Heartbeat": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "oneOf": [ - { - "type": "array", - "items": { - "type": "object" - } - }, - { - "$ref": "#/components/schemas/Status" - } + }, + "Predefined": { + "type": "object", + "required": [ + "id", + "icon", + "message", + "clearAt", + "visible" + ], + "properties": { + "id": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "message": { + "type": "string" + }, + "clearAt": { + "$ref": "#/components/schemas/ClearAt", + "nullable": true + }, + "visible": { + "type": "boolean", + "nullable": true + } + } + }, + "Private": { + "allOf": [ + { + "$ref": "#/components/schemas/Public" + }, + { + "type": "object", + "required": [ + "messageId", + "messageIsPredefined", + "statusIsUserDefined" + ], + "properties": { + "messageId": { + "type": "string", + "nullable": true + }, + "messageIsPredefined": { + "type": "boolean" + }, + "statusIsUserDefined": { + "type": "boolean" + } + } + } ] - } - } - } - } - } - }, - "securitySchemes": { - "basic_auth": { - "type": "http", - "scheme": "basic" - } - } - }, - "paths": { - "/ocs/v2.php/apps/user_status/api/v1/statuses": { - "get": { - "operationId": "get-public-statuses", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetPublicStatuses" + }, + "Public": { + "type": "object", + "required": [ + "userId", + "message", + "icon", + "clearAt", + "status" + ], + "properties": { + "userId": { + "type": "string" + }, + "message": { + "type": "string", + "nullable": true + }, + "icon": { + "type": "string", + "nullable": true + }, + "clearAt": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "status": { + "type": "string" + } } - } } - } } - } }, - "/ocs/v2.php/apps/user_status/api/v1/statuses/{userId}": { - "parameters": [ - { - "name": "userId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "operationId": "get-public-status", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetPublicStatus" + "paths": { + "/ocs/v2.php/apps/user_status/api/v1/statuses": { + "get": { + "operationId": "statuses-find-all", + "summary": "Find statuses of users", + "tags": [ + "statuses" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "Maximum number of statuses to find", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "offset", + "in": "query", + "description": "Offset for finding statuses", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/Public" + } + } + } + } + } + } + } + } + } } - } } - } - } - } - }, - "/ocs/v2.php/apps/user_status/api/v1/user_status": { - "get": { - "operationId": "get-status", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetStatus" + }, + "/ocs/v2.php/apps/user_status/api/v1/statuses/{userId}": { + "get": { + "operationId": "statuses-find", + "summary": "Find the status of a user", + "tags": [ + "statuses" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "The status was found 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/Public" + } + } + } + } + } + } + } + } } - } } - } - } - } - }, - "/ocs/v2.php/apps/user_status/api/v1/user_status/status": { - "put": { - "operationId": "set-status", - "parameters": [ - { - "name": "statusType", - "in": "query", - "required": true, - "schema": { - "$ref": "#/components/schemas/Type" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetStatus" + }, + "/ocs/v2.php/apps/user_status/api/v1/user_status": { + "get": { + "operationId": "user_status-get-status", + "summary": "Get the status of the current user", + "tags": [ + "user_status" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "The status was found 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/Private" + } + } + } + } + } + } + } + } } - } - } - } - } - } - }, - "/ocs/v2.php/apps/user_status/api/v1/user_status/message/predefined": { - "put": { - "operationId": "set-predefined-message", - "parameters": [ - { - "name": "messageId", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "clearAt", - "in": "query", - "required": false, - "schema": { - "type": "integer" } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetStatus" + }, + "/ocs/v2.php/apps/user_status/api/v1/user_status/status": { + "put": { + "operationId": "user_status-set-status", + "summary": "Update the status type of the current user", + "tags": [ + "user_status" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "statusType", + "in": "query", + "description": "The new status type", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "The status was 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/Private" + } + } + } + } + } + } + } + } } - } - } - } - } - } - }, - "/ocs/v2.php/apps/user_status/api/v1/user_status/message/custom": { - "put": { - "operationId": "set-custom-message", - "parameters": [ - { - "name": "statusIcon", - "in": "query", - "required": false, - "schema": { - "type": "string" } - }, - { - "name": "message", - "in": "query", - "required": false, - "schema": { - "type": "string" + }, + "/ocs/v2.php/apps/user_status/api/v1/user_status/message/predefined": { + "put": { + "operationId": "user_status-set-predefined-message", + "summary": "Set the message to a predefined message for the current user", + "tags": [ + "user_status" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "messageId", + "in": "query", + "description": "ID of the predefined message", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "clearAt", + "in": "query", + "description": "When the message should be cleared", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "The message was 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/Private" + } + } + } + } + } + } + } + } + } } - }, - { - "name": "clearAt", - "in": "query", - "required": false, - "schema": { - "type": "integer" + }, + "/ocs/v2.php/apps/user_status/api/v1/user_status/message/custom": { + "put": { + "operationId": "user_status-set-custom-message", + "summary": "Set the message to a custom message for the current user", + "tags": [ + "user_status" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "statusIcon", + "in": "query", + "description": "Icon of the status", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "message", + "in": "query", + "description": "Message of the status", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "clearAt", + "in": "query", + "description": "When the message should be cleared", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "The message was 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/Private" + } + } + } + } + } + } + } + } + } } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetStatus" + }, + "/ocs/v2.php/apps/user_status/api/v1/user_status/message": { + "delete": { + "operationId": "user_status-clear-message", + "summary": "Clear the message of the current user", + "tags": [ + "user_status" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/user_status/api/v1/user_status/message": { - "delete": { - "operationId": "clear-message", - "responses": { - "200": { - "description": "" - } - } - } - }, - "/ocs/v2.php/apps/user_status/api/v1/predefined_statuses": { - "get": { - "operationId": "get-predefined-statuses", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PredefinedStatuses" + }, + "/ocs/v2.php/apps/user_status/api/v1/user_status/revert/{messageId}": { + "delete": { + "operationId": "user_status-revert-status", + "summary": "Revert the status to the previous status", + "tags": [ + "user_status" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "messageId", + "in": "path", + "description": "ID of the message to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Status reverted", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "oneOf": [ + { + "$ref": "#/components/schemas/Private" + }, + {} + ] + } + } + } + } + } + } + } + } } - } } - } - } - } - }, - "/ocs/v2.php/apps/user_status/api/v1/heartbeat": { - "put": { - "operationId": "heartbeat", - "parameters": [ - { - "name": "status", - "in": "query", - "required": true, - "schema": { - "$ref": "#/components/schemas/Type" + }, + "/ocs/v2.php/apps/user_status/api/v1/predefined_statuses": { + "get": { + "operationId": "predefined_status-find-all", + "summary": "Get all predefined messages", + "tags": [ + "predefined_status" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "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/Predefined" + } + } + } + } + } + } + } + } + } + } } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Heartbeat" + }, + "/ocs/v2.php/apps/user_status/api/v1/heartbeat": { + "put": { + "operationId": "heartbeat-heartbeat", + "summary": "Keep the status alive", + "tags": [ + "heartbeat" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "status", + "in": "query", + "description": "Only online, away", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Status successfully updated", + "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/Private" + } + } + } + } + } + } + } + } } - } } - } } - } - } - } -} + }, + "tags": [] +} \ No newline at end of file diff --git a/tool/generate-specs.sh b/tool/generate-specs.sh new file mode 100755 index 00000000..3aaf30dc --- /dev/null +++ b/tool/generate-specs.sh @@ -0,0 +1,30 @@ +#!/bin/bash +set -euxo pipefail +cd "$(dirname "$0")/.." + +rm -rf /tmp/nextcloud-neon +mkdir -p /tmp/nextcloud-neon + +( + cd external/nextcloud-openapi-extractor + composer update && composer install +) + +for path in core apps/provisioning_api apps/settings apps/theming apps/user_status; do + codename="$(echo $path | sed "s/^apps\///")" + ./external/nextcloud-openapi-extractor/generate-spec "external/nextcloud-server/$path" "packages/nextcloud/lib/src/api/$codename.openapi.json" --first-status-code --first-content-type --openapi-version 3.1.0 +done + +./external/nextcloud-openapi-extractor/merge-specs \ + --openapi-version 3.1.0 \ + --core packages/nextcloud/lib/src/api/core.openapi.json \ + --merged /tmp/nextcloud-neon/merged.json \ + packages/nextcloud/lib/src/api/*.openapi.json + +jq \ + -s \ + '.[0] * {paths: {"/ocs/v2.php/cloud/capabilities": {get: {responses: .[1].paths."/ocs/v2.php/cloud/capabilities".get.responses}}}}' \ + packages/nextcloud/lib/src/api/core.openapi.json \ + /tmp/nextcloud-neon/merged.json \ + > /tmp/nextcloud-neon/core.json +cp /tmp/nextcloud-neon/core.json packages/nextcloud/lib/src/api/core.openapi.json