11
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
2026-04-16 21:47:20 +08:00
parent 2456c10c63
commit 09d4c0c31b
79 changed files with 11873 additions and 2341 deletions

View File

@@ -34,6 +34,45 @@ export type BasicOkResult = {
ok: true;
};
export type ProfileDashboardCardKey = 'wallet' | 'playTime' | 'playedWorks';
export type ProfileDashboardSummary = {
walletBalance: number;
totalPlayTimeMs: number;
playedWorldCount: number;
updatedAt: string | null;
};
export type ProfileWalletLedgerEntry = {
id: string;
amountDelta: number;
balanceAfter: number;
sourceType: 'snapshot_sync';
createdAt: string;
};
export type ProfileWalletLedgerResponse = {
entries: ProfileWalletLedgerEntry[];
};
export type ProfilePlayedWorkSummary = {
worldKey: string;
ownerUserId: string | null;
profileId: string | null;
worldType: string | null;
worldTitle: string;
worldSubtitle: string;
firstPlayedAt: string;
lastPlayedAt: string;
lastObservedPlayTimeMs: number;
};
export type ProfilePlayStatsResponse = {
totalPlayTimeMs: number;
playedWorks: ProfilePlayedWorkSummary[];
updatedAt: string | null;
};
export type CustomWorldPublicationStatus = 'draft' | 'published';
export type CustomWorldThemeMode =
| 'martial'
@@ -47,9 +86,7 @@ export type CustomWorldProfileRecord = JsonObject & {
id?: string;
};
export type CustomWorldLibraryEntry<
TProfile = CustomWorldProfileRecord,
> = {
export type CustomWorldLibraryEntry<TProfile = CustomWorldProfileRecord> = {
ownerUserId: string;
profileId: string;
profile: TProfile;
@@ -71,9 +108,7 @@ export type CustomWorldGalleryCard = Omit<
'profile'
>;
export type CustomWorldLibraryResponse<
TProfile = CustomWorldProfileRecord,
> = {
export type CustomWorldLibraryResponse<TProfile = CustomWorldProfileRecord> = {
entries: CustomWorldLibraryEntry<TProfile>[];
};
@@ -94,6 +129,33 @@ export type CustomWorldGalleryDetailResponse<
entry: CustomWorldLibraryEntry<TProfile>;
};
export type PlatformBrowseHistoryEntry = {
ownerUserId: string;
profileId: string;
worldName: string;
subtitle: string;
summaryText: string;
coverImageSrc: string | null;
themeMode: CustomWorldThemeMode;
authorDisplayName: string;
visitedAt: string;
};
export type PlatformBrowseHistoryWriteEntry = Omit<
PlatformBrowseHistoryEntry,
'visitedAt'
> & {
visitedAt?: string;
};
export type PlatformBrowseHistoryResponse = {
entries: PlatformBrowseHistoryEntry[];
};
export type PlatformBrowseHistoryBatchSyncRequest = {
entries: PlatformBrowseHistoryWriteEntry[];
};
export const CUSTOM_WORLD_GENERATION_MODES = ['fast', 'full'] as const;
export type CustomWorldGenerationMode =
(typeof CUSTOM_WORLD_GENERATION_MODES)[number];