@liveblocks/node 3.8.0-tiptap1 → 3.8.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.
- package/dist/index.cjs +24 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +24 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -107,9 +107,7 @@ type CreateThreadOptions<M extends BaseMetadata> = {
|
|
|
107
107
|
}>;
|
|
108
108
|
};
|
|
109
109
|
type RoomPermission = [] | ["room:write"] | ["room:read", "room:presence:write"];
|
|
110
|
-
type RoomAccesses = Record<string, [
|
|
111
|
-
"room:write"
|
|
112
|
-
] | ["room:read", "room:presence:write"]>;
|
|
110
|
+
type RoomAccesses = Record<string, ["room:write"] | ["room:read", "room:presence:write"] | ["room:read", "room:presence:write", "comments:write"]>;
|
|
113
111
|
type RoomMetadata = Record<string, string | string[]>;
|
|
114
112
|
type QueryRoomMetadata = Record<string, string>;
|
|
115
113
|
type RoomData = {
|
|
@@ -569,6 +567,12 @@ declare class Liveblocks {
|
|
|
569
567
|
* @param options.signal (optional) An abort signal to cancel the request.
|
|
570
568
|
*/
|
|
571
569
|
deleteRoom(roomId: string, options?: RequestOptions): Promise<void>;
|
|
570
|
+
/**
|
|
571
|
+
* 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.
|
|
572
|
+
* @param roomId The id of the room to prewarm.
|
|
573
|
+
* @param options.signal (optional) An abort signal to cancel the request.
|
|
574
|
+
*/
|
|
575
|
+
prewarmRoom(roomId: string, options?: RequestOptions): Promise<void>;
|
|
572
576
|
/**
|
|
573
577
|
* 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.
|
|
574
578
|
* @param roomId The id of the room to get the users from.
|
package/dist/index.d.ts
CHANGED
|
@@ -107,9 +107,7 @@ type CreateThreadOptions<M extends BaseMetadata> = {
|
|
|
107
107
|
}>;
|
|
108
108
|
};
|
|
109
109
|
type RoomPermission = [] | ["room:write"] | ["room:read", "room:presence:write"];
|
|
110
|
-
type RoomAccesses = Record<string, [
|
|
111
|
-
"room:write"
|
|
112
|
-
] | ["room:read", "room:presence:write"]>;
|
|
110
|
+
type RoomAccesses = Record<string, ["room:write"] | ["room:read", "room:presence:write"] | ["room:read", "room:presence:write", "comments:write"]>;
|
|
113
111
|
type RoomMetadata = Record<string, string | string[]>;
|
|
114
112
|
type QueryRoomMetadata = Record<string, string>;
|
|
115
113
|
type RoomData = {
|
|
@@ -569,6 +567,12 @@ declare class Liveblocks {
|
|
|
569
567
|
* @param options.signal (optional) An abort signal to cancel the request.
|
|
570
568
|
*/
|
|
571
569
|
deleteRoom(roomId: string, options?: RequestOptions): Promise<void>;
|
|
570
|
+
/**
|
|
571
|
+
* 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.
|
|
572
|
+
* @param roomId The id of the room to prewarm.
|
|
573
|
+
* @param options.signal (optional) An abort signal to cancel the request.
|
|
574
|
+
*/
|
|
575
|
+
prewarmRoom(roomId: string, options?: RequestOptions): Promise<void>;
|
|
572
576
|
/**
|
|
573
577
|
* 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.
|
|
574
578
|
* @param roomId The id of the room to get the users from.
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { detectDupes } from "@liveblocks/core";
|
|
|
3
3
|
|
|
4
4
|
// src/version.ts
|
|
5
5
|
var PKG_NAME = "@liveblocks/node";
|
|
6
|
-
var PKG_VERSION = "3.8.
|
|
6
|
+
var PKG_VERSION = "3.8.1";
|
|
7
7
|
var PKG_FORMAT = "esm";
|
|
8
8
|
|
|
9
9
|
// src/client.ts
|
|
@@ -567,7 +567,13 @@ var Liveblocks = class {
|
|
|
567
567
|
* @returns The created room.
|
|
568
568
|
*/
|
|
569
569
|
async createRoom(roomId, params, options) {
|
|
570
|
-
const {
|
|
570
|
+
const {
|
|
571
|
+
defaultAccesses,
|
|
572
|
+
groupsAccesses,
|
|
573
|
+
usersAccesses,
|
|
574
|
+
metadata,
|
|
575
|
+
tenantId
|
|
576
|
+
} = params;
|
|
571
577
|
const res = await this.#post(
|
|
572
578
|
options?.idempotent ? url2`/v2/rooms?idempotent` : url2`/v2/rooms`,
|
|
573
579
|
{
|
|
@@ -575,6 +581,7 @@ var Liveblocks = class {
|
|
|
575
581
|
defaultAccesses,
|
|
576
582
|
groupsAccesses,
|
|
577
583
|
usersAccesses,
|
|
584
|
+
tenantId,
|
|
578
585
|
metadata
|
|
579
586
|
},
|
|
580
587
|
options
|
|
@@ -683,6 +690,21 @@ var Liveblocks = class {
|
|
|
683
690
|
throw await LiveblocksError.from(res);
|
|
684
691
|
}
|
|
685
692
|
}
|
|
693
|
+
/**
|
|
694
|
+
* 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.
|
|
695
|
+
* @param roomId The id of the room to prewarm.
|
|
696
|
+
* @param options.signal (optional) An abort signal to cancel the request.
|
|
697
|
+
*/
|
|
698
|
+
async prewarmRoom(roomId, options) {
|
|
699
|
+
const res = await this.#get(
|
|
700
|
+
url2`/v2/rooms/${roomId}/prewarm`,
|
|
701
|
+
void 0,
|
|
702
|
+
options
|
|
703
|
+
);
|
|
704
|
+
if (!res.ok) {
|
|
705
|
+
throw await LiveblocksError.from(res);
|
|
706
|
+
}
|
|
707
|
+
}
|
|
686
708
|
/**
|
|
687
709
|
* 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
710
|
* @param roomId The id of the room to get the users from.
|