Aller au contenu

schemas/plugins

Ce contenu n’est pas encore disponible dans votre langue.

Defined in: studiocms/packages/studiocms/src/schemas/plugins/index.ts:186

Interface representing the base hooks for plugins in the StudioCMS system.

studiocms:astro:config: PluginHook<{
addIntegrations: (...args: [AstroIntegration | AstroIntegration[]]) => void;
logger: AstroIntegrationLogger;
}>;

Defined in: studiocms/packages/studiocms/src/schemas/plugins/index.ts:187

studiocms:config:setup: PluginHook<{
logger: AstroIntegrationLogger;
setDashboard: (...args: [{
dashboardGridItems: GridItemInput[];
dashboardPages: {
admin: (
| {
description: ...;
icon: ...;
pageActionsComponent: ...;
pageBodyComponent: ...;
requiredPermissions: ...;
route: ...;
sidebar: ...;
title: ...;
}
| {
description: ...;
icon: ...;
innerSidebarComponent: ...;
pageActionsComponent: ...;
pageBodyComponent: ...;
requiredPermissions: ...;
route: ...;
sidebar: ...;
title: ...;
})[];
user: (
| {
description: ...;
icon: ...;
pageActionsComponent: ...;
pageBodyComponent: ...;
requiredPermissions: ...;
route: ...;
sidebar: ...;
title: ...;
}
| {
description: ...;
icon: ...;
innerSidebarComponent: ...;
pageActionsComponent: ...;
pageBodyComponent: ...;
requiredPermissions: ...;
route: ...;
sidebar: ...;
title: ...;
})[];
};
settingsPage: {
endpoint: string;
fields: (
| {
color: ... | ... | ... | ... | ... | ... | ...;
defaultChecked: ... | ... | ...;
input: "checkbox";
label: string;
name: string;
readOnly: ... | ... | ...;
required: ... | ... | ...;
size: ... | ... | ... | ...;
}
| {
defaultValue: ... | ...;
input: "input";
label: string;
name: string;
placeholder: ... | ...;
readOnly: ... | ... | ...;
required: ... | ... | ...;
type: ... | ... | ... | ... | ... | ... | ... | ...;
}
| {
defaultValue: ... | ...;
input: "textarea";
label: string;
name: string;
placeholder: ... | ...;
readOnly: ... | ... | ...;
required: ... | ... | ...;
}
| {
color: ... | ... | ... | ... | ... | ... | ...;
defaultValue: ... | ...;
direction: ... | ... | ...;
input: "radio";
label: string;
name: string;
options: ...[];
readOnly: ... | ... | ...;
required: ... | ... | ...;
}
| {
defaultValue: ... | ...;
input: "select";
label: string;
name: string;
options: ...[];
placeholder: ... | ...;
readOnly: ... | ... | ...;
required: ... | ... | ...;
type: ... | ... | ...;
}
| {
alignCenter: ... | ... | ...;
fields: ...[];
gapSize: ... | ... | ... | ...;
input: "row";
label: string;
name: string;
readOnly: ... | ... | ...;
required: ... | ... | ...;
})[];
};
}]) => void;
setFrontend: (...args: [{
frontendNavigationLinks: {
href: string;
label: string;
}[];
}]) => void;
setRendering: (...args: [{
pageTypes: {
apiEndpoint: string;
description: string;
fields: (... | ... | ... | ... | ... | ...)[];
identifier: string;
label: string;
pageContentComponent: string;
rendererComponent: string;
}[];
}]) => void;
setSitemap: (...args: [{
sitemaps: {
pluginName: string;
sitemapXMLEndpointPath: string | URL;
}[];
triggerSitemap: boolean;
}]) => void;
}>;

Defined in: studiocms/packages/studiocms/src/schemas/plugins/index.ts:188


Defined in: studiocms/packages/studiocms/src/schemas/plugins/index.ts:191

hooks: {
studiocms:astro:config: PluginHook<{
addIntegrations: (...args: [AstroIntegration | AstroIntegration[]]) => void;
logger: AstroIntegrationLogger;
}>;
studiocms:config:setup: PluginHook<{
logger: AstroIntegrationLogger;
setDashboard: (...args: [{
dashboardGridItems: GridItemInput[];
dashboardPages: {
admin: ... | ...;
user: ... | ...;
};
settingsPage: {
endpoint: string;
fields: ...[];
};
}]) => void;
setFrontend: (...args: [{
frontendNavigationLinks: {
href: ...;
label: ...;
}[];
}]) => void;
setRendering: (...args: [{
pageTypes: {
apiEndpoint: ...;
description: ...;
fields: ...;
identifier: ...;
label: ...;
pageContentComponent: ...;
rendererComponent: ...;
}[];
}]) => void;
setSitemap: (...args: [{
sitemaps: {
pluginName: ...;
sitemapXMLEndpointPath: ...;
}[];
triggerSitemap: boolean;
}]) => void;
}>;
} & Partial<Record<string, unknown>>;

Defined in: studiocms/packages/studiocms/src/schemas/plugins/index.ts:195

optional studiocms:astro:config: PluginHook<{
addIntegrations: (...args: [AstroIntegration | AstroIntegration[]]) => void;
logger: AstroIntegrationLogger;
}>;
optional studiocms:config:setup: PluginHook<{
logger: AstroIntegrationLogger;
setDashboard: (...args: [{
dashboardGridItems: GridItemInput[];
dashboardPages: {
admin: ... | ...;
user: ... | ...;
};
settingsPage: {
endpoint: string;
fields: ...[];
};
}]) => void;
setFrontend: (...args: [{
frontendNavigationLinks: {
href: ...;
label: ...;
}[];
}]) => void;
setRendering: (...args: [{
pageTypes: {
apiEndpoint: ...;
description: ...;
fields: ...;
identifier: ...;
label: ...;
pageContentComponent: ...;
rendererComponent: ...;
}[];
}]) => void;
setSitemap: (...args: [{
sitemaps: {
pluginName: ...;
sitemapXMLEndpointPath: ...;
}[];
triggerSitemap: boolean;
}]) => void;
}>;

identifier: string;

Defined in: studiocms/packages/studiocms/src/schemas/plugins/index.ts:192

name: string;

Defined in: studiocms/packages/studiocms/src/schemas/plugins/index.ts:193

studiocmsMinimumVersion: string;

Defined in: studiocms/packages/studiocms/src/schemas/plugins/index.ts:194


Defined in: studiocms/packages/studiocms/src/schemas/plugins/index.ts:179

optional studiocms:plugins: PluginHook<{
exposePlugins: (...args: [
| undefined
| StudioCMSPlugin[]]) => void;
}>;

Defined in: studiocms/packages/studiocms/src/schemas/plugins/index.ts:180

type HookParameters<Hook, Fn> = Fn extends (...args: any) => any ? Parameters<Fn>[0] : never;

Defined in: studiocms/packages/studiocms/src/schemas/plugins/index.ts:200

Hook extends keyof StudioCMSPlugin["hooks"]

Fn = StudioCMSPlugin["hooks"][Hook]


type SafePluginListItemType = z.infer<typeof SafePluginListItemSchema>;

Defined in: studiocms/packages/studiocms/src/schemas/plugins/index.ts:206


type SafePluginListType = z.infer<typeof SafePluginListSchema>;

Defined in: studiocms/packages/studiocms/src/schemas/plugins/index.ts:207

const SafePluginListItemSchema: ZodObject<{
frontendNavigationLinks: ZodOptional<ZodOptional<ZodArray<ZodObject<{
href: ZodString;
label: ZodString;
}, "strip", ZodTypeAny, {
href: string;
label: string;
}, {
href: string;
label: string;
}>, "many">>>;
identifier: ZodString;
name: ZodString;
pageTypes: ZodOptional<ZodOptional<ZodArray<ZodObject<{
apiEndpoint: ZodOptional<ZodString>;
description: ZodOptional<ZodString>;
fields: ZodOptional<ZodArray<ZodUnion<[..., ...]>, "many">>;
identifier: ZodString;
label: ZodString;
pageContentComponent: ZodOptional<ZodUnion<[ZodUnion<...>, ZodString]>>;
rendererComponent: ZodOptional<ZodUnion<[ZodUnion<...>, ZodString]>>;
}, "strip", ZodTypeAny, {
apiEndpoint: string;
description: string;
fields: (
| {
color: ...;
defaultChecked: ...;
input: ...;
label: ...;
name: ...;
readOnly: ...;
required: ...;
size: ...;
}
| {
defaultValue: ...;
input: ...;
label: ...;
name: ...;
placeholder: ...;
readOnly: ...;
required: ...;
type: ...;
}
| {
defaultValue: ...;
input: ...;
label: ...;
name: ...;
placeholder: ...;
readOnly: ...;
required: ...;
}
| {
color: ...;
defaultValue: ...;
direction: ...;
input: ...;
label: ...;
name: ...;
options: ...;
readOnly: ...;
required: ...;
}
| {
defaultValue: ...;
input: ...;
label: ...;
name: ...;
options: ...;
placeholder: ...;
readOnly: ...;
required: ...;
type: ...;
}
| {
alignCenter: ...;
fields: ...;
gapSize: ...;
input: ...;
label: ...;
name: ...;
readOnly: ...;
required: ...;
})[];
identifier: string;
label: string;
pageContentComponent: string;
rendererComponent: string;
}, {
apiEndpoint: string;
description: string;
fields: (
| {
color: ...;
defaultChecked: ...;
input: ...;
label: ...;
name: ...;
readOnly: ...;
required: ...;
size: ...;
}
| {
defaultValue: ...;
input: ...;
label: ...;
name: ...;
placeholder: ...;
readOnly: ...;
required: ...;
type: ...;
}
| {
defaultValue: ...;
input: ...;
label: ...;
name: ...;
placeholder: ...;
readOnly: ...;
required: ...;
}
| {
color: ...;
defaultValue: ...;
direction: ...;
input: ...;
label: ...;
name: ...;
options: ...;
readOnly: ...;
required: ...;
}
| {
defaultValue: ...;
input: ...;
label: ...;
name: ...;
options: ...;
placeholder: ...;
readOnly: ...;
required: ...;
type: ...;
}
| {
alignCenter: ...;
fields: ...;
gapSize: ...;
input: ...;
label: ...;
name: ...;
readOnly: ...;
required: ...;
})[];
identifier: string;
label: string;
pageContentComponent: string;
rendererComponent: string;
}>, "many">>>;
settingsPage: ZodOptional<ZodOptional<ZodObject<{
endpoint: ZodString;
fields: ZodArray<ZodUnion<[ZodUnion<[..., ..., ..., ..., ...]>, ZodObject<extendShape<..., ...>, "strip", ZodTypeAny, {
alignCenter: ...;
fields: ...;
gapSize: ...;
input: ...;
label: ...;
name: ...;
readOnly: ...;
required: ...;
}, {
alignCenter: ...;
fields: ...;
gapSize: ...;
input: ...;
label: ...;
name: ...;
readOnly: ...;
required: ...;
}>]>, "many">;
}, "strip", ZodTypeAny, {
endpoint: string;
fields: (
| {
color: "info" | "success" | "primary" | "warning" | "danger" | "mono";
defaultChecked: boolean;
input: "checkbox";
label: string;
name: string;
readOnly: boolean;
required: boolean;
size: "sm" | "md" | "lg";
}
| {
defaultValue: string;
input: "input";
label: string;
name: string;
placeholder: string;
readOnly: boolean;
required: boolean;
type: "number" | "password" | "text" | "url" | "email" | "search" | "tel";
}
| {
defaultValue: string;
input: "textarea";
label: string;
name: string;
placeholder: string;
readOnly: boolean;
required: boolean;
}
| {
color: "info" | "success" | "primary" | "warning" | "danger" | "mono";
defaultValue: string;
direction: "horizontal" | "vertical";
input: "radio";
label: string;
name: string;
options: {
disabled: ...;
label: ...;
value: ...;
}[];
readOnly: boolean;
required: boolean;
}
| {
defaultValue: string;
input: "select";
label: string;
name: string;
options: {
disabled: ...;
label: ...;
value: ...;
}[];
placeholder: string;
readOnly: boolean;
required: boolean;
type: "search" | "basic";
}
| {
alignCenter: boolean;
fields: (... | ... | ... | ... | ...)[];
gapSize: "sm" | "md" | "lg";
input: "row";
label: string;
name: string;
readOnly: boolean;
required: boolean;
})[];
}, {
endpoint: string;
fields: (
| {
color: "info" | "success" | "primary" | "warning" | "danger" | "mono";
defaultChecked: boolean;
input: "checkbox";
label: string;
name: string;
readOnly: boolean;
required: boolean;
size: "sm" | "md" | "lg";
}
| {
defaultValue: string;
input: "input";
label: string;
name: string;
placeholder: string;
readOnly: boolean;
required: boolean;
type: "number" | "password" | "text" | "url" | "email" | "search" | "tel";
}
| {
defaultValue: string;
input: "textarea";
label: string;
name: string;
placeholder: string;
readOnly: boolean;
required: boolean;
}
| {
color: "info" | "success" | "primary" | "warning" | "danger" | "mono";
defaultValue: string;
direction: "horizontal" | "vertical";
input: "radio";
label: string;
name: string;
options: {
disabled: ...;
label: ...;
value: ...;
}[];
readOnly: boolean;
required: boolean;
}
| {
defaultValue: string;
input: "select";
label: string;
name: string;
options: {
disabled: ...;
label: ...;
value: ...;
}[];
placeholder: string;
readOnly: boolean;
required: boolean;
type: "search" | "basic";
}
| {
alignCenter: boolean;
fields: (... | ... | ... | ... | ...)[];
gapSize: "sm" | "md" | "lg";
input: "row";
label: string;
name: string;
readOnly: boolean;
required: boolean;
})[];
}>>>;
}, "strip", ZodTypeAny, {
frontendNavigationLinks: {
href: string;
label: string;
}[];
identifier: string;
name: string;
pageTypes: {
apiEndpoint: string;
description: string;
fields: (
| {
color: "info" | "success" | "primary" | "warning" | "danger" | "mono";
defaultChecked: boolean;
input: "checkbox";
label: string;
name: string;
readOnly: boolean;
required: boolean;
size: "sm" | "md" | "lg";
}
| {
defaultValue: string;
input: "input";
label: string;
name: string;
placeholder: string;
readOnly: boolean;
required: boolean;
type: "number" | "password" | "text" | "url" | "email" | "search" | "tel";
}
| {
defaultValue: string;
input: "textarea";
label: string;
name: string;
placeholder: string;
readOnly: boolean;
required: boolean;
}
| {
color: "info" | "success" | "primary" | "warning" | "danger" | "mono";
defaultValue: string;
direction: "horizontal" | "vertical";
input: "radio";
label: string;
name: string;
options: {
disabled: ...;
label: ...;
value: ...;
}[];
readOnly: boolean;
required: boolean;
}
| {
defaultValue: string;
input: "select";
label: string;
name: string;
options: {
disabled: ...;
label: ...;
value: ...;
}[];
placeholder: string;
readOnly: boolean;
required: boolean;
type: "search" | "basic";
}
| {
alignCenter: boolean;
fields: (... | ... | ... | ... | ...)[];
gapSize: "sm" | "md" | "lg";
input: "row";
label: string;
name: string;
readOnly: boolean;
required: boolean;
})[];
identifier: string;
label: string;
pageContentComponent: string;
rendererComponent: string;
}[];
settingsPage: {
endpoint: string;
fields: (
| {
color: "info" | "success" | "primary" | "warning" | "danger" | "mono";
defaultChecked: boolean;
input: "checkbox";
label: string;
name: string;
readOnly: boolean;
required: boolean;
size: "sm" | "md" | "lg";
}
| {
defaultValue: string;
input: "input";
label: string;
name: string;
placeholder: string;
readOnly: boolean;
required: boolean;
type: "number" | "password" | "text" | "url" | "email" | "search" | "tel";
}
| {
defaultValue: string;
input: "textarea";
label: string;
name: string;
placeholder: string;
readOnly: boolean;
required: boolean;
}
| {
color: "info" | "success" | "primary" | "warning" | "danger" | "mono";
defaultValue: string;
direction: "horizontal" | "vertical";
input: "radio";
label: string;
name: string;
options: {
disabled: boolean;
label: string;
value: string;
}[];
readOnly: boolean;
required: boolean;
}
| {
defaultValue: string;
input: "select";
label: string;
name: string;
options: {
disabled: boolean;
label: string;
value: string;
}[];
placeholder: string;
readOnly: boolean;
required: boolean;
type: "search" | "basic";
}
| {
alignCenter: boolean;
fields: (
| {
color: ... | ... | ... | ... | ... | ... | ...;
defaultChecked: ... | ... | ...;
input: "checkbox";
label: string;
name: string;
readOnly: ... | ... | ...;
required: ... | ... | ...;
size: ... | ... | ... | ...;
}
| {
defaultValue: ... | ...;
input: "input";
label: string;
name: string;
placeholder: ... | ...;
readOnly: ... | ... | ...;
required: ... | ... | ...;
type: ... | ... | ... | ... | ... | ... | ... | ...;
}
| {
defaultValue: ... | ...;
input: "textarea";
label: string;
name: string;
placeholder: ... | ...;
readOnly: ... | ... | ...;
required: ... | ... | ...;
}
| {
color: ... | ... | ... | ... | ... | ... | ...;
defaultValue: ... | ...;
direction: ... | ... | ...;
input: "radio";
label: string;
name: string;
options: ...[];
readOnly: ... | ... | ...;
required: ... | ... | ...;
}
| {
defaultValue: ... | ...;
input: "select";
label: string;
name: string;
options: ...[];
placeholder: ... | ...;
readOnly: ... | ... | ...;
required: ... | ... | ...;
type: ... | ... | ...;
})[];
gapSize: "sm" | "md" | "lg";
input: "row";
label: string;
name: string;
readOnly: boolean;
required: boolean;
})[];
};
}, {
frontendNavigationLinks: {
href: string;
label: string;
}[];
identifier: string;
name: string;
pageTypes: {
apiEndpoint: string;
description: string;
fields: (
| {
color: "info" | "success" | "primary" | "warning" | "danger" | "mono";
defaultChecked: boolean;
input: "checkbox";
label: string;
name: string;
readOnly: boolean;
required: boolean;
size: "sm" | "md" | "lg";
}
| {
defaultValue: string;
input: "input";
label: string;
name: string;
placeholder: string;
readOnly: boolean;
required: boolean;
type: "number" | "password" | "text" | "url" | "email" | "search" | "tel";
}
| {
defaultValue: string;
input: "textarea";
label: string;
name: string;
placeholder: string;
readOnly: boolean;
required: boolean;
}
| {
color: "info" | "success" | "primary" | "warning" | "danger" | "mono";
defaultValue: string;
direction: "horizontal" | "vertical";
input: "radio";
label: string;
name: string;
options: {
disabled: ...;
label: ...;
value: ...;
}[];
readOnly: boolean;
required: boolean;
}
| {
defaultValue: string;
input: "select";
label: string;
name: string;
options: {
disabled: ...;
label: ...;
value: ...;
}[];
placeholder: string;
readOnly: boolean;
required: boolean;
type: "search" | "basic";
}
| {
alignCenter: boolean;
fields: (... | ... | ... | ... | ...)[];
gapSize: "sm" | "md" | "lg";
input: "row";
label: string;
name: string;
readOnly: boolean;
required: boolean;
})[];
identifier: string;
label: string;
pageContentComponent: string;
rendererComponent: string;
}[];
settingsPage: {
endpoint: string;
fields: (
| {
color: "info" | "success" | "primary" | "warning" | "danger" | "mono";
defaultChecked: boolean;
input: "checkbox";
label: string;
name: string;
readOnly: boolean;
required: boolean;
size: "sm" | "md" | "lg";
}
| {
defaultValue: string;
input: "input";
label: string;
name: string;
placeholder: string;
readOnly: boolean;
required: boolean;
type: "number" | "password" | "text" | "url" | "email" | "search" | "tel";
}
| {
defaultValue: string;
input: "textarea";
label: string;
name: string;
placeholder: string;
readOnly: boolean;
required: boolean;
}
| {
color: "info" | "success" | "primary" | "warning" | "danger" | "mono";
defaultValue: string;
direction: "horizontal" | "vertical";
input: "radio";
label: string;
name: string;
options: {
disabled: boolean;
label: string;
value: string;
}[];
readOnly: boolean;
required: boolean;
}
| {
defaultValue: string;
input: "select";
label: string;
name: string;
options: {
disabled: boolean;
label: string;
value: string;
}[];
placeholder: string;
readOnly: boolean;
required: boolean;
type: "search" | "basic";
}
| {
alignCenter: boolean;
fields: (
| {
color: ... | ... | ... | ... | ... | ... | ...;
defaultChecked: ... | ... | ...;
input: "checkbox";
label: string;
name: string;
readOnly: ... | ... | ...;
required: ... | ... | ...;
size: ... | ... | ... | ...;
}
| {
defaultValue: ... | ...;
input: "input";
label: string;
name: string;
placeholder: ... | ...;
readOnly: ... | ... | ...;
required: ... | ... | ...;
type: ... | ... | ... | ... | ... | ... | ... | ...;
}
| {
defaultValue: ... | ...;
input: "textarea";
label: string;
name: string;
placeholder: ... | ...;
readOnly: ... | ... | ...;
required: ... | ... | ...;
}
| {
color: ... | ... | ... | ... | ... | ... | ...;
defaultValue: ... | ...;
direction: ... | ... | ...;
input: "radio";
label: string;
name: string;
options: ...[];
readOnly: ... | ... | ...;
required: ... | ... | ...;
}
| {
defaultValue: ... | ...;
input: "select";
label: string;
name: string;
options: ...[];
placeholder: ... | ...;
readOnly: ... | ... | ...;
required: ... | ... | ...;
type: ... | ... | ...;
})[];
gapSize: "sm" | "md" | "lg";
input: "row";
label: string;
name: string;
readOnly: boolean;
required: boolean;
})[];
};
}>;

Defined in: studiocms/packages/studiocms/src/schemas/plugins/index.ts:28

A schema for a safe plugin list item in StudioCMS. This schema omits certain properties from the StudioCMSPluginSchema:

  • integration
  • studiocmsMinimumVersion
  • sitemaps
  • dashboardGridItems
  • triggerSitemap

These properties are excluded to ensure that the plugin list item schema only includes the necessary and safe properties for use in the application.


const SafePluginListSchema: ZodArray<ZodObject<{
frontendNavigationLinks: ZodOptional<ZodOptional<ZodArray<ZodObject<{
href: ZodString;
label: ZodString;
}, "strip", ZodTypeAny, {
href: string;
label: string;
}, {
href: string;
label: string;
}>, "many">>>;
identifier: ZodString;
name: ZodString;
pageTypes: ZodOptional<ZodOptional<ZodArray<ZodObject<{
apiEndpoint: ZodOptional<ZodString>;
description: ZodOptional<ZodString>;
fields: ZodOptional<ZodArray<ZodUnion<...>, "many">>;
identifier: ZodString;
label: ZodString;
pageContentComponent: ZodOptional<ZodUnion<[..., ...]>>;
rendererComponent: ZodOptional<ZodUnion<[..., ...]>>;
}, "strip", ZodTypeAny, {
apiEndpoint: string;
description: string;
fields: (... | ... | ... | ... | ... | ...)[];
identifier: string;
label: string;
pageContentComponent: string;
rendererComponent: string;
}, {
apiEndpoint: string;
description: string;
fields: (... | ... | ... | ... | ... | ...)[];
identifier: string;
label: string;
pageContentComponent: string;
rendererComponent: string;
}>, "many">>>;
settingsPage: ZodOptional<ZodOptional<ZodObject<{
endpoint: ZodString;
fields: ZodArray<ZodUnion<[ZodUnion<...>, ZodObject<..., ..., ..., ..., ...>]>, "many">;
}, "strip", ZodTypeAny, {
endpoint: string;
fields: (
| {
color: ... | ... | ... | ... | ... | ... | ...;
defaultChecked: ... | ... | ...;
input: "checkbox";
label: string;
name: string;
readOnly: ... | ... | ...;
required: ... | ... | ...;
size: ... | ... | ... | ...;
}
| {
defaultValue: ... | ...;
input: "input";
label: string;
name: string;
placeholder: ... | ...;
readOnly: ... | ... | ...;
required: ... | ... | ...;
type: ... | ... | ... | ... | ... | ... | ... | ...;
}
| {
defaultValue: ... | ...;
input: "textarea";
label: string;
name: string;
placeholder: ... | ...;
readOnly: ... | ... | ...;
required: ... | ... | ...;
}
| {
color: ... | ... | ... | ... | ... | ... | ...;
defaultValue: ... | ...;
direction: ... | ... | ...;
input: "radio";
label: string;
name: string;
options: ...[];
readOnly: ... | ... | ...;
required: ... | ... | ...;
}
| {
defaultValue: ... | ...;
input: "select";
label: string;
name: string;
options: ...[];
placeholder: ... | ...;
readOnly: ... | ... | ...;
required: ... | ... | ...;
type: ... | ... | ...;
}
| {
alignCenter: ... | ... | ...;
fields: ...[];
gapSize: ... | ... | ... | ...;
input: "row";
label: string;
name: string;
readOnly: ... | ... | ...;
required: ... | ... | ...;
})[];
}, {
endpoint: string;
fields: (
| {
color: ... | ... | ... | ... | ... | ... | ...;
defaultChecked: ... | ... | ...;
input: "checkbox";
label: string;
name: string;
readOnly: ... | ... | ...;
required: ... | ... | ...;
size: ... | ... | ... | ...;
}
| {
defaultValue: ... | ...;
input: "input";
label: string;
name: string;
placeholder: ... | ...;
readOnly: ... | ... | ...;
required: ... | ... | ...;
type: ... | ... | ... | ... | ... | ... | ... | ...;
}
| {
defaultValue: ... | ...;
input: "textarea";
label: string;
name: string;
placeholder: ... | ...;
readOnly: ... | ... | ...;
required: ... | ... | ...;
}
| {
color: ... | ... | ... | ... | ... | ... | ...;
defaultValue: ... | ...;
direction: ... | ... | ...;
input: "radio";
label: string;
name: string;
options: ...[];
readOnly: ... | ... | ...;
required: ... | ... | ...;
}
| {
defaultValue: ... | ...;
input: "select";
label: string;
name: string;
options: ...[];
placeholder: ... | ...;
readOnly: ... | ... | ...;
required: ... | ... | ...;
type: ... | ... | ...;
}
| {
alignCenter: ... | ... | ...;
fields: ...[];
gapSize: ... | ... | ... | ...;
input: "row";
label: string;
name: string;
readOnly: ... | ... | ...;
required: ... | ... | ...;
})[];
}>>>;
}, "strip", ZodTypeAny, {
frontendNavigationLinks: {
href: string;
label: string;
}[];
identifier: string;
name: string;
pageTypes: {
apiEndpoint: string;
description: string;
fields: (
| {
color: ... | ... | ... | ... | ... | ... | ...;
defaultChecked: ... | ... | ...;
input: "checkbox";
label: string;
name: string;
readOnly: ... | ... | ...;
required: ... | ... | ...;
size: ... | ... | ... | ...;
}
| {
defaultValue: ... | ...;
input: "input";
label: string;
name: string;
placeholder: ... | ...;
readOnly: ... | ... | ...;
required: ... | ... | ...;
type: ... | ... | ... | ... | ... | ... | ... | ...;
}
| {
defaultValue: ... | ...;
input: "textarea";
label: string;
name: string;
placeholder: ... | ...;
readOnly: ... | ... | ...;
required: ... | ... | ...;
}
| {
color: ... | ... | ... | ... | ... | ... | ...;
defaultValue: ... | ...;
direction: ... | ... | ...;
input: "radio";
label: string;
name: string;
options: ...[];
readOnly: ... | ... | ...;
required: ... | ... | ...;
}
| {
defaultValue: ... | ...;
input: "select";
label: string;
name: string;
options: ...[];
placeholder: ... | ...;
readOnly: ... | ... | ...;
required: ... | ... | ...;
type: ... | ... | ...;
}
| {
alignCenter: ... | ... | ...;
fields: ...[];
gapSize: ... | ... | ... | ...;
input: "row";
label: string;
name: string;
readOnly: ... | ... | ...;
required: ... | ... | ...;
})[];
identifier: string;
label: string;
pageContentComponent: string;
rendererComponent: string;
}[];
settingsPage: {
endpoint: string;
fields: (
| {
color: "info" | "success" | "primary" | "warning" | "danger" | "mono";
defaultChecked: boolean;
input: "checkbox";
label: string;
name: string;
readOnly: boolean;
required: boolean;
size: "sm" | "md" | "lg";
}
| {
defaultValue: string;
input: "input";
label: string;
name: string;
placeholder: string;
readOnly: boolean;
required: boolean;
type: "number" | "password" | "text" | "url" | "email" | "search" | "tel";
}
| {
defaultValue: string;
input: "textarea";
label: string;
name: string;
placeholder: string;
readOnly: boolean;
required: boolean;
}
| {
color: "info" | "success" | "primary" | "warning" | "danger" | "mono";
defaultValue: string;
direction: "horizontal" | "vertical";
input: "radio";
label: string;
name: string;
options: {
disabled: ... | ... | ...;
label: string;
value: string;
}[];
readOnly: boolean;
required: boolean;
}
| {
defaultValue: string;
input: "select";
label: string;
name: string;
options: {
disabled: ... | ... | ...;
label: string;
value: string;
}[];
placeholder: string;
readOnly: boolean;
required: boolean;
type: "search" | "basic";
}
| {
alignCenter: boolean;
fields: (
| {
color: ...;
defaultChecked: ...;
input: ...;
label: ...;
name: ...;
readOnly: ...;
required: ...;
size: ...;
}
| {
defaultValue: ...;
input: ...;
label: ...;
name: ...;
placeholder: ...;
readOnly: ...;
required: ...;
type: ...;
}
| {
defaultValue: ...;
input: ...;
label: ...;
name: ...;
placeholder: ...;
readOnly: ...;
required: ...;
}
| {
color: ...;
defaultValue: ...;
direction: ...;
input: ...;
label: ...;
name: ...;
options: ...;
readOnly: ...;
required: ...;
}
| {
defaultValue: ...;
input: ...;
label: ...;
name: ...;
options: ...;
placeholder: ...;
readOnly: ...;
required: ...;
type: ...;
})[];
gapSize: "sm" | "md" | "lg";
input: "row";
label: string;
name: string;
readOnly: boolean;
required: boolean;
})[];
};
}, {
frontendNavigationLinks: {
href: string;
label: string;
}[];
identifier: string;
name: string;
pageTypes: {
apiEndpoint: string;
description: string;
fields: (
| {
color: ... | ... | ... | ... | ... | ... | ...;
defaultChecked: ... | ... | ...;
input: "checkbox";
label: string;
name: string;
readOnly: ... | ... | ...;
required: ... | ... | ...;
size: ... | ... | ... | ...;
}
| {
defaultValue: ... | ...;
input: "input";
label: string;
name: string;
placeholder: ... | ...;
readOnly: ... | ... | ...;
required: ... | ... | ...;
type: ... | ... | ... | ... | ... | ... | ... | ...;
}
| {
defaultValue: ... | ...;
input: "textarea";
label: string;
name: string;
placeholder: ... | ...;
readOnly: ... | ... | ...;
required: ... | ... | ...;
}
| {
color: ... | ... | ... | ... | ... | ... | ...;
defaultValue: ... | ...;
direction: ... | ... | ...;
input: "radio";
label: string;
name: string;
options: ...[];
readOnly: ... | ... | ...;
required: ... | ... | ...;
}
| {
defaultValue: ... | ...;
input: "select";
label: string;
name: string;
options: ...[];
placeholder: ... | ...;
readOnly: ... | ... | ...;
required: ... | ... | ...;
type: ... | ... | ...;
}
| {
alignCenter: ... | ... | ...;
fields: ...[];
gapSize: ... | ... | ... | ...;
input: "row";
label: string;
name: string;
readOnly: ... | ... | ...;
required: ... | ... | ...;
})[];
identifier: string;
label: string;
pageContentComponent: string;
rendererComponent: string;
}[];
settingsPage: {
endpoint: string;
fields: (
| {
color: "info" | "success" | "primary" | "warning" | "danger" | "mono";
defaultChecked: boolean;
input: "checkbox";
label: string;
name: string;
readOnly: boolean;
required: boolean;
size: "sm" | "md" | "lg";
}
| {
defaultValue: string;
input: "input";
label: string;
name: string;
placeholder: string;
readOnly: boolean;
required: boolean;
type: "number" | "password" | "text" | "url" | "email" | "search" | "tel";
}
| {
defaultValue: string;
input: "textarea";
label: string;
name: string;
placeholder: string;
readOnly: boolean;
required: boolean;
}
| {
color: "info" | "success" | "primary" | "warning" | "danger" | "mono";
defaultValue: string;
direction: "horizontal" | "vertical";
input: "radio";
label: string;
name: string;
options: {
disabled: ... | ... | ...;
label: string;
value: string;
}[];
readOnly: boolean;
required: boolean;
}
| {
defaultValue: string;
input: "select";
label: string;
name: string;
options: {
disabled: ... | ... | ...;
label: string;
value: string;
}[];
placeholder: string;
readOnly: boolean;
required: boolean;
type: "search" | "basic";
}
| {
alignCenter: boolean;
fields: (
| {
color: ...;
defaultChecked: ...;
input: ...;
label: ...;
name: ...;
readOnly: ...;
required: ...;
size: ...;
}
| {
defaultValue: ...;
input: ...;
label: ...;
name: ...;
placeholder: ...;
readOnly: ...;
required: ...;
type: ...;
}
| {
defaultValue: ...;
input: ...;
label: ...;
name: ...;
placeholder: ...;
readOnly: ...;
required: ...;
}
| {
color: ...;
defaultValue: ...;
direction: ...;
input: ...;
label: ...;
name: ...;
options: ...;
readOnly: ...;
required: ...;
}
| {
defaultValue: ...;
input: ...;
label: ...;
name: ...;
options: ...;
placeholder: ...;
readOnly: ...;
required: ...;
type: ...;
})[];
gapSize: "sm" | "md" | "lg";
input: "row";
label: string;
name: string;
readOnly: boolean;
required: boolean;
})[];
};
}>, "many">;

Defined in: studiocms/packages/studiocms/src/schemas/plugins/index.ts:55

function definePlugin(options: StudioCMSPlugin): StudioCMSPlugin

Defined in: studiocms/packages/studiocms/src/schemas/plugins/index.ts:223

Defines a plugin for StudioCMS.

StudioCMSPlugin

The configuration options for the plugin.

StudioCMSPlugin

The plugin configuration.

Re-exports AvailableDashboardPages


Re-exports DashboardPage


Re-exports FinalDashboardPage


Re-exports SettingsField


Re-exports StudioCMSColorway