Add GET /sent-emails/{id}/reply (awaitReply) to the OpenAPI spec - #362
Merged
Conversation
The route has been live in the API (manifest openapi: true, served by outbound-read) but was never added to primitive-api.yaml, so none of the generated SDKs exposed it. Author the path entry faithfully from the server contract (AwaitReplyQuerySchema, AwaitReplyResponseSchema) and regenerate the node, python, and go artifacts. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
docfacts impact
This PR also touches evidence for 224 verified claims — no action needed unless behavior changed; the nightly scan re-verifies automatically. details
|
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the previously reported TypeScript reply-type widening has been corrected.
|
| Filename | Overview |
|---|---|
| openapi/primitive-api.yaml | Defines the new endpoint and uses a nullable referenced schema that generates the intended reply type. |
| packages/api-core/src/api/types.gen.ts | The regenerated AwaitReplyResult.reply is correctly typed as `ReplyEmail |
| packages/api-core/src/api/sdk.gen.ts | Adds the generated TypeScript awaitReply operation with the expected path and parameters. |
| sdk-python/src/primitive/api/api/sending/await_reply.py | Adds the generated Python client operation for the new endpoint. |
| sdk-go/api/oas_schemas_gen.go | Adds generated Go schemas for the await-reply response and compact reply object. |
Reviews (2): Last reviewed commit: "Type the awaitReply no-reply branch as a..." | Re-trigger Greptile
The generator maps a bare null type in a union to unknown, collapsing the TypeScript result to unknown; the allOf-plus-nullable idiom the spec already uses elsewhere generates ReplyEmail or null in all three languages. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
Adds
GET /sent-emails/{id}/reply(operationIdawaitReply) toopenapi/primitive-api.yamland regenerates all downstream artifacts (node, python, go).Why
The route has been live in the API for a while: the mono-repo v1 manifest marks it
openapi: trueandoutbound-read.tsserves it. But the spec in this repo is hand-maintained (it is the single source of truth for the SDKs, nothing generates it from the server contract), and this path was simply never authored here. Result: none of the three generated SDKs exposed the canonical "did a reply arrive for this send?" call, even though the MCP server (contract-driven) already exposes it asawaitReply.The path entry is authored faithfully from the server contract (
outboundReadContract.awaitReplyinpackages/core-api-contract):waitboolean query param (server accepts literaltrue/falsestrings),wait_timeout_msint 1000..30000, server default 10000. No OpenAPIdefaulton purpose, matching the/emailswaitparam note about generators that send defaults on every call.SuccessEnvelopewithAwaitReplyResult(sent_email_id, nullablereply,waited,timed_out), strict like the contract schema.ReplyEmailcomponent mirrors the contract'sReplyEmailSchema(open object,statusleft as an open string because the contract does not narrow it).Verified against staging: the route answers 401 unauthorized without a key, confirming it is served.
Checks
make node-check cli-check python-check go-check shared-checkall pass locally. Generated files committed together with the source edit per the pre-commit gate.Follow-ups: other openapi:true manifest routes still missing from the spec
Diffing the mono-repo v1 manifest (
openapi: trueentries, staging) against this spec found five more served-but-unspecified routes, not fixed here:POST /domains/{id}/dns/checkPOST /endpoints/{id}/rules/testGET /outbound/status(MCP already exposesgetOutboundStatus)PATCH /sent-emails/{id}(reschedule a scheduled send)POST /sent-emails/{id}/cancel(MCP already exposescancelScheduledSend)🤖 Generated with Claude Code