Preserve partial creation replies on stream failure
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
kdletters
2026-05-05 11:31:50 +08:00
parent 100fee7e7a
commit 995661e7cc
299 changed files with 13805 additions and 1429 deletions

View File

@@ -0,0 +1,50 @@
/**
* 方洞挑战作品读写共享契约。
* 作品字段只表达结果页可编辑信息;运行规则真相由后端 runtime 快照负责。
*/
export type SquareHoleWorkPublicationStatus = 'draft' | 'published' | string;
export interface PutSquareHoleWorkRequest {
gameName: string;
themeText?: string;
twistRule: string;
summary: string;
tags: string[];
coverImageSrc?: string | null;
shapeCount: number;
difficulty: number;
}
export interface SquareHoleWorkSummary {
workId: string;
profileId: string;
ownerUserId: string;
sourceSessionId?: string | null;
gameName: string;
themeText: string;
twistRule: string;
summary: string;
tags: string[];
coverImageSrc?: string | null;
shapeCount: number;
difficulty: number;
publicationStatus: SquareHoleWorkPublicationStatus;
playCount: number;
updatedAt: string;
publishedAt?: string | null;
publishReady: boolean;
}
export interface SquareHoleWorkProfile extends SquareHoleWorkSummary {}
export interface SquareHoleWorksResponse {
items: SquareHoleWorkSummary[];
}
export interface SquareHoleWorkDetailResponse {
item: SquareHoleWorkProfile;
}
export interface SquareHoleWorkMutationResponse {
item: SquareHoleWorkProfile;
}