Repository navigation
feat(inboxes): add label specific endpoints for threads - #1161
Conversation
commit: |
There was a problem hiding this comment.
All reported issues were addressed across 10 files
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
25a704d to
81e87fc
Compare
There was a problem hiding this comment.
1 issue found across 11 files
Confidence score: 4/5
- The new
labels.add,labels.set, andlabels.removeoperations may not enforce the API-key permission checks required by the SDK. Verify these methods reject keys without the needed permissions.
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/labels/labels.spec.ts">
<violation number="1" location="src/inboxes/threads/labels/labels.spec.ts:35">
P3: Custom agent: **API Key Permission Check SDK Methods**
Per the API key permission check rule (66cdbcad), this PR ships new operations against Resend's API — `labels.add` (POST), `labels.set` (PUT), and `labels.remove` (DELETE) on `/inboxes/:inboxId/threads/:threadId/labels` — including the delete-by-label path. Confirm before merging that the API keys used in production have the permissions required for these new endpoints, so label operations don't fail after deployment.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
| it('adds labels to a thread', async () => { | ||
| mockResponse(); | ||
|
|
||
| const data = await resend.inboxes.threads.labels.add({ |
There was a problem hiding this comment.
P3: Custom agent: API Key Permission Check SDK Methods
Per the API key permission check rule (66cdbcad), this PR ships new operations against Resend's API — labels.add (POST), labels.set (PUT), and labels.remove (DELETE) on /inboxes/:inboxId/threads/:threadId/labels — including the delete-by-label path. Confirm before merging that the API keys used in production have the permissions required for these new endpoints, so label operations don't fail after deployment.
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/labels/labels.spec.ts, line 35:
<comment>Per the API key permission check rule (66cdbcad), this PR ships new operations against Resend's API — `labels.add` (POST), `labels.set` (PUT), and `labels.remove` (DELETE) on `/inboxes/:inboxId/threads/:threadId/labels` — including the delete-by-label path. Confirm before merging that the API keys used in production have the permissions required for these new endpoints, so label operations don't fail after deployment.</comment>
<file context>
@@ -0,0 +1,115 @@
+ it('adds labels to a thread', async () => {
+ mockResponse();
+
+ const data = await resend.inboxes.threads.labels.add({
+ inboxId,
+ threadId,
</file context>
There was a problem hiding this comment.
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.
View guided diff | Re-trigger cubic
06e7e8b to
6f6bce5
Compare
Summary by cubic
Adds dedicated label endpoints for inbox threads, replacing the
addLabelIdsandremoveLabelIdsparameters on the update thread endpoint.updateno longer acceptsaddLabelIdsandremoveLabelIds; use the newlabelssub-resource instead.labels.addaccepts 1–10 label IDs andlabels.setaccepts 0–100;labels.removedeletes a single label by ID.Additional fixes
created_atandupdated_at.Written for commit 4ae25fa. Summary will update on new commits.