From a4fa39ec64cfaecc68d9d9014b576e35a6511c5c Mon Sep 17 00:00:00 2001 From: Felipe Freitag Date: Thu, 6 Aug 2026 11:15:33 -0300 Subject: [PATCH] chore: use the API timestamp format in test fixtures The API returns timestamps in Postgres text format (2023-10-06 23:47:56.678+00), not ISO 8601. Spec fixtures and inline snapshots showed ISO 8601 for response fields. Convert response fixtures and snapshots to the real format. The HAR recordings already show it: they contain real recorded API traffic. Keep ISO 8601 where the API uses it: the scheduledAt request param (batch.spec.ts, broadcasts.spec.ts:156) and revoked_at in the revoke response (oauth-grants.spec.ts). No runtime changes. --- src/api-keys/api-keys.spec.ts | 6 +- src/automation-runs/automation-runs.spec.ts | 44 +++++++------- src/automations/automations.spec.ts | 16 ++--- src/broadcasts/broadcasts.spec.ts | 12 ++-- .../contact-properties.spec.ts | 12 ++-- src/contacts/contacts.spec.ts | 38 ++++++------ src/contacts/imports/contact-imports.spec.ts | 16 ++--- .../segments/contact-segments.spec.ts | 12 ++-- src/domains/claims/domain-claims.spec.ts | 4 +- src/domains/domains.spec.ts | 34 +++++------ src/emails/attachments/attachments.spec.ts | 30 +++++----- src/emails/emails.spec.ts | 10 ++-- .../receiving/attachments/attachments.spec.ts | 36 +++++------ src/emails/receiving/receiving.spec.ts | 60 +++++++++---------- src/events/events.spec.ts | 20 +++---- src/logs/logs.spec.ts | 8 +-- src/oauth-grants/oauth-grants.spec.ts | 6 +- src/segments/audiences.spec.ts | 8 +-- src/segments/segments.spec.ts | 8 +-- src/suppressions/suppressions.spec.ts | 6 +- src/templates/templates.spec.ts | 32 +++++----- src/topics/topics.spec.ts | 12 ++-- src/webhooks/webhooks.spec.ts | 8 +-- 23 files changed, 219 insertions(+), 219 deletions(-) diff --git a/src/api-keys/api-keys.spec.ts b/src/api-keys/api-keys.spec.ts index 56c7065c..89692da4 100644 --- a/src/api-keys/api-keys.spec.ts +++ b/src/api-keys/api-keys.spec.ts @@ -280,13 +280,13 @@ describe('API Keys', () => { { id: '5262504e-8ed7-4fac-bd16-0d4be94bc9f2', name: 'My API Key 1', - created_at: '2023-04-07T20:29:10.666968+00:00', - last_used_at: '2023-04-08T12:00:00.000000+00:00', + created_at: '2023-04-07 20:29:10.666968+00', + last_used_at: '2023-04-08 12:00:00+00', }, { id: '98c37b35-1473-4afe-a627-78e975a36fab', name: 'My API Key 2', - created_at: '2023-04-06T23:09:49.093947+00:00', + created_at: '2023-04-06 23:09:49.093947+00', last_used_at: null, }, ], diff --git a/src/automation-runs/automation-runs.spec.ts b/src/automation-runs/automation-runs.spec.ts index 0aeecf8a..a082885c 100644 --- a/src/automation-runs/automation-runs.spec.ts +++ b/src/automation-runs/automation-runs.spec.ts @@ -29,9 +29,9 @@ describe('get', () => { object: 'automation_run', id: 'wr_456', status: 'completed', - started_at: '2024-01-01T00:00:00.000Z', - completed_at: '2024-01-01T00:01:00.000Z', - created_at: '2024-01-01T00:00:00.000Z', + started_at: '2024-01-01 00:00:00+00', + completed_at: '2024-01-01 00:01:00+00', + created_at: '2024-01-01 00:00:00+00', steps: [ { key: 'trigger_1', @@ -39,9 +39,9 @@ describe('get', () => { status: 'completed', output: null, error: null, - started_at: '2024-01-01T00:00:00.000Z', - completed_at: '2024-01-01T00:00:01.000Z', - created_at: '2024-01-01T00:00:00.000Z', + started_at: '2024-01-01 00:00:00+00', + completed_at: '2024-01-01 00:00:01+00', + created_at: '2024-01-01 00:00:00+00', }, ], }; @@ -54,20 +54,20 @@ describe('get', () => { ).resolves.toMatchInlineSnapshot(` { "data": { - "completed_at": "2024-01-01T00:01:00.000Z", - "created_at": "2024-01-01T00:00:00.000Z", + "completed_at": "2024-01-01 00:01:00+00", + "created_at": "2024-01-01 00:00:00+00", "id": "wr_456", "object": "automation_run", - "started_at": "2024-01-01T00:00:00.000Z", + "started_at": "2024-01-01 00:00:00+00", "status": "completed", "steps": [ { - "completed_at": "2024-01-01T00:00:01.000Z", - "created_at": "2024-01-01T00:00:00.000Z", + "completed_at": "2024-01-01 00:00:01+00", + "created_at": "2024-01-01 00:00:00+00", "error": null, "key": "trigger_1", "output": null, - "started_at": "2024-01-01T00:00:00.000Z", + "started_at": "2024-01-01 00:00:00+00", "status": "completed", "type": "trigger", }, @@ -109,9 +109,9 @@ describe('list', () => { { id: 'wr_456', status: 'completed', - started_at: '2024-01-01T00:00:00.000Z', - completed_at: '2024-01-01T00:01:00.000Z', - created_at: '2024-01-01T00:00:00.000Z', + started_at: '2024-01-01 00:00:00+00', + completed_at: '2024-01-01 00:01:00+00', + created_at: '2024-01-01 00:00:00+00', }, ], has_more: false, @@ -127,10 +127,10 @@ describe('list', () => { "data": { "data": [ { - "completed_at": "2024-01-01T00:01:00.000Z", - "created_at": "2024-01-01T00:00:00.000Z", + "completed_at": "2024-01-01 00:01:00+00", + "created_at": "2024-01-01 00:00:00+00", "id": "wr_456", - "started_at": "2024-01-01T00:00:00.000Z", + "started_at": "2024-01-01 00:00:00+00", "status": "completed", }, ], @@ -157,9 +157,9 @@ describe('list', () => { { id: 'wr_789', status: 'running', - started_at: '2024-01-02T00:00:00.000Z', + started_at: '2024-01-02 00:00:00+00', completed_at: null, - created_at: '2024-01-02T00:00:00.000Z', + created_at: '2024-01-02 00:00:00+00', }, ], has_more: true, @@ -176,9 +176,9 @@ describe('list', () => { "data": [ { "completed_at": null, - "created_at": "2024-01-02T00:00:00.000Z", + "created_at": "2024-01-02 00:00:00+00", "id": "wr_789", - "started_at": "2024-01-02T00:00:00.000Z", + "started_at": "2024-01-02 00:00:00+00", "status": "running", }, ], diff --git a/src/automations/automations.spec.ts b/src/automations/automations.spec.ts index 06f7b020..553558cf 100644 --- a/src/automations/automations.spec.ts +++ b/src/automations/automations.spec.ts @@ -111,15 +111,15 @@ describe('list', () => { id: '49a3999c-0ce1-4ea6-ab68-afcd6dc2e794', name: 'Welcome Flow', status: 'enabled', - created_at: '2025-01-01T00:00:00.000Z', - updated_at: '2025-01-01T00:00:00.000Z', + created_at: '2025-01-01 00:00:00+00', + updated_at: '2025-01-01 00:00:00+00', }, { id: '559ac32e-9ef5-46fb-82a1-b76b840c0f7b', name: 'Onboarding Flow', status: 'disabled', - created_at: '2025-02-01T00:00:00.000Z', - updated_at: '2025-02-01T00:00:00.000Z', + created_at: '2025-02-01 00:00:00+00', + updated_at: '2025-02-01 00:00:00+00', }, ], }; @@ -302,8 +302,8 @@ describe('get', () => { id: '559ac32e-9ef5-46fb-82a1-b76b840c0f7b', name: 'Welcome Flow', status: 'enabled', - created_at: '2025-01-01T00:00:00.000Z', - updated_at: '2025-01-01T00:00:00.000Z', + created_at: '2025-01-01 00:00:00+00', + updated_at: '2025-01-01 00:00:00+00', steps: [ { key: 'step-1', @@ -329,7 +329,7 @@ describe('get', () => { { "data": { "connections": [], - "created_at": "2025-01-01T00:00:00.000Z", + "created_at": "2025-01-01 00:00:00+00", "id": "559ac32e-9ef5-46fb-82a1-b76b840c0f7b", "name": "Welcome Flow", "object": "automation", @@ -343,7 +343,7 @@ describe('get', () => { "type": "trigger", }, ], - "updated_at": "2025-01-01T00:00:00.000Z", + "updated_at": "2025-01-01 00:00:00+00", }, "error": null, "headers": { diff --git a/src/broadcasts/broadcasts.spec.ts b/src/broadcasts/broadcasts.spec.ts index ca768136..cf19bbed 100644 --- a/src/broadcasts/broadcasts.spec.ts +++ b/src/broadcasts/broadcasts.spec.ts @@ -371,7 +371,7 @@ describe('Broadcasts', () => { segment_id: '78261eea-8f8b-4381-83c6-79fa7120f1cf', name: 'broadcast 1', status: 'draft', - created_at: '2024-11-01T15:13:31.723Z', + created_at: '2024-11-01 15:13:31.723+00', scheduled_at: null, sent_at: null, }, @@ -381,9 +381,9 @@ describe('Broadcasts', () => { segment_id: '78261eea-8f8b-4381-83c6-79fa7120f1cf', name: 'broadcast 2', status: 'sent', - created_at: '2024-12-01T19:32:22.980Z', - scheduled_at: '2024-12-02T19:32:22.980Z', - sent_at: '2024-12-02T19:32:22.980Z', + created_at: '2024-12-01 19:32:22.98+00', + scheduled_at: '2024-12-02 19:32:22.98+00', + sent_at: '2024-12-02 19:32:22.98+00', }, ], }; @@ -547,7 +547,7 @@ describe('Broadcasts', () => { reply_to: null, preview_text: 'Check out our latest announcements', status: 'draft', - created_at: '2024-12-01T19:32:22.980Z', + created_at: '2024-12-01 19:32:22.98+00', scheduled_at: null, sent_at: null, topic_id: '9f31e56e-3083-46cf-8e96-c6995e0e576a', @@ -569,7 +569,7 @@ describe('Broadcasts', () => { { "data": { "audience_id": "78261eea-8f8b-4381-83c6-79fa7120f1cf", - "created_at": "2024-12-01T19:32:22.980Z", + "created_at": "2024-12-01 19:32:22.98+00", "from": "Acme ", "html": "

Hello world

", "id": "559ac32e-9ef5-46fb-82a1-b76b840c0f7b", diff --git a/src/contact-properties/contact-properties.spec.ts b/src/contact-properties/contact-properties.spec.ts index 857d824b..59c48437 100644 --- a/src/contact-properties/contact-properties.spec.ts +++ b/src/contact-properties/contact-properties.spec.ts @@ -97,14 +97,14 @@ describe('ContactProperties', () => { key: 'country', type: 'string', fallback_value: 'unknown', - created_at: '2021-01-01T00:00:00.000Z', + created_at: '2021-01-01 00:00:00+00', }, { id: 'ac7503ac-e027-4aea-94b3-b0acd46f65f9', key: 'edition', type: 'number', fallback_value: 1, - created_at: '2021-01-01T00:00:00.000Z', + created_at: '2021-01-01 00:00:00+00', }, ], object: 'list', @@ -121,14 +121,14 @@ describe('ContactProperties', () => { "data": { "data": [ { - "createdAt": "2021-01-01T00:00:00.000Z", + "createdAt": "2021-01-01 00:00:00+00", "fallbackValue": "unknown", "id": "b6d24b8e-af0b-4c3c-be0c-359bbd97381e", "key": "country", "type": "string", }, { - "createdAt": "2021-01-01T00:00:00.000Z", + "createdAt": "2021-01-01 00:00:00+00", "fallbackValue": 1, "id": "ac7503ac-e027-4aea-94b3-b0acd46f65f9", "key": "edition", @@ -155,7 +155,7 @@ describe('ContactProperties', () => { type: 'string', fallback_value: 'unknown', object: 'contact_property', - created_at: '2021-01-01T00:00:00.000Z', + created_at: '2021-01-01 00:00:00+00', }; mockSuccessResponse(response, { headers: {}, @@ -166,7 +166,7 @@ describe('ContactProperties', () => { ).resolves.toMatchInlineSnapshot(` { "data": { - "createdAt": "2021-01-01T00:00:00.000Z", + "createdAt": "2021-01-01 00:00:00+00", "fallbackValue": "unknown", "id": "b6d24b8e-af0b-4c3c-be0c-359bbd97381e", "key": "country", diff --git a/src/contacts/contacts.spec.ts b/src/contacts/contacts.spec.ts index 9a6201cb..18c8b024 100644 --- a/src/contacts/contacts.spec.ts +++ b/src/contacts/contacts.spec.ts @@ -227,7 +227,7 @@ describe('Contacts', () => { { id: 'b6d24b8e-af0b-4c3c-be0c-359bbd97381e', email: 'team@resend.com', - created_at: '2023-04-07T23:13:52.669661+00:00', + created_at: '2023-04-07 23:13:52.669661+00', unsubscribed: false, first_name: 'John', last_name: 'Smith', @@ -235,7 +235,7 @@ describe('Contacts', () => { { id: 'ac7503ac-e027-4aea-94b3-b0acd46f65f9', email: 'team@react.email', - created_at: '2023-04-07T23:13:20.417116+00:00', + created_at: '2023-04-07 23:13:20.417116+00', unsubscribed: false, first_name: 'John', last_name: 'Smith', @@ -279,7 +279,7 @@ describe('Contacts', () => { { id: 'b6d24b8e-af0b-4c3c-be0c-359bbd97381e', email: 'team@resend.com', - created_at: '2023-04-07T23:13:52.669661+00:00', + created_at: '2023-04-07 23:13:52.669661+00', unsubscribed: false, first_name: 'John', last_name: 'Smith', @@ -287,7 +287,7 @@ describe('Contacts', () => { { id: 'ac7503ac-e027-4aea-94b3-b0acd46f65f9', email: 'team@react.email', - created_at: '2023-04-07T23:13:20.417116+00:00', + created_at: '2023-04-07 23:13:20.417116+00', unsubscribed: false, first_name: 'John', last_name: 'Smith', @@ -307,7 +307,7 @@ describe('Contacts', () => { "data": { "data": [ { - "created_at": "2023-04-07T23:13:52.669661+00:00", + "created_at": "2023-04-07 23:13:52.669661+00", "email": "team@resend.com", "first_name": "John", "id": "b6d24b8e-af0b-4c3c-be0c-359bbd97381e", @@ -315,7 +315,7 @@ describe('Contacts', () => { "unsubscribed": false, }, { - "created_at": "2023-04-07T23:13:20.417116+00:00", + "created_at": "2023-04-07 23:13:20.417116+00", "email": "team@react.email", "first_name": "John", "id": "ac7503ac-e027-4aea-94b3-b0acd46f65f9", @@ -344,7 +344,7 @@ describe('Contacts', () => { { id: 'b6d24b8e-af0b-4c3c-be0c-359bbd97381e', email: 'team@resend.com', - created_at: '2023-04-07T23:13:52.669661+00:00', + created_at: '2023-04-07 23:13:52.669661+00', unsubscribed: false, first_name: 'John', last_name: 'Smith', @@ -484,7 +484,7 @@ describe('Contacts', () => { email: 'team@resend.com', first_name: '', last_name: '', - created_at: '2024-01-16T18:12:26.514Z', + created_at: '2024-01-16 18:12:26.514+00', unsubscribed: false, properties: {}, }; @@ -506,7 +506,7 @@ describe('Contacts', () => { ).resolves.toMatchInlineSnapshot(` { "data": { - "created_at": "2024-01-16T18:12:26.514Z", + "created_at": "2024-01-16 18:12:26.514+00", "email": "team@resend.com", "first_name": "", "id": "fd61172c-cafc-40f5-b049-b45947779a29", @@ -530,7 +530,7 @@ describe('Contacts', () => { email: 'team@resend.com', first_name: '', last_name: '', - created_at: '2024-01-16T18:12:26.514Z', + created_at: '2024-01-16 18:12:26.514+00', unsubscribed: false, properties: {}, }; @@ -552,7 +552,7 @@ describe('Contacts', () => { ).resolves.toMatchInlineSnapshot(` { "data": { - "created_at": "2024-01-16T18:12:26.514Z", + "created_at": "2024-01-16 18:12:26.514+00", "email": "team@resend.com", "first_name": "", "id": "fd61172c-cafc-40f5-b049-b45947779a29", @@ -577,7 +577,7 @@ describe('Contacts', () => { email: 'team@resend.com', first_name: '', last_name: '', - created_at: '2024-01-16T18:12:26.514Z', + created_at: '2024-01-16 18:12:26.514+00', unsubscribed: false, properties: { country: { @@ -607,7 +607,7 @@ describe('Contacts', () => { ).resolves.toMatchInlineSnapshot(` { "data": { - "created_at": "2024-01-16T18:12:26.514Z", + "created_at": "2024-01-16 18:12:26.514+00", "email": "team@resend.com", "first_name": "", "id": "fd61172c-cafc-40f5-b049-b45947779a29", @@ -640,7 +640,7 @@ describe('Contacts', () => { email: 'team@resend.com', first_name: '', last_name: '', - created_at: '2024-01-16T18:12:26.514Z', + created_at: '2024-01-16 18:12:26.514+00', unsubscribed: false, properties: { country: { @@ -670,7 +670,7 @@ describe('Contacts', () => { ).resolves.toMatchInlineSnapshot(` { "data": { - "created_at": "2024-01-16T18:12:26.514Z", + "created_at": "2024-01-16 18:12:26.514+00", "email": "team@resend.com", "first_name": "", "id": "fd61172c-cafc-40f5-b049-b45947779a29", @@ -702,7 +702,7 @@ describe('Contacts', () => { email: 'team@resend.com', first_name: '', last_name: '', - created_at: '2024-01-16T18:12:26.514Z', + created_at: '2024-01-16 18:12:26.514+00', properties: { country: { type: 'string', @@ -729,7 +729,7 @@ describe('Contacts', () => { ).resolves.toMatchInlineSnapshot(` { "data": { - "created_at": "2024-01-16T18:12:26.514Z", + "created_at": "2024-01-16 18:12:26.514+00", "email": "team@resend.com", "first_name": "", "id": "fd61172c-cafc-40f5-b049-b45947779a29", @@ -770,7 +770,7 @@ describe('Contacts', () => { email: 'team@resend.com', first_name: '', last_name: '', - created_at: '2024-01-16T18:12:26.514Z', + created_at: '2024-01-16 18:12:26.514+00', properties: { country: { type: 'string', @@ -797,7 +797,7 @@ describe('Contacts', () => { ).resolves.toMatchInlineSnapshot(` { "data": { - "created_at": "2024-01-16T18:12:26.514Z", + "created_at": "2024-01-16 18:12:26.514+00", "email": "team@resend.com", "first_name": "", "id": "fd61172c-cafc-40f5-b049-b45947779a29", diff --git a/src/contacts/imports/contact-imports.spec.ts b/src/contacts/imports/contact-imports.spec.ts index 186507ff..e9512e25 100644 --- a/src/contacts/imports/contact-imports.spec.ts +++ b/src/contacts/imports/contact-imports.spec.ts @@ -117,8 +117,8 @@ describe('ContactImports', () => { object: 'contact_import', id: '479e3145-dd38-476b-932c-529ceb705947', status: 'completed', - created_at: '2026-05-15T18:32:37.823Z', - completed_at: '2026-05-15T18:33:42.916Z', + created_at: '2026-05-15 18:32:37.823+00', + completed_at: '2026-05-15 18:33:42.916+00', counts: { total: 1200, created: 800, @@ -140,7 +140,7 @@ describe('ContactImports', () => { "data": { "data": [ { - "completed_at": "2026-05-15T18:33:42.916Z", + "completed_at": "2026-05-15 18:33:42.916+00", "counts": { "created": 800, "failed": 25, @@ -148,7 +148,7 @@ describe('ContactImports', () => { "total": 1200, "updated": 300, }, - "created_at": "2026-05-15T18:32:37.823Z", + "created_at": "2026-05-15 18:32:37.823+00", "id": "479e3145-dd38-476b-932c-529ceb705947", "object": "contact_import", "status": "completed", @@ -196,8 +196,8 @@ describe('ContactImports', () => { object: 'contact_import', id: '479e3145-dd38-476b-932c-529ceb705947', status: 'completed', - created_at: '2026-05-15T18:32:37.823Z', - completed_at: '2026-05-15T18:33:42.916Z', + created_at: '2026-05-15 18:32:37.823+00', + completed_at: '2026-05-15 18:33:42.916+00', counts: { total: 1200, created: 800, @@ -215,7 +215,7 @@ describe('ContactImports', () => { ).resolves.toMatchInlineSnapshot(` { "data": { - "completed_at": "2026-05-15T18:33:42.916Z", + "completed_at": "2026-05-15 18:33:42.916+00", "counts": { "created": 800, "failed": 25, @@ -223,7 +223,7 @@ describe('ContactImports', () => { "total": 1200, "updated": 300, }, - "created_at": "2026-05-15T18:32:37.823Z", + "created_at": "2026-05-15 18:32:37.823+00", "id": "479e3145-dd38-476b-932c-529ceb705947", "object": "contact_import", "status": "completed", diff --git a/src/contacts/segments/contact-segments.spec.ts b/src/contacts/segments/contact-segments.spec.ts index 69d7295d..8860c373 100644 --- a/src/contacts/segments/contact-segments.spec.ts +++ b/src/contacts/segments/contact-segments.spec.ts @@ -31,12 +31,12 @@ describe('ContactSegments', () => { { id: 'c7e1e488-ae2c-4255-a40c-a4db3af7ed0b', name: 'Test Segment', - created_at: '2021-01-01T00:00:00.000Z', + created_at: '2021-01-01 00:00:00+00', }, { id: 'd7e1e488-ae2c-4255-a40c-a4db3af7ed0c', name: 'Another Segment', - created_at: '2021-01-02T00:00:00.000Z', + created_at: '2021-01-02 00:00:00+00', }, ], has_more: false, @@ -52,12 +52,12 @@ describe('ContactSegments', () => { "data": { "data": [ { - "created_at": "2021-01-01T00:00:00.000Z", + "created_at": "2021-01-01 00:00:00+00", "id": "c7e1e488-ae2c-4255-a40c-a4db3af7ed0b", "name": "Test Segment", }, { - "created_at": "2021-01-02T00:00:00.000Z", + "created_at": "2021-01-02 00:00:00+00", "id": "d7e1e488-ae2c-4255-a40c-a4db3af7ed0c", "name": "Another Segment", }, @@ -85,7 +85,7 @@ describe('ContactSegments', () => { { id: 'c7e1e488-ae2c-4255-a40c-a4db3af7ed0b', name: 'Test Segment', - created_at: '2021-01-01T00:00:00.000Z', + created_at: '2021-01-01 00:00:00+00', }, ], has_more: true, @@ -101,7 +101,7 @@ describe('ContactSegments', () => { "data": { "data": [ { - "created_at": "2021-01-01T00:00:00.000Z", + "created_at": "2021-01-01 00:00:00+00", "id": "c7e1e488-ae2c-4255-a40c-a4db3af7ed0b", "name": "Test Segment", }, diff --git a/src/domains/claims/domain-claims.spec.ts b/src/domains/claims/domain-claims.spec.ts index dc9f74e0..052095db 100644 --- a/src/domains/claims/domain-claims.spec.ts +++ b/src/domains/claims/domain-claims.spec.ts @@ -26,8 +26,8 @@ const domainClaim: ClaimDomainResponseSuccess = { }, blocked_reason: null, failure_reason: null, - created_at: '2026-06-16T17:12:02.059593+00:00', - expires_at: '2026-06-23T17:12:02.059593+00:00', + created_at: '2026-06-16 17:12:02.059593+00', + expires_at: '2026-06-23 17:12:02.059593+00', }; describe('DomainClaims', () => { diff --git a/src/domains/domains.spec.ts b/src/domains/domains.spec.ts index 653de394..fb2b791c 100644 --- a/src/domains/domains.spec.ts +++ b/src/domains/domains.spec.ts @@ -25,7 +25,7 @@ describe('Domains', () => { const response: CreateDomainResponseSuccess = { id: '3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222', name: 'resend.com', - created_at: '2023-04-07T22:48:33.420498+00:00', + created_at: '2023-04-07 22:48:33.420498+00', status: 'not_started', capabilities: { sending: 'enabled', @@ -103,7 +103,7 @@ describe('Domains', () => { "receiving": "enabled", "sending": "enabled", }, - "created_at": "2023-04-07T22:48:33.420498+00:00", + "created_at": "2023-04-07 22:48:33.420498+00", "id": "3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222", "name": "resend.com", "records": [ @@ -211,7 +211,7 @@ describe('Domains', () => { const response: CreateDomainResponseSuccess = { id: '3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222', name: 'resend.com', - created_at: '2023-04-07T22:48:33.420498+00:00', + created_at: '2023-04-07 22:48:33.420498+00', status: 'not_started', capabilities: { sending: 'enabled', @@ -278,7 +278,7 @@ describe('Domains', () => { "receiving": "enabled", "sending": "enabled", }, - "created_at": "2023-04-07T22:48:33.420498+00:00", + "created_at": "2023-04-07 22:48:33.420498+00", "id": "3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222", "name": "resend.com", "records": [ @@ -377,7 +377,7 @@ describe('Domains', () => { const response: CreateDomainResponseSuccess = { id: '3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222', name: 'resend.com', - created_at: '2023-04-07T22:48:33.420498+00:00', + created_at: '2023-04-07 22:48:33.420498+00', status: 'not_started', capabilities: { sending: 'enabled', @@ -435,7 +435,7 @@ describe('Domains', () => { "receiving": "enabled", "sending": "enabled", }, - "created_at": "2023-04-07T22:48:33.420498+00:00", + "created_at": "2023-04-07 22:48:33.420498+00", "id": "3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222", "name": "resend.com", "records": [ @@ -482,7 +482,7 @@ describe('Domains', () => { const response: CreateDomainResponseSuccess = { id: '3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222', name: 'resend.com', - created_at: '2023-04-07T22:48:33.420498+00:00', + created_at: '2023-04-07 22:48:33.420498+00', status: 'not_started', capabilities: { sending: 'enabled', @@ -553,7 +553,7 @@ describe('Domains', () => { const response: CreateDomainResponseSuccess = { id: '3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222', name: 'resend.com', - created_at: '2023-04-07T22:48:33.420498+00:00', + created_at: '2023-04-07 22:48:33.420498+00', status: 'not_started', capabilities: { sending: 'enabled', @@ -601,7 +601,7 @@ describe('Domains', () => { const response: CreateDomainResponseSuccess = { id: '3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222', name: 'resend.com', - created_at: '2023-04-07T22:48:33.420498+00:00', + created_at: '2023-04-07 22:48:33.420498+00', status: 'not_started', capabilities: { sending: 'disabled', @@ -658,7 +658,7 @@ describe('Domains', () => { const response: CreateDomainResponseSuccess = { id: '3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222', name: 'resend.com', - created_at: '2023-04-07T22:48:33.420498+00:00', + created_at: '2023-04-07 22:48:33.420498+00', status: 'not_started', capabilities: { sending: 'enabled', @@ -724,7 +724,7 @@ describe('Domains', () => { const response: CreateDomainResponseSuccess = { id: '3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222', name: 'resend.com', - created_at: '2023-04-07T22:48:33.420498+00:00', + created_at: '2023-04-07 22:48:33.420498+00', status: 'not_started', capabilities: { sending: 'disabled', @@ -778,7 +778,7 @@ describe('Domains', () => { id: 'b6d24b8e-af0b-4c3c-be0c-359bbd97381e', name: 'resend.com', status: 'not_started', - created_at: '2023-04-07T23:13:52.669661+00:00', + created_at: '2023-04-07 23:13:52.669661+00', region: 'eu-west-1', capabilities: { sending: 'enabled', @@ -789,7 +789,7 @@ describe('Domains', () => { id: 'ac7503ac-e027-4aea-94b3-b0acd46f65f9', name: 'react.email', status: 'not_started', - created_at: '2023-04-07T23:13:20.417116+00:00', + created_at: '2023-04-07 23:13:20.417116+00', region: 'us-east-1', capabilities: { sending: 'enabled', @@ -949,7 +949,7 @@ describe('Domains', () => { id: 'fd61172c-cafc-40f5-b049-b45947779a29', name: 'resend.com', status: 'not_started', - created_at: '2023-06-21T06:10:36.144Z', + created_at: '2023-06-21 06:10:36.144+00', region: 'us-east-1', open_tracking: true, click_tracking: true, @@ -1030,7 +1030,7 @@ describe('Domains', () => { "sending": "enabled", }, "click_tracking": true, - "created_at": "2023-06-21T06:10:36.144Z", + "created_at": "2023-06-21 06:10:36.144+00", "id": "fd61172c-cafc-40f5-b049-b45947779a29", "name": "resend.com", "object": "domain", @@ -1105,7 +1105,7 @@ describe('Domains', () => { id: 'fd61172c-cafc-40f5-b049-b45947779a29', name: 'resend.com', status: 'partially_verified', - created_at: '2023-06-21T06:10:36.144Z', + created_at: '2023-06-21 06:10:36.144+00', region: 'us-east-1', click_tracking: true, tracking_subdomain: 'track', @@ -1152,7 +1152,7 @@ describe('Domains', () => { id: 'fd61172c-cafc-40f5-b049-b45947779a29', name: 'resend.com', status: 'partially_failed', - created_at: '2023-06-21T06:10:36.144Z', + created_at: '2023-06-21 06:10:36.144+00', region: 'us-east-1', capabilities: { sending: 'enabled', diff --git a/src/emails/attachments/attachments.spec.ts b/src/emails/attachments/attachments.spec.ts index 2203efa9..d09aba36 100644 --- a/src/emails/attachments/attachments.spec.ts +++ b/src/emails/attachments/attachments.spec.ts @@ -61,7 +61,7 @@ describe('Sending', () => { content_id: 'cid_123', content_disposition: 'attachment' as const, download_url: 'https://example.com/download/att_123', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }; fetchMock.mockOnceIf( @@ -99,7 +99,7 @@ describe('Sending', () => { content_id: 'cid_456', content_disposition: 'inline' as const, download_url: 'https://example.com/download/att_456', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }; fetchMock.mockOnceIf( @@ -135,7 +135,7 @@ describe('Sending', () => { content_type: 'text/plain', content_disposition: 'attachment' as const, download_url: 'https://example.com/download/att_789', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }; fetchMock.mockOnceIf( @@ -178,7 +178,7 @@ describe('Sending', () => { content_id: 'cid_123', content_disposition: 'attachment' as const, download_url: 'https://example.com/download/att_123', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }, { id: 'att_456', @@ -188,7 +188,7 @@ describe('Sending', () => { content_id: 'cid_456', content_disposition: 'inline' as const, download_url: 'https://example.com/download/att_456', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }, ], }; @@ -253,7 +253,7 @@ describe('Sending', () => { content_id: 'cid_123', content_disposition: 'attachment', download_url: 'https://example.com/download/att_123', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }, { id: 'att_456', @@ -263,7 +263,7 @@ describe('Sending', () => { content_id: 'cid_456', content_disposition: 'inline', download_url: 'https://example.com/download/att_456', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }, ], }; @@ -331,7 +331,7 @@ describe('Sending', () => { content_id: 'cid_123', content_disposition: 'attachment', download_url: 'https://example.com/download/att_123', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }, { id: 'att_456', @@ -341,7 +341,7 @@ describe('Sending', () => { content_id: 'cid_456', content_disposition: 'inline', download_url: 'https://example.com/download/att_456', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }, ], }; @@ -380,7 +380,7 @@ describe('Sending', () => { content_id: 'cid_123', content_disposition: 'attachment', download_url: 'https://example.com/download/att_123', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }, { id: 'att_456', @@ -390,7 +390,7 @@ describe('Sending', () => { content_id: 'cid_456', content_disposition: 'inline', download_url: 'https://example.com/download/att_456', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }, ], }; @@ -427,7 +427,7 @@ describe('Sending', () => { content_id: 'cid_123', content_disposition: 'attachment', download_url: 'https://example.com/download/att_123', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }, { id: 'att_456', @@ -437,7 +437,7 @@ describe('Sending', () => { content_id: 'cid_456', content_disposition: 'inline', download_url: 'https://example.com/download/att_456', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }, ], }; @@ -474,7 +474,7 @@ describe('Sending', () => { content_id: 'cid_123', content_disposition: 'attachment', download_url: 'https://example.com/download/att_123', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }, { id: 'att_456', @@ -484,7 +484,7 @@ describe('Sending', () => { content_id: 'cid_456', content_disposition: 'inline', download_url: 'https://example.com/download/att_456', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }, ], }; diff --git a/src/emails/emails.spec.ts b/src/emails/emails.spec.ts index a6022102..ada9aee7 100644 --- a/src/emails/emails.spec.ts +++ b/src/emails/emails.spec.ts @@ -675,7 +675,7 @@ describe('Emails', () => { message_id: '', to: ['zeno@resend.com'], from: 'bu@resend.com', - created_at: '2023-04-07T23:13:52.669661+00:00', + created_at: '2023-04-07 23:13:52.669661+00', subject: 'Test email', html: '

hello hello

', text: null, @@ -700,7 +700,7 @@ describe('Emails', () => { "data": { "bcc": null, "cc": null, - "created_at": "2023-04-07T23:13:52.669661+00:00", + "created_at": "2023-04-07 23:13:52.669661+00", "from": "bu@resend.com", "html": "

hello hello

", "id": "67d9bcdb-5a02-42d7-8da9-0d6feea18cff", @@ -730,7 +730,7 @@ describe('Emails', () => { message_id: '', to: ['zeno@resend.com'], from: 'bu@resend.com', - created_at: '2023-04-07T23:13:52.669661+00:00', + created_at: '2023-04-07 23:13:52.669661+00', subject: 'Test email', html: '

hello hello

', text: null, @@ -758,7 +758,7 @@ describe('Emails', () => { "zeno@resend.com", "bu@resend.com", ], - "created_at": "2023-04-07T23:13:52.669661+00:00", + "created_at": "2023-04-07 23:13:52.669661+00", "from": "bu@resend.com", "html": "

hello hello

", "id": "67d9bcdb-5a02-42d7-8da9-0d6feea18cff", @@ -793,7 +793,7 @@ describe('Emails', () => { message_id: '', to: ['zeno@resend.com'], from: 'bu@resend.com', - created_at: '2023-04-07T23:13:52.669661+00:00', + created_at: '2023-04-07 23:13:52.669661+00', subject: 'Test email', bcc: null, cc: null, diff --git a/src/emails/receiving/attachments/attachments.spec.ts b/src/emails/receiving/attachments/attachments.spec.ts index a1b9d6bc..0c77c41f 100644 --- a/src/emails/receiving/attachments/attachments.spec.ts +++ b/src/emails/receiving/attachments/attachments.spec.ts @@ -61,7 +61,7 @@ describe('Receiving', () => { content_id: 'cid_123', content_disposition: 'attachment' as const, download_url: 'https://example.com/download/att_123', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }; fetchMock.mockOnceIf( @@ -90,7 +90,7 @@ describe('Receiving', () => { content_disposition: 'attachment', content_id: 'cid_123', download_url: 'https://example.com/download/att_123', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }, error: null, headers: { @@ -109,7 +109,7 @@ describe('Receiving', () => { content_id: 'cid_456', content_disposition: 'inline' as const, download_url: 'https://example.com/download/att_456', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }; fetchMock.mockOnceIf( @@ -138,7 +138,7 @@ describe('Receiving', () => { content_disposition: 'inline', content_id: 'cid_456', download_url: 'https://example.com/download/att_456', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }, error: null, headers: { @@ -155,7 +155,7 @@ describe('Receiving', () => { content_type: 'text/plain', content_disposition: 'attachment' as const, download_url: 'https://example.com/download/att_789', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }; fetchMock.mockOnceIf( @@ -182,7 +182,7 @@ describe('Receiving', () => { content_type: 'text/plain', content_disposition: 'attachment', download_url: 'https://example.com/download/att_789', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }, error: null, headers: { @@ -206,7 +206,7 @@ describe('Receiving', () => { content_id: 'cid_123', content_disposition: 'attachment' as const, download_url: 'https://example.com/download/att_123', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }, { id: 'att_456', @@ -216,7 +216,7 @@ describe('Receiving', () => { content_id: 'cid_456', content_disposition: 'inline' as const, download_url: 'https://example.com/download/att_456', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }, ], }; @@ -281,7 +281,7 @@ describe('Receiving', () => { content_id: 'cid_123', content_disposition: 'attachment', download_url: 'https://example.com/download/att_123', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }, { id: 'att_456', @@ -291,7 +291,7 @@ describe('Receiving', () => { content_id: 'cid_456', content_disposition: 'inline', download_url: 'https://example.com/download/att_456', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }, ], }; @@ -359,7 +359,7 @@ describe('Receiving', () => { content_id: 'cid_123', content_disposition: 'attachment', download_url: 'https://example.com/download/att_123', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }, { id: 'att_456', @@ -369,7 +369,7 @@ describe('Receiving', () => { content_id: 'cid_456', content_disposition: 'inline', download_url: 'https://example.com/download/att_456', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }, ], }; @@ -408,7 +408,7 @@ describe('Receiving', () => { content_id: 'cid_123', content_disposition: 'attachment', download_url: 'https://example.com/download/att_123', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }, { id: 'att_456', @@ -418,7 +418,7 @@ describe('Receiving', () => { content_id: 'cid_456', content_disposition: 'inline', download_url: 'https://example.com/download/att_456', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }, ], }; @@ -455,7 +455,7 @@ describe('Receiving', () => { content_id: 'cid_123', content_disposition: 'attachment', download_url: 'https://example.com/download/att_123', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }, { id: 'att_456', @@ -465,7 +465,7 @@ describe('Receiving', () => { content_id: 'cid_456', content_disposition: 'inline', download_url: 'https://example.com/download/att_456', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }, ], }; @@ -502,7 +502,7 @@ describe('Receiving', () => { content_id: 'cid_123', content_disposition: 'attachment', download_url: 'https://example.com/download/att_123', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }, { id: 'att_456', @@ -512,7 +512,7 @@ describe('Receiving', () => { content_id: 'cid_456', content_disposition: 'inline', download_url: 'https://example.com/download/att_456', - expires_at: '2025-10-18T12:00:00Z', + expires_at: '2025-10-18 12:00:00+00', }, ], }; diff --git a/src/emails/receiving/receiving.spec.ts b/src/emails/receiving/receiving.spec.ts index 4120d3a4..0b671e08 100644 --- a/src/emails/receiving/receiving.spec.ts +++ b/src/emails/receiving/receiving.spec.ts @@ -58,7 +58,7 @@ describe('Receiving', () => { id: '67d9bcdb-5a02-42d7-8da9-0d6feea18cff', to: ['received@example.com'], from: 'sender@example.com', - created_at: '2023-04-07T23:13:52.669661+00:00', + created_at: '2023-04-07 23:13:52.669661+00', subject: 'Test inbound email', html: '

hello world

', text: 'hello world', @@ -72,7 +72,7 @@ describe('Receiving', () => { raw: { download_url: 'https://example.com/emails/raw/abc123?signature=xyz789', - expires_at: '2023-04-08T00:13:52.669661+00:00', + expires_at: '2023-04-08 00:13:52.669661+00', }, attachments: [ { @@ -115,7 +115,7 @@ describe('Receiving', () => { "cc": [ "cc@example.com", ], - "created_at": "2023-04-07T23:13:52.669661+00:00", + "created_at": "2023-04-07 23:13:52.669661+00", "from": "sender@example.com", "headers": { "example": "value", @@ -126,7 +126,7 @@ describe('Receiving', () => { "object": "email", "raw": { "download_url": "https://example.com/emails/raw/abc123?signature=xyz789", - "expires_at": "2023-04-08T00:13:52.669661+00:00", + "expires_at": "2023-04-08 00:13:52.669661+00", }, "received_for": [], "reply_to": [ @@ -152,7 +152,7 @@ describe('Receiving', () => { id: '67d9bcdb-5a02-42d7-8da9-0d6feea18cff', to: ['received@example.com'], from: 'sender@example.com', - created_at: '2023-04-07T23:13:52.669661+00:00', + created_at: '2023-04-07 23:13:52.669661+00', subject: 'Test inbound email', html: null, text: 'hello world', @@ -183,7 +183,7 @@ describe('Receiving', () => { "attachments": [], "bcc": null, "cc": null, - "created_at": "2023-04-07T23:13:52.669661+00:00", + "created_at": "2023-04-07 23:13:52.669661+00", "from": "sender@example.com", "headers": {}, "html": null, @@ -215,7 +215,7 @@ describe('Receiving', () => { id: '67d9bcdb-5a02-42d7-8da9-0d6feea18cff', to: ['received@example.com'], from: 'sender@example.com', - created_at: '2023-04-07T23:13:52.669661+00:00', + created_at: '2023-04-07 23:13:52.669661+00', subject: 'Test inbound email', html: '

hello world

', text: 'hello world', @@ -252,7 +252,7 @@ describe('Receiving', () => { id: '67d9bcdb-5a02-42d7-8da9-0d6feea18cff', to: ['received@example.com'], from: 'sender@example.com', - created_at: '2023-04-07T23:13:52.669661+00:00', + created_at: '2023-04-07 23:13:52.669661+00', subject: 'Test inbound email', html: '

hello world

', text: 'hello world', @@ -328,7 +328,7 @@ describe('Receiving', () => { id: '67d9bcdb-5a02-42d7-8da9-0d6feea18cff', to: ['received@example.com'], from: 'sender@example.com', - created_at: '2023-04-07T23:13:52.669661+00:00', + created_at: '2023-04-07 23:13:52.669661+00', subject: 'Test inbound email 1', bcc: null, cc: ['cc@example.com'], @@ -350,7 +350,7 @@ describe('Receiving', () => { id: '87e9bcdb-6b03-43e8-9ea0-1e7gffa19d00', to: ['another@example.com'], from: 'sender2@example.com', - created_at: '2023-04-08T10:20:30.123456+00:00', + created_at: '2023-04-08 10:20:30.123456+00', subject: 'Test inbound email 2', bcc: ['bcc@example.com'], cc: null, @@ -390,7 +390,7 @@ describe('Receiving', () => { "cc": [ "cc@example.com", ], - "created_at": "2023-04-07T23:13:52.669661+00:00", + "created_at": "2023-04-07 23:13:52.669661+00", "from": "sender@example.com", "id": "67d9bcdb-5a02-42d7-8da9-0d6feea18cff", "message_id": "msg_789", @@ -409,7 +409,7 @@ describe('Receiving', () => { "bcc@example.com", ], "cc": null, - "created_at": "2023-04-08T10:20:30.123456+00:00", + "created_at": "2023-04-08 10:20:30.123456+00", "from": "sender2@example.com", "id": "87e9bcdb-6b03-43e8-9ea0-1e7gffa19d00", "message_id": "msg_012", @@ -441,7 +441,7 @@ describe('Receiving', () => { id: '67d9bcdb-5a02-42d7-8da9-0d6feea18cff', to: ['received@example.com'], from: 'sender@example.com', - created_at: '2023-04-07T23:13:52.669661+00:00', + created_at: '2023-04-07 23:13:52.669661+00', subject: 'Test inbound email', bcc: null, cc: null, @@ -552,7 +552,7 @@ describe('Receiving', () => { id: '67d9bcdb-5a02-42d7-8da9-0d6feea18cff', to: ['received@example.com'], from: 'original-sender@example.com', - created_at: '2023-04-07T23:13:52.669661+00:00', + created_at: '2023-04-07 23:13:52.669661+00', subject: 'Test Subject', html: '

hello

', text: 'hello', @@ -591,7 +591,7 @@ describe('Receiving', () => { id: '67d9bcdb-5a02-42d7-8da9-0d6feea18cff', to: ['received@example.com'], from: 'original-sender@example.com', - created_at: '2023-04-07T23:13:52.669661+00:00', + created_at: '2023-04-07 23:13:52.669661+00', subject: 'Test Subject', html: null, text: 'hello world', @@ -602,7 +602,7 @@ describe('Receiving', () => { headers: {}, raw: { download_url: 'https://example.com/raw-email-download', - expires_at: '2023-04-08T00:13:52.669661+00:00', + expires_at: '2023-04-08 00:13:52.669661+00', }, attachments: [], message_id: 'msg_123', @@ -640,7 +640,7 @@ describe('Receiving', () => { id: '67d9bcdb-5a02-42d7-8da9-0d6feea18cff', to: ['received@example.com'], from: 'original-sender@example.com', - created_at: '2023-04-07T23:13:52.669661+00:00', + created_at: '2023-04-07 23:13:52.669661+00', subject: 'Original Subject', html: '

hello world

', text: 'hello world', @@ -651,7 +651,7 @@ describe('Receiving', () => { headers: {}, raw: { download_url: 'https://example.com/raw-email-download', - expires_at: '2023-04-08T00:13:52.669661+00:00', + expires_at: '2023-04-08 00:13:52.669661+00', }, attachments: [], message_id: 'msg_123', @@ -729,7 +729,7 @@ Content-Type: text/html; charset="UTF-8" id: '67d9bcdb-5a02-42d7-8da9-0d6feea18cff', to: ['received@example.com'], from: 'original-sender@example.com', - created_at: '2023-04-07T23:13:52.669661+00:00', + created_at: '2023-04-07 23:13:52.669661+00', subject: 'Email with attachment', html: '

See attached

', text: 'See attached', @@ -740,7 +740,7 @@ Content-Type: text/html; charset="UTF-8" headers: {}, raw: { download_url: 'https://example.com/raw-email-download', - expires_at: '2023-04-08T00:13:52.669661+00:00', + expires_at: '2023-04-08 00:13:52.669661+00', }, attachments: [ { @@ -823,7 +823,7 @@ ${attachmentContent} id: '67d9bcdb-5a02-42d7-8da9-0d6feea18cff', to: ['received@example.com'], from: 'original-sender@example.com', - created_at: '2023-04-07T23:13:52.669661+00:00', + created_at: '2023-04-07 23:13:52.669661+00', subject: 'Email with inline image', html: '

See image:

', text: 'See image', @@ -834,7 +834,7 @@ ${attachmentContent} headers: {}, raw: { download_url: 'https://example.com/raw-email-download', - expires_at: '2023-04-08T00:13:52.669661+00:00', + expires_at: '2023-04-08 00:13:52.669661+00', }, attachments: [ { @@ -911,7 +911,7 @@ ${imageContent} id: '67d9bcdb-5a02-42d7-8da9-0d6feea18cff', to: ['received@example.com'], from: 'original-sender@example.com', - created_at: '2023-04-07T23:13:52.669661+00:00', + created_at: '2023-04-07 23:13:52.669661+00', subject: '', html: null, text: 'hello world', @@ -922,7 +922,7 @@ ${imageContent} headers: {}, raw: { download_url: 'https://example.com/raw-email-download', - expires_at: '2023-04-08T00:13:52.669661+00:00', + expires_at: '2023-04-08 00:13:52.669661+00', }, attachments: [], message_id: 'msg_123', @@ -973,7 +973,7 @@ hello world`; id: '67d9bcdb-5a02-42d7-8da9-0d6feea18cff', to: ['received@example.com'], from: 'original-sender@example.com', - created_at: '2023-04-07T23:13:52.669661+00:00', + created_at: '2023-04-07 23:13:52.669661+00', subject: 'Original Subject', html: '

hello world

', text: 'hello world', @@ -984,7 +984,7 @@ hello world`; headers: {}, raw: { download_url: 'https://example.com/raw-email-download', - expires_at: '2023-04-08T00:13:52.669661+00:00', + expires_at: '2023-04-08 00:13:52.669661+00', }, attachments: [], message_id: 'msg_123', @@ -1058,7 +1058,7 @@ hello world`; id: '67d9bcdb-5a02-42d7-8da9-0d6feea18cff', to: ['received@example.com'], from: 'original-sender@example.com', - created_at: '2023-04-07T23:13:52.669661+00:00', + created_at: '2023-04-07 23:13:52.669661+00', subject: 'Test Subject', html: null, text: 'hello world', @@ -1069,7 +1069,7 @@ hello world`; headers: {}, raw: { download_url: 'https://example.com/raw-email-download', - expires_at: '2023-04-08T00:13:52.669661+00:00', + expires_at: '2023-04-08 00:13:52.669661+00', }, attachments: [], message_id: 'msg_123', @@ -1123,7 +1123,7 @@ hello world`; id: '67d9bcdb-5a02-42d7-8da9-0d6feea18cff', to: ['received@example.com'], from: 'original-sender@example.com', - created_at: '2023-04-07T23:13:52.669661+00:00', + created_at: '2023-04-07 23:13:52.669661+00', subject: 'Original Subject', html: '

hello world

', text: 'hello world', @@ -1134,7 +1134,7 @@ hello world`; headers: {}, raw: { download_url: 'https://example.com/raw-email-download', - expires_at: '2023-04-08T00:13:52.669661+00:00', + expires_at: '2023-04-08 00:13:52.669661+00', }, attachments: [], message_id: 'msg_123', diff --git a/src/events/events.spec.ts b/src/events/events.spec.ts index 7d546893..839e79e5 100644 --- a/src/events/events.spec.ts +++ b/src/events/events.spec.ts @@ -193,8 +193,8 @@ describe('Events', () => { id: 'evt-123', name: 'user.created', schema: { name: 'string' }, - created_at: '2025-01-01T00:00:00.000Z', - updated_at: '2025-01-01T00:00:00.000Z', + created_at: '2025-01-01 00:00:00+00', + updated_at: '2025-01-01 00:00:00+00', }; fetchMock.mockOnce(JSON.stringify(response), { @@ -208,14 +208,14 @@ describe('Events', () => { expect(data).toMatchInlineSnapshot(` { "data": { - "created_at": "2025-01-01T00:00:00.000Z", + "created_at": "2025-01-01 00:00:00+00", "id": "evt-123", "name": "user.created", "object": "event", "schema": { "name": "string", }, - "updated_at": "2025-01-01T00:00:00.000Z", + "updated_at": "2025-01-01 00:00:00+00", }, "error": null, "headers": { @@ -239,8 +239,8 @@ describe('Events', () => { id: 'evt-123', name: 'user.created', schema: null, - created_at: '2025-01-01T00:00:00.000Z', - updated_at: '2025-01-01T00:00:00.000Z', + created_at: '2025-01-01 00:00:00+00', + updated_at: '2025-01-01 00:00:00+00', }; fetchMock.mockOnce(JSON.stringify(response), { @@ -271,15 +271,15 @@ describe('Events', () => { id: 'evt-123', name: 'user.created', schema: null, - created_at: '2025-01-01T00:00:00.000Z', - updated_at: '2025-01-01T00:00:00.000Z', + created_at: '2025-01-01 00:00:00+00', + updated_at: '2025-01-01 00:00:00+00', }, { id: 'evt-456', name: 'user.updated', schema: null, - created_at: '2025-02-01T00:00:00.000Z', - updated_at: '2025-02-01T00:00:00.000Z', + created_at: '2025-02-01 00:00:00+00', + updated_at: '2025-02-01 00:00:00+00', }, ], }; diff --git a/src/logs/logs.spec.ts b/src/logs/logs.spec.ts index a0c8422d..8010e632 100644 --- a/src/logs/logs.spec.ts +++ b/src/logs/logs.spec.ts @@ -19,7 +19,7 @@ describe('Logs', () => { data: [ { id: '3d4a472d-bc6d-4dd2-aa9d-d3d11b549e55', - created_at: '2024-11-01T18:10:00.000Z', + created_at: '2024-11-01 18:10:00+00', endpoint: '/emails', method: 'POST', response_status: 200, @@ -27,7 +27,7 @@ describe('Logs', () => { }, { id: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890', - created_at: '2024-11-01T18:09:00.000Z', + created_at: '2024-11-01 18:09:00+00', endpoint: '/emails/batch', method: 'POST', response_status: 200, @@ -149,7 +149,7 @@ describe('Logs', () => { const response: GetLogResponseSuccess = { object: 'log', id: '3d4a472d-bc6d-4dd2-aa9d-d3d11b549e55', - created_at: '2024-11-01T18:10:00.000Z', + created_at: '2024-11-01 18:10:00+00', endpoint: '/emails', method: 'POST', response_status: 200, @@ -172,7 +172,7 @@ describe('Logs', () => { ).resolves.toMatchInlineSnapshot(` { "data": { - "created_at": "2024-11-01T18:10:00.000Z", + "created_at": "2024-11-01 18:10:00+00", "endpoint": "/emails", "id": "3d4a472d-bc6d-4dd2-aa9d-d3d11b549e55", "method": "POST", diff --git a/src/oauth-grants/oauth-grants.spec.ts b/src/oauth-grants/oauth-grants.spec.ts index 31725a31..846ec451 100644 --- a/src/oauth-grants/oauth-grants.spec.ts +++ b/src/oauth-grants/oauth-grants.spec.ts @@ -26,7 +26,7 @@ describe('OAuthGrants', () => { id: '650e8400-e29b-41d4-a716-446655440001', client_id: '430eed87-632a-4ea6-90db-0aace67ec228', scopes: ['emails:send'], - created_at: '2023-06-21T06:10:36.144Z', + created_at: '2023-06-21 06:10:36.144+00', revoked_at: null, revoked_reason: null, client: { @@ -38,8 +38,8 @@ describe('OAuthGrants', () => { id: '650e8400-e29b-41d4-a716-446655440002', client_id: '430eed87-632a-4ea6-90db-0aace67ec228', scopes: ['emails:send', 'domains:read'], - created_at: '2023-06-20T06:10:36.144Z', - revoked_at: '2023-06-22T06:10:36.144Z', + created_at: '2023-06-20 06:10:36.144+00', + revoked_at: '2023-06-22 06:10:36.144+00', revoked_reason: 'revoked_from_api', client: { name: 'Resend CLI', diff --git a/src/segments/audiences.spec.ts b/src/segments/audiences.spec.ts index 9ae980ca..d06aa43c 100644 --- a/src/segments/audiences.spec.ts +++ b/src/segments/audiences.spec.ts @@ -94,12 +94,12 @@ describe('Audiences', () => { { id: 'b6d24b8e-af0b-4c3c-be0c-359bbd97381e', name: 'resend.com', - created_at: '2023-04-07T23:13:52.669661+00:00', + created_at: '2023-04-07 23:13:52.669661+00', }, { id: 'ac7503ac-e027-4aea-94b3-b0acd46f65f9', name: 'react.email', - created_at: '2023-04-07T23:13:20.417116+00:00', + created_at: '2023-04-07 23:13:20.417116+00', }, ], }; @@ -253,7 +253,7 @@ describe('Audiences', () => { object: 'segment', id: 'fd61172c-cafc-40f5-b049-b45947779a29', name: 'resend.com', - created_at: '2023-06-21T06:10:36.144Z', + created_at: '2023-06-21 06:10:36.144+00', }; fetchMock.mockOnce(JSON.stringify(response), { @@ -270,7 +270,7 @@ describe('Audiences', () => { ).resolves.toMatchInlineSnapshot(` { "data": { - "created_at": "2023-06-21T06:10:36.144Z", + "created_at": "2023-06-21 06:10:36.144+00", "id": "fd61172c-cafc-40f5-b049-b45947779a29", "name": "resend.com", "object": "segment", diff --git a/src/segments/segments.spec.ts b/src/segments/segments.spec.ts index c8d2059b..3414c9ba 100644 --- a/src/segments/segments.spec.ts +++ b/src/segments/segments.spec.ts @@ -94,12 +94,12 @@ describe('Segments', () => { { id: 'b6d24b8e-af0b-4c3c-be0c-359bbd97381e', name: 'resend.com', - created_at: '2023-04-07T23:13:52.669661+00:00', + created_at: '2023-04-07 23:13:52.669661+00', }, { id: 'ac7503ac-e027-4aea-94b3-b0acd46f65f9', name: 'react.email', - created_at: '2023-04-07T23:13:20.417116+00:00', + created_at: '2023-04-07 23:13:20.417116+00', }, ], }; @@ -253,7 +253,7 @@ describe('Segments', () => { object: 'segment', id: 'fd61172c-cafc-40f5-b049-b45947779a29', name: 'resend.com', - created_at: '2023-06-21T06:10:36.144Z', + created_at: '2023-06-21 06:10:36.144+00', }; fetchMock.mockOnce(JSON.stringify(response), { @@ -268,7 +268,7 @@ describe('Segments', () => { await expect(resend.segments.get('1234')).resolves.toMatchInlineSnapshot(` { "data": { - "created_at": "2023-06-21T06:10:36.144Z", + "created_at": "2023-06-21 06:10:36.144+00", "id": "fd61172c-cafc-40f5-b049-b45947779a29", "name": "resend.com", "object": "segment", diff --git a/src/suppressions/suppressions.spec.ts b/src/suppressions/suppressions.spec.ts index cead6ea5..972fe8d1 100644 --- a/src/suppressions/suppressions.spec.ts +++ b/src/suppressions/suppressions.spec.ts @@ -59,7 +59,7 @@ describe('Suppressions', () => { email: 'blocked@example.com', origin: 'bounce', source_id: null, - created_at: '2024-01-16T18:12:26.514Z', + created_at: '2024-01-16 18:12:26.514+00', }; mockSuccessResponse(response, {}); @@ -69,7 +69,7 @@ describe('Suppressions', () => { ).resolves.toMatchInlineSnapshot(` { "data": { - "created_at": "2024-01-16T18:12:26.514Z", + "created_at": "2024-01-16 18:12:26.514+00", "email": "blocked@example.com", "id": "fd61172c-cafc-40f5-b049-b45947779a29", "object": "suppression", @@ -171,7 +171,7 @@ describe('Suppressions', () => { email: 'blocked@example.com', origin: 'complaint', source_id: null, - created_at: '2023-04-07T23:13:52.669661+00:00', + created_at: '2023-04-07 23:13:52.669661+00', }, ], }; diff --git a/src/templates/templates.spec.ts b/src/templates/templates.spec.ts index 2780faa4..02e074ff 100644 --- a/src/templates/templates.spec.ts +++ b/src/templates/templates.spec.ts @@ -824,17 +824,17 @@ describe('Templates', () => { { id: 'fd61172c-cafc-40f5-b049-b45947779a29', name: 'Welcome Email', - created_at: '2023-04-07T23:13:52.669661+00:00', - updated_at: '2023-04-07T23:13:52.669661+00:00', + created_at: '2023-04-07 23:13:52.669661+00', + updated_at: '2023-04-07 23:13:52.669661+00', status: 'published', alias: 'welcome-email', - published_at: '2023-04-07T23:13:52.669661+00:00', + published_at: '2023-04-07 23:13:52.669661+00', }, { id: 'b6d24b8e-af0b-4c3c-be0c-359bbd97381e', name: 'Newsletter Template', - created_at: '2023-04-06T20:10:30.417116+00:00', - updated_at: '2023-04-06T20:10:30.417116+00:00', + created_at: '2023-04-06 20:10:30.417116+00', + updated_at: '2023-04-06 20:10:30.417116+00', status: 'draft', alias: 'newsletter', published_at: null, @@ -852,21 +852,21 @@ describe('Templates', () => { "data": [ { "alias": "welcome-email", - "created_at": "2023-04-07T23:13:52.669661+00:00", + "created_at": "2023-04-07 23:13:52.669661+00", "id": "fd61172c-cafc-40f5-b049-b45947779a29", "name": "Welcome Email", - "published_at": "2023-04-07T23:13:52.669661+00:00", + "published_at": "2023-04-07 23:13:52.669661+00", "status": "published", - "updated_at": "2023-04-07T23:13:52.669661+00:00", + "updated_at": "2023-04-07 23:13:52.669661+00", }, { "alias": "newsletter", - "created_at": "2023-04-06T20:10:30.417116+00:00", + "created_at": "2023-04-06 20:10:30.417116+00", "id": "b6d24b8e-af0b-4c3c-be0c-359bbd97381e", "name": "Newsletter Template", "published_at": null, "status": "draft", - "updated_at": "2023-04-06T20:10:30.417116+00:00", + "updated_at": "2023-04-06 20:10:30.417116+00", }, ], "has_more": false, @@ -896,11 +896,11 @@ describe('Templates', () => { { id: 'fd61172c-cafc-40f5-b049-b45947779a29', name: 'Welcome Email', - created_at: '2023-04-07T23:13:52.669661+00:00', - updated_at: '2023-04-07T23:13:52.669661+00:00', + created_at: '2023-04-07 23:13:52.669661+00', + updated_at: '2023-04-07 23:13:52.669661+00', status: 'published', alias: 'welcome-email', - published_at: '2023-04-07T23:13:52.669661+00:00', + published_at: '2023-04-07 23:13:52.669661+00', }, ], }; @@ -920,12 +920,12 @@ describe('Templates', () => { "data": [ { "alias": "welcome-email", - "created_at": "2023-04-07T23:13:52.669661+00:00", + "created_at": "2023-04-07 23:13:52.669661+00", "id": "fd61172c-cafc-40f5-b049-b45947779a29", "name": "Welcome Email", - "published_at": "2023-04-07T23:13:52.669661+00:00", + "published_at": "2023-04-07 23:13:52.669661+00", "status": "published", - "updated_at": "2023-04-07T23:13:52.669661+00:00", + "updated_at": "2023-04-07 23:13:52.669661+00", }, ], "has_more": true, diff --git a/src/topics/topics.spec.ts b/src/topics/topics.spec.ts index d7dba5a8..1f577799 100644 --- a/src/topics/topics.spec.ts +++ b/src/topics/topics.spec.ts @@ -128,14 +128,14 @@ describe('Topics', () => { name: 'Newsletter', description: 'Weekly newsletter updates', default_subscription: 'opt_in', - created_at: '2023-04-07T23:13:52.669661+00:00', + created_at: '2023-04-07 23:13:52.669661+00', }, { id: 'ac7503ac-e027-4aea-94b3-b0acd46f65f9', name: 'Product Updates', description: 'Product announcements and updates', default_subscription: 'opt_out', - created_at: '2023-04-07T23:13:20.417116+00:00', + created_at: '2023-04-07 23:13:20.417116+00', }, ], }; @@ -148,14 +148,14 @@ describe('Topics', () => { "data": { "data": [ { - "created_at": "2023-04-07T23:13:52.669661+00:00", + "created_at": "2023-04-07 23:13:52.669661+00", "default_subscription": "opt_in", "description": "Weekly newsletter updates", "id": "b6d24b8e-af0b-4c3c-be0c-359bbd97381e", "name": "Newsletter", }, { - "created_at": "2023-04-07T23:13:20.417116+00:00", + "created_at": "2023-04-07 23:13:20.417116+00", "default_subscription": "opt_out", "description": "Product announcements and updates", "id": "ac7503ac-e027-4aea-94b3-b0acd46f65f9", @@ -213,7 +213,7 @@ describe('Topics', () => { name: 'Newsletter', description: 'Weekly newsletter updates', default_subscription: 'opt_in', - created_at: '2024-01-16T18:12:26.514Z', + created_at: '2024-01-16 18:12:26.514+00', }; mockSuccessResponse(response, {}); @@ -224,7 +224,7 @@ describe('Topics', () => { ).resolves.toMatchInlineSnapshot(` { "data": { - "created_at": "2024-01-16T18:12:26.514Z", + "created_at": "2024-01-16 18:12:26.514+00", "default_subscription": "opt_in", "description": "Weekly newsletter updates", "id": "fd61172c-cafc-40f5-b049-b45947779a29", diff --git a/src/webhooks/webhooks.spec.ts b/src/webhooks/webhooks.spec.ts index 6ea61ede..78a37322 100644 --- a/src/webhooks/webhooks.spec.ts +++ b/src/webhooks/webhooks.spec.ts @@ -106,7 +106,7 @@ describe('Webhooks', () => { const response: GetWebhookResponseSuccess = { object: 'webhook', id: '430eed87-632a-4ea6-90db-0aace67ec228', - created_at: '2023-06-21T06:10:36.144Z', + created_at: '2023-06-21 06:10:36.144+00', status: 'enabled', endpoint: 'https://example.com/webhook', events: ['email.sent', 'email.delivered'], @@ -125,7 +125,7 @@ describe('Webhooks', () => { await expect(resend.webhooks.get('1234')).resolves.toMatchInlineSnapshot(` { "data": { - "created_at": "2023-06-21T06:10:36.144Z", + "created_at": "2023-06-21 06:10:36.144+00", "endpoint": "https://example.com/webhook", "events": [ "email.sent", @@ -153,14 +153,14 @@ describe('Webhooks', () => { { id: '430eed87-632a-4ea6-90db-0aace67ec228', endpoint: 'https://example.com/webhook', - created_at: '2023-06-21T06:10:36.144Z', + created_at: '2023-06-21 06:10:36.144+00', status: 'enabled', events: ['email.sent', 'email.delivered'], }, { id: 'b6d24b8e-af0b-4c3c-be0c-359bbd97381e', endpoint: 'https://example.com/webhook2', - created_at: '2023-06-20T06:10:36.144Z', + created_at: '2023-06-20 06:10:36.144+00', status: 'enabled', events: ['email.bounced'], },