diff --git a/src/endpoints/NewsroomCategories/types.ts b/src/endpoints/NewsroomCategories/types.ts index c8bb6e4a..bbc554e6 100644 --- a/src/endpoints/NewsroomCategories/types.ts +++ b/src/endpoints/NewsroomCategories/types.ts @@ -1,3 +1,5 @@ +import type { UploadedImage } from '@prezly/uploads'; + import type { SortOrder } from '../../types'; export interface ListOptions { @@ -18,10 +20,12 @@ export interface CreateRequest { description?: string; }; }; + image?: UploadedImage | null; + is_featured?: boolean; } export interface UpdateRequest { - i18n: { + i18n?: { /** * Pass `null` to erase category translation. */ @@ -30,4 +34,6 @@ export interface UpdateRequest { description?: string; }; }; + image?: UploadedImage | null; + is_featured?: boolean; } diff --git a/src/types/Category.ts b/src/types/Category.ts index 6d0f7d99..bbfee4ba 100644 --- a/src/types/Category.ts +++ b/src/types/Category.ts @@ -1,3 +1,5 @@ +import type { UploadedImage } from '@prezly/uploads'; + import type { Culture, CultureRef } from './Culture'; export interface CategoryRef { @@ -24,6 +26,8 @@ export interface Category extends Omit { i18n: { [localeCode: Culture.Code]: Category.Translation; // Extension over `CategoryRef.Translation` }; + image: UploadedImage | null; + is_featured: boolean; } export namespace Category {