diff --git a/src/components/ProjectFiles.tsx b/src/components/ProjectFiles.tsx
index e9d8ce2..a827431 100644
--- a/src/components/ProjectFiles.tsx
+++ b/src/components/ProjectFiles.tsx
@@ -225,7 +225,7 @@ export default function ProjectFiles({ project }: Props) {
{/* Uploader */}
- {f.uploader?.name}
+ {f.uploaded_by?.name}
{/* Date */}
diff --git a/src/lib/api.ts b/src/lib/api.ts
index ed66c26..c8e1ad8 100644
--- a/src/lib/api.ts
+++ b/src/lib/api.ts
@@ -44,6 +44,14 @@ async function request(path: string, options: RequestInit = {}): Promis
// --- Types ---
+// --- Shared types (1:1 with backend Pydantic schemas) ---
+
+export interface MemberBrief {
+ id: string;
+ slug: string;
+ name: string;
+}
+
export interface AgentConfig {
capabilities: string[];
chat_listen: string;
@@ -60,6 +68,7 @@ export interface Member {
role: string;
status: string;
avatar_url: string | null;
+ is_active: boolean;
agent_config: AgentConfig | null;
token?: string | null;
}
@@ -84,14 +93,16 @@ export interface ProjectMember {
name: string;
slug: string;
type: "human" | "agent";
- role: string; // "owner" | "member"
+ role: string;
}
export interface Step {
id: string;
+ task_id: string;
title: string;
done: boolean;
position: number;
+ created_at: string;
}
export interface Task {
@@ -107,14 +118,16 @@ export interface Task {
priority: string;
labels: string[];
assignee_id: string | null;
- assignee: Member | null;
+ assignee: MemberBrief | null;
reviewer_id: string | null;
- reviewer: Member | null;
+ reviewer: MemberBrief | null;
watcher_ids: string[];
depends_on: string[];
position: number;
time_spent: number;
steps: Step[];
+ created_at: string;
+ updated_at: string;
}
export interface Attachment {
@@ -130,8 +143,8 @@ export interface Message {
task_id: string | null;
parent_id: string | null;
author_type: string;
- author_id: string;
- author: Member | null;
+ author_id: string | null;
+ author: MemberBrief | null;
content: string;
mentions: string[];
voice_url: string | null;
@@ -306,13 +319,11 @@ export async function revokeToken(slug: string): Promise {
export interface ProjectFile {
id: string;
- project_id: string;
filename: string;
description: string | null;
mime_type: string | null;
size: number;
- uploaded_by: string;
- uploader: { id: string; slug: string; name: string } | null;
+ uploaded_by: MemberBrief | null;
created_at: string;
updated_at: string;
}