-
Notifications
You must be signed in to change notification settings - Fork 7
/
custom.d.ts
242 lines (208 loc) · 3.88 KB
/
custom.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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
type ApiResource = [string, string, boolean?]
interface FileDownloadArgs {
remote: string
local: string
}
interface FooterData {
lists: NavLinkList[]
socials: Array<{
icon: string
text: string
href: string
isExternal: boolean
}>
}
interface NavLinkList {
title: string
links: Array<{
href: string
text: string
isExternal: boolean
includeTheme?: boolean
badge?: string
badgeColor?: 'success' | 'info'
}>
}
interface Filter {
text: string
value?: string
}
interface BreadcrumbItem {
name: string
link: string
}
interface PaginationResult {
previous?: number
pages: Array<number | null | undefined> | undefined
next?: number
}
interface PaginatedResult<T> {
records?: number
totalPages?: number
pageSize?: number
pages: Record<string, T[]>
}
interface PaginatedByTagsResult<T> {
tag: any
records?: number
totalPages?: number
pageSize?: number
pages: Record<string, T[]>
}
interface ApiResult<T> {
docs: T[]
totalDocs: number
limit: number
totalPages: number
page: number
pagingCounter: number
hasPrevPage: boolean
hasNextPage: boolean
prevPage: any
nextPage: any
}
interface TableOfContentEntry {
text: string
id: string
type: number
}
interface ParsedArticle extends Content {
parsedHtml: string
pageUrl: string
timeToRead: number
featuredImage: string
alt: string
tag?: Tag
toc: TableOfContentEntry[]
}
interface DetailedListViewItem {
title: string
intro: string
badges: Tag[]
href: string
icon: string
category: string
isExternal?: boolean
}
interface NamedIcon {
name: string
icon: any
}
interface ConversionField {
name: string
placeHolder: string
type: string
value: string
}
type EthereumUnit = 'kWei' | 'mWei' | 'gWei' | 'szabo' | 'finney' | 'ether' | 'kEther' | 'mEther' | 'gEther' | 'tEther'
interface CatchAllRedirectPageProps {
redirect: true
dest: string
[key: string]: any
}
interface CatchAllStandalonePageProps {
redirect: false
[key: string]: any
}
interface CatchAllPageData {
props: CatchAllRedirectPageProps | CatchAllStandalonePageProps
slug: string
}
interface CatchAllStaticPath {
params: {
slug: string
}
props: CatchAllRedirectPageProps | CatchAllStandalonePageProps
}
interface TeamMember {
id: string
image: string
name: string
title: string
links: {
linkedIn?: string
twitter?: string
facebook?: string
medium?: string
}
}
interface FeatureItem {
icon: string
title: string
text: string
includeTheme?: boolean
href?: string
badge?: string
isExternal?: boolean
}
interface HomepageFeatureItem extends FeatureItem {
id: number
image: SVGElement
}
interface SitemapEnumerable {
type: string
prefix: string
enumerable: WithSlug[]
}
interface SitemapItem {
loc: string
changefreq?: 'daily' | 'weekly' | 'monthly'
}
interface SitemapUrl {
url: SitemapItem
}
interface Sitemap {
urlset: SitemapUrl[]
}
type WrappedPromise = (() => Promise<void>)
type TaskWithDefinition = [string, ...WrappedPromise[]]
interface TabItem {
text: string
href: string
active?: boolean
icon?: any
id?: string
}
type ProtocolContractType = 'contracts' | 'cxTokens' | 'pods'
interface NetworkConfig {
id: number
title: string
app: string
explorer: string
}
interface NavSection {
type: 'section' | 'videos-section'
title: string
links?: FeatureItem[]
more?: {
title: string
href: string
}
}
interface LinkNav {
title: string
href?: string
children?: NavSection[]
}
interface Web3ToolItem {
slug?: string
path?: string
title: string
intro: string
category: string
icon: string
badges: Array<{
color: string
icon: string
text: string
}>
isExternal?: boolean
}
interface TableRenderConfig<T> {
label: string
render: (item: T) => string
sortable?: boolean
searchable?: boolean
isDescription?: boolean
isLink?: boolean
}