Asset
An Asset Model representing data extracted from an Application connecting a group of data containing one or more Formats. Below formats, preview, and original CAN to be pollinated (DAG Unsafe) because it is a root node and it's child leaf nodes will prevent cycles agressively.
Properties
Name | Type |
---|---|
schema | EmbeddedModelSchema |
id | string |
name | string |
creator | string |
created | GroupedTimestamp |
updated | GroupedTimestamp |
synced | GroupedTimestamp |
deleted | GroupedTimestamp |
formats | Formats |
preview | Preview |
original | ReferencedFormat |
shares | Shares |
mechanism | MechanismEnum |
websites | Websites |
interacted | GroupedTimestamp |
tags | Tags |
sensitives | Sensitives |
persons | Persons |
curated | boolean |
discovered | boolean |
activities | Activities |
score | Score |
favorited | boolean |
pseudo | boolean |
annotations | Annotations |
hints | Hints |
anchors | Anchors |
conversations | Conversations |
summaries | WorkstreamSummaries |
demo | boolean |
Example
import { Asset } from '@pieces.app/pieces-os-client'
// TODO: Update the object below with actual values
const example: Asset = {
"schema": null,
"id": 2254f2c8-5797-40e8-ac56-41166dc0e159,
"name": null,
"creator": 497f6eca-6276-4993-bfeb-53cbbbba6f08,
"created": null,
"updated": null,
"synced": null,
"deleted": null,
"formats": null,
"preview": null,
"original": null,
"shares": null,
"mechanism": null,
"websites": null,
"interacted": null,
"tags": null,
"sensitives": null,
"persons": null,
"curated": null,
"discovered": null,
"activities": null,
"score": null,
"favorited": null,
"pseudo": null,
"annotations": null,
"hints": null,
"anchors": null,
"conversations": null,
"summaries": null,
"demo": 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 Asset
console.log(exampleParsed)