Skip to content

refactor(sdk): import API types via components instead of paths#1362

Open
mishushakov wants to merge 2 commits into
mainfrom
mishushakov/import-api-types-via-components
Open

refactor(sdk): import API types via components instead of paths#1362
mishushakov wants to merge 2 commits into
mainfrom
mishushakov/import-api-types-via-components

Conversation

@mishushakov
Copy link
Copy Markdown
Member

Summary

  • Replace verbose paths['/route']['method']['responses'|'requestBody'][...] traversal with direct components['schemas'][...] references in packages/js-sdk/src/template/buildApi.ts and packages/cli/src/commands/template/build.ts.
  • Matches the existing convention used throughout sandboxApi.ts and reads at a glance.

Test plan

  • pnpm run format / lint / typecheck pass for e2b and @e2b/cli

🤖 Generated with Claude Code

Replace verbose `paths['/route']['method']['responses'|'requestBody']
['200'|'content']['application/json']` traversal with direct
`components['schemas'][...]` references — matches existing convention
in sandboxApi.ts and reads at a glance.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 28, 2026

🦋 Changeset detected

Latest commit: 878f4f7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
e2b Patch
@e2b/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@cursor
Copy link
Copy Markdown

cursor Bot commented May 28, 2026

PR Summary

Low Risk
Type-only refactor with no runtime or API behavior changes.

Overview
OpenAPI type aliases in buildApi.ts now use components['schemas']['TemplateBuildInfo'] and components['schemas']['TemplateBuildStartV2'] instead of long paths[...] chains, and the unused paths import was removed. A changeset marks patch releases for e2b and @e2b/cli for this convention alignment (the PR description also mentions the same pattern in the CLI template build command).

Reviewed by Cursor Bugbot for commit 878f4f7. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 28, 2026

Package Artifacts

Built from e7eb3f6. Download artifacts from this workflow run.

JS SDK (e2b@2.28.1-mishushakov-import-api-types-via-components.0):

npm install ./e2b-2.28.1-mishushakov-import-api-types-via-components.0.tgz

CLI (@e2b/cli@2.10.5-mishushakov-import-api-types-via-components.0):

npm install ./e2b-cli-2.10.5-mishushakov-import-api-types-via-components.0.tgz

Python SDK (e2b==2.26.0+mishushakov-import-api-types-via-components):

pip install ./e2b-2.26.0+mishushakov.import.api.types.via.components-py3-none-any.whl

@mishushakov mishushakov enabled auto-merge (squash) June 4, 2026 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant