From 809dc173575e71db4082e9b10ac8f8842d225b29 Mon Sep 17 00:00:00 2001 From: Ivan Voskoboinyk Date: Mon, 28 Jul 2025 16:29:38 +0200 Subject: [PATCH 1/3] [DEV-21181] Add `created_at` to the `Newsroom` API presentation --- src/types/Newsroom.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/types/Newsroom.ts b/src/types/Newsroom.ts index 39b10fbf..c8d8a23a 100644 --- a/src/types/Newsroom.ts +++ b/src/types/Newsroom.ts @@ -3,6 +3,8 @@ import type { UploadedImage } from '@prezly/uploads'; import type { CultureRef } from './Culture'; import type { NewroomThemeRef, NewsroomThemePreset } from './NewsroomTheme'; +type Iso8601DateTime = string; + export interface NewsroomRef { uuid: string; /** @@ -74,6 +76,7 @@ export interface NewsroomRef { }; active_theme?: NewroomThemeRef | null; is_auto_created: boolean; + created_at: Iso8601DateTime; } export interface Newsroom extends NewsroomRef { From 3f7de6c46f4419fe551baaefef6f88e9ad42501c Mon Sep 17 00:00:00 2001 From: Ivan Voskoboinyk Date: Mon, 28 Jul 2025 16:40:11 +0200 Subject: [PATCH 2/3] [DEV-21181] Add `domain` to the `NewsroomRef` API presentation --- src/types/Newsroom.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/Newsroom.ts b/src/types/Newsroom.ts index c8d8a23a..da57ac4d 100644 --- a/src/types/Newsroom.ts +++ b/src/types/Newsroom.ts @@ -16,6 +16,7 @@ export interface NewsroomRef { thumbnail_url: string; name: string; subdomain: string; + domain: string; status: Newsroom.Status; /** @@ -80,7 +81,6 @@ export interface NewsroomRef { } export interface Newsroom extends NewsroomRef { - domain: string; is_hub: boolean; // extended details cultures: CultureRef[]; From 6a06c9f0a3564b6992de7177dbca6f25726071a4 Mon Sep 17 00:00:00 2001 From: Ivan Voskoboinyk Date: Mon, 28 Jul 2025 16:43:54 +0200 Subject: [PATCH 3/3] [DEV-21181] Clean up duplicates of `Iso8601DateTime` type --- src/types/ContactTag.ts | 3 +-- src/types/ContactsExport.ts | 3 +-- src/types/CoverageIntegration.ts | 3 +-- src/types/CoverageIntegrationRun.ts | 3 +-- src/types/Newsroom.ts | 3 +-- src/types/common/Iso8601DateTime.ts | 1 + src/types/common/index.ts | 1 + 7 files changed, 7 insertions(+), 10 deletions(-) create mode 100644 src/types/common/Iso8601DateTime.ts diff --git a/src/types/ContactTag.ts b/src/types/ContactTag.ts index 15e2a029..a24c4aaf 100644 --- a/src/types/ContactTag.ts +++ b/src/types/ContactTag.ts @@ -1,8 +1,7 @@ +import type { Iso8601DateTime } from './common'; import type { ContactTagGroupRef } from './ContactTagGroup'; import type { UserRef } from './User'; -type Iso8601DateTime = string; - export interface ContactTagRef { id: number; name: string; diff --git a/src/types/ContactsExport.ts b/src/types/ContactsExport.ts index d1016d46..da5d7ecb 100644 --- a/src/types/ContactsExport.ts +++ b/src/types/ContactsExport.ts @@ -1,7 +1,6 @@ +import type { Iso8601DateTime } from './common'; import type { UserRef } from './User'; -type Iso8601DateTime = string; - export interface ContactsExport { uuid: string; status: ContactsExport.Status; diff --git a/src/types/CoverageIntegration.ts b/src/types/CoverageIntegration.ts index a5b9e006..ef9c790a 100644 --- a/src/types/CoverageIntegration.ts +++ b/src/types/CoverageIntegration.ts @@ -1,10 +1,9 @@ +import type { Iso8601DateTime } from './common'; import type { CoverageEntry } from './CoverageEntry'; import type { CoverageIntegrationRun } from './CoverageIntegrationRun'; import type { NewsroomRef } from './Newsroom'; import type { UserRef } from './User'; -type Iso8601DateTime = string; - export interface CoverageIntegration { id: number; name: string; diff --git a/src/types/CoverageIntegrationRun.ts b/src/types/CoverageIntegrationRun.ts index da810f2d..1d85019f 100644 --- a/src/types/CoverageIntegrationRun.ts +++ b/src/types/CoverageIntegrationRun.ts @@ -1,7 +1,6 @@ +import type { Iso8601DateTime } from './common'; import type { CoverageIntegrationRef } from './CoverageIntegration'; -type Iso8601DateTime = string; - export interface CoverageIntegrationRun { id: number; uuid: string; diff --git a/src/types/Newsroom.ts b/src/types/Newsroom.ts index da57ac4d..61a35314 100644 --- a/src/types/Newsroom.ts +++ b/src/types/Newsroom.ts @@ -1,10 +1,9 @@ import type { UploadedImage } from '@prezly/uploads'; +import type { Iso8601DateTime } from './common'; import type { CultureRef } from './Culture'; import type { NewroomThemeRef, NewsroomThemePreset } from './NewsroomTheme'; -type Iso8601DateTime = string; - export interface NewsroomRef { uuid: string; /** diff --git a/src/types/common/Iso8601DateTime.ts b/src/types/common/Iso8601DateTime.ts new file mode 100644 index 00000000..97927f24 --- /dev/null +++ b/src/types/common/Iso8601DateTime.ts @@ -0,0 +1 @@ +export type Iso8601DateTime = string; diff --git a/src/types/common/index.ts b/src/types/common/index.ts index 7a7cd5ae..a5d7ca31 100644 --- a/src/types/common/index.ts +++ b/src/types/common/index.ts @@ -1,3 +1,4 @@ +export * from './Iso8601DateTime'; export * from './Notification'; export * from './OEmbedInfo'; export * from './Pagination';