Skip to content

Commit 02c8f6b

Browse files
committed
update documentation
1 parent 24ae72a commit 02c8f6b

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

docs/useCases.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -256,22 +256,23 @@ getCollectionItems
256256
```
257257

258258
_See [use case](../src/collections/domain/useCases/GetMyDataCollectionItems.ts) implementation_.
259+
This use case requires the following parameters:
259260

260-
The `roleIds` parameter is an array of role identifiers that the user has in the collection items. At least one roleId must be specified.
261-
The `collectionItemTypes` parameter is an array of collection item types to filter the results. At least one collectionItemType must be specified.
262-
The `publishingStatuses` parameter is an array of publishing statuses to filter the results. At least one publishingStatus must be specified.
261+
- **roleIds** is an array of user role identifiers to filter the results. At least one roleId must be specified.
262+
- **collectionItemTypes** is an array of collection item types to filter the results. At least one collectionItemType must be specified.
263+
- **publishingStatuses** is an array of publishing statuses to filter the results. At least one publishingStatus must be specified.
263264

264265
This use case supports the following optional parameters depending on the search goals:
265266

266-
The `searchText` parameter is an optional string to filter the results by.
267-
The `otherUserName` parameter is an optional string to return the collection items of another user. If not set, the calling user will be used. Only superusers can use this parameter.
267+
- **searchText** is an optional string to filter the results by.
268+
- **otherUserName** is an optional string to return the collection items of another user. If not set, the calling user will be used. _Only superusers can use this parameter_.
269+
268270
The `MyDataCollectionItemSubset`returned instance contains a property called `totalItemCount` which is necessary for pagination.
269271

270272
This use case supports the following optional parameters depending on the search goals:
271273

272274
- **limit**: (number) Limit for pagination.
273275
- **offset**: (number) Offset for pagination.
274-
- **collectionSearchCriteria**: ([CollectionSearchCriteria](../src/collections/domain/models/CollectionSearchCriteria.ts)) Supports filtering the collection items by different properties.
275276

276277
#### Get Collection Featured Items
277278

src/collections/domain/useCases/GetMyDataCollectionItems.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ export class GetMyDataCollectionItems implements UseCase<MyDataCollectionItemSub
1616
*
1717
* @param {number[]} [roleIds] - the ids of the roles to filter the items by.
1818
* @param {CollectionItemType[]} [collectionItemTypes] - the types of items to filter by.
19+
* @param {PublicationStatus[]} [publicationStatuses] - the publication statuses to filter by.
1920
* @param {number} [limit] - Limit for pagination (optional).
2021
* @param {number} [offset] - Offset for pagination (optional).
21-
* @param {string} [searchText] - filter by searching for this text in the results
22+
* @param {string} [searchText] - filter by searching for this text in the results (optional).
2223
* * @returns {Promise<CollectionItemSubset>}
2324
*/
2425
async execute(

0 commit comments

Comments
 (0)