1
This commit is contained in:
53
packages/shared/src/contracts/creationAudio.ts
Normal file
53
packages/shared/src/contracts/creationAudio.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
export type CreationAudioGenerationKind =
|
||||
| 'background_music'
|
||||
| 'sound_effect';
|
||||
|
||||
export interface CreationAudioAsset {
|
||||
taskId: string;
|
||||
provider: string;
|
||||
assetObjectId?: string | null;
|
||||
assetKind?: string | null;
|
||||
audioSrc: string;
|
||||
prompt?: string | null;
|
||||
title?: string | null;
|
||||
updatedAt?: string | null;
|
||||
}
|
||||
|
||||
export interface CreateBackgroundMusicRequest {
|
||||
prompt: string;
|
||||
title: string;
|
||||
tags?: string | null;
|
||||
model?: string | null;
|
||||
}
|
||||
|
||||
export interface CreateSoundEffectRequest {
|
||||
prompt: string;
|
||||
duration?: number | null;
|
||||
seed?: number | null;
|
||||
}
|
||||
|
||||
export interface AudioGenerationTaskResponse {
|
||||
kind: CreationAudioGenerationKind;
|
||||
taskId: string;
|
||||
provider: string;
|
||||
status: string;
|
||||
}
|
||||
|
||||
export interface PublishGeneratedAudioAssetRequest {
|
||||
entityKind: string;
|
||||
entityId: string;
|
||||
slot: string;
|
||||
assetKind: string;
|
||||
profileId?: string | null;
|
||||
storagePrefix?: 'puzzle_assets' | 'match3d_assets' | 'custom_world_scenes' | null;
|
||||
}
|
||||
|
||||
export interface GeneratedAudioAssetResponse {
|
||||
kind: CreationAudioGenerationKind;
|
||||
taskId: string;
|
||||
provider: string;
|
||||
status: string;
|
||||
assetObjectId?: string | null;
|
||||
assetKind?: string | null;
|
||||
audioSrc?: string | null;
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
export type * from './creativeAgent';
|
||||
export type * from './creationAudio';
|
||||
export type * from './hyper3d';
|
||||
export type * from './puzzleCreativeTemplate';
|
||||
export type * from './visualNovel';
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
* 抓大鹅 Match3D 作品读写共享契约。
|
||||
* 首版作品发布必须补齐游戏名称、标签、封面、题材、消除次数和难度。
|
||||
*/
|
||||
import type { CreationAudioAsset } from './creationAudio';
|
||||
|
||||
export type Match3DWorkPublicationStatus = 'draft' | 'published' | string;
|
||||
|
||||
export type Match3DGeneratedItemAssetStatus =
|
||||
@@ -22,10 +24,16 @@ export interface Match3DGeneratedItemAsset {
|
||||
modelFileName?: string | null;
|
||||
taskUuid?: string | null;
|
||||
subscriptionKey?: string | null;
|
||||
backgroundMusic?: CreationAudioAsset | null;
|
||||
clickSound?: CreationAudioAsset | null;
|
||||
status: Match3DGeneratedItemAssetStatus;
|
||||
error?: string | null;
|
||||
}
|
||||
|
||||
export interface PutMatch3DAudioAssetsRequest {
|
||||
generatedItemAssets: Match3DGeneratedItemAsset[];
|
||||
}
|
||||
|
||||
export interface PutMatch3DWorkRequest {
|
||||
gameName: string;
|
||||
themeText?: string;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { JsonObject } from './common';
|
||||
import type { CreationAudioAsset } from './creationAudio';
|
||||
|
||||
export type PuzzleAnchorStatus =
|
||||
| 'missing'
|
||||
@@ -47,6 +48,7 @@ export interface PuzzleDraftLevel {
|
||||
levelName: string;
|
||||
pictureDescription: string;
|
||||
pictureReference?: string | null;
|
||||
backgroundMusic?: CreationAudioAsset | null;
|
||||
candidates: PuzzleGeneratedImageCandidate[];
|
||||
selectedCandidateId: string | null;
|
||||
coverImageSrc: string | null;
|
||||
|
||||
@@ -3,6 +3,7 @@ export * from './contracts/auth';
|
||||
export type * from './contracts/bigFish';
|
||||
export * from './contracts/common';
|
||||
export type * from './contracts/creationAgentDocumentInput';
|
||||
export type * from './contracts/creationAudio';
|
||||
export type * from './contracts/creativeAgent';
|
||||
export type * from './contracts/customWorldAgent';
|
||||
export type * from './contracts/hyper3d';
|
||||
|
||||
Reference in New Issue
Block a user