UNPKG

@eventcatalog/linter

Version:

A linter for EventCatalog to validate frontmatter and resource references

1,514 lines (1,510 loc) 774 kB
import * as zod from 'zod'; import { z } from 'zod'; interface Badge { content: string; backgroundColor: string; textColor: string; icon?: string; url?: string; } interface Specification { type: 'asyncapi' | 'openapi'; path: string; name?: string; } interface Repository { language: string; url: string; } interface DraftObject { title: string; message: string; } interface DeprecatedObject { date: string; message?: string; } interface ResourceReference { id: string; version?: string; } interface Parameter { enum?: string[]; description?: string; examples?: string[]; default?: string; } interface FlowStep { id: string; title: string; summary?: string; actor?: { name: string; }; message?: { id: string; version: string; }; service?: { id: string; version: string; }; externalSystem?: { name: string; summary?: string; url?: string; }; next_step?: string; next_steps?: string[]; } interface EntityProperty { name: string; type: string; required?: boolean; description?: string; references?: string; referencesIdentifier?: string; referenceTarget?: 'entity'; relationType?: string; enum?: string[]; properties?: EntityProperty[]; items?: { type: string; properties?: EntityProperty[]; }; } interface ValidationError { type: 'schema' | 'reference'; resource: string; field?: string; message: string; file: string; line?: number; severity?: 'error' | 'warning'; rule?: string; } interface LinterOptions { rootDir: string; failOnWarning?: boolean; verbose?: boolean; } interface EntityPropertySchema { name: string; type: string; required?: boolean; description?: string; references?: string; referencesIdentifier?: string; referenceTarget?: 'entity'; relationType?: string; enum?: string[]; properties?: EntityPropertySchema[]; items?: { type: string; properties?: EntityPropertySchema[]; }; } declare const entitySchema: z.ZodObject<{ aggregateRoot: z.ZodOptional<z.ZodBoolean>; identifier: z.ZodOptional<z.ZodString>; properties: z.ZodOptional<z.ZodArray<z.ZodType<EntityPropertySchema, z.ZodTypeDef, EntityPropertySchema>, "many">>; services: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>; domains: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>; detailsPanel: z.ZodOptional<z.ZodObject<{ domains: z.ZodOptional<z.ZodObject<{ visible: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { visible?: boolean | undefined; }, { visible?: boolean | undefined; }>>; services: z.ZodOptional<z.ZodObject<{ visible: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { visible?: boolean | undefined; }, { visible?: boolean | undefined; }>>; messages: z.ZodOptional<z.ZodObject<{ visible: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { visible?: boolean | undefined; }, { visible?: boolean | undefined; }>>; versions: z.ZodOptional<z.ZodObject<{ visible: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { visible?: boolean | undefined; }, { visible?: boolean | undefined; }>>; owners: z.ZodOptional<z.ZodObject<{ visible: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { visible?: boolean | undefined; }, { visible?: boolean | undefined; }>>; changelog: z.ZodOptional<z.ZodObject<{ visible: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { visible?: boolean | undefined; }, { visible?: boolean | undefined; }>>; attachments: z.ZodOptional<z.ZodObject<{ visible: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { visible?: boolean | undefined; }, { visible?: boolean | undefined; }>>; }, "strip", z.ZodTypeAny, { owners?: { visible?: boolean | undefined; } | undefined; attachments?: { visible?: boolean | undefined; } | undefined; versions?: { visible?: boolean | undefined; } | undefined; services?: { visible?: boolean | undefined; } | undefined; domains?: { visible?: boolean | undefined; } | undefined; messages?: { visible?: boolean | undefined; } | undefined; changelog?: { visible?: boolean | undefined; } | undefined; }, { owners?: { visible?: boolean | undefined; } | undefined; attachments?: { visible?: boolean | undefined; } | undefined; versions?: { visible?: boolean | undefined; } | undefined; services?: { visible?: boolean | undefined; } | undefined; domains?: { visible?: boolean | undefined; } | undefined; messages?: { visible?: boolean | undefined; } | undefined; changelog?: { visible?: boolean | undefined; } | undefined; }>>; } & { id: z.ZodString; name: z.ZodString; summary: z.ZodOptional<z.ZodString>; version: z.ZodEffects<z.ZodString, string, string>; draft: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{ title: z.ZodOptional<z.ZodString>; message: z.ZodString; }, "strip", z.ZodTypeAny, { message: string; title?: string | undefined; }, { message: string; title?: string | undefined; }>]>>; badges: z.ZodOptional<z.ZodArray<z.ZodObject<{ content: z.ZodString; backgroundColor: z.ZodString; textColor: z.ZodString; icon: z.ZodOptional<z.ZodString>; url: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { content: string; backgroundColor: string; textColor: string; icon?: string | undefined; url?: string | undefined; }, { content: string; backgroundColor: string; textColor: string; icon?: string | undefined; url?: string | undefined; }>, "many">>; owners: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodObject<{ id: z.ZodString; collection: z.ZodEnum<["users", "teams"]>; }, "strip", z.ZodTypeAny, { id: string; collection: "users" | "teams"; }, { id: string; collection: "users" | "teams"; }>]>, { id: string; }, string | { id: string; collection: "users" | "teams"; }>, "many">>; schemaPath: z.ZodOptional<z.ZodString>; sidebar: z.ZodOptional<z.ZodObject<{ label: z.ZodOptional<z.ZodString>; badge: z.ZodOptional<z.ZodString>; color: z.ZodOptional<z.ZodString>; backgroundColor: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { backgroundColor?: string | undefined; label?: string | undefined; badge?: string | undefined; color?: string | undefined; }, { backgroundColor?: string | undefined; label?: string | undefined; badge?: string | undefined; color?: string | undefined; }>>; repository: z.ZodOptional<z.ZodObject<{ language: z.ZodOptional<z.ZodString>; url: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { url?: string | undefined; language?: string | undefined; }, { url?: string | undefined; language?: string | undefined; }>>; specifications: z.ZodOptional<z.ZodUnion<[z.ZodObject<{ openapiPath: z.ZodOptional<z.ZodString>; asyncapiPath: z.ZodOptional<z.ZodString>; graphqlPath: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { openapiPath?: string | undefined; asyncapiPath?: string | undefined; graphqlPath?: string | undefined; }, { openapiPath?: string | undefined; asyncapiPath?: string | undefined; graphqlPath?: string | undefined; }>, z.ZodArray<z.ZodObject<{ type: z.ZodEnum<["openapi", "asyncapi", "graphql"]>; path: z.ZodString; name: z.ZodOptional<z.ZodString>; headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; }, "strip", z.ZodTypeAny, { path: string; type: "asyncapi" | "openapi" | "graphql"; name?: string | undefined; headers?: Record<string, string> | undefined; }, { path: string; type: "asyncapi" | "openapi" | "graphql"; name?: string | undefined; headers?: Record<string, string> | undefined; }>, "many">]>>; hidden: z.ZodOptional<z.ZodBoolean>; editUrl: z.ZodOptional<z.ZodString>; resourceGroups: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodOptional<z.ZodString>; title: z.ZodOptional<z.ZodString>; items: z.ZodArray<z.ZodObject<{ id: z.ZodString; version: z.ZodDefault<z.ZodOptional<z.ZodString>>; type: z.ZodEnum<["agent", "service", "event", "command", "query", "flow", "channel", "domain", "system", "user", "team", "container", "entity", "diagram", "data-product", "adr"]>; }, "strip", z.ZodTypeAny, { type: "entity" | "agent" | "service" | "event" | "command" | "query" | "flow" | "channel" | "domain" | "system" | "user" | "team" | "container" | "diagram" | "data-product" | "adr"; id: string; version: string; }, { type: "entity" | "agent" | "service" | "event" | "command" | "query" | "flow" | "channel" | "domain" | "system" | "user" | "team" | "container" | "diagram" | "data-product" | "adr"; id: string; version?: string | undefined; }>, "many">; limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>; sidebar: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; }, "strip", z.ZodTypeAny, { items: { type: "entity" | "agent" | "service" | "event" | "command" | "query" | "flow" | "channel" | "domain" | "system" | "user" | "team" | "container" | "diagram" | "data-product" | "adr"; id: string; version: string; }[]; limit: number; sidebar: boolean; id?: string | undefined; title?: string | undefined; }, { items: { type: "entity" | "agent" | "service" | "event" | "command" | "query" | "flow" | "channel" | "domain" | "system" | "user" | "team" | "container" | "diagram" | "data-product" | "adr"; id: string; version?: string | undefined; }[]; id?: string | undefined; title?: string | undefined; limit?: number | undefined; sidebar?: boolean | undefined; }>, "many">>; styles: z.ZodOptional<z.ZodObject<{ icon: z.ZodOptional<z.ZodString>; node: z.ZodOptional<z.ZodObject<{ color: z.ZodOptional<z.ZodString>; label: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { label?: string | undefined; color?: string | undefined; }, { label?: string | undefined; color?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { icon?: string | undefined; node?: { label?: string | undefined; color?: string | undefined; } | undefined; }, { icon?: string | undefined; node?: { label?: string | undefined; color?: string | undefined; } | undefined; }>>; deprecated: z.ZodOptional<z.ZodUnion<[z.ZodObject<{ message: z.ZodOptional<z.ZodString>; date: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodDate]>>; }, "strip", z.ZodTypeAny, { message?: string | undefined; date?: string | Date | undefined; }, { message?: string | undefined; date?: string | Date | undefined; }>, z.ZodOptional<z.ZodBoolean>]>>; visualiser: z.ZodOptional<z.ZodBoolean>; attachments: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{ url: z.ZodString; title: z.ZodOptional<z.ZodString>; type: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; icon: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { url: string; icon?: string | undefined; type?: string | undefined; title?: string | undefined; description?: string | undefined; }, { url: string; icon?: string | undefined; type?: string | undefined; title?: string | undefined; description?: string | undefined; }>]>, "many">>; diagrams: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; version: z.ZodDefault<z.ZodOptional<z.ZodString>>; }, "strip", z.ZodTypeAny, { id: string; version: string; }, { id: string; version?: string | undefined; }>, "many">>; versions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; latestVersion: z.ZodOptional<z.ZodString>; catalog: z.ZodOptional<z.ZodObject<{ path: z.ZodString; filePath: z.ZodString; astroContentFilePath: z.ZodString; publicPath: z.ZodString; type: z.ZodString; }, "strip", z.ZodTypeAny, { path: string; type: string; filePath: string; astroContentFilePath: string; publicPath: string; }, { path: string; type: string; filePath: string; astroContentFilePath: string; publicPath: string; }>>; }, "strip", z.ZodTypeAny, { id: string; name: string; version: string; sidebar?: { backgroundColor?: string | undefined; label?: string | undefined; badge?: string | undefined; color?: string | undefined; } | undefined; summary?: string | undefined; draft?: boolean | { message: string; title?: string | undefined; } | undefined; badges?: { content: string; backgroundColor: string; textColor: string; icon?: string | undefined; url?: string | undefined; }[] | undefined; owners?: { id: string; }[] | undefined; schemaPath?: string | undefined; repository?: { url?: string | undefined; language?: string | undefined; } | undefined; specifications?: { openapiPath?: string | undefined; asyncapiPath?: string | undefined; graphqlPath?: string | undefined; } | { path: string; type: "asyncapi" | "openapi" | "graphql"; name?: string | undefined; headers?: Record<string, string> | undefined; }[] | undefined; hidden?: boolean | undefined; editUrl?: string | undefined; resourceGroups?: { items: { type: "entity" | "agent" | "service" | "event" | "command" | "query" | "flow" | "channel" | "domain" | "system" | "user" | "team" | "container" | "diagram" | "data-product" | "adr"; id: string; version: string; }[]; limit: number; sidebar: boolean; id?: string | undefined; title?: string | undefined; }[] | undefined; styles?: { icon?: string | undefined; node?: { label?: string | undefined; color?: string | undefined; } | undefined; } | undefined; deprecated?: boolean | { message?: string | undefined; date?: string | Date | undefined; } | undefined; visualiser?: boolean | undefined; attachments?: (string | { url: string; icon?: string | undefined; type?: string | undefined; title?: string | undefined; description?: string | undefined; })[] | undefined; diagrams?: { id: string; version: string; }[] | undefined; versions?: string[] | undefined; latestVersion?: string | undefined; catalog?: { path: string; type: string; filePath: string; astroContentFilePath: string; publicPath: string; } | undefined; services?: any[] | undefined; domains?: any[] | undefined; detailsPanel?: { owners?: { visible?: boolean | undefined; } | undefined; attachments?: { visible?: boolean | undefined; } | undefined; versions?: { visible?: boolean | undefined; } | undefined; services?: { visible?: boolean | undefined; } | undefined; domains?: { visible?: boolean | undefined; } | undefined; messages?: { visible?: boolean | undefined; } | undefined; changelog?: { visible?: boolean | undefined; } | undefined; } | undefined; properties?: EntityPropertySchema[] | undefined; aggregateRoot?: boolean | undefined; identifier?: string | undefined; }, { id: string; name: string; version: string; sidebar?: { backgroundColor?: string | undefined; label?: string | undefined; badge?: string | undefined; color?: string | undefined; } | undefined; summary?: string | undefined; draft?: boolean | { message: string; title?: string | undefined; } | undefined; badges?: { content: string; backgroundColor: string; textColor: string; icon?: string | undefined; url?: string | undefined; }[] | undefined; owners?: (string | { id: string; collection: "users" | "teams"; })[] | undefined; schemaPath?: string | undefined; repository?: { url?: string | undefined; language?: string | undefined; } | undefined; specifications?: { openapiPath?: string | undefined; asyncapiPath?: string | undefined; graphqlPath?: string | undefined; } | { path: string; type: "asyncapi" | "openapi" | "graphql"; name?: string | undefined; headers?: Record<string, string> | undefined; }[] | undefined; hidden?: boolean | undefined; editUrl?: string | undefined; resourceGroups?: { items: { type: "entity" | "agent" | "service" | "event" | "command" | "query" | "flow" | "channel" | "domain" | "system" | "user" | "team" | "container" | "diagram" | "data-product" | "adr"; id: string; version?: string | undefined; }[]; id?: string | undefined; title?: string | undefined; limit?: number | undefined; sidebar?: boolean | undefined; }[] | undefined; styles?: { icon?: string | undefined; node?: { label?: string | undefined; color?: string | undefined; } | undefined; } | undefined; deprecated?: boolean | { message?: string | undefined; date?: string | Date | undefined; } | undefined; visualiser?: boolean | undefined; attachments?: (string | { url: string; icon?: string | undefined; type?: string | undefined; title?: string | undefined; description?: string | undefined; })[] | undefined; diagrams?: { id: string; version?: string | undefined; }[] | undefined; versions?: string[] | undefined; latestVersion?: string | undefined; catalog?: { path: string; type: string; filePath: string; astroContentFilePath: string; publicPath: string; } | undefined; services?: any[] | undefined; domains?: any[] | undefined; detailsPanel?: { owners?: { visible?: boolean | undefined; } | undefined; attachments?: { visible?: boolean | undefined; } | undefined; versions?: { visible?: boolean | undefined; } | undefined; services?: { visible?: boolean | undefined; } | undefined; domains?: { visible?: boolean | undefined; } | undefined; messages?: { visible?: boolean | undefined; } | undefined; changelog?: { visible?: boolean | undefined; } | undefined; } | undefined; properties?: EntityPropertySchema[] | undefined; aggregateRoot?: boolean | undefined; identifier?: string | undefined; }>; declare const badgeSchema: z.ZodObject<{ content: z.ZodString; backgroundColor: z.ZodString; textColor: z.ZodString; icon: z.ZodOptional<z.ZodString>; url: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { content: string; backgroundColor: string; textColor: string; icon?: string | undefined; url?: string | undefined; }, { content: string; backgroundColor: string; textColor: string; icon?: string | undefined; url?: string | undefined; }>; declare const ownerReferenceSchema: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodObject<{ id: z.ZodString; collection: z.ZodEnum<["users", "teams"]>; }, "strip", z.ZodTypeAny, { id: string; collection: "users" | "teams"; }, { id: string; collection: "users" | "teams"; }>]>, { id: string; }, string | { id: string; collection: "users" | "teams"; }>; declare const specificationSchema: z.ZodUnion<[z.ZodObject<{ openapiPath: z.ZodOptional<z.ZodString>; asyncapiPath: z.ZodOptional<z.ZodString>; graphqlPath: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { openapiPath?: string | undefined; asyncapiPath?: string | undefined; graphqlPath?: string | undefined; }, { openapiPath?: string | undefined; asyncapiPath?: string | undefined; graphqlPath?: string | undefined; }>, z.ZodArray<z.ZodObject<{ type: z.ZodEnum<["openapi", "asyncapi", "graphql"]>; path: z.ZodString; name: z.ZodOptional<z.ZodString>; headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; }, "strip", z.ZodTypeAny, { path: string; type: "asyncapi" | "openapi" | "graphql"; name?: string | undefined; headers?: Record<string, string> | undefined; }, { path: string; type: "asyncapi" | "openapi" | "graphql"; name?: string | undefined; headers?: Record<string, string> | undefined; }>, "many">]>; declare const repositorySchema: z.ZodObject<{ language: z.ZodOptional<z.ZodString>; url: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { url?: string | undefined; language?: string | undefined; }, { url?: string | undefined; language?: string | undefined; }>; declare const draftSchema: z.ZodUnion<[z.ZodBoolean, z.ZodObject<{ title: z.ZodOptional<z.ZodString>; message: z.ZodString; }, "strip", z.ZodTypeAny, { message: string; title?: string | undefined; }, { message: string; title?: string | undefined; }>]>; declare const deprecatedSchema: z.ZodUnion<[z.ZodObject<{ message: z.ZodOptional<z.ZodString>; date: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodDate]>>; }, "strip", z.ZodTypeAny, { message?: string | undefined; date?: string | Date | undefined; }, { message?: string | undefined; date?: string | Date | undefined; }>, z.ZodOptional<z.ZodBoolean>]>; declare const pointerSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodDefault<z.ZodOptional<z.ZodString>>; }, "strip", z.ZodTypeAny, { id: string; version: string; }, { id: string; version?: string | undefined; }>; declare const resourcePointerSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodDefault<z.ZodOptional<z.ZodString>>; type: z.ZodEnum<["agent", "service", "event", "command", "query", "flow", "channel", "domain", "system", "user", "team", "container", "entity", "diagram", "data-product", "adr"]>; }, "strip", z.ZodTypeAny, { type: "entity" | "agent" | "service" | "event" | "command" | "query" | "flow" | "channel" | "domain" | "system" | "user" | "team" | "container" | "diagram" | "data-product" | "adr"; id: string; version: string; }, { type: "entity" | "agent" | "service" | "event" | "command" | "query" | "flow" | "channel" | "domain" | "system" | "user" | "team" | "container" | "diagram" | "data-product" | "adr"; id: string; version?: string | undefined; }>; declare const channelPointerSchema: z.ZodObject<{ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; } & { id: z.ZodString; version: z.ZodDefault<z.ZodOptional<z.ZodString>>; }, "strip", z.ZodTypeAny, { id: string; version: string; parameters?: Record<string, string> | undefined; }, { id: string; version?: string | undefined; parameters?: Record<string, string> | undefined; }>; declare const detailPanelPropertySchema: z.ZodOptional<z.ZodObject<{ visible: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { visible?: boolean | undefined; }, { visible?: boolean | undefined; }>>; declare const sendsPointerSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodDefault<z.ZodOptional<z.ZodString>>; fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; group: z.ZodOptional<z.ZodString>; to: z.ZodOptional<z.ZodArray<z.ZodObject<{ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; } & { id: z.ZodString; version: z.ZodDefault<z.ZodOptional<z.ZodString>>; } & { delivery_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["push", "pull", "push-pull"]>>>; }, "strip", z.ZodTypeAny, { id: string; version: string; delivery_mode: "push" | "pull" | "push-pull"; parameters?: Record<string, string> | undefined; }, { id: string; version?: string | undefined; parameters?: Record<string, string> | undefined; delivery_mode?: "push" | "pull" | "push-pull" | undefined; }>, "many">>; }, "strip", z.ZodTypeAny, { id: string; version: string; fields?: string[] | undefined; group?: string | undefined; to?: { id: string; version: string; delivery_mode: "push" | "pull" | "push-pull"; parameters?: Record<string, string> | undefined; }[] | undefined; }, { id: string; version?: string | undefined; fields?: string[] | undefined; group?: string | undefined; to?: { id: string; version?: string | undefined; parameters?: Record<string, string> | undefined; delivery_mode?: "push" | "pull" | "push-pull" | undefined; }[] | undefined; }>; declare const receivesPointerSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodDefault<z.ZodOptional<z.ZodString>>; fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; group: z.ZodOptional<z.ZodString>; from: z.ZodOptional<z.ZodArray<z.ZodObject<{ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; } & { id: z.ZodString; version: z.ZodDefault<z.ZodOptional<z.ZodString>>; } & { delivery_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["push", "pull", "push-pull"]>>>; }, "strip", z.ZodTypeAny, { id: string; version: string; delivery_mode: "push" | "pull" | "push-pull"; parameters?: Record<string, string> | undefined; }, { id: string; version?: string | undefined; parameters?: Record<string, string> | undefined; delivery_mode?: "push" | "pull" | "push-pull" | undefined; }>, "many">>; }, "strip", z.ZodTypeAny, { id: string; version: string; fields?: string[] | undefined; group?: string | undefined; from?: { id: string; version: string; delivery_mode: "push" | "pull" | "push-pull"; parameters?: Record<string, string> | undefined; }[] | undefined; }, { id: string; version?: string | undefined; fields?: string[] | undefined; group?: string | undefined; from?: { id: string; version?: string | undefined; parameters?: Record<string, string> | undefined; delivery_mode?: "push" | "pull" | "push-pull" | undefined; }[] | undefined; }>; declare const resourceReferenceSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodDefault<z.ZodOptional<z.ZodString>>; }, "strip", z.ZodTypeAny, { id: string; version: string; }, { id: string; version?: string | undefined; }>; declare const semverSchema: z.ZodEffects<z.ZodString, string, string>; declare const sidebarSchema: z.ZodOptional<z.ZodObject<{ label: z.ZodOptional<z.ZodString>; badge: z.ZodOptional<z.ZodString>; color: z.ZodOptional<z.ZodString>; backgroundColor: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { backgroundColor?: string | undefined; label?: string | undefined; badge?: string | undefined; color?: string | undefined; }, { backgroundColor?: string | undefined; label?: string | undefined; badge?: string | undefined; color?: string | undefined; }>>; declare const stylesSchema: z.ZodOptional<z.ZodObject<{ icon: z.ZodOptional<z.ZodString>; node: z.ZodOptional<z.ZodObject<{ color: z.ZodOptional<z.ZodString>; label: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { label?: string | undefined; color?: string | undefined; }, { label?: string | undefined; color?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { icon?: string | undefined; node?: { label?: string | undefined; color?: string | undefined; } | undefined; }, { icon?: string | undefined; node?: { label?: string | undefined; color?: string | undefined; } | undefined; }>>; declare const resourceGroupSchema: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodOptional<z.ZodString>; title: z.ZodOptional<z.ZodString>; items: z.ZodArray<z.ZodObject<{ id: z.ZodString; version: z.ZodDefault<z.ZodOptional<z.ZodString>>; type: z.ZodEnum<["agent", "service", "event", "command", "query", "flow", "channel", "domain", "system", "user", "team", "container", "entity", "diagram", "data-product", "adr"]>; }, "strip", z.ZodTypeAny, { type: "entity" | "agent" | "service" | "event" | "command" | "query" | "flow" | "channel" | "domain" | "system" | "user" | "team" | "container" | "diagram" | "data-product" | "adr"; id: string; version: string; }, { type: "entity" | "agent" | "service" | "event" | "command" | "query" | "flow" | "channel" | "domain" | "system" | "user" | "team" | "container" | "diagram" | "data-product" | "adr"; id: string; version?: string | undefined; }>, "many">; limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>; sidebar: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; }, "strip", z.ZodTypeAny, { items: { type: "entity" | "agent" | "service" | "event" | "command" | "query" | "flow" | "channel" | "domain" | "system" | "user" | "team" | "container" | "diagram" | "data-product" | "adr"; id: string; version: string; }[]; limit: number; sidebar: boolean; id?: string | undefined; title?: string | undefined; }, { items: { type: "entity" | "agent" | "service" | "event" | "command" | "query" | "flow" | "channel" | "domain" | "system" | "user" | "team" | "container" | "diagram" | "data-product" | "adr"; id: string; version?: string | undefined; }[]; id?: string | undefined; title?: string | undefined; limit?: number | undefined; sidebar?: boolean | undefined; }>, "many">>; declare const catalogMetadataSchema: z.ZodOptional<z.ZodObject<{ path: z.ZodString; filePath: z.ZodString; astroContentFilePath: z.ZodString; publicPath: z.ZodString; type: z.ZodString; }, "strip", z.ZodTypeAny, { path: string; type: string; filePath: string; astroContentFilePath: string; publicPath: string; }, { path: string; type: string; filePath: string; astroContentFilePath: string; publicPath: string; }>>; declare const baseSchema: z.ZodObject<{ id: z.ZodString; name: z.ZodString; summary: z.ZodOptional<z.ZodString>; version: z.ZodEffects<z.ZodString, string, string>; draft: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{ title: z.ZodOptional<z.ZodString>; message: z.ZodString; }, "strip", z.ZodTypeAny, { message: string; title?: string | undefined; }, { message: string; title?: string | undefined; }>]>>; badges: z.ZodOptional<z.ZodArray<z.ZodObject<{ content: z.ZodString; backgroundColor: z.ZodString; textColor: z.ZodString; icon: z.ZodOptional<z.ZodString>; url: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { content: string; backgroundColor: string; textColor: string; icon?: string | undefined; url?: string | undefined; }, { content: string; backgroundColor: string; textColor: string; icon?: string | undefined; url?: string | undefined; }>, "many">>; owners: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodObject<{ id: z.ZodString; collection: z.ZodEnum<["users", "teams"]>; }, "strip", z.ZodTypeAny, { id: string; collection: "users" | "teams"; }, { id: string; collection: "users" | "teams"; }>]>, { id: string; }, string | { id: string; collection: "users" | "teams"; }>, "many">>; schemaPath: z.ZodOptional<z.ZodString>; sidebar: z.ZodOptional<z.ZodObject<{ label: z.ZodOptional<z.ZodString>; badge: z.ZodOptional<z.ZodString>; color: z.ZodOptional<z.ZodString>; backgroundColor: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { backgroundColor?: string | undefined; label?: string | undefined; badge?: string | undefined; color?: string | undefined; }, { backgroundColor?: string | undefined; label?: string | undefined; badge?: string | undefined; color?: string | undefined; }>>; repository: z.ZodOptional<z.ZodObject<{ language: z.ZodOptional<z.ZodString>; url: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { url?: string | undefined; language?: string | undefined; }, { url?: string | undefined; language?: string | undefined; }>>; specifications: z.ZodOptional<z.ZodUnion<[z.ZodObject<{ openapiPath: z.ZodOptional<z.ZodString>; asyncapiPath: z.ZodOptional<z.ZodString>; graphqlPath: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { openapiPath?: string | undefined; asyncapiPath?: string | undefined; graphqlPath?: string | undefined; }, { openapiPath?: string | undefined; asyncapiPath?: string | undefined; graphqlPath?: string | undefined; }>, z.ZodArray<z.ZodObject<{ type: z.ZodEnum<["openapi", "asyncapi", "graphql"]>; path: z.ZodString; name: z.ZodOptional<z.ZodString>; headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; }, "strip", z.ZodTypeAny, { path: string; type: "asyncapi" | "openapi" | "graphql"; name?: string | undefined; headers?: Record<string, string> | undefined; }, { path: string; type: "asyncapi" | "openapi" | "graphql"; name?: string | undefined; headers?: Record<string, string> | undefined; }>, "many">]>>; hidden: z.ZodOptional<z.ZodBoolean>; editUrl: z.ZodOptional<z.ZodString>; resourceGroups: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodOptional<z.ZodString>; title: z.ZodOptional<z.ZodString>; items: z.ZodArray<z.ZodObject<{ id: z.ZodString; version: z.ZodDefault<z.ZodOptional<z.ZodString>>; type: z.ZodEnum<["agent", "service", "event", "command", "query", "flow", "channel", "domain", "system", "user", "team", "container", "entity", "diagram", "data-product", "adr"]>; }, "strip", z.ZodTypeAny, { type: "entity" | "agent" | "service" | "event" | "command" | "query" | "flow" | "channel" | "domain" | "system" | "user" | "team" | "container" | "diagram" | "data-product" | "adr"; id: string; version: string; }, { type: "entity" | "agent" | "service" | "event" | "command" | "query" | "flow" | "channel" | "domain" | "system" | "user" | "team" | "container" | "diagram" | "data-product" | "adr"; id: string; version?: string | undefined; }>, "many">; limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>; sidebar: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; }, "strip", z.ZodTypeAny, { items: { type: "entity" | "agent" | "service" | "event" | "command" | "query" | "flow" | "channel" | "domain" | "system" | "user" | "team" | "container" | "diagram" | "data-product" | "adr"; id: string; version: string; }[]; limit: number; sidebar: boolean; id?: string | undefined; title?: string | undefined; }, { items: { type: "entity" | "agent" | "service" | "event" | "command" | "query" | "flow" | "channel" | "domain" | "system" | "user" | "team" | "container" | "diagram" | "data-product" | "adr"; id: string; version?: string | undefined; }[]; id?: string | undefined; title?: string | undefined; limit?: number | undefined; sidebar?: boolean | undefined; }>, "many">>; styles: z.ZodOptional<z.ZodObject<{ icon: z.ZodOptional<z.ZodString>; node: z.ZodOptional<z.ZodObject<{ color: z.ZodOptional<z.ZodString>; label: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { label?: string | undefined; color?: string | undefined; }, { label?: string | undefined; color?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { icon?: string | undefined; node?: { label?: string | undefined; color?: string | undefined; } | undefined; }, { icon?: string | undefined; node?: { label?: string | undefined; color?: string | undefined; } | undefined; }>>; deprecated: z.ZodOptional<z.ZodUnion<[z.ZodObject<{ message: z.ZodOptional<z.ZodString>; date: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodDate]>>; }, "strip", z.ZodTypeAny, { message?: string | undefined; date?: string | Date | undefined; }, { message?: string | undefined; date?: string | Date | undefined; }>, z.ZodOptional<z.ZodBoolean>]>>; visualiser: z.ZodOptional<z.ZodBoolean>; attachments: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{ url: z.ZodString; title: z.ZodOptional<z.ZodString>; type: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; icon: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { url: string; icon?: string | undefined; type?: string | undefined; title?: string | undefined; description?: string | undefined; }, { url: string; icon?: string | undefined; type?: string | undefined; title?: string | undefined; description?: string | undefined; }>]>, "many">>; diagrams: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; version: z.ZodDefault<z.ZodOptional<z.ZodString>>; }, "strip", z.ZodTypeAny, { id: string; version: string; }, { id: string; version?: string | undefined; }>, "many">>; versions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; latestVersion: z.ZodOptional<z.ZodString>; catalog: z.ZodOptional<z.ZodObject<{ path: z.ZodString; filePath: z.ZodString; astroContentFilePath: z.ZodString; publicPath: z.ZodString; type: z.ZodString; }, "strip", z.ZodTypeAny, { path: string; type: string; filePath: string; astroContentFilePath: string; publicPath: string; }, { path: string; type: string; filePath: string; astroContentFilePath: string; publicPath: string; }>>; }, "strip", z.ZodTypeAny, { id: string; name: string; version: string; sidebar?: { backgroundColor?: string | undefined; label?: string | undefined; badge?: string | undefined; color?: string | undefined; } | undefined; summary?: string | undefined; draft?: boolean | { message: string; title?: string | undefined; } | undefined; badges?: { content: string; backgroundColor: string; textColor: string; icon?: string | undefined; url?: string | undefined; }[] | undefined; owners?: { id: string; }[] | undefined; schemaPath?: string | undefined; repository?: { url?: string | undefined; language?: string | undefined; } | undefined; specifications?: { openapiPath?: string | undefined; asyncapiPath?: string | undefined; graphqlPath?: string | undefined; } | { path: string; type: "asyncapi" | "openapi" | "graphql"; name?: string | undefined; headers?: Record<string, string> | undefined; }[] | undefined; hidden?: boolean | undefined; editUrl?: string | undefined; resourceGroups?: { items: { type: "entity" | "agent" | "service" | "event" | "command" | "query" | "flow" | "channel" | "domain" | "system" | "user" | "team" | "container" | "diagram" | "data-product" | "adr"; id: string; version: string; }[]; limit: number; sidebar: boolean; id?: string | undefined; title?: string | undefined; }[] | undefined; styles?: { icon?: string | undefined; node?: { label?: string | undefined; color?: string | undefined; } | undefined; } | undefined; deprecated?: boolean | { message?: string | undefined; date?: string | Date | undefined; } | undefined; visualiser?: boolean | undefined; attachments?: (string | { url: string; icon?: string | undefined; type?: string | undefined; title?: string | undefined; description?: string | undefined; })[] | undefined; diagrams?: { id: string; version: string; }[] | undefined; versions?: string[] | undefined; latestVersion?: string | undefined; catalog?: { path: string; type: string; filePath: string; astroContentFilePath: string; publicPath: string; } | undefined; }, { id: string; name: string; version: string; sidebar?: { backgroundColor?: string | undefined; label?: string | undefined; badge?: string | undefined; color?: string | undefined; } | undefined; summary?: string | undefined; draft?: boolean | { message: string; title?: string | undefined; } | undefined; badges?: { content: string; backgroundColor: string; textColor: string; icon?: string | undefined; url?: string | undefined; }[] | undefined; owners?: (string | { id: string; collection: "users" | "teams"; })[] | undefined; schemaPath?: string | undefined; repository?: { url?: string | undefined; language?: string | undefined; } | undefined; specifications?: { openapiPath?: string | undefined; asyncapiPath?: string | undefined; graphqlPath?: string | undefined; } | { path: string; type: "asyncapi" | "openapi" | "graphql"; name?: string | undefined; headers?: Record<string, string> | undefined; }[] | undefined; hidden?: boolean | undefined; editUrl?: string | undefined; resourceGroups?: { items: { type: "entity" | "agent" | "service" | "event" | "command" | "query" | "flow" | "channel" | "domain" | "system" | "user" | "team" | "container" | "diagram" | "data-product" | "adr"; id: string; version?: string | undefined; }[]; id?: string | undefined; title?: string | undefined; limit?: number | undefined; sidebar?: boolean | undefined; }[] | undefined; styles?: { icon?: string | undefined; node?: { label?: string | undefined; color?: string | undefined; } | undefined; } | undefined; deprecated?: boolean | { message?: string | undefined; date?: string | Date | undefined; } | undefined; visualiser?: boolean | undefined; attachments?: (string | { url: string; icon?: string | undefined; type?: string | undefined; title?: string | undefined; description?: string | undefined; })[] | undefined; diagrams?: { id: string; version?: string | undefined; }[] | undefined; versions?: string[] | undefined; latestVersion?: string | undefined; catalog?: { path: string; type: string; filePath: string; astroContentFilePath: string; publicPath: string; } | undefined; }>; declare const domainSchema: z.ZodObject<{ services: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; version: z.ZodDefault<z.ZodOptional<z.ZodString>>; }, "strip", z.ZodTypeAny, { id: string; version: string; }, { id: string; version?: string | undefined; }>, "many">>; agents: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; version: z.ZodDefault<z.ZodOptional<z.ZodString>>; }, "strip", z.ZodTypeAny, { id: string; version: string; }, { id: string; version?: string | undefined; }>, "many">>; domains: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; version: z.ZodDefault<z.ZodOptional<z.ZodString>>; }, "strip", z.ZodTypeAny, { id: string; version: string; }, { id: string; version?: string | undefined; }>, "many">>; systems: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; version: z.ZodDefault<z.ZodOptional<z.ZodString>>; }, "strip", z.ZodTypeAny, { id: string; version: string; }, { id: string; version?: string | undefined; }>, "many">>; entities: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; version: z.ZodDefault<z.ZodOptional<z.ZodString>>; }, "strip", z.ZodTypeAny, { id: string; version: string; }, { id: string; version?: string | undefined; }>, "many">>; 'data-products': z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; version: z.ZodDefault<z.ZodOptional<z.ZodString>>; }, "strip", z.ZodTypeAny, { id: string; version: string; }, { id: string; version?: string | undefined; }>, "many">>; dataProducts: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; version: z.ZodDefault<z.ZodOptional<z.ZodString>>; }, "strip", z.ZodTypeAny, { id: string; version: string; }, { id: string; version?: string | undefined; }>, "many">>; flows: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; version: z.ZodDefault<z.ZodOptional<z.ZodString>>; }, "strip", z.ZodTypeAny, { id: string; version: string; }, { id: string; version?: string | undefined; }>, "many">>; sends: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; version: z.ZodDefault<z.ZodOptional<z.ZodString>>; fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; group: z.ZodOptional<z.ZodString>; to: z.ZodOptional<z.ZodArray<z.ZodObject<{ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; } & { id: z.ZodString; version: z.ZodDefault<z.ZodOptional<z.ZodString>>; } & { delivery_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["push", "pull", "push-pull"]>>>; }, "strip", z.ZodTypeAny, { id: string; version: string; delivery_mode: "push" | "pull" | "push-pull"; parameters?: Record<string, string> | undefined; }, { id: string; version?: string | undefined; parameters?: Record<string, string> | undefined; delivery_mode?: "push" | "pul