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.92 kB
import e from"../../../constants/constants.mjs";import{translate as t}from"../../i18n/translate.mjs";const n={type:`object`,properties:{path:{type:`string`},links:{type:`array`,items:{}},currentPage:{type:`number`,nullable:!0,example:null},lastPage:{type:`number`,nullable:!0,example:null},perPage:{type:`number`,nullable:!0,example:null},total:{type:`number`,nullable:!0,example:null}}},r={type:`object`,properties:{path:{type:`string`},links:{type:`array`,items:{type:`object`,properties:{active:{type:`boolean`},label:{type:`string`},url:{type:`string`,nullable:!0},page:{type:`number`}}}},currentPage:{type:`number`,nullable:!0,example:e.query.page},lastPage:{type:`number`,nullable:!0,example:200/e.query.perPage},perPage:{type:`number`,nullable:!0,example:e.query.perPage},total:{type:`number`,nullable:!0,example:200}}},i={type:`object`,properties:{first:{type:`string`,nullable:!0},last:{type:`string`,nullable:!0},next:{type:`string`,nullable:!0},prev:{type:`string`,nullable:!0}}},a={type:`object`,description:t(`server:core.openapi.response.default`),properties:{status:{type:`number`,nullable:!0},code:{type:`string`,nullable:!0},key:{type:`string`,nullable:!0},name:{type:`string`,nullable:!0},message:{type:`string`,nullable:!0},errors:{type:`object`,nullable:!0,additionalProperties:!0}},additionalProperties:!0},o=e=>{let o={};return e?.schema?o[200]={description:t(`server:core.openapi.response.200`),content:{"application/json":{schema:e.noProperties===!0?{type:`object`,nullable:!0}:{type:`object`,properties:{data:e.schema,meta:e.paginated?r:n,...e.paginated?{links:i}:{}}}}}}:o[204]={description:t(`server:core.openapi.response.204`),content:{"application/json":{schema:{type:`object`,nullable:!0}}}},o.default={description:t(`server:core.openapi.response.default`),content:{"application/json":{schema:a}}},o};export{o as default,a as defaultErrorResponse}; //# sourceMappingURL=responses.mjs.map