Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 5 additions & 7 deletions src/endpoints/Stories/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,7 @@ export interface ChangeNewsroomUnsafeResponse {
warnings: ChangeNewsroomWarning[];
}

const EXTENDED_STORY_INCLUDED_EXTRA_FIELDS_SHAPE: Record<
keyof Omit<ExtendedStory, keyof Story>,
boolean
> = {
const EXTENDED_STORY_INCLUDED_EXTRA_FIELDS_SHAPE = {
thumbnail_image: true,
header_image: true,
preview_image: true,
Expand All @@ -342,9 +339,9 @@ const EXTENDED_STORY_INCLUDED_EXTRA_FIELDS_SHAPE: Record<
content: true,
attached_gallery_content: true,
referenced_entities: true,
}; // satisfies Record<keyof Omit<ExtendedStory, keyof Story>, boolean>; // TODO: Use Typescript `satisfies` operator, when it's out of beta
} satisfies Record<keyof Omit<ExtendedStory, keyof Story>, boolean>;

const ALL_EXTRA_FIELDS_SHAPE: Record<keyof Story.ExtraFields, boolean> = {
const ALL_EXTRA_FIELDS_SHAPE = {
thumbnail_image: true,
header_image: true,
preview_image: true,
Expand All @@ -363,7 +360,8 @@ const ALL_EXTRA_FIELDS_SHAPE: Record<keyof Story.ExtraFields, boolean> = {
referenced_entities: true,
'campaigns.count': true,
'pitches.count': true,
}; // satisfies Record<keyof Story.OnDemandFields, boolean>; // TODO: Use Typescript `satisfies` operator, when it's out of beta
'coverage.count': true,
} satisfies Record<keyof Story.ExtraFields, boolean>;

export const ALL_EXTRA_FIELDS = Object.keys(
ALL_EXTRA_FIELDS_SHAPE,
Expand Down
5 changes: 5 additions & 0 deletions src/types/Story.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,11 @@ export namespace Story {
* Number of pitches linked to this story.
*/
'pitches.count': number;

/**
* Number of coverage entries linked to this story.
*/
'coverage.count': number;
}

/*
Expand Down