Release v0.1.4

This commit is contained in:
2026-07-02 15:01:18 +02:00
parent 6d391d13bd
commit a2053518d1
13 changed files with 788 additions and 67 deletions

View File

@@ -317,8 +317,116 @@ export type FilesFolderTreeProps = {
depth?: number;
};
export type FilesOwnerType = "user" | "group";
export type FilesFileSpace = {
id: string;
label: string;
owner_type: FilesOwnerType;
owner_id: string;
description?: string | null;
};
export type FilesFileShare = {
id: string;
target_type: string;
target_id: string;
permission: string;
created_at: string;
revoked_at?: string | null;
};
export type FilesManagedFile = {
id: string;
tenant_id: string;
owner_type: FilesOwnerType;
owner_id: string;
display_path: string;
filename: string;
description?: string | null;
size_bytes: number;
content_type?: string | null;
checksum_sha256: string;
version_id: string;
created_at: string;
updated_at: string;
deleted_at?: string | null;
audit_relevant: boolean;
metadata?: Record<string, unknown> | null;
shares?: FilesFileShare[];
};
export type FilesFileFolder = {
id: string;
tenant_id: string;
owner_type: FilesOwnerType;
owner_id: string;
path: string;
created_at: string;
updated_at: string;
deleted_at?: string | null;
};
export type FilesFileSpacesResponse = { spaces: FilesFileSpace[] };
export type FilesFileListResponse = { files: FilesManagedFile[] };
export type FilesFileFoldersResponse = { folders: FilesFileFolder[] };
export type FilesPatternResolveResponse = {
patterns: { pattern: string; matches: FilesManagedFile[] }[];
unmatched: FilesManagedFile[];
};
export type FilesFileBulkShareResponse = { shares: FilesFileShare[]; shared_count: number };
export type FilesManagedFileLinkTarget = {
type: string;
id: string;
label?: string;
permission?: string;
};
export type FilesManagedFileChooserMode = "folder" | "attachment";
export type FilesManagedAttachmentChoiceMode = "file" | "pattern";
export type FilesManagedFolderSelection = {
space: FilesFileSpace;
folderPath: string;
source: string;
};
export type FilesManagedAttachmentSelection = FilesManagedFolderSelection & {
fileFilter: string;
matchCount: number;
fileIds: string[];
selectionType: FilesManagedAttachmentChoiceMode;
};
export type FilesManagedFileChooserProps = {
open: boolean;
settings: ApiSettings;
mode: FilesManagedFileChooserMode;
storageScope?: string;
source?: string;
basePath?: string;
initialPattern?: string;
rememberKey?: string;
previewContext?: Record<string, string>;
linkTarget?: FilesManagedFileLinkTarget;
renderPatternPreview?: (pattern: string, context?: Record<string, string>) => string;
onClose: () => void;
onSelectFolder?: (selection: FilesManagedFolderSelection) => void;
onSelectAttachment?: (selection: FilesManagedAttachmentSelection) => void;
};
export type FilesFileExplorerUiCapability = {
FolderTree: ComponentType<FilesFolderTreeProps>;
ManagedFileChooser?: ComponentType<FilesManagedFileChooserProps>;
listFileSpaces?: (settings: ApiSettings) => Promise<FilesFileSpacesResponse>;
listFiles?: (settings: ApiSettings, params?: { owner_type?: FilesOwnerType | string; owner_id?: string; campaign_id?: string; path_prefix?: string }) => Promise<FilesFileListResponse>;
listFolders?: (settings: ApiSettings, params: { owner_type: FilesOwnerType; owner_id: string }) => Promise<FilesFileFoldersResponse>;
resolveFilePatterns?: (
settings: ApiSettings,
payload: { patterns: string[]; owner_type?: FilesOwnerType; owner_id?: string; campaign_id?: string; path_prefix?: string; include_unmatched?: boolean; case_sensitive?: boolean }
) => Promise<FilesPatternResolveResponse>;
shareFilesWithTarget?: (settings: ApiSettings, fileIds: string[], target: FilesManagedFileLinkTarget) => Promise<FilesFileBulkShareResponse>;
};
export type PlatformFrontendRouteInfo = {