forked from transitive-bullshit/nextjs-notion-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtypes.ts
72 lines (58 loc) · 1.48 KB
/
types.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
import { ExtendedRecordMap, PageMap } from 'notion-types'
import { ParsedUrlQuery } from 'querystring'
export * from 'notion-types'
export type NavigationStyle = 'default' | 'custom'
export interface PageError {
message?: string
statusCode: number
}
export interface PageProps {
site?: Site
recordMap?: ExtendedRecordMap
pageId?: string
error?: PageError
}
export interface Params extends ParsedUrlQuery {
pageId: string
}
export interface Site {
name: string
domain: string
rootNotionPageId: string
rootNotionSpaceId: string
// settings
html?: string
fontFamily?: string
darkMode?: boolean
previewImages?: boolean
// opengraph metadata
description?: string
image?: string
}
export interface SiteMap {
site: Site
pageMap: PageMap
canonicalPageMap: CanonicalPageMap
}
export interface CanonicalPageMap {
[canonicalPageId: string]: string
}
export interface PageUrlOverridesMap {
// maps from a URL path to the notion page id the page should be resolved to
// (this overrides the built-in URL path generation for these pages)
[pagePath: string]: string
}
export interface PageUrlOverridesInverseMap {
// maps from a notion page id to the URL path the page should be resolved to
// (this overrides the built-in URL path generation for these pages)
[pageId: string]: string
}
export interface NotionPageInfo {
pageId: string
title: string
image: string
imageObjectPosition: string
author: string
authorImage: string
detail: string
}