@base44-preview/sdk 0.8.57-pr.361.dda0ab9 → 0.8.57-pr.362.129f8e2
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.
|
@@ -193,7 +193,7 @@ export interface AgentsModuleConfig {
|
|
|
193
193
|
*
|
|
194
194
|
* This module is available to use with a client in all authentication modes:
|
|
195
195
|
*
|
|
196
|
-
* - **Anonymous or User authentication** (`base44.agents`): Access is scoped to the current user's permissions. Users must be authenticated to create and access conversations.
|
|
196
|
+
* - **Anonymous or User authentication** (`base44.agents`): Access is scoped to the current user's permissions. Users must be authenticated to create and access conversations. Each user can read and add messages only to conversations they created.
|
|
197
197
|
* - **Service role authentication** (`base44.asServiceRole.agents`): Operations are invoked with the service role for backend code that needs elevated permissions.
|
|
198
198
|
*
|
|
199
199
|
* ## Generated Types
|
|
@@ -222,7 +222,7 @@ export interface AgentsModule {
|
|
|
222
222
|
/**
|
|
223
223
|
* Gets a specific conversation by ID.
|
|
224
224
|
*
|
|
225
|
-
* Retrieves a single conversation using its unique identifier. To retrieve
|
|
225
|
+
* Retrieves a single conversation using its unique identifier. The conversation must belong to the current user. If another user created it, the request fails with a `403` error. To retrieve
|
|
226
226
|
* all of the current user's conversations, use {@linkcode getConversations | getConversations()}. To filter, sort, or paginate conversations, use {@linkcode listConversations | listConversations()}.
|
|
227
227
|
*
|
|
228
228
|
* This function returns the complete stored conversation including full tool call results, even for large responses.
|
|
@@ -239,14 +239,14 @@ export interface AgentsModule {
|
|
|
239
239
|
* }
|
|
240
240
|
* ```
|
|
241
241
|
*
|
|
242
|
-
* @see {@linkcode getConversations | getConversations()} for retrieving all conversations
|
|
242
|
+
* @see {@linkcode getConversations | getConversations()} for retrieving all of the current user's conversations
|
|
243
243
|
* @see {@linkcode listConversations | listConversations()} for filtering and sorting conversations
|
|
244
244
|
*/
|
|
245
245
|
getConversation(conversationId: string): Promise<AgentConversation | undefined>;
|
|
246
246
|
/**
|
|
247
|
-
* Lists conversations with filtering, sorting, and pagination.
|
|
247
|
+
* Lists the current user's conversations with filtering, sorting, and pagination.
|
|
248
248
|
*
|
|
249
|
-
* Provides querying capabilities including filtering by fields, sorting, pagination, and field selection. For cases where you need all of the current user's conversations without filtering, use {@linkcode getConversations | getConversations()}. To retrieve a specific conversation by ID, use {@linkcode getConversation | getConversation()}.
|
|
249
|
+
* Provides querying capabilities including filtering by fields, sorting, pagination, and field selection. Results only include conversations the current user created, even if `q` filters on a different `created_by_id`. For cases where you need all of the current user's conversations without filtering, use {@linkcode getConversations | getConversations()}. To retrieve a specific conversation by ID, use {@linkcode getConversation | getConversation()}.
|
|
250
250
|
*
|
|
251
251
|
* @param filterParams - Filter parameters for querying conversations.
|
|
252
252
|
* @returns Promise resolving to an array of filtered conversations.
|
|
@@ -273,13 +273,15 @@ export interface AgentsModule {
|
|
|
273
273
|
* });
|
|
274
274
|
* ```
|
|
275
275
|
*
|
|
276
|
-
* @see {@linkcode getConversations | getConversations()} for retrieving all conversations without filtering
|
|
276
|
+
* @see {@linkcode getConversations | getConversations()} for retrieving all of the current user's conversations without filtering
|
|
277
277
|
* @see {@linkcode getConversation | getConversation()} for retrieving a specific conversation by ID
|
|
278
278
|
*/
|
|
279
279
|
listConversations(filterParams: ModelFilterParams): Promise<AgentConversation[]>;
|
|
280
280
|
/**
|
|
281
281
|
* Creates a new conversation with an agent.
|
|
282
282
|
*
|
|
283
|
+
* The conversation belongs to the current user. Only that user can read it or add messages to it.
|
|
284
|
+
*
|
|
283
285
|
* @param conversation - Conversation details including agent name and optional metadata.
|
|
284
286
|
* @returns Promise resolving to the created conversation.
|
|
285
287
|
*
|
|
@@ -301,7 +303,7 @@ export interface AgentsModule {
|
|
|
301
303
|
/**
|
|
302
304
|
* Adds a message to a conversation.
|
|
303
305
|
*
|
|
304
|
-
* Sends a message to the agent and updates the conversation. This method
|
|
306
|
+
* Sends a message to the agent and updates the conversation. You can only add messages to conversations the current user created. This method
|
|
305
307
|
* also updates the realtime socket to notify any subscribers.
|
|
306
308
|
*
|
|
307
309
|
* @param conversation - The conversation to add the message to.
|
|
@@ -323,7 +325,7 @@ export interface AgentsModule {
|
|
|
323
325
|
* Subscribes to realtime updates for a conversation.
|
|
324
326
|
*
|
|
325
327
|
* Establishes a WebSocket connection to receive instant updates when new
|
|
326
|
-
* messages are added to the conversation. Returns an unsubscribe function
|
|
328
|
+
* messages are added to the conversation. You can only subscribe to conversations the current user created. Returns an unsubscribe function
|
|
327
329
|
* to clean up the connection.
|
|
328
330
|
*
|
|
329
331
|
* <Note>
|
|
@@ -777,6 +777,8 @@ export interface EntityHandler<T = any> {
|
|
|
777
777
|
* records first and then updates them. Learn more about
|
|
778
778
|
* [concurrent updates](/developers/backend/resources/entities/entity-schemas#concurrent-updates).
|
|
779
779
|
*
|
|
780
|
+
* This method isn't available for the built-in `User` entity, and calling it fails with a 405 error.
|
|
781
|
+
*
|
|
780
782
|
* To update a single record by ID, use {@linkcode update | update()} instead. To update
|
|
781
783
|
* multiple specific records with different data each, use {@linkcode bulkUpdate | bulkUpdate()}.
|
|
782
784
|
*
|
|
@@ -1017,6 +1019,8 @@ export interface EntityHandler<T = any> {
|
|
|
1017
1019
|
*
|
|
1018
1020
|
* You can update up to 500 records per request.
|
|
1019
1021
|
*
|
|
1022
|
+
* This method isn't available for the built-in `User` entity, and calling it fails with a 405 error.
|
|
1023
|
+
*
|
|
1020
1024
|
* This isn't a transaction. Each record is written on its own, so if the call
|
|
1021
1025
|
* fails partway, the records already written stay written. Learn more about
|
|
1022
1026
|
* [concurrent updates](/developers/backend/resources/entities/entity-schemas#concurrent-updates).
|