ElementVersion

The `ElementVersion` entity.

Definition

TypeScript
interface ElementVersion {
  id: string;
  elementId: string;
  name: string;
  parentId: string | null;
  status: "pending" | "failed" | "ready";
  error: string | null;
  exportName: string | null;
  bundleVersionId: string | null;
  createdAt: string;
  updatedAt: string;
}

Fields

FieldTypeNotes
idstringreadonly required
elementIdstringrequired — Element this version belongs to.
namestringrequired — Version label (e.g. 'v1', 'experiment').
parentIdstring | nullrequired — Version this one was forked from; null for the initial version.
status"pending" | "failed" | "ready"required — R2-hydration lifecycle. 'pending' while source files are being forked from the parent version, 'ready' once buildable, 'failed' if hydration errored.
errorstring | nullrequired — Error from hydration (set when status = 'failed').
exportNamestring | nullrequired — Named export of the bundle this version renders. Null = default. Set when one bundle exposes multiple MDX tags (e.g. Card family).
bundleVersionIdstring | nullrequired — Alias: FK to another element_version that owns the actual bundle. Null = this version owns its own bundle. Non-null = the renderer fetches the referenced version's bundle instead, enabling sub-primitive tags to share one compiled source.
createdAtstringreadonly required — ISO-8601 timestamp of creation.
updatedAtstringreadonly required — ISO-8601 timestamp of the last update.