Skip to content

Conversation

@lucasfcosta
Copy link
Contributor

@lucasfcosta lucasfcosta commented Jan 2, 2026

This PR adds the new types necessary for the feature-flagged option to download raw emails.

We don't need any change in functionality as these will work mostly like the download URLs for attachments, at least for now.

Please do not merge until the FF is enabled for all users.


Summary by cubic

Adds raw email download metadata to the inbound individual GET API types to enable raw email downloads behind a feature flag. Updates list types and tests; no runtime behavior change.

  • New Features
    • Added raw: { download_url: string; expires_at: string } | null to GetReceivingEmailResponseSuccess.
    • Omitted raw from ListReceivingEmail to keep list payloads small.
    • Extended tests to cover raw present and null cases.

Written for commit 56d6fe4. Summary will update on new commits.

@lucasfcosta lucasfcosta requested a review from a team as a code owner January 2, 2026 19:35
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 2, 2026

Open in StackBlitz

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

commit: 56d6fe4

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 3 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


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

<violation number="1" location="src/emails/receiving/receiving.spec.ts:73">
P2: Invalid ISO 8601 timestamp: hour `24` with non-zero minutes/seconds (`24:13:52`) is not valid. If the intent is 1 hour after `created_at` (23:13), this should be `2023-04-08T00:13:52.669661+00:00` (midnight + 13 minutes on the next day).</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

raw: {
download_url:
'https://example.com/emails/raw/abc123?signature=xyz789',
expires_at: '2023-04-07T24:13:52.669661+00:00',
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Jan 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Invalid ISO 8601 timestamp: hour 24 with non-zero minutes/seconds (24:13:52) is not valid. If the intent is 1 hour after created_at (23:13), this should be 2023-04-08T00:13:52.669661+00:00 (midnight + 13 minutes on the next day).

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/emails/receiving/receiving.spec.ts, line 73:

<comment>Invalid ISO 8601 timestamp: hour `24` with non-zero minutes/seconds (`24:13:52`) is not valid. If the intent is 1 hour after `created_at` (23:13), this should be `2023-04-08T00:13:52.669661+00:00` (midnight + 13 minutes on the next day).</comment>

<file context>
@@ -67,6 +67,11 @@ describe(&#39;Receiving&#39;, () =&gt; {
+          raw: {
+            download_url:
+              &#39;https://example.com/emails/raw/abc123?signature=xyz789&#39;,
+            expires_at: &#39;2023-04-07T24:13:52.669661+00:00&#39;,
+          },
           attachments: [
</file context>

✅ Addressed in 3aef7be

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants