Releases: heroiclabs/nakama-js
Releases · heroiclabs/nakama-js
v2.8.0
Added
- Nakama: Added ability to invoke
listFriendsOfFriends
on the client which returns a list of friends of the user's friends. - Nakama: Added a
rank_count
toLeaderboardRecordList
. - Nakama: Added ability to invoke
listSubscriptions
on the client which lists all the user's validated subscriptions. - Nakama: Added ability to invoke
getSubscription
on the client which gets a subscription by product ID. - Nakama: Added ability to invoke
deleteAccount
on the client which deletes the user's account. - Nakama: Added ability to invoke
validatePurchaseFacebookInstant
on the client which validates a FB Instant IAP receipt. - Nakama: Added ability to invoke
deleteTournamentRecord
on the client which deletes a tournament record. - Nakama: Added ability to invoke
validateSubscriptionApple
andvalidateSubscriptionGoogle
on the client which validates Apple and Google subscription receipts. - Nakama: Added
cursor
parameter tolistTournamentRecordsAroundOwner
andlistLeaderboardRecordsAroundOwner
. - Nakama: Added
authoritative
field toTournament
. - Nakama: Added ability to specify whether to
persist
purchases and subscriptions when validating their receipts. - Nakama: Added
create_time
andupdate_time
toApiStorageObjectAck
. - Nakama: Added
refund_time
,update_time
anduser_id
toApiValidatedPurchase
.
Changed
- Nakama: Changed
StreamId.descriptor
toStreamId.subcontext
.
v2.7.1
Fixed
- Regenerated nakama-js and nakama-js-protobuf distribution files to match v2.7.0
v2.7.0
Added
- Satori: Added ability to schedule, update and delete outgoing messages for Live Events.
- Satori: Added ability to add custom and default properties for a user at the point of authentication.
- Satori: Add 'recompute' param to Satori's update-properties.
- Satori: Added ability to delete identity.
- Nakama: Added ability to create match by name.
Changed
- Nakama: Improves how outgoing messages are logged in verbose mode.
- Nakama: Updated signature for Authenticate Game Center.
Fixed
- Nakama: Fixed typings distribution location for protobuf-js.
- Nakama: Fixed how newer bundlers (such as those used by ViteJs) discover Nakama's type definitions.
- Satori: Return live event ID when getting all live events.
v2.6.1
Added
- You can now pass a
onheartbeattimeout
to the socket which will be called directly when a heartbeat timeout occurs. It will also still callondisconnect
once the socket is closed (which can take a few seconds for some browsers).
Fixed
- Fixed a NodeJS compatibility issue by no longer depending on
XMLHttpRequest
.
v2.6.0
Added
-
The socket will now automatically heartbeat with the server from within
nakama-js
. If the server doesn't reply after a heartbeat timeout has elapsed,ondisconnect
will be called. This should resolve issues with the socket detecting lack of internet connectivity in Chrome. You can configure the heartbeat tiemout withsetHeartbeatTimeoutMs(ms : number) : void
. -
You can now pass a
connectTimeoutMs
to the socketconnect
call in order to set a connect timeout. -
You can now pass a
sendTimeoutMs
to the socket constructor to detect timeouts for socket calls that expect a response.
The connect, send, and heartbeat timeouts are set to sensible default values.
Fixed
- Fixed dispatching of
onpartyclose
.
v2.5.3
v2.5.2
v2.5.1
v2.4.1
Fixed
This release is a republish of 2.4.0 but with the cjs distribution provided.
v2.4.0
Added
- Added more details comments and documentation on objects and methods.
Changed
- Changed data structure used to pass session variables to authentication methods. The old structure used was a
Map<string, string>
. We now use theRecord<string, string>
for serialization support. - Changed
StreamData.stream_presence
toStreamData.sender
. This field should be populated correctly now. - Changed
MatchData.presences
to a singularMatchData.presence
. This presence represents the sender. This field should be populated correctly now. - Match and party data payloads are now serialized as protobuf when using the protobuf adapter.
- Because of this change,
sendMatchState
andsendPartyData
can now receive bytes as input. If bytes are sent using the default text adapter, they are base64 encoded to a string.- These functions can no longer receive data payloads of type
any
. Any object previously passed in must be serialized to a string or bytes. This change is enforced at compile time.
- These functions can no longer receive data payloads of type
- Also due to this change,
MatchData
andPartyData
have theirdata
fields typed as aUint8Array
. This breaks
backwards compatibility. Users who send a string as their match or party data will need to use a utility such asTextDecoder
to deserialize the string. This change is enforced at compile time.
- Because of this change,
Fixed
- Fixed an issue with our base64 dependency in React Native.