Files
Genarrative/packages/shared/src/contracts/match3dWorks.ts
T
2026-05-10 22:20:54 +08:00

74 lines
1.8 KiB
TypeScript

/**
* 抓大鹅 Match3D 作品读写共享契约。
* 首版作品发布必须补齐游戏名称、标签、封面、题材、消除次数和难度。
*/
export type Match3DWorkPublicationStatus = 'draft' | 'published' | string;
export type Match3DGeneratedItemAssetStatus =
| 'pending'
| 'image_ready'
| 'model_generating'
| 'model_ready'
| 'failed'
| string;
export interface Match3DGeneratedItemAsset {
itemId: string;
itemName: string;
imageSrc?: string | null;
imageObjectKey?: string | null;
modelSrc?: string | null;
modelObjectKey?: string | null;
modelFileName?: string | null;
taskUuid?: string | null;
subscriptionKey?: string | null;
status: Match3DGeneratedItemAssetStatus;
error?: string | null;
}
export interface PutMatch3DWorkRequest {
gameName: string;
themeText?: string;
summary: string;
tags: string[];
coverImageSrc?: string | null;
referenceImageSrc?: string | null;
clearCount: number;
difficulty: number;
}
export interface Match3DWorkSummary {
workId: string;
profileId: string;
ownerUserId: string;
sourceSessionId?: string | null;
gameName: string;
themeText: string;
summary: string;
tags: string[];
coverImageSrc?: string | null;
referenceImageSrc?: string | null;
clearCount: number;
difficulty: number;
publicationStatus: Match3DWorkPublicationStatus;
playCount: number;
updatedAt: string;
publishedAt?: string | null;
publishReady: boolean;
generatedItemAssets?: Match3DGeneratedItemAsset[];
}
export interface Match3DWorkProfile extends Match3DWorkSummary {}
export interface Match3DWorksResponse {
items: Match3DWorkSummary[];
}
export interface Match3DWorkDetailResponse {
item: Match3DWorkProfile;
}
export interface Match3DWorkMutationResponse {
item: Match3DWorkProfile;
}