From 43b961f94dc5860eafae6230cad31305c6865de7 Mon Sep 17 00:00:00 2001 From: Julien Veyssier Date: Sat, 21 Sep 2024 01:42:34 +0200 Subject: [PATCH] update composer deps, fix openapi issues Signed-off-by: Julien Veyssier --- composer.lock | 187 +- lib/Controller/ApiController.php | 28 +- lib/Controller/FederationController.php | 22 +- openapi.json | 2268 ++++++++++++++++++----- 4 files changed, 1913 insertions(+), 592 deletions(-) diff --git a/composer.lock b/composer.lock index a0b0cc867..4daa50186 100644 --- a/composer.lock +++ b/composer.lock @@ -9,16 +9,16 @@ "packages-dev": [ { "name": "adhocore/cli", - "version": "v1.7.1", + "version": "v1.7.2", "source": { "type": "git", "url": "https://github.com/adhocore/php-cli.git", - "reference": "3fde60a838912e71c82ed0f48048685dc32dbc77" + "reference": "57834cbaa4fb68cda849417ab86577fba2b15298" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/adhocore/php-cli/zipball/3fde60a838912e71c82ed0f48048685dc32dbc77", - "reference": "3fde60a838912e71c82ed0f48048685dc32dbc77", + "url": "https://api.github.com/repos/adhocore/php-cli/zipball/57834cbaa4fb68cda849417ab86577fba2b15298", + "reference": "57834cbaa4fb68cda849417ab86577fba2b15298", "shasum": "" }, "require": { @@ -63,7 +63,7 @@ ], "support": { "issues": "https://github.com/adhocore/php-cli/issues", - "source": "https://github.com/adhocore/php-cli/tree/v1.7.1" + "source": "https://github.com/adhocore/php-cli/tree/v1.7.2" }, "funding": [ { @@ -75,7 +75,7 @@ "type": "github" } ], - "time": "2024-03-28T08:30:12+00:00" + "time": "2024-09-05T00:08:47+00:00" }, { "name": "doctrine/instantiator", @@ -147,6 +147,52 @@ ], "time": "2022-12-30T00:23:10+00:00" }, + { + "name": "kubawerlos/php-cs-fixer-custom-fixers", + "version": "v3.22.0", + "source": { + "type": "git", + "url": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers.git", + "reference": "8701394f0c7cd450ac4fa577d24589122c1d5d5e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/8701394f0c7cd450ac4fa577d24589122c1d5d5e", + "reference": "8701394f0c7cd450ac4fa577d24589122c1d5d5e", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "ext-tokenizer": "*", + "friendsofphp/php-cs-fixer": "^3.61.1", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.6.4 || ^10.5.29" + }, + "type": "library", + "autoload": { + "psr-4": { + "PhpCsFixerCustomFixers\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kuba Werłos", + "email": "werlos@gmail.com" + } + ], + "description": "A set of custom fixers for PHP CS Fixer", + "support": { + "issues": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/issues", + "source": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.22.0" + }, + "time": "2024-08-16T20:44:35+00:00" + }, { "name": "myclabs/deep-copy", "version": "1.12.0", @@ -209,19 +255,20 @@ }, { "name": "nextcloud/coding-standard", - "version": "v1.2.1", + "version": "v1.3.1", "source": { "type": "git", "url": "https://github.com/nextcloud/coding-standard.git", - "reference": "cf5f18d989ec62fb4cdc7fc92a36baf34b3d829e" + "reference": "e88acb0df6217b808d1632286ddfec9267a102e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/cf5f18d989ec62fb4cdc7fc92a36baf34b3d829e", - "reference": "cf5f18d989ec62fb4cdc7fc92a36baf34b3d829e", + "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/e88acb0df6217b808d1632286ddfec9267a102e4", + "reference": "e88acb0df6217b808d1632286ddfec9267a102e4", "shasum": "" }, "require": { + "kubawerlos/php-cs-fixer-custom-fixers": "^3.22", "php": "^7.3|^8.0", "php-cs-fixer/shim": "^3.17" }, @@ -244,9 +291,9 @@ "description": "Nextcloud coding standards for the php cs fixer", "support": { "issues": "https://github.com/nextcloud/coding-standard/issues", - "source": "https://github.com/nextcloud/coding-standard/tree/v1.2.1" + "source": "https://github.com/nextcloud/coding-standard/tree/v1.3.1" }, - "time": "2024-02-01T14:54:37+00:00" + "time": "2024-09-19T09:07:10+00:00" }, { "name": "nextcloud/ocp", @@ -254,12 +301,12 @@ "source": { "type": "git", "url": "https://github.com/nextcloud-deps/ocp.git", - "reference": "b0127d6fd2932bf1fdffe334ae59fdd6c8272029" + "reference": "4f352c7125d27dc08f08a05a108bf9920536acaf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/b0127d6fd2932bf1fdffe334ae59fdd6c8272029", - "reference": "b0127d6fd2932bf1fdffe334ae59fdd6c8272029", + "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/4f352c7125d27dc08f08a05a108bf9920536acaf", + "reference": "4f352c7125d27dc08f08a05a108bf9920536acaf", "shasum": "" }, "require": { @@ -291,7 +338,7 @@ "issues": "https://github.com/nextcloud-deps/ocp/issues", "source": "https://github.com/nextcloud-deps/ocp/tree/master" }, - "time": "2024-08-14T08:51:54+00:00" + "time": "2024-09-20T00:41:25+00:00" }, { "name": "nextcloud/openapi-extractor", @@ -299,12 +346,12 @@ "source": { "type": "git", "url": "https://github.com/nextcloud/openapi-extractor.git", - "reference": "cdfedf4382b4f9d2a90f6bb1578f6a590017944b" + "reference": "08123750b840942afb17f9b901b047de9005bb0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud/openapi-extractor/zipball/cdfedf4382b4f9d2a90f6bb1578f6a590017944b", - "reference": "cdfedf4382b4f9d2a90f6bb1578f6a590017944b", + "url": "https://api.github.com/repos/nextcloud/openapi-extractor/zipball/08123750b840942afb17f9b901b047de9005bb0c", + "reference": "08123750b840942afb17f9b901b047de9005bb0c", "shasum": "" }, "require": { @@ -343,24 +390,28 @@ "cd tests && ../generate-spec" ] }, + "license": [ + "AGPL-3.0-or-later" + ], + "description": "A tool for extracting OpenAPI specifications from Nextcloud source code", "support": { "source": "https://github.com/nextcloud/openapi-extractor/tree/main", "issues": "https://github.com/nextcloud/openapi-extractor/issues" }, - "time": "2024-08-05T15:03:39+00:00" + "time": "2024-09-15T14:47:07+00:00" }, { "name": "nikic/php-parser", - "version": "v5.1.0", + "version": "v5.2.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1" + "reference": "23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/683130c2ff8c2739f4822ff7ac5c873ec529abd1", - "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb", + "reference": "23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb", "shasum": "" }, "require": { @@ -403,9 +454,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.1.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.2.0" }, - "time": "2024-07-01T20:03:41+00:00" + "time": "2024-09-15T16:40:33+00:00" }, { "name": "phar-io/manifest", @@ -527,16 +578,16 @@ }, { "name": "php-cs-fixer/shim", - "version": "v3.62.0", + "version": "v3.64.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/shim.git", - "reference": "7a91d5ce45c486f5b445d95901228507a02f60ae" + "reference": "81ccfd24baf3a10810dab1152c403981a790b837" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/7a91d5ce45c486f5b445d95901228507a02f60ae", - "reference": "7a91d5ce45c486f5b445d95901228507a02f60ae", + "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/81ccfd24baf3a10810dab1152c403981a790b837", + "reference": "81ccfd24baf3a10810dab1152c403981a790b837", "shasum": "" }, "require": { @@ -573,22 +624,22 @@ "description": "A tool to automatically fix PHP code style", "support": { "issues": "https://github.com/PHP-CS-Fixer/shim/issues", - "source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.62.0" + "source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.64.0" }, - "time": "2024-08-07T17:03:46+00:00" + "time": "2024-08-30T23:10:11+00:00" }, { "name": "phpstan/phpdoc-parser", - "version": "1.29.1", + "version": "1.30.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4" + "reference": "51b95ec8670af41009e2b2b56873bad96682413e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/fcaefacf2d5c417e928405b71b400d4ce10daaf4", - "reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/51b95ec8670af41009e2b2b56873bad96682413e", + "reference": "51b95ec8670af41009e2b2b56873bad96682413e", "shasum": "" }, "require": { @@ -620,41 +671,41 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.29.1" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.30.1" }, - "time": "2024-05-31T08:52:43+00:00" + "time": "2024-09-07T20:13:05+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.31", + "version": "9.2.32", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965" + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/48c34b5d8d983006bd2adc2d0de92963b9155965", - "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.18 || ^5.0", + "nikic/php-parser": "^4.19.1 || ^5.1.0", "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-text-template": "^2.0.4", + "sebastian/code-unit-reverse-lookup": "^2.0.3", + "sebastian/complexity": "^2.0.3", + "sebastian/environment": "^5.1.5", + "sebastian/lines-of-code": "^1.0.4", + "sebastian/version": "^3.0.2", + "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.6" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -663,7 +714,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "9.2.x-dev" } }, "autoload": { @@ -692,7 +743,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.31" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32" }, "funding": [ { @@ -700,7 +751,7 @@ "type": "github" } ], - "time": "2024-03-02T06:37:42+00:00" + "time": "2024-08-22T04:23:01+00:00" }, { "name": "phpunit/php-file-iterator", @@ -945,16 +996,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.20", + "version": "9.6.21", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "49d7820565836236411f5dc002d16dd689cde42f" + "reference": "de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/49d7820565836236411f5dc002d16dd689cde42f", - "reference": "49d7820565836236411f5dc002d16dd689cde42f", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa", + "reference": "de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa", "shasum": "" }, "require": { @@ -969,7 +1020,7 @@ "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.31", + "phpunit/php-code-coverage": "^9.2.32", "phpunit/php-file-iterator": "^3.0.6", "phpunit/php-invoker": "^3.1.1", "phpunit/php-text-template": "^2.0.4", @@ -1028,7 +1079,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.20" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.21" }, "funding": [ { @@ -1044,20 +1095,20 @@ "type": "tidelift" } ], - "time": "2024-07-10T11:45:39+00:00" + "time": "2024-09-19T10:50:18+00:00" }, { "name": "psalm/phar", - "version": "5.25.0", + "version": "5.26.1", "source": { "type": "git", "url": "https://github.com/psalm/phar.git", - "reference": "d42708449bd2d99ec6509924332fd94263974b20" + "reference": "8a38e7ad04499a0ccd2c506fd1da6fc01fff4547" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/psalm/phar/zipball/d42708449bd2d99ec6509924332fd94263974b20", - "reference": "d42708449bd2d99ec6509924332fd94263974b20", + "url": "https://api.github.com/repos/psalm/phar/zipball/8a38e7ad04499a0ccd2c506fd1da6fc01fff4547", + "reference": "8a38e7ad04499a0ccd2c506fd1da6fc01fff4547", "shasum": "" }, "require": { @@ -1077,9 +1128,9 @@ "description": "Composer-based Psalm Phar", "support": { "issues": "https://github.com/psalm/phar/issues", - "source": "https://github.com/psalm/phar/tree/5.25.0" + "source": "https://github.com/psalm/phar/tree/5.26.1" }, - "time": "2024-06-19T20:02:02+00:00" + "time": "2024-09-09T16:22:43+00:00" }, { "name": "psr/clock", diff --git a/lib/Controller/ApiController.php b/lib/Controller/ApiController.php index 1dfdb0ce7..cde6163fe 100644 --- a/lib/Controller/ApiController.php +++ b/lib/Controller/ApiController.php @@ -1211,7 +1211,7 @@ public function deleteCurrency(string $projectId, int $currencyId): DataResponse #[CospendUserPermissions(minimumLevel: Application::ACCESS_LEVEL_PARTICIPANT)] #[OpenAPI(scope: OpenAPI::SCOPE_DEFAULT, tags: ['Sharing'])] public function createFederatedShare( - string $projectId, string $userCloudId, int $accessLevel = Application::ACCESS_LEVEL_PARTICIPANT, + string $projectId, string $userCloudId, int $accessLevel = 2, bool $manuallyAdded = true ): DataResponse { try { @@ -1264,7 +1264,10 @@ public function deleteFederatedShare(string $projectId, int $shId): DataResponse * @param int $accessLevel * @param bool $manuallyAdded * @return DataResponse|DataResponse, array{}> + * @throws CospendBasicException + * @throws DoesNotExistException * @throws Exception + * @throws MultipleObjectsReturnedException * * 200: The user share was successfully created * 400: Failed to create the user share @@ -1273,7 +1276,7 @@ public function deleteFederatedShare(string $projectId, int $shId): DataResponse #[CospendUserPermissions(minimumLevel: Application::ACCESS_LEVEL_PARTICIPANT)] #[OpenAPI(scope: OpenAPI::SCOPE_DEFAULT, tags: ['Sharing'])] public function createUserShare( - string $projectId, string $userId, int $accessLevel = Application::ACCESS_LEVEL_PARTICIPANT, + string $projectId, string $userId, int $accessLevel = 2, bool $manuallyAdded = true ): DataResponse { $result = $this->localProjectService->createUserShare($projectId, $userId, $this->userId, $accessLevel, $manuallyAdded); @@ -1289,7 +1292,10 @@ public function createUserShare( * @param string $projectId * @param int $shId * @return DataResponse|DataResponse + * @throws CospendBasicException + * @throws DoesNotExistException * @throws Exception + * @throws MultipleObjectsReturnedException * * 200: The user share was successfully deleted * 400: Failed to delete the user share @@ -1332,7 +1338,7 @@ public function deleteUserShare(string $projectId, int $shId): DataResponse { #[CospendUserPermissions(minimumLevel: Application::ACCESS_LEVEL_PARTICIPANT)] #[OpenAPI(scope: OpenAPI::SCOPE_DEFAULT, tags: ['Sharing'])] public function createPublicShare( - string $projectId, ?string $label = null, ?string $password = null, int $accessLevel = Application::ACCESS_LEVEL_PARTICIPANT + string $projectId, ?string $label = null, ?string $password = null, int $accessLevel = 2 ): DataResponse { $result = $this->localProjectService->createPublicShare($projectId, $label, $password, $accessLevel); return new DataResponse($result); @@ -1344,10 +1350,13 @@ public function createPublicShare( * @param string $projectId * @param int $shId * @return DataResponse|DataResponse + * @throws DoesNotExistException * @throws Exception + * @throws MultipleObjectsReturnedException * * 200: The public share was successfully deleted * 400: Failed to delete the public share + * 403: The user is not authorized to delete this public share */ #[NoAdminRequired] #[CospendUserPermissions(minimumLevel: Application::ACCESS_LEVEL_PARTICIPANT)] @@ -1377,6 +1386,7 @@ public function deletePublicShare(string $projectId, int $shId): DataResponse { * @param int $accessLevel * @return DataResponse|DataResponse, array{}> * @throws Exception + * @throws MultipleObjectsReturnedException * * 200: The group share was successfully created * 400: Failed to create the group share @@ -1384,7 +1394,7 @@ public function deletePublicShare(string $projectId, int $shId): DataResponse { #[NoAdminRequired] #[CospendUserPermissions(minimumLevel: Application::ACCESS_LEVEL_PARTICIPANT)] #[OpenAPI(scope: OpenAPI::SCOPE_DEFAULT, tags: ['Sharing'])] - public function createGroupShare(string $projectId, string $groupId, int $accessLevel = Application::ACCESS_LEVEL_PARTICIPANT): DataResponse { + public function createGroupShare(string $projectId, string $groupId, int $accessLevel = 2): DataResponse { $result = $this->localProjectService->createGroupShare($projectId, $groupId, $this->userId, $accessLevel); if (!isset($result['message'])) { return new DataResponse($result); @@ -1398,7 +1408,9 @@ public function createGroupShare(string $projectId, string $groupId, int $access * @param string $projectId * @param int $shId * @return DataResponse|DataResponse + * @throws DoesNotExistException * @throws Exception + * @throws MultipleObjectsReturnedException * * 200: The group share was successfully deleted * 400: Failed to delete the group share @@ -1432,6 +1444,7 @@ public function deleteGroupShare(string $projectId, int $shId): DataResponse { * @param int $accessLevel * @return DataResponse|DataResponse, array{}> * @throws Exception + * @throws MultipleObjectsReturnedException * * 200: The circle share was successfully created * 400: Failed to create the circle share @@ -1439,7 +1452,7 @@ public function deleteGroupShare(string $projectId, int $shId): DataResponse { #[NoAdminRequired] #[CospendUserPermissions(minimumLevel: Application::ACCESS_LEVEL_PARTICIPANT)] #[OpenAPI(scope: OpenAPI::SCOPE_DEFAULT, tags: ['Sharing'])] - public function createCircleShare(string $projectId, string $circleId, int $accessLevel = Application::ACCESS_LEVEL_PARTICIPANT): DataResponse { + public function createCircleShare(string $projectId, string $circleId, int $accessLevel = 2): DataResponse { $result = $this->localProjectService->createCircleShare($projectId, $circleId, $this->userId, $accessLevel); if (!isset($result['message'])) { return new DataResponse($result); @@ -1453,7 +1466,9 @@ public function createCircleShare(string $projectId, string $circleId, int $acce * @param string $projectId * @param int $shId * @return DataResponse|DataResponse + * @throws DoesNotExistException * @throws Exception + * @throws MultipleObjectsReturnedException * * 200: The circle share was successfully deleted * 400: Failed to delete the circle share @@ -1603,7 +1618,8 @@ public function exportCsvStatistics( * * @param string $projectId * @param string|null $name - * @return DataResponse|DataResponse + * @return DataResponse|DataResponse, array{}> + * * @throws DoesNotExistException * @throws Exception * @throws InvalidPathException diff --git a/lib/Controller/FederationController.php b/lib/Controller/FederationController.php index fd7bb8de4..762afcb2d 100644 --- a/lib/Controller/FederationController.php +++ b/lib/Controller/FederationController.php @@ -54,6 +54,19 @@ public function __construct( parent::__construct($appName, $request); } + /** + * Get remote user avatar + * + * Get the avatar of a remote user from its federated cloud ID + * + * @param int $size + * @param string $cloudId + * @param bool $darkTheme + * @return FileDisplayResponse|RedirectResponse + * + * 200: The avatar has been obtained successfully + * 303: The remote avatar can't be obtained, fallback to a locally generated guest avatar + */ #[OpenAPI(scope: OpenAPI::SCOPE_FEDERATION)] #[NoCSRFRequired] public function getRemoteUserAvatar(int $size, string $cloudId, bool $darkTheme = false): FileDisplayResponse|RedirectResponse { @@ -101,7 +114,7 @@ public function getRemoteUserAvatar(int $size, string $cloudId, bool $darkTheme * Get the placeholder avatar * * @param string $name - * @return RedirectResponse<303, array{}> + * @return RedirectResponse * * 200: User avatar returned */ @@ -113,7 +126,6 @@ protected function getPlaceholderResponse(string $name): RedirectResponse { /** * Accept a federation invite * - * * @param int $id ID of the share * @psalm-param non-negative-int $id * @return DataResponse|DataResponse|DataResponse @@ -146,9 +158,7 @@ public function acceptShare(int $id): DataResponse { } /** - * Decline a federation invites - * - * 🚧 Draft: Still work in progress + * Decline a federation invite * * @param int $id ID of the share * @psalm-param non-negative-int $id @@ -181,8 +191,6 @@ public function rejectShare(int $id): DataResponse { /** * Get a list of federation invites * - * 🚧 Draft: Still work in progress - * * @return DataResponse, array{}> * @throws Exception * diff --git a/openapi.json b/openapi.json index f61e07013..4ad5c4d3a 100644 --- a/openapi.json +++ b/openapi.json @@ -838,8 +838,8 @@ }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects": { "get": { - "operationId": "api-get-projects", - "summary": "Get project list", + "operationId": "api-get-local-projects", + "summary": "Get local project list", "tags": [ "Projects" ], @@ -908,6 +908,16 @@ } } } + }, + "500": { + "description": "", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } } } }, @@ -1036,6 +1046,72 @@ } } }, + "404": { + "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", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "424": { + "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", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + } + } + }, "500": { "description": "", "content": { @@ -1049,6 +1125,82 @@ } } }, + "/ocs/v2.php/apps/cospend/api/{apiVersion}/federated-projects": { + "get": { + "operationId": "api-get-federated-projects", + "summary": "Get federated project list", + "tags": [ + "Projects" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Project list", + "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/FullProjectInfo" + } + } + } + } + } + } + } + } + } + } + } + }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}": { "delete": { "operationId": "api-delete-project", @@ -1157,13 +1309,41 @@ }, "data": { "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" - } + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "424": { + "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", + "additionalProperties": { + "type": "string" } } } @@ -1326,12 +1506,35 @@ } } }, - "500": { + "424": { "description": "", "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } } } } @@ -1415,25 +1618,91 @@ } } }, - "500": { + "404": { "description": "", "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "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/apps/cospend/api/{apiVersion}/projects/{projectId}/export-csv-project": { - "get": { - "operationId": "api-export-csv-project", - "summary": "Export project", - "description": "Export project to CSV", - "tags": [ + }, + "424": { + "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", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/export-csv-project": { + "get": { + "operationId": "api-export-csv-project", + "summary": "Export project", + "description": "Export project to CSV", + "tags": [ "Projects" ], "security": [ @@ -1545,13 +1814,8 @@ }, "data": { "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" - } + "additionalProperties": { + "type": "string" } } } @@ -1992,6 +2256,39 @@ } } }, + "424": { + "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", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + } + } + }, "500": { "description": "", "content": { @@ -2312,6 +2609,39 @@ } } } + }, + "424": { + "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", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + } + } } } } @@ -2422,7 +2752,7 @@ } } }, - "403": { + "400": { "description": "", "content": { "application/json": { @@ -2444,13 +2774,41 @@ }, "data": { "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" - } + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "424": { + "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", + "additionalProperties": { + "type": "string" } } } @@ -2799,7 +3157,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -2844,13 +3202,8 @@ }, "data": { "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" - } + "additionalProperties": { + "type": "string" } } } @@ -2882,13 +3235,8 @@ }, "data": { "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" - } + "additionalProperties": { + "type": "string" } } } @@ -2972,7 +3320,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -3057,16 +3405,6 @@ } } } - }, - "500": { - "description": "", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } } } }, @@ -3101,7 +3439,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -3237,7 +3575,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -3415,7 +3753,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -3521,7 +3859,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -3623,13 +3961,8 @@ }, "data": { "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" - } + "additionalProperties": { + "type": "string" } } } @@ -3766,7 +4099,7 @@ ], "responses": { "200": { - "description": "The bill was successfully created", + "description": "", "content": { "application/json": { "schema": { @@ -3797,7 +4130,7 @@ } }, "400": { - "description": "Failed to create the bill", + "description": "", "content": { "application/json": { "schema": { @@ -3818,16 +4151,41 @@ }, "data": { "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "424": { + "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", + "additionalProperties": { + "type": "string" } } } @@ -3991,7 +4349,7 @@ ], "responses": { "200": { - "description": "The bill list was successfully obtained", + "description": "", "content": { "application/json": { "schema": { @@ -4049,14 +4407,37 @@ } } }, - "500": { + "424": { "description": "", "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" - } - } + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + } } } } @@ -4162,7 +4543,7 @@ } } }, - "400": { + "404": { "description": "", "content": { "application/json": { @@ -4183,37 +4564,10 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "string" - } - } - } - } - } - } - } - }, - "403": { - "description": "This action is forbidden", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "string" + "type": "object", + "additionalProperties": { + "type": "string" + } } } } @@ -4222,7 +4576,7 @@ } } }, - "404": { + "424": { "description": "", "content": { "application/json": { @@ -4243,7 +4597,10 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "string" + "type": "object", + "additionalProperties": { + "type": "string" + } } } } @@ -4402,7 +4759,7 @@ ], "responses": { "200": { - "description": "The bills were successfully edited", + "description": "", "content": { "application/json": { "schema": { @@ -4436,7 +4793,40 @@ } }, "400": { - "description": "Failed to edit the bills", + "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", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "424": { + "description": "", "content": { "application/json": { "schema": { @@ -4589,7 +4979,43 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "string" + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "424": { + "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", + "additionalProperties": { + "type": "string" + } } } } @@ -4669,7 +5095,7 @@ ], "responses": { "200": { - "description": "Bill was successfully deleted", + "description": "", "content": { "application/json": { "schema": { @@ -4698,8 +5124,8 @@ } } }, - "403": { - "description": "This action is forbidden", + "404": { + "description": "", "content": { "application/json": { "schema": { @@ -4719,7 +5145,10 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "string" + "type": "object", + "additionalProperties": { + "type": "string" + } } } } @@ -4728,7 +5157,7 @@ } } }, - "404": { + "403": { "description": "", "content": { "application/json": { @@ -4749,7 +5178,10 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "string" + "type": "object", + "additionalProperties": { + "type": "string" + } } } } @@ -4758,7 +5190,7 @@ } } }, - "400": { + "424": { "description": "", "content": { "application/json": { @@ -4779,7 +5211,10 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "string" + "type": "object", + "additionalProperties": { + "type": "string" + } } } } @@ -4937,7 +5372,7 @@ ], "responses": { "200": { - "description": "The bill was successfully edited", + "description": "", "content": { "application/json": { "schema": { @@ -4968,7 +5403,40 @@ } }, "400": { - "description": "Failed to edit the bill", + "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", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "424": { + "description": "", "content": { "application/json": { "schema": { @@ -5091,8 +5559,8 @@ } } }, - "400": { - "description": "Failed to clear the trash bin", + "424": { + "description": "", "content": { "application/json": { "schema": { @@ -5112,7 +5580,10 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "string" + "type": "object", + "additionalProperties": { + "type": "string" + } } } } @@ -5457,7 +5928,43 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "string" + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "424": { + "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", + "additionalProperties": { + "type": "string" + } } } } @@ -5576,7 +6083,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -5657,10 +6164,7 @@ ], "properties": { "error": { - "type": "object", - "additionalProperties": { - "type": "string" - } + "type": "string" } } } @@ -5714,7 +6218,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -5933,7 +6437,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -6010,7 +6514,7 @@ } } }, - "400": { + "403": { "description": "", "content": { "application/json": { @@ -6031,7 +6535,10 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "string" + "type": "object", + "additionalProperties": { + "type": "string" + } } } } @@ -6040,7 +6547,7 @@ } } }, - "403": { + "404": { "description": "", "content": { "application/json": { @@ -6061,37 +6568,10 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "string" - } - } - } - } - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "string" + "type": "object", + "additionalProperties": { + "type": "string" + } } } } @@ -6234,7 +6714,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -6369,7 +6849,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -6488,16 +6968,6 @@ } } } - }, - "500": { - "description": "", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } } } } @@ -6533,7 +7003,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -6624,16 +7094,6 @@ } } } - }, - "500": { - "description": "", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } } } }, @@ -6668,7 +7128,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -6763,7 +7223,10 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "string" + "type": "object", + "additionalProperties": { + "type": "string" + } } } } @@ -6793,37 +7256,10 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "string" - } - } - } - } - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "string" + "type": "object", + "additionalProperties": { + "type": "string" + } } } } @@ -6955,7 +7391,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -7096,7 +7532,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -7178,16 +7614,6 @@ } } } - }, - "500": { - "description": "", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } } } } @@ -7281,6 +7707,39 @@ } } } + }, + "424": { + "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", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + } + } } } }, @@ -7368,7 +7827,7 @@ ], "responses": { "200": { - "description": "The member was successfully created", + "description": "", "content": { "application/json": { "schema": { @@ -7398,7 +7857,45 @@ } }, "400": { - "description": "Failed to create the member", + "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": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "424": { + "description": "", "content": { "application/json": { "schema": { @@ -7600,6 +8097,49 @@ } } } + }, + "424": { + "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", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } } } }, @@ -7711,13 +8251,41 @@ }, "data": { "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "string" - } + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "424": { + "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", + "additionalProperties": { + "type": "string" } } } @@ -7762,7 +8330,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -7896,7 +8464,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -8056,7 +8624,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -8151,16 +8719,6 @@ } } } - }, - "500": { - "description": "", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } } } }, @@ -8195,7 +8753,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -8298,10 +8856,337 @@ } } }, - "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/user-share": { + "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/user-share": { + "post": { + "operationId": "api-create-user-share", + "summary": "Create a user share", + "tags": [ + "Sharing" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "userId" + ], + "properties": { + "userId": { + "type": "string" + }, + "accessLevel": { + "type": "integer", + "format": "int64", + "default": 2 + }, + "manuallyAdded": { + "type": "boolean", + "default": true + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "projectId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "The user share was successfully created", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/UserShare" + } + } + } + } + } + } + } + }, + "400": { + "description": "Failed to create the user share", + "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" + } + } + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/user-share/{shId}": { + "delete": { + "operationId": "api-delete-user-share", + "summary": "Delete a user share", + "tags": [ + "Sharing" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1" + ], + "default": "v1" + } + }, + { + "name": "projectId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "The user share was successfully deleted", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } + }, + "400": { + "description": "Failed to delete the user share", + "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": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "401": { + "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": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/group-share": { "post": { - "operationId": "api-create-user-share", - "summary": "Create a user share", + "operationId": "api-create-group-share", + "summary": "Create a group share", "tags": [ "Sharing" ], @@ -8320,20 +9205,16 @@ "schema": { "type": "object", "required": [ - "userId", - "accessLevel" + "groupId" ], "properties": { - "userId": { + "groupId": { "type": "string" }, "accessLevel": { "type": "integer", - "format": "int64" - }, - "manuallyAdded": { - "type": "boolean", - "default": true + "format": "int64", + "default": 2 } } } @@ -8374,7 +9255,7 @@ ], "responses": { "200": { - "description": "The user share was successfully created", + "description": "The group share was successfully created", "content": { "application/json": { "schema": { @@ -8394,7 +9275,7 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "$ref": "#/components/schemas/UserShare" + "$ref": "#/components/schemas/GroupShare" } } } @@ -8404,7 +9285,7 @@ } }, "400": { - "description": "Failed to create the user share", + "description": "Failed to create the group share", "content": { "application/json": { "schema": { @@ -8449,10 +9330,10 @@ } } }, - "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/user-share/{shId}": { + "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/group-share/{shId}": { "delete": { - "operationId": "api-delete-user-share", - "summary": "Delete a user share", + "operationId": "api-delete-group-share", + "summary": "Delete a group share", "tags": [ "Sharing" ], @@ -8507,7 +9388,7 @@ ], "responses": { "200": { - "description": "The user share was successfully deleted", + "description": "The group share was successfully deleted", "content": { "application/json": { "schema": { @@ -8537,7 +9418,7 @@ } }, "400": { - "description": "Failed to delete the user share", + "description": "Failed to delete the group share", "content": { "application/json": { "schema": { @@ -8625,10 +9506,10 @@ } } }, - "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/group-share": { + "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/circle-share": { "post": { - "operationId": "api-create-group-share", - "summary": "Create a group share", + "operationId": "api-create-circle-share", + "summary": "Create a circle share", "tags": [ "Sharing" ], @@ -8647,16 +9528,16 @@ "schema": { "type": "object", "required": [ - "groupId", - "accessLevel" + "circleId" ], "properties": { - "groupId": { + "circleId": { "type": "string" }, "accessLevel": { "type": "integer", - "format": "int64" + "format": "int64", + "default": 2 } } } @@ -8697,7 +9578,7 @@ ], "responses": { "200": { - "description": "The group share was successfully created", + "description": "The circle share was successfully created", "content": { "application/json": { "schema": { @@ -8717,7 +9598,7 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "$ref": "#/components/schemas/GroupShare" + "$ref": "#/components/schemas/CircleShare" } } } @@ -8727,7 +9608,7 @@ } }, "400": { - "description": "Failed to create the group share", + "description": "Failed to create the circle share", "content": { "application/json": { "schema": { @@ -8772,10 +9653,10 @@ } } }, - "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/group-share/{shId}": { + "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/circle-share/{shId}": { "delete": { - "operationId": "api-delete-group-share", - "summary": "Delete a group share", + "operationId": "api-delete-circle-share", + "summary": "Delete a circle share", "tags": [ "Sharing" ], @@ -8830,7 +9711,7 @@ ], "responses": { "200": { - "description": "The group share was successfully deleted", + "description": "The circle share was successfully deleted", "content": { "application/json": { "schema": { @@ -8860,7 +9741,7 @@ } }, "400": { - "description": "Failed to delete the group share", + "description": "Failed to delete the circle share", "content": { "application/json": { "schema": { @@ -8948,10 +9829,10 @@ } } }, - "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/circle-share": { + "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/public-share": { "post": { - "operationId": "api-create-circle-share", - "summary": "Create a circle share", + "operationId": "api-create-public-share", + "summary": "Create a public share link", "tags": [ "Sharing" ], @@ -8964,22 +9845,24 @@ } ], "requestBody": { - "required": true, + "required": false, "content": { "application/json": { "schema": { "type": "object", - "required": [ - "circleId", - "accessLevel" - ], "properties": { - "circleId": { - "type": "string" + "label": { + "type": "string", + "nullable": true + }, + "password": { + "type": "string", + "nullable": true }, "accessLevel": { "type": "integer", - "format": "int64" + "format": "int64", + "default": 2 } } } @@ -9020,37 +9903,7 @@ ], "responses": { "200": { - "description": "The circle share was successfully created", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "$ref": "#/components/schemas/CircleShare" - } - } - } - } - } - } - } - }, - "400": { - "description": "Failed to create the circle share", + "description": "The public share was successfully created", "content": { "application/json": { "schema": { @@ -9070,10 +9923,7 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "object", - "additionalProperties": { - "type": "string" - } + "$ref": "#/components/schemas/PublicShare" } } } @@ -9095,10 +9945,10 @@ } } }, - "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/circle-share/{shId}": { + "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/public-share/{shId}": { "delete": { - "operationId": "api-delete-circle-share", - "summary": "Delete a circle share", + "operationId": "api-delete-public-share", + "summary": "Delete a public share link", "tags": [ "Sharing" ], @@ -9153,7 +10003,7 @@ ], "responses": { "200": { - "description": "The circle share was successfully deleted", + "description": "The public share was successfully deleted", "content": { "application/json": { "schema": { @@ -9183,7 +10033,7 @@ } }, "400": { - "description": "Failed to delete the circle share", + "description": "Failed to delete the public share", "content": { "application/json": { "schema": { @@ -9271,10 +10121,10 @@ } } }, - "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/public-share": { + "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/federated-share": { "post": { - "operationId": "api-create-public-share", - "summary": "Create a public share link", + "operationId": "api-create-federated-share", + "summary": "Create a federated user share", "tags": [ "Sharing" ], @@ -9293,20 +10143,20 @@ "schema": { "type": "object", "required": [ - "accessLevel" + "userCloudId" ], "properties": { - "label": { - "type": "string", - "nullable": true - }, - "password": { - "type": "string", - "nullable": true + "userCloudId": { + "type": "string" }, "accessLevel": { "type": "integer", - "format": "int64" + "format": "int64", + "default": 2 + }, + "manuallyAdded": { + "type": "boolean", + "default": true } } } @@ -9347,7 +10197,7 @@ ], "responses": { "200": { - "description": "The public share was successfully created", + "description": "The federated share was successfully created", "content": { "application/json": { "schema": { @@ -9367,7 +10217,45 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "$ref": "#/components/schemas/PublicShare" + "$ref": "#/components/schemas/UserShare" + } + } + } + } + } + } + } + }, + "400": { + "description": "Failed to create the federated share", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + } } } } @@ -9389,10 +10277,10 @@ } } }, - "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/public-share/{shId}": { + "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/federated-share/{shId}": { "delete": { - "operationId": "api-delete-public-share", - "summary": "Delete a public share link", + "operationId": "api-delete-federated-share", + "summary": "Delete a federated share (unshare)", "tags": [ "Sharing" ], @@ -9447,7 +10335,7 @@ ], "responses": { "200": { - "description": "The public share was successfully deleted", + "description": "The federated share was successfully deleted", "content": { "application/json": { "schema": { @@ -9477,7 +10365,7 @@ } }, "400": { - "description": "Failed to delete the public share", + "description": "Failed to delete the user share", "content": { "application/json": { "schema": { @@ -9949,6 +10837,44 @@ } } }, + "424": { + "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": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, "500": { "description": "", "content": { @@ -10030,11 +10956,42 @@ "type": "boolean", "default": true } - } - ], - "responses": { - "200": { - "description": "The currency was successfully created", + } + ], + "responses": { + "200": { + "description": "The currency was successfully created", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "integer", + "format": "int64" + } + } + } + } + } + } + } + }, + "424": { + "description": "", "content": { "application/json": { "schema": { @@ -10054,8 +11011,10 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "integer", - "format": "int64" + "type": "object", + "additionalProperties": { + "type": "string" + } } } } @@ -10220,12 +11179,68 @@ } } }, - "500": { + "404": { "description": "", "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "424": { + "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", + "additionalProperties": { + "type": "string" + } + } + } + } + } } } } @@ -10235,6 +11250,7 @@ "delete": { "operationId": "api-delete-currency", "summary": "Delete a currency", + "description": "* @throws MultipleObjectsReturnedException", "tags": [ "Currencies" ], @@ -10351,6 +11367,39 @@ } } }, + "424": { + "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", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + } + } + }, "500": { "description": "", "content": { @@ -10419,7 +11468,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -10473,12 +11522,35 @@ } } }, - "500": { + "400": { "description": "", "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } } } } @@ -10541,7 +11613,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -10636,6 +11708,72 @@ } } }, + "404": { + "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", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "400": { + "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", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + } + } + }, "500": { "description": "", "content": { @@ -10679,7 +11817,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -10773,16 +11911,6 @@ } } } - }, - "500": { - "description": "", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } } } } @@ -10855,20 +11983,51 @@ "type": "string" } }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Payment mode was successfully created", + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Payment mode was successfully created", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "integer", + "format": "int64" + } + } + } + } + } + } + } + }, + "424": { + "description": "", "content": { "application/json": { "schema": { @@ -10888,8 +12047,10 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "integer", - "format": "int64" + "type": "object", + "additionalProperties": { + "type": "string" + } } } } @@ -11044,6 +12205,49 @@ } } } + }, + "424": { + "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", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } } } }, @@ -11133,8 +12337,8 @@ } } }, - "400": { - "description": "Failed to delete the payment mode", + "424": { + "description": "", "content": { "application/json": { "schema": { @@ -11293,8 +12497,8 @@ } } }, - "400": { - "description": "Failed to save the payment mode order", + "424": { + "description": "", "content": { "application/json": { "schema": { @@ -11314,7 +12518,10 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "string" + "type": "object", + "additionalProperties": { + "type": "string" + } } } } @@ -11322,6 +12529,16 @@ } } } + }, + "500": { + "description": "", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } } } } @@ -11390,7 +12607,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -11513,7 +12730,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -11641,7 +12858,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -11736,16 +12953,6 @@ } } } - }, - "500": { - "description": "", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } } } } @@ -11817,7 +13024,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -11870,32 +13077,12 @@ } } }, - "403": { + "500": { "description": "", "content": { - "application/json": { + "text/plain": { "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "string" - } - } - } - } + "type": "string" } } } @@ -12013,6 +13200,49 @@ } } } + }, + "424": { + "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", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } } } } @@ -12161,6 +13391,39 @@ } } }, + "424": { + "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", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + } + } + }, "500": { "description": "", "content": { @@ -12259,8 +13522,8 @@ } } }, - "400": { - "description": "Failed to delete the category", + "424": { + "description": "", "content": { "application/json": { "schema": { @@ -12421,8 +13684,8 @@ } } }, - "400": { - "description": "Failed to save the category order", + "424": { + "description": "", "content": { "application/json": { "schema": { @@ -12442,10 +13705,10 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "boolean", - "enum": [ - false - ] + "type": "object", + "additionalProperties": { + "type": "string" + } } } } @@ -12531,7 +13794,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -12584,6 +13847,16 @@ } } } + }, + "500": { + "description": "", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } } } } @@ -12644,7 +13917,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -12738,16 +14011,6 @@ } } } - }, - "500": { - "description": "", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } } } }, @@ -12783,7 +14046,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -12879,16 +14142,6 @@ } } } - }, - "500": { - "description": "", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } } } } @@ -12962,7 +14215,7 @@ "required": true, "schema": { "type": "string", - "pattern": "^[a-z0-9]{4,64}$" + "pattern": "^[a-zA-Z0-9]{4,64}$" } }, { @@ -13015,8 +14268,8 @@ } } }, - "403": { - "description": "Not saved", + "400": { + "description": "", "content": { "application/json": { "schema": { @@ -13036,7 +14289,10 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "type": "string" + "type": "object", + "additionalProperties": { + "type": "string" + } } } } @@ -13044,16 +14300,6 @@ } } } - }, - "500": { - "description": "", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } } } }