feat: allow creating articles with marka
This commit is contained in:
@@ -1,17 +1,30 @@
|
||||
import { z } from "zod";
|
||||
export type Article = {
|
||||
id: string;
|
||||
type: "article";
|
||||
content: string;
|
||||
name: string;
|
||||
tags: string[];
|
||||
meta: {
|
||||
done?: boolean;
|
||||
date: Date;
|
||||
link: string;
|
||||
thumbnail?: string;
|
||||
average?: string;
|
||||
image?: string;
|
||||
author?: string;
|
||||
rating?: number;
|
||||
_type: "Article";
|
||||
headline?: string;
|
||||
datePublished?: string;
|
||||
articleBody?: string;
|
||||
keywords?: string[];
|
||||
image?: string;
|
||||
url?: string;
|
||||
reviewRating?: {
|
||||
bestRating?: number;
|
||||
worstRating?: number;
|
||||
ratingValue?: number;
|
||||
};
|
||||
author?: {
|
||||
_type: "Person";
|
||||
name?: string;
|
||||
};
|
||||
};
|
||||
|
||||
export const articleMetadataSchema = z.object({
|
||||
headline: z.union([z.null(), z.string()]).describe("Headline of the article"),
|
||||
author: z.union([z.null(), z.string()]).describe("Author of the article"),
|
||||
datePublished: z.union([z.null(), z.string()]).describe(
|
||||
"Date the article was published",
|
||||
),
|
||||
keywords: z.union([z.null(), z.array(z.string())]).describe(
|
||||
"Keywords for the article",
|
||||
),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user