JsonPatchOp ​Contract 2.0.0 · package sha256
a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e· generated fromconfigurator-runtime.d.tsbyservices/onsite-scripter/scripts/build-contract-docs.mjs; edit the source, not this file.
Type · import type { JsonPatchOp } from '@holostep-configurators/runtime-client/contract'; · stable · since 2.0.0 · section 5. Writers, transactions, session
RFC 6902 over SessionState. Paths are keyed, never array indexes (spec section 6.9).
applyPatch writes these:
/model/node/{nodeId}/{field}: a scene-model node wherever it sits in the tree; field is
a field of the stored node format or one the node already carries ('unknown-field'
otherwise), and a defaultNodeId written here names one of its children, or is null or ''
('unknown-id' otherwise);/model/node/{nodeId}/children and /model/root: ordered lists of child nodeIds, replaced
whole (insert, reorder and reparent are written this way);/connections/{from.node}:{from.connector}: a connection (split at the last ':'; a connector
id never holds one);/look/rules/{ruleId}: a rule; /look/ruleOrder/apply and /look/ruleOrder/find: the rule
ids of each block (spec section 6.10, R2), in order, replaced whole;/checkpoint: the page state.
The feed's entries, inverses and dry-run patches also name these, which applyPatch refuses
at the call (a 'test' too) with HoloInputError 'invalid-input' whose fix names the member
that writes them:/look/collections/{name}/items/{key} (an item) and /look/collections/{name}/order (its
item keys, in order): collection(name).set();/look/collections/{name}/stage (a collection's stage layer, CollectionSpec.stage, added
when first written, removed when cleared) and /look/stageOrder (the stage layers' order,
LookState.stageOrder): stage.set();/look/materials/{name}: apply({ materials }) or materials.create().
Undo an entry that touched them with session.history. ~1 escapes / as in RFC 6901.export type JsonPatchOp = {
op: 'add' | 'replace' | 'test';
path: string;
value: JsonValue;
} | {
op: 'remove';
path: string;
} | {
op: 'move' | 'copy';
from: string;
path: string;
};
| Rule | Result |
|---|---|
| 1. Neutral name | pass: JsonPatchOp names no product |
| 2. A precedent | not recorded: no ledger row (coverage.json) names this member or its owner |
| 3. Two apps, or labs | not recorded: no ledger row names this member or its owner |
| 4. The cheaper fix first | not recorded per member (Appendix B decides it per need) |