@liveblocks/node 3.8.0-next4 → 3.8.0

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.
package/dist/index.cjs CHANGED
@@ -3,7 +3,7 @@ var _core = require('@liveblocks/core');
3
3
 
4
4
  // src/version.ts
5
5
  var PKG_NAME = "@liveblocks/node";
6
- var PKG_VERSION = "3.8.0-next4";
6
+ var PKG_VERSION = "3.8.0";
7
7
  var PKG_FORMAT = "cjs";
8
8
 
9
9
  // src/client.ts
@@ -683,6 +683,21 @@ var Liveblocks = class {
683
683
  throw await LiveblocksError.from(res);
684
684
  }
685
685
  }
686
+ /**
687
+ * Prepares a room for connectivity, making the eventual connection faster. Use this when you know you'll be loading a room but are not yet connected to it.
688
+ * @param roomId The id of the room to prewarm.
689
+ * @param options.signal (optional) An abort signal to cancel the request.
690
+ */
691
+ async prewarmRoom(roomId, options) {
692
+ const res = await this.#get(
693
+ _core.url`/v2/rooms/${roomId}/prewarm`,
694
+ void 0,
695
+ options
696
+ );
697
+ if (!res.ok) {
698
+ throw await LiveblocksError.from(res);
699
+ }
700
+ }
686
701
  /**
687
702
  * Returns a list of users currently present in the requested room. For better performance, we recommand to call this endpoint every 10 seconds maximum. Duplicates can happen if a user is in the requested room with multiple browser tabs opened.
688
703
  * @param roomId The id of the room to get the users from.