This commit is contained in:
2026-04-14 20:43:46 +08:00
39 changed files with 2971 additions and 940 deletions

View File

@@ -34,14 +34,64 @@ export type BasicOkResult = {
ok: true;
};
export type CustomWorldPublicationStatus = 'draft' | 'published';
export type CustomWorldThemeMode =
| 'martial'
| 'arcane'
| 'machina'
| 'tide'
| 'rift'
| 'mythic';
export type CustomWorldProfileRecord = JsonObject & {
id?: string;
};
export type CustomWorldLibraryEntry<
TProfile = CustomWorldProfileRecord,
> = {
ownerUserId: string;
profileId: string;
profile: TProfile;
visibility: CustomWorldPublicationStatus;
publishedAt: string | null;
updatedAt: string;
authorDisplayName: string;
worldName: string;
subtitle: string;
summaryText: string;
coverImageSrc: string | null;
themeMode: CustomWorldThemeMode;
playableNpcCount: number;
landmarkCount: number;
};
export type CustomWorldGalleryCard = Omit<
CustomWorldLibraryEntry<never>,
'profile'
>;
export type CustomWorldLibraryResponse<
TProfile = CustomWorldProfileRecord,
> = {
profiles: TProfile[];
entries: CustomWorldLibraryEntry<TProfile>[];
};
export type CustomWorldLibraryMutationResponse<
TProfile = CustomWorldProfileRecord,
> = {
entry: CustomWorldLibraryEntry<TProfile>;
entries: CustomWorldLibraryEntry<TProfile>[];
};
export type CustomWorldGalleryResponse = {
entries: CustomWorldGalleryCard[];
};
export type CustomWorldGalleryDetailResponse<
TProfile = CustomWorldProfileRecord,
> = {
entry: CustomWorldLibraryEntry<TProfile>;
};
export const CUSTOM_WORLD_GENERATION_MODES = ['fast', 'full'] as const;