UNPKG

@lucidcms/core

Version:

The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.

2 lines 1.96 kB
import{resolvedAdminCopySchema as e}from"../libs/i18n/copy.mjs";import{fieldClientResponseSchema as t,fieldConfigSchema as n,fieldInputSchema as r,fieldResponseSchema as i}from"./collection-fields.mjs";import a from"zod";const o=a.object({id:a.number().nullable().optional(),ref:a.string(),key:a.string(),order:a.number(),type:a.union([a.literal(`builder`),a.literal(`fixed`)]),open:a.boolean().optional(),fields:a.array(r).optional()}),s=a.object({key:a.string().min(1).meta({description:`Unique identifier for the brick`,example:`banner`}),details:a.object({name:e.meta({description:`Display name for the brick`,example:{type:`lucid.copy`,scope:`admin`,key:`bricks.banner.name`,defaultMessage:`Banner`}}),summary:e.nullable().meta({description:`Description text for the brick`,example:{type:`lucid.copy`,scope:`admin`,key:`bricks.banner.summary`,defaultMessage:`A banner with a title and intro text`}}).optional()}),preview:a.object({image:a.string().nullable().meta({description:`Preview image URL for the brick`,example:`https://example.com/banner-brick.png`}).optional()}),get fields(){return a.array(n)}}),c=a.object({id:a.number().meta({description:`The ID of the brick row`,example:1}),key:a.string().meta({description:`The key that identifies the brick`,example:`hero`}),ref:a.string().meta({description:`The unique reference identifier for this brick`,example:`7645654`}),order:a.number().meta({description:`The position order of this brick in the document`,example:0}),open:a.boolean().meta({description:`Whether this brick is expanded in the UI`,example:!0}),type:a.enum([`builder`,`fixed`]).meta({description:`The type of brick`,example:`builder`})}).meta({additionalProperties:!0}),l=c.extend({get fields(){return a.array(i)}});c.extend({get fields(){return a.record(a.any(),a.array(t))}});export{s as brickConfigSchema,o as brickInputSchema,c as brickResponseBaseSchema,l as brickResponseSchema}; //# sourceMappingURL=collection-bricks.mjs.map