Conversation
There was a problem hiding this comment.
Pull request overview
Adds an auto-generated TypeScript SDK/client for the API using @hey-api/openapi-ts, intended to make consuming the /v5 endpoints easier and keep types in sync with the OpenAPI spec.
Changes:
- Add generated API types (
types.gen.ts) and endpoint SDK functions (sdk.gen.ts) undersrc/client/. - Add generated core client runtime (fetch client, serializers, SSE support) under
src/client/clientandsrc/client/core. - Add
@hey-api/openapi-tsdev dependency and abuild:client:tsscript; update.gitignorefor generator error logs.
Reviewed changes
Copilot reviewed 17 out of 19 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/client/types.gen.ts | Generated API domain + endpoint request/response types |
| src/client/sdk.gen.ts | Generated typed functions for calling API endpoints |
| src/client/index.ts | Barrel exports for SDK functions and types |
| src/client/core/*.gen.ts | Generated shared runtime utilities (auth, serializers, SSE, etc.) |
| src/client/client/*.gen.ts | Generated fetch-based client implementation + config/types |
| src/client/client.gen.ts | Creates default client instance targeting https://api.revanced.app |
| package.json | Adds generator dependency and script; bumps @hono/zod-openapi |
| bun.lock | Lockfile updates for new/updated dependencies |
| .gitignore | Ignores openapi-ts error log artifacts |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 22 out of 24 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 22 out of 24 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "module": "./dist/index.js", | ||
| "peerDependencies": { | ||
| "typescript": "^5.9.3" | ||
| }, |
There was a problem hiding this comment.
typescript is listed only as a peerDependency, but this package’s build script runs tsc. Peer deps are not installed automatically, so building client/ts in isolation (or in some CI setups) can fail unless TypeScript is provided externally. Consider adding typescript to devDependencies (optionally keeping it as a peer as well if you plan to publish).
| }, | |
| }, | |
| "devDependencies": { | |
| "typescript": "^5.9.3" | |
| }, |
This PR adds automatic generation of a TypeScript client for the API, using @hey-api/openapi-ts.
How to
A resource can be anything of what's listed here.
Example