1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import { z } from "zod";
export const NewsConfig = z.object({
feeds: z.array(z.string().url()).default([]),
limit: z.number().int().min(1).max(50).default(12),
});
export type NewsConfig = z.infer<typeof NewsConfig>;
export const NewsItem = z.object({
title: z.string(),
link: z.string(),
source: z.string(),
isoDate: z.string().nullable(),
});
export const NewsPayload = z.object({
items: z.array(NewsItem),
});
export type NewsPayload = z.infer<typeof NewsPayload>;
|