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
@@ -11,6 +11,8 @@ The different use cases currently available in the package are classified below,
11
11
-[Collections](#Collections)
12
12
-[Collections read use cases](#collections-read-use-cases)
13
13
-[Get a Collection](#get-a-collection)
14
+
-[Collections write use cases](#collections-write-use-cases)
15
+
-[Create a Collection](#create-a-collection)
14
16
-[Datasets](#Datasets)
15
17
-[Datasets read use cases](#datasets-read-use-cases)
16
18
-[Get a Dataset](#get-a-dataset)
@@ -98,6 +100,39 @@ The `collectionIdOrAlias` is a generic collection identifier, which can be eithe
98
100
99
101
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.
100
102
103
+
### Collections Write Use Cases
104
+
105
+
#### Create a Collection
106
+
107
+
Creates a new Collection, given a [CollectionDTO](../src/collections/domain/dtos/CollectionDTO.ts) object and an optional parent collection identifier, which defaults to `root`.
The above example creates the new collection in the `root` collection since no collection identifier is specified. If you want to create the collection in a different collection, you must add the collection identifier as a second parameter in the use case call.
133
+
134
+
The use case returns a number, which is the identifier of the created collection.
0 commit comments