BeechCMS / @beechcms/core / Seed
Interface: Seed
Seed: schema definition of a content type.
Properties
allowDrafts?
optionalallowDrafts?:boolean
Enables the "pending draft" feature for this seed. When true, generates the content_{slug}_drafts table and enables the /draft endpoints. Default: false.
allowPublicEdit?
optionalallowPublicEdit?:boolean
Enable edits from the Public API (PUT /api/v1/public/:seed/edit/:id). Default: false.
allowPublicPost?
optionalallowPublicPost?:boolean
Enable creation from the Public API (POST /api/v1/public/:seed/add). Default: false.
allowPublicRead?
optionalallowPublicRead?:boolean
Enable reads from the Public API (GET /api/v1/public/:seed). Default: false.
branches
branches:
Branch[]
List of fields (Branch).
dashboard?
optionaldashboard?:DashboardSeedConfig
Optional dashboard-specific UI config. Ignored by the Botanical Engine.
defaultPublicStatus?
optionaldefaultPublicStatus?:"draft"|"review"|"published"
Status of an entry created by an anonymous submission (POST /api/v1/public/:seed/add without a key). Default: 'draft', so unmoderated input never reaches the public list. Set 'published' to opt in. A secret-key write is trusted: it takes the status in its body, else this value, else 'published'.
displayNameAlias
displayNameAlias:
string
Alias of the branch used as the entry's human-readable name (e.g. "title", "name", "author"). Required — UIs use it for display without heuristics.
label
label:
string
Singular UI label.
labelPlural?
optionallabelPlural?:string
Plural UI label. Falls back to label when absent.
layout?
optionallayout?:unknown
Custom editor form layout. Absent when no override is stored. Populated server-side by GET /api/schema. Ignored by the Botanical Engine. Type matches FormLayout from seed-layout.ts — kept as unknown here to avoid circular imports.
retentionDays?
optionalretentionDays?:number
Days a trashed entry is kept before the retention sweep purges it. Overrides the global trashRetentionDays site setting; 0 means never purge. Absent means use the global value. Integer 0..36500.
slug
slug:
string
Identifying slug — also the table name: content_{slug}.
softDelete?
optionalsoftDelete?:boolean
Deprecated
Ignored. Every seed has a Trash: content_{slug} always carries deleted_at, DELETE is always a reversible soft delete, and every read excludes trashed rows unless the caller opts in via SelectOptions.trashed. Kept only so existing seed definitions still type-check.