UNPKG

@lucidcms/core

Version:

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

1 lines 1.53 kB
{"version":3,"file":"tenants.mjs","names":[],"sources":["../../src/schemas/tenants.ts"],"sourcesContent":["import z from \"zod\";\nimport { resolvedAdminCopySchema } from \"../libs/i18n/index.js\";\nimport type { ControllerSchema } from \"../types.js\";\n\nexport const controllerSchemas = {\n\tgetAll: {\n\t\tquery: {\n\t\t\tstring: undefined,\n\t\t\tformatted: undefined,\n\t\t},\n\t\tparams: undefined,\n\t\tbody: undefined,\n\t\tresponse: z.array(\n\t\t\tz.object({\n\t\t\t\tkey: z.string().meta({\n\t\t\t\t\tdescription: \"The tenant key\",\n\t\t\t\t\texample: \"alpha\",\n\t\t\t\t}),\n\t\t\t\tname: resolvedAdminCopySchema.meta({\n\t\t\t\t\tdescription: \"The tenant's name\",\n\t\t\t\t\texample: {\n\t\t\t\t\t\ttype: \"lucid.copy\",\n\t\t\t\t\t\tscope: \"admin\",\n\t\t\t\t\t\tkey: \"tenants.alpha.name\",\n\t\t\t\t\t\tdefaultMessage: \"Alpha\",\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tdefault: z.boolean().optional().meta({\n\t\t\t\t\tdescription: \"Whether this tenant is the default admin selection\",\n\t\t\t\t\texample: true,\n\t\t\t\t}),\n\t\t\t}),\n\t\t),\n\t} satisfies ControllerSchema,\n};\n"],"mappings":"mFAIA,MAAa,EAAoB,CAChC,OAAQ,CACP,MAAO,CACN,OAAQ,IAAA,GACR,UAAW,IAAA,EACZ,EACA,OAAQ,IAAA,GACR,KAAM,IAAA,GACN,SAAU,EAAE,MACX,EAAE,OAAO,CACR,IAAK,EAAE,OAAO,CAAC,CAAC,KAAK,CACpB,YAAa,iBACb,QAAS,OACV,CAAC,EACD,KAAM,EAAwB,KAAK,CAClC,YAAa,oBACb,QAAS,CACR,KAAM,aACN,MAAO,QACP,IAAK,qBACL,eAAgB,OACjB,CACD,CAAC,EACD,QAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,CACpC,YAAa,qDACb,QAAS,EACV,CAAC,CACF,CAAC,CACF,CACD,CACD"}