Skip to content

chore: align Events and Automations APIs with latest OpenAPI spec#99

Merged
zenorocha merged 1 commit intomainfrom
feat/align-openapi-spec
Apr 10, 2026
Merged

chore: align Events and Automations APIs with latest OpenAPI spec#99
zenorocha merged 1 commit intomainfrom
feat/align-openapi-spec

Conversation

@drish
Copy link
Copy Markdown
Member

@drish drish commented Apr 10, 2026

  • Rename connections field from edges to connections (wire-level fix)
  • Fix AutomationEdge connection type JSON property from edge_type to type
  • Add missing key field to AutomationStep and AutomationRunStep response models
  • Make started_at nullable on AutomationRun, AutomationRunSummary, AutomationRunStep
  • Make updated_at nullable on EventResource
  • Return ResendResponse from EventUpdateAsync instead of empty response
  • Add EventDeleteResult and return it from EventDeleteAsync

Summary by cubic

Align Events and Automations APIs with the latest OpenAPI spec to fix wire-level fields and return more useful responses. This includes renaming graph fields, making some timestamps nullable, and returning typed results for event update/delete.

  • Migration
    • Automations graph: rename Edges to Connections on Automation, AutomationCreateData, and AutomationUpdateData. JSON field is now "connections".
    • Connection kind: JSON field is now "type" (was "edge_type"). Property remains EdgeType; no change unless you serialize custom JSON.
    • Step keys: new optional Key on AutomationStep and AutomationRunStep (no action needed).
    • Nullable timestamps: started_at on AutomationRun, AutomationRunSummary, AutomationRunStep and updated_at on EventResource are now nullable. Add null checks.
    • Events API:
      • EventUpdateAsync now returns ResendResponse (the updated event ID).
      • EventDeleteAsync now returns ResendResponse with id and deleted.
      • Update call sites to use resp.Content accordingly.

Written for commit c27e436. Summary will update on new commits.

- Rename connections field from edges to connections (wire-level fix)
- Fix AutomationEdge connection type JSON property from edge_type to type
- Add missing key field to AutomationStep and AutomationRunStep response models
- Make started_at nullable on AutomationRun, AutomationRunSummary, AutomationRunStep
- Make updated_at nullable on EventResource
- Return ResendResponse<Guid> from EventUpdateAsync instead of empty response
- Add EventDeleteResult and return it from EventDeleteAsync
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 16 files

Confidence score: 3/5

  • There is a concrete compatibility risk in src/Resend/Automation.cs: renaming public Edges to Connections can break existing SDK consumers at compile time.
  • I’m scoring this as moderate merge risk because the issue is user-facing and reasonably high confidence (6/10 severity, 8/10 confidence), even though it appears narrowly scoped to one API surface.
  • Pay close attention to src/Resend/Automation.cs - preserve backward compatibility by adding a deprecated Edges alias that forwards to Connections.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/Resend/Automation.cs">

<violation number="1" location="src/Resend/Automation.cs:58">
P2: Renaming the public `Edges` property to `Connections` is a breaking SDK API change for existing consumers. Keep a deprecated `Edges` alias that forwards to `Connections` to preserve compatibility.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread src/Resend/Automation.cs
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.

2 participants