@liveblocks/core 1.2.0-internal3 → 1.2.0-internal5
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.d.mts +1903 -0
- package/dist/index.d.ts +8 -43
- package/dist/index.js +262 -344
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +5903 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +15 -2
package/dist/index.d.ts
CHANGED
|
@@ -703,16 +703,9 @@ declare type User<TPresence extends JsonObject, TUserMeta extends BaseUserMeta>
|
|
|
703
703
|
*/
|
|
704
704
|
readonly presence: TPresence;
|
|
705
705
|
/**
|
|
706
|
-
*
|
|
707
|
-
* False if the user can mutate the Room’s Storage and/or YDoc, true if they
|
|
708
|
-
* can only read but not mutate it.
|
|
706
|
+
* False if the user can modify the room storage, true otherwise.
|
|
709
707
|
*/
|
|
710
708
|
readonly isReadOnly: boolean;
|
|
711
|
-
/**
|
|
712
|
-
* True if the user can mutate the Room’s Storage and/or YDoc, false if they
|
|
713
|
-
* can only read but not mutate it.
|
|
714
|
-
*/
|
|
715
|
-
readonly canWrite: boolean;
|
|
716
709
|
};
|
|
717
710
|
|
|
718
711
|
/**
|
|
@@ -1555,33 +1548,6 @@ declare enum ServerMsgCode {
|
|
|
1555
1548
|
REJECT_STORAGE_OP = 299,
|
|
1556
1549
|
UPDATE_YDOC = 300
|
|
1557
1550
|
}
|
|
1558
|
-
/**
|
|
1559
|
-
* Traits are bitflags that are used at the protocol level to communicate what
|
|
1560
|
-
* traits a given User has. Traits may or may not map to official permissions.
|
|
1561
|
-
* Users cannot see each other's true permissions, but they can see each
|
|
1562
|
-
* other's traits.
|
|
1563
|
-
*
|
|
1564
|
-
* Traits are not a security feature, but should only be used to optimize the
|
|
1565
|
-
* app experience (e.g. to visually indicate that another connected user has no
|
|
1566
|
-
* write access to the document).
|
|
1567
|
-
*/
|
|
1568
|
-
declare enum Traits {
|
|
1569
|
-
None = 0,
|
|
1570
|
-
/**
|
|
1571
|
-
* Whether the user has write access to Storage™ + YDoc.
|
|
1572
|
-
* Maps to the public `User.canWrite` property.
|
|
1573
|
-
*/
|
|
1574
|
-
CanWriteDocument = 1,
|
|
1575
|
-
/**
|
|
1576
|
-
* Whether the user has access to Comments™.
|
|
1577
|
-
* Maps to the public `User.canComment` property.
|
|
1578
|
-
*/
|
|
1579
|
-
CanWriteComments = 2,
|
|
1580
|
-
/**
|
|
1581
|
-
* Convenience accessor only, where all the bitflags are enabled.
|
|
1582
|
-
*/
|
|
1583
|
-
All = 3
|
|
1584
|
-
}
|
|
1585
1551
|
/**
|
|
1586
1552
|
* Messages that can be sent from the server to the client.
|
|
1587
1553
|
*/
|
|
@@ -1656,10 +1622,9 @@ declare type UserJoinServerMsg<TUserMeta extends BaseUserMeta> = {
|
|
|
1656
1622
|
*/
|
|
1657
1623
|
readonly info: TUserMeta["info"];
|
|
1658
1624
|
/**
|
|
1659
|
-
*
|
|
1660
|
-
* @since v1.2 (WS API v7)
|
|
1625
|
+
* Permissions that the user has in the Room.
|
|
1661
1626
|
*/
|
|
1662
|
-
readonly
|
|
1627
|
+
readonly scopes: string[];
|
|
1663
1628
|
};
|
|
1664
1629
|
/**
|
|
1665
1630
|
* Sent by the WebSocket server and broadcasted to all clients to announce that
|
|
@@ -1706,13 +1671,13 @@ declare type RoomStateServerMsg<TUserMeta extends BaseUserMeta> = {
|
|
|
1706
1671
|
*/
|
|
1707
1672
|
readonly actor: number;
|
|
1708
1673
|
/**
|
|
1709
|
-
* Informs the client what
|
|
1674
|
+
* Informs the client what permissions the current User (self) has.
|
|
1710
1675
|
* @since v1.2 (WS API v7)
|
|
1711
1676
|
*/
|
|
1712
|
-
readonly
|
|
1677
|
+
readonly scopes: string[];
|
|
1713
1678
|
readonly users: {
|
|
1714
|
-
readonly [
|
|
1715
|
-
|
|
1679
|
+
readonly [actor: number]: TUserMeta & {
|
|
1680
|
+
scopes: string[];
|
|
1716
1681
|
};
|
|
1717
1682
|
};
|
|
1718
1683
|
};
|
|
@@ -1935,4 +1900,4 @@ declare type EnsureJson<T> = [
|
|
|
1935
1900
|
[K in keyof T]: EnsureJson<T[K]>;
|
|
1936
1901
|
};
|
|
1937
1902
|
|
|
1938
|
-
export { AckOp, BaseAuthResult, BaseUserMeta, BroadcastEventClientMsg, BroadcastOptions, BroadcastedEventServerMsg, Client, ClientMsg, ClientMsgCode, CrdtType, CreateChildOp, CreateListOp, CreateMapOp, CreateObjectOp, CreateOp, CreateRegisterOp, CreateRootObjectOp, Delegates, DeleteCrdtOp, DeleteObjectKeyOp, DevToolsTreeNode as DevTools, protocol as DevToolsMsg, EnsureJson, FetchStorageClientMsg, FetchYDocClientMsg, History, IWebSocket, IWebSocketCloseEvent, IWebSocketEvent, IWebSocketInstance, IWebSocketMessageEvent, IdTuple, Immutable, InitialDocumentStateServerMsg, Json, JsonArray, JsonObject, JsonScalar, LegacyConnectionStatus, LiveList, LiveListUpdate, LiveMap, LiveMapUpdate, LiveNode, LiveObject, LiveObjectUpdate, LiveStructure, LostConnectionEvent, Lson, LsonObject, NodeMap, Op, OpCode, Others, ParentToChildNodeMap, PlainLson, PlainLsonFields, PlainLsonList, PlainLsonMap, PlainLsonObject, RejectedStorageOpServerMsg, Resolve, Room, RoomInitializers, RoomStateServerMsg, SerializedChild, SerializedCrdt, SerializedList, SerializedMap, SerializedObject, SerializedRegister, SerializedRootObject, ServerMsg, ServerMsgCode, SetParentKeyOp, Status, StorageStatus, StorageUpdate, ToImmutable, ToJson,
|
|
1903
|
+
export { AckOp, BaseAuthResult, BaseUserMeta, BroadcastEventClientMsg, BroadcastOptions, BroadcastedEventServerMsg, Client, ClientMsg, ClientMsgCode, CrdtType, CreateChildOp, CreateListOp, CreateMapOp, CreateObjectOp, CreateOp, CreateRegisterOp, CreateRootObjectOp, Delegates, DeleteCrdtOp, DeleteObjectKeyOp, DevToolsTreeNode as DevTools, protocol as DevToolsMsg, EnsureJson, FetchStorageClientMsg, FetchYDocClientMsg, History, IWebSocket, IWebSocketCloseEvent, IWebSocketEvent, IWebSocketInstance, IWebSocketMessageEvent, IdTuple, Immutable, InitialDocumentStateServerMsg, Json, JsonArray, JsonObject, JsonScalar, LegacyConnectionStatus, LiveList, LiveListUpdate, LiveMap, LiveMapUpdate, LiveNode, LiveObject, LiveObjectUpdate, LiveStructure, LostConnectionEvent, Lson, LsonObject, NodeMap, Op, OpCode, Others, ParentToChildNodeMap, PlainLson, PlainLsonFields, PlainLsonList, PlainLsonMap, PlainLsonObject, RejectedStorageOpServerMsg, Resolve, Room, RoomInitializers, RoomStateServerMsg, SerializedChild, SerializedCrdt, SerializedList, SerializedMap, SerializedObject, SerializedRegister, SerializedRootObject, ServerMsg, ServerMsgCode, SetParentKeyOp, Status, StorageStatus, StorageUpdate, ToImmutable, ToJson, UpdateObjectOp, UpdatePresenceClientMsg, UpdatePresenceServerMsg, UpdateStorageClientMsg, UpdateStorageServerMsg, UpdateYDocClientMsg, User, UserJoinServerMsg, UserLeftServerMsg, WebsocketCloseCodes, asArrayWithLegacyMethods, asPos, assert, assertNever, b64decode, createClient, deprecate, deprecateIf, errorIf, freeze, isChildCrdt, isJsonArray, isJsonObject, isJsonScalar, isPlainObject, isRootCrdt, legacy_patchImmutableObject, lsonToJson, makePosition, nn, patchLiveObjectKey, shallow, throwUsageError, toPlainLson, tryParseJson, withTimeout };
|