Skip to content

fix: typo and align remove-contact response with API#861

Open
Shubhdeep12 wants to merge 1 commit intoresend:canaryfrom
Shubhdeep12:fix/contact-response
Open

fix: typo and align remove-contact response with API#861
Shubhdeep12 wants to merge 1 commit intoresend:canaryfrom
Shubhdeep12:fix/contact-response

Conversation

@Shubhdeep12
Copy link
Contributor

@Shubhdeep12 Shubhdeep12 commented Mar 2, 2026

  • contacts.create(): fix parameter name typo.
  • contacts.remove() response: added id to match API; keep contact as deprecated alias. we can start using id in the new code and contact we can remove in the next major.

reference: https://github.com/resend/resend-openapi/blob/main/resend.yaml


Summary by cubic

Aligns remove-contact response with the API by returning id and keeping contact as a deprecated alias for backward compatibility. Also fixes a parameter typo in contacts.create and updates topics tests to match API field names.

  • Bug Fixes

    • contacts.remove(): return id; keep contact as a deprecated alias; normalize responses for back-compat.
    • contacts.create(): fix payload parameter name typo.
    • Tests updated to expect default_subscription (snake_case) in topics.
  • Migration

    • Read id from remove-contact responses. contact is deprecated and will be removed in the next major.

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

…normalization function

- Changed the response structure for the remove contact functionality to use `id` instead of `contact` for better clarity.
- Introduced a normalization function to ensure backward compatibility by mapping `id` to `contact` in the response.
- Updated tests to reflect the new response structure and ensure proper functionality.
@Shubhdeep12 Shubhdeep12 requested a review from a team as a code owner March 2, 2026 11:04
@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 2, 2026

Open in StackBlitz

npm i https://pkg.pr.new/resend@861

commit: b0ddcda

Copy link
Contributor

@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.

No issues found across 4 files

Confidence score: 5/5

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

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