feat(canvas): add shared workspace access and controls

This commit is contained in:
2026-07-10 14:47:19 +08:00
parent f288eb1365
commit 14eaece0ac
18 changed files with 1149 additions and 80 deletions
+54
View File
@@ -85,6 +85,60 @@ export type Project = ProjectSummary & {
messages: AgentMessage[];
};
export type SharePermission = "private" | "canvas" | "viewer" | "editor" | "owner";
export type ShareCapabilities = {
canViewCanvas: boolean;
canViewChat: boolean;
canEdit: boolean;
canManage: boolean;
};
export type ShareAccess = {
permission: Exclude<SharePermission, "private">;
source: "owner" | "member" | "link";
authenticated: boolean;
isOwner: boolean;
capabilities: ShareCapabilities;
};
export type SharePerson = {
id: string;
userId?: string;
name?: string;
identifier?: string;
avatarUrl?: string;
permission: Exclude<SharePermission, "private">;
createdAt?: string;
};
export type ShareVisitor = {
id: string;
userId?: string;
name: string;
identifier?: string;
avatarUrl?: string;
visitCount: number;
lastSeenAt: string;
};
export type ShareSettings = {
projectId: string;
shareId?: string;
linkPermission: Exclude<SharePermission, "owner">;
owner: SharePerson;
members: SharePerson[];
visitorCount: number;
updatedAt?: string;
};
export type ResolveShareResponse = {
shareId: string;
project: Project;
access: ShareAccess;
updatedAt: string;
};
export type QuickAction = {
id: string;
label: string;