Skip to content

Commit 89dc408

Browse files
committed
fix parameter name to match API endpoint,
1 parent 4a1f13e commit 89dc408

File tree

5 files changed

+9
-59
lines changed

5 files changed

+9
-59
lines changed

docs/useCases.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,17 +234,17 @@ const publishingStatuses = [
234234
PublicationStatus.Unpublished
235235
]
236236
const limit = 10
237-
const offset = 20
237+
const selectedPage = 1
238238
const searchText = 'search text'
239239
const otherUserName = 'otherUserName'
240240

241-
getCollectionItems
241+
getMyDataCollectionItems
242242
.execute(
243243
roleIds,
244244
collectionItemTypes,
245245
publishingStatuses,
246246
limit,
247-
offset,
247+
selectedPage,
248248
searchText,
249249
otherUserName
250250
)

src/collections/domain/repositories/ICollectionsRepository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export interface ICollectionsRepository {
3232
collectionItemTypes: CollectionItemType[],
3333
publicationStatuses: PublicationStatus[],
3434
limit?: number,
35-
page?: number,
35+
selectedPage?: number,
3636
searchText?: string,
3737
otherUserName?: string
3838
): Promise<MyDataCollectionItemSubset>

src/collections/domain/useCases/GetMyDataCollectionItems.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ export class GetMyDataCollectionItems implements UseCase<MyDataCollectionItemSub
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.
1919
* @param {PublicationStatus[]} [publicationStatuses] - the publication statuses to filter by.
20-
* @param {number} [limit] - Limit for pagination (optional).
21-
* @param {number} [offset] - Offset for pagination (optional).
20+
* @param {number} [limit] - Limit number of items to return for pagination (optional).
21+
* @param {number} [offset] - Offset (starting point) for pagination (optional).
2222
* @param {string} [searchText] - filter by searching for this text in the results (optional).
2323
* * @returns {Promise<MyDataCollectionItemSubset>}
2424
*/

src/collections/infra/repositories/CollectionsRepository.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ export class CollectionsRepository extends ApiRepository implements ICollections
209209
collectionItemTypes: CollectionItemType[],
210210
publicationStatuses: PublicationStatus[],
211211
limit?: number,
212-
page?: number,
212+
selectedPage?: number,
213213
searchText?: string,
214214
userIdentifier?: string
215215
): Promise<MyDataCollectionItemSubset> {
@@ -219,8 +219,8 @@ export class CollectionsRepository extends ApiRepository implements ICollections
219219
queryParams.set(GetMyDataCollectionItemsQueryParams.PER_PAGE, limit.toString())
220220
}
221221

222-
if (page) {
223-
queryParams.set(GetMyDataCollectionItemsQueryParams.SELECTED_PAGE, page.toString())
222+
if (selectedPage) {
223+
queryParams.set(GetMyDataCollectionItemsQueryParams.SELECTED_PAGE, selectedPage.toString())
224224
}
225225

226226
if (searchText) {

src/files/infra/repositories/transformers/MyDataFilePreviewPayload.ts

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -38,53 +38,3 @@ export interface MyDataFilePreviewPayload {
3838
file_persistent_id?: string
3939
description?: string
4040
}
41-
/*
42-
{
43-
"name": "teacher_survey.tab",
44-
"type": "file",
45-
"url": "http://localhost:8080/api/access/datafile/15",
46-
"file_id": "15",
47-
"file_type": "Comma Separated Values",
48-
"file_content_type": "text/comma-separated-values",
49-
"size_in_bytes": 174644,
50-
"md5": "1db96dd4229c5bf5e6d8b1e6a301dca0",
51-
"checksum": {
52-
"type": "MD5",
53-
"value": "1db96dd4229c5bf5e6d8b1e6a301dca0"
54-
},
55-
"unf": "UNF:6:2Q0xnmkmgp6vi/lAa+bhRQ==",
56-
"dataset_name": "Never Published",
57-
"dataset_id": "14",
58-
"dataset_persistent_id": "doi:10.5072/FK2/IHYE1J",
59-
"dataset_citation": "Admin, Dataverse, 2025, \"Never Published\", https://doi.org/10.5072/FK2/IHYE1J, Root, DRAFT VERSION, UNF:6:2Q0xnmkmgp6vi/lAa+bhRQ== [fileUNF]",
60-
"restricted": false,
61-
"variables": 10,
62-
"observations": 7000,
63-
"canDownloadFile": true,
64-
"matches": [],
65-
"score": 321.1235656738281,
66-
"entity_id": 15,
67-
"publicationStatuses": [
68-
"Unpublished",
69-
"Draft"
70-
],
71-
"releaseOrCreateDate": "2025-04-23T13:48:15Z",
72-
"publication_statuses": [
73-
"Unpublished",
74-
"Draft"
75-
],
76-
"is_draft_state": true,
77-
"is_in_review_state": false,
78-
"is_unpublished_state": true,
79-
"is_published": false,
80-
"is_deaccesioned": false,
81-
"is_valid": true,
82-
"date_to_display_on_card": "Apr 23, 2025",
83-
"parentIdentifier": "doi:10.5072/FK2/IHYE1J",
84-
"parentName": "Never Published",
85-
"user_roles": [
86-
"Admin",
87-
"Contributor"
88-
]
89-
}
90-
*/

0 commit comments

Comments
 (0)