Repository navigation
feat: inboxes endpoints - #1088
Conversation
|
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: |
There was a problem hiding this comment.
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
3b3e6ed to
b93e8b0
Compare
b93e8b0 to
31208ca
Compare
Matches the API contract — every other thread response and the API reference docs use inbox_thread; the server-side fix is resend/resend-monorepo#10390. Co-Authored-By: Claude Fable 5 <[email protected]>
Co-authored-by: Cursor <[email protected]>
46c80f0 to
73365c6
Compare
There was a problem hiding this comment.
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
There was a problem hiding this comment.
1 issue found across 15 files (changes from recent commits).
Confidence score: 5/5
emails.spec.tsdoesn’t check thatIdempotency-Keyis absent whenidempotencyKeyis 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 () => { |
There was a problem hiding this comment.
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>
Co-authored-by: Raphael Fakhri <[email protected]> Co-authored-by: dielduarte <[email protected]>
…into-preview-inboxes # Conflicts: # package.json
Co-authored-by: Laura Beatris <[email protected]>
Summary by cubic
Adds the
resend.inboxesAPI to the Resend Node.js client with inbox management, agent settings, thread email actions, and webhook events, and bumps the version to6.33.0.resend.inboxessupports create, list, get, update, and remove, plus nestedthreads(list, search, get, update, remove),threads.emails(list, get, reply, forward),labels,drafts, andagent(get and update settings).searchadds query, sender, recipient, and date filters viabuildInboxCursorUrl.replyAlloption that maps to the API'sreply_allfield.Idempotency-Keyheader.inbox.*event types and payloads toWebhookEventandWebhookEventPayload, with thread fields for folder moves, assignments, and label changes.message_counttoemail_count, typing create responses asobjectandid, the thread update response asinbox_thread, and label colors as hex strings.Written for commit 6218caa. Summary will update on new commits.