feat: inboxes endpoints - #1088
Open
isabellaaquino wants to merge 3 commits into
Open
Conversation
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. |
commit: |
Contributor
There was a problem hiding this comment.
Ultrareview completed in 10m 19s
4 issues found across 47 files
Confidence score: 2/5
src/inboxes/inboxes.spec.tscontains a hardcoded Resend API key, creating a credential-exposure risk; redact it from the test recording and revoke or rotate the key.- The new inbox operations in
src/resend.tsdepend on API keys having inbox permissions, so production calls may fail for keys without that access; confirm the required permissions and document or enforce the prerequisite. src/inboxes/threads/interfaces/update-inbox-thread.interface.tstypes the PATCH response as an inbox instead of an inbox thread, which can prevent consumers from correctly narrowing the result; update it to the thread response type.src/inboxes/labels/interfaces/update-inbox-label.interface.tsallows an empty label update payload, permitting no-op PATCH requests; require at leastnameorcolorwithRequireAtLeastOne.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/inboxes/threads/interfaces/update-inbox-thread.interface.ts">
<violation number="1" location="src/inboxes/threads/interfaces/update-inbox-thread.interface.ts:16">
P2: The update response is typed as an inbox rather than an inbox thread. This disagrees with the other thread response types and prevents consumers from narrowing the PATCH result as an `inbox_thread`; use the thread object literal or reuse `InboxThreadSummary`.</violation>
</file>
<file name="src/inboxes/labels/interfaces/update-inbox-label.interface.ts">
<violation number="1" location="src/inboxes/labels/interfaces/update-inbox-label.interface.ts:4">
P2: `UpdateInboxLabelOptions` permits `{}`, allowing typed callers to send a no-op label PATCH. Define this payload with `RequireAtLeastOne` so every update changes `name` or `color`, matching the other inbox PATCH contracts.</violation>
</file>
<file name="src/resend.ts">
<violation number="1" location="src/resend.ts:68">
P2: Custom agent: **API Key Permission Check SDK Methods**
The new `inboxes` surface adds authenticated inbox, thread, draft, label, reply, and forward operations. Confirm production API keys have the required inbox permissions before release to prevent authorization failures.</violation>
</file>
<file name="src/inboxes/inboxes.spec.ts">
<violation number="1" location="src/inboxes/inboxes.spec.ts:14">
P1: Custom agent: **API Key Permission Check SDK Methods**
A hardcoded Resend API key (`re_zKa4RCko_Lhm9ost2YjNCctnPjbLw8Nop`) is committed in the test file. Secrets/API tokens must be redacted from test recordings and specs even when the keys are ephemeral; the fixture should use a non-sensitive placeholder instead (e.g., `re_<YOUR_API_KEY>` or an env-driven value).</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
isabellaaquino
force-pushed
the
preview-inboxes
branch
from
September 10, 2026 00:51
3b3e6ed to
b93e8b0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by cubic
Adds inbox management to the Resend Node.js client, enabling programmatic control over inboxes, threads, labels, and drafts. The client now exposes
resend.inboxeswith nested resources, and the package version is bumped to6.28.0-preview-inboxes.0as a preview release.New Features
resend.inboxeswith create, list, get, update, and remove methods.resend.inboxes.threadsfor listing, fetching, updating, and removing threads.resend.inboxes.threads.emailsfor getting, replying to, and forwarding thread emails.resend.inboxes.labelsandresend.inboxes.draftswith full CRUD, plus sending drafts.6.28.0-preview-inboxes.0.Written for commit b93e8b0. Summary will update on new commits.