Skip to content

Commit 13167f5

Browse files
committed
feat(validation): update validation protocol title and description
feat(system): add metadata persistence card to system index feat(system): include metadata persistence in system meta.json feat(ui): add children property to app protocol schemas feat(ui): enhance view protocol with navigation properties feat(ui): extend app definition response schema with children property feat(ui): add navigation properties to GetUiViewResponse schema feat(ui): include navigation properties in ListColumn and ListView schemas feat(ui): add navigation configuration to NavigationItem and View schemas feat(system): introduce MetadataRecord, MetadataScope, MetadataState, and ServiceCriticality schemas feat(ui): add NavigationConfig and NavigationMode schemas
1 parent ac73d34 commit 13167f5

18 files changed

Lines changed: 499 additions & 3 deletions

content/docs/references/data/validation.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
---
2-
title: Validation Protocol
2+
title: Validation
33
description: Validation protocol schemas
44
---
55

6+
# ObjectStack Validation Protocol
7+
68
This module defines the validation schema protocol for ObjectStack, providing a comprehensive
79

810
type-safe validation system similar to Salesforce's validation rules but with enhanced capabilities.

content/docs/references/system/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ This section contains all protocol schemas for the system layer of ObjectStack.
1818
<Card href="/docs/references/system/logging" title="Logging" description="Source: packages/spec/src/system/logging.zod.ts" />
1919
<Card href="/docs/references/system/masking" title="Masking" description="Source: packages/spec/src/system/masking.zod.ts" />
2020
<Card href="/docs/references/system/message-queue" title="Message Queue" description="Source: packages/spec/src/system/message-queue.zod.ts" />
21+
<Card href="/docs/references/system/metadata-persistence" title="Metadata Persistence" description="Source: packages/spec/src/system/metadata-persistence.zod.ts" />
2122
<Card href="/docs/references/system/metrics" title="Metrics" description="Source: packages/spec/src/system/metrics.zod.ts" />
2223
<Card href="/docs/references/system/migration" title="Migration" description="Source: packages/spec/src/system/migration.zod.ts" />
2324
<Card href="/docs/references/system/notification" title="Notification" description="Source: packages/spec/src/system/notification.zod.ts" />

content/docs/references/system/meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"logging",
1414
"masking",
1515
"message-queue",
16+
"metadata-persistence",
1617
"metrics",
1718
"migration",
1819
"notification",

content/docs/references/ui/app.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ This schema accepts one of the following structures:
130130
| **type** | `string` || |
131131
| **objectName** | `string` || Target object name |
132132
| **viewName** | `string` | optional | Default list view to open. Defaults to "all" |
133+
| **children** | `any[]` | optional | Child navigation items (e.g. specific views) |
133134

134135
---
135136

content/docs/references/ui/view.mdx

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ HTTP Method Enum
1212
## TypeScript Usage
1313

1414
```typescript
15-
import { CalendarConfig, FormField, FormSection, FormView, GanttConfig, HttpMethod, HttpRequest, KanbanConfig, ListColumn, ListView, PaginationConfig, SelectionConfig, View, ViewData } from '@objectstack/spec/ui';
16-
import type { CalendarConfig, FormField, FormSection, FormView, GanttConfig, HttpMethod, HttpRequest, KanbanConfig, ListColumn, ListView, PaginationConfig, SelectionConfig, View, ViewData } from '@objectstack/spec/ui';
15+
import { CalendarConfig, FormField, FormSection, FormView, GanttConfig, HttpMethod, HttpRequest, KanbanConfig, ListColumn, ListView, NavigationConfig, NavigationMode, PaginationConfig, SelectionConfig, View, ViewData } from '@objectstack/spec/ui';
16+
import type { CalendarConfig, FormField, FormSection, FormView, GanttConfig, HttpMethod, HttpRequest, KanbanConfig, ListColumn, ListView, NavigationConfig, NavigationMode, PaginationConfig, SelectionConfig, View, ViewData } from '@objectstack/spec/ui';
1717

1818
// Validate data
1919
const result = CalendarConfig.parse(data);
@@ -156,6 +156,8 @@ const result = CalendarConfig.parse(data);
156156
| **resizable** | `boolean` | optional | Allow resizing this column |
157157
| **wrap** | `boolean` | optional | Allow text wrapping |
158158
| **type** | `string` | optional | Renderer type override (e.g., "currency", "date") |
159+
| **link** | `boolean` | optional | Functions as the primary navigation link (triggers View navigation) |
160+
| **action** | `string` | optional | Registered Action ID to execute when clicked |
159161

160162

161163
---
@@ -178,12 +180,43 @@ const result = CalendarConfig.parse(data);
178180
| **striped** | `boolean` | optional | Striped row styling |
179181
| **bordered** | `boolean` | optional | Show borders |
180182
| **selection** | `Object` | optional | Row selection configuration |
183+
| **navigation** | `Object` | optional | Configuration for item click navigation (page, drawer, modal, etc.) |
181184
| **pagination** | `Object` | optional | Pagination configuration |
182185
| **kanban** | `Object` | optional | |
183186
| **calendar** | `Object` | optional | |
184187
| **gantt** | `Object` | optional | |
185188

186189

190+
---
191+
192+
## NavigationConfig
193+
194+
### Properties
195+
196+
| Property | Type | Required | Description |
197+
| :--- | :--- | :--- | :--- |
198+
| **mode** | `Enum<'page' \| 'drawer' \| 'modal' \| 'split' \| 'popover' \| 'new_window' \| 'none'>` | optional | |
199+
| **view** | `string` | optional | Name of the form view to use for details (e.g. "summary_view", "edit_form") |
200+
| **preventNavigation** | `boolean` | optional | Disable standard navigation entirely |
201+
| **openNewTab** | `boolean` | optional | Force open in new tab (applies to page mode) |
202+
| **width** | `string \| number` | optional | Width of the drawer/modal (e.g. "600px", "50%") |
203+
204+
205+
---
206+
207+
## NavigationMode
208+
209+
### Allowed Values
210+
211+
* `page`
212+
* `drawer`
213+
* `modal`
214+
* `split`
215+
* `popover`
216+
* `new_window`
217+
* `none`
218+
219+
187220
---
188221

189222
## PaginationConfig

packages/spec/json-schema/api/AppDefinitionResponse.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,11 @@
150150
"viewName": {
151151
"type": "string",
152152
"description": "Default list view to open. Defaults to \"all\""
153+
},
154+
"children": {
155+
"type": "array",
156+
"items": {},
157+
"description": "Child navigation items (e.g. specific views)"
153158
}
154159
},
155160
"required": [

packages/spec/json-schema/api/GetUiViewResponse.json

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,14 @@
220220
"type": {
221221
"type": "string",
222222
"description": "Renderer type override (e.g., \"currency\", \"date\")"
223+
},
224+
"link": {
225+
"type": "boolean",
226+
"description": "Functions as the primary navigation link (triggers View navigation)"
227+
},
228+
"action": {
229+
"type": "string",
230+
"description": "Registered Action ID to execute when clicked"
223231
}
224232
},
225233
"required": [
@@ -301,6 +309,47 @@
301309
"additionalProperties": false,
302310
"description": "Row selection configuration"
303311
},
312+
"navigation": {
313+
"type": "object",
314+
"properties": {
315+
"mode": {
316+
"type": "string",
317+
"enum": [
318+
"page",
319+
"drawer",
320+
"modal",
321+
"split",
322+
"popover",
323+
"new_window",
324+
"none"
325+
],
326+
"default": "page"
327+
},
328+
"view": {
329+
"type": "string",
330+
"description": "Name of the form view to use for details (e.g. \"summary_view\", \"edit_form\")"
331+
},
332+
"preventNavigation": {
333+
"type": "boolean",
334+
"default": false,
335+
"description": "Disable standard navigation entirely"
336+
},
337+
"openNewTab": {
338+
"type": "boolean",
339+
"default": false,
340+
"description": "Force open in new tab (applies to page mode)"
341+
},
342+
"width": {
343+
"type": [
344+
"string",
345+
"number"
346+
],
347+
"description": "Width of the drawer/modal (e.g. \"600px\", \"50%\")"
348+
}
349+
},
350+
"additionalProperties": false,
351+
"description": "Configuration for item click navigation (page, drawer, modal, etc.)"
352+
},
304353
"pagination": {
305354
"type": "object",
306355
"properties": {
@@ -970,6 +1019,14 @@
9701019
"type": {
9711020
"type": "string",
9721021
"description": "Renderer type override (e.g., \"currency\", \"date\")"
1022+
},
1023+
"link": {
1024+
"type": "boolean",
1025+
"description": "Functions as the primary navigation link (triggers View navigation)"
1026+
},
1027+
"action": {
1028+
"type": "string",
1029+
"description": "Registered Action ID to execute when clicked"
9731030
}
9741031
},
9751032
"required": [
@@ -1051,6 +1108,47 @@
10511108
"additionalProperties": false,
10521109
"description": "Row selection configuration"
10531110
},
1111+
"navigation": {
1112+
"type": "object",
1113+
"properties": {
1114+
"mode": {
1115+
"type": "string",
1116+
"enum": [
1117+
"page",
1118+
"drawer",
1119+
"modal",
1120+
"split",
1121+
"popover",
1122+
"new_window",
1123+
"none"
1124+
],
1125+
"default": "page"
1126+
},
1127+
"view": {
1128+
"type": "string",
1129+
"description": "Name of the form view to use for details (e.g. \"summary_view\", \"edit_form\")"
1130+
},
1131+
"preventNavigation": {
1132+
"type": "boolean",
1133+
"default": false,
1134+
"description": "Disable standard navigation entirely"
1135+
},
1136+
"openNewTab": {
1137+
"type": "boolean",
1138+
"default": false,
1139+
"description": "Force open in new tab (applies to page mode)"
1140+
},
1141+
"width": {
1142+
"type": [
1143+
"string",
1144+
"number"
1145+
],
1146+
"description": "Width of the drawer/modal (e.g. \"600px\", \"50%\")"
1147+
}
1148+
},
1149+
"additionalProperties": false,
1150+
"description": "Configuration for item click navigation (page, drawer, modal, etc.)"
1151+
},
10541152
"pagination": {
10551153
"type": "object",
10561154
"properties": {
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{
2+
"$ref": "#/definitions/MetadataRecord",
3+
"definitions": {
4+
"MetadataRecord": {
5+
"type": "object",
6+
"properties": {
7+
"_id": {
8+
"type": "string"
9+
},
10+
"name": {
11+
"type": "string"
12+
},
13+
"type": {
14+
"type": "string"
15+
},
16+
"namespace": {
17+
"type": "string",
18+
"default": "default"
19+
},
20+
"scope": {
21+
"type": "string",
22+
"enum": [
23+
"system",
24+
"platform",
25+
"user"
26+
],
27+
"default": "platform"
28+
},
29+
"metadata": {
30+
"type": "object",
31+
"additionalProperties": {}
32+
},
33+
"extends": {
34+
"type": "string",
35+
"description": "Name of the parent metadata to extend/override"
36+
},
37+
"strategy": {
38+
"type": "string",
39+
"enum": [
40+
"merge",
41+
"replace"
42+
],
43+
"default": "merge"
44+
},
45+
"owner": {
46+
"type": "string"
47+
},
48+
"state": {
49+
"type": "string",
50+
"enum": [
51+
"draft",
52+
"active",
53+
"archived",
54+
"deprecated"
55+
],
56+
"default": "active"
57+
},
58+
"created_by": {
59+
"type": "string"
60+
},
61+
"created_at": {
62+
"type": "string",
63+
"format": "date-time"
64+
},
65+
"updated_by": {
66+
"type": "string"
67+
},
68+
"updated_at": {
69+
"type": "string",
70+
"format": "date-time"
71+
}
72+
},
73+
"required": [
74+
"_id",
75+
"name",
76+
"type",
77+
"metadata"
78+
],
79+
"additionalProperties": false
80+
}
81+
},
82+
"$schema": "http://json-schema.org/draft-07/schema#"
83+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$ref": "#/definitions/MetadataScope",
3+
"definitions": {
4+
"MetadataScope": {
5+
"type": "string",
6+
"enum": [
7+
"system",
8+
"platform",
9+
"user"
10+
]
11+
}
12+
},
13+
"$schema": "http://json-schema.org/draft-07/schema#"
14+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"$ref": "#/definitions/MetadataState",
3+
"definitions": {
4+
"MetadataState": {
5+
"type": "string",
6+
"enum": [
7+
"draft",
8+
"active",
9+
"archived",
10+
"deprecated"
11+
]
12+
}
13+
},
14+
"$schema": "http://json-schema.org/draft-07/schema#"
15+
}

0 commit comments

Comments
 (0)