Skip to content

Commit 63ce2d8

Browse files
committed
fix: update changelog and usecase md
1 parent a4fe19a commit 63ce2d8

2 files changed

Lines changed: 42 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ This changelog follows the principles of [Keep a Changelog](https://keepachangel
2020
- Guestbooks: Added dataset-level guestbook assignment and removal support via `assignDatasetGuestbook` (`PUT /api/datasets/{identifier}/guestbook`) and `removeDatasetGuestbook` (`DELETE /api/datasets/{identifier}/guestbook`).
2121
- Datasets/Guestbooks: Added `guestbookId` in `getDataset` responses.
2222
- Access: Added`access` module for guestbook-at-request and download terms/guestbook submission endpoints.
23+
- DatasetType: Updated datasetType data model. Added two more fields Description and DisplayName.
2324

2425
### Changed
2526

docs/useCases.md

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ _See [use case](../src/datasets/domain/useCases/GetDatasetAvailableDatasetTypes.
10231023

10241024
#### Get Dataset Available Dataset Type
10251025

1026-
Returns an available dataset types that can be used at dataset creation.
1026+
Returns a single available dataset type that can be used at dataset creation.
10271027

10281028
###### Example call:
10291029

@@ -1032,13 +1032,31 @@ import { getDatasetAvailableDatasetType } from '@iqss/dataverse-client-javascrip
10321032

10331033
/* ... */
10341034

1035-
getDatasetAvailableDatasetType.execute().then((datasetType: DatasetType) => {
1035+
const datasetTypeIdOrName = 'dataset'
1036+
1037+
getDatasetAvailableDatasetType.execute(datasetTypeIdOrName).then((datasetType: DatasetType) => {
10361038
/* ... */
10371039
})
10381040
```
10391041

10401042
_See [use case](../src/datasets/domain/useCases/GetDatasetAvailableDatasetType.ts) implementation_.
10411043

1044+
The `datasetTypeIdOrName` parameter can be either the numeric dataset type id or its name.
1045+
1046+
Example returned value:
1047+
1048+
```typescript
1049+
{
1050+
id: 1,
1051+
name: 'dataset',
1052+
displayName: 'Dataset',
1053+
linkedMetadataBlocks: [],
1054+
availableLicenses: [],
1055+
description:
1056+
'A study, experiment, set of observations, or publication. A dataset can comprise a single file or multiple files.'
1057+
}
1058+
```
1059+
10421060
### Datasets Write Use Cases
10431061

10441062
#### Create a Dataset
@@ -1413,8 +1431,6 @@ _See [use case](../src/datasets/domain/useCases/GetDatasetAvailableCategories.ts
14131431

14141432
The `datasetId` parameter is a number for numeric identifiers or string for persistent identifiers.
14151433

1416-
# <<<<<<< HEAD
1417-
14181434
#### Get Dataset Templates
14191435

14201436
Returns a [DatasetTemplate](../src/datasets/domain/models/DatasetTemplate.ts) array containing the dataset templates of the requested collection, given the collection identifier or alias.
@@ -1457,11 +1473,9 @@ _See [use case](../src/datasets/domain/useCases/GetDatasetStorageDriver.ts) impl
14571473

14581474
The `datasetId` parameter can be a string, for persistent identifiers, or a number, for numeric identifiers.
14591475

1460-
> > > > > > > develop
1461-
14621476
#### Add a Dataset Type
14631477

1464-
Adds a dataset types that can be used at dataset creation.
1478+
Adds a dataset type that can be used at dataset creation.
14651479

14661480
###### Example call:
14671481

@@ -1470,13 +1484,23 @@ import { addDatasetType } from '@iqss/dataverse-client-javascript'
14701484

14711485
/* ... */
14721486

1487+
const datasetType = {
1488+
name: 'software',
1489+
displayName: 'Software',
1490+
linkedMetadataBlocks: ['codeMeta20'],
1491+
availableLicenses: ['MIT', 'Apache-2.0'],
1492+
description: 'Software data and metadata.'
1493+
}
1494+
14731495
addDatasetType.execute(datasetType).then((datasetType: DatasetType) => {
14741496
/* ... */
14751497
})
14761498
```
14771499

14781500
_See [use case](../src/datasets/domain/useCases/AddDatasetType.ts) implementation_.
14791501

1502+
The `datasetType` parameter must match [DatasetTypeDTO](../src/datasets/domain/dtos/DatasetTypeDTO.ts) and includes all [DatasetType](../src/datasets/domain/models/DatasetType.ts) fields except `id`.
1503+
14801504
#### Link Dataset Type with Metadata Blocks
14811505

14821506
Link a dataset type with metadata blocks.
@@ -3014,6 +3038,10 @@ import { submitGuestbookForDatasetVersionDownload } from '@iqss/dataverse-client
30143038
submitGuestbookForDatasetVersionDownload
30153039
.execute(10, ':latest', {
30163040
guestbookResponse: {
3041+
name: 'Jane Doe',
3042+
email: 'jane@example.org',
3043+
institution: 'Example University',
3044+
position: 'Researcher',
30173045
answers: [
30183046
{ id: 123, value: 'Good' },
30193047
{ id: 124, value: ['Multi', 'Line'] },
@@ -3027,3 +3055,9 @@ submitGuestbookForDatasetVersionDownload
30273055
```
30283056

30293057
_See [use case](../src/access/domain/useCases/SubmitGuestbookForDatasetVersionDownload.ts) implementation_.
3058+
3059+
The `datasetId` parameter can be a string, for persistent identifiers, or a number, for numeric identifiers.
3060+
3061+
The `versionId` parameter accepts a numbered version such as `'1.0'` or a non-numbered version such as `':latest'`.
3062+
3063+
The third parameter must match [GuestbookResponseDTO](../src/access/domain/dtos/GuestbookResponseDTO.ts). The resolved value is a signed download URL as a string.

0 commit comments

Comments
 (0)