Changelog
2.6.0
- Add support for the new API’s
Scoredefinition viaScoreV2,UserScoreV2,UserBestScoreV2andBeatmapUserScoreV2interfaces andClient.beatmaps.getBeatmapUserScoreV2,Client.beatmaps.getBeatmapUserScoresV2,Client.beatmaps.getBeatmapTopScoresV2,Client.beatmaps.getBeatmapTopNonLegacyScoresV2andClient.users.getUserScoresV2methods. - Added types
ModSettings,EasyMod,NoFailMod,HalfTimeMod,DaycoreMod,HardRockMod,SuddenDeathMod,PerfectMod,DoubleTimeMod,NightcoreMod,HiddenMod,FlaslightMod,BlindsMod,StrictTrackingMod,AccuracyChallengeMod,TargetPracticeMod,DifficultyAdjustMod,ClassicMod,RandomMod,MirrorMod,AlternateMod,SingleTapMod,AutoplayMod,CinemaMod,RelaxMod,AutopilotMod,SpunOutMod,TransformMod,WiggleMod,SpinInMod,GrowMod,DeflateMod,WindUpMod,WindDownMod,TraceableMod,BarrelRollMod,ApproachDifferentMod,MutedMod,NoScopeMod,MagnetisedMod,RepelMod,AdaptiveSpeedMod,FreezeFrameMod,BubblesMod,SynesthesiaMod,DepthMod,TouchDeviceMod,ScoreV2Mod,SwapMod,FloatingFruitsMod,FadeInMod,DualStagesMod,InvertMod,ConstantSpeedMod,HoldOffMod,Key1Mod,Key2Mod,Key3Mod,Key4Mod,Key5Mod,Key6Mod,Key7Mod,Key8Mod,Key9ModandKey10Mod.
2.5.0
- Fix
Client.beatmaps.getBeatmapAttributesreturning mismatch from type definition. - Add
UserStatisticsVariantinterface. - Add
variantsproperty toUserStatistics. - Add
include_variant_statisticsproperty toGetUsersOptions.query. Auth.clientCredentialsGrantnow has an optionalscopesparamater of typeScope[]. Defaults to['public'].
2.4.0
- Add support for the
/beatmaps/{beatmap}/solo-scoresendpoint viaClient.beatmaps.getBeatmapTopNonLegacyScores. - Add
GetBeatmapTopNonLegacyScoresOptionsinterface. - Add
image@2xproperty toUserActiveTournamentBannerinterface. - Add
image@2x_urlproperty toUserBadgeinterface. - Add
count_100,count_300,count_50,count_miss,pp_expandglobal_rank_expproperties toUserStatisticsinterface. - Add
active_tournament_bannerstoUserExtendedinterface.
2.3.1
- Fix the
setAccessTokenmethod in theClientclass 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
rulesetandruleset_idproperties toGetBeatmapAttributesOptions.body. - Update response type for
Client.users.getSelfto include thesession_verifiedproperty. - Add
'chat.read'and'chat.write_manage'toScopeunion type. - Add
safeParsemethod to theClientclass to optionally prevent theOsuJSUnexpectedResponseErrorerror to be thrown in requests done to the current API.
2.1.0
- Add
best_idproperty to theScoreinterface. - The
count_gekiandcount_katuproperties in theScoreStatisticsinterface are now marked as nullable. - Fix a bug with
getEnumModswhen passing NC and/or PF alongside other mods. - Add
derivativeModsWithOriginalparameter togetModsEnumin 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
getEnumModsnow returns['NC']instead of['DT', 'NC']when input is576and returns['PF']instead of['SD', 'PF']when input is16416.
2.0.1
global_rankandcountry_rankproperties inUserStatisticsinterface 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.lookupBeatmapandClient.changelog.lookupChangelogBuildmethods now returnnullif nothing is found on lookup. Prior to this, these methods would returnundefinedwhen 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
OsuJSGeneralErrorandOsuJSUnexpectedResponseErrorclasses andOsuJSErrortype. - 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
Modtype. - 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
ModsEnumhave been renamed:K4->4KK5->5KK6->6KK7->7KK8->8KRN->RDTR->TPK1->1KK3->3KK2->2K
1.4.0
- Add
guestandnominatedliterals toUserBeatmapsType.
1.3.1
- Fix the
Cllient.user.getUsermethod not accepting a username as an input foruserparam.
1.3.0
- Update JSDoc comments.
- Rename type
UserEventTypestoUserEventType. - Fix
buildUrl.forumTopicreturning the same output asbuildUrl.forum. - Type for property
offsetforGetUserKodosuOptions,GetUserRecentScoresOptions,GetUserScoresOptions,GetUserBeatmapsOptionsandGetUserRecentActivityOptionshas been changed fromstringtonumber.
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 .