Skip to content

feat(segments): add segments.update() - #1084

Merged
dielduarte merged 4 commits into
canaryfrom
feature/dev-1205-edit-segments-through-the-api
Aug 26, 2026
Merged

feat(segments): add segments.update()#1084
dielduarte merged 4 commits into
canaryfrom
feature/dev-1205-edit-segments-through-the-api

Conversation

@dielduarte

Copy link
Copy Markdown
Contributor

Usage

await resend.segments.update(id, { name: 'Active Users' });

Params:

  • id (string, required)
  • name (string, required)

Response: { object: "segment", id, name }

Rollout: DEV-1941

Implements PATCH /segments/:id to rename a segment.
@pkg-pr-new

pkg-pr-new Bot commented Aug 26, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 6246d5c

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

All reported issues were addressed across 3 files

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

Re-trigger cubic

Comment thread src/segments/segments.spec.ts
Comment thread src/segments/interfaces/update-segment.interface.ts
Comment thread src/segments/segments.ts
…ests

- barrel was missing UpdateSegment* exports, so consumers couldn't type
  segments.update()'s options/response
- the update test only checked the parsed response, not that it actually
  sent a PATCH to /segments/:id with the right body

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

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

Confidence score: 5/5

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

Requires human review: Auto-approval blocked by 2 unresolved issues from previous reviews.

Re-trigger cubic

@dielduarte
dielduarte marked this pull request as ready for review August 26, 2026 11:06
@dielduarte
dielduarte requested a review from a team as a code owner August 26, 2026 11:06
@dielduarte
dielduarte requested a review from Cisneiros August 26, 2026 11:06
Matches the server's response shape (object + id only), same as
UpdateTopicResponseSuccess.

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

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

Confidence score: 5/5

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

Requires human review: Adds new segments.update() SDK method, expanding the public API contract; also response type omits claimed 'name' field.

Re-trigger cubic

@dielduarte
dielduarte merged commit d0972df into canary Aug 26, 2026
12 checks passed
@dielduarte
dielduarte deleted the feature/dev-1205-edit-segments-through-the-api branch August 26, 2026 12:51
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