UNPKG

n8n

Version:

n8n Workflow Automation Tool

78 lines (77 loc) 3.27 kB
import { z } from 'zod'; import type { McpRegistryServerEntity } from './mcp-registry-server.entity'; type McpRegistryServerUpsertRow = Pick<McpRegistryServerEntity, 'slug' | 'status' | 'version' | 'registryUpdatedAt' | 'data'>; declare const serverStatuses: readonly ['active', 'deprecated']; type McpRegistryServerStatus = (typeof serverStatuses)[number]; export declare const mcpRegistryExtendsCredentialSchema: z.ZodObject<{ extends: z.ZodString; authUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>; accessTokenUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>; scope: z.ZodOptional<z.ZodNullable<z.ZodString>>; authQueryParameters: z.ZodOptional<z.ZodNullable<z.ZodString>>; grantType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["authorizationCode", "clientCredentials", "pkce"]>>>; authentication: z.ZodOptional<z.ZodNullable<z.ZodEnum<["body", "header"]>>>; useDynamicClientRegistration: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; serverUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>; }, "strip", z.ZodTypeAny, { extends: string; authUrl?: string | null | undefined; accessTokenUrl?: string | null | undefined; scope?: string | null | undefined; authQueryParameters?: string | null | undefined; grantType?: "authorizationCode" | "clientCredentials" | "pkce" | null | undefined; authentication?: "body" | "header" | null | undefined; useDynamicClientRegistration?: boolean | null | undefined; serverUrl?: string | null | undefined; }, { extends: string; authUrl?: string | null | undefined; accessTokenUrl?: string | null | undefined; scope?: string | null | undefined; authQueryParameters?: string | null | undefined; grantType?: "authorizationCode" | "clientCredentials" | "pkce" | null | undefined; authentication?: "body" | "header" | null | undefined; useDynamicClientRegistration?: boolean | null | undefined; serverUrl?: string | null | undefined; }>; export type McpRegistryExtendsCredential = z.infer<typeof mcpRegistryExtendsCredentialSchema>; export type McpRegistryServer = { name: string; slug: string; title: string; description: string; tagline: string; version: string; updatedAt: string; icons: McpRegistryIcon[]; websiteUrl?: string; authType: 'oauth2' | 'extendsCredential'; remotes: McpRegistryRemote[]; tools: McpRegistryTool[]; isOfficial: boolean; origin: 'registry'; status: McpRegistryServerStatus; tags?: string[]; extendsCredential?: McpRegistryExtendsCredential; }; export type McpRegistryIcon = { src: string; mimeType?: 'image/png' | 'image/jpeg' | 'image/jpg' | 'image/svg+xml' | 'image/webp'; theme?: 'light' | 'dark'; }; export type McpRegistryRemoteType = 'streamable-http' | 'sse'; export type McpRegistryRemote = { type: McpRegistryRemoteType; url: string; }; export type McpRegistryToolAnnotations = { readOnlyHint?: boolean; }; export type McpRegistryTool = { name: string; title?: string; annotations?: McpRegistryToolAnnotations; }; export declare function toEntity(server: McpRegistryServer): McpRegistryServerUpsertRow; export declare function fromEntity(entity: McpRegistryServerEntity): McpRegistryServer; export {};