@lucidcms/core
Version:
The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.
2 lines • 5.99 kB
JavaScript
import{resolvedAdminCopySchema as e}from"../libs/i18n/copy.mjs";import{queryFormatted as t,queryString as n}from"./helpers/querystring.mjs";import r from"zod";const i=r.string().min(1),a=r.object({id:r.number().meta({description:`The client integration ID`,example:`26`}),key:r.string().meta({description:`A short unique key used to authenticate client query requests`,example:`bd61bb`}),name:r.string().min(2).meta({description:`The name of the client`,example:`Marketing Website`}),description:r.string().nullable().meta({description:`A description of the client`,example:`The Astro marketing site at example.com`}),enabled:r.boolean().meta({description:`Whether or not the client is active. If inactive you wont be able to use it to query data`,example:!0}),scopes:r.array(i).meta({description:`The scopes this client integration has access to.`,example:[`documents:pages:read`,`media:read`]}),lastUsedAt:r.string().nullable().meta({description:`The time the client integration was last used`,example:`2022-01-01T00:00:00Z`}),lastUsedIp:r.string().nullable().meta({description:`The last IP address that used the client integration`,example:`203.0.113.42`}),lastUsedUserAgent:r.string().nullable().meta({description:`The last user agent that used the client integration`,example:`Mozilla/5.0`}),createdAt:r.string().nullable().meta({description:`The time the client integration was created`,example:`2022-01-01T00:00:00Z`}),updatedAt:r.string().nullable().meta({description:`The time the client integration was last updated`,example:`2022-01-01T00:00:00Z`})}),o=r.object({key:r.string().meta({description:`The scope group key`,example:`documents:pages`}),details:r.object({name:e,description:e.nullable().optional()}),scopes:r.array(r.object({key:i,details:r.object({name:e,description:e.nullable().optional()})})).meta({description:`The scopes for this scope group`})}),s={createSingle:{body:r.object({name:r.string().trim().min(2).meta({description:`The name of the client`,example:`Marketing Website`}),description:r.string().trim().meta({description:`A description of the client`,example:`The Astro marketing site at example.com`}).optional(),enabled:r.boolean().meta({description:`Whether or not the client is active. If inactive you wont be able to use it to query data`,example:!0}).optional(),scopes:r.array(i).meta({description:`Scopes granted to this client integration.`,example:[`documents:pages:read`]})}),query:{string:void 0,formatted:void 0},params:void 0,response:r.object({apiKey:r.string().meta({description:`A unique token used to authenticate client endpoint requests. You'll only ever see this value once so keep it safe`,example:`3084d4531c41ca6db79f422a4426361176461667280556c333ffcff530486a1e`})})},deleteSingle:{body:void 0,query:{string:void 0,formatted:void 0},params:r.object({id:r.string().trim().meta({description:`The client integration ID you want to delete`,example:`1`})}),response:void 0},getAll:{body:void 0,query:{string:r.object({"filter[key]":n.schema.filter(!1,{example:`bd61bb`}),"filter[name]":n.schema.filter(!1,{example:`Marketing Website`}),"filter[enabled]":n.schema.filter(!1,{example:`1`}),"filter[description]":n.schema.filter(!1,{example:`Marketing website`}),"filter[scope]":n.schema.filter(!0,{example:`documents:pages:read`}),"filter[lastUsedAt]":n.schema.filter(!1,{example:`2026-01-01T00:00:00Z`}),"filter[lastUsedIp]":n.schema.filter(!1,{example:`203.0.113.42`}),"filter[createdAt]":n.schema.filter(!1,{example:`2026-01-01T00:00:00Z`}),"filter[updatedAt]":n.schema.filter(!1,{example:`2026-01-01T00:00:00Z`}),sort:n.schema.sort(`name,description,enabled,createdAt`),page:n.schema.page,perPage:n.schema.perPage}).meta(n.meta),formatted:r.object({filter:r.object({key:t.schema.filters.single.optional(),name:t.schema.filters.single.optional(),description:t.schema.filters.single.optional(),enabled:t.schema.filters.single.optional(),scope:t.schema.filters.union.optional(),lastUsedAt:t.schema.filters.single.optional(),lastUsedIp:t.schema.filters.single.optional(),createdAt:t.schema.filters.single.optional(),updatedAt:t.schema.filters.single.optional()}).optional(),filterOr:t.schema.filterOr,sort:r.array(r.object({key:r.enum([`name`,`description`,`enabled`,`createdAt`,`updatedAt`]),direction:r.enum([`asc`,`desc`])})).optional(),page:t.schema.page,perPage:t.schema.perPage,include:r.array(r.string()).optional(),exclude:r.array(r.string()).optional()})},params:void 0,response:r.array(a)},getSingle:{body:void 0,query:{string:void 0,formatted:void 0},params:r.object({id:r.string().trim().meta({description:`The client integration ID`,example:`1`})}),response:a},getScopes:{body:void 0,query:{string:void 0,formatted:void 0},params:void 0,response:r.array(o)},regenerateKeys:{body:void 0,query:{string:void 0,formatted:void 0},params:r.object({id:r.string().trim().meta({description:`The client integration ID`,example:`1`})}),response:r.object({apiKey:r.string().meta({description:`A unique token used to authenticate client endpoint requests. You'll only ever see this value once so keep it safe`,example:`3084d4531c41ca6db79f422a4426361176461667280556c333ffcff530486a1e`})})},updateSingle:{body:r.object({name:r.string().trim().min(2).meta({description:`The name of the client`,example:`Marketing Website`}).optional(),description:r.string().trim().meta({description:`A description of the client`,example:`The Astro marketing site at example.com`}).optional(),enabled:r.boolean().meta({description:`Whether or not the client is active. If inactive you wont be able to use it to query data`,example:!0}).optional(),scopes:r.array(i).meta({description:`Scopes granted to this client integration.`,example:[`media:read`,`media:process`]}).optional()}),query:{string:void 0,formatted:void 0},params:r.object({id:r.string().trim().meta({description:`The client integration ID`,example:`1`})}),response:void 0}};export{a as clientIntegrationResponseSchema,s as controllerSchemas};
//# sourceMappingURL=client-integrations.mjs.map