Add typed reply draft operation - #87
Open
code-monger-givenall wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds typed Go SDK support for fetching HEY’s prepared reply envelope and resolved recipients.
Changes:
- Models and generates the
NewEntryReplyoperation. - Exposes it as
Entries().NewReply. - Adds unit and path-conformance coverage.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
spec/hey.smithy |
Defines the operation and response. |
spec/shape-fingerprint.json |
Records the new operation fingerprint. |
spec/route-coverage.json |
Adds route coverage metadata. |
openapi.json |
Includes generated OpenAPI definitions. |
behavior-model.json |
Records operation behavior and retries. |
go/pkg/generated/client.gen.go |
Generates the typed Go client operation. |
go/pkg/hey/entries.go |
Adds the public NewReply wrapper. |
go/pkg/hey/services_test.go |
Tests draft and recipient decoding. |
go/pkg/hey/url-routes.json |
Registers the generated route mapping. |
conformance/runner/go/main.go |
Enables conformance execution. |
conformance/tests/paths.json |
Verifies the request path. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
HEY already serves the reply composer as JSON, including the recipients it resolves for the selected entry. Without a typed SDK operation, clients have to scrape the HTML reply form to get that envelope.
This adds
NewEntryReplyforGET /entries/{entryId}/replies/new.jsonand exposes it asEntries().NewReply. It returns the existingMessageDraftmodel, so callers get the subject, sender context, and To, CC, and BCC contacts HEY prepared.The generated client, behavior model, route artifacts, wrapper, unit test, and path conformance case are included.
Validation:
make checkSummary by cubic
Adds a typed SDK operation to fetch the live reply draft envelope for an entry, eliminating the need to scrape the HTML reply form. The new
NewEntryReplyGET returns aMessageDraftwith subject, sender context, and HEY-resolved To/CC/BCC recipients.NewEntryReplyat GET /entries/{entryId}/replies/new.json inopenapi.jsonandspec/hey.smithy; route added ingo/pkg/hey/url-routes.json.Client.NewEntryReplyandClientWithResponses.NewEntryReplyWithResponseingo/pkg/generated/client.gen.go; returnsMessageDraft.Entries().NewReply(ctx, entryID)ingo/pkg/hey.Entries().NewReply, and behavior/coverage updates.Written for commit cbb4fb7. Summary will update on new commits.