From 761c820286d3133c1acb13182976e7e7cbcf514b Mon Sep 17 00:00:00 2001 From: Mohammad Ali Shahbazi Date: Thu, 17 Oct 2024 10:31:50 +0330 Subject: [PATCH 1/2] [DEV-13698] Mark `newsroom` as optional in coverage integration --- src/endpoints/CoverageIntegrations/types.ts | 3 ++- src/types/CoverageIntegration.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/endpoints/CoverageIntegrations/types.ts b/src/endpoints/CoverageIntegrations/types.ts index a26aedf..0f67076 100644 --- a/src/endpoints/CoverageIntegrations/types.ts +++ b/src/endpoints/CoverageIntegrations/types.ts @@ -9,7 +9,7 @@ import { import Provider = CoverageEntry.Provider; export interface CreateRequest { - newsroom: Newsroom['id'] | Newsroom['uuid']; + newsroom?: Newsroom['id'] | Newsroom['uuid']; provider: Provider; input: string; name: string; @@ -19,6 +19,7 @@ export interface CreateRequest { } export interface UpdateRequest { + newsroom?: Newsroom['id'] | Newsroom['uuid']; input?: string; name?: string; description?: string; diff --git a/src/types/CoverageIntegration.ts b/src/types/CoverageIntegration.ts index 1211f07..a5b9e00 100644 --- a/src/types/CoverageIntegration.ts +++ b/src/types/CoverageIntegration.ts @@ -9,7 +9,7 @@ export interface CoverageIntegration { id: number; name: string; description: string | null; - newsroom: NewsroomRef; + newsroom: NewsroomRef | null; provider: CoverageEntry.Provider; input: string; skip_author: boolean; From 9f8adae59e6893a779e810561793ad3e5b767eef Mon Sep 17 00:00:00 2001 From: Mohammad Ali Shahbazi Date: Thu, 17 Oct 2024 10:47:06 +0330 Subject: [PATCH 2/2] [DEV-13698] Allow deleting `newsroom` from integrations too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: István Beregszászi --- src/endpoints/CoverageIntegrations/types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/endpoints/CoverageIntegrations/types.ts b/src/endpoints/CoverageIntegrations/types.ts index 0f67076..57ef079 100644 --- a/src/endpoints/CoverageIntegrations/types.ts +++ b/src/endpoints/CoverageIntegrations/types.ts @@ -9,7 +9,7 @@ import { import Provider = CoverageEntry.Provider; export interface CreateRequest { - newsroom?: Newsroom['id'] | Newsroom['uuid']; + newsroom?: Newsroom['id'] | Newsroom['uuid'] | null; provider: Provider; input: string; name: string; @@ -19,7 +19,7 @@ export interface CreateRequest { } export interface UpdateRequest { - newsroom?: Newsroom['id'] | Newsroom['uuid']; + newsroom?: Newsroom['id'] | Newsroom['uuid'] | null; input?: string; name?: string; description?: string;