Input-error code 'unknown-id' ​

Contract 2.0.0 · package sha256 a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e · generated from configurator-runtime.d.ts, tables/problems.json and services/onsite-scripter/scripts/contract-docs-what-to-do.json by services/onsite-scripter/scripts/build-contract-docs.mjs; edit the source, not this file.

A member of InputErrorCode · stable · since 2.0.0

An id that names nothing the member takes, e.g. a select group that is no global-material GroupNode, a view not in camera.views, an ImageRef or ShapeRef that is not live, a { materialId } that names no material, an applyPatch defaultNodeId that names no child of its node, or a describe(node) id that names no ModelNode; didYouMean names known ids.

What to do ​

session.select(group, material) takes the nodeId of a global-material GroupNode and of one of its MaterialNode children, never a label: look both up in session.getSceneModel() (below), and didYouMean, when set, lists known ids. For session.camera.views.go(name) use a name from session.document.camera.views (Session.document); for an ImageRef or ShapeRef that is not live, write the canvas or the arrays again.

ts
type StoredNode = DeepReadonly<ConfiguratorNode>; // both from the package's /contract entry
const all = (ns: readonly StoredNode[]): StoredNode[] => ns.flatMap((n) => [n, ...all(n.children ?? [])]);
const group = all(session.getSceneModel()?.root ?? []).find((n) => n.label === 'Upholstery');
const fabric = group?.children?.find((m) => m.label === 'linen-grey');
if (group && fabric) await session.select(group.nodeId, fabric.nodeId);

Where the declaration names it ​

The set is open: handle a code you don't know ('other').