generated from nhcarrigan/template
feat: add profile editing (bio, display name, stat visibility)
This commit is contained in:
@@ -16,6 +16,8 @@ export type {
|
||||
PublicProfileResponse,
|
||||
SaveRequest,
|
||||
SaveResponse,
|
||||
UpdateProfileRequest,
|
||||
UpdateProfileResponse,
|
||||
} from "./interfaces/Api.js";
|
||||
export type { Boss, BossStatus } from "./interfaces/Boss.js";
|
||||
export type {
|
||||
@@ -39,3 +41,5 @@ export type {
|
||||
UpgradeTarget,
|
||||
} from "./interfaces/Upgrade.js";
|
||||
export type { Zone, ZoneStatus } from "./interfaces/Zone.js";
|
||||
export type { ProfileSettings } from "./interfaces/ProfileSettings.js";
|
||||
export { DEFAULT_PROFILE_SETTINGS } from "./interfaces/ProfileSettings.js";
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { GameState } from "./GameState.js";
|
||||
import type { Player } from "./Player.js";
|
||||
import type { ProfileSettings } from "./ProfileSettings.js";
|
||||
|
||||
export interface AuthResponse {
|
||||
token: string;
|
||||
@@ -69,12 +70,29 @@ export interface PublicProfileResponse {
|
||||
characterName: string;
|
||||
username: string;
|
||||
avatar: string | null;
|
||||
bio: string;
|
||||
profileSettings: ProfileSettings;
|
||||
prestigeCount: number;
|
||||
totalGoldEarned: number;
|
||||
totalClicks: number;
|
||||
createdAt: number;
|
||||
}
|
||||
|
||||
export interface UpdateProfileRequest {
|
||||
characterName: string;
|
||||
bio: string;
|
||||
profileSettings: ProfileSettings;
|
||||
}
|
||||
|
||||
export interface UpdateProfileResponse {
|
||||
characterName: string;
|
||||
bio: string;
|
||||
profileSettings: ProfileSettings;
|
||||
}
|
||||
|
||||
export interface ApiError {
|
||||
error: string;
|
||||
}
|
||||
|
||||
// Re-export for convenience
|
||||
export type { ProfileSettings };
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
export interface ProfileSettings {
|
||||
showTotalGold: boolean;
|
||||
showTotalClicks: boolean;
|
||||
showPrestige: boolean;
|
||||
showGuildFounded: boolean;
|
||||
}
|
||||
|
||||
export const DEFAULT_PROFILE_SETTINGS: ProfileSettings = {
|
||||
showTotalGold: true,
|
||||
showTotalClicks: true,
|
||||
showPrestige: true,
|
||||
showGuildFounded: true,
|
||||
};
|
||||
Reference in New Issue
Block a user