feat!: replace the openapi-ts client with protobuf-es + connect-gateway-es#2
Merged
Conversation
…ay-es
The TypeScript client is now built from Sentio's protobuf definitions
with protobuf-es and calls the REST API through connect-es using the
@sentio/connect-gateway-es transport (the grpc-gateway REST dialect).
Requests and responses are wire-faithful protobuf types — int64, oneof,
enums and well-known types survive without the openapi translation — and
server-streaming endpoints are supported.
- src/client.ts: createSentioTransport({ apiKey, baseUrl, ... }) (sends
the api-key header; default baseUrl https://app.sentio.xyz) and
createSentioClient(Service, options)
- src/index.ts: re-exports the public service descriptors; message types
deep-import via @sentio/api/gen/*
- removed the hey-api output (client.gen.ts/sdk.gen.ts/types.gen.ts);
src/gen is now generated by Sentio CI (visibility-filtered public REST
surface) and synced into this repo
- deps: @bufbuild/protobuf, @connectrpc/connect, @sentio/connect-gateway-es;
bumped tooling and require Node 24; pin pnpm 11.3.0
- add CLAUDE.md (+ AGENTS.md symlink) agent guide and a PR CI workflow
- disable pnpm's minimumReleaseAge supply-chain gate (rejects our own
freshly published deps for a day without value for this trusted set)
BREAKING CHANGE: client.setConfig + static service classes are replaced
by connect-es clients (createSentioClient / createSentioTransport).
Errors are ConnectError. The package is ESM-only and requires Node 24+.
dc4de7d to
15b0c45
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
@sentio/apiv3: the client is now generated from Sentio's protobuf definitions with protobuf-es and calls the REST API through connect-es using the@sentio/connect-gateway-estransport.src/gen/**— generated bindings (public REST surface, 13 services / 64 methods, exactly matching the OpenAPI spec)src/client.ts—createSentioTransport({ apiKey, baseUrl, ... })(sends theapi-keyheader) andcreateSentioClient(Service, options)src/index.ts— service re-exports; message types deep-import via@sentio/api/gen/*@bufbuild/protobuf,@connectrpc/connect,@sentio/connect-gateway-es@^1.0.0openapi.json+doc/unchanged (still synced from CI for the raw REST reference)Why
Testing
pnpm build+pnpm testgreen (offline construction test; live test runs whenSENTIO_API_KEYis set)createSentioClient(PriceService).listCoins({ limit: 3 })→ typed response with oneof correctly parsedCompanion (to land after this): sentio-side PR switches the publish pipeline (
openapi/push.sh) from openapi-ts generation to syncing the protobuf-es bindings intosrc/gen.🤖 Generated with Claude Code