Skip to content

feat: inboxes endpoints - #1088

Merged
felipefreitag merged 19 commits into
canaryfrom
preview-inboxes
Oct 14, 2026
Merged

felipefreitag merged 19 commits into
canaryfrom
preview-inboxes

Conversation

@isabellaaquino

@isabellaaquino isabellaaquino commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary by cubic

Adds the resend.inboxes API to the Resend Node.js client with inbox management, agent settings, thread email actions, and webhook events, and bumps the version to 6.33.0.

  • resend.inboxes supports create, list, get, update, and remove, plus nested threads (list, search, get, update, remove), threads.emails (list, get, reply, forward), labels, drafts, and agent (get and update settings).
  • Thread listing filters by folders, labels, and read state; search adds query, sender, recipient, and date filters via buildInboxCursorUrl.
  • Thread replies accept a replyAll option that maps to the API's reply_all field.
  • Draft send, email reply, and email forward support an Idempotency-Key header.
  • Adds inbox.* event types and payloads to WebhookEvent and WebhookEventPayload, with thread fields for folder moves, assignments, and label changes.
  • Aligns inbox thread, draft, and label types with the API, renaming message_count to email_count, typing create responses as object and id, the thread update response as inbox_thread, and label colors as hex strings.

Written for commit 6218caa. Summary will update on new commits.

View guided diff

@isabellaaquino
isabellaaquino requested a review from a team as a code owner September 7, 2026 23:00
@cubic-dev-ai

cubic-dev-ai Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Running ultrareview automatically — This PR adds a large new public API surface (inboxes, threads, drafts, labels) with many new endpoint methods and custom query/pagination logic, so a deeper review reduces the risk of subtle bugs affecting all users of these new endpoints.. I'll post findings when complete.

@pkg-pr-new

pkg-pr-new Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 6218caa

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

Ultrareview completed in 10m 19s

All reported issues were addressed across 47 files

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

Re-trigger cubic

Comment thread src/inboxes/inboxes.spec.ts Resolved
Comment thread src/inboxes/threads/threads.spec.ts Resolved
Comment thread src/resend.ts Resolved
Comment thread src/inboxes/labels/labels.spec.ts Resolved
Comment thread CHANGELOG.md Resolved
@github-actions github-actions Bot added the linear-synced PR has been synced to Linear label Sep 8, 2026

@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 6 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 skipped because cubic reviewed only this push, not the earlier force-push. Comment @cubic review to review the whole pull request.

Re-trigger cubic

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

1 issue found across 15 files (changes from recent commits).

Confidence score: 5/5

  • emails.spec.ts doesn’t check that Idempotency-Key is absent when idempotencyKey is omitted, so an unintended header could go unnoticed. Add an assertion for the omitted-key case.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/inboxes/threads/emails/emails.spec.ts">

<violation number="1" location="src/inboxes/threads/emails/emails.spec.ts:207">
P3: These tests only cover the positive path; nothing asserts the Idempotency-Key header is absent when idempotencyKey is omitted. The existing reply/forward assertions use expect.objectContaining and ignore headers, so a regression that always sends the header would ship unnoticed. Add a negative assertion (e.g. in the existing reply/forward tests, assert headers.has('Idempotency-Key') is false).</violation>
</file>

Requires human review: Auto-approval skipped because cubic reviewed only this push, not the earlier force-push. Comment @cubic review to review the whole pull request.
Tip: Review your code locally with the cubic CLI to iterate faster.

View guided diff | Re-trigger cubic

expect(data.data).toBeNull();
});

it('sends the Idempotency-Key header when idempotencyKey is provided', async () => {

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.

P3: These tests only cover the positive path; nothing asserts the Idempotency-Key header is absent when idempotencyKey is omitted. The existing reply/forward assertions use expect.objectContaining and ignore headers, so a regression that always sends the header would ship unnoticed. Add a negative assertion (e.g. in the existing reply/forward tests, assert headers.has('Idempotency-Key') is false).

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/inboxes/threads/emails/emails.spec.ts, line 207:

<comment>These tests only cover the positive path; nothing asserts the Idempotency-Key header is absent when idempotencyKey is omitted. The existing reply/forward assertions use expect.objectContaining and ignore headers, so a regression that always sends the header would ship unnoticed. Add a negative assertion (e.g. in the existing reply/forward tests, assert headers.has('Idempotency-Key') is false).</comment>

<file context>
@@ -203,6 +203,29 @@ describe('Inbox thread emails', () => {
       expect(data.data).toBeNull();
     });
+
+    it('sends the Idempotency-Key header when idempotencyKey is provided', async () => {
+      fetchMock.mockOnce(JSON.stringify({}), {
+        status: 201,
</file context>

…into-preview-inboxes

# Conflicts:
#	package.json
@felipefreitag
felipefreitag merged commit 5afae4b into canary Oct 14, 2026
14 checks passed
@felipefreitag
felipefreitag deleted the preview-inboxes branch October 14, 2026 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

linear-synced PR has been synced to Linear

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants