Skip to content

fix(documentation): added types to the typedoc main list and fixed some decorators#677

Merged
james-rl merged 2 commits intomainfrom
james/typedoc-fixes
Dec 16, 2025
Merged

fix(documentation): added types to the typedoc main list and fixed some decorators#677
james-rl merged 2 commits intomainfrom
james/typedoc-fixes

Conversation

@james-rl
Copy link
Copy Markdown
Contributor

@james-rl james-rl commented Dec 16, 2025

User description

Description

  • Added @remarks to fix some issues
  • Included types.ts to rexport types for the typedocs to work correctly

Motivation

  • Make the SDK docs easier to navigate

Changes

  • No functional changes

Testing

  • Unit tests added
  • Integration tests added
  • Smoke Tests added/updated
  • Tested locally

Breaking Changes

Checklist

  • PR title follows Conventional Commits format (feat: or feat(scope):)
  • Documentation updated (if needed)
  • Breaking changes documented (if applicable)

CodeAnt-AI Description

Include centralized type exports and categorize SDK types for Typedoc

What Changed

  • Added a new types.ts module that re-exports all SDK/resource types so raw API types are discoverable in the generated docs
  • Added category and remarks annotations across SDK and resource interfaces so entries appear under meaningful categories (Devbox, Blueprint, Snapshot, Agent, Execution, Storage Object, Shared, SDK, etc.)
  • Updated Typedoc and tsconfig for Typedoc to include the new types entry point and a defined category order so the documentation site shows the new types and organized category navigation

Impact

✅ Find raw API types in docs
✅ Clearer documentation categories for SDK operations
✅ Easier discovery of resource and SDK types

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

…made some changes to fix some rendering issues (eg. added @remarks).
@codeant-ai
Copy link
Copy Markdown
Contributor

codeant-ai bot commented Dec 16, 2025

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@james-rl james-rl requested a review from jrvb-rl December 16, 2025 20:08
@codeant-ai codeant-ai bot added the size:L This PR changes 100-499 lines, ignoring generated files label Dec 16, 2025
@codeant-ai
Copy link
Copy Markdown
Contributor

codeant-ai bot commented Dec 16, 2025

Nitpicks 🔍

🔒 No security issues identified
⚡ Recommended areas for review

  • Compile Error
    The file uses the invalid TypeScript syntax export type * from '...' across many re-exports. This will cause TypeScript compilation to fail. Replace with valid re-export syntax.

  • Syntax Error
    The namespace re-export includes a specifier of the form type ExecuteStreamingCallbacks as ExecuteStreamingCallbacks which is not valid TypeScript export syntax and will cause a compile error. Validate the namespace re-export and use a correct approach to re-export types (for example export type { ExecuteStreamingCallbacks } at top-level or a proper namespaced type alias). Also ensure the namespace block is not duplicated.

  • Streaming Cancellation
    startStreamingWithCallbacks starts indefinite async iterators but provides no cancellation mechanism or AbortSignal; it also swallows stream errors (logs to console). This can lead to orphaned background tasks or unclean shutdowns. Consider adding an abort signal to let callers cancel streaming and propagate errors in a controlled way.

  • Generated-file edits
    The PR adds JSDoc/@category annotations directly into a file that is generated from the OpenAPI spec. Manually editing generated files is brittle: subsequent code generation will overwrite these changes. Confirm whether the generator/template was updated (so these tags persist), or whether these edits will be lost on the next generation.

  • Unintended Runtime Exports
    If you change the invalid lines to export * from './...'; you may inadvertently re-export runtime values (not just types) from modules like ./sdk, which can introduce side effects or increase bundle size. Verify the target modules only export types or explicitly re-export type-only members.

@codeant-ai
Copy link
Copy Markdown
Contributor

codeant-ai bot commented Dec 16, 2025

CodeAnt AI finished reviewing your PR.

@github-actions
Copy link
Copy Markdown

⚠️ Object Smoke Tests & Coverage Report

Test Results

✅ All smoke tests passed

Coverage Results

Metric Coverage Required Status
Functions 95.65% 100%
Lines 83.64% - ℹ️
Branches 45.91% - ℹ️
Statements 82.12% - ℹ️

Coverage Requirement: 100% function coverage (all public methods must be called in smoke tests)

⚠️ Some object methods are not covered in smoke tests. Please add tests that call all public methods.

View detailed coverage report

Coverage reports are available in the workflow artifacts. Lines/branches/statements coverage is tracked but not required to be 100%.

📋 View workflow run

Copy link
Copy Markdown
Contributor

@jrvb-rl jrvb-rl left a comment

Choose a reason for hiding this comment

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

I don't think there is an easy way to preview this while doing the review (unlike our docs site...) Based on our conversation earlier, though, this LGTM and seems like a nice improvement.

Comment thread tsconfig.typedoc.json
"extends": "./tsconfig.json",
"exclude": ["**/*.test.ts", "**/tests/**", "**/node_modules/**", "src/_shims/**/*-deno.ts"],
"include": ["src/sdk.ts", "src/sdk/**/*.ts", "src/core.ts", "src/resources/**/*.ts", "src/lib/**/*.ts"]
"include": ["src/sdk.ts", "src/types.ts", "src/sdk/**/*.ts", "src/core.ts", "src/resources/**/*.ts", "src/lib/**/*.ts"]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does the order here dictate the order of the left navbar? If so, maybe put the 'types.ts' first?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Apparently not, since types shows up after SDK.

The auto-review tool caught 2 potential issues:

  • the @category tag shows up on generated resources, so i'm going to submit a PR for the java side to produce these tags
  • types.ts should be named as an excluded type so it only gets used during doc generation.

The other messages are wrong (this is valid syntax in this version of ts).

I'm making the ts-side change now and will test it out before pushing & merging

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I made the types change. I'm unsure as to whether the category will be persisted -- I think stainless might preserve it anyway. I'm going to try merging this change and i'll be vigilant about making a followup if something breaks.

@github-actions
Copy link
Copy Markdown

⚠️ Object Smoke Tests & Coverage Report

Test Results

✅ All smoke tests passed

Coverage Results

Metric Coverage Required Status
Functions 95.65% 100%
Lines 83.64% - ℹ️
Branches 45.91% - ℹ️
Statements 82.12% - ℹ️

Coverage Requirement: 100% function coverage (all public methods must be called in smoke tests)

⚠️ Some object methods are not covered in smoke tests. Please add tests that call all public methods.

View detailed coverage report

Coverage reports are available in the workflow artifacts. Lines/branches/statements coverage is tracked but not required to be 100%.

📋 View workflow run

@james-rl james-rl merged commit 392007d into main Dec 16, 2025
9 checks passed
@james-rl james-rl deleted the james/typedoc-fixes branch December 16, 2025 21:07
@stainless-app stainless-app bot mentioned this pull request Dec 16, 2025
@dines-rl dines-rl mentioned this pull request Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants