@liveblocks/core
Advanced tools
Comparing version 0.19.1 to 0.19.2-test1
@@ -40,69 +40,69 @@ /** | ||
declare type UpdateObjectOp = { | ||
opId?: string; | ||
id: string; | ||
type: OpCode.UPDATE_OBJECT; | ||
data: Partial<JsonObject>; | ||
readonly opId?: string; | ||
readonly id: string; | ||
readonly type: OpCode.UPDATE_OBJECT; | ||
readonly data: Partial<JsonObject>; | ||
}; | ||
declare type CreateObjectOp = { | ||
opId?: string; | ||
id: string; | ||
intent?: "set"; | ||
deletedId?: string; | ||
type: OpCode.CREATE_OBJECT; | ||
parentId: string; | ||
parentKey: string; | ||
data: JsonObject; | ||
readonly opId?: string; | ||
readonly id: string; | ||
readonly intent?: "set"; | ||
readonly deletedId?: string; | ||
readonly type: OpCode.CREATE_OBJECT; | ||
readonly parentId: string; | ||
readonly parentKey: string; | ||
readonly data: JsonObject; | ||
}; | ||
declare type CreateRootObjectOp = { | ||
opId?: string; | ||
id: string; | ||
type: OpCode.CREATE_OBJECT; | ||
data: JsonObject; | ||
parentId?: never; | ||
parentKey?: never; | ||
readonly opId?: string; | ||
readonly id: string; | ||
readonly type: OpCode.CREATE_OBJECT; | ||
readonly data: JsonObject; | ||
readonly parentId?: never; | ||
readonly parentKey?: never; | ||
}; | ||
declare type CreateListOp = { | ||
opId?: string; | ||
id: string; | ||
intent?: "set"; | ||
deletedId?: string; | ||
type: OpCode.CREATE_LIST; | ||
parentId: string; | ||
parentKey: string; | ||
readonly opId?: string; | ||
readonly id: string; | ||
readonly intent?: "set"; | ||
readonly deletedId?: string; | ||
readonly type: OpCode.CREATE_LIST; | ||
readonly parentId: string; | ||
readonly parentKey: string; | ||
}; | ||
declare type CreateMapOp = { | ||
opId?: string; | ||
id: string; | ||
intent?: "set"; | ||
deletedId?: string; | ||
type: OpCode.CREATE_MAP; | ||
parentId: string; | ||
parentKey: string; | ||
readonly opId?: string; | ||
readonly id: string; | ||
readonly intent?: "set"; | ||
readonly deletedId?: string; | ||
readonly type: OpCode.CREATE_MAP; | ||
readonly parentId: string; | ||
readonly parentKey: string; | ||
}; | ||
declare type CreateRegisterOp = { | ||
opId?: string; | ||
id: string; | ||
intent?: "set"; | ||
deletedId?: string; | ||
type: OpCode.CREATE_REGISTER; | ||
parentId: string; | ||
parentKey: string; | ||
data: Json; | ||
readonly opId?: string; | ||
readonly id: string; | ||
readonly intent?: "set"; | ||
readonly deletedId?: string; | ||
readonly type: OpCode.CREATE_REGISTER; | ||
readonly parentId: string; | ||
readonly parentKey: string; | ||
readonly data: Json; | ||
}; | ||
declare type DeleteCrdtOp = { | ||
opId?: string; | ||
id: string; | ||
type: OpCode.DELETE_CRDT; | ||
readonly opId?: string; | ||
readonly id: string; | ||
readonly type: OpCode.DELETE_CRDT; | ||
}; | ||
declare type SetParentKeyOp = { | ||
opId?: string; | ||
id: string; | ||
type: OpCode.SET_PARENT_KEY; | ||
parentKey: string; | ||
readonly opId?: string; | ||
readonly id: string; | ||
readonly type: OpCode.SET_PARENT_KEY; | ||
readonly parentKey: string; | ||
}; | ||
declare type DeleteObjectKeyOp = { | ||
opId?: string; | ||
id: string; | ||
type: OpCode.DELETE_OBJECT_KEY; | ||
key: string; | ||
readonly opId?: string; | ||
readonly id: string; | ||
readonly type: OpCode.DELETE_OBJECT_KEY; | ||
readonly key: string; | ||
}; | ||
@@ -541,3 +541,3 @@ | ||
declare type UpdatePresenceClientMsg<TPresence extends JsonObject> = { | ||
type: ClientMsgCode.UPDATE_PRESENCE; | ||
readonly type: ClientMsgCode.UPDATE_PRESENCE; | ||
/** | ||
@@ -556,6 +556,6 @@ * Set this to any number to signify that this is a Full Presenceโข | ||
*/ | ||
targetActor: number; | ||
data: TPresence; | ||
readonly targetActor: number; | ||
readonly data: TPresence; | ||
} | { | ||
type: ClientMsgCode.UPDATE_PRESENCE; | ||
readonly type: ClientMsgCode.UPDATE_PRESENCE; | ||
/** | ||
@@ -565,11 +565,11 @@ * Absence of the `targetActor` field signifies that this is a Partial | ||
*/ | ||
targetActor?: undefined; | ||
data: Partial<TPresence>; | ||
readonly targetActor?: undefined; | ||
readonly data: Partial<TPresence>; | ||
}; | ||
declare type UpdateStorageClientMsg = { | ||
type: ClientMsgCode.UPDATE_STORAGE; | ||
ops: Op[]; | ||
readonly type: ClientMsgCode.UPDATE_STORAGE; | ||
readonly ops: Op[]; | ||
}; | ||
declare type FetchStorageClientMsg = { | ||
type: ClientMsgCode.FETCH_STORAGE; | ||
readonly type: ClientMsgCode.FETCH_STORAGE; | ||
}; | ||
@@ -1174,28 +1174,28 @@ | ||
declare type SerializedRootObject = { | ||
type: CrdtType.OBJECT; | ||
data: JsonObject; | ||
parentId?: never; | ||
parentKey?: never; | ||
readonly type: CrdtType.OBJECT; | ||
readonly data: JsonObject; | ||
readonly parentId?: never; | ||
readonly parentKey?: never; | ||
}; | ||
declare type SerializedObject = { | ||
type: CrdtType.OBJECT; | ||
parentId: string; | ||
parentKey: string; | ||
data: JsonObject; | ||
readonly type: CrdtType.OBJECT; | ||
readonly parentId: string; | ||
readonly parentKey: string; | ||
readonly data: JsonObject; | ||
}; | ||
declare type SerializedList = { | ||
type: CrdtType.LIST; | ||
parentId: string; | ||
parentKey: string; | ||
readonly type: CrdtType.LIST; | ||
readonly parentId: string; | ||
readonly parentKey: string; | ||
}; | ||
declare type SerializedMap = { | ||
type: CrdtType.MAP; | ||
parentId: string; | ||
parentKey: string; | ||
readonly type: CrdtType.MAP; | ||
readonly parentId: string; | ||
readonly parentKey: string; | ||
}; | ||
declare type SerializedRegister = { | ||
type: CrdtType.REGISTER; | ||
parentId: string; | ||
parentKey: string; | ||
data: Json; | ||
readonly type: CrdtType.REGISTER; | ||
readonly parentId: string; | ||
readonly parentKey: string; | ||
readonly data: Json; | ||
}; | ||
@@ -1230,7 +1230,7 @@ declare function isRootCrdt(crdt: SerializedCrdt): crdt is SerializedRootObject; | ||
declare type UpdatePresenceServerMsg<TPresence extends JsonObject> = { | ||
type: ServerMsgCode.UPDATE_PRESENCE; | ||
readonly type: ServerMsgCode.UPDATE_PRESENCE; | ||
/** | ||
* The User whose Presence has changed. | ||
*/ | ||
actor: number; | ||
readonly actor: number; | ||
/** | ||
@@ -1248,3 +1248,3 @@ * When set, signifies that this is a Full Presenceโข update, not a patch. | ||
*/ | ||
targetActor: number; | ||
readonly targetActor: number; | ||
/** | ||
@@ -1255,13 +1255,13 @@ * The partial or full Presence of a User. If the `targetActor` field is set, | ||
*/ | ||
data: TPresence; | ||
readonly data: TPresence; | ||
} | { | ||
type: ServerMsgCode.UPDATE_PRESENCE; | ||
readonly type: ServerMsgCode.UPDATE_PRESENCE; | ||
/** | ||
* The User whose Presence has changed. | ||
*/ | ||
actor: number; | ||
readonly actor: number; | ||
/** | ||
* Not set for partial presence updates. | ||
*/ | ||
targetActor?: undefined; | ||
readonly targetActor?: undefined; | ||
/** | ||
@@ -1271,3 +1271,3 @@ * A partial Presence patch to apply to the User. It will only contain the | ||
*/ | ||
data: Partial<TPresence>; | ||
readonly data: Partial<TPresence>; | ||
}; | ||
@@ -1279,4 +1279,4 @@ /** | ||
declare type UserJoinServerMsg<TUserMeta extends BaseUserMeta> = { | ||
type: ServerMsgCode.USER_JOINED; | ||
actor: number; | ||
readonly type: ServerMsgCode.USER_JOINED; | ||
readonly actor: number; | ||
/** | ||
@@ -1286,3 +1286,3 @@ * The id of the User that has been set in the authentication endpoint. | ||
*/ | ||
id: TUserMeta["id"]; | ||
readonly id: TUserMeta["id"]; | ||
/** | ||
@@ -1292,7 +1292,7 @@ * Additional user information that has been set in the authentication | ||
*/ | ||
info: TUserMeta["info"]; | ||
readonly info: TUserMeta["info"]; | ||
/** | ||
* Permissions that the user has in the Room. | ||
*/ | ||
scopes: string[]; | ||
readonly scopes: string[]; | ||
}; | ||
@@ -1304,4 +1304,4 @@ /** | ||
declare type UserLeftServerMsg = { | ||
type: ServerMsgCode.USER_LEFT; | ||
actor: number; | ||
readonly type: ServerMsgCode.USER_LEFT; | ||
readonly actor: number; | ||
}; | ||
@@ -1313,7 +1313,7 @@ /** | ||
declare type BroadcastedEventServerMsg<TRoomEvent extends Json> = { | ||
type: ServerMsgCode.BROADCASTED_EVENT; | ||
readonly type: ServerMsgCode.BROADCASTED_EVENT; | ||
/** | ||
* The User who broadcasted the Event. | ||
*/ | ||
actor: number; | ||
readonly actor: number; | ||
/** | ||
@@ -1323,3 +1323,3 @@ * The arbitrary payload of the Event. This can be any JSON value. Clients | ||
*/ | ||
event: TRoomEvent; | ||
readonly event: TRoomEvent; | ||
}; | ||
@@ -1332,5 +1332,5 @@ /** | ||
declare type RoomStateServerMsg<TUserMeta extends BaseUserMeta> = { | ||
type: ServerMsgCode.ROOM_STATE; | ||
users: { | ||
[actor: number]: TUserMeta & { | ||
readonly type: ServerMsgCode.ROOM_STATE; | ||
readonly users: { | ||
readonly [actor: number]: TUserMeta & { | ||
scopes: string[]; | ||
@@ -1346,4 +1346,4 @@ }; | ||
declare type InitialDocumentStateServerMsg = { | ||
type: ServerMsgCode.INITIAL_STORAGE_STATE; | ||
items: IdTuple<SerializedCrdt>[]; | ||
readonly type: ServerMsgCode.INITIAL_STORAGE_STATE; | ||
readonly items: IdTuple<SerializedCrdt>[]; | ||
}; | ||
@@ -1358,4 +1358,4 @@ /** | ||
declare type UpdateStorageServerMsg = { | ||
type: ServerMsgCode.UPDATE_STORAGE; | ||
ops: Op[]; | ||
readonly type: ServerMsgCode.UPDATE_STORAGE; | ||
readonly ops: Op[]; | ||
}; | ||
@@ -1362,0 +1362,0 @@ |
{ | ||
"name": "@liveblocks/core", | ||
"version": "0.19.1", | ||
"version": "0.19.2-test1", | ||
"description": "Shared code and foundational internals for Liveblocks", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is too big to display
185363
5725