import { z } from "zod";

/** Payload accepted by `GET /sources/:sourceKey/browse`'s query params — `query` free-text searches the source's own catalog (support varies by adapter, see `RecipeSourceListParams`), `cursor` continues a previous page (`RecipeSourceListResult.nextCursor`), omitted starts from the first page. */
export const browseSourceSchema = z.object({
  query: z.string().trim().min(1).optional(),
  cursor: z.string().trim().min(1).optional(),
});
/** Inferred TS type for {@link browseSourceSchema}'s validated output. */
export type BrowseSourceInput = z.infer<typeof browseSourceSchema>;
