Skip to main content

FlattenedAsset

An Asset Model representing data extracted from an Application connecting a group of data containing one or more Formats. [DAG Compatible - Directed Acyclic Graph Data Structure] FlattenedAsset prevent Cycles in Reference because all outbound references are strings as opposed to crosspollinated objects. i.e. FlattenedFormat.preview is Type String, and FlattenedFormat.original is Type String

Properties

NameType
schemaEmbeddedModelSchema
idstring
namestring
creatorstring
createdGroupedTimestamp
updatedGroupedTimestamp
syncedGroupedTimestamp
deletedGroupedTimestamp
formatsFlattenedFormats
previewFlattenedPreview
originalstring
sharesFlattenedShares
mechanismMechanismEnum
websitesFlattenedWebsites
interactedGroupedTimestamp
tagsFlattenedTags
sensitivesFlattenedSensitives
personsFlattenedPersons
curatedboolean
discoveredboolean
activitiesFlattenedActivities
scoreScore
favoritedboolean
pseudoboolean
annotationsFlattenedAnnotations
hintsFlattenedHints
anchorsFlattenedAnchors
conversationsFlattenedConversations
demoboolean
summariesFlattenedWorkstreamSummaries

Example

import { FlattenedAsset } from '@pieces.app/pieces-os-client'

// TODO: Update the object below with actual values
const example: FlattenedAsset = {
"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": 0872ccbf-1d8f-4f46-9028-469794d72761,
"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,
"demo": null,
"summaries": 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 FlattenedAsset
console.log(exampleParsed)