Repository navigation
Expand file tree
/
Copy pathtypes.ts
More file actions
101 lines (89 loc) · 1.99 KB
/
Copy pathtypes.ts
File metadata and controls
101 lines (89 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/**
* TypeScript interfaces for schema.org structured data types
* Used for JSON-LD generation throughout the application
*/
export interface ImageObject {
"@type": "ImageObject";
url: string;
width?: number;
height?: number;
}
export interface Organization {
"@type": "Organization";
name: string;
url: string;
logo?: ImageObject;
sameAs?: string[];
description?: string;
}
export interface Person {
"@type": "Person";
name: string;
url?: string;
image?: string;
description?: string;
sameAs?: string[];
}
export interface Article {
"@type": "Article" | "BlogPosting" | "NewsArticle";
headline: string;
description?: string;
image?: string;
author: Person | Organization;
publisher: Organization;
datePublished: string;
dateModified?: string;
mainEntityOfPage?: string;
keywords?: string;
wordCount?: number;
url?: string;
}
export interface BreadcrumbItem {
"@type": "ListItem";
position: number;
name: string;
item?: string;
}
export interface BreadcrumbList {
"@type": "BreadcrumbList";
itemListElement: BreadcrumbItem[];
}
export interface WebSite {
"@type": "WebSite";
name: string;
url: string;
description?: string;
publisher?: Organization;
}
export interface InteractionCounter {
"@type": "InteractionCounter";
interactionType: { "@type": "CommentAction" | "LikeAction" };
userInteractionCount: number;
}
export interface Comment {
"@type": "Comment";
text: string;
dateCreated: string;
author: Person;
url?: string;
}
export interface DiscussionForumPosting {
"@type": "DiscussionForumPosting";
headline: string;
text?: string;
datePublished: string;
dateModified?: string;
author: Person;
mainEntityOfPage: string;
interactionStatistic: InteractionCounter[];
comment: Comment[];
}
export interface ProfilePage {
"@type": "ProfilePage";
dateCreated?: string;
mainEntity: Person;
}
// Wrapper type for JSON-LD with @context
export type WithContext<T> = {
"@context": "https://schema.org";
} & T;