203 lines
5.0 KiB
TypeScript
203 lines
5.0 KiB
TypeScript
export type WoodenFishGenerationStatus =
|
|
| 'draft'
|
|
| 'generating'
|
|
| 'ready'
|
|
| 'failed';
|
|
|
|
export type WoodenFishActionType =
|
|
| 'compile-draft'
|
|
| 'regenerate-hit-object'
|
|
| 'generate-hit-sound'
|
|
| 'replace-hit-sound'
|
|
| 'update-work-meta'
|
|
| 'update-floating-words';
|
|
|
|
export type WoodenFishRunStatus = 'playing' | 'finished';
|
|
|
|
export interface WoodenFishImageAsset {
|
|
assetId: string;
|
|
imageSrc: string;
|
|
imageObjectKey: string;
|
|
assetObjectId: string;
|
|
generationProvider: string;
|
|
prompt: string;
|
|
width: number;
|
|
height: number;
|
|
}
|
|
|
|
export interface WoodenFishAudioAsset {
|
|
assetId: string;
|
|
audioSrc: string;
|
|
audioObjectKey: string;
|
|
assetObjectId: string;
|
|
source: string;
|
|
prompt?: string | null;
|
|
durationMs?: number | null;
|
|
}
|
|
|
|
export interface WoodenFishWorkspaceCreateRequest {
|
|
templateId: string;
|
|
workTitle: string;
|
|
workDescription: string;
|
|
themeTags: string[];
|
|
hitObjectPrompt: string;
|
|
hitObjectReferenceImageSrc?: string | null;
|
|
hitSoundPrompt?: string | null;
|
|
hitSoundAsset?: WoodenFishAudioAsset | null;
|
|
floatingWords: string[];
|
|
}
|
|
|
|
export interface WoodenFishActionRequest {
|
|
actionType: WoodenFishActionType;
|
|
profileId?: string | null;
|
|
workTitle?: string | null;
|
|
workDescription?: string | null;
|
|
themeTags?: string[] | null;
|
|
hitObjectPrompt?: string | null;
|
|
hitObjectReferenceImageSrc?: string | null;
|
|
hitObjectAsset?: WoodenFishImageAsset | null;
|
|
backgroundAsset?: WoodenFishImageAsset | null;
|
|
backButtonAsset?: WoodenFishImageAsset | null;
|
|
hitSoundPrompt?: string | null;
|
|
hitSoundAsset?: WoodenFishAudioAsset | null;
|
|
floatingWords?: string[] | null;
|
|
}
|
|
|
|
export interface WoodenFishWordCounter {
|
|
text: string;
|
|
count: number;
|
|
}
|
|
|
|
export interface WoodenFishDraftResponse {
|
|
templateId: string;
|
|
templateName: string;
|
|
profileId: string | null;
|
|
workTitle: string;
|
|
workDescription: string;
|
|
themeTags: string[];
|
|
hitObjectPrompt: string;
|
|
hitObjectReferenceImageSrc: string | null;
|
|
hitSoundPrompt: string | null;
|
|
floatingWords: string[];
|
|
hitObjectAsset: WoodenFishImageAsset | null;
|
|
backgroundAsset: WoodenFishImageAsset | null;
|
|
backButtonAsset?: WoodenFishImageAsset | null;
|
|
hitSoundAsset: WoodenFishAudioAsset | null;
|
|
coverImageSrc: string | null;
|
|
generationStatus: WoodenFishGenerationStatus;
|
|
}
|
|
|
|
export interface WoodenFishSessionSnapshotResponse {
|
|
sessionId: string;
|
|
ownerUserId: string;
|
|
status: WoodenFishGenerationStatus;
|
|
draft: WoodenFishDraftResponse | null;
|
|
createdAt: string;
|
|
updatedAt: string;
|
|
}
|
|
|
|
export interface WoodenFishSessionResponse {
|
|
session: WoodenFishSessionSnapshotResponse;
|
|
}
|
|
|
|
export interface WoodenFishActionResponse {
|
|
actionType: WoodenFishActionType;
|
|
session: WoodenFishSessionSnapshotResponse;
|
|
work: WoodenFishWorkProfileResponse | null;
|
|
}
|
|
|
|
export interface WoodenFishWorkSummaryResponse {
|
|
runtimeKind: 'wooden-fish';
|
|
workId: string;
|
|
profileId: string;
|
|
ownerUserId: string;
|
|
sourceSessionId: string | null;
|
|
workTitle: string;
|
|
workDescription: string;
|
|
themeTags: string[];
|
|
coverImageSrc: string | null;
|
|
publicationStatus: string;
|
|
playCount: number;
|
|
updatedAt: string;
|
|
publishedAt: string | null;
|
|
publishReady: boolean;
|
|
generationStatus: WoodenFishGenerationStatus;
|
|
}
|
|
|
|
export interface WoodenFishWorkProfileResponse {
|
|
summary: WoodenFishWorkSummaryResponse;
|
|
draft: WoodenFishDraftResponse;
|
|
hitObjectAsset: WoodenFishImageAsset;
|
|
backgroundAsset: WoodenFishImageAsset | null;
|
|
backButtonAsset: WoodenFishImageAsset | null;
|
|
hitSoundAsset: WoodenFishAudioAsset;
|
|
floatingWords: string[];
|
|
}
|
|
|
|
export interface WoodenFishWorkDetailResponse {
|
|
item: WoodenFishWorkProfileResponse;
|
|
}
|
|
|
|
export interface WoodenFishWorkMutationResponse {
|
|
item: WoodenFishWorkProfileResponse;
|
|
}
|
|
|
|
export interface WoodenFishGalleryCardResponse {
|
|
publicWorkCode: string;
|
|
workId: string;
|
|
profileId: string;
|
|
ownerUserId: string;
|
|
authorDisplayName: string;
|
|
workTitle: string;
|
|
workDescription: string;
|
|
coverImageSrc: string | null;
|
|
themeTags: string[];
|
|
publicationStatus: string;
|
|
playCount: number;
|
|
updatedAt: string;
|
|
publishedAt: string | null;
|
|
generationStatus: WoodenFishGenerationStatus;
|
|
}
|
|
|
|
export interface WoodenFishGalleryResponse {
|
|
items: WoodenFishGalleryCardResponse[];
|
|
hasMore: boolean;
|
|
nextCursor: string | null;
|
|
}
|
|
|
|
export interface WoodenFishGalleryDetailResponse {
|
|
item: WoodenFishWorkProfileResponse;
|
|
}
|
|
|
|
export interface WoodenFishRuntimeRunSnapshotResponse {
|
|
runId: string;
|
|
profileId: string;
|
|
ownerUserId: string;
|
|
status: WoodenFishRunStatus;
|
|
totalTapCount: number;
|
|
wordCounters: WoodenFishWordCounter[];
|
|
startedAtMs: number;
|
|
updatedAtMs: number;
|
|
finishedAtMs: number | null;
|
|
}
|
|
|
|
export interface WoodenFishRunResponse {
|
|
run: WoodenFishRuntimeRunSnapshotResponse;
|
|
}
|
|
|
|
export interface WoodenFishStartRunRequest {
|
|
profileId: string;
|
|
}
|
|
|
|
export interface WoodenFishCheckpointRunRequest {
|
|
totalTapCount: number;
|
|
wordCounters: WoodenFishWordCounter[];
|
|
clientEventId: string;
|
|
}
|
|
|
|
export interface WoodenFishFinishRunRequest {
|
|
totalTapCount: number;
|
|
wordCounters: WoodenFishWordCounter[];
|
|
clientEventId: string;
|
|
}
|