Skip to content

fix(contacts): properties response shape - #254

Open
gabrielmfern wants to merge 1 commit into
mainfrom
fix/contact-properties-response-shape
Open

fix(contacts): properties response shape#254
gabrielmfern wants to merge 1 commit into
mainfrom
fix/contact-properties-response-shape

Conversation

@gabrielmfern

@gabrielmfern gabrielmfern commented Aug 14, 2026

Copy link
Copy Markdown
Member

GET /contacts/:id returns properties where each entry is a {value, type} object, not a flat key→string map — the previous Dict[str, Any] typing didn't express that. Adds a ContactPropertyValue TypedDict (value: string, number, or boolean; type), updates the get-contact test and example to the real shape, and removes properties from the list-response fixtures since only the retrieve endpoint returns it. Create/update request params stay flat maps.

Matches resend-node's get-contact.interface.ts and resend-rust's ContactPropertyResponse.

docs: https://resend.com/docs/api-reference/contacts/get-contact

🤖 Generated with Claude Code


Summary by cubic

Corrects the properties response shape for GET /contacts/:id to map each property name to an object with value and type instead of a flat string map, aligning with the API and preventing misuse. Matches resend-node and resend-rust.

  • Introduces ContactPropertyValue (value: string/number/boolean; type: "string" | "number" | "boolean") and updates Contact.properties to Dict[str, ContactPropertyValue].
  • Updates the example to print name -> value (type) and adjusts tests; removes properties from list-response fixtures since only the retrieve endpoint returns it.
  • No request parameter changes; create/update property payloads remain flat maps. No runtime client behavior changes.

Migration

  • If you accessed properties as flat strings, update usages to read contact["properties"][name]["value"] and, if needed, ["type"].
  • Update type annotations to reflect Dict[str, ContactPropertyValue] for properties.

Written for commit 2857bdf. Summary will update on new commits.

Review in cubic

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gabrielmfern
gabrielmfern requested a review from drish August 14, 2026 18:33
@gabrielmfern
gabrielmfern marked this pull request as ready for review August 14, 2026 18:40

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 3 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Corrects the Contact.properties typing to match the actual API response (value+type objects), updates the example and test to the real shape, and removes the field from list fixtures since only the retrieve endpoint returns it. A bounded, test-pinned bug fix with no request or operational changes.

Re-trigger cubic

Approval not submitted

This repository is configured to approve as @klotty, but that approval identity is unavailable.
Reconnect or verify the approval identity in repository settings.

cubic left this as a normal review comment instead of falling back to a Cubic App approval.

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.

1 participant