Skip to content

Conversation

@lucasfcosta
Copy link
Contributor

@lucasfcosta lucasfcosta commented Oct 9, 2025

This adds a method to list inbound emails through the route /emails/receiving/:id. The method is called resend.emails.receiving.list.

Note that this PR is made on top of #667 to make the diff easier to read as it builds upon a few types there.


Summary by cubic

Added inbound email listing via GET /emails/receiving, exposed as resend.emails.receiving.list. It supports pagination and returns a lightweight list of messages.

  • New Features

    • Added Receiving.list(options) with limit, before, and after pagination.
    • Introduced ListInboundEmails interfaces and export; returns object "list", has_more, and minimal email fields.
    • Added tests for empty results, populated lists, and pagination URL building.
  • Bug Fixes

    • Aligned not_found error message in tests to "Email not found".

@lucasfcosta lucasfcosta requested a review from a team as a code owner October 9, 2025 13:25
@lucasfcosta lucasfcosta requested review from pedro-stramantinoli and removed request for a team October 9, 2025 13:25
@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 9, 2025

Open in StackBlitz

npm i https://pkg.pr.new/resend/resend-node/resend@668

commit: d123fa9

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.

1 issue found across 4 files

Prompt for AI agents (all 1 issues)

Understand the root cause of the following 1 issues and fix them.


<file name="src/emails/receiving/interfaces/list-inbound-emails.interface.ts">

<violation number="1" location="src/emails/receiving/interfaces/list-inbound-emails.interface.ts:7">
ListInboundEmail inherits the headers field and omits attachments.size, so the published type no longer matches the list API payload; callers would be told headers exist and size does not, contradicting the real response.</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

Base automatically changed from feat/move-attachments-inbound-method to canary October 9, 2025 19:57
@lucasfcosta lucasfcosta force-pushed the feat/add-inbound-listing-method branch from e1084df to af64453 Compare October 9, 2025 20:10
@lucasfcosta lucasfcosta force-pushed the feat/add-inbound-listing-method branch from af64453 to d123fa9 Compare October 9, 2025 20:11
@lucasfcosta lucasfcosta merged commit c220601 into canary Oct 9, 2025
11 checks passed
@lucasfcosta lucasfcosta deleted the feat/add-inbound-listing-method branch October 9, 2025 20:31
gabrielmfern pushed a commit that referenced this pull request Oct 16, 2025
gabrielmfern pushed a commit that referenced this pull request Oct 17, 2025
lucasfcosta added a commit that referenced this pull request Oct 17, 2025
gabrielmfern pushed a commit that referenced this pull request Oct 21, 2025
gabrielmfern pushed a commit that referenced this pull request Oct 21, 2025
lucasfcosta added a commit that referenced this pull request Oct 27, 2025
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.

3 participants