Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ export interface GetReceivingEmailResponseSuccess {
text: string | null;
headers: Record<string, string>;
message_id: string;
raw: {
download_url: string;
expires_at: string;
} | null;
attachments: Array<{
id: string;
filename: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export type ListReceivingEmailsOptions = PaginationOptions;

export type ListReceivingEmail = Omit<
GetReceivingEmailResponseSuccess,
'html' | 'text' | 'headers' | 'object'
'html' | 'text' | 'headers' | 'raw' | 'object'
>;

export interface ListReceivingEmailsResponseSuccess {
Expand Down
11 changes: 11 additions & 0 deletions src/emails/receiving/receiving.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ describe('Receiving', () => {
headers: {
example: 'value',
},
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

},
attachments: [
{
id: 'att_123',
Expand Down Expand Up @@ -117,6 +122,10 @@ describe('Receiving', () => {
"id": "67d9bcdb-5a02-42d7-8da9-0d6feea18cff",
"message_id": "msg_123",
"object": "email",
"raw": {
"download_url": "https://example.com/emails/raw/abc123?signature=xyz789",
"expires_at": "2023-04-07T24:13:52.669661+00:00",
},
"reply_to": [
"reply@example.com",
],
Expand Down Expand Up @@ -148,6 +157,7 @@ describe('Receiving', () => {
cc: null,
reply_to: null,
headers: {},
raw: null,
attachments: [],
message_id: 'msg_456',
};
Expand Down Expand Up @@ -176,6 +186,7 @@ describe('Receiving', () => {
"id": "67d9bcdb-5a02-42d7-8da9-0d6feea18cff",
"message_id": "msg_456",
"object": "email",
"raw": null,
"reply_to": null,
"subject": "Test inbound email",
"text": "hello world",
Expand Down
Loading