IQSS / dataverse-client-javascript

A Dataverse client for JavaScript and TypeScript
MIT License
15 stars 8 forks source link

Create use case for getting file type search results in a collection #170

Closed ekraffmiller closed 1 month ago

ekraffmiller commented 2 months ago

For the Collection page, we need to display the files that belong to the collection.
The file items will be read from the search results of that collection, and be returned as FilePreview objects.

Here is a sample search result for file type:

 {
        "name": "MetaVideoGame2011-04-27_2011-04-30.tab",
        "type": "file",
        "url": "http://localhost:8080/api/access/datafile/12",
        "file_id": "12",
        "description": "Metadata video description",
        "published_at": "2024-07-29T18:12:42Z",
        "file_type": "Tab-Delimited",
        "file_content_type": "text/tab-separated-values",
        "size_in_bytes": 1978,
        "md5": "baaddf33c34f281d8b5c8c6adec30a1a",
        "checksum": {
          "type": "MD5",
          "value": "baaddf33c34f281d8b5c8c6adec30a1a"
        },
        "unf": "UNF:6:zFwFCrc+bxF7TBUNdf7vTw==",
        "dataset_name": "Second Dataset",
        "dataset_id": "11",
        "dataset_persistent_id": "doi:10.5072/FK2/SZZHLN",
        "dataset_citation": "Admin, Dataverse, 2024, \"Second Dataset, with updated\", https://doi.org/10.5072/FK2/SZZHLN, Root, DRAFT VERSION, UNF:6:zFwFCrc+bxF7TBUNdf7vTw== [fileUNF]"
      },
GPortas commented 2 months ago

@ekraffmiller In this issue we can include publicationStatus, both for datasets and files, without having to create a separate issue, since in this issue the use case and models for the collection results will be modified.