fix(contacts): properties response shape - #138
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 5 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
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.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
67d1f0d to
ad87af2
Compare
GET /contacts/:idreturnspropertieswhere each entry is a{value, type}object, so the previousDictionary<string,string>threwJsonExceptionon the real response. AddsContactPropertyValue(Value: string, number, or boolean;PropertyTypereusingContactPropertyType, with a newBooleanmember), retypesContact.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.tsand resend-rust'sContactPropertyResponse.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.PropertieswasDictionary<string,string>; it is nowDictionary<string, ContactPropertyValue>where each entry has{ value: JsonElement, type: ContactPropertyType }.var p = contact.Properties["key"];checkp.PropertyTypeand usep.Value.GetString()/GetBoolean()/GetDouble(). Code assumingDictionary<string,string>must change.ContactPropertyType.Boolean. Create/update payloads are unchanged:ContactData.Propertiesremains a flat map.Written for commit ad87af2. Summary will update on new commits.