Skip to content

Commit

Permalink
fix(schema): relax urls field because we can't control url-resolver r…
Browse files Browse the repository at this point in the history
…esult being null or undefined
  • Loading branch information
MrOrz committed Oct 31, 2024
1 parent 6f388da commit 6b30acc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions schema/urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,35 @@ export const schema = z
/**
* The canonical URL fetched from the page.
*/
canonical: z.string(),
canonical: z.string().nullable(),
/**
* Title of the page.
*/
title: z.string(),
title: z.string().nullable(),
/**
* Extracted summary text.
*/
summary: z.string(),
summary: z.string().nullable(),
/**
* Fetched raw html input. Can be very long.
*/
html: z.string(),
html: z.string().nullable(),
/**
* Image URL for preview. It could be a base64 string, which can be too long.
*/
topImageUrl: z.string().optional(),
topImageUrl: z.string().optional().nullable(),
/**
* The date and time the URL was fetched.
*/
fetchedAt: dateSchema,
/**
* Status code of the response.
*/
status: z.number().int(),
status: z.number().int().nullable(),
/**
* Error returned by cofacts-url-resolver.
*/
error: z.string().optional(),
error: z.string().optional().nullable(),
/**
* rumors-api cleanupUrls.js script flag field.
*/
Expand Down

0 comments on commit 6b30acc

Please sign in to comment.