This repository has been archived by the owner on Jul 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
142 lines (120 loc) · 3.33 KB
/
index.d.ts
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
import * as React from "react"
// Generic
export interface DefaultElement {
content: string
secureUrl?: string
type?: string
MIMEType?: string
}
export interface Profile extends DefaultElement {
type: "profile"
firstName?: string
lastName?: string
username?: string
gender?: string
}
// Music
export interface Album extends DefaultElement {
type: "album"
song: string // URL to a page containing Song metadata
disc?: number
track?: number
musician?: string[] // URLs to pages containing a Profile metadata
releaseDate?: string
}
export interface Song extends DefaultElement {
type: "song"
duration?: number
disc?: number
track?: number
album: string // URL to a page containing an Album metadata
musician?: string[] // URLs to pages containing a Profile metadata
}
export interface Playlist extends DefaultElement {
type: "playlist"
song?: string // URL to a page containing Song metadata
disc?: number
track?: number
creator: string // URL to a page containing a Profile metadata
}
export interface RadioStation extends DefaultElement {
type: "radio_station"
creator?: string // URL to a page containing a Profile metadata
}
// Video
export interface Actor {
profile: string // URL to a page containing a Profile metadata
role?: string
}
export interface Movie extends DefaultElement {
type: "movie"
actor?: Actor[]
director?: string[] // URLs to pages containing a Profile metadata
writer?: string[] // URLs to pages containing a Profile metadata
duration?: number
releaseDate?: string
tag?: string[]
}
export interface TVShow extends Movie {
type: "tv_show"
}
export interface OtherVideo extends Movie {
type: "other"
}
export interface Episode extends Movie {
type: "episode"
series?: string // URL to a page containing a tv_show metadata
}
export interface Audio extends DefaultElement {
type: "audio"
}
export interface Video extends DefaultElement {
type: "video"
width?: number
height?: number
alt:? string
element?: Movie | TVShow | Episode | OtherVideo
}
export interface Image extends DefaultElement {
type: "image"
width?: number
height?: number
alt?: string
}
export interface Music extends DefaultElement {
type: "music"
element?: Album | Song | Playlist | RadioStation
}
export interface Article extends DefaultElement {
type: "article"
publishedTime?: string
modifiedTime?: string
expirationTime?: string
author?: string // URL to a page containing a Profile metadata
section?: string
tag?: string[]
}
export interface Book extends DefaultElement {
type: "book"
author?: string[] // URLs to pages containing a Profile metadata
isbn?: string
releaseDate?: string
tag?: string[]
}
export interface Website extends DefaultElement {
type: "website"
}
export interface OpenGraphProps {
title: string
content: DefaultElement | Website | Book | Article | Music | Audio | Image | Video | Profile
image: Image[]
url: string
audio?: Audio[]
video?: Video[]
description?: string
determiner?: "" | "a" | "an" | "the" | "auto"
locale?: string
localeAlternate?: string[]
siteName?: string
}
declare const OpenGraph: React.FC<{locationRelativeToWorkingDirectory: string}>