Sharing
Sharing protocol schemas
@module ui/sharing
Sharing & Embedding Protocol
Public-link sharing of a form view. The module name is plural for historical
reasons: it once held two shapes in opposite postures, and #4001 批 14
measured them per SCHEMA rather than assuming a file-level verdict —
SharingConfigSchema a live authoring door, EmbedConfigSchema no door at
all. That measurement is what let the two be disposed of separately, and the
asymmetry survives as the reason this file reads the way it does:
SharingConfigSchemahas a live authoring door.FormViewSchema.sharingcarries it (view.zod.ts),viewis a metadata-type root, and the runtime really reads it:rest-server.tsmounts the anonymous form endpoints only whensharing.allowAnonymous === trueand asharing.publicLinkslug matches. Both example apps author it (app-showcaseinquiry.view.ts,app-crmlead.view.ts). It isstrictObjectas of #4001 批 14.EmbedConfigSchemawas REMOVED at #5015 (ADR-0049 enforce-or-remove) — see the block below where it stood.
The ledger's classification question is "who writes this schema's input?", and it is answered per SCHEMA, not per file; before 批 14 this file's row carried one verdict for both, and a file-level verdict would have been wrong in one direction or the other whichever way it fell.
Source: packages/spec/src/ui/sharing.zod.ts
TypeScript Usage
import { SharingConfigSchema } from '@objectstack/spec/ui';
import type { SharingConfig } from '@objectstack/spec/ui';
// Validate data
const result = SharingConfigSchema.parse(data);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 |