Skip to content
ParaShape

Model JSON

Persisted document. The types below are ts-rs output from crates/model — this site is a review surface, not a second schema.

// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { BehaviorNode } from "./BehaviorNode.js";
import type { ComponentNode } from "./ComponentNode.js";
import type { LayerNode } from "./LayerNode.js";
import type { MaterialNode } from "./MaterialNode.js";
import type { ModelSettings } from "./ModelSettings.js";
import type { ObjectNode } from "./ObjectNode.js";
import type { ParameterNode } from "./ParameterNode.js";
import type { PatternNode } from "./PatternNode.js";
import type { ViewNode } from "./ViewNode.js";

/**
 * Model = meta + assets + parameters (header) + scene (body). The ONE
 * declaration of the persisted document. Cross-field refinements (one key
 * namespace across every lane, the material/pattern library shape) run post-deserialize
 * in `crate::validate` — serde has no schema-level array-uniqueness refine.
 */
export type ModelJson = { 
/**
 * identity — the platform's PUBLISH sequence, stamped by the host.
 * 0/absent = never published. Not a JSON-format/schema version number.
 */
version?: number, 
/**
 * intent — content name printed on the artifact, verbatim text (a
 * human types it; nothing evaluates it). Fails validate when empty or
 * over `EXPR_MAX_LENGTH` characters (`validate::model::push_title`).
 */
title: string, 
/**
 * intent — what this definition is, verbatim text beside `title` (a
 * human types it; nothing evaluates it): allowlisted HTML or plain text,
 * read by the catalogue, the configurator and the quote, never by
 * evaluation. On the definition, so no placement overrides it
 * (SketchUp `ComponentDefinition#description`, AutoCAD block `Comments`).
 */
description?: string, 
/**
 * intent — units and environment; absent = every field's own default.
 * The active view is NOT here — it is engine session state
 * (`EngineSession.active_view`), and a stored `settings.activeView`
 * fails validate as an unknown key (`deny_unknown_fields`).
 */
settings?: ModelSettings, 
/**
 * intent — the materials lane.
 */
materials?: Array<MaterialNode>, 
/**
 * intent — the layers lane.
 */
layers?: Array<LayerNode>, 
/**
 * intent — the patterns lane.
 */
patterns?: Array<PatternNode>, 
/**
 * intent — Header: named value bindings.
 */
parameters?: Array<ParameterNode>, 
/**
 * intent — acts this model performs on its siblings when it is placed
 * as a component (AGENTS.md "Behaviors"); dormant in an open document —
 * the root has no siblings — active once placed via `placeComponent`.
 */
behaviors?: Array<BehaviorNode>, 
/**
 * intent — Root body: the SET of scene objects, model-wide unique keys.
 */
objects?: Array<ObjectNode>, 
/**
 * intent — Named views; key unique in the document's one key
 * namespace, same as every other lane (`validate::keys`).
 */
views?: Array<ViewNode>, 
/**
 * intent — the components lane: documents this one places.
 */
components?: Array<ComponentNode>, };
fieldpage
version, titleSchema
settingsSettings
parametersParameters
objectsObjects
viewsViews
componentsComponents
materialsMaterials
layersLayers
patternsPatterns
behaviorsBehaviors

Every field this closure carries, generated in full, plus the Open surface audit of every unconstrained field: Schema. Catalog methods: Nodes. Expression namespaces: Functions. What evaluation yields — one page per kind (Object, Curve, Mesh, Block, Section, Hatch, the three dimensions, Leader, Image, Resolved records), each holding every type it is made of: Evaluated, e.g. Linear dimension. What each arg valueType word means: Value types. What the engine's doors take and return: Engine doors.

📖 1 min read