@liveblocks/node 3.5.3 → 3.5.4

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, SubscriptionData, Patchable, CommentUserReaction, InboxNotificationData, UserRoomSubscriptionSettings, RoomSubscriptionSettings, KDAD, DAD, NotificationSettings, PartialNotificationSettings, LsonObject, ToImmutable, PartialUnless, BaseMetadata, DE, DM, NotificationChannel } from '@liveblocks/core';
1
+ import { BaseUserMeta, DU, LiveObject, Awaitable, DS, OptionalTupleUnless, PlainLsonObject, JsonObject, QueryMetadata, ThreadData, UserSubscriptionData, CommentData, CommentBody, SubscriptionData, Patchable, CommentUserReaction, InboxNotificationData, UserRoomSubscriptionSettings, RoomSubscriptionSettings, KDAD, DAD, NotificationSettings, PartialNotificationSettings, LsonObject, ToImmutable, PartialUnless, BaseMetadata, Json, DE, DM, 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
 
@@ -120,66 +120,33 @@ type RoomData = {
120
120
  groupsAccesses: RoomAccesses;
121
121
  metadata: RoomMetadata;
122
122
  };
123
- type AiCopilotProviderSettings = {
124
- maxTokens?: number;
125
- temperature?: number;
126
- topP?: number;
127
- topK?: number;
128
- frequencyPenalty?: number;
129
- presencePenalty?: number;
130
- stopSequences?: string[];
131
- seed?: number;
132
- maxRetries?: number;
133
- };
134
- type OpenAiModel = "o1" | "o1-mini" | "o3" | "o3-mini" | "o4-mini" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-nano" | "gpt-4o" | "gpt-4o-mini" | "gpt-4-turbo" | "gpt-4";
135
- type OpenAiProviderOptions = {
136
- openai: {
137
- reasoningEffort: "low" | "medium" | "high";
138
- };
139
- };
140
- type AnthropicModel = "claude-4-opus-20250514" | "claude-4-sonnet-20250514" | "claude-3-7-sonnet-20250219" | "claude-3-5-sonnet-latest" | "claude-3-5-haiku-latest" | "claude-3-opus-latest";
141
- type AnthropicProviderOptions = {
142
- anthropic: {
143
- thinking: {
144
- type: "enabled" | "disabled";
145
- budgetToken: number;
146
- };
147
- };
148
- };
149
- type GoogleModel = "gemini-2.5-flash" | "gemini-2.5-pro" | "gemini-2.0-flash-001" | "gemini-1.5-flash" | "gemini-1.5-pro";
150
- type GoogleProviderOptions = {
151
- google: {
152
- thinkingConfig: {
153
- thinkingBudget: number;
154
- };
155
- };
156
- };
157
123
  type AiCopilot = {
158
124
  type: "copilot";
159
125
  id: string;
160
126
  name: string;
161
- description?: string;
162
127
  systemPrompt: string;
163
128
  knowledgePrompt?: string;
129
+ description?: string;
164
130
  createdAt: Date;
165
131
  updatedAt: Date;
166
132
  lastUsedAt?: Date;
167
- settings?: AiCopilotProviderSettings;
133
+ providerModel: string;
134
+ providerOptions?: Record<string, Record<string, string | Json>>;
135
+ settings?: {
136
+ maxTokens?: number;
137
+ temperature?: number;
138
+ topP?: number;
139
+ topK?: number;
140
+ frequencyPenalty?: number;
141
+ presencePenalty?: number;
142
+ stopSequences?: string[];
143
+ seed?: number;
144
+ maxRetries?: number;
145
+ };
168
146
  } & ({
169
- provider: "openai";
170
- providerModel: OpenAiModel;
171
- providerOptions?: OpenAiProviderOptions;
172
- } | {
173
- provider: "anthropic";
174
- providerModel: AnthropicModel;
175
- providerOptions?: AnthropicProviderOptions;
176
- } | {
177
- provider: "google";
178
- providerModel: GoogleModel;
179
- providerOptions?: GoogleProviderOptions;
147
+ provider: "openai" | "anthropic" | "google";
180
148
  } | {
181
149
  provider: "openai-compatible";
182
- providerModel: string;
183
150
  compatibleProviderName: string;
184
151
  providerBaseUrl: string;
185
152
  });
@@ -300,63 +267,50 @@ type UpsertRoomOptions = {
300
267
  update: UpdateRoomOptions;
301
268
  create?: CreateRoomOptions;
302
269
  };
303
- type GetAiCopilotsOptions = PaginationOptions;
270
+ type ProviderSettings = {
271
+ maxTokens?: number;
272
+ temperature?: number;
273
+ topP?: number;
274
+ topK?: number;
275
+ frequencyPenalty?: number;
276
+ presencePenalty?: number;
277
+ stopSequences?: string[];
278
+ seed?: number;
279
+ maxRetries?: number;
280
+ };
304
281
  type CreateAiCopilotOptions = {
305
282
  name: string;
283
+ providerApiKey: string;
284
+ providerModel: string;
306
285
  description?: string;
307
286
  systemPrompt: string;
308
287
  knowledgePrompt?: string;
309
- settings?: AiCopilotProviderSettings;
310
- providerApiKey: string;
288
+ providerOptions?: Record<string, Record<string, string | Json>>;
289
+ settings?: ProviderSettings;
311
290
  } & ({
312
- provider: "openai";
313
- providerModel: OpenAiModel;
314
- providerOptions?: OpenAiProviderOptions;
315
- } | {
316
- provider: "anthropic";
317
- providerModel: AnthropicModel;
318
- providerOptions?: AnthropicProviderOptions;
319
- } | {
320
- provider: "google";
321
- providerModel: GoogleModel;
322
- providerOptions?: GoogleProviderOptions;
291
+ provider: "openai" | "anthropic" | "google";
323
292
  } | {
324
293
  provider: "openai-compatible";
325
- providerModel: string;
326
294
  compatibleProviderName: string;
327
295
  providerBaseUrl: string;
328
296
  });
329
297
  type UpdateAiCopilotOptions = {
330
298
  name?: string;
299
+ providerApiKey?: string;
300
+ providerModel?: string;
331
301
  description?: string | null;
332
302
  systemPrompt?: string;
333
303
  knowledgePrompt?: string | null;
334
- settings?: AiCopilotProviderSettings | null;
335
- providerApiKey?: string;
304
+ providerOptions?: Record<string, Record<string, string | Json>> | null;
305
+ settings?: ProviderSettings | null;
336
306
  } & ({
337
- provider?: "openai";
338
- providerModel?: OpenAiModel;
339
- providerOptions?: OpenAiProviderOptions | null;
340
- compatibleProviderName?: never;
341
- providerBaseUrl?: never;
342
- } | {
343
- provider?: "anthropic";
344
- providerModel?: AnthropicModel;
345
- providerOptions?: AnthropicProviderOptions | null;
346
- compatibleProviderName?: never;
347
- providerBaseUrl?: never;
348
- } | {
349
- provider?: "google";
350
- providerModel?: GoogleModel;
351
- providerOptions?: GoogleProviderOptions | null;
352
- compatibleProviderName?: never;
353
- providerBaseUrl?: never;
307
+ provider?: "openai" | "anthropic" | "google";
308
+ compatibleProviderName?: null;
309
+ providerBaseUrl?: null;
354
310
  } | {
355
311
  provider?: "openai-compatible";
356
- providerModel?: string;
357
312
  compatibleProviderName?: string;
358
313
  providerBaseUrl?: string;
359
- providerOptions?: never;
360
314
  });
361
315
  type CreateWebKnowledgeSourceOptions = {
362
316
  copilotId: string;
@@ -1656,4 +1610,4 @@ declare function isTextMentionNotificationEvent(event: WebhookEvent): event is T
1656
1610
  */
1657
1611
  declare function isCustomNotificationEvent(event: WebhookEvent): event is CustomNotificationEvent;
1658
1612
 
1659
- 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 Schema, 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 };
1613
+ export { type CommentCreatedEvent, type CommentDeletedEvent, type CommentEditedEvent, type CommentReactionAdded, type CommentReactionRemoved, type CreateRoomOptions, type CustomNotificationEvent, type GetInboxNotificationsOptions, type GetRoomsOptions, type InboxNotificationsQueryCriteria, 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 Schema, type StorageUpdatedEvent, type TextMentionNotificationEvent, type ThreadCreatedEvent, type ThreadDeletedEvent, type ThreadMarkedAsResolvedEvent, type ThreadMarkedAsUnresolvedEvent, type ThreadMetadataUpdatedEvent, type ThreadNotificationEvent, type ThreadParticipants, type UpdateRoomOptions, type UpsertRoomOptions, type UserEnteredEvent, type UserLeftEvent, 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, SubscriptionData, Patchable, CommentUserReaction, InboxNotificationData, UserRoomSubscriptionSettings, RoomSubscriptionSettings, KDAD, DAD, NotificationSettings, PartialNotificationSettings, LsonObject, ToImmutable, PartialUnless, BaseMetadata, DE, DM, NotificationChannel } from '@liveblocks/core';
1
+ import { BaseUserMeta, DU, LiveObject, Awaitable, DS, OptionalTupleUnless, PlainLsonObject, JsonObject, QueryMetadata, ThreadData, UserSubscriptionData, CommentData, CommentBody, SubscriptionData, Patchable, CommentUserReaction, InboxNotificationData, UserRoomSubscriptionSettings, RoomSubscriptionSettings, KDAD, DAD, NotificationSettings, PartialNotificationSettings, LsonObject, ToImmutable, PartialUnless, BaseMetadata, Json, DE, DM, 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
 
@@ -120,66 +120,33 @@ type RoomData = {
120
120
  groupsAccesses: RoomAccesses;
121
121
  metadata: RoomMetadata;
122
122
  };
123
- type AiCopilotProviderSettings = {
124
- maxTokens?: number;
125
- temperature?: number;
126
- topP?: number;
127
- topK?: number;
128
- frequencyPenalty?: number;
129
- presencePenalty?: number;
130
- stopSequences?: string[];
131
- seed?: number;
132
- maxRetries?: number;
133
- };
134
- type OpenAiModel = "o1" | "o1-mini" | "o3" | "o3-mini" | "o4-mini" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-nano" | "gpt-4o" | "gpt-4o-mini" | "gpt-4-turbo" | "gpt-4";
135
- type OpenAiProviderOptions = {
136
- openai: {
137
- reasoningEffort: "low" | "medium" | "high";
138
- };
139
- };
140
- type AnthropicModel = "claude-4-opus-20250514" | "claude-4-sonnet-20250514" | "claude-3-7-sonnet-20250219" | "claude-3-5-sonnet-latest" | "claude-3-5-haiku-latest" | "claude-3-opus-latest";
141
- type AnthropicProviderOptions = {
142
- anthropic: {
143
- thinking: {
144
- type: "enabled" | "disabled";
145
- budgetToken: number;
146
- };
147
- };
148
- };
149
- type GoogleModel = "gemini-2.5-flash" | "gemini-2.5-pro" | "gemini-2.0-flash-001" | "gemini-1.5-flash" | "gemini-1.5-pro";
150
- type GoogleProviderOptions = {
151
- google: {
152
- thinkingConfig: {
153
- thinkingBudget: number;
154
- };
155
- };
156
- };
157
123
  type AiCopilot = {
158
124
  type: "copilot";
159
125
  id: string;
160
126
  name: string;
161
- description?: string;
162
127
  systemPrompt: string;
163
128
  knowledgePrompt?: string;
129
+ description?: string;
164
130
  createdAt: Date;
165
131
  updatedAt: Date;
166
132
  lastUsedAt?: Date;
167
- settings?: AiCopilotProviderSettings;
133
+ providerModel: string;
134
+ providerOptions?: Record<string, Record<string, string | Json>>;
135
+ settings?: {
136
+ maxTokens?: number;
137
+ temperature?: number;
138
+ topP?: number;
139
+ topK?: number;
140
+ frequencyPenalty?: number;
141
+ presencePenalty?: number;
142
+ stopSequences?: string[];
143
+ seed?: number;
144
+ maxRetries?: number;
145
+ };
168
146
  } & ({
169
- provider: "openai";
170
- providerModel: OpenAiModel;
171
- providerOptions?: OpenAiProviderOptions;
172
- } | {
173
- provider: "anthropic";
174
- providerModel: AnthropicModel;
175
- providerOptions?: AnthropicProviderOptions;
176
- } | {
177
- provider: "google";
178
- providerModel: GoogleModel;
179
- providerOptions?: GoogleProviderOptions;
147
+ provider: "openai" | "anthropic" | "google";
180
148
  } | {
181
149
  provider: "openai-compatible";
182
- providerModel: string;
183
150
  compatibleProviderName: string;
184
151
  providerBaseUrl: string;
185
152
  });
@@ -300,63 +267,50 @@ type UpsertRoomOptions = {
300
267
  update: UpdateRoomOptions;
301
268
  create?: CreateRoomOptions;
302
269
  };
303
- type GetAiCopilotsOptions = PaginationOptions;
270
+ type ProviderSettings = {
271
+ maxTokens?: number;
272
+ temperature?: number;
273
+ topP?: number;
274
+ topK?: number;
275
+ frequencyPenalty?: number;
276
+ presencePenalty?: number;
277
+ stopSequences?: string[];
278
+ seed?: number;
279
+ maxRetries?: number;
280
+ };
304
281
  type CreateAiCopilotOptions = {
305
282
  name: string;
283
+ providerApiKey: string;
284
+ providerModel: string;
306
285
  description?: string;
307
286
  systemPrompt: string;
308
287
  knowledgePrompt?: string;
309
- settings?: AiCopilotProviderSettings;
310
- providerApiKey: string;
288
+ providerOptions?: Record<string, Record<string, string | Json>>;
289
+ settings?: ProviderSettings;
311
290
  } & ({
312
- provider: "openai";
313
- providerModel: OpenAiModel;
314
- providerOptions?: OpenAiProviderOptions;
315
- } | {
316
- provider: "anthropic";
317
- providerModel: AnthropicModel;
318
- providerOptions?: AnthropicProviderOptions;
319
- } | {
320
- provider: "google";
321
- providerModel: GoogleModel;
322
- providerOptions?: GoogleProviderOptions;
291
+ provider: "openai" | "anthropic" | "google";
323
292
  } | {
324
293
  provider: "openai-compatible";
325
- providerModel: string;
326
294
  compatibleProviderName: string;
327
295
  providerBaseUrl: string;
328
296
  });
329
297
  type UpdateAiCopilotOptions = {
330
298
  name?: string;
299
+ providerApiKey?: string;
300
+ providerModel?: string;
331
301
  description?: string | null;
332
302
  systemPrompt?: string;
333
303
  knowledgePrompt?: string | null;
334
- settings?: AiCopilotProviderSettings | null;
335
- providerApiKey?: string;
304
+ providerOptions?: Record<string, Record<string, string | Json>> | null;
305
+ settings?: ProviderSettings | null;
336
306
  } & ({
337
- provider?: "openai";
338
- providerModel?: OpenAiModel;
339
- providerOptions?: OpenAiProviderOptions | null;
340
- compatibleProviderName?: never;
341
- providerBaseUrl?: never;
342
- } | {
343
- provider?: "anthropic";
344
- providerModel?: AnthropicModel;
345
- providerOptions?: AnthropicProviderOptions | null;
346
- compatibleProviderName?: never;
347
- providerBaseUrl?: never;
348
- } | {
349
- provider?: "google";
350
- providerModel?: GoogleModel;
351
- providerOptions?: GoogleProviderOptions | null;
352
- compatibleProviderName?: never;
353
- providerBaseUrl?: never;
307
+ provider?: "openai" | "anthropic" | "google";
308
+ compatibleProviderName?: null;
309
+ providerBaseUrl?: null;
354
310
  } | {
355
311
  provider?: "openai-compatible";
356
- providerModel?: string;
357
312
  compatibleProviderName?: string;
358
313
  providerBaseUrl?: string;
359
- providerOptions?: never;
360
314
  });
361
315
  type CreateWebKnowledgeSourceOptions = {
362
316
  copilotId: string;
@@ -1656,4 +1610,4 @@ declare function isTextMentionNotificationEvent(event: WebhookEvent): event is T
1656
1610
  */
1657
1611
  declare function isCustomNotificationEvent(event: WebhookEvent): event is CustomNotificationEvent;
1658
1612
 
1659
- 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 Schema, 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 };
1613
+ export { type CommentCreatedEvent, type CommentDeletedEvent, type CommentEditedEvent, type CommentReactionAdded, type CommentReactionRemoved, type CreateRoomOptions, type CustomNotificationEvent, type GetInboxNotificationsOptions, type GetRoomsOptions, type InboxNotificationsQueryCriteria, 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 Schema, type StorageUpdatedEvent, type TextMentionNotificationEvent, type ThreadCreatedEvent, type ThreadDeletedEvent, type ThreadMarkedAsResolvedEvent, type ThreadMarkedAsUnresolvedEvent, type ThreadMetadataUpdatedEvent, type ThreadNotificationEvent, type ThreadParticipants, type UpdateRoomOptions, type UpsertRoomOptions, type UserEnteredEvent, type UserLeftEvent, type WebhookEvent, WebhookHandler, type WebhookRequest, type YDocUpdatedEvent, isCustomNotificationEvent, isTextMentionNotificationEvent, isThreadNotificationEvent };
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.5.3";
6
+ var PKG_VERSION = "3.5.4";
7
7
  var PKG_FORMAT = "esm";
8
8
 
9
9
  // src/client.ts