aboutsummaryrefslogtreecommitdiffstats
path: root/core/ResponseDefinitions.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/ResponseDefinitions.php')
-rw-r--r--core/ResponseDefinitions.php110
1 files changed, 82 insertions, 28 deletions
diff --git a/core/ResponseDefinitions.php b/core/ResponseDefinitions.php
index 4a79c3ad3ec..4bf1112a482 100644
--- a/core/ResponseDefinitions.php
+++ b/core/ResponseDefinitions.php
@@ -3,28 +3,11 @@
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2023 Kate Döen <kate.doeen@nextcloud.com>
- *
- * @author Kate Döen <kate.doeen@nextcloud.com>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
-namespace OCA\Core;
+namespace OC\Core;
/**
* @psalm-type CoreLoginFlowV2Credentials = array{
@@ -43,11 +26,13 @@ namespace OCA\Core;
*
* @psalm-type CoreNavigationEntry = array{
* id: string,
- * order: int|string,
+ * order?: int,
* href: string,
* icon: string,
* type: string,
* name: string,
+ * app?: string,
+ * default?: bool,
* active: bool,
* classes: string,
* unread: int,
@@ -70,7 +55,7 @@ namespace OCA\Core;
*
* @psalm-type CoreResource = array{
* richObjectType: string,
- * richObject: array<string, mixed>,
+ * richObject: array<string, ?mixed>,
* openGraphObject: CoreOpenGraphObject,
* accessible: bool,
* }
@@ -78,12 +63,12 @@ namespace OCA\Core;
* @psalm-type CoreCollection = array{
* id: int,
* name: string,
- * resources: CoreResource[],
+ * resources: list<CoreResource>,
* }
*
* @psalm-type CoreReference = array{
* richObjectType: string,
- * richObject: array<string, mixed>,
+ * richObject: array<string, ?mixed>,
* openGraphObject: CoreOpenGraphObject,
* accessible: bool,
* }
@@ -93,7 +78,7 @@ namespace OCA\Core;
* title: string,
* icon_url: string,
* order: int,
- * search_providers_ids: ?string[]
+ * search_providers_ids: ?list<string>,
* }
*
* @psalm-type CoreUnifiedSearchProvider = array{
@@ -102,7 +87,8 @@ namespace OCA\Core;
* name: string,
* icon: string,
* order: int,
- * triggers: string[],
+ * isExternalProvider: bool,
+ * triggers: list<string>,
* filters: array<string, string>,
* inAppSearch: bool,
* }
@@ -114,13 +100,13 @@ namespace OCA\Core;
* resourceUrl: string,
* icon: string,
* rounded: bool,
- * attributes: string[],
+ * attributes: list<string>,
* }
*
* @psalm-type CoreUnifiedSearchResult = array{
* name: string,
* isPaginated: bool,
- * entries: CoreUnifiedSearchResultEntry[],
+ * entries: list<CoreUnifiedSearchResultEntry>,
* cursor: int|string|null,
* }
*
@@ -176,6 +162,74 @@ namespace OCA\Core;
* iconURL: ?string,
* iconEmoji: ?string,
* }
+ *
+ * @psalm-type CoreTaskProcessingShape = array{
+ * name: string,
+ * description: string,
+ * type: "Number"|"Text"|"Audio"|"Image"|"Video"|"File"|"Enum"|"ListOfNumbers"|"ListOfTexts"|"ListOfImages"|"ListOfAudios"|"ListOfVideos"|"ListOfFiles",
+ * }
+ *
+ * @psalm-type CoreTaskProcessingTaskType = array{
+ * name: string,
+ * description: string,
+ * inputShape: array<string, CoreTaskProcessingShape>,
+ * inputShapeEnumValues: array<string, list<array{name: string, value: string}>>,
+ * inputShapeDefaults: array<string, numeric|string>,
+ * optionalInputShape: array<string, CoreTaskProcessingShape>,
+ * optionalInputShapeEnumValues: array<string, list<array{name: string, value: string}>>,
+ * optionalInputShapeDefaults: array<string, numeric|string>,
+ * outputShape: array<string, CoreTaskProcessingShape>,
+ * outputShapeEnumValues: array<string, list<array{name: string, value: string}>>,
+ * optionalOutputShape: array<string, CoreTaskProcessingShape>,
+ * optionalOutputShapeEnumValues: array<string, list<array{name: string, value: string}>>,
+ * }
+ *
+ * @psalm-type CoreTaskProcessingIO = array<string, numeric|list<numeric>|string|list<string>>
+ *
+ * @psalm-type CoreTaskProcessingTask = array{
+ * id: int,
+ * lastUpdated: int,
+ * type: string,
+ * status: 'STATUS_CANCELLED'|'STATUS_FAILED'|'STATUS_SUCCESSFUL'|'STATUS_RUNNING'|'STATUS_SCHEDULED'|'STATUS_UNKNOWN',
+ * userId: ?string,
+ * appId: string,
+ * input: CoreTaskProcessingIO,
+ * output: null|CoreTaskProcessingIO,
+ * customId: ?string,
+ * completionExpectedAt: ?int,
+ * progress: ?float,
+ * scheduledAt: ?int,
+ * startedAt: ?int,
+ * endedAt: ?int,
+ * }
+ *
+ * @psalm-type CoreProfileAction = array{
+ * id: string,
+ * icon: string,
+ * title: string,
+ * target: ?string,
+ * }
+ *
+ * @psalm-type CoreProfileFields = array{
+ * userId: string,
+ * address?: string|null,
+ * biography?: string|null,
+ * displayname?: string|null,
+ * headline?: string|null,
+ * isUserAvatarVisible?: bool,
+ * organisation?: string|null,
+ * pronouns?: string|null,
+ * role?: string|null,
+ * actions: list<CoreProfileAction>,
+ * }
+ *
+ * @psalm-type CoreProfileData = CoreProfileFields&array{
+ * // Timezone identifier like Europe/Berlin or America/North_Dakota/Beulah
+ * timezone: string,
+ * // Offset in seconds, negative when behind UTC, positive otherwise
+ * timezoneOffset: int,
+ * }
+ *
*/
class ResponseDefinitions {
}