Changelog
2.5.0
- Fix
Client.beatmaps.getBeatmapAttributes
returning mismatch from type definition. - Add
UserStatisticsVariant
interface. - Add
variants
property toUserStatistics
. - Add
include_variant_statistics
property toGetUsersOptions.query
. Auth.clientCredentialsGrant
now has an optionalscopes
paramater of typeScope[]
. Defaults to['public']
.
2.4.0
- Add support for the
/beatmaps/{beatmap}/solo-scores
endpoint viaClient.beatmaps.getBeatmapTopNonLegacyScores
. - Add
GetBeatmapTopNonLegacyScoresOptions
interface. - Add
image@2x
property toUserActiveTournamentBanner
interface. - Add
image@2x_url
property toUserBadge
interface. - Add
count_100
,count_300
,count_50
,count_miss
,pp_exp
andglobal_rank_exp
properties toUserStatistics
interface. - Add
active_tournament_banners
toUserExtended
interface.
2.3.1
- Fix the
setAccessToken
method in theClient
class not setting the access token for the other classes it uses.
2.3.0
- Add the ability to set the access token in the current client via
Client.setAccessToken
.
2.2.0
- Add
ruleset
andruleset_id
properties toGetBeatmapAttributesOptions.body
. - Update response type for
Client.users.getSelf
to include thesession_verified
property. - Add
'chat.read'
and'chat.write_manage'
toScope
union type. - Add
safeParse
method to theClient
class to optionally prevent theOsuJSUnexpectedResponseError
error to be thrown in requests done to the current API.
2.1.0
- Add
best_id
property to theScore
interface. - The
count_geki
andcount_katu
properties in theScoreStatistics
interface are now marked as nullable. - Fix a bug with
getEnumMods
when passing NC and/or PF alongside other mods. - Add
derivativeModsWithOriginal
parameter togetModsEnum
in case the developer wishes for NC to output the same enum value as DTNC and for PF to output the same enum value as SDPF if set totrue
.
2.0.2
getEnumMods
now returns['NC']
instead of['DT', 'NC']
when input is576
and returns['PF']
instead of['SD', 'PF']
when input is16416
.
2.0.1
global_rank
andcountry_rank
properties inUserStatistics
interface are now marked as nullable.
2.0.0
- Use native fetch API instead of Axios.
- Provide the option to pass a polyfill for the fetch API for development environments that have a Node.js version below 18.
- Remove input validations.
Client.beatmaps.lookupBeatmap
andClient.changelog.lookupChangelogBuild
methods now returnnull
if nothing is found on lookup. Prior to this, these methods would returnundefined
when there were no results.- Converted many types inferred from schemas into interfaces.
- Other minor changes to some interfaces and types.
- Introduce error handling via the
OsuJSGeneralError
andOsuJSUnexpectedResponseError
classes andOsuJSError
type. - Token can now be revoked using
Client.revokeToken
. Has same functionality asAuth.revokeToken
. - Add links to documentation in JSDoc comments.
- Add osu! Lazer mods to
Mod
type. - Remove unused interface
GetBeatmapOptions
. (Not to be confused withGetBeatmapsOptions
, note the plural form of beatmap). - New utility functions:
getModsEnum
: Converts an array of mods into its numerical representation.getEnumMods
: Converts a numerical representation of a mod or mod combination into an array of mods represented as strings.isOsuJSError
: Determines if a value is an error thrown by osu.js.
- The following properties in
ModsEnum
have been renamed:K4
->4K
K5
->5K
K6
->6K
K7
->7K
K8
->8K
RN
->RD
TR
->TP
K1
->1K
K3
->3K
K2
->2K
1.4.0
- Add
guest
andnominated
literals toUserBeatmapsType
.
1.3.1
- Fix the
Cllient.user.getUser
method not accepting a username as an input foruser
param.
1.3.0
- Update JSDoc comments.
- Rename type
UserEventTypes
toUserEventType
. - Fix
buildUrl.forumTopic
returning the same output asbuildUrl.forum
. - Type for property
offset
forGetUserKodosuOptions
,GetUserRecentScoresOptions
,GetUserScoresOptions
,GetUserBeatmapsOptions
andGetUserRecentActivityOptions
has been changed fromstring
tonumber
.
1.2.3
Remove unnecessary GetReplay
export.
1.2.2
Fix buildUrl
returning invalid URLs.
1.2.1
Fix CJS and ESM exports.
1.2.0
Move requestAuthorizationUrl
method from AuthCodeGrant
class to buildUrl
constant and rename to authRequest
.
1.1.0
Remove unnecessary accessToken
parameter from AuthCodeGrant.refreshToken
method.
1.0.2
Rename interface ForumPost
property create_at
to created_at
(typo).
1.0.1
Support both ESM and CJS modules.
1.0.0
Initial release.
Notice that something is missing? Found a typo? Think something's incomplete? Or think that something can be explained better? Feel free to open a pull request or submit an issue on the library's Github repository .