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
+35Lines changed: 35 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@ The different use cases currently available in the package are classified below,
23
23
-[List All Datasets](#list-all-datasets)
24
24
-[Datasets write use cases](#datasets-write-use-cases)
25
25
-[Create a Dataset](#create-a-dataset)
26
+
-[Publish a Dataset](#publish-a-dataset)
26
27
-[Files](#Files)
27
28
-[Files read use cases](#files-read-use-cases)
28
29
-[Get a File](#get-a-file)
@@ -356,6 +357,40 @@ The above example creates the new dataset in the `root` collection since no coll
356
357
357
358
The use case returns a [CreatedDatasetIdentifiers](../src/datasets/domain/models/CreatedDatasetIdentifiers.ts) object, which includes the persistent and numeric identifiers of the created dataset.
358
359
360
+
#### Publish a Dataset
361
+
362
+
Publishes a Dataset, given its identifier and the type of version update to perform.
The above example publishes the dataset with the specified identifier and performs a minor version update. If the response
384
+
is successful, the use case does not return the dataset object, but the HTTP status code `200`. Otherwise, it throws an error.
385
+
If you want to perform a major version update, you must set the `versionUpdateType` parameter to `VersionUpdateType.MAJOR`.
386
+
387
+
The `datasetId` parameter can be a string, for persistent identifiers, or a number, for numeric identifiers.
388
+
389
+
The `versionUpdateType` parameter can be a [VersionUpdateType](../src/datasets/domain/models/VersionUpdateType.ts) enum value, which can be one of the following:
* Publishes a dataset, given its identifier and the type of version update type.
14
+
*
15
+
* @param {number | string} [datasetId] - The dataset identifier, which can be a string (for persistent identifiers), or a number (for numeric identifiers).
16
+
* @param {VersionUpdateType} versionUpdateType - Specifies the type of version update, 'major' or 'minor'.
17
+
* @returns {Promise<void>} - This method does not return anything upon successful completion.
0 commit comments