@base44-preview/sdk 0.8.57-pr.362.129f8e2 → 0.8.57-pr.362.2ee7c13

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,8 +193,8 @@ 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. Each user can read and add messages only to conversations they created.
197
- * - **Service role authentication** (`base44.asServiceRole.agents`): Operations are invoked with the service role for backend code that needs elevated permissions.
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, even if they have the admin role.
197
+ * - **Service role authentication** (`base44.asServiceRole.agents`): Operations are invoked with the service role for backend code that needs elevated permissions. This module only reaches conversations created through the service role, so it doesn't give your backend access to conversations that individual users created.
198
198
  *
199
199
  * ## Generated Types
200
200
  *
@@ -204,7 +204,7 @@ export interface AgentsModule {
204
204
  /**
205
205
  * Gets the current user's conversations with all agents in the app.
206
206
  *
207
- * Retrieves every conversation the current user started, across all agents. Conversations that other users started aren't included. Use {@linkcode listConversations | listConversations()} to filter which conversations are returned, apply sorting, or paginate results. Use {@linkcode getConversation | getConversation()} to retrieve a specific conversation by ID.
207
+ * Retrieves every conversation the current user started, across all agents. Conversations that other users started aren't included, even if the current user has the admin role. When you call this method through `base44.asServiceRole.agents`, it returns only the conversations created through the service role, not the conversations that your users created. Use {@linkcode listConversations | listConversations()} to filter which conversations are returned, apply sorting, or paginate results. Use {@linkcode getConversation | getConversation()} to retrieve a specific conversation by ID.
208
208
  *
209
209
  * @returns Promise resolving to an array of conversations.
210
210
  *
@@ -222,13 +222,13 @@ export interface AgentsModule {
222
222
  /**
223
223
  * Gets a specific conversation by ID.
224
224
  *
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
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. If no conversation has that ID, the request fails with a `404` 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.
229
229
  *
230
230
  * @param conversationId - The unique identifier of the conversation.
231
- * @returns Promise resolving to the conversation, or undefined if not found.
231
+ * @returns Promise resolving to the conversation.
232
232
  *
233
233
  * @example
234
234
  * ```typescript
@@ -246,7 +246,7 @@ export interface AgentsModule {
246
246
  /**
247
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. 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()}.
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`. When you call this method through `base44.asServiceRole.agents`, results only include conversations created through the service role. 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.
@@ -45,7 +45,7 @@ export interface DeleteManyResult {
45
45
  export interface UpdateManyResult {
46
46
  /** Whether the operation was successful. */
47
47
  success: boolean;
48
- /** Number of entities that were updated. */
48
+ /** Number of entities that were updated. This includes records that already held the new values, because every update refreshes `updated_date`. */
49
49
  updated: number;
50
50
  /** Whether there are more entities matching the query that were not updated in this batch. When `true`, call `updateMany` again with the same query to update the next batch. */
51
51
  has_more: boolean;
@@ -1021,8 +1021,11 @@ export interface EntityHandler<T = any> {
1021
1021
  *
1022
1022
  * This method isn't available for the built-in `User` entity, and calling it fails with a 405 error.
1023
1023
  *
1024
- * This isn't a transaction. Each record is written on its own, so if the call
1025
- * fails partway, the records already written stay written. Learn more about
1024
+ * This isn't a transaction. Before writing, the call checks every record. If an `id`
1025
+ * doesn't match a record you can update, or a change isn't allowed or doesn't match the
1026
+ * entity's schema, the call fails and no records change. After the checks pass, each
1027
+ * record is written on its own, so if a write fails partway, the records already written
1028
+ * stay written. Learn more about
1026
1029
  * [concurrent updates](/developers/backend/resources/entities/entity-schemas#concurrent-updates).
1027
1030
  *
1028
1031
  * To apply the same update to all records matching a query, use
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base44-preview/sdk",
3
- "version": "0.8.57-pr.362.129f8e2",
3
+ "version": "0.8.57-pr.362.2ee7c13",
4
4
  "description": "JavaScript SDK for Base44 API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",