You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/useCases.md
+78
Original file line number
Diff line number
Diff line change
@@ -14,10 +14,13 @@ The different use cases currently available in the package are classified below,
14
14
-[Get Collection Facets](#get-collection-facets)
15
15
-[Get User Permissions on a Collection](#get-user-permissions-on-a-collection)
16
16
-[List All Collection Items](#list-all-collection-items)
17
+
-[Get Collection Featured Items](#get-collection-featured-items)
17
18
-[Collections write use cases](#collections-write-use-cases)
18
19
-[Create a Collection](#create-a-collection)
19
20
-[Update a Collection](#update-a-collection)
20
21
-[Publish a Collection](#publish-a-collection)
22
+
-[Update Collection Featured Items](#update-collection-featured-items)
23
+
-[Delete Collection Featured Items](#delete-collection-featured-items)
21
24
-[Datasets](#Datasets)
22
25
-[Datasets read use cases](#datasets-read-use-cases)
23
26
-[Get a Dataset](#get-a-dataset)
@@ -202,6 +205,33 @@ This use case supports the following optional parameters depending on the search
202
205
-**offset**: (number) Offset for pagination.
203
206
-**collectionSearchCriteria**: ([CollectionSearchCriteria](../src/collections/domain/models/CollectionSearchCriteria.ts)) Supports filtering the collection items by different properties.
204
207
208
+
#### Get Collection Featured Items
209
+
210
+
Returns a [CollectionFeaturedItem](../src/collections/domain/models/CollectionFeaturedItem.ts) array containing the featured items of the requested collection, given the collection identifier or alias.
The `collectionIdOrAlias` is a generic collection identifier, which can be either a string (for queries by CollectionAlias), or a number (for queries by CollectionId).
232
+
233
+
If no collection identifier is specified, the default collection identifier; `:root` will be used. If you want to search for a different collection, you must add the collection identifier as a parameter in the use case call.
234
+
205
235
### Collections Write Use Cases
206
236
207
237
#### Create a Collection
@@ -285,6 +315,54 @@ The `collectionIdOrAlias` is a generic collection identifier, which can be eithe
The `collectionIdOrAlias` is a generic collection identifier, which can be either a string (for queries by CollectionAlias), or a number (for queries by CollectionId).
The `collectionIdOrAlias` is a generic collection identifier, which can be either a string (for queries by CollectionAlias), or a number (for queries by CollectionId).
* Deletes all featured items from a collection, given a collection identifier.
14
+
*
15
+
* @param {number | string} [collectionIdOrAlias = ':root'] - A generic collection identifier, which can be either a string (for queries by CollectionAlias), or a number (for queries by CollectionId)
16
+
* If this parameter is not set, the default value is: ':root'
17
+
* @returns {Promise<void>} - This method does not return anything upon successful completion.
18
+
* @throws {WriteError} - If there are errors while writing data.
* Returns a CollectionFeaturedItem array containing the featured items of the requested collection, given the collection identifier or alias.
15
+
*
16
+
* @param {number | string} [collectionIdOrAlias = ':root'] - A generic collection identifier, which can be either a string (for queries by CollectionAlias), or a number (for queries by CollectionId)
17
+
* If this parameter is not set, the default value is: ':root'
* Updates all featured items, given a collection identifier and a CollectionFeaturedItemsDTO.
16
+
*
17
+
* @param {number | string} [collectionIdOrAlias = ':root'] - A generic collection identifier, which can be either a string (for queries by CollectionAlias), or a number (for queries by CollectionId)
18
+
* If this parameter is not set, the default value is: ':root'
19
+
* @param {CollectionFeaturedItemsDTO} [newCollectionFeaturedItems] - CollectionFeaturedItemsDTO object including the updated collection featured items data.
20
+
* @returns {Promise<CollectionFeaturedItem[]>} -This method returns the updated collection featured items upon successful completion.
21
+
* @throws {WriteError} - If there are errors while writing data.
0 commit comments