Skip to content

fix(contacts): properties response shape - #138

Merged
gabrielmfern merged 2 commits into
mainfrom
fix/contact-properties-response-shape
Aug 24, 2026
Merged

fix(contacts): properties response shape#138
gabrielmfern merged 2 commits 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, so the previous Dictionary<string,string> threw JsonException on the real response. Adds ContactPropertyValue (Value: string, number, or boolean; PropertyType reusing ContactPropertyType, with a new Boolean member), retypes Contact.Properties, and covers it via the mock ApiServer + retrieve test. Create/update request params (ContactData.Properties) 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

Aligns contact properties deserialization with the API to prevent JsonException. Previously Contact.Properties was Dictionary<string,string>; it is now Dictionary<string, ContactPropertyValue> where each entry has { value: JsonElement, type: ContactPropertyType }.

  • Update code that reads properties: var p = contact.Properties["key"]; check p.PropertyType and use p.Value.GetString()/GetBoolean()/GetDouble(). Code assuming Dictionary<string,string> must change.
  • Adds ContactPropertyType.Boolean. Create/update payloads are unchanged: ContactData.Properties remains a flat map.

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

Review in cubic

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All reported issues were addressed across 5 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/Resend/ContactPropertyValue.cs Outdated
@gabrielmfern
gabrielmfern marked this pull request as ready for review August 14, 2026 18:47

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

0 issues found across 3 files (changes from recent commits).

Confidence score: 5/5

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

Auto-approved: Corrects contact properties deserialization to match the documented API response shape, adding a typed model, a Boolean enum member, and a test that pins the corrected behavior. Focused bug fix with no operational or policy tradeoff.

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.

gabrielmfern and others added 2 commits August 24, 2026 15:40
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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