diff --git a/src/shared/schemas/searchTools.ts b/src/shared/schemas/searchTools.ts index aa6f5aae14..8c78a14e51 100644 --- a/src/shared/schemas/searchTools.ts +++ b/src/shared/schemas/searchTools.ts @@ -37,5 +37,3 @@ export const ScrapeResultSchema = z.object({ screenshot_url: z.string().nullable(), }); export type ScrapeResult = z.infer; - -export const SearchProviderCatalogResponseSchemaFull = SearchProviderCatalogResponseSchema; diff --git a/src/shared/validation/settingsSchemas.ts b/src/shared/validation/settingsSchemas.ts index 6c69834894..60fcb6c9d2 100644 --- a/src/shared/validation/settingsSchemas.ts +++ b/src/shared/validation/settingsSchemas.ts @@ -407,10 +407,3 @@ export const databaseSettingsSchema = z // Skip location and stats as they're read-only }) .strict(); - -export type DatabaseSettingsSchema = z.infer; - -export const featureFlagUpdateSchema = z.object({ - key: z.string().min(1), - value: z.string().optional(), -}); diff --git a/tests/unit/feature-flags-settings.test.ts b/tests/unit/feature-flags-settings.test.ts index 36308bfc86..f0f5feb190 100644 --- a/tests/unit/feature-flags-settings.test.ts +++ b/tests/unit/feature-flags-settings.test.ts @@ -418,3 +418,12 @@ describe("featureFlagUpdateSchema validation", () => { ); }); }); + +describe("settings schema public surface", () => { + it("uses databaseSettingsSchema as the canonical database settings export", async () => { + const settingsSchemas = await import("../../src/shared/validation/settingsSchemas.ts"); + assert.equal("DatabaseSettingsSchema" in settingsSchemas, false); + assert.equal("featureFlagUpdateSchema" in settingsSchemas, false); + assert.equal(typeof settingsSchemas.databaseSettingsSchema.safeParse, "function"); + }); +}); diff --git a/tests/unit/search-tools-schemas.test.ts b/tests/unit/search-tools-schemas.test.ts index e58651450f..ab2876da1e 100644 --- a/tests/unit/search-tools-schemas.test.ts +++ b/tests/unit/search-tools-schemas.test.ts @@ -4,6 +4,7 @@ import { ZodError } from "zod"; const { SearchProviderCatalogItemSchema, SearchProviderCatalogResponseSchema, ScrapeResultSchema } = await import("../../src/shared/schemas/searchTools.ts"); +const searchToolsModule = await import("../../src/shared/schemas/searchTools.ts"); // ── SearchProviderCatalogItemSchema ─────────────────────────────────────────── @@ -160,6 +161,11 @@ test("SearchProviderCatalogResponseSchema: invalid — providers not array", () assert.ok(!result.success, "non-array providers should fail"); }); +test("SearchProviderCatalogResponseSchemaFull alias is not exported", () => { + assert.equal("SearchProviderCatalogResponseSchemaFull" in searchToolsModule, false); + assert.equal(typeof searchToolsModule.SearchProviderCatalogResponseSchema.safeParse, "function"); +}); + // ── ScrapeResultSchema ──────────────────────────────────────────────────────── test("ScrapeResultSchema: valid scrape result parses", () => {