Skip to content

fix: inline fetch client so consumer types resolve#3

Open
Ooscaar wants to merge 2 commits into
mainfrom
fix/sdk-types-inlined-codegen
Open

fix: inline fetch client so consumer types resolve#3
Ooscaar wants to merge 2 commits into
mainfrom
fix/sdk-types-inlined-codegen

Conversation

@Ooscaar
Copy link
Copy Markdown
Member

@Ooscaar Ooscaar commented May 19, 2026

Summary

dist/index.d.ts referenced @hey-api/client-fetch, but the package wasn't a declared dependency. Consumers without it installed silently received any for the entire SDK surface.

Changes

  • @hey-api/openapi-ts 0.61 → 0.97 with file-based openapi-ts.config.ts
  • Drop @hey-api/client-fetch (now inlined under src/generated/client/ and src/generated/core/)
  • Remove dead _shims/* subpath from package.json exports
  • tsuptsdown (tsup is deprecated); update main/types/exports for .cjs/.d.cts
  • Add DOM to tsconfig.lib for the inlined fetch client globals

Test plan

  • npm run typecheck
  • npm run build
  • npm test
  • Install locally in a fresh project and verify await zernio.posts.createPost(...) infers a real type (was any in 0.2.155)

🤖 Generated with Claude Code

Ooscaar and others added 2 commits May 19, 2026 17:04
dist/index.d.ts referenced @hey-api/client-fetch, but the package
wasn't a declared dependency. Consumers without it installed
silently received `any` for the entire SDK surface.

- @hey-api/openapi-ts 0.61 → 0.97 with file-based config
- Drop @hey-api/client-fetch (now inlined under src/generated/)
- Remove dead `_shims/*` from package.json exports
- tsup → tsdown; update exports for .cjs/.d.cts extensions
- Add DOM lib for inlined fetch client globals

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Resolved conflicts in src/generated/sdk.gen.ts and src/generated/types.gen.ts
by keeping the new inlined codegen structure and regenerating from the
latest OpenAPI spec (v0.2.157). The new generator picks up:
- updateBroadcast / updateSequence request bodies
- getUsageStats `reconcile` query param
- Content-Type headers on the new PATCH endpoints

package-lock.json keeps the libc platform metadata.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant