ObjectStackObjectStack

Misc

Misc protocol schemas

TypeScript Usage

import { ResolvedBookSchema, ResolvedEntrySchema, ResolvedGroupSchema } from '@objectstack/spec/api';
import type { ResolvedBook, ResolvedEntry, ResolvedGroup } from '@objectstack/spec/api';

// Validate data
const result = ResolvedBookSchema.parse(data);

ResolvedBook

Properties

PropertyTypeRequiredDescription
namestringThe book's machine name.
labelstringoptionalThe book's display label, when it declares one.
groups{ key: string; label: string; entries: object[] }[]The resolved groups, in render order.

Nested Shape: ResolvedBook.groups[number]

PropertyTypeRequiredDescription
keystringThe group's key (from the spine, or uncategorized).
labelstringThe group's display label.
entries{ doc?: string; href?: string; label?: string; description?: string; … }[]The group's resolved entries, in render order.

ResolvedEntry

Properties

PropertyTypeRequiredDescription
docstringoptionalDoc name, or undefined for an external link / separator.
hrefstringoptionalExternal link target, when the entry is a link.
labelstringoptionalDisplay label, when one resolved.
descriptionstringoptionalDoc description, when one resolved.
badgestringoptionalBadge text (e.g. "beta"), when declared.
iconstringoptionalIcon name, when declared.
separatorbooleanoptionalTrue for a --- separator node.

ResolvedGroup

Properties

PropertyTypeRequiredDescription
keystringThe group's key (from the spine, or uncategorized).
labelstringThe group's display label.
entries{ doc?: string; href?: string; label?: string; description?: string; … }[]The group's resolved entries, in render order.

Nested Shape: ResolvedGroup.entries[number]

PropertyTypeRequiredDescription
docstringoptionalDoc name, or undefined for an external link / separator.
hrefstringoptionalExternal link target, when the entry is a link.
labelstringoptionalDisplay label, when one resolved.
descriptionstringoptionalDoc description, when one resolved.
badgestringoptionalBadge text (e.g. "beta"), when declared.
iconstringoptionalIcon name, when declared.
separatorbooleanoptionalTrue for a --- separator node.

On this page