{
	"$ref": "#/definitions/SeedFile",
	"$schema": "http://json-schema.org/draft-07/schema#",
	"definitions": {
		"CollectionAdminConfig": {
			"additionalProperties": false,
			"description": "Collection-level admin presentation options.",
			"properties": {
				"listColumns": {
					"description": "Custom field slugs to show in the content list.",
					"items": {
						"type": "string"
					},
					"type": "array"
				}
			},
			"type": "object"
		},
		"FieldType": {
			"description": "Supported field types",
			"enum": [
				"string",
				"text",
				"url",
				"number",
				"integer",
				"boolean",
				"datetime",
				"select",
				"multiSelect",
				"portableText",
				"image",
				"file",
				"reference",
				"json",
				"slug",
				"repeater"
			],
			"type": "string"
		},
		"MediaReference": {
			"additionalProperties": false,
			"description": "Media reference for logo/favicon/seo.defaultOgImage.\n\nStored shape is just `{ mediaId, alt? }`. The remaining fields are populated by `resolveMediaReference` on read so templates can emit correct head tags without a second round-trip to the media table.\n\nThe Zod schemas at the REST/MCP boundary are split:  - `mediaReferenceInput` (used by `settingsUpdateBody`) defines only    `mediaId` and `alt`. Default strip-mode parsing discards any    resolved fields a client posts back, so they never reach storage.  - `mediaReferenceResponse` (used by `siteSettingsSchema`) includes    the resolved fields so generated OpenAPI clients see them.\n\nIf you ever switch `mediaReferenceInput` to `passthrough`, you must also strip the resolved fields explicitly in `setSiteSettings`, or stored options will accumulate stale `url` / `contentType` / `width` / `height` snapshots.",
			"properties": {
				"alt": {
					"type": "string"
				},
				"contentType": {
					"description": "Stored MIME type (e.g. `image/svg+xml`). Populated alongside `url`.",
					"type": "string"
				},
				"height": {
					"description": "Pixel height if known. Populated alongside `url`.",
					"type": "number"
				},
				"mediaId": {
					"type": "string"
				},
				"url": {
					"description": "Resolved URL. Populated by `resolveMediaReference`; absent on raw stored values.",
					"type": "string"
				},
				"width": {
					"description": "Pixel width if known. Populated alongside `url`.",
					"type": "number"
				}
			},
			"required": [
				"mediaId"
			],
			"type": "object"
		},
		"SeedByline": {
			"additionalProperties": false,
			"description": "Byline profile in seed",
			"properties": {
				"avatar": {
					"$ref": "#/definitions/SeedBylineAvatar",
					"description": "Avatar for the byline, seeded as an already-stored media item. Unlike a content `$media` reference, nothing is downloaded: the caller supplies the `storageKey` of a file that already exists in the configured storage (the common case when seeding alongside a media migration). A `media` row is created and linked via `avatarMediaId`."
				},
				"bio": {
					"type": "string"
				},
				"displayName": {
					"type": "string"
				},
				"id": {
					"description": "Seed-local ID for byline references in content entries",
					"type": "string"
				},
				"isGuest": {
					"type": "boolean"
				},
				"slug": {
					"type": "string"
				},
				"websiteUrl": {
					"type": "string"
				}
			},
			"required": [
				"id",
				"slug",
				"displayName"
			],
			"type": "object"
		},
		"SeedBylineAvatar": {
			"additionalProperties": false,
			"properties": {
				"alt": {
					"description": "Alt text for the avatar image.",
					"type": "string"
				},
				"filename": {
					"description": "Filename for the media record. Defaults to the storage key's basename.",
					"type": "string"
				},
				"height": {
					"type": "number"
				},
				"mimeType": {
					"description": "MIME type for the media record. Defaults to `image/jpeg`.",
					"type": "string"
				},
				"storageKey": {
					"description": "Storage key of an avatar file that already exists in the configured storage.",
					"type": "string"
				},
				"width": {
					"type": "number"
				}
			},
			"required": [
				"storageKey"
			],
			"type": "object"
		},
		"SeedBylineCredit": {
			"additionalProperties": false,
			"properties": {
				"byline": {
					"description": "Seed byline ID from root `bylines[]`",
					"type": "string"
				},
				"roleLabel": {
					"type": "string"
				}
			},
			"required": [
				"byline"
			],
			"type": "object"
		},
		"SeedCollection": {
			"additionalProperties": false,
			"description": "Collection definition in seed",
			"properties": {
				"admin": {
					"$ref": "#/definitions/CollectionAdminConfig"
				},
				"commentsEnabled": {
					"description": "Enable comments on this collection",
					"type": "boolean"
				},
				"dateField": {
					"description": "Field slug (a datetime field) powering the admin list Date column (defaults to last-updated)",
					"type": "string"
				},
				"description": {
					"type": "string"
				},
				"fields": {
					"items": {
						"$ref": "#/definitions/SeedField"
					},
					"type": "array"
				},
				"hidden": {
					"description": "Omit this collection from the admin sidebar. It stays reachable through the API, MCP, plugin hooks, and direct `/content/:collection` URLs.",
					"type": "boolean"
				},
				"icon": {
					"type": "string"
				},
				"label": {
					"type": "string"
				},
				"labelSingular": {
					"type": "string"
				},
				"routable": {
					"description": "Require a slug before an entry can be published. Defaults to true.",
					"type": "boolean"
				},
				"slug": {
					"type": "string"
				},
				"sortOrder": {
					"description": "Explicit position in the admin sidebar (ascending). Collections without a `sortOrder` keep the alphabetical order and follow the ordered ones.",
					"type": "number"
				},
				"supports": {
					"items": {
						"enum": [
							"drafts",
							"revisions",
							"preview",
							"scheduling",
							"search",
							"seo"
						],
						"type": "string"
					},
					"type": "array"
				},
				"titleField": {
					"description": "Field slug powering the admin list Title column (defaults to title display)",
					"type": "string"
				},
				"urlPattern": {
					"type": "string"
				}
			},
			"required": [
				"slug",
				"label",
				"fields"
			],
			"type": "object"
		},
		"SeedContentEntry": {
			"additionalProperties": false,
			"description": "Content entry in seed",
			"properties": {
				"bylines": {
					"description": "Ordered byline credits for this entry",
					"items": {
						"$ref": "#/definitions/SeedBylineCredit"
					},
					"type": "array"
				},
				"data": {
					"additionalProperties": {},
					"description": "Content data (field slug -> value)",
					"type": "object"
				},
				"id": {
					"description": "Seed-local ID for $ref resolution",
					"type": "string"
				},
				"locale": {
					"description": "BCP 47 locale code. When omitted, defaults to defaultLocale.",
					"type": "string"
				},
				"slug": {
					"description": "URL slug. May be omitted for entries in non-routable collections.",
					"type": [
						"string",
						"null"
					]
				},
				"status": {
					"description": "Publication status",
					"enum": [
						"published",
						"draft"
					],
					"type": "string"
				},
				"taxonomies": {
					"additionalProperties": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"description": "Taxonomy term assignments (taxonomy name -> term slugs)",
					"type": "object"
				},
				"translationOf": {
					"description": "Seed-local ID of the source content entry this translates. Must reference another entry's `id` in the same collection.",
					"type": "string"
				}
			},
			"required": [
				"id",
				"data"
			],
			"type": "object"
		},
		"SeedField": {
			"additionalProperties": false,
			"description": "Field definition in seed",
			"properties": {
				"defaultValue": {},
				"indexed": {
					"type": "boolean"
				},
				"label": {
					"type": "string"
				},
				"options": {
					"additionalProperties": {},
					"type": "object"
				},
				"required": {
					"type": "boolean"
				},
				"searchable": {
					"type": "boolean"
				},
				"slug": {
					"type": "string"
				},
				"type": {
					"$ref": "#/definitions/FieldType"
				},
				"unique": {
					"type": "boolean"
				},
				"validation": {
					"additionalProperties": {},
					"type": "object"
				},
				"widget": {
					"type": "string"
				}
			},
			"required": [
				"slug",
				"label",
				"type"
			],
			"type": "object"
		},
		"SeedFile": {
			"additionalProperties": false,
			"description": "Root seed file structure",
			"properties": {
				"$schema": {
					"description": "JSON schema reference (optional)",
					"type": "string"
				},
				"bylines": {
					"description": "Bylines used for presentation credits",
					"items": {
						"$ref": "#/definitions/SeedByline"
					},
					"type": "array"
				},
				"collections": {
					"description": "Collection definitions",
					"items": {
						"$ref": "#/definitions/SeedCollection"
					},
					"type": "array"
				},
				"content": {
					"additionalProperties": {
						"items": {
							"$ref": "#/definitions/SeedContentEntry"
						},
						"type": "array"
					},
					"description": "Sample content (organized by collection)",
					"type": "object"
				},
				"defaultLocale": {
					"description": "Default locale for locale-bearing rows (menus, taxonomies, content) that omit an explicit `locale`. Lets a non-`en` single-locale project survive an `export-seed` → `seed` round-trip: `apply` runs outside the Astro runtime (no i18n config), so without this it would backfill the omitted locale as `en`. See #1421.",
					"type": "string"
				},
				"menus": {
					"description": "Navigation menus",
					"items": {
						"$ref": "#/definitions/SeedMenu"
					},
					"type": "array"
				},
				"meta": {
					"additionalProperties": false,
					"description": "Metadata about the seed",
					"properties": {
						"author": {
							"type": "string"
						},
						"description": {
							"type": "string"
						},
						"name": {
							"type": "string"
						}
					},
					"type": "object"
				},
				"redirects": {
					"description": "Redirect rules",
					"items": {
						"$ref": "#/definitions/SeedRedirect"
					},
					"type": "array"
				},
				"sections": {
					"description": "Sections (reusable content blocks, like WP patterns/reusable blocks)",
					"items": {
						"$ref": "#/definitions/SeedSection"
					},
					"type": "array"
				},
				"settings": {
					"additionalProperties": false,
					"description": "Site settings",
					"properties": {
						"dateFormat": {
							"type": "string"
						},
						"favicon": {
							"$ref": "#/definitions/MediaReference"
						},
						"logo": {
							"$ref": "#/definitions/MediaReference"
						},
						"postsPerPage": {
							"type": "number"
						},
						"seo": {
							"$ref": "#/definitions/SeoSettings"
						},
						"social": {
							"additionalProperties": false,
							"properties": {
								"facebook": {
									"type": "string"
								},
								"github": {
									"type": "string"
								},
								"instagram": {
									"type": "string"
								},
								"linkedin": {
									"type": "string"
								},
								"twitter": {
									"type": "string"
								},
								"youtube": {
									"type": "string"
								}
							},
							"type": "object"
						},
						"tagline": {
							"type": "string"
						},
						"timezone": {
							"type": "string"
						},
						"title": {
							"type": "string"
						},
						"url": {
							"type": "string"
						}
					},
					"type": "object"
				},
				"taxonomies": {
					"description": "Taxonomy definitions",
					"items": {
						"$ref": "#/definitions/SeedTaxonomy"
					},
					"type": "array"
				},
				"version": {
					"const": "1",
					"description": "Seed format version",
					"type": "string"
				},
				"widgetAreas": {
					"description": "Widget areas",
					"items": {
						"$ref": "#/definitions/SeedWidgetArea"
					},
					"type": "array"
				}
			},
			"required": [
				"version"
			],
			"type": "object"
		},
		"SeedMenu": {
			"additionalProperties": false,
			"description": "Menu definition in seed",
			"properties": {
				"id": {
					"description": "Optional seed-local id, e.g. \"menu:primary:en\".",
					"type": "string"
				},
				"items": {
					"items": {
						"$ref": "#/definitions/SeedMenuItem"
					},
					"type": "array"
				},
				"label": {
					"type": "string"
				},
				"locale": {
					"type": "string"
				},
				"name": {
					"type": "string"
				},
				"translationOf": {
					"type": "string"
				}
			},
			"required": [
				"name",
				"label",
				"items"
			],
			"type": "object"
		},
		"SeedMenuItem": {
			"additionalProperties": false,
			"description": "Menu item in seed",
			"properties": {
				"children": {
					"items": {
						"$ref": "#/definitions/SeedMenuItem"
					},
					"type": "array"
				},
				"collection": {
					"type": "string"
				},
				"cssClasses": {
					"type": "string"
				},
				"id": {
					"description": "Optional seed-local id, e.g. \"item:primary:home:en\".",
					"type": "string"
				},
				"label": {
					"type": "string"
				},
				"locale": {
					"type": "string"
				},
				"ref": {
					"type": "string"
				},
				"target": {
					"enum": [
						"_blank",
						"_self"
					],
					"type": "string"
				},
				"titleAttr": {
					"type": "string"
				},
				"translationOf": {
					"type": "string"
				},
				"type": {
					"type": "string"
				},
				"url": {
					"type": "string"
				}
			},
			"required": [
				"type"
			],
			"type": "object"
		},
		"SeedRedirect": {
			"additionalProperties": false,
			"description": "Redirect definition in seed",
			"properties": {
				"destination": {
					"type": "string"
				},
				"enabled": {
					"type": "boolean"
				},
				"groupName": {
					"type": [
						"string",
						"null"
					]
				},
				"source": {
					"type": "string"
				},
				"type": {
					"enum": [
						301,
						302,
						307,
						308
					],
					"type": "number"
				}
			},
			"required": [
				"source",
				"destination"
			],
			"type": "object"
		},
		"SeedSection": {
			"additionalProperties": false,
			"description": "Section (reusable content block) in seed",
			"properties": {
				"content": {
					"description": "Portable Text content",
					"items": {
						"additionalProperties": {},
						"properties": {
							"_key": {
								"type": "string"
							},
							"_type": {
								"type": "string"
							}
						},
						"required": [
							"_type"
						],
						"type": "object"
					},
					"type": "array"
				},
				"description": {
					"type": "string"
				},
				"keywords": {
					"description": "Search keywords",
					"items": {
						"type": "string"
					},
					"type": "array"
				},
				"slug": {
					"type": "string"
				},
				"source": {
					"description": "Source: \"theme\" for seed-provided, \"import\" for WP imports",
					"enum": [
						"theme",
						"import"
					],
					"type": "string"
				},
				"title": {
					"type": "string"
				}
			},
			"required": [
				"slug",
				"title",
				"content"
			],
			"type": "object"
		},
		"SeedTaxonomy": {
			"additionalProperties": false,
			"description": "Taxonomy definition in seed. For multi-locale exports each locale variant is its own entry, linked via `translationOf` (referencing another entry's `id`).",
			"properties": {
				"collections": {
					"items": {
						"type": "string"
					},
					"type": "array"
				},
				"hierarchical": {
					"type": "boolean"
				},
				"id": {
					"description": "Optional seed-local id, e.g. \"tax:category:en\". Target of `translationOf`.",
					"type": "string"
				},
				"label": {
					"type": "string"
				},
				"labelSingular": {
					"type": "string"
				},
				"locale": {
					"type": "string"
				},
				"name": {
					"type": "string"
				},
				"terms": {
					"items": {
						"$ref": "#/definitions/SeedTaxonomyTerm"
					},
					"type": "array"
				},
				"translationOf": {
					"type": "string"
				}
			},
			"required": [
				"name",
				"label",
				"hierarchical",
				"collections"
			],
			"type": "object"
		},
		"SeedTaxonomyTerm": {
			"additionalProperties": false,
			"description": "Taxonomy term in seed",
			"properties": {
				"description": {
					"type": "string"
				},
				"id": {
					"description": "Optional seed-local id, e.g. \"term:category:news:en\".",
					"type": "string"
				},
				"label": {
					"type": "string"
				},
				"locale": {
					"type": "string"
				},
				"parent": {
					"type": "string"
				},
				"slug": {
					"type": "string"
				},
				"translationOf": {
					"type": "string"
				}
			},
			"required": [
				"slug",
				"label"
			],
			"type": "object"
		},
		"SeedWidget": {
			"additionalProperties": false,
			"description": "Widget in seed",
			"properties": {
				"componentId": {
					"type": "string"
				},
				"content": {
					"items": {
						"additionalProperties": {},
						"properties": {
							"_key": {
								"type": "string"
							},
							"_type": {
								"type": "string"
							}
						},
						"required": [
							"_type"
						],
						"type": "object"
					},
					"type": "array"
				},
				"menuName": {
					"type": "string"
				},
				"props": {
					"additionalProperties": {},
					"type": "object"
				},
				"title": {
					"type": "string"
				},
				"type": {
					"enum": [
						"content",
						"menu",
						"component"
					],
					"type": "string"
				}
			},
			"required": [
				"type"
			],
			"type": "object"
		},
		"SeedWidgetArea": {
			"additionalProperties": false,
			"description": "Widget area definition in seed",
			"properties": {
				"description": {
					"type": "string"
				},
				"label": {
					"type": "string"
				},
				"name": {
					"type": "string"
				},
				"widgets": {
					"items": {
						"$ref": "#/definitions/SeedWidget"
					},
					"type": "array"
				}
			},
			"required": [
				"name",
				"label",
				"widgets"
			],
			"type": "object"
		},
		"SeoSettings": {
			"additionalProperties": false,
			"description": "Site-level SEO settings",
			"properties": {
				"bingVerification": {
					"description": "Bing Webmaster Tools verification meta tag content",
					"type": "string"
				},
				"defaultOgImage": {
					"$ref": "#/definitions/MediaReference",
					"description": "Default OG image when content has no seo_image"
				},
				"googleVerification": {
					"description": "Google Search Console verification meta tag content",
					"type": "string"
				},
				"robotsTxt": {
					"description": "Custom robots.txt content. If unset, a default is generated.",
					"type": "string"
				},
				"titleSeparator": {
					"description": "Separator between page title and site title (e.g., \" | \", \" — \")",
					"type": "string"
				}
			},
			"type": "object"
		}
	},
	"$id": "https://premium-cms.com/schemas/seed/seed.schema.json",
	"properties": {
		"order": {
			"type": "object",
			"description": "Apply order of each group, by file name (see seed/fs.ts).",
			"properties": {
				"collections": {
					"type": "array",
					"items": {
						"type": "string"
					}
				},
				"taxonomies": {
					"type": "array",
					"items": {
						"type": "string"
					}
				},
				"menus": {
					"type": "array",
					"items": {
						"type": "string"
					}
				},
				"widgetAreas": {
					"type": "array",
					"items": {
						"type": "string"
					}
				},
				"sections": {
					"type": "array",
					"items": {
						"type": "string"
					}
				},
				"bylines": {
					"type": "array",
					"items": {
						"type": "string"
					}
				},
				"content": {
					"type": "object",
					"additionalProperties": {
						"type": "array",
						"items": {
							"type": "string"
						}
					}
				}
			},
			"additionalProperties": false
		}
	},
	"title": "SeedFile"
}
