Skip to content

Commit

Permalink
Merge pull request #288 from prezly/feature/dev-12629-update-sdk
Browse files Browse the repository at this point in the history
[DEV-12629] Add `is_featured`, `image` to Category
  • Loading branch information
pestaa authored Mar 14, 2024
2 parents 1c273ef + 81be6ed commit 3b62dab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/endpoints/NewsroomCategories/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { UploadedImage } from '@prezly/uploads';

import type { SortOrder } from '../../types';

export interface ListOptions {
Expand All @@ -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.
*/
Expand All @@ -30,4 +34,6 @@ export interface UpdateRequest {
description?: string;
};
};
image?: UploadedImage | null;
is_featured?: boolean;
}
4 changes: 4 additions & 0 deletions src/types/Category.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { UploadedImage } from '@prezly/uploads';

import type { Culture, CultureRef } from './Culture';

export interface CategoryRef {
Expand All @@ -24,6 +26,8 @@ export interface Category extends Omit<CategoryRef, 'i18n'> {
i18n: {
[localeCode: Culture.Code]: Category.Translation; // Extension over `CategoryRef.Translation`
};
image: UploadedImage | null;
is_featured: boolean;
}

export namespace Category {
Expand Down

0 comments on commit 3b62dab

Please sign in to comment.