ttfm-socket 1.0.0-beta.0 → 1.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +7 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -14,6 +14,7 @@ Welcome to the Turntable LIVE Socket Client! This package provides a TypeScript
14
14
  - [Actions](#actions)
15
15
  - [Messages](#messages)
16
16
  - [Stateful Messages](#stateful-messages)
17
+ - [`updatedUserData`](#updateduserdata)
17
18
  - [`userJoined`](#userjoined)
18
19
  - [`userLeft`](#userleft)
19
20
  - [`addedDj`](#addeddj)
@@ -51,7 +52,7 @@ const { state } = await client.joinRoom(token, {
51
52
  });
52
53
  ```
53
54
 
54
- Assuming you are allowed to join the room (e.g. it's not full, the password is correct, etc.), `joinRoom` will resolve with an object containing `state`, an object representing the current room state. If your join request is rejected for any reason, `joinRoom` will throw an error.
55
+ Assuming you are allowed to join the room (e.g. it's not full, the password is correct, etc.), `joinRoom` will resolve with an object containing `state`, an object representing the current room state. In this response, `allUserData` will be an empty object, to be filled in later (see [`updatedUserData`](#updateduserdata)). If your join request is rejected for any reason, `joinRoom` will throw an error.
55
56
 
56
57
  ### Events
57
58
 
@@ -136,9 +137,13 @@ Most of the messages sent by the server come after some sort of room state updat
136
137
 
137
138
  These are all of the stateful messages:
138
139
 
140
+ #### `updatedUserData`
141
+
142
+ Sent to the server after a client successfully joins a room, only to that single client. This will contain a `statePatch` that fills in the `allUserData` piece of the client state, which is not included in the initial `state` sent in response to the `joinRoom` action.
143
+
139
144
  #### `userJoined`
140
145
 
141
- Sent by the server to all clients when a user joins the room. This comes after a client successfully runs the `joinRoom` Action and is added to the Actoinhero `chatRoom`.
146
+ Sent by the server to all clients when a user joins the room. This comes after a client successfully runs the `joinRoom` Action and is added to the Actionhero `chatRoom`.
142
147
 
143
148
  #### `userLeft`
144
149
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ttfm-socket",
3
- "version": "1.0.0-beta.0",
3
+ "version": "1.0.0-beta.1",
4
4
  "main": "./dist-client/client/index.js",
5
5
  "typings": "./dist-client/client/index.d.ts",
6
6
  "devDependencies": {