// {{ display_name }} MCP server — generated by mcpify. Do not hand-edit.

import { z } from 'zod';

// One literal per auth scheme mcpify discovered in the OpenAPI spec's
// components.securitySchemes (or the interactive fallback) — REQ-1.2.1-3.
export const AuthMethodSchema = z.enum([
{%- for key in auth_method_keys %}
  '{{ key }}',
{%- endfor %}
]);
export type AuthMethod = z.infer<typeof AuthMethodSchema>;

// mcpify:versions:begin
export const ApiVersionSchema = z.enum([
{%- for v in version_entries %}
  '{{ v.label }}',
{%- endfor %}
]);
export const DEFAULT_API_VERSION = '{{ default_version_label }}';
// mcpify:versions:end
export type ApiVersion = z.infer<typeof ApiVersionSchema>;

export const ConfigSchema = z.object({
  url: z.string().url(),
  auth_method: AuthMethodSchema,
  api_version: ApiVersionSchema.default(DEFAULT_API_VERSION),
  log_level: z.enum(['fatal', 'error', 'warn', 'info', 'debug', 'trace']).default('info'),
  rate_limit: z.coerce.number().int().positive().default(100),
  timeout_ms: z.coerce.number().int().positive().default(30000),
  cache_size: z.coerce.number().int().positive().default(500),
  retry_attempts: z.coerce.number().int().nonnegative().default(3),
  transport: z.enum(['stdio', 'http']).default('stdio'),
  host: z.string().default('127.0.0.1'),
  port: z.coerce.number().int().positive().default(3000),
  cors_allow: z.string().optional(),
});

export type Config = z.infer<typeof ConfigSchema>;
