@liveblocks/node 3.14.0-types2 → 3.14.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.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { BaseUserMeta, DU, LiveObject, Awaitable, DS, OptionalTupleUnless, PlainLsonObject, JsonObject, QueryMetadata, ThreadData, UserSubscriptionData, CommentData, CommentBody, Patchable, SubscriptionData, CommentUserReaction, InboxNotificationData, UserRoomSubscriptionSettings, RoomSubscriptionSettings, KDAD, DAD, NotificationSettings, PartialNotificationSettings, GroupScopes, GroupData, LsonObject, ToImmutable, PartialUnless, BaseMetadata, DE, DTM, DCM, NotificationChannel } from '@liveblocks/core';
1
+ import { BaseUserMeta, DU, LiveObject, Awaitable, DS, JsonObject, Json, OptionalTupleUnless, PlainLsonObject, QueryMetadata, ThreadData, UserSubscriptionData, CommentData, CommentBody, Patchable, SubscriptionData, CommentUserReaction, InboxNotificationData, UserRoomSubscriptionSettings, RoomSubscriptionSettings, KDAD, DAD, NotificationSettings, PartialNotificationSettings, GroupScopes, GroupData, LsonObject, ToImmutable, PartialUnless, BaseMetadata, DE, DTM, DCM, NotificationChannel } from '@liveblocks/core';
2
2
  export { CommentBody, CommentBodyBlockElement, CommentBodyElement, CommentBodyInlineElement, CommentBodyLink, CommentBodyLinkElementArgs, CommentBodyMention, CommentBodyMentionElementArgs, CommentBodyParagraph, CommentBodyParagraphElementArgs, CommentBodyText, CommentBodyTextElementArgs, CommentData, CommentUserReaction, IUserInfo, Json, JsonArray, JsonObject, JsonScalar, LiveList, LiveMap, LiveObject, LiveStructure, Lson, LsonObject, PlainLsonObject, ResolveUsersArgs, StringifyCommentBodyElements, StringifyCommentBodyOptions, ThreadData, User, getMentionsFromCommentBody, isNotificationChannelEnabled, stringifyCommentBody } from '@liveblocks/core';
3
3
  import { IncomingHttpHeaders } from 'http';
4
4
 
@@ -78,7 +78,11 @@ type LiveblocksOptions = {
78
78
  type CreateSessionOptions<U extends BaseUserMeta = DU> = PartialUnless<U["info"], {
79
79
  userInfo: U["info"];
80
80
  }> & {
81
+ /**
82
+ * @deprecated Use `organizationId` instead.
83
+ */
81
84
  tenantId?: string;
85
+ organizationId?: string;
82
86
  };
83
87
  type IdentifyUserOptions<U extends BaseUserMeta = DU> = PartialUnless<U["info"], {
84
88
  userInfo: U["info"];
@@ -91,7 +95,11 @@ type AuthResponse = {
91
95
  type Identity = {
92
96
  userId: string;
93
97
  groupIds: string[];
98
+ /**
99
+ * @deprecated Use `organizationId` instead.
100
+ */
94
101
  tenantId?: string;
102
+ organizationId?: string;
95
103
  };
96
104
  type ThreadParticipants = {
97
105
  participantIds: string[];
@@ -130,6 +138,7 @@ type RoomData = {
130
138
  id: string;
131
139
  createdAt: Date;
132
140
  lastConnectionAt?: Date;
141
+ organizationId: string;
133
142
  defaultAccesses: RoomPermission;
134
143
  usersAccesses: RoomAccesses;
135
144
  groupsAccesses: RoomAccesses;
@@ -230,7 +239,11 @@ type CM = DCM;
230
239
  type S = DS;
231
240
  type U = DU;
232
241
  type RoomsQueryCriteria = {
242
+ /**
243
+ * @deprecated Use `organizationId` instead.
244
+ */
233
245
  tenantId?: string;
246
+ organizationId?: string;
234
247
  userId?: string;
235
248
  groupIds?: string[];
236
249
  /**
@@ -264,7 +277,11 @@ type RoomsQueryCriteria = {
264
277
  };
265
278
  type InboxNotificationsQueryCriteria = {
266
279
  userId: string;
280
+ /**
281
+ * @deprecated Use `organizationId` instead.
282
+ */
267
283
  tenantId?: string;
284
+ organizationId?: string;
268
285
  /**
269
286
  * The query to filter inbox notifications by. It is based on our query language.
270
287
  *
@@ -304,11 +321,15 @@ type CreateRoomOptions = {
304
321
  groupsAccesses?: RoomAccesses;
305
322
  usersAccesses?: RoomAccesses;
306
323
  metadata?: RoomMetadata;
324
+ /**
325
+ * @deprecated Use `organizationId` instead.
326
+ */
307
327
  tenantId?: string;
328
+ organizationId?: string;
308
329
  /**
309
- * @private Preferred storage engine version to use when creating the
310
- * room. Only takes effect if the room doesn't exist yet. Version
311
- * 2 supports streaming and will become the default in the future.
330
+ * Preferred storage engine version to use when creating the room. Only takes
331
+ * effect if the room doesn't exist yet. Version 2 can support larger
332
+ * documents, is more performant, and will become the default in the future.
312
333
  */
313
334
  engine?: 1 | 2;
314
335
  };
@@ -456,6 +477,17 @@ type WebKnowledgeSourceLink = {
456
477
  type RequestOptions = {
457
478
  signal?: AbortSignal;
458
479
  };
480
+ type SetPresenceOptions = {
481
+ userId: string;
482
+ data: JsonObject;
483
+ userInfo?: {
484
+ name?: string;
485
+ avatar?: string;
486
+ color?: string;
487
+ [key: string]: Json | undefined;
488
+ };
489
+ ttl?: number;
490
+ };
459
491
  /**
460
492
  * Interact with the Liveblocks API from your Node.js backend.
461
493
  */
@@ -476,7 +508,7 @@ declare class Liveblocks {
476
508
  * uniquely identify the user account in your system. The uniqueness of this
477
509
  * value will determine how many MAUs will be counted/billed.
478
510
  *
479
- * @param tenantId (optional) The tenant ID to authorize the user for.
511
+ * @param options.organizationId (optional) The organization ID to authorize the user for.
480
512
  *
481
513
  * @param options.userInfo Custom metadata to attach to this user. Data you
482
514
  * add here will be visible to all other clients in the room, through the
@@ -528,7 +560,7 @@ declare class Liveblocks {
528
560
  * @param params.userId (optional) A filter on users accesses.
529
561
  * @param params.metadata (optional) A filter on metadata. Multiple metadata keys can be used to filter rooms.
530
562
  * @param params.groupIds (optional) A filter on groups accesses. Multiple groups can be used.
531
- * @param params.tenantId (optional) A filter on tenant ID.
563
+ * @param params.organizationId (optional) A filter on organization ID.
532
564
  * @param params.query (optional) A query to filter rooms by. It is based on our query language. You can filter by metadata and room ID.
533
565
  * @param options.signal (optional) An abort signal to cancel the request.
534
566
  * @returns A list of rooms.
@@ -558,7 +590,7 @@ declare class Liveblocks {
558
590
  * @param params.groupsAccesses (optional) The group accesses for the room. Can contain a maximum of 100 entries. Key length has a limit of 40 characters.
559
591
  * @param params.usersAccesses (optional) The user accesses for the room. Can contain a maximum of 100 entries. Key length has a limit of 40 characters.
560
592
  * @param params.metadata (optional) The metadata for the room. Supports upto a maximum of 50 entries. Key length has a limit of 40 characters. Value length has a limit of 256 characters.
561
- * @param params.tenantId (optional) The tenant ID to create the room for.
593
+ * @param params.organizationId (optional) The organization ID to create the room for.
562
594
  * @param options.signal (optional) An abort signal to cancel the request.
563
595
  * @returns The created room.
564
596
  */
@@ -574,7 +606,7 @@ declare class Liveblocks {
574
606
  * @param params.groupsAccesses (optional) The group accesses for the room if the room will be created. Can contain a maximum of 100 entries. Key length has a limit of 40 characters.
575
607
  * @param params.usersAccesses (optional) The user accesses for the room if the room will be created. Can contain a maximum of 100 entries. Key length has a limit of 40 characters.
576
608
  * @param params.metadata (optional) The metadata for the room if the room will be created. Supports upto a maximum of 50 entries. Key length has a limit of 40 characters. Value length has a limit of 256 characters.
577
- * @param params.tenantId (optional) The tenant ID to create the room for.
609
+ * @param params.organizationId (optional) The organization ID to create the room for.
578
610
  * @param options.signal (optional) An abort signal to cancel the request.
579
611
  * @returns The room.
580
612
  */
@@ -636,6 +668,19 @@ declare class Liveblocks {
636
668
  * @param options.signal (optional) An abort signal to cancel the request.
637
669
  */
638
670
  broadcastEvent(roomId: string, message: E, options?: RequestOptions): Promise<void>;
671
+ /**
672
+ * Sets ephemeral presence for a user in a room without requiring a WebSocket connection.
673
+ * The presence data will automatically expire after the specified TTL.
674
+ * This is useful for scenarios like showing an AI agent's presence in a room.
675
+ *
676
+ * @param roomId The id of the room to set presence in.
677
+ * @param params.userId The ID of the user to set presence for.
678
+ * @param params.data The presence data as a JSON object.
679
+ * @param params.userInfo (optional) Metadata about the user or agent
680
+ * @param params.ttl (optional) Time-to-live in seconds. If not specified, the default TTL is 60 seconds. (minimum: 2, maximum: 3599).
681
+ * @param options.signal (optional) An abort signal to cancel the request.
682
+ */
683
+ setPresence(roomId: string, params: SetPresenceOptions, options?: RequestOptions): Promise<void>;
639
684
  /**
640
685
  * Returns the contents of the room’s Storage tree.
641
686
  * The default outputted format is called “plain LSON”, which includes information on the Live data structures in the tree.
@@ -1034,7 +1079,7 @@ declare class Liveblocks {
1034
1079
  * Returns the inbox notifications for a user.
1035
1080
  * @param params.userId The user ID to get the inbox notifications from.
1036
1081
  * @param params.query The query to filter inbox notifications by. It is based on our query language and can filter by unread.
1037
- * @param params.tenantId (optional) The tenant ID to get the inbox notifications for.
1082
+ * @param params.organizationId (optional) The organization ID to get the inbox notifications for.
1038
1083
  * @param options.signal (optional) An abort signal to cancel the request.
1039
1084
  */
1040
1085
  getInboxNotifications(params: GetInboxNotificationsOptions, options?: RequestOptions): Promise<Page<InboxNotificationData>>;
@@ -1046,7 +1091,7 @@ declare class Liveblocks {
1046
1091
  *
1047
1092
  * @param criteria.userId The user ID to get the inbox notifications from.
1048
1093
  * @param criteria.query The query to filter inbox notifications by. It is based on our query language and can filter by unread.
1049
- * @param criteria.tenantId (optional) The tenant ID to get the inbox notifications for.
1094
+ * @param criteria.organizationId (optional) The organization ID to get the inbox notifications for.
1050
1095
  * @param options.pageSize (optional) The page size to use for each request.
1051
1096
  * @param options.signal (optional) An abort signal to cancel the request.
1052
1097
  */
@@ -1056,13 +1101,17 @@ declare class Liveblocks {
1056
1101
  /**
1057
1102
  * Returns all room subscription settings for a user.
1058
1103
  * @param params.userId The user ID to get the room subscription settings from.
1059
- * @param params.tenantId (optional) The tenant ID to get the room subscription settings for.
1104
+ * @param params.organizationId (optional) The organization ID to get the room subscription settings for.
1060
1105
  * @param params.startingAfter (optional) The cursor to start the pagination from.
1061
1106
  * @param params.limit (optional) The number of items to return.
1062
1107
  * @param options.signal (optional) An abort signal to cancel the request.
1063
1108
  */
1064
1109
  getUserRoomSubscriptionSettings(params: {
1065
1110
  userId: string;
1111
+ organizationId?: string;
1112
+ /**
1113
+ * @deprecated Use `organizationId` instead.
1114
+ */
1066
1115
  tenantId?: string;
1067
1116
  } & PaginationOptions, options?: RequestOptions): Promise<Page<UserRoomSubscriptionSettings>>;
1068
1117
  /**
@@ -1114,13 +1163,17 @@ declare class Liveblocks {
1114
1163
  * @param params.subjectId The subject ID of the triggered inbox notification.
1115
1164
  * @param params.activityData The activity data of the triggered inbox notification.
1116
1165
  * @param params.roomId (optional) The room ID to trigger the inbox notification for.
1117
- * @param params.tenantId (optional) The tenant ID to trigger the inbox notification for.
1166
+ * @param params.organizationId (optional) The organization ID to trigger the inbox notification for.
1118
1167
  * @param options.signal (optional) An abort signal to cancel the request.
1119
1168
  */
1120
1169
  triggerInboxNotification<K extends KDAD>(params: {
1121
1170
  userId: string;
1122
1171
  kind: K;
1123
1172
  roomId?: string;
1173
+ organizationId?: string;
1174
+ /**
1175
+ * @deprecated Use `organizationId` instead.
1176
+ */
1124
1177
  tenantId?: string;
1125
1178
  subjectId: string;
1126
1179
  activityData: DAD[K];
@@ -1138,11 +1191,15 @@ declare class Liveblocks {
1138
1191
  /**
1139
1192
  * Deletes all inbox notifications for a user.
1140
1193
  * @param params.userId The user ID for which to delete all the inbox notifications.
1141
- * @param params.tenantId (optional) The tenant ID to delete the inbox notifications for.
1194
+ * @param params.organizationId (optional) The organization ID to delete the inbox notifications for.
1142
1195
  * @param options.signal (optional) An abort signal to cancel the request.
1143
1196
  */
1144
1197
  deleteAllInboxNotifications(params: {
1145
1198
  userId: string;
1199
+ organizationId?: string;
1200
+ /**
1201
+ * @deprecated Use `organizationId` instead.
1202
+ */
1146
1203
  tenantId?: string;
1147
1204
  }, options?: RequestOptions): Promise<void>;
1148
1205
  /**
@@ -1175,13 +1232,17 @@ declare class Liveblocks {
1175
1232
  * Create a group
1176
1233
  * @param params.groupId The ID of the group to create.
1177
1234
  * @param params.memberIds The IDs of the members to add to the group.
1178
- * @param params.tenantId (optional) The tenant ID to create the group for.
1235
+ * @param params.organizationId (optional) The organization ID to create the group for.
1179
1236
  * @param params.scopes (optional) The scopes to grant to the group. The default is `{ mention: true }`.
1180
1237
  * @param options.signal (optional) An abort signal to cancel the request.
1181
1238
  */
1182
1239
  createGroup(params: {
1183
1240
  groupId: string;
1184
1241
  memberIds?: string[];
1242
+ organizationId?: string;
1243
+ /**
1244
+ * @deprecated Use `organizationId` instead.
1245
+ */
1185
1246
  tenantId?: string;
1186
1247
  scopes?: GroupScopes;
1187
1248
  }, options?: RequestOptions): Promise<GroupData>;
@@ -1787,4 +1848,4 @@ declare function isTextMentionNotificationEvent(event: WebhookEvent): event is T
1787
1848
  */
1788
1849
  declare function isCustomNotificationEvent(event: WebhookEvent): event is CustomNotificationEvent;
1789
1850
 
1790
- export { type AiCopilot, type CommentCreatedEvent, type CommentDeletedEvent, type CommentEditedEvent, type CommentReactionAdded, type CommentReactionRemoved, type CreateAiCopilotOptions, type CreateFileKnowledgeSourceOptions, type CreateRoomOptions, type CreateWebKnowledgeSourceOptions, type CustomNotificationEvent, type GetAiCopilotsOptions, type GetInboxNotificationsOptions, type GetKnowledgeSourcesOptions, type GetRoomsOptions, type GetWebKnowledgeSourceLinksOptions, type InboxNotificationsQueryCriteria, type KnowledgeSource, Liveblocks, LiveblocksError, type LiveblocksOptions, type MassMutateStorageCallback, type MassMutateStorageOptions, type MutateStorageCallback, type MutateStorageOptions, type NotificationEvent, type Page, type PaginationOptions, type RoomAccesses, type RoomCreatedEvent, type RoomData, type RoomDeletedEvent, type RoomPermission, type RoomUser, type RoomsQueryCriteria, type StorageUpdatedEvent, type TextMentionNotificationEvent, type ThreadCreatedEvent, type ThreadDeletedEvent, type ThreadMarkedAsResolvedEvent, type ThreadMarkedAsUnresolvedEvent, type ThreadMetadataUpdatedEvent, type ThreadNotificationEvent, type ThreadParticipants, type UpdateAiCopilotOptions, type UpdateRoomOptions, type UpsertRoomOptions, type UserEnteredEvent, type UserLeftEvent, type WebKnowledgeSourceLink, type WebhookEvent, WebhookHandler, type WebhookRequest, type YDocUpdatedEvent, isCustomNotificationEvent, isTextMentionNotificationEvent, isThreadNotificationEvent };
1851
+ export { type AiCopilot, type CommentCreatedEvent, type CommentDeletedEvent, type CommentEditedEvent, type CommentReactionAdded, type CommentReactionRemoved, type CreateAiCopilotOptions, type CreateFileKnowledgeSourceOptions, type CreateRoomOptions, type CreateWebKnowledgeSourceOptions, type CustomNotificationEvent, type GetAiCopilotsOptions, type GetInboxNotificationsOptions, type GetKnowledgeSourcesOptions, type GetRoomsOptions, type GetWebKnowledgeSourceLinksOptions, type InboxNotificationsQueryCriteria, type KnowledgeSource, Liveblocks, LiveblocksError, type LiveblocksOptions, type MassMutateStorageCallback, type MassMutateStorageOptions, type MutateStorageCallback, type MutateStorageOptions, type NotificationEvent, type Page, type PaginationOptions, type RoomAccesses, type RoomCreatedEvent, type RoomData, type RoomDeletedEvent, type RoomPermission, type RoomUser, type RoomsQueryCriteria, type SetPresenceOptions, type StorageUpdatedEvent, type TextMentionNotificationEvent, type ThreadCreatedEvent, type ThreadDeletedEvent, type ThreadMarkedAsResolvedEvent, type ThreadMarkedAsUnresolvedEvent, type ThreadMetadataUpdatedEvent, type ThreadNotificationEvent, type ThreadParticipants, type UpdateAiCopilotOptions, type UpdateRoomOptions, type UpsertRoomOptions, type UserEnteredEvent, type UserLeftEvent, type WebKnowledgeSourceLink, type WebhookEvent, WebhookHandler, type WebhookRequest, type YDocUpdatedEvent, isCustomNotificationEvent, isTextMentionNotificationEvent, isThreadNotificationEvent };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { BaseUserMeta, DU, LiveObject, Awaitable, DS, OptionalTupleUnless, PlainLsonObject, JsonObject, QueryMetadata, ThreadData, UserSubscriptionData, CommentData, CommentBody, Patchable, SubscriptionData, CommentUserReaction, InboxNotificationData, UserRoomSubscriptionSettings, RoomSubscriptionSettings, KDAD, DAD, NotificationSettings, PartialNotificationSettings, GroupScopes, GroupData, LsonObject, ToImmutable, PartialUnless, BaseMetadata, DE, DTM, DCM, NotificationChannel } from '@liveblocks/core';
1
+ import { BaseUserMeta, DU, LiveObject, Awaitable, DS, JsonObject, Json, OptionalTupleUnless, PlainLsonObject, QueryMetadata, ThreadData, UserSubscriptionData, CommentData, CommentBody, Patchable, SubscriptionData, CommentUserReaction, InboxNotificationData, UserRoomSubscriptionSettings, RoomSubscriptionSettings, KDAD, DAD, NotificationSettings, PartialNotificationSettings, GroupScopes, GroupData, LsonObject, ToImmutable, PartialUnless, BaseMetadata, DE, DTM, DCM, NotificationChannel } from '@liveblocks/core';
2
2
  export { CommentBody, CommentBodyBlockElement, CommentBodyElement, CommentBodyInlineElement, CommentBodyLink, CommentBodyLinkElementArgs, CommentBodyMention, CommentBodyMentionElementArgs, CommentBodyParagraph, CommentBodyParagraphElementArgs, CommentBodyText, CommentBodyTextElementArgs, CommentData, CommentUserReaction, IUserInfo, Json, JsonArray, JsonObject, JsonScalar, LiveList, LiveMap, LiveObject, LiveStructure, Lson, LsonObject, PlainLsonObject, ResolveUsersArgs, StringifyCommentBodyElements, StringifyCommentBodyOptions, ThreadData, User, getMentionsFromCommentBody, isNotificationChannelEnabled, stringifyCommentBody } from '@liveblocks/core';
3
3
  import { IncomingHttpHeaders } from 'http';
4
4
 
@@ -78,7 +78,11 @@ type LiveblocksOptions = {
78
78
  type CreateSessionOptions<U extends BaseUserMeta = DU> = PartialUnless<U["info"], {
79
79
  userInfo: U["info"];
80
80
  }> & {
81
+ /**
82
+ * @deprecated Use `organizationId` instead.
83
+ */
81
84
  tenantId?: string;
85
+ organizationId?: string;
82
86
  };
83
87
  type IdentifyUserOptions<U extends BaseUserMeta = DU> = PartialUnless<U["info"], {
84
88
  userInfo: U["info"];
@@ -91,7 +95,11 @@ type AuthResponse = {
91
95
  type Identity = {
92
96
  userId: string;
93
97
  groupIds: string[];
98
+ /**
99
+ * @deprecated Use `organizationId` instead.
100
+ */
94
101
  tenantId?: string;
102
+ organizationId?: string;
95
103
  };
96
104
  type ThreadParticipants = {
97
105
  participantIds: string[];
@@ -130,6 +138,7 @@ type RoomData = {
130
138
  id: string;
131
139
  createdAt: Date;
132
140
  lastConnectionAt?: Date;
141
+ organizationId: string;
133
142
  defaultAccesses: RoomPermission;
134
143
  usersAccesses: RoomAccesses;
135
144
  groupsAccesses: RoomAccesses;
@@ -230,7 +239,11 @@ type CM = DCM;
230
239
  type S = DS;
231
240
  type U = DU;
232
241
  type RoomsQueryCriteria = {
242
+ /**
243
+ * @deprecated Use `organizationId` instead.
244
+ */
233
245
  tenantId?: string;
246
+ organizationId?: string;
234
247
  userId?: string;
235
248
  groupIds?: string[];
236
249
  /**
@@ -264,7 +277,11 @@ type RoomsQueryCriteria = {
264
277
  };
265
278
  type InboxNotificationsQueryCriteria = {
266
279
  userId: string;
280
+ /**
281
+ * @deprecated Use `organizationId` instead.
282
+ */
267
283
  tenantId?: string;
284
+ organizationId?: string;
268
285
  /**
269
286
  * The query to filter inbox notifications by. It is based on our query language.
270
287
  *
@@ -304,11 +321,15 @@ type CreateRoomOptions = {
304
321
  groupsAccesses?: RoomAccesses;
305
322
  usersAccesses?: RoomAccesses;
306
323
  metadata?: RoomMetadata;
324
+ /**
325
+ * @deprecated Use `organizationId` instead.
326
+ */
307
327
  tenantId?: string;
328
+ organizationId?: string;
308
329
  /**
309
- * @private Preferred storage engine version to use when creating the
310
- * room. Only takes effect if the room doesn't exist yet. Version
311
- * 2 supports streaming and will become the default in the future.
330
+ * Preferred storage engine version to use when creating the room. Only takes
331
+ * effect if the room doesn't exist yet. Version 2 can support larger
332
+ * documents, is more performant, and will become the default in the future.
312
333
  */
313
334
  engine?: 1 | 2;
314
335
  };
@@ -456,6 +477,17 @@ type WebKnowledgeSourceLink = {
456
477
  type RequestOptions = {
457
478
  signal?: AbortSignal;
458
479
  };
480
+ type SetPresenceOptions = {
481
+ userId: string;
482
+ data: JsonObject;
483
+ userInfo?: {
484
+ name?: string;
485
+ avatar?: string;
486
+ color?: string;
487
+ [key: string]: Json | undefined;
488
+ };
489
+ ttl?: number;
490
+ };
459
491
  /**
460
492
  * Interact with the Liveblocks API from your Node.js backend.
461
493
  */
@@ -476,7 +508,7 @@ declare class Liveblocks {
476
508
  * uniquely identify the user account in your system. The uniqueness of this
477
509
  * value will determine how many MAUs will be counted/billed.
478
510
  *
479
- * @param tenantId (optional) The tenant ID to authorize the user for.
511
+ * @param options.organizationId (optional) The organization ID to authorize the user for.
480
512
  *
481
513
  * @param options.userInfo Custom metadata to attach to this user. Data you
482
514
  * add here will be visible to all other clients in the room, through the
@@ -528,7 +560,7 @@ declare class Liveblocks {
528
560
  * @param params.userId (optional) A filter on users accesses.
529
561
  * @param params.metadata (optional) A filter on metadata. Multiple metadata keys can be used to filter rooms.
530
562
  * @param params.groupIds (optional) A filter on groups accesses. Multiple groups can be used.
531
- * @param params.tenantId (optional) A filter on tenant ID.
563
+ * @param params.organizationId (optional) A filter on organization ID.
532
564
  * @param params.query (optional) A query to filter rooms by. It is based on our query language. You can filter by metadata and room ID.
533
565
  * @param options.signal (optional) An abort signal to cancel the request.
534
566
  * @returns A list of rooms.
@@ -558,7 +590,7 @@ declare class Liveblocks {
558
590
  * @param params.groupsAccesses (optional) The group accesses for the room. Can contain a maximum of 100 entries. Key length has a limit of 40 characters.
559
591
  * @param params.usersAccesses (optional) The user accesses for the room. Can contain a maximum of 100 entries. Key length has a limit of 40 characters.
560
592
  * @param params.metadata (optional) The metadata for the room. Supports upto a maximum of 50 entries. Key length has a limit of 40 characters. Value length has a limit of 256 characters.
561
- * @param params.tenantId (optional) The tenant ID to create the room for.
593
+ * @param params.organizationId (optional) The organization ID to create the room for.
562
594
  * @param options.signal (optional) An abort signal to cancel the request.
563
595
  * @returns The created room.
564
596
  */
@@ -574,7 +606,7 @@ declare class Liveblocks {
574
606
  * @param params.groupsAccesses (optional) The group accesses for the room if the room will be created. Can contain a maximum of 100 entries. Key length has a limit of 40 characters.
575
607
  * @param params.usersAccesses (optional) The user accesses for the room if the room will be created. Can contain a maximum of 100 entries. Key length has a limit of 40 characters.
576
608
  * @param params.metadata (optional) The metadata for the room if the room will be created. Supports upto a maximum of 50 entries. Key length has a limit of 40 characters. Value length has a limit of 256 characters.
577
- * @param params.tenantId (optional) The tenant ID to create the room for.
609
+ * @param params.organizationId (optional) The organization ID to create the room for.
578
610
  * @param options.signal (optional) An abort signal to cancel the request.
579
611
  * @returns The room.
580
612
  */
@@ -636,6 +668,19 @@ declare class Liveblocks {
636
668
  * @param options.signal (optional) An abort signal to cancel the request.
637
669
  */
638
670
  broadcastEvent(roomId: string, message: E, options?: RequestOptions): Promise<void>;
671
+ /**
672
+ * Sets ephemeral presence for a user in a room without requiring a WebSocket connection.
673
+ * The presence data will automatically expire after the specified TTL.
674
+ * This is useful for scenarios like showing an AI agent's presence in a room.
675
+ *
676
+ * @param roomId The id of the room to set presence in.
677
+ * @param params.userId The ID of the user to set presence for.
678
+ * @param params.data The presence data as a JSON object.
679
+ * @param params.userInfo (optional) Metadata about the user or agent
680
+ * @param params.ttl (optional) Time-to-live in seconds. If not specified, the default TTL is 60 seconds. (minimum: 2, maximum: 3599).
681
+ * @param options.signal (optional) An abort signal to cancel the request.
682
+ */
683
+ setPresence(roomId: string, params: SetPresenceOptions, options?: RequestOptions): Promise<void>;
639
684
  /**
640
685
  * Returns the contents of the room’s Storage tree.
641
686
  * The default outputted format is called “plain LSON”, which includes information on the Live data structures in the tree.
@@ -1034,7 +1079,7 @@ declare class Liveblocks {
1034
1079
  * Returns the inbox notifications for a user.
1035
1080
  * @param params.userId The user ID to get the inbox notifications from.
1036
1081
  * @param params.query The query to filter inbox notifications by. It is based on our query language and can filter by unread.
1037
- * @param params.tenantId (optional) The tenant ID to get the inbox notifications for.
1082
+ * @param params.organizationId (optional) The organization ID to get the inbox notifications for.
1038
1083
  * @param options.signal (optional) An abort signal to cancel the request.
1039
1084
  */
1040
1085
  getInboxNotifications(params: GetInboxNotificationsOptions, options?: RequestOptions): Promise<Page<InboxNotificationData>>;
@@ -1046,7 +1091,7 @@ declare class Liveblocks {
1046
1091
  *
1047
1092
  * @param criteria.userId The user ID to get the inbox notifications from.
1048
1093
  * @param criteria.query The query to filter inbox notifications by. It is based on our query language and can filter by unread.
1049
- * @param criteria.tenantId (optional) The tenant ID to get the inbox notifications for.
1094
+ * @param criteria.organizationId (optional) The organization ID to get the inbox notifications for.
1050
1095
  * @param options.pageSize (optional) The page size to use for each request.
1051
1096
  * @param options.signal (optional) An abort signal to cancel the request.
1052
1097
  */
@@ -1056,13 +1101,17 @@ declare class Liveblocks {
1056
1101
  /**
1057
1102
  * Returns all room subscription settings for a user.
1058
1103
  * @param params.userId The user ID to get the room subscription settings from.
1059
- * @param params.tenantId (optional) The tenant ID to get the room subscription settings for.
1104
+ * @param params.organizationId (optional) The organization ID to get the room subscription settings for.
1060
1105
  * @param params.startingAfter (optional) The cursor to start the pagination from.
1061
1106
  * @param params.limit (optional) The number of items to return.
1062
1107
  * @param options.signal (optional) An abort signal to cancel the request.
1063
1108
  */
1064
1109
  getUserRoomSubscriptionSettings(params: {
1065
1110
  userId: string;
1111
+ organizationId?: string;
1112
+ /**
1113
+ * @deprecated Use `organizationId` instead.
1114
+ */
1066
1115
  tenantId?: string;
1067
1116
  } & PaginationOptions, options?: RequestOptions): Promise<Page<UserRoomSubscriptionSettings>>;
1068
1117
  /**
@@ -1114,13 +1163,17 @@ declare class Liveblocks {
1114
1163
  * @param params.subjectId The subject ID of the triggered inbox notification.
1115
1164
  * @param params.activityData The activity data of the triggered inbox notification.
1116
1165
  * @param params.roomId (optional) The room ID to trigger the inbox notification for.
1117
- * @param params.tenantId (optional) The tenant ID to trigger the inbox notification for.
1166
+ * @param params.organizationId (optional) The organization ID to trigger the inbox notification for.
1118
1167
  * @param options.signal (optional) An abort signal to cancel the request.
1119
1168
  */
1120
1169
  triggerInboxNotification<K extends KDAD>(params: {
1121
1170
  userId: string;
1122
1171
  kind: K;
1123
1172
  roomId?: string;
1173
+ organizationId?: string;
1174
+ /**
1175
+ * @deprecated Use `organizationId` instead.
1176
+ */
1124
1177
  tenantId?: string;
1125
1178
  subjectId: string;
1126
1179
  activityData: DAD[K];
@@ -1138,11 +1191,15 @@ declare class Liveblocks {
1138
1191
  /**
1139
1192
  * Deletes all inbox notifications for a user.
1140
1193
  * @param params.userId The user ID for which to delete all the inbox notifications.
1141
- * @param params.tenantId (optional) The tenant ID to delete the inbox notifications for.
1194
+ * @param params.organizationId (optional) The organization ID to delete the inbox notifications for.
1142
1195
  * @param options.signal (optional) An abort signal to cancel the request.
1143
1196
  */
1144
1197
  deleteAllInboxNotifications(params: {
1145
1198
  userId: string;
1199
+ organizationId?: string;
1200
+ /**
1201
+ * @deprecated Use `organizationId` instead.
1202
+ */
1146
1203
  tenantId?: string;
1147
1204
  }, options?: RequestOptions): Promise<void>;
1148
1205
  /**
@@ -1175,13 +1232,17 @@ declare class Liveblocks {
1175
1232
  * Create a group
1176
1233
  * @param params.groupId The ID of the group to create.
1177
1234
  * @param params.memberIds The IDs of the members to add to the group.
1178
- * @param params.tenantId (optional) The tenant ID to create the group for.
1235
+ * @param params.organizationId (optional) The organization ID to create the group for.
1179
1236
  * @param params.scopes (optional) The scopes to grant to the group. The default is `{ mention: true }`.
1180
1237
  * @param options.signal (optional) An abort signal to cancel the request.
1181
1238
  */
1182
1239
  createGroup(params: {
1183
1240
  groupId: string;
1184
1241
  memberIds?: string[];
1242
+ organizationId?: string;
1243
+ /**
1244
+ * @deprecated Use `organizationId` instead.
1245
+ */
1185
1246
  tenantId?: string;
1186
1247
  scopes?: GroupScopes;
1187
1248
  }, options?: RequestOptions): Promise<GroupData>;
@@ -1787,4 +1848,4 @@ declare function isTextMentionNotificationEvent(event: WebhookEvent): event is T
1787
1848
  */
1788
1849
  declare function isCustomNotificationEvent(event: WebhookEvent): event is CustomNotificationEvent;
1789
1850
 
1790
- export { type AiCopilot, type CommentCreatedEvent, type CommentDeletedEvent, type CommentEditedEvent, type CommentReactionAdded, type CommentReactionRemoved, type CreateAiCopilotOptions, type CreateFileKnowledgeSourceOptions, type CreateRoomOptions, type CreateWebKnowledgeSourceOptions, type CustomNotificationEvent, type GetAiCopilotsOptions, type GetInboxNotificationsOptions, type GetKnowledgeSourcesOptions, type GetRoomsOptions, type GetWebKnowledgeSourceLinksOptions, type InboxNotificationsQueryCriteria, type KnowledgeSource, Liveblocks, LiveblocksError, type LiveblocksOptions, type MassMutateStorageCallback, type MassMutateStorageOptions, type MutateStorageCallback, type MutateStorageOptions, type NotificationEvent, type Page, type PaginationOptions, type RoomAccesses, type RoomCreatedEvent, type RoomData, type RoomDeletedEvent, type RoomPermission, type RoomUser, type RoomsQueryCriteria, type StorageUpdatedEvent, type TextMentionNotificationEvent, type ThreadCreatedEvent, type ThreadDeletedEvent, type ThreadMarkedAsResolvedEvent, type ThreadMarkedAsUnresolvedEvent, type ThreadMetadataUpdatedEvent, type ThreadNotificationEvent, type ThreadParticipants, type UpdateAiCopilotOptions, type UpdateRoomOptions, type UpsertRoomOptions, type UserEnteredEvent, type UserLeftEvent, type WebKnowledgeSourceLink, type WebhookEvent, WebhookHandler, type WebhookRequest, type YDocUpdatedEvent, isCustomNotificationEvent, isTextMentionNotificationEvent, isThreadNotificationEvent };
1851
+ export { type AiCopilot, type CommentCreatedEvent, type CommentDeletedEvent, type CommentEditedEvent, type CommentReactionAdded, type CommentReactionRemoved, type CreateAiCopilotOptions, type CreateFileKnowledgeSourceOptions, type CreateRoomOptions, type CreateWebKnowledgeSourceOptions, type CustomNotificationEvent, type GetAiCopilotsOptions, type GetInboxNotificationsOptions, type GetKnowledgeSourcesOptions, type GetRoomsOptions, type GetWebKnowledgeSourceLinksOptions, type InboxNotificationsQueryCriteria, type KnowledgeSource, Liveblocks, LiveblocksError, type LiveblocksOptions, type MassMutateStorageCallback, type MassMutateStorageOptions, type MutateStorageCallback, type MutateStorageOptions, type NotificationEvent, type Page, type PaginationOptions, type RoomAccesses, type RoomCreatedEvent, type RoomData, type RoomDeletedEvent, type RoomPermission, type RoomUser, type RoomsQueryCriteria, type SetPresenceOptions, type StorageUpdatedEvent, type TextMentionNotificationEvent, type ThreadCreatedEvent, type ThreadDeletedEvent, type ThreadMarkedAsResolvedEvent, type ThreadMarkedAsUnresolvedEvent, type ThreadMetadataUpdatedEvent, type ThreadNotificationEvent, type ThreadParticipants, type UpdateAiCopilotOptions, type UpdateRoomOptions, type UpsertRoomOptions, type UserEnteredEvent, type UserLeftEvent, type WebKnowledgeSourceLink, type WebhookEvent, WebhookHandler, type WebhookRequest, type YDocUpdatedEvent, isCustomNotificationEvent, isTextMentionNotificationEvent, isThreadNotificationEvent };