We have the types and the metadata attributes on the nodes. We don't expose a function to add/remove/set these.
Metadata is the ONLY change allowed in an already created node. To keep the provenance of metadata changes, the metadata attribute should have the following data structure:
type MetadataObject<T> = {
timestamp: string;
value: T
}
type Metadata<T> = Array<MetadataObject<T>>
The API should provide the following:
[x] Add new metadata to the node. Only take the metadata as input, and generate timestamps internally.
[x] Get available metadata types
[x] Get the latest metadata of a type
[x] Get all metadata of a type
[x] Get all metadata
Implement a similar API for artifacts. Artifacts can be used to store arbitrary objects/object URLs like screenshots, etc.
If adding proper type safety using generics, breaks the current trrack version, I will use any for handling metadata types. Next major release will include the actual typings.
We have the types and the metadata attributes on the nodes. We don't expose a function to add/remove/set these.
Metadata is the ONLY change allowed in an already created node. To keep the provenance of metadata changes, the metadata attribute should have the following data structure:
The API should provide the following:
Implement a similar API for artifacts. Artifacts can be used to store arbitrary objects/object URLs like screenshots, etc.