Sharing
Sharing protocol schemas
@module ui/sharing
Sharing & Embedding Protocol
Defines schemas for public link sharing, embed configuration,
domain restrictions, and password protection for apps, pages, and forms.
Source: packages/spec/src/ui/sharing.zod.ts
TypeScript Usage
import { EmbedConfig, SharingConfig } from '@objectstack/spec/ui';
import type { EmbedConfig, SharingConfig } from '@objectstack/spec/ui';
// Validate data
const result = EmbedConfig.parse(data);EmbedConfig
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | boolean | ✅ | Enable iframe embedding |
| allowedOrigins | string[] | optional | Allowed iframe parent origins (e.g. ["https://example.com"]) |
| width | string | ✅ | Embed width (CSS value) |
| height | string | ✅ | Embed height (CSS value) |
| showHeader | boolean | ✅ | Show interface header in embed |
| showNavigation | boolean | ✅ | Show navigation in embed |
| responsive | boolean | ✅ | Enable responsive resizing |
SharingConfig
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | boolean | ✅ | Enable public sharing |
| publicLink | string | optional | Generated public share URL |
| password | string | optional | Password required to access shared link |
| allowedDomains | string[] | optional | Restrict access to specific email domains (e.g. ["example.com"]) |
| expiresAt | string | optional | Expiration date/time in ISO 8601 format |
| allowAnonymous | boolean | ✅ | Allow access without authentication |