Breaking Changes
General
- dropped support for Node.js versions below 20 (ee3c06e)
api-call
- renamed the
statusCodeproperty tostatusin theHttpErrorclass (9b73954)
auth
-
renamed the
exchangeCodefunction togetAccessToken(612d5bf) -
updated the
addUsermethod in theRefreshingAuthProviderto returnAccessTokenWithUserId(f2c9a0c) -
changed the signature of
addUserin theStaticAuthProviderfromaddUser(user: UserIdResolvable, token: Pick<AccessToken, 'accessToken' | 'scopes'>)toaddUser(user: UserIdResolvable, accessToken: string, scopes?: string[])(de00b2f)addUsermethod now accepts access token and scopes as parameters instead of partialAccessTokenobject. -
removed
nullfromexpiresInandrefreshTokenin theAccessTokeninterface (0f5d882) -
throw
InvalidTokenErrorfrom thegetAccessTokenForUsermethod in theStaticAuthProviderfor invalid access tokens (3354e7e)
Features
General
-
implemented the
toJSON()method for allDataObjectclasses (84ee675).This makes all data instances serializable using the
JSON.stringify()method.
Additionally, allDataObjectinstances are now printable inconsole.log()in theNode.jsenvironment through theinspect.custommechanism.
toJSON()method alson can be called manually to convert data instance to a plain JavaScript object.
api-call
- replaced the
cross-fetchpackage with the native fetch API (7bec48c) - updated the
queryfield inDonationAlertsApiCallOptionsto allownullvalues in addition to the existing types (fa2f851)
auth
- enhanced the
MissingScopeErrorwithuserIdandscopesproperties (747687d) - enhanced the
InvalidTokenErrorwith auserIdproperty (731ff63) - enhanced the
UnregisteredUserErrorwith auserIdproperty (33ce749)
api
- added the
createOrUpdateMerchandisemethod to the merchandise API (391544a) - added the
DonationAlertsMerchandiseTitleDatatype export (7ae4d14)
Fixes
General
- remove unused dependencies (710a148)
common
- removed the unnecessary
gflag from theNUMERIC_STRING_REGEXused in theextractUserIdfunction (3571099)
api
- fixed the URL in the merchandise sale API request (ba858cc)
- fixed optional fields in the
createMerchandisemethod (6f7fc85) - made logger options partial (6aa0834)
- prevent logging undefined query parameters in
ApiClient(5e7f431)
events
- clean up listeners on unsubscribe (a19175e)