/** * Sources Zod Schemas * * Runtime validation for user-editable `~/.pluginator/custom-sources.json`. * Phase 3 security audit (P0 #8) — silently accepting unbounded user JSON * allows MB-string memory pressure during merge, and unvalidated source URLs * can carry arbitrary apiKey material that leaks into log entries. * * @since v2.12.0 */ import { z } from 'zod'; export declare const SourceConfigSchema: z.ZodObject<{ id: z.ZodString; name: z.ZodString; type: z.ZodEnum<["spigot", "modrinth", "github", "bukkit", "hangar", "jenkins", "geysermc", "web", "manual", "curseforge", "ninsys", "polymart", "builtbybit"]>; url: z.ZodString; enabled: z.ZodOptional; checkIntervalSeconds: z.ZodOptional; priority: z.ZodOptional; apiKey: z.ZodOptional; username: z.ZodOptional; password: z.ZodOptional; cacheEnabled: z.ZodOptional; cacheExpirySeconds: z.ZodOptional; extraParams: z.ZodOptional, Record, Record>>; requiresApiKey: z.ZodOptional; apiKeyEnvVar: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "github" | "spigot" | "modrinth" | "jenkins" | "bukkit" | "web" | "manual" | "ninsys" | "hangar" | "geysermc" | "curseforge" | "polymart" | "builtbybit"; url: string; id: string; name: string; enabled?: boolean | undefined; checkIntervalSeconds?: number | undefined; priority?: number | undefined; apiKey?: string | undefined; username?: string | undefined; password?: string | undefined; cacheEnabled?: boolean | undefined; cacheExpirySeconds?: number | undefined; extraParams?: Record | undefined; requiresApiKey?: boolean | undefined; apiKeyEnvVar?: string | undefined; }, { type: "github" | "spigot" | "modrinth" | "jenkins" | "bukkit" | "web" | "manual" | "ninsys" | "hangar" | "geysermc" | "curseforge" | "polymart" | "builtbybit"; url: string; id: string; name: string; enabled?: boolean | undefined; checkIntervalSeconds?: number | undefined; priority?: number | undefined; apiKey?: string | undefined; username?: string | undefined; password?: string | undefined; cacheEnabled?: boolean | undefined; cacheExpirySeconds?: number | undefined; extraParams?: Record | undefined; requiresApiKey?: boolean | undefined; apiKeyEnvVar?: string | undefined; }>; export declare const UserSourceOverrideSchema: z.ZodObject<{ id: z.ZodString; enabled: z.ZodOptional; apiKey: z.ZodOptional; settings: z.ZodOptional>; }, "strip", z.ZodTypeAny, { id: string; enabled?: boolean | undefined; apiKey?: string | undefined; settings?: Record | undefined; }, { id: string; enabled?: boolean | undefined; apiKey?: string | undefined; settings?: Record | undefined; }>; export declare const UserSourcesConfigSchema: z.ZodObject<{ version: z.ZodString; description: z.ZodOptional; overrides: z.ZodArray; apiKey: z.ZodOptional; settings: z.ZodOptional>; }, "strip", z.ZodTypeAny, { id: string; enabled?: boolean | undefined; apiKey?: string | undefined; settings?: Record | undefined; }, { id: string; enabled?: boolean | undefined; apiKey?: string | undefined; settings?: Record | undefined; }>, "many">; customSources: z.ZodArray; url: z.ZodString; enabled: z.ZodOptional; checkIntervalSeconds: z.ZodOptional; priority: z.ZodOptional; apiKey: z.ZodOptional; username: z.ZodOptional; password: z.ZodOptional; cacheEnabled: z.ZodOptional; cacheExpirySeconds: z.ZodOptional; extraParams: z.ZodOptional, Record, Record>>; requiresApiKey: z.ZodOptional; apiKeyEnvVar: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "github" | "spigot" | "modrinth" | "jenkins" | "bukkit" | "web" | "manual" | "ninsys" | "hangar" | "geysermc" | "curseforge" | "polymart" | "builtbybit"; url: string; id: string; name: string; enabled?: boolean | undefined; checkIntervalSeconds?: number | undefined; priority?: number | undefined; apiKey?: string | undefined; username?: string | undefined; password?: string | undefined; cacheEnabled?: boolean | undefined; cacheExpirySeconds?: number | undefined; extraParams?: Record | undefined; requiresApiKey?: boolean | undefined; apiKeyEnvVar?: string | undefined; }, { type: "github" | "spigot" | "modrinth" | "jenkins" | "bukkit" | "web" | "manual" | "ninsys" | "hangar" | "geysermc" | "curseforge" | "polymart" | "builtbybit"; url: string; id: string; name: string; enabled?: boolean | undefined; checkIntervalSeconds?: number | undefined; priority?: number | undefined; apiKey?: string | undefined; username?: string | undefined; password?: string | undefined; cacheEnabled?: boolean | undefined; cacheExpirySeconds?: number | undefined; extraParams?: Record | undefined; requiresApiKey?: boolean | undefined; apiKeyEnvVar?: string | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { version: string; overrides: { id: string; enabled?: boolean | undefined; apiKey?: string | undefined; settings?: Record | undefined; }[]; customSources: { type: "github" | "spigot" | "modrinth" | "jenkins" | "bukkit" | "web" | "manual" | "ninsys" | "hangar" | "geysermc" | "curseforge" | "polymart" | "builtbybit"; url: string; id: string; name: string; enabled?: boolean | undefined; checkIntervalSeconds?: number | undefined; priority?: number | undefined; apiKey?: string | undefined; username?: string | undefined; password?: string | undefined; cacheEnabled?: boolean | undefined; cacheExpirySeconds?: number | undefined; extraParams?: Record | undefined; requiresApiKey?: boolean | undefined; apiKeyEnvVar?: string | undefined; }[]; description?: string | undefined; }, { version: string; overrides: { id: string; enabled?: boolean | undefined; apiKey?: string | undefined; settings?: Record | undefined; }[]; customSources: { type: "github" | "spigot" | "modrinth" | "jenkins" | "bukkit" | "web" | "manual" | "ninsys" | "hangar" | "geysermc" | "curseforge" | "polymart" | "builtbybit"; url: string; id: string; name: string; enabled?: boolean | undefined; checkIntervalSeconds?: number | undefined; priority?: number | undefined; apiKey?: string | undefined; username?: string | undefined; password?: string | undefined; cacheEnabled?: boolean | undefined; cacheExpirySeconds?: number | undefined; extraParams?: Record | undefined; requiresApiKey?: boolean | undefined; apiKeyEnvVar?: string | undefined; }[]; description?: string | undefined; }>; export type ValidatedSourceConfig = z.infer; export type ValidatedUserSourceOverride = z.infer; export type ValidatedUserSourcesConfig = z.infer; //# sourceMappingURL=sources-schema.d.ts.map