@jeromefitz/notion 5.0.13 → 5.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +4 -4
- package/package.json +2 -2
- package/schema/index.d.ts +97 -103
package/index.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { DataTypes } from './schema/index.js';
|
|
2
2
|
import { Client as Client$1 } from '@notionhq/client';
|
|
3
3
|
|
|
4
|
+
type ClientProps = {
|
|
5
|
+
custom: CustomProps;
|
|
6
|
+
dataTypes: DataTypesProps;
|
|
7
|
+
};
|
|
4
8
|
type CredentialProps = {
|
|
5
9
|
auth: string;
|
|
6
10
|
config: any;
|
|
@@ -20,10 +24,6 @@ type DataTypesProps = {
|
|
|
20
24
|
SLUG: any;
|
|
21
25
|
SLUG_BY_ROUTE: any;
|
|
22
26
|
};
|
|
23
|
-
type ClientProps = {
|
|
24
|
-
custom: CustomProps;
|
|
25
|
-
dataTypes: DataTypesProps;
|
|
26
|
-
};
|
|
27
27
|
declare class Client extends Client$1 {
|
|
28
28
|
#private;
|
|
29
29
|
readonly custom: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jeromefitz/notion",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Notion: Custom Client for jeromefitzgerald.com",
|
|
6
6
|
"repository": "jeromefitz/packages.git",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@jeromefitz/utils": "workspace:*",
|
|
50
|
-
"@types/lodash": "4.17.
|
|
50
|
+
"@types/lodash": "4.17.13",
|
|
51
51
|
"lodash": "4.17.21"
|
|
52
52
|
},
|
|
53
53
|
"publishConfig": {
|
package/schema/index.d.ts
CHANGED
|
@@ -1,60 +1,25 @@
|
|
|
1
|
+
type Blog = Record<string, BlogPost>;
|
|
2
|
+
type BlogPost = Default;
|
|
3
|
+
type DatabaseInfo = Partial<Record<DatabaseType, {
|
|
4
|
+
active: boolean;
|
|
5
|
+
database_id: string;
|
|
6
|
+
dataTypes: DataTypes[];
|
|
7
|
+
hasChild: null | string;
|
|
8
|
+
infoType: any;
|
|
9
|
+
isChild: null | string;
|
|
10
|
+
isChildInfoType: any | null;
|
|
11
|
+
name: string;
|
|
12
|
+
page_id__seo: string;
|
|
13
|
+
routeMeta: boolean;
|
|
14
|
+
routeType: string;
|
|
15
|
+
skipStaticPaths: boolean;
|
|
16
|
+
slug: string;
|
|
17
|
+
ttl: number;
|
|
18
|
+
}>>;
|
|
19
|
+
type Databases = Record<DatabaseType, DatabaseType>;
|
|
1
20
|
type DatabaseType = 'BLOG' | 'BOOKS' | 'EPISODES' | 'EVENTS' | 'PAGES' | 'PEOPLE' | 'PODCASTS' | 'SEO' | 'SHOWS' | 'VENUES';
|
|
2
21
|
type DataTypes = 'LISTING' | 'LISTING_BY_DATE' | 'SLUG' | 'SLUG_BY_ROUTE';
|
|
3
|
-
type DataTypesObject =
|
|
4
|
-
[id in DataTypes]: DataTypes;
|
|
5
|
-
};
|
|
6
|
-
type DatabaseInfo = {
|
|
7
|
-
[key in DatabaseType]?: {
|
|
8
|
-
active: boolean;
|
|
9
|
-
database_id: string;
|
|
10
|
-
dataTypes: DataTypes[];
|
|
11
|
-
hasChild: null | string;
|
|
12
|
-
infoType: any;
|
|
13
|
-
isChild: null | string;
|
|
14
|
-
isChildInfoType: any | null;
|
|
15
|
-
name: string;
|
|
16
|
-
page_id__seo: string;
|
|
17
|
-
routeMeta: boolean;
|
|
18
|
-
routeType: string;
|
|
19
|
-
skipStaticPaths: boolean;
|
|
20
|
-
slug: string;
|
|
21
|
-
ttl: number;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
type Databases = {
|
|
25
|
-
[key in DatabaseType]: DatabaseType;
|
|
26
|
-
};
|
|
27
|
-
interface Relation {
|
|
28
|
-
database_id: string;
|
|
29
|
-
synced_property_id?: string;
|
|
30
|
-
synced_property_name: string;
|
|
31
|
-
}
|
|
32
|
-
type Direction = 'ascending' | 'descending';
|
|
33
|
-
interface SortItem {
|
|
34
|
-
direction: Direction;
|
|
35
|
-
property: string;
|
|
36
|
-
}
|
|
37
|
-
interface SortMock {
|
|
38
|
-
filter?: any[];
|
|
39
|
-
sorts: SortItem[];
|
|
40
|
-
}
|
|
41
|
-
type RollupFunction = 'average' | 'count_all' | 'count_empty' | 'count_not_empty' | 'count_unique_values' | 'count_values' | 'max' | 'median' | 'min' | 'percent_empty' | 'percent_not_empty' | 'range' | 'show_original' | 'sum';
|
|
42
|
-
interface Rollup {
|
|
43
|
-
function?: RollupFunction;
|
|
44
|
-
relation_property_id?: string;
|
|
45
|
-
relation_property_name?: string;
|
|
46
|
-
rollup_property_id?: string;
|
|
47
|
-
rollup_property_name?: string;
|
|
48
|
-
}
|
|
49
|
-
interface Property {
|
|
50
|
-
format?: 'baht' | 'canadian_dollar' | 'chilean_peso' | 'colombian_peso' | 'danish_krone' | 'dirham' | 'dollar' | 'euro' | 'forint' | 'franc' | 'hong_kong_dollar' | 'koruna' | 'krona' | 'leu' | 'lira' | 'mexican_peso' | 'new_taiwan_dollar' | 'new_zealand_dollar' | 'norwegian_krone' | 'number' | 'number_with_commas' | 'percent' | 'philippine_peso' | 'pound' | 'rand' | 'real' | 'ringgit' | 'riyal' | 'ruble' | 'rupee' | 'rupiah' | 'shekel' | 'won' | 'yen' | 'yuan' | 'zloty';
|
|
51
|
-
init: boolean;
|
|
52
|
-
key: string;
|
|
53
|
-
notion: string;
|
|
54
|
-
relation?: Relation;
|
|
55
|
-
rollup?: Rollup;
|
|
56
|
-
type: 'checkbox' | 'created_by' | 'created_time' | 'date' | 'email' | 'files' | 'formula' | 'last_edited_by' | 'last_edited_time' | 'multi_select' | 'number' | 'people' | 'phone_number' | 'relation' | 'rich_text' | 'rollup' | 'select' | 'title' | 'url';
|
|
57
|
-
}
|
|
22
|
+
type DataTypesObject = Record<DataTypes, DataTypes>;
|
|
58
23
|
interface Default {
|
|
59
24
|
dateCreated?: any;
|
|
60
25
|
dateEdited?: any;
|
|
@@ -68,8 +33,7 @@ interface Default {
|
|
|
68
33
|
slug: any;
|
|
69
34
|
title: any;
|
|
70
35
|
}
|
|
71
|
-
type
|
|
72
|
-
type Blog = Record<string, BlogPost>;
|
|
36
|
+
type Direction = 'ascending' | 'descending';
|
|
73
37
|
interface Episode extends Default {
|
|
74
38
|
dateRecorded: any;
|
|
75
39
|
duration: any;
|
|
@@ -111,8 +75,53 @@ interface Event extends Default {
|
|
|
111
75
|
ticketUrl: any;
|
|
112
76
|
}
|
|
113
77
|
type Events = Record<string, Event>;
|
|
78
|
+
interface NotionAnnotations {
|
|
79
|
+
bold: boolean;
|
|
80
|
+
code: boolean;
|
|
81
|
+
color: string;
|
|
82
|
+
italic: boolean;
|
|
83
|
+
strikethrough: boolean;
|
|
84
|
+
underline: boolean;
|
|
85
|
+
}
|
|
86
|
+
interface NotionBlock {
|
|
87
|
+
created_time: string;
|
|
88
|
+
has_children: string;
|
|
89
|
+
heading_1?: NotionText[];
|
|
90
|
+
heading_2?: NotionText[];
|
|
91
|
+
heading_3?: NotionText[];
|
|
92
|
+
heading_4?: NotionText[];
|
|
93
|
+
heading_5?: NotionText[];
|
|
94
|
+
heading_6?: NotionText[];
|
|
95
|
+
id: string;
|
|
96
|
+
image?: NotionImage;
|
|
97
|
+
last_edited_time: string;
|
|
98
|
+
object: string;
|
|
99
|
+
paragraph?: NotionText[];
|
|
100
|
+
type: string;
|
|
101
|
+
}
|
|
102
|
+
interface NotionImage {
|
|
103
|
+
caption?: NotionText;
|
|
104
|
+
external?: NotionUrl;
|
|
105
|
+
file?: NotionUrl;
|
|
106
|
+
type: string;
|
|
107
|
+
}
|
|
108
|
+
interface NotionText {
|
|
109
|
+
annotations: NotionAnnotations;
|
|
110
|
+
href: null | string;
|
|
111
|
+
plain_text: string;
|
|
112
|
+
text: NotionTextContent;
|
|
113
|
+
type: string;
|
|
114
|
+
}
|
|
115
|
+
interface NotionTextContent {
|
|
116
|
+
content: string;
|
|
117
|
+
link: null | string;
|
|
118
|
+
}
|
|
119
|
+
interface NotionUrl {
|
|
120
|
+
url: string;
|
|
121
|
+
}
|
|
114
122
|
type Page = Default;
|
|
115
123
|
type Pages = Record<string, Page>;
|
|
124
|
+
type People = Record<string, Person>;
|
|
116
125
|
interface Person extends Default {
|
|
117
126
|
email: any;
|
|
118
127
|
nameFirst: any;
|
|
@@ -135,7 +144,6 @@ interface Person extends Default {
|
|
|
135
144
|
relationPeople__Shows_Thanks: any;
|
|
136
145
|
relationPeople__Shows_Writer: any;
|
|
137
146
|
}
|
|
138
|
-
type People = Record<string, Person>;
|
|
139
147
|
interface Podcast extends Default {
|
|
140
148
|
categories: any;
|
|
141
149
|
explicit: any;
|
|
@@ -151,8 +159,30 @@ interface Podcast extends Default {
|
|
|
151
159
|
type: any;
|
|
152
160
|
}
|
|
153
161
|
type Podcasts = Record<string, Podcast>;
|
|
154
|
-
|
|
162
|
+
interface Property {
|
|
163
|
+
format?: 'baht' | 'canadian_dollar' | 'chilean_peso' | 'colombian_peso' | 'danish_krone' | 'dirham' | 'dollar' | 'euro' | 'forint' | 'franc' | 'hong_kong_dollar' | 'koruna' | 'krona' | 'leu' | 'lira' | 'mexican_peso' | 'new_taiwan_dollar' | 'new_zealand_dollar' | 'norwegian_krone' | 'number' | 'number_with_commas' | 'percent' | 'philippine_peso' | 'pound' | 'rand' | 'real' | 'ringgit' | 'riyal' | 'ruble' | 'rupee' | 'rupiah' | 'shekel' | 'won' | 'yen' | 'yuan' | 'zloty';
|
|
164
|
+
init: boolean;
|
|
165
|
+
key: string;
|
|
166
|
+
notion: string;
|
|
167
|
+
relation?: Relation;
|
|
168
|
+
rollup?: Rollup;
|
|
169
|
+
type: 'checkbox' | 'created_by' | 'created_time' | 'date' | 'email' | 'files' | 'formula' | 'last_edited_by' | 'last_edited_time' | 'multi_select' | 'number' | 'people' | 'phone_number' | 'relation' | 'rich_text' | 'rollup' | 'select' | 'title' | 'url';
|
|
170
|
+
}
|
|
171
|
+
interface Relation {
|
|
172
|
+
database_id: string;
|
|
173
|
+
synced_property_id?: string;
|
|
174
|
+
synced_property_name: string;
|
|
175
|
+
}
|
|
176
|
+
interface Rollup {
|
|
177
|
+
function?: RollupFunction;
|
|
178
|
+
relation_property_id?: string;
|
|
179
|
+
relation_property_name?: string;
|
|
180
|
+
rollup_property_id?: string;
|
|
181
|
+
rollup_property_name?: string;
|
|
182
|
+
}
|
|
183
|
+
type RollupFunction = 'average' | 'count_all' | 'count_empty' | 'count_not_empty' | 'count_unique_values' | 'count_values' | 'max' | 'median' | 'min' | 'percent_empty' | 'percent_not_empty' | 'range' | 'show_original' | 'sum';
|
|
155
184
|
type Seo = Record<string, SeoPost>;
|
|
185
|
+
type SeoPost = Default;
|
|
156
186
|
interface Show extends Default {
|
|
157
187
|
relationShows__Events: any;
|
|
158
188
|
relationShows__Events_Lineup: any;
|
|
@@ -184,6 +214,14 @@ interface Show extends Default {
|
|
|
184
214
|
socialWebsite: string;
|
|
185
215
|
}
|
|
186
216
|
type Shows = Record<string, Show>;
|
|
217
|
+
interface SortItem {
|
|
218
|
+
direction: Direction;
|
|
219
|
+
property: string;
|
|
220
|
+
}
|
|
221
|
+
interface SortMock {
|
|
222
|
+
filter?: any[];
|
|
223
|
+
sorts: SortItem[];
|
|
224
|
+
}
|
|
187
225
|
interface Venue extends Default {
|
|
188
226
|
addressCity: any;
|
|
189
227
|
addressLatitude: any;
|
|
@@ -201,49 +239,5 @@ interface Venue extends Default {
|
|
|
201
239
|
socialWebsite: any;
|
|
202
240
|
}
|
|
203
241
|
type Venues = Record<string, Venue>;
|
|
204
|
-
interface NotionAnnotations {
|
|
205
|
-
bold: boolean;
|
|
206
|
-
code: boolean;
|
|
207
|
-
color: string;
|
|
208
|
-
italic: boolean;
|
|
209
|
-
strikethrough: boolean;
|
|
210
|
-
underline: boolean;
|
|
211
|
-
}
|
|
212
|
-
interface NotionTextContent {
|
|
213
|
-
content: string;
|
|
214
|
-
link: null | string;
|
|
215
|
-
}
|
|
216
|
-
interface NotionText {
|
|
217
|
-
annotations: NotionAnnotations;
|
|
218
|
-
href: null | string;
|
|
219
|
-
plain_text: string;
|
|
220
|
-
text: NotionTextContent;
|
|
221
|
-
type: string;
|
|
222
|
-
}
|
|
223
|
-
interface NotionUrl {
|
|
224
|
-
url: string;
|
|
225
|
-
}
|
|
226
|
-
interface NotionImage {
|
|
227
|
-
caption?: NotionText;
|
|
228
|
-
external?: NotionUrl;
|
|
229
|
-
file?: NotionUrl;
|
|
230
|
-
type: string;
|
|
231
|
-
}
|
|
232
|
-
interface NotionBlock {
|
|
233
|
-
created_time: string;
|
|
234
|
-
has_children: string;
|
|
235
|
-
heading_1?: NotionText[];
|
|
236
|
-
heading_2?: NotionText[];
|
|
237
|
-
heading_3?: NotionText[];
|
|
238
|
-
heading_4?: NotionText[];
|
|
239
|
-
heading_5?: NotionText[];
|
|
240
|
-
heading_6?: NotionText[];
|
|
241
|
-
id: string;
|
|
242
|
-
image?: NotionImage;
|
|
243
|
-
last_edited_time: string;
|
|
244
|
-
object: string;
|
|
245
|
-
paragraph?: NotionText[];
|
|
246
|
-
type: string;
|
|
247
|
-
}
|
|
248
242
|
|
|
249
243
|
export type { Blog, BlogPost, DataTypes, DataTypesObject, DatabaseInfo, DatabaseType, Databases, Direction, Episode, Episodes, Event, Events, NotionBlock, NotionText, Page, Pages, People, Person, Podcast, Podcasts, Property, Rollup, RollupFunction, Seo, SeoPost, Show, Shows, SortItem, SortMock, Venue, Venues };
|