Preserve partial creation replies on stream failure
Some checks failed
CI / verify (push) Has been cancelled
Some checks failed
CI / verify (push) Has been cancelled
This commit is contained in:
50
packages/shared/src/contracts/squareHoleWorks.ts
Normal file
50
packages/shared/src/contracts/squareHoleWorks.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user