Skip to content

Commit

Permalink
fix: update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ChengShi-1 committed Feb 27, 2025
1 parent 5c76eb4 commit b8a8478
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
14 changes: 3 additions & 11 deletions docs/useCases.md
Original file line number Diff line number Diff line change
Expand Up @@ -1257,11 +1257,9 @@ The following error might arise from the `AddUploadedFileToDataset` use case:

- AddUploadedFileToDatasetError: This error indicates that there was an error while adding the uploaded file to the dataset.

#### Updating File Metadata Use Cases
#### Update File Metadata

This use case is designed to update or edit metadata information for a specific file by a numeric identifier or persistemt identifier.

##### Update File Metadata
Updates Metadata of a File.

###### Example call:

Expand All @@ -1284,13 +1282,7 @@ await updateFileMetadata.execute(fileId, updateFileMetadataDTO).then((fileId) =>

_See [use case](../src/files/domain/useCases/UpdateFileMetadata.ts) implementation_.

This use case supports the following optional parameters for updateFileMetadataDTO:

- **description**: (string)
- **prevFreeform**: (string)
- **categories**: (string[])
- **dataFileTags**: (string[])
- **restrict**: (boolean)
The `fileId` parameter can be a string, for persistent identifiers, or a number, for numeric identifiers.

#### Delete a File

Expand Down
1 change: 1 addition & 0 deletions src/files/domain/useCases/UpdateFileMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export class UpdateFileMetadata implements UseCase<void> {

/**
* Updates the metadata for a particular File.
* More detailed information about the file restriction behavior can be found in https://guides.dataverse.org/en/latest/api/native-api.html#updating-file-metadata
*
* @param {number | string} [fileId] - The file identifier, which can be a string (for persistent identifiers), or a number (for numeric identifiers).
* @param {UpdateFileMetadataDTO} [updateFileMetadataDTO] - The DTO containing the metadata updates.
Expand Down

0 comments on commit b8a8478

Please sign in to comment.