sync: update from private repo (91d8d79c)
CI / build-and-test (push) Failing after 7m0s

This commit is contained in:
oss-sync
2026-07-09 23:57:26 +00:00
parent 63d34d7cf6
commit 2044f0a2c4
81 changed files with 3456 additions and 372 deletions
+16
View File
@@ -16,6 +16,8 @@ export interface Space {
workspaceDir: string | null;
createdAt: string;
updatedAt: string;
favorite?: boolean;
hidden?: boolean;
/** 閲覧者自身のメンバーロール。一覧(GET /spaces)・詳細(GET /spaces/:id)の両方で付与。
* 非メンバー(根オーナー含む。owner_id はメンバー行ではない)は null。 */
myRole?: SpaceMemberRole | null;
@@ -28,6 +30,20 @@ export async function fetchSpaces(): Promise<Space[]> {
return data as Space[];
}
export async function updateSpaceDisplayPrefs(
id: string,
patch: { favorite?: boolean; hidden?: boolean },
): Promise<{ favorite: boolean; hidden: boolean }> {
const res = await fetch(`${BASE}/local/spaces/${id}/display`, {
method: 'PATCH',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(patch),
});
const data = await res.json().catch(() => ({}));
if (!res.ok) throw new Error(data?.error ?? 'Failed to update workspace display settings');
return data as { favorite: boolean; hidden: boolean };
}
export type SpaceMemberRole = 'owner' | 'editor' | 'viewer';
export interface SpaceMember {