UNPKG

@lucidcms/core

Version:

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

2 lines 2.96 kB
import{queryFormatted as e,queryString as t}from"./helpers/querystring.mjs";import n from"zod";const r=n.object({id:n.number().meta({description:`Folder ID`,example:1}),title:n.string().meta({description:`Folder title`,example:`Heros`}),parentFolderId:n.number().nullable().meta({description:`Folder parent ID`,example:1}),folderCount:n.number().meta({description:`Folder folder count`,example:1}),mediaCount:n.number().meta({description:`Folder media count`,example:1}),meta:n.object({level:n.number().meta({description:`Folder level`,example:1}),order:n.number().meta({description:`Folder order`,example:1}),label:n.string().meta({description:`Folder label`,example:`Heros`})}).optional(),createdBy:n.number().nullable().meta({description:`Folder created by`,example:1}),updatedBy:n.number().nullable().meta({description:`Folder updated by`,example:1}),createdAt:n.string().meta({description:`Creation timestamp`,example:`2022-01-01T00:00:00Z`}),updatedAt:n.string().meta({description:`Last update timestamp`,example:`2022-01-01T00:00:00Z`})}),i=n.object({id:n.number().meta({description:`Folder ID`,example:1}),title:n.string().meta({description:`Folder title`,example:`Heros`}),parentFolderId:n.number().nullable().meta({description:`Folder parent ID`,example:1})}),a={hierarchy:{query:{string:void 0,formatted:void 0},params:void 0,body:void 0,response:n.array(r)},getMultiple:{query:{string:n.object({"filter[title]":t.schema.filter(!1,{example:`Heros`}),"filter[parentFolderId]":t.schema.filter(!1,{example:`1`,nullable:!0}),sort:t.schema.sort(`createdAt,updatedAt,title`),page:t.schema.page,perPage:t.schema.perPage}).meta(t.meta),formatted:n.object({filter:n.object({title:e.schema.filters.single.optional(),parentFolderId:e.schema.filters.single.optional()}).optional(),filterOr:e.schema.filterOr,sort:n.array(n.object({key:n.enum([`createdAt`,`updatedAt`,`title`]),direction:n.enum([`asc`,`desc`])})).optional(),page:e.schema.page,perPage:e.schema.perPage})},params:void 0,body:void 0,response:n.object({folders:n.array(r),breadcrumbs:n.array(i)})},deleteSingle:{body:void 0,query:{string:void 0,formatted:void 0},params:n.object({id:n.string().trim().meta({description:`The folder ID`,example:1})}),response:void 0},updateSingle:{body:n.object({title:n.string().trim().min(1).meta({description:`The folder title`,example:`Heros`}).optional(),parentFolderId:n.number().nullable().meta({description:`The folder parent ID`,example:1}).optional()}),query:{string:void 0,formatted:void 0},params:n.object({id:n.string().trim().meta({description:`The folder ID`,example:1})}),response:void 0},createSingle:{body:n.object({title:n.string().trim().min(1).meta({description:`The folder title`,example:`Heros`}),parentFolderId:n.number().nullable().meta({description:`The folder parent ID`,example:1}).optional()}),query:{string:void 0,formatted:void 0},params:void 0,response:void 0}};export{a as controllerSchemas}; //# sourceMappingURL=media-folders.mjs.map