ObjectStackObjectStack

App

App protocol schemas

Base Navigation Item Schema

Shared properties for all navigation types.

NAMING CONVENTION:

Navigation item IDs are used in URLs and configuration and must be lowercase snake_case.

@example Good IDs

  • 'menu_accounts'

  • 'page_dashboard'

  • 'nav_settings'

@example Bad IDs (will be rejected)

  • 'MenuAccounts' (PascalCase)

  • 'Page Dashboard' (spaces)

Source: packages/spec/src/ui/app.zod.ts

TypeScript Usage

import { ActionNavItem, App, AppBranding, DashboardNavItem, GroupNavItem, NavigationArea, NavigationItem, ObjectNavItem, PageNavItem, ReportNavItem, UrlNavItem } from '@objectstack/spec/ui';
import type { ActionNavItem, App, AppBranding, DashboardNavItem, GroupNavItem, NavigationArea, NavigationItem, ObjectNavItem, PageNavItem, ReportNavItem, UrlNavItem } from '@objectstack/spec/ui';

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

ActionNavItem

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstring | ObjectDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestringoptionalVisibility formula condition
requiredPermissionsstring[]optionalPermissions required to access this item
typestring
actionDefObjectAction definition to execute when clicked

App

Properties

PropertyTypeRequiredDescription
namestringApp unique machine name (lowercase snake_case)
labelstring | ObjectApp display label
versionstringoptionalApp version
descriptionstring | ObjectoptionalApp description
iconstringoptionalApp icon used in the App Launcher
brandingObjectoptionalApp-specific branding
activebooleanWhether the app is enabled
isDefaultbooleanIs default app
navigation[__schema0](./__schema0)[]optionalFull navigation tree for the app sidebar
areasObject[]optionalNavigation areas for partitioning navigation by business domain
homePageIdstringoptionalID of the navigation item to serve as landing page
requiredPermissionsstring[]optionalPermissions required to access this app
objectsany[]optionalObjects belonging to this app
apisany[]optionalCustom APIs belonging to this app
sharingObjectoptionalPublic sharing configuration
embedObjectoptionalIframe embedding configuration
mobileNavigationObjectoptionalMobile-specific navigation configuration
ariaObjectoptionalARIA accessibility attributes for the application

AppBranding

Properties

PropertyTypeRequiredDescription
primaryColorstringoptionalPrimary theme color hex code
logostringoptionalCustom logo URL for this app
faviconstringoptionalCustom favicon URL for this app

DashboardNavItem

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstring | ObjectDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestringoptionalVisibility formula condition
requiredPermissionsstring[]optionalPermissions required to access this item
typestring
dashboardNamestringTarget dashboard name

GroupNavItem

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstring | ObjectDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestringoptionalVisibility formula condition
requiredPermissionsstring[]optionalPermissions required to access this item
typestring
expandedbooleanDefault expansion state in sidebar

Properties

PropertyTypeRequiredDescription
idstringUnique area identifier (lowercase snake_case)
labelstring | ObjectArea display label
iconstringoptionalArea icon name
ordernumberoptionalSort order among areas (lower = first)
descriptionstring | ObjectoptionalArea description
visiblestringoptionalVisibility formula condition for this area
requiredPermissionsstring[]optionalPermissions required to access this area
navigation[__schema0](./__schema0)[]Navigation items within this area

Union Options

This schema accepts one of the following structures:

Option 1

Type: object

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstring | ObjectDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestringoptionalVisibility formula condition
requiredPermissionsstring[]optionalPermissions required to access this item
typestring
objectNamestringTarget object name
viewNamestringoptionalDefault list view to open. Defaults to "all"
children[#](./#)[]optionalChild navigation items (e.g. specific views)

Option 2

Type: dashboard

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstring | ObjectDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestringoptionalVisibility formula condition
requiredPermissionsstring[]optionalPermissions required to access this item
typestring
dashboardNamestringTarget dashboard name

Option 3

Type: page

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstring | ObjectDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestringoptionalVisibility formula condition
requiredPermissionsstring[]optionalPermissions required to access this item
typestring
pageNamestringTarget custom page component name
paramsRecord<string, any>optionalParameters passed to the page context

Option 4

Type: url

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstring | ObjectDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestringoptionalVisibility formula condition
requiredPermissionsstring[]optionalPermissions required to access this item
typestring
urlstringTarget external URL
targetEnum<'_self' | '_blank'>Link target window

Option 5

Type: report

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstring | ObjectDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestringoptionalVisibility formula condition
requiredPermissionsstring[]optionalPermissions required to access this item
typestring
reportNamestringTarget report name

Option 6

Type: action

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstring | ObjectDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestringoptionalVisibility formula condition
requiredPermissionsstring[]optionalPermissions required to access this item
typestring
actionDefObjectAction definition to execute when clicked

Option 7

Type: group

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstring | ObjectDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestringoptionalVisibility formula condition
requiredPermissionsstring[]optionalPermissions required to access this item
typestring
expandedbooleanDefault expansion state in sidebar
children[#](./#)[]Child navigation items


ObjectNavItem

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstring | ObjectDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestringoptionalVisibility formula condition
requiredPermissionsstring[]optionalPermissions required to access this item
typestring
objectNamestringTarget object name
viewNamestringoptionalDefault list view to open. Defaults to "all"

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstring | ObjectDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestringoptionalVisibility formula condition
requiredPermissionsstring[]optionalPermissions required to access this item
typestring
pageNamestringTarget custom page component name
paramsRecord<string, any>optionalParameters passed to the page context

ReportNavItem

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstring | ObjectDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestringoptionalVisibility formula condition
requiredPermissionsstring[]optionalPermissions required to access this item
typestring
reportNamestringTarget report name

UrlNavItem

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstring | ObjectDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestringoptionalVisibility formula condition
requiredPermissionsstring[]optionalPermissions required to access this item
typestring
urlstringTarget external URL
targetEnum<'_self' | '_blank'>Link target window

On this page