| title | App |
|---|---|
| description | 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)
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);| Property | Type | Required | Description |
|---|---|---|---|
| id | string |
✅ | Unique identifier for this navigation item (lowercase snake_case) |
| label | string |
✅ | Display proper label |
| icon | string |
optional | Icon name |
| order | number |
optional | Sort order within the same level (lower = first) |
| badge | string | number |
optional | Badge text or count displayed on the item |
| visible | string |
optional | Visibility formula condition |
| requiredPermissions | string[] |
optional | Permissions required to access this item |
| type | string |
✅ | |
| actionDef | Object |
✅ | Action definition to execute when clicked |
| Property | Type | Required | Description |
|---|---|---|---|
| name | string |
✅ | App unique machine name (lowercase snake_case) |
| label | string |
✅ | App display label |
| version | string |
optional | App version |
| description | string |
optional | App description |
| icon | string |
optional | App icon used in the App Launcher |
| branding | Object |
optional | App-specific branding |
| active | boolean |
✅ | Whether the app is enabled |
| isDefault | boolean |
✅ | Is default app |
| navigation | [__schema0](./__schema0)[] |
optional | Full navigation tree for the app sidebar |
| areas | Object[] |
optional | Navigation areas for partitioning navigation by business domain |
| homePageId | string |
optional | ID of the navigation item to serve as landing page |
| requiredPermissions | string[] |
optional | Permissions required to access this app |
| objects | any[] |
optional | Objects belonging to this app |
| apis | any[] |
optional | Custom APIs belonging to this app |
| sharing | Object |
optional | Public sharing configuration |
| embed | Object |
optional | Iframe embedding configuration |
| mobileNavigation | Object |
optional | Mobile-specific navigation configuration |
| aria | Object |
optional | ARIA accessibility attributes for the application |
| Property | Type | Required | Description |
|---|---|---|---|
| primaryColor | string |
optional | Primary theme color hex code |
| logo | string |
optional | Custom logo URL for this app |
| favicon | string |
optional | Custom favicon URL for this app |
| Property | Type | Required | Description |
|---|---|---|---|
| id | string |
✅ | Unique identifier for this navigation item (lowercase snake_case) |
| label | string |
✅ | Display proper label |
| icon | string |
optional | Icon name |
| order | number |
optional | Sort order within the same level (lower = first) |
| badge | string | number |
optional | Badge text or count displayed on the item |
| visible | string |
optional | Visibility formula condition |
| requiredPermissions | string[] |
optional | Permissions required to access this item |
| type | string |
✅ | |
| dashboardName | string |
✅ | Target dashboard name |
| Property | Type | Required | Description |
|---|---|---|---|
| id | string |
✅ | Unique identifier for this navigation item (lowercase snake_case) |
| label | string |
✅ | Display proper label |
| icon | string |
optional | Icon name |
| order | number |
optional | Sort order within the same level (lower = first) |
| badge | string | number |
optional | Badge text or count displayed on the item |
| visible | string |
optional | Visibility formula condition |
| requiredPermissions | string[] |
optional | Permissions required to access this item |
| type | string |
✅ | |
| expanded | boolean |
✅ | Default expansion state in sidebar |
| Property | Type | Required | Description |
|---|---|---|---|
| id | string |
✅ | Unique area identifier (lowercase snake_case) |
| label | string |
✅ | Area display label |
| icon | string |
optional | Area icon name |
| order | number |
optional | Sort order among areas (lower = first) |
| description | string |
optional | Area description |
| visible | string |
optional | Visibility formula condition for this area |
| requiredPermissions | string[] |
optional | Permissions required to access this area |
| navigation | [__schema0](./__schema0)[] |
✅ | Navigation items within this area |
This schema accepts one of the following structures:
Type: object
| Property | Type | Required | Description |
|---|---|---|---|
| id | string |
✅ | Unique identifier for this navigation item (lowercase snake_case) |
| label | string |
✅ | Display proper label |
| icon | string |
optional | Icon name |
| order | number |
optional | Sort order within the same level (lower = first) |
| badge | string | number |
optional | Badge text or count displayed on the item |
| visible | string |
optional | Visibility formula condition |
| requiredPermissions | string[] |
optional | Permissions required to access this item |
| type | string |
✅ | |
| objectName | string |
✅ | Target object name |
| viewName | string |
optional | Default list view to open. Defaults to "all" |
| children | [#](./#)[] |
optional | Child navigation items (e.g. specific views) |
Type: dashboard
| Property | Type | Required | Description |
|---|---|---|---|
| id | string |
✅ | Unique identifier for this navigation item (lowercase snake_case) |
| label | string |
✅ | Display proper label |
| icon | string |
optional | Icon name |
| order | number |
optional | Sort order within the same level (lower = first) |
| badge | string | number |
optional | Badge text or count displayed on the item |
| visible | string |
optional | Visibility formula condition |
| requiredPermissions | string[] |
optional | Permissions required to access this item |
| type | string |
✅ | |
| dashboardName | string |
✅ | Target dashboard name |
Type: page
| Property | Type | Required | Description |
|---|---|---|---|
| id | string |
✅ | Unique identifier for this navigation item (lowercase snake_case) |
| label | string |
✅ | Display proper label |
| icon | string |
optional | Icon name |
| order | number |
optional | Sort order within the same level (lower = first) |
| badge | string | number |
optional | Badge text or count displayed on the item |
| visible | string |
optional | Visibility formula condition |
| requiredPermissions | string[] |
optional | Permissions required to access this item |
| type | string |
✅ | |
| pageName | string |
✅ | Target custom page component name |
| params | Record<string, any> |
optional | Parameters passed to the page context |
Type: url
| Property | Type | Required | Description |
|---|---|---|---|
| id | string |
✅ | Unique identifier for this navigation item (lowercase snake_case) |
| label | string |
✅ | Display proper label |
| icon | string |
optional | Icon name |
| order | number |
optional | Sort order within the same level (lower = first) |
| badge | string | number |
optional | Badge text or count displayed on the item |
| visible | string |
optional | Visibility formula condition |
| requiredPermissions | string[] |
optional | Permissions required to access this item |
| type | string |
✅ | |
| url | string |
✅ | Target external URL |
| target | Enum<'_self' | '_blank'> |
✅ | Link target window |
Type: report
| Property | Type | Required | Description |
|---|---|---|---|
| id | string |
✅ | Unique identifier for this navigation item (lowercase snake_case) |
| label | string |
✅ | Display proper label |
| icon | string |
optional | Icon name |
| order | number |
optional | Sort order within the same level (lower = first) |
| badge | string | number |
optional | Badge text or count displayed on the item |
| visible | string |
optional | Visibility formula condition |
| requiredPermissions | string[] |
optional | Permissions required to access this item |
| type | string |
✅ | |
| reportName | string |
✅ | Target report name |
Type: action
| Property | Type | Required | Description |
|---|---|---|---|
| id | string |
✅ | Unique identifier for this navigation item (lowercase snake_case) |
| label | string |
✅ | Display proper label |
| icon | string |
optional | Icon name |
| order | number |
optional | Sort order within the same level (lower = first) |
| badge | string | number |
optional | Badge text or count displayed on the item |
| visible | string |
optional | Visibility formula condition |
| requiredPermissions | string[] |
optional | Permissions required to access this item |
| type | string |
✅ | |
| actionDef | Object |
✅ | Action definition to execute when clicked |
Type: group
| Property | Type | Required | Description |
|---|---|---|---|
| id | string |
✅ | Unique identifier for this navigation item (lowercase snake_case) |
| label | string |
✅ | Display proper label |
| icon | string |
optional | Icon name |
| order | number |
optional | Sort order within the same level (lower = first) |
| badge | string | number |
optional | Badge text or count displayed on the item |
| visible | string |
optional | Visibility formula condition |
| requiredPermissions | string[] |
optional | Permissions required to access this item |
| type | string |
✅ | |
| expanded | boolean |
✅ | Default expansion state in sidebar |
| children | [#](./#)[] |
✅ | Child navigation items |
| Property | Type | Required | Description |
|---|---|---|---|
| id | string |
✅ | Unique identifier for this navigation item (lowercase snake_case) |
| label | string |
✅ | Display proper label |
| icon | string |
optional | Icon name |
| order | number |
optional | Sort order within the same level (lower = first) |
| badge | string | number |
optional | Badge text or count displayed on the item |
| visible | string |
optional | Visibility formula condition |
| requiredPermissions | string[] |
optional | Permissions required to access this item |
| type | string |
✅ | |
| objectName | string |
✅ | Target object name |
| viewName | string |
optional | Default list view to open. Defaults to "all" |
| Property | Type | Required | Description |
|---|---|---|---|
| id | string |
✅ | Unique identifier for this navigation item (lowercase snake_case) |
| label | string |
✅ | Display proper label |
| icon | string |
optional | Icon name |
| order | number |
optional | Sort order within the same level (lower = first) |
| badge | string | number |
optional | Badge text or count displayed on the item |
| visible | string |
optional | Visibility formula condition |
| requiredPermissions | string[] |
optional | Permissions required to access this item |
| type | string |
✅ | |
| pageName | string |
✅ | Target custom page component name |
| params | Record<string, any> |
optional | Parameters passed to the page context |
| Property | Type | Required | Description |
|---|---|---|---|
| id | string |
✅ | Unique identifier for this navigation item (lowercase snake_case) |
| label | string |
✅ | Display proper label |
| icon | string |
optional | Icon name |
| order | number |
optional | Sort order within the same level (lower = first) |
| badge | string | number |
optional | Badge text or count displayed on the item |
| visible | string |
optional | Visibility formula condition |
| requiredPermissions | string[] |
optional | Permissions required to access this item |
| type | string |
✅ | |
| reportName | string |
✅ | Target report name |
| Property | Type | Required | Description |
|---|---|---|---|
| id | string |
✅ | Unique identifier for this navigation item (lowercase snake_case) |
| label | string |
✅ | Display proper label |
| icon | string |
optional | Icon name |
| order | number |
optional | Sort order within the same level (lower = first) |
| badge | string | number |
optional | Badge text or count displayed on the item |
| visible | string |
optional | Visibility formula condition |
| requiredPermissions | string[] |
optional | Permissions required to access this item |
| type | string |
✅ | |
| url | string |
✅ | Target external URL |
| target | Enum<'_self' | '_blank'> |
✅ | Link target window |