@jeromefitz/notion 5.0.14 → 5.1.0

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 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.14",
3
+ "version": "5.1.0",
4
4
  "type": "module",
5
5
  "description": "Notion: Custom Client for jeromefitzgerald.com",
6
6
  "repository": "jeromefitz/packages.git",
package/schema/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- type DatabaseType = 'BLOG' | 'BOOKS' | 'EPISODES' | 'EVENTS' | 'PAGES' | 'PEOPLE' | 'PODCASTS' | 'SEO' | 'SHOWS' | 'VENUES';
2
- type DataTypes = 'LISTING' | 'LISTING_BY_DATE' | 'SLUG' | 'SLUG_BY_ROUTE';
3
- type DataTypesObject = Record<DataTypes, DataTypes>;
1
+ type Blog = Record<string, BlogPost>;
2
+ type BlogPost = Default;
4
3
  type DatabaseInfo = Partial<Record<DatabaseType, {
5
4
  active: boolean;
6
5
  database_id: string;
@@ -18,37 +17,9 @@ type DatabaseInfo = Partial<Record<DatabaseType, {
18
17
  ttl: number;
19
18
  }>>;
20
19
  type Databases = Record<DatabaseType, DatabaseType>;
21
- interface Relation {
22
- database_id: string;
23
- synced_property_id?: string;
24
- synced_property_name: string;
25
- }
26
- type Direction = 'ascending' | 'descending';
27
- interface SortItem {
28
- direction: Direction;
29
- property: string;
30
- }
31
- interface SortMock {
32
- filter?: any[];
33
- sorts: SortItem[];
34
- }
35
- 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';
36
- interface Rollup {
37
- function?: RollupFunction;
38
- relation_property_id?: string;
39
- relation_property_name?: string;
40
- rollup_property_id?: string;
41
- rollup_property_name?: string;
42
- }
43
- interface Property {
44
- 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';
45
- init: boolean;
46
- key: string;
47
- notion: string;
48
- relation?: Relation;
49
- rollup?: Rollup;
50
- 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';
51
- }
20
+ type DatabaseType = 'BLOG' | 'BOOKS' | 'EPISODES' | 'EVENTS' | 'PAGES' | 'PEOPLE' | 'PODCASTS' | 'SEO' | 'SHOWS' | 'VENUES';
21
+ type DataTypes = 'LISTING' | 'LISTING_BY_DATE' | 'SLUG' | 'SLUG_BY_ROUTE';
22
+ type DataTypesObject = Record<DataTypes, DataTypes>;
52
23
  interface Default {
53
24
  dateCreated?: any;
54
25
  dateEdited?: any;
@@ -62,8 +33,7 @@ interface Default {
62
33
  slug: any;
63
34
  title: any;
64
35
  }
65
- type BlogPost = Default;
66
- type Blog = Record<string, BlogPost>;
36
+ type Direction = 'ascending' | 'descending';
67
37
  interface Episode extends Default {
68
38
  dateRecorded: any;
69
39
  duration: any;
@@ -105,8 +75,53 @@ interface Event extends Default {
105
75
  ticketUrl: any;
106
76
  }
107
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
+ }
108
122
  type Page = Default;
109
123
  type Pages = Record<string, Page>;
124
+ type People = Record<string, Person>;
110
125
  interface Person extends Default {
111
126
  email: any;
112
127
  nameFirst: any;
@@ -129,7 +144,6 @@ interface Person extends Default {
129
144
  relationPeople__Shows_Thanks: any;
130
145
  relationPeople__Shows_Writer: any;
131
146
  }
132
- type People = Record<string, Person>;
133
147
  interface Podcast extends Default {
134
148
  categories: any;
135
149
  explicit: any;
@@ -145,8 +159,30 @@ interface Podcast extends Default {
145
159
  type: any;
146
160
  }
147
161
  type Podcasts = Record<string, Podcast>;
148
- type SeoPost = Default;
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';
149
184
  type Seo = Record<string, SeoPost>;
185
+ type SeoPost = Default;
150
186
  interface Show extends Default {
151
187
  relationShows__Events: any;
152
188
  relationShows__Events_Lineup: any;
@@ -178,6 +214,14 @@ interface Show extends Default {
178
214
  socialWebsite: string;
179
215
  }
180
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
+ }
181
225
  interface Venue extends Default {
182
226
  addressCity: any;
183
227
  addressLatitude: any;
@@ -195,49 +239,5 @@ interface Venue extends Default {
195
239
  socialWebsite: any;
196
240
  }
197
241
  type Venues = Record<string, Venue>;
198
- interface NotionAnnotations {
199
- bold: boolean;
200
- code: boolean;
201
- color: string;
202
- italic: boolean;
203
- strikethrough: boolean;
204
- underline: boolean;
205
- }
206
- interface NotionTextContent {
207
- content: string;
208
- link: null | string;
209
- }
210
- interface NotionText {
211
- annotations: NotionAnnotations;
212
- href: null | string;
213
- plain_text: string;
214
- text: NotionTextContent;
215
- type: string;
216
- }
217
- interface NotionUrl {
218
- url: string;
219
- }
220
- interface NotionImage {
221
- caption?: NotionText;
222
- external?: NotionUrl;
223
- file?: NotionUrl;
224
- type: string;
225
- }
226
- interface NotionBlock {
227
- created_time: string;
228
- has_children: string;
229
- heading_1?: NotionText[];
230
- heading_2?: NotionText[];
231
- heading_3?: NotionText[];
232
- heading_4?: NotionText[];
233
- heading_5?: NotionText[];
234
- heading_6?: NotionText[];
235
- id: string;
236
- image?: NotionImage;
237
- last_edited_time: string;
238
- object: string;
239
- paragraph?: NotionText[];
240
- type: string;
241
- }
242
242
 
243
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 };