Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions content/docs/references/api/protocol.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,7 @@ const result = AiInsightsRequest.parse(data);
| :--- | :--- | :--- | :--- |
| **type** | `string` | ✅ | Metadata type name |
| **name** | `string` | ✅ | Item name (snake_case identifier) |
| **packageId** | `string` | optional | Optional package ID to filter items by |


---
Expand All @@ -546,6 +547,7 @@ const result = AiInsightsRequest.parse(data);
| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **type** | `string` | ✅ | Metadata type name (e.g., "object", "plugin") |
| **packageId** | `string` | optional | Optional package ID to filter items by |


---
Expand Down
89 changes: 87 additions & 2 deletions content/docs/references/system/metadata-persistence.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Defines the lifecycle and mutability of a metadata item.
## TypeScript Usage

```typescript
import { MetadataCollectionInfo, MetadataExportOptions, MetadataFallbackStrategy, MetadataFormat, MetadataImportOptions, MetadataLoadOptions, MetadataLoadResult, MetadataLoaderContract, MetadataManagerConfig, MetadataRecord, MetadataSaveOptions, MetadataSaveResult, MetadataScope, MetadataSource, MetadataState, MetadataStats, MetadataWatchEvent, PackagePublishResult } from '@objectstack/spec/system';
import type { MetadataCollectionInfo, MetadataExportOptions, MetadataFallbackStrategy, MetadataFormat, MetadataImportOptions, MetadataLoadOptions, MetadataLoadResult, MetadataLoaderContract, MetadataManagerConfig, MetadataRecord, MetadataSaveOptions, MetadataSaveResult, MetadataScope, MetadataSource, MetadataState, MetadataStats, MetadataWatchEvent, PackagePublishResult } from '@objectstack/spec/system';
import { MetadataCollectionInfo, MetadataDiffResult, MetadataExportOptions, MetadataFallbackStrategy, MetadataFormat, MetadataHistoryQueryOptions, MetadataHistoryQueryResult, MetadataHistoryRecord, MetadataHistoryRetentionPolicy, MetadataImportOptions, MetadataLoadOptions, MetadataLoadResult, MetadataLoaderContract, MetadataManagerConfig, MetadataRecord, MetadataSaveOptions, MetadataSaveResult, MetadataScope, MetadataSource, MetadataState, MetadataStats, MetadataWatchEvent, PackagePublishResult } from '@objectstack/spec/system';
import type { MetadataCollectionInfo, MetadataDiffResult, MetadataExportOptions, MetadataFallbackStrategy, MetadataFormat, MetadataHistoryQueryOptions, MetadataHistoryQueryResult, MetadataHistoryRecord, MetadataHistoryRetentionPolicy, MetadataImportOptions, MetadataLoadOptions, MetadataLoadResult, MetadataLoaderContract, MetadataManagerConfig, MetadataRecord, MetadataSaveOptions, MetadataSaveResult, MetadataScope, MetadataSource, MetadataState, MetadataStats, MetadataWatchEvent, PackagePublishResult } from '@objectstack/spec/system';

// Validate data
const result = MetadataCollectionInfo.parse(data);
Expand All @@ -36,6 +36,25 @@ const result = MetadataCollectionInfo.parse(data);
| **namespaces** | `string[]` | ✅ | |


---

## MetadataDiffResult

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **type** | `string` | ✅ | |
| **name** | `string` | ✅ | |
| **version1** | `number` | ✅ | |
| **version2** | `number` | ✅ | |
| **checksum1** | `string` | ✅ | |
| **checksum2** | `string` | ✅ | |
| **identical** | `boolean` | ✅ | |
| **patch** | `any[]` | optional | JSON patch operations |
| **summary** | `string` | optional | Human-readable summary of changes |


---

## MetadataExportOptions
Expand Down Expand Up @@ -76,6 +95,72 @@ const result = MetadataCollectionInfo.parse(data);
* `javascript`


---

## MetadataHistoryQueryOptions

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **limit** | `integer` | optional | Maximum number of history records to return |
| **offset** | `integer` | optional | Number of records to skip |
| **since** | `string` | optional | Only return history after this timestamp |
| **until** | `string` | optional | Only return history before this timestamp |
| **operationType** | `Enum<'create' \| 'update' \| 'publish' \| 'revert' \| 'delete'>` | optional | Filter by operation type |
| **includeMetadata** | `boolean` | ✅ | Include full metadata payload |


---

## MetadataHistoryQueryResult

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **records** | `Object[]` | ✅ | |
| **total** | `integer` | ✅ | |
| **hasMore** | `boolean` | ✅ | |


---

## MetadataHistoryRecord

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **id** | `string` | ✅ | |
| **metadataId** | `string` | ✅ | Foreign key to sys_metadata.id |
| **name** | `string` | ✅ | |
| **type** | `string` | ✅ | |
| **version** | `number` | ✅ | Version number at this snapshot |
| **operationType** | `Enum<'create' \| 'update' \| 'publish' \| 'revert' \| 'delete'>` | ✅ | Type of operation that created this history entry |
| **metadata** | `string \| Record<string, any> \| null` | optional | Snapshot of metadata definition at this version (raw JSON string or parsed object) |
| **checksum** | `string` | ✅ | SHA-256 checksum of metadata content |
| **previousChecksum** | `string` | optional | Checksum of the previous version |
| **changeNote** | `string` | optional | Description of changes made in this version |
| **tenantId** | `string` | optional | Tenant identifier for multi-tenant isolation |
| **recordedBy** | `string` | optional | User who made this change |
| **recordedAt** | `string` | ✅ | Timestamp when this version was recorded |


---

## MetadataHistoryRetentionPolicy

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **maxVersions** | `integer` | optional | Maximum number of versions to retain |
| **maxAgeDays** | `integer` | optional | Maximum age of history records in days |
| **autoCleanup** | `boolean` | ✅ | Enable automatic cleanup of old history |
| **cleanupIntervalHours** | `integer` | ✅ | How often to run cleanup (in hours) |


---

## MetadataImportOptions
Expand Down
2 changes: 1 addition & 1 deletion content/docs/references/ui/action.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const result = ActionParam.parse(data);
| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **name** | `string` | ✅ | |
| **label** | `string \| Object` | ✅ | Display label: plain string or i18n translation object |
| **label** | `string` | ✅ | Display label (plain string; i18n keys are auto-generated by the framework) |
| **type** | `Enum<'text' \| 'textarea' \| 'email' \| 'url' \| 'phone' \| 'password' \| 'markdown' \| 'html' \| 'richtext' \| 'number' \| 'currency' \| 'percent' \| 'date' \| 'datetime' \| 'time' \| 'boolean' \| 'toggle' \| 'select' \| 'multiselect' \| 'radio' \| 'checkboxes' \| 'lookup' \| 'master_detail' \| 'tree' \| 'image' \| 'file' \| 'avatar' \| 'video' \| 'audio' \| 'formula' \| 'summary' \| 'autonumber' \| 'location' \| 'address' \| 'code' \| 'json' \| 'color' \| 'rating' \| 'slider' \| 'signature' \| 'qrcode' \| 'progress' \| 'tags' \| 'vector'>` | ✅ | |
| **required** | `boolean` | ✅ | |
| **options** | `Object[]` | optional | |
Expand Down
6 changes: 3 additions & 3 deletions content/docs/references/ui/animation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ Component-level animation configuration

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **label** | `string \| Object` | optional | Descriptive label for this animation configuration |
| **label** | `string` | optional | Descriptive label for this animation configuration |
| **enter** | `Object` | optional | Enter/mount animation |
| **exit** | `Object` | optional | Exit/unmount animation |
| **hover** | `Object` | optional | Hover state animation |
| **trigger** | `Enum<'on_mount' \| 'on_unmount' \| 'on_hover' \| 'on_focus' \| 'on_click' \| 'on_scroll' \| 'on_visible'>` | optional | When to trigger the animation |
| **reducedMotion** | `Enum<'respect' \| 'disable' \| 'alternative'>` | ✅ | Accessibility: how to handle prefers-reduced-motion |
| **ariaLabel** | `string \| Object` | optional | Accessible label for screen readers (WAI-ARIA aria-label) |
| **ariaLabel** | `string` | optional | Accessible label for screen readers (WAI-ARIA aria-label) |
| **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") |

Expand Down Expand Up @@ -87,7 +87,7 @@ Top-level motion and animation design configuration

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **label** | `string \| Object` | optional | Descriptive label for the motion configuration |
| **label** | `string` | optional | Descriptive label for the motion configuration |
| **defaultTransition** | `Object` | optional | Default transition applied to all animations |
| **pageTransitions** | `Object` | optional | Page navigation transition settings |
| **componentAnimations** | `Record<string, Object>` | optional | Component name to animation configuration mapping |
Expand Down
36 changes: 18 additions & 18 deletions content/docs/references/ui/app.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const result = ActionNavItem.parse(data);
| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) |
| **label** | `string \| Object` | ✅ | Display proper label |
| **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 |
Expand All @@ -69,9 +69,9 @@ const result = ActionNavItem.parse(data);
| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **name** | `string` | ✅ | App unique machine name (lowercase snake_case) |
| **label** | `string \| Object` | ✅ | App display label |
| **label** | `string` | ✅ | App display label |
| **version** | `string` | optional | App version |
| **description** | `string \| Object` | optional | App description |
| **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 |
Expand Down Expand Up @@ -110,7 +110,7 @@ const result = ActionNavItem.parse(data);
| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) |
| **label** | `string \| Object` | ✅ | Display proper label |
| **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 |
Expand All @@ -129,7 +129,7 @@ const result = ActionNavItem.parse(data);
| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) |
| **label** | `string \| Object` | ✅ | Display proper label |
| **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 |
Expand All @@ -148,10 +148,10 @@ const result = ActionNavItem.parse(data);
| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **id** | `string` | ✅ | Unique area identifier (lowercase snake_case) |
| **label** | `string \| Object` | ✅ | Area display label |
| **label** | `string` | ✅ | Area display label |
| **icon** | `string` | optional | Area icon name |
| **order** | `number` | optional | Sort order among areas (lower = first) |
| **description** | `string \| Object` | optional | Area description |
| **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 |
Expand All @@ -174,7 +174,7 @@ This schema accepts one of the following structures:
| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) |
| **label** | `string \| Object` | ✅ | Display proper label |
| **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 |
Expand All @@ -196,7 +196,7 @@ This schema accepts one of the following structures:
| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) |
| **label** | `string \| Object` | ✅ | Display proper label |
| **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 |
Expand All @@ -216,7 +216,7 @@ This schema accepts one of the following structures:
| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) |
| **label** | `string \| Object` | ✅ | Display proper label |
| **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 |
Expand All @@ -237,7 +237,7 @@ This schema accepts one of the following structures:
| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) |
| **label** | `string \| Object` | ✅ | Display proper label |
| **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 |
Expand All @@ -258,7 +258,7 @@ This schema accepts one of the following structures:
| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) |
| **label** | `string \| Object` | ✅ | Display proper label |
| **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 |
Expand All @@ -278,7 +278,7 @@ This schema accepts one of the following structures:
| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) |
| **label** | `string \| Object` | ✅ | Display proper label |
| **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 |
Expand All @@ -298,7 +298,7 @@ This schema accepts one of the following structures:
| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) |
| **label** | `string \| Object` | ✅ | Display proper label |
| **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 |
Expand All @@ -320,7 +320,7 @@ This schema accepts one of the following structures:
| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) |
| **label** | `string \| Object` | ✅ | Display proper label |
| **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 |
Expand All @@ -340,7 +340,7 @@ This schema accepts one of the following structures:
| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) |
| **label** | `string \| Object` | ✅ | Display proper label |
| **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 |
Expand All @@ -360,7 +360,7 @@ This schema accepts one of the following structures:
| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) |
| **label** | `string \| Object` | ✅ | Display proper label |
| **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 |
Expand All @@ -379,7 +379,7 @@ This schema accepts one of the following structures:
| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **id** | `string` | ✅ | Unique identifier for this navigation item (lowercase snake_case) |
| **label** | `string \| Object` | ✅ | Display proper label |
| **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 |
Expand Down
Loading
Loading