generated from theodorusclarence/ts-nextjs-tailwind-starter
-
-
Notifications
You must be signed in to change notification settings - Fork 61
/
notion.ts
67 lines (59 loc) · 1.2 KB
/
notion.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
//#region //*=========== Links ===========
export interface LinkResult {
id: string;
properties: LinkProperties;
}
interface LinkProperties {
count: TextColumn;
link: TextColumn;
slug: TitleColumn;
}
//#endregion //*======== Links ===========
//#region //*=========== Social Tree ===========
export interface TreeResult {
id: string;
properties: TreeProperties;
icon: PageIcon;
}
interface TreeProperties {
link: TextColumn;
display: TitleColumn;
order: NumberColumn;
}
//#endregion //*======== Social Tree ===========
//#region //*=========== Commons ===========
interface ExternalIcon {
type: 'external';
external: {
url: string;
};
}
interface EmojiIcon {
type: 'emoji';
emoji: string;
}
interface FileIcon {
type: 'file';
file: { url: string };
}
export type PageIcon = ExternalIcon | EmojiIcon | FileIcon | null;
interface TitleColumn {
id: string;
type: 'title';
title: [RichText];
}
interface TextColumn {
id: string;
type: 'rich_text';
rich_text: [RichText | undefined];
}
interface NumberColumn {
id: string;
type: 'number';
number: number;
}
interface RichText {
type: string;
plain_text: string;
}
//#endregion //*======== Commons ===========