81 lines
2.0 KiB
TypeScript
81 lines
2.0 KiB
TypeScript
/**
|
|
* 方洞挑战作品读写共享契约。
|
|
* 作品字段只表达结果页可编辑信息;运行规则真相由后端 runtime 快照负责。
|
|
*/
|
|
export type SquareHoleWorkPublicationStatus = 'draft' | 'published' | string;
|
|
|
|
export interface SquareHoleShapeOption {
|
|
optionId: string;
|
|
shapeKind: string;
|
|
label: string;
|
|
targetHoleId: string;
|
|
imagePrompt: string;
|
|
imageSrc?: string | null;
|
|
}
|
|
|
|
export interface SquareHoleHoleOption {
|
|
holeId: string;
|
|
holeKind: string;
|
|
label: string;
|
|
imagePrompt: string;
|
|
imageSrc?: string | null;
|
|
}
|
|
|
|
export interface PutSquareHoleWorkRequest {
|
|
gameName: string;
|
|
themeText?: string;
|
|
twistRule: string;
|
|
summary: string;
|
|
tags: string[];
|
|
coverImageSrc?: string | null;
|
|
backgroundPrompt?: string;
|
|
backgroundImageSrc?: string | null;
|
|
shapeOptions?: SquareHoleShapeOption[];
|
|
holeOptions?: SquareHoleHoleOption[];
|
|
shapeCount: number;
|
|
difficulty: number;
|
|
}
|
|
|
|
export interface RegenerateSquareHoleWorkImageRequest {
|
|
visualAssetSlot: 'cover' | 'background' | 'shape' | 'hole' | string;
|
|
visualAssetOptionId?: string | null;
|
|
}
|
|
|
|
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;
|
|
backgroundPrompt: string;
|
|
backgroundImageSrc?: string | null;
|
|
shapeOptions: SquareHoleShapeOption[];
|
|
holeOptions: SquareHoleHoleOption[];
|
|
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;
|
|
}
|