Page schema — UI Protocol property reference
Page schemas of the ObjectStack UI Protocol: ElementApiDataSource and 11 more — each property with its type, default and a TypeScript example.
Source: packages/spec/src/ui/page.zod.ts
TypeScript Usage
import { ElementApiDataSourceSchema, ElementDataSourceSchema, InterfacePageConfigSchema, PageSchema, PageComponentSchema, PageComponentType, PagePrintSchema, PageRecordBindingSchema, PageRegionSchema, PageTemplateSchema, PageTypeSchema, PageVariableSchema } from '@objectstack/spec/ui';
import type { ElementApiDataSource, ElementDataSource, InterfacePageConfig, Page, PageComponent, PageComponentType, PagePrint, PageRecordBinding, PageRegion, PageTemplate, PageType, PageVariable } from '@objectstack/spec/ui';
// Validate data
const result = ElementApiDataSourceSchema.parse(data);ElementApiDataSource
API binding of a page element: { provider: 'api', read: { url }, path? } reads one same-origin endpoint with the console's signed-in fetch and binds the selected value, which the element reads as data in its expression holes and its visibleWhen. The console renders it on every page element: the value is data on that element and on every element nested inside it, the element's visibleWhen is decided once the read answers, and while the read is in flight, or when the binding is refused or the read fails, the element draws a loading or error panel instead. The console's generic stat, usage-bar and checklist blocks are built to take it.
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| provider | 'api' | ✅ | Binds one same-origin API endpoint — the discriminator of an api data source |
| read | { url: string; method?: 'GET' } | ✅ | The read request — the same-origin endpoint the binding reads |
| path | string | optional | Dotted path selecting the sub-tree of the response the binding takes, e.g. data.environments in a { success, data } envelope; omitted, the binding takes the whole response |
Nested Shape: ElementApiDataSource.read
| Property | Type | Required | Description |
|---|---|---|---|
| url | string | ✅ | Same-origin API path the binding reads — it opens with a single /, e.g. /api/v1/cloud/home. An absolute URL of any scheme, a protocol-relative //host, a backslash read as a slash, a space or control character, and a relative path are refused at parse. No credential is written here: the console reads the endpoint with its own signed-in fetch. |
| method | 'GET' | optional | HTTP method of the read — GET, the only method the read of an api data source is sent with |
ElementDataSource
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| object | string | ✅ | Object to query |
| view | string | optional | Named view to apply |
| filter | ({ field: string; operator: Enum<'equals' | 'not_equals' | 'contains' | 'not_contains' | 'icontains' | …>; value?: string | number | boolean | null | (string | number)[] } | { or: object[] })[] | optional | Additional filter criteria — the ViewFilterRule array form [{ field, operator, value }, ...], the one filter orthography every filter door in ComponentPropsMap shares; AND-combined with the filter of the named view. The MongoDB-style record form is refused — see migration element-data-source-and-object-block-filter-rule-array |
| sort | { field: string; order: Enum<'asc' | 'desc'> }[] | optional | Sort order |
| limit | integer | optional | Max records to display |
Nested Shape: ElementDataSource.filter[number][option 1]
View filter rule
| Property | Type | Required | Description |
|---|---|---|---|
| field | string | ✅ | Field name to filter on |
| operator | Enum<'equals' | 'not_equals' | 'contains' | 'not_contains' | 'icontains' | …> | ✅ | Filter operator |
| value | string | number | boolean | null | (string | number)[] | optional | Filter value. The accepted SHAPE depends on the operator: in / not_in take an array (any length, including []), between takes exactly [min, max], every other operator takes a scalar. The unary operators (is_empty / is_not_empty / is_null / is_not_null) take their direction from the operator name and ignore this key. One operator bounds the VALUE as well as the shape: icontains takes a NON-EMPTY STRING, the comparand the Filter Protocol conformance table declares for it — an empty comparand constrains nothing and a non-string one would answer a query nobody wrote, and both are refused at the query path too. |
Nested Shape: ElementDataSource.filter[number][option 2]
An any-of group: { or: [rule, ...] } matches a record when ANY of its rules matches. It sits in the filter list beside plain rules, and the list still ANDs every element, so [{ or: [{ field: "status", operator: "equals", value: "open" }, { field: "completed_at", operator: "after", value: "{7_days_ago}" }] }] selects the open records and the ones completed in the last 7 days. One level only: its members are flat rules. The console applies it, ANDed with its sibling elements, and its filter builder edits a filter that is exactly one group.
| Property | Type | Required | Description |
|---|---|---|---|
| or | { field: string; operator: Enum<'equals' | 'not_equals' | 'contains' | 'not_contains' | 'icontains' | …>; value?: string | number | boolean | null | (string | number)[] }[] | ✅ | The rules of which ANY may match: a non-empty array of flat filter rules { field, operator, value }, each judged exactly as a rule at the top level of the filter. A group cannot hold a group. |
Nested Shape: ElementDataSource.sort[number]
Sort field and direction pair
| Property | Type | Required | Description |
|---|---|---|---|
| field | string | ✅ | Field name to sort by |
| order | Enum<'asc' | 'desc'> | ✅ | Sort direction |
InterfacePageConfig
Interface-level page configuration (Airtable parity)
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| source | string | optional | Source object name for the page |
| columns | string[] | { field: string; label?: string | Record<string, string>; width?: number; align?: Enum<'left' | 'center' | 'right'>; … }[] | optional | Columns shown by the page. Blank = all object fields. Defined directly on the page (no view inheritance). |
| sort | { field: string; order: Enum<'asc' | 'desc'> }[] | optional | Default sort order for the page, defined directly on the page. |
| filterBy | ({ field: string; operator: Enum<'equals' | 'not_equals' | 'contains' | 'not_contains' | 'icontains' | …>; value?: string | number | boolean | null | (string | number)[] } | { or: object[] })[] | optional | Always-on page filter (base filter). |
| levels | integer | optional | Number of hierarchy levels to display |
| sourceView | string | optional | @deprecated Legacy named-view inheritance. Define columns/sort/filterBy on the page instead. |
| appearance | { showDescription?: boolean; allowedVisualizations?: Enum<'grid' | 'kanban' | 'gallery' | 'calendar' | 'timeline' | 'gantt' | 'map' | …>[] } | optional | Appearance and visualization configuration |
| userFilters | { element?: Enum<'dropdown' | 'tabs' | 'toggle'>; fields?: object[]; tabs?: object[]; showAllRecords?: boolean; … } | optional | End-user quick-filter bar for this page (overrides the source view's userFilters) |
| userActions | { sort?: boolean; search?: boolean; filter?: boolean; refresh?: boolean; … } | optional | User action toggles |
| addRecord | { enabled: boolean; position?: Enum<'top' | 'bottom' | 'both'> } | optional | Add record entry point configuration |
| buttons | string[] | optional | Toolbar buttons — names of the source object's actions to surface in the page toolbar |
| recordAction | Enum<'drawer' | 'page' | 'none'> | optional | How clicking a record opens its detail (drawer | page | none). Default: drawer |
| showRecordCount | boolean | optional | Show record count at page bottom |
| emptyState | { title?: string | Record<string, string>; message?: string | Record<string, string>; icon?: string; link?: object } | optional | What the page draws in place of rows when its list has none to show: { title, message, icon, link }, the list view's own empty-state shape. The console's list page prefers it, whole, over its source view's empty state; with none declared, the page draws the source view's, if any. |
| allowPrinting | boolean | optional | Allow users to print the page |
Nested Shape: InterfacePageConfig.columns[number]
| Property | Type | Required | Description |
|---|---|---|---|
| field | string | ✅ | Field name (snake_case) |
| label | string | Record<string, string> | optional | Display label override |
| width | number | optional | Column width in pixels |
| align | Enum<'left' | 'center' | 'right'> | optional | Text alignment |
| hidden | boolean | optional | Hide column by default |
| sortable | boolean | optional | Allow sorting by this column |
| resizable | boolean | optional | Allow resizing this column |
| wrap | boolean | optional | Allow text wrapping |
| type | string | optional | Renderer type override (e.g., "currency", "date") |
| pinned | Enum<'left' | 'right'> | optional | Pin/freeze column to left or right side |
| summary | Enum<'none' | 'count' | 'count_empty' | 'count_filled' | 'count_unique' | …> | { type: Enum<'none' | 'count' | 'count_empty' | 'count_filled' | 'count_unique' | …>; field?: string } | optional | Footer aggregation for this column — the function alone, or { type, field } to aggregate another field |
| prefix | { field: string; type?: Enum<'badge' | 'text'> } | optional | Field rendered inline before this cell value |
| link | boolean | optional | Functions as the primary navigation link (triggers View navigation) |
| action | string | optional | Registered Action ID to execute when clicked |
Nested Shape: InterfacePageConfig.sort[number]
Sort field and direction pair
| Property | Type | Required | Description |
|---|---|---|---|
| field | string | ✅ | Field name to sort by |
| order | Enum<'asc' | 'desc'> | ✅ | Sort direction |
Nested Shape: InterfacePageConfig.filterBy[number][option 1]
View filter rule
| Property | Type | Required | Description |
|---|---|---|---|
| field | string | ✅ | Field name to filter on |
| operator | Enum<'equals' | 'not_equals' | 'contains' | 'not_contains' | 'icontains' | …> | ✅ | Filter operator |
| value | string | number | boolean | null | (string | number)[] | optional | Filter value. The accepted SHAPE depends on the operator: in / not_in take an array (any length, including []), between takes exactly [min, max], every other operator takes a scalar. The unary operators (is_empty / is_not_empty / is_null / is_not_null) take their direction from the operator name and ignore this key. One operator bounds the VALUE as well as the shape: icontains takes a NON-EMPTY STRING, the comparand the Filter Protocol conformance table declares for it — an empty comparand constrains nothing and a non-string one would answer a query nobody wrote, and both are refused at the query path too. |
Nested Shape: InterfacePageConfig.filterBy[number][option 2]
An any-of group: { or: [rule, ...] } matches a record when ANY of its rules matches. It sits in the filter list beside plain rules, and the list still ANDs every element, so [{ or: [{ field: "status", operator: "equals", value: "open" }, { field: "completed_at", operator: "after", value: "{7_days_ago}" }] }] selects the open records and the ones completed in the last 7 days. One level only: its members are flat rules. The console applies it, ANDed with its sibling elements, and its filter builder edits a filter that is exactly one group.
| Property | Type | Required | Description |
|---|---|---|---|
| or | { field: string; operator: Enum<'equals' | 'not_equals' | 'contains' | 'not_contains' | 'icontains' | …>; value?: string | number | boolean | null | (string | number)[] }[] | ✅ | The rules of which ANY may match: a non-empty array of flat filter rules { field, operator, value }, each judged exactly as a rule at the top level of the filter. A group cannot hold a group. |
Nested Shape: InterfacePageConfig.appearance
| Property | Type | Required | Description |
|---|---|---|---|
| showDescription | boolean | optional (default: true) | Show the view description text |
| allowedVisualizations | Enum<'grid' | 'kanban' | 'gallery' | 'calendar' | 'timeline' | 'gantt' | 'map' | …>[] | optional | Whitelist of visualization types users can switch between (e.g. ["grid", "gallery", "kanban"]) |
Nested Shape: InterfacePageConfig.userFilters
| Property | Type | Required | Description |
|---|---|---|---|
| element | Enum<'dropdown' | 'tabs' | 'toggle'> | optional (default: "dropdown") | Filter control style: "dropdown" (per-field value selectors) or "tabs" (named presets). "toggle" is deprecated. |
| fields | { field: string; label?: string | Record<string, string>; type?: Enum<'select' | 'multi-select' | 'boolean' | 'date-range' | 'text'>; options?: object[]; … }[] | optional | Fields exposed as quick filters (dropdown/toggle elements) |
| tabs | { name: string; label?: string | Record<string, string>; icon?: string; view?: string; … }[] | optional | Named filter presets rendered as tabs (tabs element). Reuses ViewTabSchema |
| showAllRecords | boolean | optional | Show an "All records" tab before the presets (tabs element) |
| allowAddTab | boolean | optional | Let end users add their own tab after the presets (tabs element): the affordance asks for a name and snapshots the filters currently applied as a new tab. SESSION-SCOPED — an added tab lives only for the current mount, is never written back as metadata (ADR-0047), and carries a remove control the authored presets do not. Page lists only — object views use listViews for named presets |
Nested Shape: InterfacePageConfig.userActions
| Property | Type | Required | Description |
|---|---|---|---|
| sort | boolean | optional (default: true) | Allow users to sort records |
| search | boolean | optional (default: true) | Allow users to search records |
| filter | boolean | optional (default: true) | Allow users to filter records |
| refresh | boolean | optional (default: true) | Allow users to reload the view data from the backend without a full page reload. Governs only the wide toolbar's Refresh button (compactToolbar: false): the default toolbar has no Refresh, so the toggle changes nothing there. |
| rowHeight | boolean | optional (default: true) | Allow users to toggle row height/density |
| group | boolean | optional (default: true) | Allow users to change record grouping from the toolbar. Toggle only — the grouping itself is configured in the view-level grouping block. |
| addRecordForm | boolean | optional (default: false) | Add records through a form instead of inline |
| editInline | boolean | optional (default: true) | Allow users to edit records inline. On by default: a user who may update the object edits a cell in place with the field's type-aware widget (the same control the form uses), under the permission gate that already decides whether the object is editable at all. Declare editInline: false to make the list read-only in place. |
| hideFields | boolean | optional (default: true) | Allow users to hide/show fields from the toolbar (the affordance behind the view-level hiddenFields list). Boolean toggle — distinct from the record-details component's hideFields, which is an array of field names to omit. On by default: a reader hides and shows columns for themselves; declare hideFields: false to withhold the control. |
| rowColor | boolean | optional (default: false) | Allow users to configure row colouring from the toolbar. Boolean toggle — the colour rules themselves live in the view-level rowColor block. Off by default: row colouring is opt-in. |
| buttons | string[] | optional | Custom action button IDs to show in the toolbar |
Nested Shape: InterfacePageConfig.addRecord
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | boolean | ✅ | Show the add record entry point — REQUIRED: true draws the Add button, false declares it off |
| position | Enum<'top' | 'bottom' | 'both'> | optional (default: "top") | Position of the add record button: top (the toolbar, the default), bottom (under the list) or both |
| mode | never | optional | [REMOVED] addRecord.mode was removed in @objectstack/spec 18.1.0 (ADR-0049 enforce-or-remove) — no renderer ever read it: the Add button always opens the create form, never an inline row or a mode of its own choosing. Delete the key; the create form opens the way the object list's New opens it. Run os migrate meta --from 17 to list the mechanical edits for existing sources; --write applies the ones it can prove, and you apply the rest by hand. |
| formView | never | optional | [REMOVED] addRecord.formView was removed in @objectstack/spec 18.1.0 (ADR-0049 enforce-or-remove) — no renderer ever read it: the Add button opens the object's create form, never a named form. Delete the key. The create form lays out by the object's fieldGroups; to leave a field out of it, set showOnCreate: false on that field. Run os migrate meta --from 17 to list the mechanical edits for existing sources; --write applies the ones it can prove, and you apply the rest by hand. |
Nested Shape: InterfacePageConfig.emptyState
| Property | Type | Required | Description |
|---|---|---|---|
| title | string | Record<string, string> | optional | Heading of the empty state |
| message | string | Record<string, string> | optional | Line of text below the heading |
| icon | string | optional | Icon name drawn above the heading; a name that resolves to no icon draws the default empty-state glyph |
| link | { label: string | Record<string, string>; url: string } | optional | The one next step an empty list names: a link the user follows, { label, url } — for example to the how-to page that explains what belongs here when nobody can add a row. It opens a page or an address and runs no action. The console draws it in a list's empty state (the grid and gallery visualizations) and in an object-grid block's, beside the add-record action where one is offered. |
Page
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| name | string | ✅ | Page unique name (lowercase snake_case) |
| label | string | Record<string, string> | ✅ | Display label — the default-language string, or an inline locale map ({ en, "zh-CN" }) resolved at render time |
| description | string | Record<string, string> | optional | Display label — the default-language string, or an inline locale map ({ en, "zh-CN" }) resolved at render time |
| icon | string | optional | Page icon name |
| type | Enum<'record' | 'home' | 'app' | 'utility' | 'list'> | optional (default: "record") | Page type |
| variables | { name: string; type?: Enum<'string' | 'number' | 'boolean' | 'object' | 'array' | 'record_id'>; defaultValue?: any; source?: string }[] | optional | Local page state, exposed to expressions as page.<name> and writable by interactive elements via source (master/detail, filtered dashboards). |
| object | string | optional | Bound object (for Record pages) |
| record | { object: string; view?: string; filter?: (object | object)[]; sort?: object[] } | optional | The row an app page is about — a one-row query { object, view?, filter?, sort? }. The console reads it once per page open: the FIRST row under sort, under the caller's identity. Every component's visibleWhen sees that row as record; a record block that binds its own row still provides that row to its own subtree. A page drawn through interfaceConfig.source reads no binding. A count or a plan is a field on that row: a summary roll-up (record.environment_count > 1) or the object's own field (record.plan != 'free'). Three states: while the read is pending, the page body is not drawn; no row, or a read the server refuses as forbidden (403), binds record as null; any other failure draws no page body. Only on type: 'app' — refused on every other page type (a record page's row is the record it opens). |
| template | Enum<'default' | 'header-sidebar-main' | 'three-column' | 'dashboard'> | optional (default: "default") | Layout template — 'default', 'header-sidebar-main', 'three-column' or 'dashboard'. Each places its own regions (PAGE_TEMPLATE_SLOTS); a region the template does not place, or a second region filling the same slot, is refused at the region's name. |
| regions | { name: string; width?: Enum<'small' | 'medium' | 'large' | 'full'>; components: object[] }[] | optional | Layout regions (header, main, sidebar, footer) with their components. Optional on most pages — list pages use interfaceConfig, slotted pages use slots, html and react pages use source — but a kind: 'full' record page draws nothing else, so it must place at least one component here: one that places none is refused, since every record of its object would open on a blank detail panel. A record page binding no object that carries an interfaceConfig.source is drawn as an interface list instead, and is not judged. |
| isDefault | boolean | optional (default: false) | Whether this record page is the default record page of its object — the page its records open on, on the desktop full record page; on a phone and in the side preview the standard record page is drawn instead (see kind). At most one isDefault: true record page may exist for an object in a deployment: a second is refused (by defineStack / os validate, at package registration and at metadata save), naming both pages. Saving a page under the existing default's own name is that page, not a second default. Refused on any other page — a page that is not a record page bound to an object: nothing reads it there. An app opens on its first navigation item, and the root landing follows the app's own isDefault. |
| apps | string[] | optional | The apps whose routes open this record page for its object: inside an app named here, the object's record view (/apps/<app>/<object>/record/<id>) opens this page on the desktop full record page (on a phone and in the side preview the standard record page is drawn, see kind); everywhere else, Setup included, the object's one isDefault record page still opens, so the default and an app's page coexist. App names, non-empty and unique. At most one record page per object per app: a second page naming the same app for the same object is refused (by defineStack / os validate, at package registration and at metadata save), naming both pages. Refused on any page that is not a record page bound to an object. |
| assignedProfiles | never | optional | [REMOVED] page.assignedProfiles was removed in @objectstack/spec 17.5.0 (ADR-0090 D2, ADR-0049 enforce-or-remove) — it was named for the Profile concept ADR-0090 D2 deleted, and it gated nothing: no renderer, route or metadata read door ever read the key, so a page that "assigned profiles" stayed open to every caller who could reach it. Delete the key. Page audience is the permission set's: gate the DATA the page shows with the object's permission sets, and bind those sets to people through positions (named in a position's permissionSets) — those are the checks the runtime actually runs. Run os migrate meta --from 17 to list the mechanical edits for existing sources; --write applies the ones it can prove, and you apply the rest by hand. |
| interfaceConfig | { source?: string; columns?: string[] | object[]; sort?: object[]; filterBy?: (object | object)[]; … } | optional | Interface-level page configuration (for Airtable-style interface pages) |
| aria | { ariaLabel?: string | Record<string, string>; ariaDescribedBy?: string; role?: string } | optional | ARIA accessibility attributes |
{ paperSize?: Enum<'A4' | 'A5' | 'Letter' | 'Legal'>; orientation?: Enum<'portrait' | 'landscape'>; margins?: object; repeatHeader?: boolean; … } | optional | Print declaration — makes this page a print page, a document authored in the page's own blocks: paper size and orientation, margins in millimetres, the running header and footer (the page's own header / footer regions), page numbers and page-break hints, each mapped to print CSS. A print page is a kind: 'full' page of type: 'record', 'home' or 'app' with its blocks in regions, and every block in it must come from the printable block subset: containers that draw every child (page:section, page:card, page:footer), field blocks (record:details, record:highlights), the child-record table record:line_items, element:text, element:image, element:divider, element:definition-list, element:repeater, element:number and object-metric; os validate / os build / os lint and the metadata save door refuse any other block inside it. Applied by the console's browser print rendering, which prints the page through the browser's own print dialog (where it can be saved as PDF); the server-side PDF renderer is to follow. A list view's print button is allowPrinting, not this. | |
| kind | Enum<'full' | 'slotted' | 'html' | 'react'> | optional (default: "full") | Page override mode. full | slotted = structured authoring; html = author-written constrained JSX compiled (parsed, never executed) to the tree (ADR-0080; ADR-0081 named it html), styled by the registered components' structured props plus a JSON style object with hsl(var(--token)) theme colors; react = real-React source executed at render by the runtime (ADR-0081), styled by inline style with the same token colors; it runs author JS, so it is gated by a host capability that defaults OFF and is turned on server-side via the OS_PAGE_REACT_ENABLED=true env toggle. Do not author Tailwind classes in page source in either tier: source is runtime metadata the build-time Tailwind never scans, so utility classNames silently produce no CSS (ADR-0065; ADR-0080). Where it is drawn: an object's assigned record page of kind 'full', 'html' or 'react' (its isDefault page, or an app's page named by apps) is drawn on the desktop full record page only. On a phone and in the side preview (the drawer a list opens, a split pane, an interface page's preview) the record opens on the standard record page, built from the object's own metadata, so the page's layout and what lives only on it (its own blocks, tabs and sections, and record_section actions, which the standard page does not draw; give such an action record_page as well, with component: 'action:menu' to keep it in the ⋯ menu) do not appear there. A page named in the URL (a print page and other named page routes) is drawn wherever that route opens, the platform's own approval request and user pages keep their page on every surface, and a kind: 'slotted' page is the standard page with its slots filled, on every surface. |
| slots | { header?: object | object[]; actions?: object | object[]; alerts?: object | object[]; highlights?: object | object[]; … } | optional | Slot override map for slotted pages |
| source | string | optional | Page source text. For kind==='html' it is constrained JSX compiled to the tree by @objectstack/sdui-parser at save time (parse, never execute), styled by the registered components' structured props plus a JSON style object with hsl(var(--token)) theme colors. For kind==='react' it is real React/JSX executed at render by @object-ui/react-runtime (trusted tier), styled by inline style with the same token colors. Do not author Tailwind classes in page source in either tier: source is runtime metadata the build-time Tailwind never scans, so utility classNames silently produce no CSS (ADR-0065; ADR-0080). Authoritative over regions in both. |
| requires | string[] | optional | Plugin namespaces the page's source uses, derived from the source at save — omit it. The key exists only on a kind==='html' page, the kind whose source is compiled at save; on a 'react', 'full' or 'slotted' page — and a page that omits kind, which is 'full' — it is refused at parse. On a server that has the deployment's SDUI component manifest, saving an html page compiles its source and stores the namespaces it uses here; a written list that disagrees with the source is refused (422 INVALID_METADATA, page-requires-disagrees-with-source) — on a draft save it is kept until the draft's publish, which refuses it. At load, a stored page whose list names a plugin no component in that manifest carries is reported, page and plugin named, and is still served. A server with no manifest checks neither and says so once at boot. |
| _lock | Enum<'none' | 'no-overlay' | 'no-delete' | 'full'> | optional | Item-level lock — controls overlay & delete (ADR-0010). |
| _lockReason | string | optional | Human-readable reason shown when a write is refused by _lock. |
| _lockSource | Enum<'artifact' | 'package' | 'env-forced'> | optional | Layer that set _lock (artifact | package | env-forced). |
| _provenance | Enum<'package' | 'org' | 'env-forced' | 'platform'> | optional | Origin of the item (package | org | env-forced | platform). |
| _packageId | string | optional | Owning package machine id. |
| _packageVersion | string | optional | Owning package version. |
| _lockDocsUrl | string | optional | Optional documentation link surfaced next to _lockReason. |
| overrides | { package: string; basedOn: string } | optional | Override declaration (ADR-0146 D2): { package, basedOn } — this item of "<base>.custom" replaces the base package's same-named item whole. basedOn is recorded and never gates; a base's upgrade plan reads it only as advice. |
Nested Shape: Page.variables[number]
| Property | Type | Required | Description |
|---|---|---|---|
| name | string | ✅ | Variable name. Exposed to expressions as page.<name>. |
| type | Enum<'string' | 'number' | 'boolean' | 'object' | 'array' | 'record_id'> | optional (default: "string") | |
| defaultValue | any | optional | Initial value. Defaults to a type-appropriate empty value when omitted. |
| source | string | optional | Component id that writes this variable (e.g. an element:record_picker whose id matches). |
Nested Shape: Page.record
| Property | Type | Required | Description |
|---|---|---|---|
| object | string | ✅ | Object the page row is read from |
| view | string | optional | Named view to apply |
| filter | ({ field: string; operator: Enum<'equals' | 'not_equals' | 'contains' | 'not_contains' | 'icontains' | …>; value?: string | number | boolean | null | (string | number)[] } | { or: object[] })[] | optional | Filter criteria — the ViewFilterRule array form [{ field, operator, value }, ...], AND-combined with the filter of the named view |
| sort | { field: string; order: Enum<'asc' | 'desc'> }[] | optional | Sort order — the page row is the FIRST row of the bound set under it |
Nested Shape: Page.regions[number]
| Property | Type | Required | Description |
|---|---|---|---|
| name | string | ✅ | Region name — a slot the page's template places: header, sidebar, main, aside or footer on 'default' and 'three-column'; header, sidebar or main on 'header-sidebar-main'; any name on 'dashboard' (header and footer span it, every other region is a grid cell). One region per slot. A name the template does not place, and a second region filling a slot already filled, are refused. |
| width | Enum<'small' | 'medium' | 'large' | 'full'> | optional | Region width. A region named main takes only 'full', which is page-wide: the page drops its max-width cap and fills the screen. 'small', 'medium' and 'large' are refused on main, because a main region is drawn at the width its template leaves it: beside sidebar and aside it takes the space they leave, and on 'dashboard' it is one grid cell. |
| components | { type: Enum<'page:header' | 'page:footer' | 'page:sidebar' | 'page:tabs' | 'page:accordion' | …> | string; id?: string; label?: string | Record<string, string>; properties?: Record<string, any>; … }[] | ✅ | Components in this region |
Nested Shape: Page.interfaceConfig
| Property | Type | Required | Description |
|---|---|---|---|
| source | string | optional | Source object name for the page |
| columns | string[] | { field: string; label?: string | Record<string, string>; width?: number; align?: Enum<'left' | 'center' | 'right'>; … }[] | optional | Columns shown by the page. Blank = all object fields. Defined directly on the page (no view inheritance). |
| sort | { field: string; order: Enum<'asc' | 'desc'> }[] | optional | Default sort order for the page, defined directly on the page. |
| filterBy | ({ field: string; operator: Enum<'equals' | 'not_equals' | 'contains' | 'not_contains' | 'icontains' | …>; value?: string | number | boolean | null | (string | number)[] } | { or: object[] })[] | optional | Always-on page filter (base filter). |
| levels | integer | optional | Number of hierarchy levels to display |
| sourceView | string | optional | @deprecated Legacy named-view inheritance. Define columns/sort/filterBy on the page instead. |
| appearance | { showDescription?: boolean; allowedVisualizations?: Enum<'grid' | 'kanban' | 'gallery' | 'calendar' | 'timeline' | 'gantt' | 'map' | …>[] } | optional | Appearance and visualization configuration |
| userFilters | { element?: Enum<'dropdown' | 'tabs' | 'toggle'>; fields?: object[]; tabs?: object[]; showAllRecords?: boolean; … } | optional | End-user quick-filter bar for this page (overrides the source view's userFilters) |
| userActions | { sort?: boolean; search?: boolean; filter?: boolean; refresh?: boolean; … } | optional | User action toggles |
| addRecord | { enabled: boolean; position?: Enum<'top' | 'bottom' | 'both'> } | optional | Add record entry point configuration |
| buttons | string[] | optional | Toolbar buttons — names of the source object's actions to surface in the page toolbar |
| recordAction | Enum<'drawer' | 'page' | 'none'> | optional | How clicking a record opens its detail (drawer | page | none). Default: drawer |
| showRecordCount | boolean | optional | Show record count at page bottom |
| emptyState | { title?: string | Record<string, string>; message?: string | Record<string, string>; icon?: string; link?: object } | optional | What the page draws in place of rows when its list has none to show: { title, message, icon, link }, the list view's own empty-state shape. The console's list page prefers it, whole, over its source view's empty state; with none declared, the page draws the source view's, if any. |
| allowPrinting | boolean | optional | Allow users to print the page |
Nested Shape: Page.aria
| Property | Type | Required | Description |
|---|---|---|---|
| ariaLabel | string | Record<string, string> | optional | Accessible label for screen readers (WAI-ARIA aria-label). Plain string, or an inline locale map — no translation-bundle slot addresses this key, so a plain string is announced in the source language. |
| ariaDescribedBy | string | optional | ID of element providing additional description (WAI-ARIA aria-describedby) |
| role | string | optional | WAI-ARIA role attribute (e.g., "dialog", "navigation", "alert") |
Nested Shape: Page.print
| Property | Type | Required | Description |
|---|---|---|---|
| paperSize | Enum<'A4' | 'A5' | 'Letter' | 'Legal'> | optional | Paper size — the size keyword of the print CSS @page { size } rule (A4 when omitted). Applied by the console's browser print rendering; the server-side PDF renderer is to follow. |
| orientation | Enum<'portrait' | 'landscape'> | optional | Sheet orientation — the orientation keyword of the @page { size } rule (portrait when omitted). Applied by the console's browser print rendering; the server-side PDF renderer is to follow. |
| margins | { top?: number; right?: number; bottom?: number; left?: number } | optional | Sheet margins in MILLIMETRES, one number per side — the @page { margin } rule; a side left out takes the renderer's default. Applied by the console's browser print rendering; the server-side PDF renderer is to follow. |
| repeatHeader | boolean | optional | Repeat the page's header region (its regions entry named header) at the top of every printed sheet — the running header. The parse refuses it on a page with no header region. Off when omitted: the region prints once, at the top of the first sheet. Applied by the console's browser print rendering. |
| repeatFooter | boolean | optional | Repeat the page's footer region (its regions entry named footer) at the bottom of every printed sheet — the running footer. The parse refuses it on a page with no footer region. Off when omitted: the region prints once, after the body. Applied by the console's browser print rendering. |
| pageNumbers | boolean | optional | Print the sheet number and the sheet count in the bottom margin of every sheet — the @page margin box with counter(page) and counter(pages). Off when omitted. Applied by the console's browser print rendering. |
| repeatTableHeaders | boolean | optional | Page-break hint: repeat a table's column headings at the top of every sheet the table runs onto (thead { display: table-header-group }). On when omitted. Applied by the console's browser print rendering. |
| avoidBreakInside | boolean | optional | Page-break hint: keep each block whole on one sheet when it fits, moving it to the next sheet instead of splitting it (break-inside: avoid on every block). Off when omitted. Applied by the console's browser print rendering. |
Nested Shape: Page.slots
| Property | Type | Required | Description |
|---|---|---|---|
| header | { type: Enum<'page:header' | 'page:footer' | 'page:sidebar' | 'page:tabs' | 'page:accordion' | …> | string; id?: string; label?: string | Record<string, string>; properties?: Record<string, any>; … } | { type: Enum<'page:header' | 'page:footer' | 'page:sidebar' | 'page:tabs' | 'page:accordion' | …> | string; id?: string; label?: string | Record<string, string>; properties?: Record<string, any>; … }[] | optional | |
| actions | { type: Enum<'page:header' | 'page:footer' | 'page:sidebar' | 'page:tabs' | 'page:accordion' | …> | string; id?: string; label?: string | Record<string, string>; properties?: Record<string, any>; … } | { type: Enum<'page:header' | 'page:footer' | 'page:sidebar' | 'page:tabs' | 'page:accordion' | …> | string; id?: string; label?: string | Record<string, string>; properties?: Record<string, any>; … }[] | optional | |
| alerts | { type: Enum<'page:header' | 'page:footer' | 'page:sidebar' | 'page:tabs' | 'page:accordion' | …> | string; id?: string; label?: string | Record<string, string>; properties?: Record<string, any>; … } | { type: Enum<'page:header' | 'page:footer' | 'page:sidebar' | 'page:tabs' | 'page:accordion' | …> | string; id?: string; label?: string | Record<string, string>; properties?: Record<string, any>; … }[] | optional | |
| highlights | { type: Enum<'page:header' | 'page:footer' | 'page:sidebar' | 'page:tabs' | 'page:accordion' | …> | string; id?: string; label?: string | Record<string, string>; properties?: Record<string, any>; … } | { type: Enum<'page:header' | 'page:footer' | 'page:sidebar' | 'page:tabs' | 'page:accordion' | …> | string; id?: string; label?: string | Record<string, string>; properties?: Record<string, any>; … }[] | optional | |
| details | { type: Enum<'page:header' | 'page:footer' | 'page:sidebar' | 'page:tabs' | 'page:accordion' | …> | string; id?: string; label?: string | Record<string, string>; properties?: Record<string, any>; … } | { type: Enum<'page:header' | 'page:footer' | 'page:sidebar' | 'page:tabs' | 'page:accordion' | …> | string; id?: string; label?: string | Record<string, string>; properties?: Record<string, any>; … }[] | optional | |
| tabs | never | optional | [REMOVED] page.slots.tabs was removed in @objectstack/spec 18.3.0 (ADR-0085) — an authored strip replaced the whole synthesized one, so the related lists, approvals, attachments and history the platform composes from the object were dropped unless re-added by hand, and the page stayed tabbed at every width instead of taking the record page's columns. Delete the key. The record page composes its tabs and columns from the object's roles and relationship flags: to change which related lists appear or their order, set relatedList / relatedList: 'primary' on the child's reference field; to replace the Details body, author slots.details; a page that needs its own strip is kind: 'full', drawn as authored on the desktop full record page (a phone and the side preview draw the standard record page, with the composed strip). Run os migrate meta --from 17 to list the mechanical edits for existing sources; --write applies the ones it can prove, and you apply the rest by hand. |
| discussion | { type: Enum<'page:header' | 'page:footer' | 'page:sidebar' | 'page:tabs' | 'page:accordion' | …> | string; id?: string; label?: string | Record<string, string>; properties?: Record<string, any>; … } | { type: Enum<'page:header' | 'page:footer' | 'page:sidebar' | 'page:tabs' | 'page:accordion' | …> | string; id?: string; label?: string | Record<string, string>; properties?: Record<string, any>; … }[] | optional |
Nested Shape: Page.overrides
| Property | Type | Required | Description |
|---|---|---|---|
| package | string | ✅ | The base package id whose same-named item this item replaces whole (e.g. "com.acme.crm"). Only an item of the base's paired "<base>.custom" package declares an override. |
| basedOn | string | ✅ | Recorded, never a gate: the base package's manifest.version this override was taken from (e.g. "3.2.0"), not a history version of the item. Nothing is refused, merged or rebased on it; it tells a person re-basing the override where it started. One reader, as advice: a base's upgrade plan lists an override whose basedOn is not the installed base version as stale, beside each override whose base item the upgrade changes (ADR-0146 D2, as amended). |
PageComponent
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| type | Enum<'page:header' | 'page:footer' | 'page:sidebar' | 'page:tabs' | 'page:accordion' | 'page:card' | 'page:section' | 'record:details' | 'record:highlights' | 'record:related_list' | 'record:activity' | 'record:chatter' | 'record:discussion' | 'record:path' | 'record:alert' | 'record:quick_actions' | 'record:reference_rail' | 'record:history' | 'record:approval_decision' | 'record:approvals' | 'record:attachments' | 'app:launcher' | 'nav:menu' | 'nav:breadcrumb' | 'global:search' | 'global:notifications' | 'ai:suggestion' | 'element:text' | 'element:number' | 'element:image' | 'element:divider' | 'element:button' | 'element:record_picker' | 'element:text_input'> | string | ✅ | Component Type — a standard vocabulary member, or a custom/registered component type in its own namespace (e.g. object-grid, mcp:connect-agent). The spec's own type namespaces are a closed vocabulary at author time: inside them, a type the vocabulary does not declare is refused by os validate / os build / os lint (rule component-type-unknown); a type the vocabulary RETIRED by name (user:profile — shell chrome, not author-placeable; ai:chat_window — no renderer by design, the floating chat overlay is the AI chat entry point; element:filter and element:form — retired whole, no renderer for either ever shipped; record:json — the raw-JSON panel it was declared for was dropped; marketplace:installed-list — the separate Installed Apps view it drew was retired, Setup → Packages filtered to Source = marketplace replaces it) is refused at the parse itself, with the retirement prescription. |
| id | string | optional | Unique instance ID |
| label | string | Record<string, string> | optional | Display label — the default-language string, or an inline locale map ({ en, "zh-CN" }) resolved at render time |
| properties | Record<string, any> | optional (default: {}) | Component props passed to the widget. See component.zod.ts for schemas. |
| events | Record<string, string> | optional | Event handlers map |
| style | Record<string, string> | optional | Inline styles or utility classes |
| className | string | optional | CSS class names |
| responsiveStyles | { large?: Record<string, string | number>; medium?: Record<string, string | number>; small?: Record<string, string | number>; xsmall?: Record<string, string | number> } | optional | Per-breakpoint scoped style maps (ADR-0065) |
| visibleWhen | string | { dialect: Enum<'cel' | 'cron' | 'template'>; source: string; ast?: any; meta?: object } | optional | Visibility predicate (CEL) — component rendered only when TRUE. Contract-bound roots: record, current_user (ADR-0068 aliases user / ctx.user — one object, three spellings), and page state as page.<var>. The shipping renderer additionally mounts features and os.user — renderer behaviour, NOT contract-guaranteed (ADR-0068 rules the user object only). It mounts NO data root on an element that no api data source binds: there a data.* read faults and a faulting predicate withholds the component, so data.total > 0 and data.total == 0 both hide it; the page's row is record — the record a record page opens, or the row an app page's record binding reads (none without one; a block's own dataSource binds no record for its siblings). A count or a plan is a field on that row (a summary roll-up: record.environment_count > 1; record.plan != 'free'), never features.*, which are the deployment's public auth flags, the same for every organisation. data is mounted only on an element whose dataSource is an api data source (provider: 'api'): there, and on every element nested inside it, data is the value the binding selects, and the element's visibleWhen is decided once the read answers. To gate a component on a system capability, write current_user.hasCapability('<name>') with the name the gated action's requiredPermissions declares — it answers from the viewer's systemPermissions, the list the action gate reads, never a proxy such as current_user.can('<object>', 'edit'); a host that binds no capability list makes it fault, and a faulting predicate withholds the component. ADR-0066 D4: visibleWhen hides, requiredPermissions refuses. ⚠️ A page:tabs item visibleWhen is a different evaluator: it binds data to the record ROW. e.g. "page.selectedProjectId != ''" |
| visibility | never | optional | [REMOVED] page.components[].visibility was removed in @objectstack/spec 18 (ADR-0089 D2) — it was the page component's deprecated spelling of the conditional-visibility predicate, which the parse folded into visibleWhen until this release. Use visibleWhen. Rename the key; the value (a CEL predicate) is unchanged. Where a component writes both, visibleWhen is the one that was in effect: delete visibility. |
| dataSource | { object: string; view?: string; filter?: (object | object)[]; sort?: object[]; … } | { provider: 'api'; read: object; path?: string } | optional | Per-element data binding: an object binding { object, view?, filter?, sort?, limit? } that overrides the page object, or an API binding { provider: 'api', read: { url }, path? } that reads one same-origin endpoint |
| responsive | never | optional | [REMOVED] page.components[].responsive was removed in @objectstack/spec 17 (ADR-0049 D2) — no renderer ever read it, so per-breakpoint layout overrides (columns/order/visibility) parsed, validated, and then did nothing. Delete the key. For breakpoint behaviour that IS applied, use the sibling responsiveStyles (ADR-0065) — per-breakpoint CSS maps compiled to id-scoped CSS at render, e.g. responsiveStyles: { xsmall: { display: 'none' } } to hide a component on the narrowest screens. Run os migrate meta --from 17 to list the mechanical edits for existing sources; --write applies the ones it can prove, and you apply the rest by hand. |
| aria | { ariaLabel?: string | Record<string, string>; ariaDescribedBy?: string; role?: string } | optional | ARIA accessibility attributes |
Nested Shape: PageComponent.responsiveStyles
| Property | Type | Required | Description |
|---|---|---|---|
| large | Record<string, string | number> | optional | Unconditional base (desktop-first) |
| medium | Record<string, string | number> | optional | Applied at ≤ medium breakpoint |
| small | Record<string, string | number> | optional | Applied at ≤ small breakpoint |
| xsmall | Record<string, string | number> | optional | Applied at ≤ xsmall breakpoint |
Nested Shape: PageComponent.dataSource[option 1]
| Property | Type | Required | Description |
|---|---|---|---|
| object | string | ✅ | Object to query |
| view | string | optional | Named view to apply |
| filter | ({ field: string; operator: Enum<'equals' | 'not_equals' | 'contains' | 'not_contains' | 'icontains' | …>; value?: string | number | boolean | null | (string | number)[] } | { or: object[] })[] | optional | Additional filter criteria — the ViewFilterRule array form [{ field, operator, value }, ...], the one filter orthography every filter door in ComponentPropsMap shares; AND-combined with the filter of the named view. The MongoDB-style record form is refused — see migration element-data-source-and-object-block-filter-rule-array |
| sort | { field: string; order: Enum<'asc' | 'desc'> }[] | optional | Sort order |
| limit | integer | optional | Max records to display |
Nested Shape: PageComponent.dataSource[option 2]
API binding of a page element: { provider: 'api', read: { url }, path? } reads one same-origin endpoint with the console's signed-in fetch and binds the selected value, which the element reads as data in its expression holes and its visibleWhen. The console renders it on every page element: the value is data on that element and on every element nested inside it, the element's visibleWhen is decided once the read answers, and while the read is in flight, or when the binding is refused or the read fails, the element draws a loading or error panel instead. The console's generic stat, usage-bar and checklist blocks are built to take it.
| Property | Type | Required | Description |
|---|---|---|---|
| provider | 'api' | ✅ | Binds one same-origin API endpoint — the discriminator of an api data source |
| read | { url: string; method?: 'GET' } | ✅ | The read request — the same-origin endpoint the binding reads |
| path | string | optional | Dotted path selecting the sub-tree of the response the binding takes, e.g. data.environments in a { success, data } envelope; omitted, the binding takes the whole response |
Nested Shape: PageComponent.aria
| Property | Type | Required | Description |
|---|---|---|---|
| ariaLabel | string | Record<string, string> | optional | Accessible label for screen readers (WAI-ARIA aria-label). Plain string, or an inline locale map — no translation-bundle slot addresses this key, so a plain string is announced in the source language. |
| ariaDescribedBy | string | optional | ID of element providing additional description (WAI-ARIA aria-describedby) |
| role | string | optional | WAI-ARIA role attribute (e.g., "dialog", "navigation", "alert") |
PageComponentType
Allowed Values
page:headerpage:footerpage:sidebarpage:tabspage:accordionpage:cardpage:sectionrecord:detailsrecord:highlightsrecord:related_listrecord:activityrecord:chatterrecord:discussionrecord:pathrecord:alertrecord:quick_actionsrecord:reference_railrecord:historyrecord:approval_decisionrecord:approvalsrecord:attachmentsapp:launchernav:menunav:breadcrumbglobal:searchglobal:notificationsai:suggestionelement:textelement:numberelement:imageelement:dividerelement:buttonelement:record_pickerelement:text_input
PagePrint
Print declaration: paper size, orientation, margins, the running header and footer, page numbering and page-break hints. Its presence makes the page a print page, whose blocks must come from the printable block subset.
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| paperSize | Enum<'A4' | 'A5' | 'Letter' | 'Legal'> | optional | Paper size — the size keyword of the print CSS @page { size } rule (A4 when omitted). Applied by the console's browser print rendering; the server-side PDF renderer is to follow. |
| orientation | Enum<'portrait' | 'landscape'> | optional | Sheet orientation — the orientation keyword of the @page { size } rule (portrait when omitted). Applied by the console's browser print rendering; the server-side PDF renderer is to follow. |
| margins | { top?: number; right?: number; bottom?: number; left?: number } | optional | Sheet margins in MILLIMETRES, one number per side — the @page { margin } rule; a side left out takes the renderer's default. Applied by the console's browser print rendering; the server-side PDF renderer is to follow. |
| repeatHeader | boolean | optional | Repeat the page's header region (its regions entry named header) at the top of every printed sheet — the running header. The parse refuses it on a page with no header region. Off when omitted: the region prints once, at the top of the first sheet. Applied by the console's browser print rendering. |
| repeatFooter | boolean | optional | Repeat the page's footer region (its regions entry named footer) at the bottom of every printed sheet — the running footer. The parse refuses it on a page with no footer region. Off when omitted: the region prints once, after the body. Applied by the console's browser print rendering. |
| pageNumbers | boolean | optional | Print the sheet number and the sheet count in the bottom margin of every sheet — the @page margin box with counter(page) and counter(pages). Off when omitted. Applied by the console's browser print rendering. |
| repeatTableHeaders | boolean | optional | Page-break hint: repeat a table's column headings at the top of every sheet the table runs onto (thead { display: table-header-group }). On when omitted. Applied by the console's browser print rendering. |
| avoidBreakInside | boolean | optional | Page-break hint: keep each block whole on one sheet when it fits, moving it to the next sheet instead of splitting it (break-inside: avoid on every block). Off when omitted. Applied by the console's browser print rendering. |
Nested Shape: PagePrint.margins
| Property | Type | Required | Description |
|---|---|---|---|
| top | number | optional | Top margin, in millimetres |
| right | number | optional | Right margin, in millimetres |
| bottom | number | optional | Bottom margin, in millimetres |
| left | number | optional | Left margin, in millimetres |
PageRecordBinding
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| object | string | ✅ | Object the page row is read from |
| view | string | optional | Named view to apply |
| filter | ({ field: string; operator: Enum<'equals' | 'not_equals' | 'contains' | 'not_contains' | 'icontains' | …>; value?: string | number | boolean | null | (string | number)[] } | { or: object[] })[] | optional | Filter criteria — the ViewFilterRule array form [{ field, operator, value }, ...], AND-combined with the filter of the named view |
| sort | { field: string; order: Enum<'asc' | 'desc'> }[] | optional | Sort order — the page row is the FIRST row of the bound set under it |
Nested Shape: PageRecordBinding.filter[number][option 1]
View filter rule
| Property | Type | Required | Description |
|---|---|---|---|
| field | string | ✅ | Field name to filter on |
| operator | Enum<'equals' | 'not_equals' | 'contains' | 'not_contains' | 'icontains' | …> | ✅ | Filter operator |
| value | string | number | boolean | null | (string | number)[] | optional | Filter value. The accepted SHAPE depends on the operator: in / not_in take an array (any length, including []), between takes exactly [min, max], every other operator takes a scalar. The unary operators (is_empty / is_not_empty / is_null / is_not_null) take their direction from the operator name and ignore this key. One operator bounds the VALUE as well as the shape: icontains takes a NON-EMPTY STRING, the comparand the Filter Protocol conformance table declares for it — an empty comparand constrains nothing and a non-string one would answer a query nobody wrote, and both are refused at the query path too. |
Nested Shape: PageRecordBinding.filter[number][option 2]
An any-of group: { or: [rule, ...] } matches a record when ANY of its rules matches. It sits in the filter list beside plain rules, and the list still ANDs every element, so [{ or: [{ field: "status", operator: "equals", value: "open" }, { field: "completed_at", operator: "after", value: "{7_days_ago}" }] }] selects the open records and the ones completed in the last 7 days. One level only: its members are flat rules. The console applies it, ANDed with its sibling elements, and its filter builder edits a filter that is exactly one group.
| Property | Type | Required | Description |
|---|---|---|---|
| or | { field: string; operator: Enum<'equals' | 'not_equals' | 'contains' | 'not_contains' | 'icontains' | …>; value?: string | number | boolean | null | (string | number)[] }[] | ✅ | The rules of which ANY may match: a non-empty array of flat filter rules { field, operator, value }, each judged exactly as a rule at the top level of the filter. A group cannot hold a group. |
Nested Shape: PageRecordBinding.sort[number]
Sort field and direction pair
| Property | Type | Required | Description |
|---|---|---|---|
| field | string | ✅ | Field name to sort by |
| order | Enum<'asc' | 'desc'> | ✅ | Sort direction |
PageRegion
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| name | string | ✅ | Region name — a slot the page's template places: header, sidebar, main, aside or footer on 'default' and 'three-column'; header, sidebar or main on 'header-sidebar-main'; any name on 'dashboard' (header and footer span it, every other region is a grid cell). One region per slot. A name the template does not place, and a second region filling a slot already filled, are refused. |
| width | Enum<'small' | 'medium' | 'large' | 'full'> | optional | Region width. A region named main takes only 'full', which is page-wide: the page drops its max-width cap and fills the screen. 'small', 'medium' and 'large' are refused on main, because a main region is drawn at the width its template leaves it: beside sidebar and aside it takes the space they leave, and on 'dashboard' it is one grid cell. |
| components | { type: Enum<'page:header' | 'page:footer' | 'page:sidebar' | 'page:tabs' | 'page:accordion' | …> | string; id?: string; label?: string | Record<string, string>; properties?: Record<string, any>; … }[] | ✅ | Components in this region |
Nested Shape: PageRegion.components[number]
| Property | Type | Required | Description |
|---|---|---|---|
| type | Enum<'page:header' | 'page:footer' | 'page:sidebar' | 'page:tabs' | 'page:accordion' | …> | string | ✅ | Component Type — a standard vocabulary member, or a custom/registered component type in its own namespace (e.g. object-grid, mcp:connect-agent). The spec's own type namespaces are a closed vocabulary at author time: inside them, a type the vocabulary does not declare is refused by os validate / os build / os lint (rule component-type-unknown); a type the vocabulary RETIRED by name (user:profile — shell chrome, not author-placeable; ai:chat_window — no renderer by design, the floating chat overlay is the AI chat entry point; element:filter and element:form — retired whole, no renderer for either ever shipped; record:json — the raw-JSON panel it was declared for was dropped; marketplace:installed-list — the separate Installed Apps view it drew was retired, Setup → Packages filtered to Source = marketplace replaces it) is refused at the parse itself, with the retirement prescription. |
| id | string | optional | Unique instance ID |
| label | string | Record<string, string> | optional | Display label — the default-language string, or an inline locale map ({ en, "zh-CN" }) resolved at render time |
| properties | Record<string, any> | optional (default: {}) | Component props passed to the widget. See component.zod.ts for schemas. |
| events | Record<string, string> | optional | Event handlers map |
| style | Record<string, string> | optional | Inline styles or utility classes |
| className | string | optional | CSS class names |
| responsiveStyles | { large?: Record<string, string | number>; medium?: Record<string, string | number>; small?: Record<string, string | number>; xsmall?: Record<string, string | number> } | optional | Per-breakpoint scoped style maps (ADR-0065) |
| visibleWhen | string | { dialect: Enum<'cel' | 'cron' | 'template'>; source: string; ast?: any; meta?: object } | optional | Visibility predicate (CEL) — component rendered only when TRUE. Contract-bound roots: record, current_user (ADR-0068 aliases user / ctx.user — one object, three spellings), and page state as page.<var>. The shipping renderer additionally mounts features and os.user — renderer behaviour, NOT contract-guaranteed (ADR-0068 rules the user object only). It mounts NO data root on an element that no api data source binds: there a data.* read faults and a faulting predicate withholds the component, so data.total > 0 and data.total == 0 both hide it; the page's row is record — the record a record page opens, or the row an app page's record binding reads (none without one; a block's own dataSource binds no record for its siblings). A count or a plan is a field on that row (a summary roll-up: record.environment_count > 1; record.plan != 'free'), never features.*, which are the deployment's public auth flags, the same for every organisation. data is mounted only on an element whose dataSource is an api data source (provider: 'api'): there, and on every element nested inside it, data is the value the binding selects, and the element's visibleWhen is decided once the read answers. To gate a component on a system capability, write current_user.hasCapability('<name>') with the name the gated action's requiredPermissions declares — it answers from the viewer's systemPermissions, the list the action gate reads, never a proxy such as current_user.can('<object>', 'edit'); a host that binds no capability list makes it fault, and a faulting predicate withholds the component. ADR-0066 D4: visibleWhen hides, requiredPermissions refuses. ⚠️ A page:tabs item visibleWhen is a different evaluator: it binds data to the record ROW. e.g. "page.selectedProjectId != ''" |
| visibility | never | optional | [REMOVED] page.components[].visibility was removed in @objectstack/spec 18 (ADR-0089 D2) — it was the page component's deprecated spelling of the conditional-visibility predicate, which the parse folded into visibleWhen until this release. Use visibleWhen. Rename the key; the value (a CEL predicate) is unchanged. Where a component writes both, visibleWhen is the one that was in effect: delete visibility. |
| dataSource | { object: string; view?: string; filter?: (object | object)[]; sort?: object[]; … } | { provider: 'api'; read: object; path?: string } | optional | Per-element data binding: an object binding { object, view?, filter?, sort?, limit? } that overrides the page object, or an API binding { provider: 'api', read: { url }, path? } that reads one same-origin endpoint |
| responsive | never | optional | [REMOVED] page.components[].responsive was removed in @objectstack/spec 17 (ADR-0049 D2) — no renderer ever read it, so per-breakpoint layout overrides (columns/order/visibility) parsed, validated, and then did nothing. Delete the key. For breakpoint behaviour that IS applied, use the sibling responsiveStyles (ADR-0065) — per-breakpoint CSS maps compiled to id-scoped CSS at render, e.g. responsiveStyles: { xsmall: { display: 'none' } } to hide a component on the narrowest screens. Run os migrate meta --from 17 to list the mechanical edits for existing sources; --write applies the ones it can prove, and you apply the rest by hand. |
| aria | { ariaLabel?: string | Record<string, string>; ariaDescribedBy?: string; role?: string } | optional | ARIA accessibility attributes |
PageTemplate
Page layout template — one the console registers: 'default' (header, sidebar, main, aside, footer), 'header-sidebar-main' (header, sidebar, main), 'three-column' (header, sidebar, main, aside, footer) or 'dashboard' (header, footer, and every other region a grid cell).
Allowed Values
defaultheader-sidebar-mainthree-columndashboard
PageType
Page type — the page KIND. Only types with a dedicated renderer are authorizable; visualizations of a list page live in interfaceConfig, not here.
Allowed Values
recordhomeapputilitylist
PageVariable
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| name | string | ✅ | Variable name. Exposed to expressions as page.<name>. |
| type | Enum<'string' | 'number' | 'boolean' | 'object' | 'array' | 'record_id'> | optional (default: "string") | |
| defaultValue | any | optional | Initial value. Defaults to a type-appropriate empty value when omitted. |
| source | string | optional | Component id that writes this variable (e.g. an element:record_picker whose id matches). |