Element

The `Element` entity.

Definition

TypeScript
interface Element {
  id: string;
  workspaceId: string | null;
  name: string;
  description: string | null;
  status: "draft" | "live";
  visibility: "private" | "public";
  defaultVersionId: string | null;
  defaultExportName: string | null;
  createdBy: string | null;
  deletedAt: string | null;
  retentionTier: "short" | "medium" | "long" | "none" | null;
  createdAt: string;
  updatedAt: string;
}

Fields

FieldTypeNotes
idstringreadonly required
workspaceIdstring | nullrequired — Workspace that owns this element.
namestringrequired — Human-readable element name.
descriptionstring | nullrequired — Optional longer-form description.
status"draft" | "live"required — Lifecycle status. Transitions from 'draft' to 'live' on first successful deploy.
visibility"private" | "public"required — Access mode — 'private' to the workspace, or 'public' across workspaces.
defaultVersionIdstring | nullrequired — Version served as the default when embedding; null until published.
defaultExportNamestring | nullrequired — Named export of the default version's bundle. Null = default. Non-null when this element aliases a named export of another element's bundle (e.g. CardHeader aliasing the Card family bundle).
createdBystring | nullrequired — User who created the element.
deletedAtstring | nullrequired — ISO-8601 timestamp of soft-delete; null while active. Cleanup worker hard-deletes once deletedAt + retentionTier.days passes.
retentionTier"short" | "medium" | "long" | "none" | nullrequired — Retention tier snapshotted at delete time. short=7d, medium=30d, long=90d, none=never. Null while active.
createdAtstringreadonly required — ISO-8601 timestamp of creation.
updatedAtstringreadonly required — ISO-8601 timestamp of the last update.