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: CHANGELOG.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,16 +8,20 @@ This changelog follows the principles of [Keep a Changelog](https://keepachangel
8
8
9
9
### Added
10
10
11
+
- Datasets: Added `updateDatasetLicense` use case and repository method to support Dataverse endpoint `PUT /datasets/{id}/license`, for updating dataset license or custom terms
11
12
- New Use Case: [Get Collections For Linking Use Case](./docs/useCases.md#get-collections-for-linking).
12
13
- New Use Case: [Create a Dataset Template](./docs/useCases.md#create-a-dataset-template) under Collections.
13
14
14
-
-In GetAllNotificationsByUser use case, added support for filtering unread messages and pagination.
15
+
-New Use Case: [Update Terms of Access](./docs/useCases.md#update-terms-of-access).
15
16
16
17
### Changed
17
18
19
+
- Add pagination query parameters to Dataset Version Summeries and File Version Summaries use cases
20
+
18
21
### Fixed
19
22
20
23
- In GetAllNotificationsByUser use case, additionalInfo field is returned as an object instead of a string.
24
+
- In GetAllNotificationsByUser use case, added support for filtering unread messages and pagination.
Copy file name to clipboardExpand all lines: docs/useCases.md
+80-5Lines changed: 80 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,7 @@ The different use cases currently available in the package are classified below,
46
46
-[Datasets write use cases](#datasets-write-use-cases)
47
47
-[Create a Dataset](#create-a-dataset)
48
48
-[Update a Dataset](#update-a-dataset)
49
+
-[Update a Dataset License](#update-a-dataset-license)
49
50
-[Publish a Dataset](#publish-a-dataset)
50
51
-[Deaccession a Dataset](#deaccession-a-dataset)
51
52
-[Delete a Draft Dataset](#delete-a-draft-dataset)
@@ -872,7 +873,7 @@ The `DatasetPreviewSubset`returned instance contains a property called `totalDat
872
873
873
874
#### Get Dataset Versions Summaries
874
875
875
-
Returns an array of [DatasetVersionSummaryInfo](../src/datasets/domain/models/DatasetVersionSummaryInfo.ts) that contains information about what changed in every specific version.
876
+
Returns the total count of versions and an array of [DatasetVersionSummaryInfo](../src/datasets/domain/models/DatasetVersionSummaryInfo.ts) that contains information about what changed in every specific version.
Updates the license of a dataset by applying it to the draft version. If no draft exists, a new one is automatically created by the API. Supports predefined licenses (by name) or custom terms of use and access.
1086
+
1087
+
##### Example calls:
1088
+
1089
+
```typescript
1090
+
import {
1091
+
updateDatasetLicense,
1092
+
DatasetLicenseUpdateRequest
1093
+
} from'@iqss/dataverse-client-javascript'
1094
+
1095
+
/* ... */
1096
+
1097
+
const datasetId =1
1098
+
1099
+
const predefinedPayload:DatasetLicenseUpdateRequest= { name: 'CC BY 4.0' }
- If the dataset is already published, this action creates a DRAFT version containing the new terms.
1185
+
- Unspecified fields are treated as omissions: sending only `fileAccessRequest` will update that field and leave all other terms absent (undefined). In practice, the new values you send fully replace the previous set of terms — so if you omit a field, you are effectively clearing it unless you include its original value in the new input.
1186
+
1115
1187
#### Deaccession a Dataset
1116
1188
1117
1189
Deaccession a Dataset, given its identifier, version, and deaccessionDatasetDTO to perform.
@@ -2000,7 +2072,7 @@ The `fileId` parameter can be a string, for persistent identifiers, or a number,
2000
2072
2001
2073
#### Get File Version Summaries
2002
2074
2003
-
Get the file versions summaries, return a list of summaries for each version
2075
+
Get the file versions summaries, return a total count of versions and a list of summaries for each version
2004
2076
2005
2077
##### Example call:
2006
2078
@@ -2011,7 +2083,7 @@ import { getFileVersionSummaries } from '@iqss/dataverse-client-javascript'
@@ -14,9 +14,15 @@ export class GetDatasetVersionsSummaries implements UseCase<DatasetVersionSummar
14
14
* Draft versions will only be available to users who have permission to view unpublished drafts.
15
15
*
16
16
* @param {number | string} [datasetId] - The dataset identifier, which can be a string (for persistent identifiers), or a number (for numeric identifiers).
17
-
* @returns {Promise<DatasetVersionSummaryInfo[]>} - An array of DatasetVersionSummaryInfo.
17
+
* @param {number} [limit] - Limit for pagination (optional).
18
+
* @param {number} [offset] - Offset for pagination (optional).
19
+
* @returns {Promise<DatasetVersionSummarySubset>} - A DatasetVersionSummarySubset containing the summaries and total count.
Copy file name to clipboardExpand all lines: src/datasets/domain/useCases/SetAvailableLicensesForDatasetType.ts
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,10 @@ export class SetAvailableLicensesForDatasetType implements UseCase<void> {
10
10
11
11
/**
12
12
* Sets the available licenses for a given dataset type. This limits the license options when creating a dataset of this type.
13
+
*
14
+
* @param {number | string} [datasetTypeId] - The dataset type identifier, which can be a string (for persistent identifiers), or a number (for numeric identifiers).
15
+
* @param {string[]} licenses - The licenses to set for the dataset type.
16
+
* @returns {Promise<void>} - This method does not return anything upon successful completion.
* Updates the license of a dataset by applying it to the draft version. If no draft exists, a new one is created by the API.
14
+
* Supports either predefined license by name or custom terms of use and access.
15
+
*
16
+
* @param {number | string} datasetId - The dataset identifier, which can be a string (for persistent identifiers), or a number (for numeric identifiers).
17
+
* @param {DatasetLicenseUpdateRequest} payload - The payload containing the license name or custom terms of use and access.
18
+
* @returns {Promise<void>} - This method does not return anything upon successful completion.
* @param {number | string} [datasetId] - The dataset identifier, which can be a string (for persistent identifiers), or a number (for numeric identifiers).
16
+
* @param {TermsOfAccess} termsOfAccess - The terms of access to set for the dataset.
17
+
* @returns {Promise<void>} - This method does not return anything upon successful completion.
0 commit comments