2023-03-15 12:29:32 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
/**
|
2024-05-27 04:08:53 -04:00
|
|
|
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2023-03-15 12:29:32 -04:00
|
|
|
*/
|
|
|
|
|
|
2024-05-26 06:51:24 -04:00
|
|
|
namespace OC\Core;
|
2023-03-15 12:29:32 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @psalm-type CoreLoginFlowV2Credentials = array{
|
|
|
|
|
* server: string,
|
|
|
|
|
* loginName: string,
|
|
|
|
|
* appPassword: string,
|
|
|
|
|
* }
|
|
|
|
|
*
|
|
|
|
|
* @psalm-type CoreLoginFlowV2 = array{
|
|
|
|
|
* poll: array{
|
|
|
|
|
* token: string,
|
|
|
|
|
* endpoint: string,
|
|
|
|
|
* },
|
|
|
|
|
* login: string,
|
|
|
|
|
* }
|
|
|
|
|
*
|
|
|
|
|
* @psalm-type CoreNavigationEntry = array{
|
|
|
|
|
* id: string,
|
2024-05-22 10:21:12 -04:00
|
|
|
* order?: int,
|
2023-03-15 12:29:32 -04:00
|
|
|
* href: string,
|
|
|
|
|
* icon: string,
|
|
|
|
|
* type: string,
|
|
|
|
|
* name: string,
|
2024-05-22 10:21:12 -04:00
|
|
|
* app?: string,
|
|
|
|
|
* default?: bool,
|
2023-03-15 12:29:32 -04:00
|
|
|
* active: bool,
|
|
|
|
|
* classes: string,
|
|
|
|
|
* unread: int,
|
|
|
|
|
* }
|
|
|
|
|
*
|
|
|
|
|
* @psalm-type CoreContactsAction = array{
|
|
|
|
|
* title: string,
|
|
|
|
|
* icon: string,
|
|
|
|
|
* hyperlink: string,
|
|
|
|
|
* appId: string,
|
|
|
|
|
* }
|
|
|
|
|
*
|
|
|
|
|
* @psalm-type CoreOpenGraphObject = array{
|
2023-09-14 06:26:14 -04:00
|
|
|
* id: string,
|
|
|
|
|
* name: string,
|
|
|
|
|
* description: ?string,
|
|
|
|
|
* thumb: ?string,
|
|
|
|
|
* link: string,
|
|
|
|
|
* }
|
|
|
|
|
*
|
|
|
|
|
* @psalm-type CoreResource = array{
|
2023-03-15 12:29:32 -04:00
|
|
|
* richObjectType: string,
|
2024-06-02 17:41:06 -04:00
|
|
|
* richObject: array<string, ?mixed>,
|
2023-09-14 06:26:14 -04:00
|
|
|
* openGraphObject: CoreOpenGraphObject,
|
2023-03-15 12:29:32 -04:00
|
|
|
* accessible: bool,
|
|
|
|
|
* }
|
|
|
|
|
*
|
|
|
|
|
* @psalm-type CoreCollection = array{
|
|
|
|
|
* id: int,
|
|
|
|
|
* name: string,
|
2024-09-24 09:53:13 -04:00
|
|
|
* resources: list<CoreResource>,
|
2023-03-15 12:29:32 -04:00
|
|
|
* }
|
|
|
|
|
*
|
|
|
|
|
* @psalm-type CoreReference = array{
|
|
|
|
|
* richObjectType: string,
|
2024-06-02 17:41:06 -04:00
|
|
|
* richObject: array<string, ?mixed>,
|
2023-03-15 12:29:32 -04:00
|
|
|
* openGraphObject: CoreOpenGraphObject,
|
|
|
|
|
* accessible: bool,
|
|
|
|
|
* }
|
|
|
|
|
*
|
|
|
|
|
* @psalm-type CoreReferenceProvider = array{
|
|
|
|
|
* id: string,
|
|
|
|
|
* title: string,
|
|
|
|
|
* icon_url: string,
|
|
|
|
|
* order: int,
|
2024-09-24 09:53:13 -04:00
|
|
|
* search_providers_ids: ?list<string>,
|
2023-03-15 12:29:32 -04:00
|
|
|
* }
|
|
|
|
|
*
|
|
|
|
|
* @psalm-type CoreUnifiedSearchProvider = array{
|
|
|
|
|
* id: string,
|
2023-11-06 09:32:52 -05:00
|
|
|
* appId: string,
|
2023-03-15 12:29:32 -04:00
|
|
|
* name: string,
|
2023-11-06 09:32:52 -05:00
|
|
|
* icon: string,
|
2023-03-15 12:29:32 -04:00
|
|
|
* order: int,
|
2025-07-17 12:03:09 -04:00
|
|
|
* isExternalProvider: bool,
|
2024-09-24 09:53:13 -04:00
|
|
|
* triggers: list<string>,
|
2023-11-06 09:32:52 -05:00
|
|
|
* filters: array<string, string>,
|
2023-11-13 10:31:15 -05:00
|
|
|
* inAppSearch: bool,
|
2023-03-15 12:29:32 -04:00
|
|
|
* }
|
|
|
|
|
*
|
|
|
|
|
* @psalm-type CoreUnifiedSearchResultEntry = array{
|
|
|
|
|
* thumbnailUrl: string,
|
|
|
|
|
* title: string,
|
|
|
|
|
* subline: string,
|
|
|
|
|
* resourceUrl: string,
|
|
|
|
|
* icon: string,
|
|
|
|
|
* rounded: bool,
|
2024-09-24 09:53:13 -04:00
|
|
|
* attributes: list<string>,
|
2023-03-15 12:29:32 -04:00
|
|
|
* }
|
|
|
|
|
*
|
|
|
|
|
* @psalm-type CoreUnifiedSearchResult = array{
|
|
|
|
|
* name: string,
|
|
|
|
|
* isPaginated: bool,
|
2024-09-24 09:53:13 -04:00
|
|
|
* entries: list<CoreUnifiedSearchResultEntry>,
|
2023-03-15 12:29:32 -04:00
|
|
|
* cursor: int|string|null,
|
|
|
|
|
* }
|
|
|
|
|
*
|
|
|
|
|
* @psalm-type CoreAutocompleteResult = array{
|
|
|
|
|
* id: string,
|
|
|
|
|
* label: string,
|
|
|
|
|
* icon: string,
|
|
|
|
|
* source: string,
|
2023-09-27 10:38:21 -04:00
|
|
|
* status: array{
|
|
|
|
|
* status: string,
|
|
|
|
|
* message: ?string,
|
|
|
|
|
* icon: ?string,
|
|
|
|
|
* clearAt: ?int,
|
|
|
|
|
* }|string,
|
2023-03-15 12:29:32 -04:00
|
|
|
* subline: string,
|
|
|
|
|
* shareWithDisplayNameUnique: string,
|
|
|
|
|
* }
|
2023-07-31 05:58:54 -04:00
|
|
|
*
|
|
|
|
|
* @psalm-type CoreTextProcessingTask = array{
|
|
|
|
|
* id: ?int,
|
|
|
|
|
* type: string,
|
|
|
|
|
* status: 0|1|2|3|4,
|
|
|
|
|
* userId: ?string,
|
|
|
|
|
* appId: string,
|
|
|
|
|
* input: string,
|
|
|
|
|
* output: ?string,
|
|
|
|
|
* identifier: string,
|
2023-11-03 11:22:54 -04:00
|
|
|
* completionExpectedAt: ?int
|
2023-07-31 05:58:54 -04:00
|
|
|
* }
|
2023-09-07 06:37:09 -04:00
|
|
|
*
|
|
|
|
|
* @psalm-type CoreTextToImageTask = array{
|
|
|
|
|
* id: ?int,
|
|
|
|
|
* status: 0|1|2|3|4,
|
|
|
|
|
* userId: ?string,
|
|
|
|
|
* appId: string,
|
|
|
|
|
* input: string,
|
2023-10-18 07:33:04 -04:00
|
|
|
* identifier: ?string,
|
2023-10-20 07:54:36 -04:00
|
|
|
* numberOfImages: int,
|
2023-10-22 06:20:29 -04:00
|
|
|
* completionExpectedAt: ?int,
|
2023-09-07 06:37:09 -04:00
|
|
|
* }
|
2024-02-26 10:30:16 -05:00
|
|
|
*
|
|
|
|
|
* @psalm-type CoreTeam = array{
|
2025-10-13 07:55:05 -04:00
|
|
|
* teamId: string,
|
|
|
|
|
* displayName: string,
|
|
|
|
|
* link: ?string,
|
2024-02-26 10:30:16 -05:00
|
|
|
* }
|
|
|
|
|
*
|
|
|
|
|
* @psalm-type CoreTeamResource = array{
|
2025-10-13 07:55:05 -04:00
|
|
|
* id: string,
|
|
|
|
|
* label: string,
|
|
|
|
|
* url: string,
|
|
|
|
|
* iconSvg: ?string,
|
|
|
|
|
* iconURL: ?string,
|
|
|
|
|
* iconEmoji: ?string,
|
|
|
|
|
* provider: array{
|
|
|
|
|
* id: string,
|
|
|
|
|
* name: string,
|
|
|
|
|
* icon: string,
|
|
|
|
|
* },
|
|
|
|
|
* }
|
|
|
|
|
*
|
|
|
|
|
* @psalm-type CoreTeamWithResources = CoreTeam&array{
|
|
|
|
|
* resources: list<CoreTeamResource>,
|
|
|
|
|
* }
|
2024-04-30 11:02:38 -04:00
|
|
|
*
|
|
|
|
|
* @psalm-type CoreTaskProcessingShape = array{
|
|
|
|
|
* name: string,
|
|
|
|
|
* description: string,
|
2024-07-24 09:34:51 -04:00
|
|
|
* type: "Number"|"Text"|"Audio"|"Image"|"Video"|"File"|"Enum"|"ListOfNumbers"|"ListOfTexts"|"ListOfImages"|"ListOfAudios"|"ListOfVideos"|"ListOfFiles",
|
2024-04-30 11:02:38 -04:00
|
|
|
* }
|
|
|
|
|
*
|
|
|
|
|
* @psalm-type CoreTaskProcessingTaskType = array{
|
|
|
|
|
* name: string,
|
|
|
|
|
* description: string,
|
2025-01-08 10:35:43 -05:00
|
|
|
* inputShape: array<string, CoreTaskProcessingShape>,
|
|
|
|
|
* inputShapeEnumValues: array<string, list<array{name: string, value: string}>>,
|
2024-07-24 10:01:01 -04:00
|
|
|
* inputShapeDefaults: array<string, numeric|string>,
|
2025-01-08 10:35:43 -05:00
|
|
|
* optionalInputShape: array<string, CoreTaskProcessingShape>,
|
|
|
|
|
* optionalInputShapeEnumValues: array<string, list<array{name: string, value: string}>>,
|
2024-07-24 10:01:01 -04:00
|
|
|
* optionalInputShapeDefaults: array<string, numeric|string>,
|
2025-01-08 10:35:43 -05:00
|
|
|
* 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}>>,
|
2024-04-30 11:02:38 -04:00
|
|
|
* }
|
|
|
|
|
*
|
2024-05-14 04:01:09 -04:00
|
|
|
* @psalm-type CoreTaskProcessingIO = array<string, numeric|list<numeric>|string|list<string>>
|
|
|
|
|
*
|
2024-04-30 11:02:38 -04:00
|
|
|
* @psalm-type CoreTaskProcessingTask = array{
|
2024-05-06 07:03:03 -04:00
|
|
|
* id: int,
|
2024-05-15 03:30:05 -04:00
|
|
|
* lastUpdated: int,
|
2024-05-06 03:21:09 -04:00
|
|
|
* type: string,
|
2024-05-06 10:36:35 -04:00
|
|
|
* status: 'STATUS_CANCELLED'|'STATUS_FAILED'|'STATUS_SUCCESSFUL'|'STATUS_RUNNING'|'STATUS_SCHEDULED'|'STATUS_UNKNOWN',
|
2024-04-30 11:02:38 -04:00
|
|
|
* userId: ?string,
|
|
|
|
|
* appId: string,
|
2024-05-14 04:01:09 -04:00
|
|
|
* input: CoreTaskProcessingIO,
|
|
|
|
|
* output: null|CoreTaskProcessingIO,
|
2024-05-07 06:46:21 -04:00
|
|
|
* customId: ?string,
|
2024-04-30 11:02:38 -04:00
|
|
|
* completionExpectedAt: ?int,
|
2024-09-24 09:53:13 -04:00
|
|
|
* progress: ?float,
|
|
|
|
|
* scheduledAt: ?int,
|
|
|
|
|
* startedAt: ?int,
|
|
|
|
|
* endedAt: ?int,
|
2025-08-07 04:57:39 -04:00
|
|
|
* allowCleanup: bool,
|
2024-04-30 11:02:38 -04:00
|
|
|
* }
|
|
|
|
|
*
|
2025-04-23 04:16:06 -04:00
|
|
|
* @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,
|
|
|
|
|
* }
|
|
|
|
|
*
|
2023-03-15 12:29:32 -04:00
|
|
|
*/
|
|
|
|
|
class ResponseDefinitions {
|
|
|
|
|
}
|