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: docs/useCases.md
+48-13Lines changed: 48 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ The different use cases currently available in the package are classified below,
12
12
-[Collections read use cases](#collections-read-use-cases)
13
13
-[Get a Collection](#get-a-collection)
14
14
-[Get Collection Facets](#get-collection-facets)
15
+
-[Get User Permissions on a Collection](#get-user-permissions-on-a-collection)
15
16
-[Collections write use cases](#collections-write-use-cases)
16
17
-[Create a Collection](#create-a-collection)
17
18
-[Datasets](#Datasets)
@@ -130,6 +131,34 @@ The `collectionIdOrAlias` is a generic collection identifier, which can be eithe
130
131
131
132
If no collection identifier is specified, the default collection identifier; `root` will be used. If you want to search for a different collection, you must add the collection identifier as a parameter in the use case call.
132
133
134
+
#### Get User Permissions on a Collection
135
+
136
+
Returns an instance of [CollectionUserPermissions](../src/collections/domain/models/CollectionUserPermissions.ts) that includes the permissions that the calling user has on a particular Collection.
The `collectionIdOrAlias` is a generic collection identifier, which can be either a string (for queries by CollectionAlias), or a number (for queries by CollectionId).
159
+
160
+
If no collection identifier is specified, the default collection identifier; `root` will be used. If you want to search for a different collection, you must add the collection identifier as a parameter in the use case call.
161
+
133
162
### Collections Write Use Cases
134
163
135
164
#### Create a Collection
@@ -874,7 +903,7 @@ getDatasetFiles
874
903
These use cases are designed to facilitate the uploading of files to a remote S3 storage and subsequently adding them to a dataset. This process involves two main steps / use cases:
875
904
876
905
1. Uploading a file to remote S3 storage and obtaining a storage identifier.
877
-
2. Adding the uploaded file to the dataset using the obtained storage identifier.
906
+
2. Adding one or more uploaded files to the dataset using the obtained storage identifiers.
878
907
879
908
This use case flow is entirely based on the Direct Upload API as described in the Dataverse documentation: https://guides.dataverse.org/en/latest/developers/s3-direct-upload-api.html
880
909
@@ -911,35 +940,41 @@ The `progress` parameter represents a callback function that allows the caller t
911
940
912
941
The `abortController` is a built-in mechanism in modern web browsers that allows the cancellation of asynchronous operations. It works in conjunction with an associated AbortSignal, which will be passed to the file uploading API calls to monitor whether the operation should be aborted, if the caller decides to cancel the operation midway.
913
942
914
-
##### Add Uploaded File to the Dataset
943
+
##### Add Uploaded Files to the Dataset
915
944
916
-
This use case involves adding a file that has been previously uploaded to remote storage to the dataset.
945
+
This use case involves adding files that have been previously uploaded to remote storage to the dataset.
The `datasetId` parameter can be a string, for persistent identifiers, or a number, for numeric identifiers.
939
976
940
-
The `file` parameter is a subclass of Blob (Binary Large Object) that represents a file.
941
-
942
-
The `storageId` parameter represents the storage identifier obtained after a successful call to the UploadFile use case.
977
+
The `uploadedFileDTOs` parameter is an array of [UploadedFileDTO](../src/files/domain/dtos/UploadedFileDTO.ts) and includes properties related to the uploaded files. Some of these properties should be calculated from the uploaded File Blob objects and the resulting storage identifiers from the Upload File use case.
0 commit comments