generated from nhcarrigan/template
feat: add public leaderboards with opt-out privacy setting
This commit is contained in:
@@ -38,6 +38,9 @@ export type {
|
||||
ExploreStartRequest,
|
||||
ExploreStartResponse,
|
||||
GiteaRelease,
|
||||
LeaderboardCategory,
|
||||
LeaderboardEntry,
|
||||
LeaderboardResponse,
|
||||
LoadResponse,
|
||||
PrestigeRequest,
|
||||
PrestigeResponse,
|
||||
|
||||
@@ -183,6 +183,30 @@ export interface ApiError {
|
||||
error: string;
|
||||
}
|
||||
|
||||
export type LeaderboardCategory =
|
||||
| "totalGold"
|
||||
| "bossesDefeated"
|
||||
| "questsCompleted"
|
||||
| "achievementsUnlocked"
|
||||
| "prestigeCount"
|
||||
| "transcendenceCount"
|
||||
| "apotheosisCount";
|
||||
|
||||
export interface LeaderboardEntry {
|
||||
rank: number;
|
||||
discordId: string;
|
||||
characterName: string;
|
||||
username: string;
|
||||
avatar: string | null;
|
||||
activeTitle: string;
|
||||
value: number;
|
||||
}
|
||||
|
||||
export interface LeaderboardResponse {
|
||||
category: LeaderboardCategory;
|
||||
entries: LeaderboardEntry[];
|
||||
}
|
||||
|
||||
export interface GiteaRelease {
|
||||
tag_name: string;
|
||||
name: string;
|
||||
|
||||
@@ -20,6 +20,8 @@ export interface ProfileSettings {
|
||||
showAdventurersRecruited: boolean;
|
||||
showAchievementsUnlocked: boolean;
|
||||
numberFormat: NumberFormat;
|
||||
/** Whether this player appears on the public leaderboards */
|
||||
showOnLeaderboards: boolean;
|
||||
}
|
||||
|
||||
export const DEFAULT_PROFILE_SETTINGS: ProfileSettings = {
|
||||
@@ -40,4 +42,5 @@ export const DEFAULT_PROFILE_SETTINGS: ProfileSettings = {
|
||||
showAdventurersRecruited: true,
|
||||
showAchievementsUnlocked: true,
|
||||
numberFormat: "suffix",
|
||||
showOnLeaderboards: true,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user