Skip to content

docs(sdk): conversation ownership and User entity limits for bulk update - #362

Draft
abrahams-wix wants to merge 4 commits into
docs-feedback-fixesfrom
docs-dev-feedback-batch-2026-11
Draft

abrahams-wix wants to merge 4 commits into
docs-feedback-fixesfrom
docs-dev-feedback-batch-2026-11

Conversation

@abrahams-wix

@abrahams-wix abrahams-wix commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

JSDoc fixes from reader and Customer Care feedback.

This PR is stacked on #361. Its base is docs-feedback-fixes, so the diff shows only these changes. Retarget it to main once #361 merges.

Agents module (packages/sdk/src/modules/agents.types.ts)

  • The module description says each user can read and add messages only to conversations they created, even with the admin role.
  • With base44.asServiceRole.agents, the module only reaches conversations created through the service role. It doesn't give your backend access to conversations that individual users created.
  • getConversation() says the conversation must belong to the current user (otherwise a 403 error), and that a missing conversation fails with a 404 error. @returns no longer says it resolves to undefined.
  • listConversations(), createConversation(), addMessage(), and subscribeToConversation() say the conversation belongs to the current user.

Entities module (packages/sdk/src/modules/entities.types.ts)

  • updateMany() and bulkUpdate() say they aren't available for the built-in User entity and fail with a 405 error.
  • UpdateManyResult.updated includes records that already held the new values, because every update refreshes updated_date.
  • bulkUpdate() says the call checks every record before writing. If a check fails, no records change. If a write fails partway, earlier records stay written.

JSDoc only, no code changes. I compared two generator runs to see which reference lines change. Those lines are in base44-dev/mintlify-docs#2925.

Points for reviewers to check

  • Confirm the 405 for the User entity is stable and meant to be public.
  • getConversation() still returns Promise<AgentConversation | undefined> and its example still has an if (conversation) guard, but it now rejects with an error for a missing conversation. Should the type and example change?
  • With before-write hooks on, a concurrent change to a record makes the write fail with a 409. Should that be documented?
  • The service-role and admin statements come from reading the backend code, not from running it.

🤖 Generated with Claude Code

abrahams-wix and others added 2 commits November 3, 2026 10:43
Add the ownership rule to the module description, getConversation,
listConversations, createConversation, addMessage, and subscribeToConversation.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e User entity

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/sdk@0.8.57-pr.362.2ee7c13

Prefer not to change any import paths? Install using npm alias so your code still imports @base44/sdk:

npm i "@base44/sdk@npm:@base44-preview/sdk@0.8.57-pr.362.2ee7c13"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "@base44/sdk": "npm:@base44-preview/sdk@0.8.57-pr.362.2ee7c13"
  }
}

Preview published to npm registry — try new features instantly!

abrahams-wix and others added 2 commits November 3, 2026 11:03
…for a missing conversation

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ehavior

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the docs-draft PR has auto-drafted documentation suggestions label Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-draft PR has auto-drafted documentation suggestions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant