FlattenedAnnotation
This is the flattened Version of the annotation, IMPORTANT: when referencing these, ONLY Take the UUID, do NOT polinate(ie w/ asset/person/model) the FlattenedAnnotation as it can create an infinite loop.
Properties
Name | Type |
---|---|
schema | EmbeddedModelSchema |
id | string |
created | GroupedTimestamp |
updated | GroupedTimestamp |
deleted | GroupedTimestamp |
mechanism | MechanismEnum |
asset | ReferencedAsset |
person | ReferencedPerson |
type | AnnotationTypeEnum |
text | string |
model | ReferencedModel |
pseudo | boolean |
favorited | boolean |
anchor | ReferencedAnchor |
conversation | ReferencedConversation |
score | Score |
messages | FlattenedConversationMessages |
summary | ReferencedWorkstreamSummary |
Example
import { FlattenedAnnotation } from '@pieces.app/pieces-os-client'
// TODO: Update the object below with actual values
const example: FlattenedAnnotation = {
"schema": null,
"id": null,
"created": null,
"updated": null,
"deleted": null,
"mechanism": null,
"asset": null,
"person": null,
"type": null,
"text": null,
"model": null,
"pseudo": null,
"favorited": null,
"anchor": null,
"conversation": null,
"score": null,
"messages": null,
"summary": null,
}
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as FlattenedAnnotation
console.log(exampleParsed)