@silexpert/core 1.1.174 → 1.1.175

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.
Files changed (64) hide show
  1. package/dist/cjs/api/resources/ExercicePrestation.d.ts +11 -0
  2. package/dist/cjs/api/resources/ExercicePrestation.d.ts.map +1 -0
  3. package/dist/cjs/api/resources/ExercicePrestation.js +16 -0
  4. package/dist/cjs/api/resources/ExercicePrestation.js.map +1 -0
  5. package/dist/cjs/api/resources/Notion.d.ts +5 -4
  6. package/dist/cjs/api/resources/Notion.d.ts.map +1 -1
  7. package/dist/cjs/api/resources/Notion.js +1 -1
  8. package/dist/cjs/api/resources/Notion.js.map +1 -1
  9. package/dist/cjs/api/resources.d.ts +2 -0
  10. package/dist/cjs/api/resources.d.ts.map +1 -1
  11. package/dist/cjs/api/resources.js +2 -0
  12. package/dist/cjs/api/resources.js.map +1 -1
  13. package/dist/cjs/types/Interface/api/exercicePrestation/Query.d.ts +7 -0
  14. package/dist/cjs/types/Interface/api/exercicePrestation/Query.d.ts.map +1 -0
  15. package/dist/cjs/types/Interface/api/exercicePrestation/Query.js +28 -0
  16. package/dist/cjs/types/Interface/api/exercicePrestation/Query.js.map +1 -0
  17. package/dist/cjs/types/Interface/api/notion/NotionResponse.d.ts +1537 -0
  18. package/dist/cjs/types/Interface/api/notion/NotionResponse.d.ts.map +1 -0
  19. package/dist/cjs/types/Interface/api/notion/NotionResponse.js +3 -0
  20. package/dist/cjs/types/Interface/api/notion/NotionResponse.js.map +1 -0
  21. package/dist/cjs/types/index.d.ts +2 -0
  22. package/dist/cjs/types/index.d.ts.map +1 -1
  23. package/dist/cjs/types/index.js +2 -0
  24. package/dist/cjs/types/index.js.map +1 -1
  25. package/dist/cjs/utils/prestation.d.ts +1 -0
  26. package/dist/cjs/utils/prestation.d.ts.map +1 -1
  27. package/dist/cjs/utils/prestation.js +2 -2
  28. package/dist/cjs/utils/prestation.js.map +1 -1
  29. package/dist/mjs/api/resources/ExercicePrestation.d.ts +11 -0
  30. package/dist/mjs/api/resources/ExercicePrestation.d.ts.map +1 -0
  31. package/dist/mjs/api/resources/ExercicePrestation.js +12 -0
  32. package/dist/mjs/api/resources/ExercicePrestation.js.map +1 -0
  33. package/dist/mjs/api/resources/Notion.d.ts +5 -4
  34. package/dist/mjs/api/resources/Notion.d.ts.map +1 -1
  35. package/dist/mjs/api/resources/Notion.js +1 -1
  36. package/dist/mjs/api/resources/Notion.js.map +1 -1
  37. package/dist/mjs/api/resources.d.ts +2 -0
  38. package/dist/mjs/api/resources.d.ts.map +1 -1
  39. package/dist/mjs/api/resources.js +2 -0
  40. package/dist/mjs/api/resources.js.map +1 -1
  41. package/dist/mjs/types/Interface/api/exercicePrestation/Query.d.ts +7 -0
  42. package/dist/mjs/types/Interface/api/exercicePrestation/Query.d.ts.map +1 -0
  43. package/dist/mjs/types/Interface/api/exercicePrestation/Query.js +26 -0
  44. package/dist/mjs/types/Interface/api/exercicePrestation/Query.js.map +1 -0
  45. package/dist/mjs/types/Interface/api/notion/NotionResponse.d.ts +1537 -0
  46. package/dist/mjs/types/Interface/api/notion/NotionResponse.d.ts.map +1 -0
  47. package/dist/mjs/types/Interface/api/notion/NotionResponse.js +2 -0
  48. package/dist/mjs/types/Interface/api/notion/NotionResponse.js.map +1 -0
  49. package/dist/mjs/types/index.d.ts +2 -0
  50. package/dist/mjs/types/index.d.ts.map +1 -1
  51. package/dist/mjs/types/index.js +2 -0
  52. package/dist/mjs/types/index.js.map +1 -1
  53. package/dist/mjs/utils/prestation.d.ts +1 -0
  54. package/dist/mjs/utils/prestation.d.ts.map +1 -1
  55. package/dist/mjs/utils/prestation.js +2 -2
  56. package/dist/mjs/utils/prestation.js.map +1 -1
  57. package/package.json +1 -1
  58. package/ts/api/resources/ExercicePrestation.ts +16 -0
  59. package/ts/api/resources/Notion.ts +6 -5
  60. package/ts/api/resources.ts +2 -0
  61. package/ts/types/Interface/api/exercicePrestation/Query.ts +14 -0
  62. package/ts/types/Interface/api/notion/NotionResponse.ts +1288 -0
  63. package/ts/types/index.ts +3 -0
  64. package/ts/utils/prestation.ts +3 -3
@@ -0,0 +1,1537 @@
1
+ /**
2
+ * CUSTOM TYPES (USES IN CONTROLLER)
3
+ */
4
+ export interface NotionLatestArticle {
5
+ infos: PageObjectResponse;
6
+ summary: string;
7
+ nbVideo: number;
8
+ }
9
+ export interface NotionArticle {
10
+ html: string;
11
+ nbVideo: number;
12
+ infos: PageObjectResponse;
13
+ }
14
+ export interface NotionFilteredArticle {
15
+ categorie: string;
16
+ subCategories: Record<string, any>;
17
+ }
18
+ export interface NotionSubCategories {
19
+ id: string;
20
+ icon: string | null;
21
+ label: string | null;
22
+ color: string | null;
23
+ }
24
+ type ApiColor = 'default' | 'gray' | 'brown' | 'orange' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'red' | 'gray_background' | 'brown_background' | 'orange_background' | 'yellow_background' | 'green_background' | 'blue_background' | 'purple_background' | 'pink_background' | 'red_background';
25
+ type SelectColor = 'default' | 'gray' | 'brown' | 'orange' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'red';
26
+ type DateResponse = {
27
+ start: string;
28
+ end: string | null;
29
+ time_zone: string | null;
30
+ };
31
+ /**
32
+ * USER RELATED TYPES
33
+ */
34
+ export type PartialBlockObjectResponse = {
35
+ object: 'block';
36
+ id: string;
37
+ };
38
+ export type PartialUserObjectResponse = {
39
+ object: 'user';
40
+ id: string;
41
+ };
42
+ export type PersonUserObjectResponse = {
43
+ type: 'person';
44
+ person: {
45
+ email?: string;
46
+ };
47
+ name: string | null;
48
+ avatar_url: string | null;
49
+ id: string;
50
+ object: 'user';
51
+ };
52
+ export type BotUserObjectResponse = {
53
+ type: 'bot';
54
+ bot: Record<string, never> | {
55
+ owner: {
56
+ type: 'user';
57
+ user: {
58
+ type: 'person';
59
+ person: {
60
+ email: string;
61
+ };
62
+ name: string | null;
63
+ avatar_url: string | null;
64
+ id: string;
65
+ object: 'user';
66
+ } | PartialUserObjectResponse;
67
+ } | {
68
+ type: 'workspace';
69
+ workspace: true;
70
+ };
71
+ workspace_name: string | null;
72
+ };
73
+ name: string | null;
74
+ avatar_url: string | null;
75
+ id: string;
76
+ object: 'user';
77
+ };
78
+ export type UserObjectResponse = PersonUserObjectResponse | BotUserObjectResponse;
79
+ /**
80
+ * TEXT RELATED TYPES
81
+ */
82
+ export type AnnotationResponse = {
83
+ bold: boolean;
84
+ italic: boolean;
85
+ strikethrough: boolean;
86
+ underline: boolean;
87
+ code: boolean;
88
+ color: 'default' | 'gray' | 'brown' | 'orange' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'red' | 'gray_background' | 'brown_background' | 'orange_background' | 'yellow_background' | 'green_background' | 'blue_background' | 'purple_background' | 'pink_background' | 'red_background';
89
+ };
90
+ export type RichTextItemResponse = {
91
+ type: 'text' | 'mention' | 'equation';
92
+ text?: {
93
+ content: string;
94
+ link: {
95
+ url: string;
96
+ } | null;
97
+ };
98
+ mention?: {
99
+ type: 'user';
100
+ user: PartialUserObjectResponse | UserObjectResponse;
101
+ } | {
102
+ type: 'date';
103
+ date: DateResponse;
104
+ } | {
105
+ type: 'link_preview';
106
+ link_preview: LinkPreviewMentionResponse;
107
+ } | {
108
+ type: 'template_mention';
109
+ template_mention: TemplateMentionResponse;
110
+ } | {
111
+ type: 'page';
112
+ page: {
113
+ id: string;
114
+ };
115
+ } | {
116
+ type: 'database';
117
+ database: {
118
+ id: string;
119
+ };
120
+ };
121
+ equation?: {
122
+ expression: string;
123
+ };
124
+ annotations: AnnotationResponse;
125
+ plain_text: string;
126
+ href: string | null;
127
+ };
128
+ /**
129
+ * LINKS RELATED TYPES
130
+ */
131
+ type LinkPreviewMentionResponse = {
132
+ url: string;
133
+ };
134
+ /**
135
+ * TEMPLATE RELATED TYPES
136
+ */
137
+ type TemplateMentionDateTemplateMentionResponse = {
138
+ type: 'template_mention_date';
139
+ template_mention_date: 'today' | 'now';
140
+ };
141
+ type TemplateMentionUserTemplateMentionResponse = {
142
+ type: 'template_mention_user';
143
+ template_mention_user: 'me';
144
+ };
145
+ type TemplateMentionResponse = TemplateMentionDateTemplateMentionResponse | TemplateMentionUserTemplateMentionResponse;
146
+ /**
147
+ * DIFFERENT BLOCKS
148
+ *
149
+ */
150
+ export type ParagraphBlockObjectResponse = {
151
+ type: 'paragraph';
152
+ paragraph: {
153
+ rich_text: Array<RichTextItemResponse>;
154
+ color: ApiColor;
155
+ };
156
+ parent: {
157
+ type: 'database_id';
158
+ database_id: string;
159
+ } | {
160
+ type: 'page_id';
161
+ page_id: string;
162
+ } | {
163
+ type: 'block_id';
164
+ block_id: string;
165
+ } | {
166
+ type: 'workspace';
167
+ workspace: true;
168
+ };
169
+ object: 'block';
170
+ id: string;
171
+ created_time: string;
172
+ created_by: PartialUserObjectResponse;
173
+ last_edited_time: string;
174
+ last_edited_by: PartialUserObjectResponse;
175
+ has_children: boolean;
176
+ archived: boolean;
177
+ };
178
+ export type Heading1BlockObjectResponse = {
179
+ type: 'heading_1';
180
+ heading_1: {
181
+ rich_text: Array<RichTextItemResponse>;
182
+ color: ApiColor;
183
+ is_toggleable: boolean;
184
+ };
185
+ parent: {
186
+ type: 'database_id';
187
+ database_id: string;
188
+ } | {
189
+ type: 'page_id';
190
+ page_id: string;
191
+ } | {
192
+ type: 'block_id';
193
+ block_id: string;
194
+ } | {
195
+ type: 'workspace';
196
+ workspace: true;
197
+ };
198
+ object: 'block';
199
+ id: string;
200
+ created_time: string;
201
+ created_by: PartialUserObjectResponse;
202
+ last_edited_time: string;
203
+ last_edited_by: PartialUserObjectResponse;
204
+ has_children: boolean;
205
+ archived: boolean;
206
+ };
207
+ export type Heading2BlockObjectResponse = {
208
+ type: 'heading_2';
209
+ heading_2: {
210
+ rich_text: Array<RichTextItemResponse>;
211
+ color: ApiColor;
212
+ is_toggleable: boolean;
213
+ };
214
+ parent: {
215
+ type: 'database_id';
216
+ database_id: string;
217
+ } | {
218
+ type: 'page_id';
219
+ page_id: string;
220
+ } | {
221
+ type: 'block_id';
222
+ block_id: string;
223
+ } | {
224
+ type: 'workspace';
225
+ workspace: true;
226
+ };
227
+ object: 'block';
228
+ id: string;
229
+ created_time: string;
230
+ created_by: PartialUserObjectResponse;
231
+ last_edited_time: string;
232
+ last_edited_by: PartialUserObjectResponse;
233
+ has_children: boolean;
234
+ archived: boolean;
235
+ };
236
+ export type Heading3BlockObjectResponse = {
237
+ type: 'heading_3';
238
+ heading_3: {
239
+ rich_text: Array<RichTextItemResponse>;
240
+ color: ApiColor;
241
+ is_toggleable: boolean;
242
+ };
243
+ parent: {
244
+ type: 'database_id';
245
+ database_id: string;
246
+ } | {
247
+ type: 'page_id';
248
+ page_id: string;
249
+ } | {
250
+ type: 'block_id';
251
+ block_id: string;
252
+ } | {
253
+ type: 'workspace';
254
+ workspace: true;
255
+ };
256
+ object: 'block';
257
+ id: string;
258
+ created_time: string;
259
+ created_by: PartialUserObjectResponse;
260
+ last_edited_time: string;
261
+ last_edited_by: PartialUserObjectResponse;
262
+ has_children: boolean;
263
+ archived: boolean;
264
+ };
265
+ export type BulletedListItemBlockObjectResponse = {
266
+ type: 'bulleted_list_item';
267
+ bulleted_list_item: {
268
+ rich_text: Array<RichTextItemResponse>;
269
+ color: ApiColor;
270
+ };
271
+ parent: {
272
+ type: 'database_id';
273
+ database_id: string;
274
+ } | {
275
+ type: 'page_id';
276
+ page_id: string;
277
+ } | {
278
+ type: 'block_id';
279
+ block_id: string;
280
+ } | {
281
+ type: 'workspace';
282
+ workspace: true;
283
+ };
284
+ object: 'block';
285
+ id: string;
286
+ created_time: string;
287
+ created_by: PartialUserObjectResponse;
288
+ last_edited_time: string;
289
+ last_edited_by: PartialUserObjectResponse;
290
+ has_children: boolean;
291
+ archived: boolean;
292
+ };
293
+ export type NumberedListItemBlockObjectResponse = {
294
+ type: 'numbered_list_item';
295
+ numbered_list_item: {
296
+ rich_text: Array<RichTextItemResponse>;
297
+ color: ApiColor;
298
+ };
299
+ parent: {
300
+ type: 'database_id';
301
+ database_id: string;
302
+ } | {
303
+ type: 'page_id';
304
+ page_id: string;
305
+ } | {
306
+ type: 'block_id';
307
+ block_id: string;
308
+ } | {
309
+ type: 'workspace';
310
+ workspace: true;
311
+ };
312
+ object: 'block';
313
+ id: string;
314
+ created_time: string;
315
+ created_by: PartialUserObjectResponse;
316
+ last_edited_time: string;
317
+ last_edited_by: PartialUserObjectResponse;
318
+ has_children: boolean;
319
+ archived: boolean;
320
+ };
321
+ export type QuoteBlockObjectResponse = {
322
+ type: 'quote';
323
+ quote: {
324
+ rich_text: Array<RichTextItemResponse>;
325
+ color: ApiColor;
326
+ };
327
+ parent: {
328
+ type: 'database_id';
329
+ database_id: string;
330
+ } | {
331
+ type: 'page_id';
332
+ page_id: string;
333
+ } | {
334
+ type: 'block_id';
335
+ block_id: string;
336
+ } | {
337
+ type: 'workspace';
338
+ workspace: true;
339
+ };
340
+ object: 'block';
341
+ id: string;
342
+ created_time: string;
343
+ created_by: PartialUserObjectResponse;
344
+ last_edited_time: string;
345
+ last_edited_by: PartialUserObjectResponse;
346
+ has_children: boolean;
347
+ archived: boolean;
348
+ };
349
+ export type ToDoBlockObjectResponse = {
350
+ type: 'to_do';
351
+ to_do: {
352
+ rich_text: Array<RichTextItemResponse>;
353
+ color: ApiColor;
354
+ checked: boolean;
355
+ };
356
+ parent: {
357
+ type: 'database_id';
358
+ database_id: string;
359
+ } | {
360
+ type: 'page_id';
361
+ page_id: string;
362
+ } | {
363
+ type: 'block_id';
364
+ block_id: string;
365
+ } | {
366
+ type: 'workspace';
367
+ workspace: true;
368
+ };
369
+ object: 'block';
370
+ id: string;
371
+ created_time: string;
372
+ created_by: PartialUserObjectResponse;
373
+ last_edited_time: string;
374
+ last_edited_by: PartialUserObjectResponse;
375
+ has_children: boolean;
376
+ archived: boolean;
377
+ };
378
+ export type ToggleBlockObjectResponse = {
379
+ type: 'toggle';
380
+ toggle: {
381
+ rich_text: Array<RichTextItemResponse>;
382
+ color: ApiColor;
383
+ };
384
+ parent: {
385
+ type: 'database_id';
386
+ database_id: string;
387
+ } | {
388
+ type: 'page_id';
389
+ page_id: string;
390
+ } | {
391
+ type: 'block_id';
392
+ block_id: string;
393
+ } | {
394
+ type: 'workspace';
395
+ workspace: true;
396
+ };
397
+ object: 'block';
398
+ id: string;
399
+ created_time: string;
400
+ created_by: PartialUserObjectResponse;
401
+ last_edited_time: string;
402
+ last_edited_by: PartialUserObjectResponse;
403
+ has_children: boolean;
404
+ archived: boolean;
405
+ };
406
+ export type TemplateBlockObjectResponse = {
407
+ type: 'template';
408
+ template: {
409
+ rich_text: Array<RichTextItemResponse>;
410
+ };
411
+ parent: {
412
+ type: 'database_id';
413
+ database_id: string;
414
+ } | {
415
+ type: 'page_id';
416
+ page_id: string;
417
+ } | {
418
+ type: 'block_id';
419
+ block_id: string;
420
+ } | {
421
+ type: 'workspace';
422
+ workspace: true;
423
+ };
424
+ object: 'block';
425
+ id: string;
426
+ created_time: string;
427
+ created_by: PartialUserObjectResponse;
428
+ last_edited_time: string;
429
+ last_edited_by: PartialUserObjectResponse;
430
+ has_children: boolean;
431
+ archived: boolean;
432
+ };
433
+ export type SyncedBlockBlockObjectResponse = {
434
+ type: 'synced_block';
435
+ synced_block: {
436
+ synced_from: {
437
+ type: 'block_id';
438
+ block_id: string;
439
+ } | null;
440
+ };
441
+ parent: {
442
+ type: 'database_id';
443
+ database_id: string;
444
+ } | {
445
+ type: 'page_id';
446
+ page_id: string;
447
+ } | {
448
+ type: 'block_id';
449
+ block_id: string;
450
+ } | {
451
+ type: 'workspace';
452
+ workspace: true;
453
+ };
454
+ object: 'block';
455
+ id: string;
456
+ created_time: string;
457
+ created_by: PartialUserObjectResponse;
458
+ last_edited_time: string;
459
+ last_edited_by: PartialUserObjectResponse;
460
+ has_children: boolean;
461
+ archived: boolean;
462
+ };
463
+ export type ChildPageBlockObjectResponse = {
464
+ type: 'child_page';
465
+ child_page: {
466
+ title: string;
467
+ };
468
+ parent: {
469
+ type: 'database_id';
470
+ database_id: string;
471
+ } | {
472
+ type: 'page_id';
473
+ page_id: string;
474
+ } | {
475
+ type: 'block_id';
476
+ block_id: string;
477
+ } | {
478
+ type: 'workspace';
479
+ workspace: true;
480
+ };
481
+ object: 'block';
482
+ id: string;
483
+ created_time: string;
484
+ created_by: PartialUserObjectResponse;
485
+ last_edited_time: string;
486
+ last_edited_by: PartialUserObjectResponse;
487
+ has_children: boolean;
488
+ archived: boolean;
489
+ };
490
+ export type ChildDatabaseBlockObjectResponse = {
491
+ type: 'child_database';
492
+ child_database: {
493
+ title: string;
494
+ };
495
+ parent: {
496
+ type: 'database_id';
497
+ database_id: string;
498
+ } | {
499
+ type: 'page_id';
500
+ page_id: string;
501
+ } | {
502
+ type: 'block_id';
503
+ block_id: string;
504
+ } | {
505
+ type: 'workspace';
506
+ workspace: true;
507
+ };
508
+ object: 'block';
509
+ id: string;
510
+ created_time: string;
511
+ created_by: PartialUserObjectResponse;
512
+ last_edited_time: string;
513
+ last_edited_by: PartialUserObjectResponse;
514
+ has_children: boolean;
515
+ archived: boolean;
516
+ };
517
+ export type EquationBlockObjectResponse = {
518
+ type: 'equation';
519
+ equation: {
520
+ expression: string;
521
+ };
522
+ parent: {
523
+ type: 'database_id';
524
+ database_id: string;
525
+ } | {
526
+ type: 'page_id';
527
+ page_id: string;
528
+ } | {
529
+ type: 'block_id';
530
+ block_id: string;
531
+ } | {
532
+ type: 'workspace';
533
+ workspace: true;
534
+ };
535
+ object: 'block';
536
+ id: string;
537
+ created_time: string;
538
+ created_by: PartialUserObjectResponse;
539
+ last_edited_time: string;
540
+ last_edited_by: PartialUserObjectResponse;
541
+ has_children: boolean;
542
+ archived: boolean;
543
+ };
544
+ export type CalloutBlockObjectResponse = {
545
+ type: 'callout';
546
+ callout: {
547
+ rich_text: Array<RichTextItemResponse>;
548
+ color: ApiColor;
549
+ icon: {
550
+ type: 'emoji';
551
+ emoji: string;
552
+ } | null | {
553
+ type: 'external';
554
+ external: {
555
+ url: string;
556
+ };
557
+ } | null | {
558
+ type: 'file';
559
+ file: {
560
+ url: string;
561
+ expiry_time: string;
562
+ };
563
+ } | null;
564
+ };
565
+ parent: {
566
+ type: 'database_id';
567
+ database_id: string;
568
+ } | {
569
+ type: 'page_id';
570
+ page_id: string;
571
+ } | {
572
+ type: 'block_id';
573
+ block_id: string;
574
+ } | {
575
+ type: 'workspace';
576
+ workspace: true;
577
+ };
578
+ object: 'block';
579
+ id: string;
580
+ created_time: string;
581
+ created_by: PartialUserObjectResponse;
582
+ last_edited_time: string;
583
+ last_edited_by: PartialUserObjectResponse;
584
+ has_children: boolean;
585
+ archived: boolean;
586
+ };
587
+ export type DividerBlockObjectResponse = {
588
+ type: 'divider';
589
+ divider: Record<string, never>;
590
+ parent: {
591
+ type: 'database_id';
592
+ database_id: string;
593
+ } | {
594
+ type: 'page_id';
595
+ page_id: string;
596
+ } | {
597
+ type: 'block_id';
598
+ block_id: string;
599
+ } | {
600
+ type: 'workspace';
601
+ workspace: true;
602
+ };
603
+ object: 'block';
604
+ id: string;
605
+ created_time: string;
606
+ created_by: PartialUserObjectResponse;
607
+ last_edited_time: string;
608
+ last_edited_by: PartialUserObjectResponse;
609
+ has_children: boolean;
610
+ archived: boolean;
611
+ };
612
+ export type BreadcrumbBlockObjectResponse = {
613
+ type: 'breadcrumb';
614
+ breadcrumb: Record<string, never>;
615
+ parent: {
616
+ type: 'database_id';
617
+ database_id: string;
618
+ } | {
619
+ type: 'page_id';
620
+ page_id: string;
621
+ } | {
622
+ type: 'block_id';
623
+ block_id: string;
624
+ } | {
625
+ type: 'workspace';
626
+ workspace: true;
627
+ };
628
+ object: 'block';
629
+ id: string;
630
+ created_time: string;
631
+ created_by: PartialUserObjectResponse;
632
+ last_edited_time: string;
633
+ last_edited_by: PartialUserObjectResponse;
634
+ has_children: boolean;
635
+ archived: boolean;
636
+ };
637
+ export type TableOfContentsBlockObjectResponse = {
638
+ type: 'table_of_contents';
639
+ table_of_contents: {
640
+ color: ApiColor;
641
+ };
642
+ parent: {
643
+ type: 'database_id';
644
+ database_id: string;
645
+ } | {
646
+ type: 'page_id';
647
+ page_id: string;
648
+ } | {
649
+ type: 'block_id';
650
+ block_id: string;
651
+ } | {
652
+ type: 'workspace';
653
+ workspace: true;
654
+ };
655
+ object: 'block';
656
+ id: string;
657
+ created_time: string;
658
+ created_by: PartialUserObjectResponse;
659
+ last_edited_time: string;
660
+ last_edited_by: PartialUserObjectResponse;
661
+ has_children: boolean;
662
+ archived: boolean;
663
+ };
664
+ export type ColumnListBlockObjectResponse = {
665
+ type: 'column_list';
666
+ column_list: Record<string, never>;
667
+ parent: {
668
+ type: 'database_id';
669
+ database_id: string;
670
+ } | {
671
+ type: 'page_id';
672
+ page_id: string;
673
+ } | {
674
+ type: 'block_id';
675
+ block_id: string;
676
+ } | {
677
+ type: 'workspace';
678
+ workspace: true;
679
+ };
680
+ object: 'block';
681
+ id: string;
682
+ created_time: string;
683
+ created_by: PartialUserObjectResponse;
684
+ last_edited_time: string;
685
+ last_edited_by: PartialUserObjectResponse;
686
+ has_children: boolean;
687
+ archived: boolean;
688
+ };
689
+ export type ColumnBlockObjectResponse = {
690
+ type: 'column';
691
+ column: Record<string, never>;
692
+ parent: {
693
+ type: 'database_id';
694
+ database_id: string;
695
+ } | {
696
+ type: 'page_id';
697
+ page_id: string;
698
+ } | {
699
+ type: 'block_id';
700
+ block_id: string;
701
+ } | {
702
+ type: 'workspace';
703
+ workspace: true;
704
+ };
705
+ object: 'block';
706
+ id: string;
707
+ created_time: string;
708
+ created_by: PartialUserObjectResponse;
709
+ last_edited_time: string;
710
+ last_edited_by: PartialUserObjectResponse;
711
+ has_children: boolean;
712
+ archived: boolean;
713
+ };
714
+ export type LinkToPageBlockObjectResponse = {
715
+ type: 'link_to_page';
716
+ link_to_page: {
717
+ type: 'page_id';
718
+ page_id: string;
719
+ } | {
720
+ type: 'database_id';
721
+ database_id: string;
722
+ } | {
723
+ type: 'comment_id';
724
+ comment_id: string;
725
+ };
726
+ parent: {
727
+ type: 'database_id';
728
+ database_id: string;
729
+ } | {
730
+ type: 'page_id';
731
+ page_id: string;
732
+ } | {
733
+ type: 'block_id';
734
+ block_id: string;
735
+ } | {
736
+ type: 'workspace';
737
+ workspace: true;
738
+ };
739
+ object: 'block';
740
+ id: string;
741
+ created_time: string;
742
+ created_by: PartialUserObjectResponse;
743
+ last_edited_time: string;
744
+ last_edited_by: PartialUserObjectResponse;
745
+ has_children: boolean;
746
+ archived: boolean;
747
+ };
748
+ export type TableBlockObjectResponse = {
749
+ type: 'table';
750
+ table: {
751
+ has_column_header: boolean;
752
+ has_row_header: boolean;
753
+ table_width: number;
754
+ };
755
+ parent: {
756
+ type: 'database_id';
757
+ database_id: string;
758
+ } | {
759
+ type: 'page_id';
760
+ page_id: string;
761
+ } | {
762
+ type: 'block_id';
763
+ block_id: string;
764
+ } | {
765
+ type: 'workspace';
766
+ workspace: true;
767
+ };
768
+ object: 'block';
769
+ id: string;
770
+ created_time: string;
771
+ created_by: PartialUserObjectResponse;
772
+ last_edited_time: string;
773
+ last_edited_by: PartialUserObjectResponse;
774
+ has_children: boolean;
775
+ archived: boolean;
776
+ };
777
+ export type TableRowBlockObjectResponse = {
778
+ type: 'table_row';
779
+ table_row: {
780
+ cells: Array<Array<RichTextItemResponse>>;
781
+ };
782
+ parent: {
783
+ type: 'database_id';
784
+ database_id: string;
785
+ } | {
786
+ type: 'page_id';
787
+ page_id: string;
788
+ } | {
789
+ type: 'block_id';
790
+ block_id: string;
791
+ } | {
792
+ type: 'workspace';
793
+ workspace: true;
794
+ };
795
+ object: 'block';
796
+ id: string;
797
+ created_time: string;
798
+ created_by: PartialUserObjectResponse;
799
+ last_edited_time: string;
800
+ last_edited_by: PartialUserObjectResponse;
801
+ has_children: boolean;
802
+ archived: boolean;
803
+ };
804
+ export type EmbedBlockObjectResponse = {
805
+ type: 'embed';
806
+ embed: {
807
+ url: string;
808
+ caption: Array<RichTextItemResponse>;
809
+ };
810
+ parent: {
811
+ type: 'database_id';
812
+ database_id: string;
813
+ } | {
814
+ type: 'page_id';
815
+ page_id: string;
816
+ } | {
817
+ type: 'block_id';
818
+ block_id: string;
819
+ } | {
820
+ type: 'workspace';
821
+ workspace: true;
822
+ };
823
+ object: 'block';
824
+ id: string;
825
+ created_time: string;
826
+ created_by: PartialUserObjectResponse;
827
+ last_edited_time: string;
828
+ last_edited_by: PartialUserObjectResponse;
829
+ has_children: boolean;
830
+ archived: boolean;
831
+ };
832
+ export type BookmarkBlockObjectResponse = {
833
+ type: 'bookmark';
834
+ bookmark: {
835
+ url: string;
836
+ caption: Array<RichTextItemResponse>;
837
+ };
838
+ parent: {
839
+ type: 'database_id';
840
+ database_id: string;
841
+ } | {
842
+ type: 'page_id';
843
+ page_id: string;
844
+ } | {
845
+ type: 'block_id';
846
+ block_id: string;
847
+ } | {
848
+ type: 'workspace';
849
+ workspace: true;
850
+ };
851
+ object: 'block';
852
+ id: string;
853
+ created_time: string;
854
+ created_by: PartialUserObjectResponse;
855
+ last_edited_time: string;
856
+ last_edited_by: PartialUserObjectResponse;
857
+ has_children: boolean;
858
+ archived: boolean;
859
+ };
860
+ export type ImageBlockObjectResponse = {
861
+ type: 'image';
862
+ image: {
863
+ type: 'external';
864
+ external: {
865
+ url: string;
866
+ };
867
+ caption: Array<RichTextItemResponse>;
868
+ } | {
869
+ type: 'file';
870
+ file: {
871
+ url: string;
872
+ expiry_time: string;
873
+ };
874
+ caption: Array<RichTextItemResponse>;
875
+ };
876
+ parent: {
877
+ type: 'database_id';
878
+ database_id: string;
879
+ } | {
880
+ type: 'page_id';
881
+ page_id: string;
882
+ } | {
883
+ type: 'block_id';
884
+ block_id: string;
885
+ } | {
886
+ type: 'workspace';
887
+ workspace: true;
888
+ };
889
+ object: 'block';
890
+ id: string;
891
+ created_time: string;
892
+ created_by: PartialUserObjectResponse;
893
+ last_edited_time: string;
894
+ last_edited_by: PartialUserObjectResponse;
895
+ has_children: boolean;
896
+ archived: boolean;
897
+ };
898
+ export type VideoBlockObjectResponse = {
899
+ type: 'video';
900
+ video: {
901
+ type: 'external';
902
+ external: {
903
+ url: string;
904
+ };
905
+ caption: Array<RichTextItemResponse>;
906
+ } | {
907
+ type: 'file';
908
+ file: {
909
+ url: string;
910
+ expiry_time: string;
911
+ };
912
+ caption: Array<RichTextItemResponse>;
913
+ };
914
+ parent: {
915
+ type: 'database_id';
916
+ database_id: string;
917
+ } | {
918
+ type: 'page_id';
919
+ page_id: string;
920
+ } | {
921
+ type: 'block_id';
922
+ block_id: string;
923
+ } | {
924
+ type: 'workspace';
925
+ workspace: true;
926
+ };
927
+ object: 'block';
928
+ id: string;
929
+ created_time: string;
930
+ created_by: PartialUserObjectResponse;
931
+ last_edited_time: string;
932
+ last_edited_by: PartialUserObjectResponse;
933
+ has_children: boolean;
934
+ archived: boolean;
935
+ };
936
+ export type PdfBlockObjectResponse = {
937
+ type: 'pdf';
938
+ pdf: {
939
+ type: 'external';
940
+ external: {
941
+ url: string;
942
+ };
943
+ caption: Array<RichTextItemResponse>;
944
+ } | {
945
+ type: 'file';
946
+ file: {
947
+ url: string;
948
+ expiry_time: string;
949
+ };
950
+ caption: Array<RichTextItemResponse>;
951
+ };
952
+ parent: {
953
+ type: 'database_id';
954
+ database_id: string;
955
+ } | {
956
+ type: 'page_id';
957
+ page_id: string;
958
+ } | {
959
+ type: 'block_id';
960
+ block_id: string;
961
+ } | {
962
+ type: 'workspace';
963
+ workspace: true;
964
+ };
965
+ object: 'block';
966
+ id: string;
967
+ created_time: string;
968
+ created_by: PartialUserObjectResponse;
969
+ last_edited_time: string;
970
+ last_edited_by: PartialUserObjectResponse;
971
+ has_children: boolean;
972
+ archived: boolean;
973
+ };
974
+ export type FileBlockObjectResponse = {
975
+ type: 'file';
976
+ file: {
977
+ type: 'external';
978
+ external: {
979
+ url: string;
980
+ };
981
+ caption: Array<RichTextItemResponse>;
982
+ name: string;
983
+ } | {
984
+ type: 'file';
985
+ file: {
986
+ url: string;
987
+ expiry_time: string;
988
+ };
989
+ caption: Array<RichTextItemResponse>;
990
+ name: string;
991
+ };
992
+ parent: {
993
+ type: 'database_id';
994
+ database_id: string;
995
+ } | {
996
+ type: 'page_id';
997
+ page_id: string;
998
+ } | {
999
+ type: 'block_id';
1000
+ block_id: string;
1001
+ } | {
1002
+ type: 'workspace';
1003
+ workspace: true;
1004
+ };
1005
+ object: 'block';
1006
+ id: string;
1007
+ created_time: string;
1008
+ created_by: PartialUserObjectResponse;
1009
+ last_edited_time: string;
1010
+ last_edited_by: PartialUserObjectResponse;
1011
+ has_children: boolean;
1012
+ archived: boolean;
1013
+ };
1014
+ export type AudioBlockObjectResponse = {
1015
+ type: 'audio';
1016
+ audio: {
1017
+ type: 'external';
1018
+ external: {
1019
+ url: string;
1020
+ };
1021
+ caption: Array<RichTextItemResponse>;
1022
+ } | {
1023
+ type: 'file';
1024
+ file: {
1025
+ url: string;
1026
+ expiry_time: string;
1027
+ };
1028
+ caption: Array<RichTextItemResponse>;
1029
+ };
1030
+ parent: {
1031
+ type: 'database_id';
1032
+ database_id: string;
1033
+ } | {
1034
+ type: 'page_id';
1035
+ page_id: string;
1036
+ } | {
1037
+ type: 'block_id';
1038
+ block_id: string;
1039
+ } | {
1040
+ type: 'workspace';
1041
+ workspace: true;
1042
+ };
1043
+ object: 'block';
1044
+ id: string;
1045
+ created_time: string;
1046
+ created_by: PartialUserObjectResponse;
1047
+ last_edited_time: string;
1048
+ last_edited_by: PartialUserObjectResponse;
1049
+ has_children: boolean;
1050
+ archived: boolean;
1051
+ };
1052
+ export type LinkPreviewBlockObjectResponse = {
1053
+ type: 'link_preview';
1054
+ link_preview: {
1055
+ url: string;
1056
+ };
1057
+ parent: {
1058
+ type: 'database_id';
1059
+ database_id: string;
1060
+ } | {
1061
+ type: 'page_id';
1062
+ page_id: string;
1063
+ } | {
1064
+ type: 'block_id';
1065
+ block_id: string;
1066
+ } | {
1067
+ type: 'workspace';
1068
+ workspace: true;
1069
+ };
1070
+ object: 'block';
1071
+ id: string;
1072
+ created_time: string;
1073
+ created_by: PartialUserObjectResponse;
1074
+ last_edited_time: string;
1075
+ last_edited_by: PartialUserObjectResponse;
1076
+ has_children: boolean;
1077
+ archived: boolean;
1078
+ };
1079
+ export type UnsupportedBlockObjectResponse = {
1080
+ type: 'unsupported';
1081
+ unsupported: Record<string, never>;
1082
+ parent: {
1083
+ type: 'database_id';
1084
+ database_id: string;
1085
+ } | {
1086
+ type: 'page_id';
1087
+ page_id: string;
1088
+ } | {
1089
+ type: 'block_id';
1090
+ block_id: string;
1091
+ } | {
1092
+ type: 'workspace';
1093
+ workspace: true;
1094
+ };
1095
+ object: 'block';
1096
+ id: string;
1097
+ created_time: string;
1098
+ created_by: PartialUserObjectResponse;
1099
+ last_edited_time: string;
1100
+ last_edited_by: PartialUserObjectResponse;
1101
+ has_children: boolean;
1102
+ archived: boolean;
1103
+ };
1104
+ /**
1105
+ * DATABASE RELATED TYPES
1106
+ */
1107
+ type SelectPropertyResponse = {
1108
+ id: string;
1109
+ name: string;
1110
+ color: SelectColor;
1111
+ };
1112
+ type StringFormulaPropertyResponse = {
1113
+ type: 'string';
1114
+ string: string | null;
1115
+ };
1116
+ type DateFormulaPropertyResponse = {
1117
+ type: 'date';
1118
+ date: DateResponse | null;
1119
+ };
1120
+ type NumberFormulaPropertyResponse = {
1121
+ type: 'number';
1122
+ number: number | null;
1123
+ };
1124
+ type BooleanFormulaPropertyResponse = {
1125
+ type: 'boolean';
1126
+ boolean: boolean | null;
1127
+ };
1128
+ type FormulaPropertyResponse = StringFormulaPropertyResponse | DateFormulaPropertyResponse | NumberFormulaPropertyResponse | BooleanFormulaPropertyResponse;
1129
+ type VerificationPropertyUnverifiedResponse = {
1130
+ state: 'unverified';
1131
+ date: null;
1132
+ verified_by: null;
1133
+ };
1134
+ type VerificationPropertyResponse = {
1135
+ state: 'verified' | 'expired';
1136
+ date: DateResponse | null;
1137
+ verified_by: {
1138
+ id: string;
1139
+ } | null | {
1140
+ person: {
1141
+ email?: string;
1142
+ };
1143
+ id: string;
1144
+ type?: 'person';
1145
+ name?: string | null;
1146
+ avatar_url?: string | null;
1147
+ object?: 'user';
1148
+ } | null | {
1149
+ bot: Record<string, never> | {
1150
+ owner: {
1151
+ type: 'user';
1152
+ user: {
1153
+ type: 'person';
1154
+ person: {
1155
+ email: string;
1156
+ };
1157
+ name: string | null;
1158
+ avatar_url: string | null;
1159
+ id: string;
1160
+ object: 'user';
1161
+ } | PartialUserObjectResponse;
1162
+ } | {
1163
+ type: 'workspace';
1164
+ workspace: true;
1165
+ };
1166
+ workspace_name: string | null;
1167
+ };
1168
+ id: string;
1169
+ type?: 'bot';
1170
+ name?: string | null;
1171
+ avatar_url?: string | null;
1172
+ object?: 'user';
1173
+ } | null;
1174
+ };
1175
+ export type PartialPageObjectResponse = {
1176
+ object: 'page';
1177
+ id: string;
1178
+ };
1179
+ export type PageObjectResponse = {
1180
+ parent: {
1181
+ type: 'database_id';
1182
+ database_id: string;
1183
+ } | {
1184
+ type: 'page_id';
1185
+ page_id: string;
1186
+ } | {
1187
+ type: 'block_id';
1188
+ block_id: string;
1189
+ } | {
1190
+ type: 'workspace';
1191
+ workspace: true;
1192
+ };
1193
+ properties: Record<string, {
1194
+ type: string;
1195
+ id?: string;
1196
+ url?: string;
1197
+ select?: SelectPropertyResponse;
1198
+ multi_select?: SelectPropertyResponse[];
1199
+ status?: SelectPropertyResponse;
1200
+ date?: DateResponse;
1201
+ email?: string;
1202
+ phone_number?: string;
1203
+ checkbox?: boolean;
1204
+ files?: Array<{
1205
+ file?: {
1206
+ url: string;
1207
+ expiry_time: string;
1208
+ };
1209
+ external?: {
1210
+ url: string;
1211
+ };
1212
+ name: string;
1213
+ type?: string;
1214
+ }>;
1215
+ created_by?: PartialUserObjectResponse | UserObjectResponse;
1216
+ created_time: string;
1217
+ last_edited_by?: PartialUserObjectResponse | UserObjectResponse;
1218
+ last_edited_time?: string;
1219
+ formula?: FormulaPropertyResponse;
1220
+ unique_id?: {
1221
+ prefix: string | null;
1222
+ number: number | null;
1223
+ };
1224
+ verification?: VerificationPropertyUnverifiedResponse | VerificationPropertyResponse;
1225
+ title?: Array<RichTextItemResponse>;
1226
+ rich_text?: Array<RichTextItemResponse>;
1227
+ people?: Array<PartialUserObjectResponse | UserObjectResponse>;
1228
+ relation?: Array<{
1229
+ id: string;
1230
+ }>;
1231
+ rollup?: {
1232
+ type: string;
1233
+ number?: number | null;
1234
+ date?: DateResponse | null;
1235
+ function: string;
1236
+ };
1237
+ array?: Array<{
1238
+ type: 'number' | 'url' | 'select' | 'multi_select';
1239
+ number?: number | null;
1240
+ url?: string | null;
1241
+ select?: SelectPropertyResponse | null;
1242
+ multi_select?: Array<SelectPropertyResponse>;
1243
+ }>;
1244
+ }>;
1245
+ icon: {
1246
+ type: 'emoji';
1247
+ emoji: string;
1248
+ } | {
1249
+ type: 'external';
1250
+ external: {
1251
+ url: string;
1252
+ };
1253
+ } | {
1254
+ type: 'file';
1255
+ file: {
1256
+ url: string;
1257
+ expiry_time: string;
1258
+ };
1259
+ } | null;
1260
+ cover: {
1261
+ type: 'external';
1262
+ external: {
1263
+ url: string;
1264
+ };
1265
+ } | {
1266
+ type: 'file';
1267
+ file: {
1268
+ url: string;
1269
+ expiry_time: string;
1270
+ };
1271
+ } | null;
1272
+ created_by: PartialUserObjectResponse;
1273
+ last_edited_by: PartialUserObjectResponse;
1274
+ object: 'page';
1275
+ id: string;
1276
+ created_time: string;
1277
+ last_edited_time: string;
1278
+ archived: boolean;
1279
+ url: string;
1280
+ public_url: string | null;
1281
+ };
1282
+ type NumberDatabasePropertyConfigResponse = {
1283
+ type: 'number';
1284
+ number: {
1285
+ format: string;
1286
+ };
1287
+ id: string;
1288
+ name: string;
1289
+ };
1290
+ type FormulaDatabasePropertyConfigResponse = {
1291
+ type: 'formula';
1292
+ formula: {
1293
+ expression: string;
1294
+ };
1295
+ id: string;
1296
+ name: string;
1297
+ };
1298
+ type SelectDatabasePropertyConfigResponse = {
1299
+ type: 'select';
1300
+ select: {
1301
+ options: Array<SelectPropertyResponse>;
1302
+ };
1303
+ id: string;
1304
+ name: string;
1305
+ };
1306
+ type MultiSelectDatabasePropertyConfigResponse = {
1307
+ type: 'multi_select';
1308
+ multi_select: {
1309
+ options: Array<SelectPropertyResponse>;
1310
+ };
1311
+ id: string;
1312
+ name: string;
1313
+ };
1314
+ type StatusPropertyResponse = {
1315
+ id: string;
1316
+ name: string;
1317
+ color: SelectColor;
1318
+ };
1319
+ type StatusDatabasePropertyConfigResponse = {
1320
+ type: 'status';
1321
+ status: {
1322
+ options: Array<StatusPropertyResponse>;
1323
+ groups: Array<{
1324
+ id: string;
1325
+ name: string;
1326
+ color: SelectColor;
1327
+ option_ids: Array<string>;
1328
+ }>;
1329
+ };
1330
+ id: string;
1331
+ name: string;
1332
+ };
1333
+ type SinglePropertyDatabasePropertyRelationConfigResponse = {
1334
+ type: 'single_property';
1335
+ single_property: string;
1336
+ database_id: string;
1337
+ };
1338
+ type DualPropertyDatabasePropertyRelationConfigResponse = {
1339
+ type: 'dual_property';
1340
+ dual_property: {
1341
+ synced_property_id: string;
1342
+ synced_property_name: string;
1343
+ };
1344
+ database_id: string;
1345
+ };
1346
+ type DatabasePropertyRelationConfigResponse = SinglePropertyDatabasePropertyRelationConfigResponse | DualPropertyDatabasePropertyRelationConfigResponse;
1347
+ type RelationDatabasePropertyConfigResponse = {
1348
+ type: 'relation';
1349
+ relation: DatabasePropertyRelationConfigResponse;
1350
+ id: string;
1351
+ name: string;
1352
+ };
1353
+ type RollupDatabasePropertyConfigResponse = {
1354
+ type: 'rollup';
1355
+ rollup: {
1356
+ rollup_property_name: string;
1357
+ relation_property_name: string;
1358
+ rollup_property_id: string;
1359
+ relation_property_id: string;
1360
+ function: string;
1361
+ };
1362
+ id: string;
1363
+ name: string;
1364
+ };
1365
+ type UniqueIdDatabasePropertyConfigResponse = {
1366
+ type: 'unique_id';
1367
+ unique_id: {
1368
+ prefix: string | null;
1369
+ };
1370
+ id: string;
1371
+ name: string;
1372
+ };
1373
+ type TitleDatabasePropertyConfigResponse = {
1374
+ type: 'title';
1375
+ title: Record<string, never>;
1376
+ id: string;
1377
+ name: string;
1378
+ };
1379
+ type RichTextDatabasePropertyConfigResponse = {
1380
+ type: 'rich_text';
1381
+ rich_text: Record<string, never>;
1382
+ id: string;
1383
+ name: string;
1384
+ };
1385
+ type UrlDatabasePropertyConfigResponse = {
1386
+ type: 'url';
1387
+ url: Record<string, never>;
1388
+ id: string;
1389
+ name: string;
1390
+ };
1391
+ type PeopleDatabasePropertyConfigResponse = {
1392
+ type: 'people';
1393
+ people: Record<string, never>;
1394
+ id: string;
1395
+ name: string;
1396
+ };
1397
+ type FilesDatabasePropertyConfigResponse = {
1398
+ type: 'files';
1399
+ files: Record<string, never>;
1400
+ id: string;
1401
+ name: string;
1402
+ };
1403
+ type EmailDatabasePropertyConfigResponse = {
1404
+ type: 'email';
1405
+ email: Record<string, never>;
1406
+ id: string;
1407
+ name: string;
1408
+ };
1409
+ type PhoneNumberDatabasePropertyConfigResponse = {
1410
+ type: 'phone_number';
1411
+ phone_number: Record<string, never>;
1412
+ id: string;
1413
+ name: string;
1414
+ };
1415
+ type DateDatabasePropertyConfigResponse = {
1416
+ type: 'date';
1417
+ date: Record<string, never>;
1418
+ id: string;
1419
+ name: string;
1420
+ };
1421
+ type CheckboxDatabasePropertyConfigResponse = {
1422
+ type: 'checkbox';
1423
+ checkbox: Record<string, never>;
1424
+ id: string;
1425
+ name: string;
1426
+ };
1427
+ type CreatedByDatabasePropertyConfigResponse = {
1428
+ type: 'created_by';
1429
+ created_by: Record<string, never>;
1430
+ id: string;
1431
+ name: string;
1432
+ };
1433
+ type CreatedTimeDatabasePropertyConfigResponse = {
1434
+ type: 'created_time';
1435
+ created_time: Record<string, never>;
1436
+ id: string;
1437
+ name: string;
1438
+ };
1439
+ type LastEditedByDatabasePropertyConfigResponse = {
1440
+ type: 'last_edited_by';
1441
+ last_edited_by: Record<string, never>;
1442
+ id: string;
1443
+ name: string;
1444
+ };
1445
+ type LastEditedTimeDatabasePropertyConfigResponse = {
1446
+ type: 'last_edited_time';
1447
+ last_edited_time: Record<string, never>;
1448
+ id: string;
1449
+ name: string;
1450
+ };
1451
+ type DatabasePropertyConfigResponse = NumberDatabasePropertyConfigResponse | FormulaDatabasePropertyConfigResponse | SelectDatabasePropertyConfigResponse | MultiSelectDatabasePropertyConfigResponse | StatusDatabasePropertyConfigResponse | RelationDatabasePropertyConfigResponse | RollupDatabasePropertyConfigResponse | UniqueIdDatabasePropertyConfigResponse | TitleDatabasePropertyConfigResponse | RichTextDatabasePropertyConfigResponse | UrlDatabasePropertyConfigResponse | PeopleDatabasePropertyConfigResponse | FilesDatabasePropertyConfigResponse | EmailDatabasePropertyConfigResponse | PhoneNumberDatabasePropertyConfigResponse | DateDatabasePropertyConfigResponse | CheckboxDatabasePropertyConfigResponse | CreatedByDatabasePropertyConfigResponse | CreatedTimeDatabasePropertyConfigResponse | LastEditedByDatabasePropertyConfigResponse | LastEditedTimeDatabasePropertyConfigResponse;
1452
+ export type PartialDatabaseObjectResponse = {
1453
+ object: 'database';
1454
+ id: string;
1455
+ properties: Record<string, DatabasePropertyConfigResponse>;
1456
+ };
1457
+ /**
1458
+ * BLOCK RESPONSES TYPES
1459
+ */
1460
+ export type BlockObjectResponse = ParagraphBlockObjectResponse | Heading1BlockObjectResponse | Heading2BlockObjectResponse | Heading3BlockObjectResponse | BulletedListItemBlockObjectResponse | NumberedListItemBlockObjectResponse | QuoteBlockObjectResponse | ToDoBlockObjectResponse | ToggleBlockObjectResponse | TemplateBlockObjectResponse | SyncedBlockBlockObjectResponse | ChildPageBlockObjectResponse | ChildDatabaseBlockObjectResponse | EquationBlockObjectResponse | CalloutBlockObjectResponse | DividerBlockObjectResponse | BreadcrumbBlockObjectResponse | TableOfContentsBlockObjectResponse | ColumnListBlockObjectResponse | ColumnBlockObjectResponse | LinkToPageBlockObjectResponse | TableBlockObjectResponse | TableRowBlockObjectResponse | EmbedBlockObjectResponse | BookmarkBlockObjectResponse | ImageBlockObjectResponse | VideoBlockObjectResponse | PdfBlockObjectResponse | FileBlockObjectResponse | AudioBlockObjectResponse | LinkPreviewBlockObjectResponse | UnsupportedBlockObjectResponse;
1461
+ export type ListBlockChildrenResponse = {
1462
+ type: 'block';
1463
+ block: Record<string, never>;
1464
+ object: 'list';
1465
+ next_cursor: string | null;
1466
+ has_more: boolean;
1467
+ results: Array<BlockObjectResponse>;
1468
+ };
1469
+ /**
1470
+ * PAGE RESPONSES TYPES
1471
+ */
1472
+ export type DatabaseObjectResponse = {
1473
+ title: Array<RichTextItemResponse>;
1474
+ description: Array<RichTextItemResponse>;
1475
+ icon: {
1476
+ type: 'emoji';
1477
+ emoji: string;
1478
+ } | {
1479
+ type: 'external';
1480
+ external: {
1481
+ url: string;
1482
+ };
1483
+ } | {
1484
+ type: 'file';
1485
+ file: {
1486
+ url: string;
1487
+ expiry_time: string;
1488
+ };
1489
+ } | null;
1490
+ cover: {
1491
+ type: 'external';
1492
+ external: {
1493
+ url: string;
1494
+ };
1495
+ } | {
1496
+ type: 'file';
1497
+ file: {
1498
+ url: string;
1499
+ expiry_time: string;
1500
+ };
1501
+ } | null;
1502
+ properties: Record<string, DatabasePropertyConfigResponse>;
1503
+ parent: {
1504
+ type: 'database_id';
1505
+ database_id: string;
1506
+ } | {
1507
+ type: 'page_id';
1508
+ page_id: string;
1509
+ } | {
1510
+ type: 'block_id';
1511
+ block_id: string;
1512
+ } | {
1513
+ type: 'workspace';
1514
+ workspace: true;
1515
+ };
1516
+ created_by: PartialUserObjectResponse;
1517
+ last_edited_by: PartialUserObjectResponse;
1518
+ is_inline: boolean;
1519
+ object: 'database';
1520
+ id: string;
1521
+ created_time: string;
1522
+ last_edited_time: string;
1523
+ archived: boolean;
1524
+ url: string;
1525
+ public_url: string | null;
1526
+ };
1527
+ export type QueryDatabaseResponse = {
1528
+ type: 'page_or_database';
1529
+ page_or_database: Record<string, never>;
1530
+ object: 'list';
1531
+ next_cursor: string | null;
1532
+ has_more: boolean;
1533
+ results: Array<PageObjectResponse | PartialPageObjectResponse | PartialDatabaseObjectResponse | DatabaseObjectResponse>;
1534
+ };
1535
+ export type GetDatabaseResponse = PartialDatabaseObjectResponse | DatabaseObjectResponse;
1536
+ export {};
1537
+ //# sourceMappingURL=NotionResponse.d.ts.map