This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user