AssetContract ​

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

Interface · import type { AssetContract } from '@holostep-configurators/runtime-client/contract'; · stable · since 2.0.0 · section 22. Pure helpers (root of the package; run in Node and the fake)

What an app needs from an asset. Type a contract with satisfies AssetContract; export it as JSON in CI for glb-validate.

Members ​

Member Kind Summary
$schema? property The JSON Schema id.
element? property Case-sensitive globs over the whole AssetManifest.element, as Query.name (spec section C.8); with an array, any one matching passes.
parts? property Parts by id: the tag and slot each must have, and whether it must exist.
slots? property Slots by name; realSize: the slot must carry uvMetres.
connectors? property Connector types and how many of each.
animations? property Clip names that must exist.

Declaration ​

ts
export interface AssetContract {
  $schema?: 'holostep.asset-contract/1';
  element?: string | readonly string[];
  parts?: Readonly<Record<string, {
    tag?: string;
    slot?: string;
    required?: boolean;
  }>>;
  slots?: Readonly<Record<string, {
    realSize?: boolean;
  }>>;
  connectors?: ReadonlyArray<{
    type: string;
    count?: number;
  }>;
  animations?: readonly string[];
}

Generic-API test (spec 3.1) ​

Rule Result
1. Neutral name pass: AssetContract 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)