Files
nextcloud-server-mirror/apps/files/lib/ResponseDefinitions.php
John Molakvoæ 36ce3a2d19 feat(files): get files by id through the nodes API
GET /ocs/v2.php/apps/files/api/v1/nodes?ids[]= returns up to 100 files
by id with the attributes of the registered providers, the same data a
PROPFIND gives. dir keeps only the paths within a folder of the user, a
file reachable at several paths is returned once per path.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
2026-10-16 17:53:07 +02:00

92 lines
1.9 KiB
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\Files;
/**
* @psalm-type FilesTemplateFile = array{
* basename: string,
* etag: string,
* fileid: int,
* filename: ?string,
* lastmod: int,
* mime: string,
* size: int|float,
* type: string,
* hasPreview: bool,
* permissions: int,
* }
*
* @psalm-type FilesTemplateField = array{
* index: string,
* type: string,
* alias: ?string,
* tag: ?string,
* id: ?int,
* content?: string,
* checked?: bool,
* }
*
* @psalm-type FilesTemplate = array{
* templateType: string,
* templateId: string,
* basename: string,
* etag: string,
* fileid: int,
* filename: string,
* lastmod: int,
* mime: string,
* size: int|float,
* type: string,
* hasPreview: bool,
* previewUrl: ?string,
* fields: list<FilesTemplateField>,
* }
*
* @psalm-type FilesTemplateFileCreator = array{
* app: string,
* label: string,
* extension: string,
* iconClass: ?string,
* iconSvgInline: ?string,
* mimetypes: list<string>,
* ratio: ?float,
* actionLabel: string,
* }
*
* @psalm-type FilesTemplateFileCreatorWithTemplates = FilesTemplateFileCreator&array{
* templates: list<FilesTemplate>,
* }
*
* @psalm-type FilesFolderTree = list<array{
* id: int,
* basename: string,
* displayName?: string,
* children: list<array{}>,
* }>
*
* @psalm-type FilesNode = array{
* id: int,
* source: string,
* root: string,
* owner: ?string,
* mime: string,
* mtime: int,
* crtime: ?int,
* size: int|float,
* permissions: int,
* displayname: string,
* type: 'file'|'folder',
* attributes: array<string, mixed>,
* }
*
*/
class ResponseDefinitions {
}