11import { type TagHistory } from "./tag" ;
2+ import { Account } from "./account" ;
23
34export type PreviewCardType = "link" | "photo" | "video" | "rich" ;
45
6+ /**
7+ * Represents an author in a rich preview card.
8+ * @see https://docs.joinmastodon.org/entities/PreviewCardAuthor/
9+ */
10+ export interface PreviewCardAuthor {
11+ /** The original resource author’s name. Replaces the deprecated author_name attribute of the preview card. */
12+ name : string ;
13+ /** A link to the author of the original resource. Replaces the deprecated author_url attribute of the preview card. */
14+ url : string ;
15+ /** The fediverse account of the author. */
16+ account : Account | null ;
17+ }
18+
519/**
620 * Represents a rich preview card that is generated using OpenGraph tags from a URL.
721 * @see https://docs.joinmastodon.org/entities/PreviewCard
@@ -17,10 +31,17 @@ export interface PreviewCard {
1731 type : PreviewCardType ;
1832 /** Blurhash */
1933 blurhash : string ;
20-
21- /** The author of the original resource. */
34+ /** Fediverse account of the authors of the original resource. */
35+ authors : PreviewCardAuthor [ ] ;
36+ /**
37+ * The author of the original resource.
38+ * @deprecated Use `authors` instead
39+ */
2240 authorName ?: string | null ;
23- /** A link to the author of the original resource. */
41+ /**
42+ * A link to the author of the original resource.
43+ * @deprecated Use `authors` instead
44+ */
2445 authorUrl ?: string | null ;
2546 /** The provider of the original resource. */
2647 providerName ?: string | null ;
0 commit comments