Skip to content

Conversation

@fern-api
Copy link
Contributor

@fern-api fern-api bot commented Feb 10, 2026

Refactor the code upload request interface to use a single unified structure instead
of separate CSV and JSON variants. Remove user_id fields from multiple template types
to simplify the data model and improve API consistency.

Key changes:

  • Consolidate UploadRequest from discriminated union to single interface with format field
  • Remove user_id fields from ChatMessageTemplate, ChatSessionTemplate, and other templates
  • Move UploadRequest from types to client/requests directory
  • Update documentation and test fixtures to reflect simplified structure
  • Maintain backward compatibility for upload functionality

🌿 Generated with Fern


Note

Medium Risk
This is a breaking API surface change (type removals and response shape changes) that may require consumer updates and could cause runtime issues if callers still rely on removed fields or the old upload request variants.

Overview
Bumps the TS SDK to 6.0.0 and simplifies the Construe code-system upload request type by replacing the prior CSV/JSON discriminated-union types with a single UploadRequest interface (with a format enum) now exported from construe/client/requests, and removes the old construe/types/UploadRequest* exports.

Removes user_id from multiple response/template models (agent chat messages/sessions, FHIR provider templates, summary templates, MCP server/tool responses, workflow definitions/responses) and updates docs/examples (reference.md) plus wire tests/fixtures to match the new shapes.

Written by Cursor Bugbot for commit 86840a9. This will update automatically on new commits. Configure here.

Refactor the code upload request interface to use a single unified structure instead 
of separate CSV and JSON variants. Remove user_id fields from multiple template types 
to simplify the data model and improve API consistency.

Key changes:
- Consolidate UploadRequest from discriminated union to single interface with format field
- Remove user_id fields from ChatMessageTemplate, ChatSessionTemplate, and other templates
- Move UploadRequest from types to client/requests directory
- Update documentation and test fixtures to reflect simplified structure
- Maintain backward compatibility for upload functionality

🌿 Generated with Fern
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

export type { GetConstrueCodesCodesystemSearchTextRequest } from "./GetConstrueCodesCodesystemSearchTextRequest.js";
export type { GetConstrueCodesSystemsCodesystemExportRequest } from "./GetConstrueCodesSystemsCodesystemExportRequest.js";
export type { GetConstrueCodesSystemsCodesystemRequest } from "./GetConstrueCodesSystemsCodesystemRequest.js";
export type { UploadRequest } from "./UploadRequest.js";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Format const unreachable due to type-only export

Medium Severity

The UploadRequest namespace defines a runtime const Format (with values Csv and Json), but requests/index.ts re-exports it using export type { UploadRequest }. This type-only export strips the runtime value, making UploadRequest.Format.Csv and UploadRequest.Format.Json inaccessible to consumers. All other types with runtime namespace consts (e.g., ExtractRequestConfig, ChatMessageTemplate) live in the types/ directory and use export *, which preserves runtime values. The Format const is effectively dead code through the public API.

Additional Locations (1)

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants