Update getContentItems to return total count and items
The changes involved modifying the implementation of `getContentItems` across multiple files, specifically in the CMS-related codebase. This method now returns an object containing the total count of items and the items themselves. The updates also included necessary adjustments in the code where `getContentItems` is called to accommodate the new structure of the returned result.
This commit is contained in:
@@ -59,9 +59,10 @@ export abstract class CmsClient {
|
||||
* @param options - Options for filtering and pagination.
|
||||
* @returns A promise that resolves to an array of content items.
|
||||
*/
|
||||
abstract getContentItems(
|
||||
options?: Cms.GetContentItemsOptions,
|
||||
): Promise<Cms.ContentItem[]>;
|
||||
abstract getContentItems(options?: Cms.GetContentItemsOptions): Promise<{
|
||||
total: number;
|
||||
items: Cms.ContentItem[];
|
||||
}>;
|
||||
|
||||
/**
|
||||
* Retrieves a content item by its ID and type.
|
||||
|
||||
Reference in New Issue
Block a user