import { API, Beatmap, Beatmapset, Changelog, Miscellaneous, Mod, Ruleset, User } from "../index.js"; /** @obtainableFrom {@link API.getBeatmapUserScores} */ export interface Score { /** Where 96.40% would be `0.9640` */ accuracy: Score.Accuracy1; best_id: number | null; max_combo: number; passed: boolean; /** Also known as a grade, for example this is `X` (SS) if `accuracy` is `1` (100.00%) */ rank: Score.Grade; user_id: User["id"]; /** @remarks Is null when Beatmap is Loved (for example) */ pp: number | null; replay: boolean; classic_total_score: number; preserve: boolean; ranked: boolean; maximum_statistics: Score.Statistics; mods: Mod[]; statistics: Score.Statistics; beatmap_id: Beatmap["id"]; id: number; /** @remarks Is null if the score has **NOT** been set on lazer */ build_id: Changelog.Build["id"] | null; ended_at: Date; has_replay: boolean; is_perfect_combo: boolean; legacy_perfect: boolean; /** @remarks Is null if the score has been set on lazer */ legacy_score_id: number | null; /** @remarks Is 0 if the score has been set on lazer */ legacy_total_score: number; ruleset_id: Ruleset; started_at: Date | null; total_score: number; type: "solo_score"; current_user_attributes: { pin: boolean | null; }; } export declare namespace Score { /** * The letters that kinda allow you to tell at a glance how good the score is * @remarks XH is better known as a Silver SS, and SH as a Silver S, while F is a failed score * https://osu.ppy.sh/wiki/en/Gameplay/Grade */ type Grade = "XH" | "X" | "SH" | "S" | "A" | "B" | "C" | "D" | "F"; /** * Accuracy is almost always represented as **a float from 0 to 1**, such that * a score displayed in-game as "95.74%" will be `0.9574` here (with more digits) * * This is the type used to represent accuracy that respects this very common format! */ type Accuracy1 = number; /** * Accuracy is very rarely represented as **a float from 0 to 100**, such that * a score that is displayed in-game as "95.74%" will be `95.74` here (with more digits) * * This is the type used to represent accuracy that respects this very rarely used format! * @remarks {@link Score.Accuracy1} is the type that represents the more commonly used format */ type Accuracy100 = number; /** All of its properties are optional because instead of being 0, the property actually disappears instead */ interface Statistics { combo_break?: number; good?: number; great?: number; ignore_hit?: number; ignore_miss?: number; large_bonus?: number; large_tick_hit?: number; large_tick_miss?: number; legacy_combo_increase?: number; meh?: number; miss?: number; ok?: number; perfect?: number; slider_tail_hit?: number; small_bonus?: number; small_tick_hit?: number; small_tick_miss?: number; } /** @obtainableFrom {@link API.getMatch} */ interface WithMatchPerfect extends Omit { type: "legacy_match_score"; match: { slot: number; team: "none" | "red" | "blue"; pass: boolean; }; perfect?: boolean; } /** @obtainableFrom {@link API.getUserScores} */ interface WithUserBeatmapBeatmapset extends Score { beatmap: Beatmap.Extended; beatmapset: Beatmapset; user: User; /** @remarks Only if `type` is set to `best` on {@link API.getUserScores} */ weight?: { percentage: number; pp: number; }; } /** @obtainableFrom {@link API.getBeatmapScores} */ interface WithUser extends Score { user: User.WithCountryCoverTeam; } /** @obtainableFrom {@link API.getBeatmapUserScore} */ interface WithUserBeatmap extends WithUser { beatmap: Beatmap.Extended; } /** @obtainableFrom {@link API.getScore} */ interface Extended extends Omit { user: User.WithCountryCoverGroupsTeam; processed: boolean; total_score_without_mods: number; rank_global: number; } /** * Get information about a score! * @param score About which score do you want information? */ function getOne(this: API, score: Score["id"] | Score): Promise; /** * Get up to the 1000 (!!) most recent scores! * @param config Specify the ruleset as a filter, or use a cursor_string to get even more scores * @remarks You may get any amount of scores, from 0 to 1000, 0 being more likely when using a cursor_string */ function getSome(this: API, config?: Pick & { ruleset?: keyof typeof Ruleset; }): Promise<{ scores: Score[]; cursor_string: Miscellaneous.CursorString; }>; /** * Get the replay for a score! * @scope {@link Scope"public"} * @param score The score that has created the replay * @returns The correctly encoded content of what would be a replay file (you can just fs.writeFileSync with it!) */ function getReplay(this: API, score: Score["id"] | Score): Promise; }