@liveblocks/node 3.4.2 → 3.5.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.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,6 +120,36 @@ type RoomData = {
120
120
  groupsAccesses: RoomAccesses;
121
121
  metadata: RoomMetadata;
122
122
  };
123
+ type AiCopilot = {
124
+ type: "copilot";
125
+ id: string;
126
+ name: string;
127
+ systemPrompt: string;
128
+ knowledgePrompt?: string;
129
+ description?: string;
130
+ createdAt: Date;
131
+ updatedAt: Date;
132
+ lastUsedAt?: Date;
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
+ };
146
+ } & ({
147
+ provider: "openai" | "anthropic" | "google";
148
+ } | {
149
+ provider: "openai-compatible";
150
+ compatibleProviderName: string;
151
+ providerBaseUrl: string;
152
+ });
123
153
  type RoomUser<U extends BaseUserMeta = DU> = {
124
154
  type: "user";
125
155
  id: string | null;
@@ -237,6 +267,97 @@ type UpsertRoomOptions = {
237
267
  update: UpdateRoomOptions;
238
268
  create?: CreateRoomOptions;
239
269
  };
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
+ };
281
+ type CreateAiCopilotOptions = {
282
+ name: string;
283
+ providerApiKey: string;
284
+ providerModel: string;
285
+ description?: string;
286
+ systemPrompt: string;
287
+ knowledgePrompt?: string;
288
+ providerOptions?: Record<string, Record<string, string | Json>>;
289
+ settings?: ProviderSettings;
290
+ } & ({
291
+ provider: "openai" | "anthropic" | "google";
292
+ } | {
293
+ provider: "openai-compatible";
294
+ compatibleProviderName: string;
295
+ providerBaseUrl: string;
296
+ });
297
+ type UpdateAiCopilotOptions = {
298
+ name?: string;
299
+ providerApiKey?: string;
300
+ providerModel?: string;
301
+ description?: string | null;
302
+ systemPrompt?: string;
303
+ knowledgePrompt?: string | null;
304
+ providerOptions?: Record<string, Record<string, string | Json>> | null;
305
+ settings?: ProviderSettings | null;
306
+ } & ({
307
+ provider?: "openai" | "anthropic" | "google";
308
+ compatibleProviderName?: null;
309
+ providerBaseUrl?: null;
310
+ } | {
311
+ provider?: "openai-compatible";
312
+ compatibleProviderName?: string;
313
+ providerBaseUrl?: string;
314
+ });
315
+ type CreateWebKnowledgeSourceOptions = {
316
+ copilotId: string;
317
+ url: string;
318
+ type: "individual_link" | "crawl" | "sitemap";
319
+ };
320
+ type CreateFileKnowledgeSourceOptions = {
321
+ copilotId: string;
322
+ file: File;
323
+ };
324
+ type GetKnowledgeSourcesOptions = {
325
+ copilotId: string;
326
+ } & PaginationOptions;
327
+ type GetWebKnowledgeSourceLinksOptions = {
328
+ copilotId: string;
329
+ knowledgeSourceId: string;
330
+ } & PaginationOptions;
331
+ type KnowledgeSource = ({
332
+ type: "ai-knowledge-web-source";
333
+ link: {
334
+ url: string;
335
+ type: "individual_link" | "crawl" | "sitemap";
336
+ };
337
+ } | {
338
+ type: "ai-knowledge-file-source";
339
+ file: {
340
+ name: string;
341
+ mimeType: string;
342
+ };
343
+ }) & {
344
+ id: string;
345
+ createdAt: Date;
346
+ updatedAt: Date;
347
+ lastIndexedAt: Date;
348
+ } & ({
349
+ status: "ingesting" | "ready";
350
+ } | {
351
+ status: "error";
352
+ errorMessage: string;
353
+ });
354
+ type WebKnowledgeSourceLink = {
355
+ id: string;
356
+ url: string;
357
+ status: "ingesting" | "ready" | "error";
358
+ createdAt: Date;
359
+ lastIndexedAt: Date;
360
+ };
240
361
  type RequestOptions = {
241
362
  signal?: AbortSignal;
242
363
  };
@@ -982,6 +1103,122 @@ declare class Liveblocks {
982
1103
  * `concurrency` to 1.
983
1104
  */
984
1105
  massMutateStorage(criteria: RoomsQueryCriteria, callback: MassMutateStorageCallback, massOptions?: MassMutateStorageOptions): Promise<void>;
1106
+ /**
1107
+ * Returns a paginated list of AI copilots. The copilots are returned sorted by creation date, from newest to oldest.
1108
+ * @param params.limit (optional) A limit on the number of copilots to return. The limit can range between 1 and 100, and defaults to 20.
1109
+ * @param params.startingAfter (optional) A cursor used for pagination. You get the value from the response of the previous page.
1110
+ * @param options.signal (optional) An abort signal to cancel the request.
1111
+ * @returns A paginated list of AI copilots.
1112
+ */
1113
+ getAiCopilots(params?: PaginationOptions, options?: RequestOptions): Promise<Page<AiCopilot>>;
1114
+ /**
1115
+ * Creates an AI copilot.
1116
+ * @param params The parameters to create the copilot with.
1117
+ * @returns The created copilot.
1118
+ */
1119
+ createAiCopilot(params: CreateAiCopilotOptions, options?: RequestOptions): Promise<AiCopilot>;
1120
+ /**
1121
+ * Returns an AI copilot with the given id.
1122
+ * @param copilotId The id of the copilot to return.
1123
+ * @returns The copilot with the given id.
1124
+ * @param options.signal (optional) An abort signal to cancel the request.
1125
+ */
1126
+ getAiCopilot(copilotId: string, options?: RequestOptions): Promise<AiCopilot>;
1127
+ /**
1128
+ * Updates an AI copilot with the given id.
1129
+ * @param copilotId The id of the copilot to update.
1130
+ * @param params The parameters to update the copilot with.
1131
+ * @returns The updated copilot.
1132
+ */
1133
+ updateAiCopilot(copilotId: string, params: UpdateAiCopilotOptions, options?: RequestOptions): Promise<AiCopilot>;
1134
+ /**
1135
+ * Deletes an AI copilot with the given id. A deleted copilot is no longer accessible from the API or the dashboard and it cannot be restored.
1136
+ * @param copilotId The id of the copilot to delete.
1137
+ * @param options.signal (optional) An abort signal to cancel the request.
1138
+ */
1139
+ deleteAiCopilot(copilotId: string, options?: RequestOptions): Promise<void>;
1140
+ /**
1141
+ * Creates a web knowledge source.
1142
+ * @param params.url The URL of the web knowledge source.
1143
+ * @param params.type The type of the web knowledge source: "individual_link", "crawl" or "sitemap".
1144
+ * @param options.signal (optional) An abort signal to cancel the request.
1145
+ * @returns The id of the created web knowledge source.
1146
+ */
1147
+ createWebKnowledgeSource(params: CreateWebKnowledgeSourceOptions, options?: RequestOptions): Promise<{
1148
+ id: string;
1149
+ }>;
1150
+ /**
1151
+ * Creates a file knowledge source.
1152
+ * @param params.copilotId The id of the copilot.
1153
+ * @param params.name The name of the file knowledge source.
1154
+ * @param params.file The file to create the knowledge source from.
1155
+ * @param options.signal (optional) An abort signal to cancel the request.
1156
+ * @returns The id of the created file knowledge source.
1157
+ */
1158
+ createFileKnowledgeSource(params: CreateFileKnowledgeSourceOptions, options?: RequestOptions): Promise<{
1159
+ id: string;
1160
+ }>;
1161
+ /**
1162
+ * Deletes a file knowledge source.
1163
+ * @param params.copilotId The id of the copilot.
1164
+ * @param params.knowledgeSourceId The id of the knowledge source to delete.
1165
+ * @param options.signal (optional) An abort signal to cancel the request.
1166
+ */
1167
+ deleteFileKnowledgeSource(params: {
1168
+ copilotId: string;
1169
+ knowledgeSourceId: string;
1170
+ }, options?: RequestOptions): Promise<void>;
1171
+ /**
1172
+ * Deletes a web knowledge source.
1173
+ * @param params.copilotId The id of the copilot.
1174
+ * @param params.knowledgeSourceId The id of the knowledge source to delete.
1175
+ * @param options.signal (optional) An abort signal to cancel the request.
1176
+ */
1177
+ deleteWebKnowledgeSource(params: {
1178
+ copilotId: string;
1179
+ knowledgeSourceId: string;
1180
+ }, options?: RequestOptions): Promise<void>;
1181
+ /**
1182
+ * Returns a paginated list of knowledge sources.
1183
+ * @param params.copilotId The id of the copilot.
1184
+ * @param params.limit (optional) A limit on the number of knowledge sources to return. The limit can range between 1 and 100, and defaults to 20.
1185
+ * @param params.startingAfter (optional) A cursor used for pagination. You get the value from the response of the previous page.
1186
+ * @param options.signal (optional) An abort signal to cancel the request.
1187
+ * @returns A paginated list of knowledge sources.
1188
+ */
1189
+ getKnowledgeSources(params: GetKnowledgeSourcesOptions, options?: RequestOptions): Promise<Page<KnowledgeSource>>;
1190
+ /**
1191
+ * Returns a knowledge source with the given id.
1192
+ * @param params.copilotId The id of the copilot.
1193
+ * @param params.knowledgeSourceId The id of the knowledge source to return.
1194
+ * @param options.signal (optional) An abort signal to cancel the request.
1195
+ * @returns The knowledge source.
1196
+ */
1197
+ getKnowledgeSource(params: {
1198
+ copilotId: string;
1199
+ knowledgeSourceId: string;
1200
+ }, options?: RequestOptions): Promise<KnowledgeSource>;
1201
+ /**
1202
+ * Returns the content of a file knowledge source.
1203
+ * @param params.copilotId The id of the copilot.
1204
+ * @param params.knowledgeSourceId The id of the knowledge source.
1205
+ * @param options.signal (optional) An abort signal to cancel the request.
1206
+ * @returns The content of the file knowledge source.
1207
+ */
1208
+ getFileKnowledgeSourceMarkdown(params: {
1209
+ copilotId: string;
1210
+ knowledgeSourceId: string;
1211
+ }, options?: RequestOptions): Promise<string>;
1212
+ /**
1213
+ * Returns a paginated list of web knowledge source links.
1214
+ * @param params.copilotId The id of the copilot.
1215
+ * @param params.knowledgeSourceId The id of the knowledge source.
1216
+ * @param params.limit (optional) A limit on the number of links to return. The limit can range between 1 and 100, and defaults to 20.
1217
+ * @param params.startingAfter (optional) A cursor used for pagination. You get the value from the response of the previous page.
1218
+ * @param options.signal (optional) An abort signal to cancel the request.
1219
+ * @returns A paginated list of web knowledge source links.
1220
+ */
1221
+ getWebKnowledgeSourceLinks(params: GetWebKnowledgeSourceLinksOptions, options?: RequestOptions): Promise<Page<WebKnowledgeSourceLink>>;
985
1222
  }
986
1223
  declare class LiveblocksError extends Error {
987
1224
  readonly status: number;
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,6 +120,36 @@ type RoomData = {
120
120
  groupsAccesses: RoomAccesses;
121
121
  metadata: RoomMetadata;
122
122
  };
123
+ type AiCopilot = {
124
+ type: "copilot";
125
+ id: string;
126
+ name: string;
127
+ systemPrompt: string;
128
+ knowledgePrompt?: string;
129
+ description?: string;
130
+ createdAt: Date;
131
+ updatedAt: Date;
132
+ lastUsedAt?: Date;
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
+ };
146
+ } & ({
147
+ provider: "openai" | "anthropic" | "google";
148
+ } | {
149
+ provider: "openai-compatible";
150
+ compatibleProviderName: string;
151
+ providerBaseUrl: string;
152
+ });
123
153
  type RoomUser<U extends BaseUserMeta = DU> = {
124
154
  type: "user";
125
155
  id: string | null;
@@ -237,6 +267,97 @@ type UpsertRoomOptions = {
237
267
  update: UpdateRoomOptions;
238
268
  create?: CreateRoomOptions;
239
269
  };
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
+ };
281
+ type CreateAiCopilotOptions = {
282
+ name: string;
283
+ providerApiKey: string;
284
+ providerModel: string;
285
+ description?: string;
286
+ systemPrompt: string;
287
+ knowledgePrompt?: string;
288
+ providerOptions?: Record<string, Record<string, string | Json>>;
289
+ settings?: ProviderSettings;
290
+ } & ({
291
+ provider: "openai" | "anthropic" | "google";
292
+ } | {
293
+ provider: "openai-compatible";
294
+ compatibleProviderName: string;
295
+ providerBaseUrl: string;
296
+ });
297
+ type UpdateAiCopilotOptions = {
298
+ name?: string;
299
+ providerApiKey?: string;
300
+ providerModel?: string;
301
+ description?: string | null;
302
+ systemPrompt?: string;
303
+ knowledgePrompt?: string | null;
304
+ providerOptions?: Record<string, Record<string, string | Json>> | null;
305
+ settings?: ProviderSettings | null;
306
+ } & ({
307
+ provider?: "openai" | "anthropic" | "google";
308
+ compatibleProviderName?: null;
309
+ providerBaseUrl?: null;
310
+ } | {
311
+ provider?: "openai-compatible";
312
+ compatibleProviderName?: string;
313
+ providerBaseUrl?: string;
314
+ });
315
+ type CreateWebKnowledgeSourceOptions = {
316
+ copilotId: string;
317
+ url: string;
318
+ type: "individual_link" | "crawl" | "sitemap";
319
+ };
320
+ type CreateFileKnowledgeSourceOptions = {
321
+ copilotId: string;
322
+ file: File;
323
+ };
324
+ type GetKnowledgeSourcesOptions = {
325
+ copilotId: string;
326
+ } & PaginationOptions;
327
+ type GetWebKnowledgeSourceLinksOptions = {
328
+ copilotId: string;
329
+ knowledgeSourceId: string;
330
+ } & PaginationOptions;
331
+ type KnowledgeSource = ({
332
+ type: "ai-knowledge-web-source";
333
+ link: {
334
+ url: string;
335
+ type: "individual_link" | "crawl" | "sitemap";
336
+ };
337
+ } | {
338
+ type: "ai-knowledge-file-source";
339
+ file: {
340
+ name: string;
341
+ mimeType: string;
342
+ };
343
+ }) & {
344
+ id: string;
345
+ createdAt: Date;
346
+ updatedAt: Date;
347
+ lastIndexedAt: Date;
348
+ } & ({
349
+ status: "ingesting" | "ready";
350
+ } | {
351
+ status: "error";
352
+ errorMessage: string;
353
+ });
354
+ type WebKnowledgeSourceLink = {
355
+ id: string;
356
+ url: string;
357
+ status: "ingesting" | "ready" | "error";
358
+ createdAt: Date;
359
+ lastIndexedAt: Date;
360
+ };
240
361
  type RequestOptions = {
241
362
  signal?: AbortSignal;
242
363
  };
@@ -982,6 +1103,122 @@ declare class Liveblocks {
982
1103
  * `concurrency` to 1.
983
1104
  */
984
1105
  massMutateStorage(criteria: RoomsQueryCriteria, callback: MassMutateStorageCallback, massOptions?: MassMutateStorageOptions): Promise<void>;
1106
+ /**
1107
+ * Returns a paginated list of AI copilots. The copilots are returned sorted by creation date, from newest to oldest.
1108
+ * @param params.limit (optional) A limit on the number of copilots to return. The limit can range between 1 and 100, and defaults to 20.
1109
+ * @param params.startingAfter (optional) A cursor used for pagination. You get the value from the response of the previous page.
1110
+ * @param options.signal (optional) An abort signal to cancel the request.
1111
+ * @returns A paginated list of AI copilots.
1112
+ */
1113
+ getAiCopilots(params?: PaginationOptions, options?: RequestOptions): Promise<Page<AiCopilot>>;
1114
+ /**
1115
+ * Creates an AI copilot.
1116
+ * @param params The parameters to create the copilot with.
1117
+ * @returns The created copilot.
1118
+ */
1119
+ createAiCopilot(params: CreateAiCopilotOptions, options?: RequestOptions): Promise<AiCopilot>;
1120
+ /**
1121
+ * Returns an AI copilot with the given id.
1122
+ * @param copilotId The id of the copilot to return.
1123
+ * @returns The copilot with the given id.
1124
+ * @param options.signal (optional) An abort signal to cancel the request.
1125
+ */
1126
+ getAiCopilot(copilotId: string, options?: RequestOptions): Promise<AiCopilot>;
1127
+ /**
1128
+ * Updates an AI copilot with the given id.
1129
+ * @param copilotId The id of the copilot to update.
1130
+ * @param params The parameters to update the copilot with.
1131
+ * @returns The updated copilot.
1132
+ */
1133
+ updateAiCopilot(copilotId: string, params: UpdateAiCopilotOptions, options?: RequestOptions): Promise<AiCopilot>;
1134
+ /**
1135
+ * Deletes an AI copilot with the given id. A deleted copilot is no longer accessible from the API or the dashboard and it cannot be restored.
1136
+ * @param copilotId The id of the copilot to delete.
1137
+ * @param options.signal (optional) An abort signal to cancel the request.
1138
+ */
1139
+ deleteAiCopilot(copilotId: string, options?: RequestOptions): Promise<void>;
1140
+ /**
1141
+ * Creates a web knowledge source.
1142
+ * @param params.url The URL of the web knowledge source.
1143
+ * @param params.type The type of the web knowledge source: "individual_link", "crawl" or "sitemap".
1144
+ * @param options.signal (optional) An abort signal to cancel the request.
1145
+ * @returns The id of the created web knowledge source.
1146
+ */
1147
+ createWebKnowledgeSource(params: CreateWebKnowledgeSourceOptions, options?: RequestOptions): Promise<{
1148
+ id: string;
1149
+ }>;
1150
+ /**
1151
+ * Creates a file knowledge source.
1152
+ * @param params.copilotId The id of the copilot.
1153
+ * @param params.name The name of the file knowledge source.
1154
+ * @param params.file The file to create the knowledge source from.
1155
+ * @param options.signal (optional) An abort signal to cancel the request.
1156
+ * @returns The id of the created file knowledge source.
1157
+ */
1158
+ createFileKnowledgeSource(params: CreateFileKnowledgeSourceOptions, options?: RequestOptions): Promise<{
1159
+ id: string;
1160
+ }>;
1161
+ /**
1162
+ * Deletes a file knowledge source.
1163
+ * @param params.copilotId The id of the copilot.
1164
+ * @param params.knowledgeSourceId The id of the knowledge source to delete.
1165
+ * @param options.signal (optional) An abort signal to cancel the request.
1166
+ */
1167
+ deleteFileKnowledgeSource(params: {
1168
+ copilotId: string;
1169
+ knowledgeSourceId: string;
1170
+ }, options?: RequestOptions): Promise<void>;
1171
+ /**
1172
+ * Deletes a web knowledge source.
1173
+ * @param params.copilotId The id of the copilot.
1174
+ * @param params.knowledgeSourceId The id of the knowledge source to delete.
1175
+ * @param options.signal (optional) An abort signal to cancel the request.
1176
+ */
1177
+ deleteWebKnowledgeSource(params: {
1178
+ copilotId: string;
1179
+ knowledgeSourceId: string;
1180
+ }, options?: RequestOptions): Promise<void>;
1181
+ /**
1182
+ * Returns a paginated list of knowledge sources.
1183
+ * @param params.copilotId The id of the copilot.
1184
+ * @param params.limit (optional) A limit on the number of knowledge sources to return. The limit can range between 1 and 100, and defaults to 20.
1185
+ * @param params.startingAfter (optional) A cursor used for pagination. You get the value from the response of the previous page.
1186
+ * @param options.signal (optional) An abort signal to cancel the request.
1187
+ * @returns A paginated list of knowledge sources.
1188
+ */
1189
+ getKnowledgeSources(params: GetKnowledgeSourcesOptions, options?: RequestOptions): Promise<Page<KnowledgeSource>>;
1190
+ /**
1191
+ * Returns a knowledge source with the given id.
1192
+ * @param params.copilotId The id of the copilot.
1193
+ * @param params.knowledgeSourceId The id of the knowledge source to return.
1194
+ * @param options.signal (optional) An abort signal to cancel the request.
1195
+ * @returns The knowledge source.
1196
+ */
1197
+ getKnowledgeSource(params: {
1198
+ copilotId: string;
1199
+ knowledgeSourceId: string;
1200
+ }, options?: RequestOptions): Promise<KnowledgeSource>;
1201
+ /**
1202
+ * Returns the content of a file knowledge source.
1203
+ * @param params.copilotId The id of the copilot.
1204
+ * @param params.knowledgeSourceId The id of the knowledge source.
1205
+ * @param options.signal (optional) An abort signal to cancel the request.
1206
+ * @returns The content of the file knowledge source.
1207
+ */
1208
+ getFileKnowledgeSourceMarkdown(params: {
1209
+ copilotId: string;
1210
+ knowledgeSourceId: string;
1211
+ }, options?: RequestOptions): Promise<string>;
1212
+ /**
1213
+ * Returns a paginated list of web knowledge source links.
1214
+ * @param params.copilotId The id of the copilot.
1215
+ * @param params.knowledgeSourceId The id of the knowledge source.
1216
+ * @param params.limit (optional) A limit on the number of links to return. The limit can range between 1 and 100, and defaults to 20.
1217
+ * @param params.startingAfter (optional) A cursor used for pagination. You get the value from the response of the previous page.
1218
+ * @param options.signal (optional) An abort signal to cancel the request.
1219
+ * @returns A paginated list of web knowledge source links.
1220
+ */
1221
+ getWebKnowledgeSourceLinks(params: GetWebKnowledgeSourceLinksOptions, options?: RequestOptions): Promise<Page<WebKnowledgeSourceLink>>;
985
1222
  }
986
1223
  declare class LiveblocksError extends Error {
987
1224
  readonly status: number;