@notionhq/client 0.3.3 → 0.4.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.
@@ -1,776 +0,0 @@
1
- /**
2
- * Notion API Types
3
- *
4
- * This file contains type definitions for common object types across various interfaces in the Notion API.
5
- * In the future, the contents of this file will be generated from an API definition.
6
- */
7
- import { PropertyValueMap } from "./api-endpoints";
8
- import { DistributiveExtend, DistributiveOmit, PartialBy, RequiredBy } from "./type-utils";
9
- export interface PaginationParameters {
10
- start_cursor?: string;
11
- page_size?: number;
12
- }
13
- export interface PaginatedList<O extends APISingularObject = APISingularObject> {
14
- object: "list";
15
- results: O[];
16
- has_more: boolean;
17
- next_cursor: string | null;
18
- }
19
- export declare type APIObject = APISingularObject | PaginatedList;
20
- export declare type APISingularObject = Database | Page | User | Block;
21
- export declare type Block = ParagraphBlock | HeadingOneBlock | HeadingTwoBlock | HeadingThreeBlock | BulletedListItemBlock | NumberedListItemBlock | ToDoBlock | ToggleBlock | ChildPageBlock | EmbedBlock | BookmarkBlock | ImageBlock | VideoBlock | FileBlock | PDFBlock | AudioBlock | UnsupportedBlock;
22
- export interface BlockBase {
23
- object: "block";
24
- id: string;
25
- type: string;
26
- created_time: string;
27
- last_edited_time: string;
28
- has_children: boolean;
29
- archived: boolean;
30
- }
31
- export interface ParagraphBlock extends BlockBase {
32
- type: "paragraph";
33
- paragraph: {
34
- text: RichText[];
35
- children?: Block[];
36
- };
37
- }
38
- export interface HeadingOneBlock extends BlockBase {
39
- type: "heading_1";
40
- heading_1: {
41
- text: RichText[];
42
- };
43
- has_children: false;
44
- }
45
- export interface HeadingTwoBlock extends BlockBase {
46
- type: "heading_2";
47
- heading_2: {
48
- text: RichText[];
49
- };
50
- has_children: false;
51
- }
52
- export interface HeadingThreeBlock extends BlockBase {
53
- type: "heading_3";
54
- heading_3: {
55
- text: RichText[];
56
- };
57
- has_children: false;
58
- }
59
- export interface BulletedListItemBlock extends BlockBase {
60
- type: "bulleted_list_item";
61
- bulleted_list_item: {
62
- text: RichText[];
63
- children?: Block[];
64
- };
65
- }
66
- export interface NumberedListItemBlock extends BlockBase {
67
- type: "numbered_list_item";
68
- numbered_list_item: {
69
- text: RichText[];
70
- children?: Block[];
71
- };
72
- }
73
- export interface ToDoBlock extends BlockBase {
74
- type: "to_do";
75
- to_do: {
76
- text: RichText[];
77
- checked: boolean;
78
- children?: Block[];
79
- };
80
- }
81
- export interface ToggleBlock extends BlockBase {
82
- type: "toggle";
83
- toggle: {
84
- text: RichText[];
85
- children?: Block[];
86
- };
87
- }
88
- export interface ChildPageBlock extends BlockBase {
89
- type: "child_page";
90
- child_page: {
91
- title: string;
92
- };
93
- }
94
- export interface EmbedBlock extends BlockBase {
95
- type: "embed";
96
- embed: {
97
- url: string;
98
- caption?: RichText[];
99
- };
100
- }
101
- export interface BookmarkBlock extends BlockBase {
102
- type: "bookmark";
103
- bookmark: {
104
- url: string;
105
- caption?: RichText[];
106
- };
107
- }
108
- export interface ExternalFileWithCaption extends ExternalFile {
109
- caption?: RichText[];
110
- }
111
- export interface FileWithCaption extends File {
112
- caption?: RichText[];
113
- }
114
- export interface ImageBlock extends BlockBase {
115
- type: "image";
116
- image: ExternalFileWithCaption | FileWithCaption;
117
- }
118
- export interface VideoBlock extends BlockBase {
119
- type: "video";
120
- video: ExternalFileWithCaption | FileWithCaption;
121
- }
122
- export interface FileBlock extends BlockBase {
123
- type: "file";
124
- file: ExternalFileWithCaption | FileWithCaption;
125
- }
126
- export interface PDFBlock extends BlockBase {
127
- type: "pdf";
128
- pdf: ExternalFileWithCaption | FileWithCaption;
129
- }
130
- export interface AudioBlock extends BlockBase {
131
- type: "audio";
132
- audio: ExternalFileWithCaption | FileWithCaption;
133
- }
134
- export interface UnsupportedBlock extends BlockBase {
135
- type: "unsupported";
136
- }
137
- export interface Database {
138
- object: "database";
139
- id: string;
140
- parent: ParentPage | ParentWorkspace;
141
- created_time: string;
142
- last_edited_time: string;
143
- title: RichText[];
144
- url: string;
145
- icon: File | ExternalFile | Emoji | null;
146
- cover: File | ExternalFile | null;
147
- properties: {
148
- [propertyName: string]: Property;
149
- };
150
- }
151
- export declare type Property = TitleProperty | RichTextProperty | NumberProperty | SelectProperty | MultiSelectProperty | DateProperty | PeopleProperty | FilesProperty | CheckboxProperty | URLProperty | EmailProperty | PhoneNumberProperty | FormulaProperty | RelationProperty | RollupProperty | CreatedTimeProperty | CreatedByProperty | LastEditedTimeProperty | LastEditedByProperty;
152
- export interface PropertyBase {
153
- id: string;
154
- type: string;
155
- name: string;
156
- }
157
- export interface TitleProperty extends PropertyBase {
158
- type: "title";
159
- title: Record<string, never>;
160
- }
161
- export interface RichTextProperty extends PropertyBase {
162
- type: "rich_text";
163
- rich_text: Record<string, never>;
164
- }
165
- export interface NumberProperty extends PropertyBase {
166
- type: "number";
167
- number: {
168
- format: "number" | "number_with_commas" | "percent" | "dollar" | "canadian_dollar" | "euro" | "pound" | "yen" | "ruble" | "rupee" | "won" | "yuan" | "real" | "lira" | "rupiah" | "franc" | "hong_kong_dollar" | "new_zealand_dollar" | "krona" | "norwegian_krone" | "mexican_peso" | "rand" | "new_taiwan_dollar" | "danish_krone" | "zloty" | "baht" | "forint" | "koruna" | "shekel" | "chilean_peso" | "philippine_peso" | "dirham" | "colombian_peso" | "riyal" | "ringgit" | "leu";
169
- };
170
- }
171
- export interface SelectProperty extends PropertyBase {
172
- type: "select";
173
- select: {
174
- options: SelectOption[];
175
- };
176
- }
177
- export interface MultiSelectProperty extends PropertyBase {
178
- type: "multi_select";
179
- multi_select: {
180
- options: MultiSelectOption[];
181
- };
182
- }
183
- export interface DateProperty extends PropertyBase {
184
- type: "date";
185
- date: Record<string, never>;
186
- }
187
- export interface PeopleProperty extends PropertyBase {
188
- type: "people";
189
- people: Record<string, never>;
190
- }
191
- export interface FilesProperty extends PropertyBase {
192
- type: "files";
193
- file: Record<string, never>;
194
- }
195
- export interface CheckboxProperty extends PropertyBase {
196
- type: "checkbox";
197
- checkbox: Record<string, never>;
198
- }
199
- export interface URLProperty extends PropertyBase {
200
- type: "url";
201
- url: Record<string, never>;
202
- }
203
- export interface EmailProperty extends PropertyBase {
204
- type: "email";
205
- email: Record<string, never>;
206
- }
207
- export interface PhoneNumberProperty extends PropertyBase {
208
- type: "phone_number";
209
- phone_number: Record<string, never>;
210
- }
211
- export interface FormulaProperty extends PropertyBase {
212
- type: "formula";
213
- formula: {
214
- expression: string;
215
- };
216
- }
217
- export interface RelationProperty extends PropertyBase {
218
- type: "relation";
219
- relation: {
220
- database_id: string;
221
- synced_property_name?: string;
222
- synced_property_id?: string;
223
- };
224
- }
225
- export interface RollupProperty extends PropertyBase {
226
- type: "rollup";
227
- rollup: {
228
- relation_property_name: string;
229
- relation_property_id: string;
230
- rollup_property_name: string;
231
- rollup_property_id: string;
232
- function: "count_all" | "count_values" | "count_unique_values" | "count_empty" | "count_not_empty" | "percent_empty" | "percent_not_empty" | "sum" | "average" | "median" | "min" | "max" | "range" | "show_original";
233
- };
234
- }
235
- export interface CreatedTimeProperty extends PropertyBase {
236
- type: "created_time";
237
- created_time: Record<string, never>;
238
- }
239
- export interface CreatedByProperty extends PropertyBase {
240
- type: "created_by";
241
- created_by: Record<string, never>;
242
- }
243
- export interface LastEditedTimeProperty extends PropertyBase {
244
- type: "last_edited_time";
245
- last_edited_time: Record<string, never>;
246
- }
247
- export interface LastEditedByProperty extends PropertyBase {
248
- type: "last_edited_by";
249
- last_edited_by: Record<string, never>;
250
- }
251
- export declare type User = PersonUser | BotUser;
252
- export interface UserBase {
253
- object: "user";
254
- id: string;
255
- type?: string;
256
- name?: string;
257
- avatar_url?: string;
258
- }
259
- export interface PersonUser extends UserBase {
260
- type?: "person";
261
- person?: {
262
- email: string;
263
- };
264
- }
265
- export interface BotUser extends UserBase {
266
- type?: "bot";
267
- }
268
- export interface SelectOptionBase {
269
- color?: Color;
270
- }
271
- export interface SelectOptionWithName extends SelectOptionBase {
272
- name: string;
273
- id?: never;
274
- }
275
- export interface SelectOptionWithId extends SelectOptionBase {
276
- name?: never;
277
- id: string;
278
- }
279
- export declare type SelectOption = SelectOptionWithName | SelectOptionWithId;
280
- export declare type MultiSelectOption = SelectOption;
281
- export interface SearchSort {
282
- direction: "ascending" | "descending";
283
- timestamp: "last_edited_time";
284
- }
285
- export interface SearchFilter {
286
- value: "page" | "database";
287
- property: "object";
288
- }
289
- export declare type Color = "default" | "gray" | "brown" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "red";
290
- export declare type BackgroundColor = "gray_background" | "brown_background" | "orange_background" | "yellow_background" | "green_background" | "blue_background" | "purple_background" | "pink_background" | "red_background";
291
- export interface Date {
292
- start: string;
293
- end?: string;
294
- }
295
- export declare type Filter = SinglePropertyFilter | CompoundFilter;
296
- export declare type SinglePropertyFilter = TextFilter | NumberFilter | CheckboxFilter | SelectFilter | MultiSelectFilter | DateFilter | PeopleFilter | FilesFilter | RelationFilter | FormulaFilter;
297
- export interface CompoundFilter {
298
- or?: Filter[];
299
- and?: Filter[];
300
- }
301
- export interface SinglePropertyFilterBase {
302
- property: string;
303
- }
304
- /** A text filter condition applies to database properties of types "title", "rich_text", "url", "email", and "phone". */
305
- export interface TextFilter extends SinglePropertyFilterBase {
306
- text: {
307
- equals?: string;
308
- does_not_equal?: string;
309
- contains?: string;
310
- does_not_contain?: string;
311
- starts_with?: string;
312
- ends_with?: string;
313
- is_empty?: true;
314
- is_not_empty?: true;
315
- };
316
- }
317
- export interface NumberFilter extends SinglePropertyFilterBase {
318
- number: {
319
- equals?: number;
320
- does_not_equal?: number;
321
- greater_than?: number;
322
- less_than?: number;
323
- greater_than_or_equal_to?: number;
324
- less_than_or_equal_to?: number;
325
- is_empty?: true;
326
- is_not_empty?: true;
327
- };
328
- }
329
- export interface CheckboxFilter extends SinglePropertyFilterBase {
330
- checkbox: {
331
- equals?: boolean;
332
- does_not_equal?: boolean;
333
- };
334
- }
335
- export interface SelectFilter extends SinglePropertyFilterBase {
336
- select: {
337
- equals?: string;
338
- does_not_equal?: string;
339
- is_empty?: true;
340
- is_not_empty?: true;
341
- };
342
- }
343
- export interface MultiSelectFilter extends SinglePropertyFilterBase {
344
- multi_select: {
345
- contains?: string;
346
- does_not_contain?: string;
347
- is_empty?: true;
348
- is_not_empty?: true;
349
- };
350
- }
351
- export interface DateFilter extends SinglePropertyFilterBase {
352
- date: {
353
- equals?: string;
354
- before?: string;
355
- after?: string;
356
- on_or_before?: string;
357
- is_empty?: true;
358
- is_not_empty?: true;
359
- on_or_after?: string;
360
- past_week?: Record<string, never>;
361
- past_month?: Record<string, never>;
362
- past_year?: Record<string, never>;
363
- next_week?: Record<string, never>;
364
- next_month?: Record<string, never>;
365
- next_year?: Record<string, never>;
366
- };
367
- }
368
- export interface PeopleFilter extends SinglePropertyFilterBase {
369
- people: {
370
- contains?: string;
371
- does_not_contain?: string;
372
- is_empty?: true;
373
- is_not_empty?: true;
374
- };
375
- }
376
- export interface FilesFilter extends SinglePropertyFilterBase {
377
- files: {
378
- is_empty?: true;
379
- is_not_empty?: true;
380
- };
381
- }
382
- export interface RelationFilter extends SinglePropertyFilterBase {
383
- relation: {
384
- contains?: string;
385
- does_not_contain?: string;
386
- is_empty?: true;
387
- is_not_empty?: true;
388
- };
389
- }
390
- export interface FormulaFilter extends SinglePropertyFilterBase {
391
- formula: {
392
- text?: Omit<TextFilter, "property">;
393
- checkbox?: Omit<CheckboxFilter, "property">;
394
- number?: Omit<NumberFilter, "property">;
395
- date?: Omit<DateFilter, "property">;
396
- };
397
- }
398
- export interface Sort {
399
- property?: string;
400
- timestamp?: "created_time" | "last_edited_time";
401
- direction: "ascending" | "descending";
402
- }
403
- export interface Page {
404
- object: "page";
405
- id: string;
406
- parent: ParentDatabase | ParentPage | ParentWorkspace;
407
- created_time: string;
408
- last_edited_time: string;
409
- archived: boolean;
410
- icon: File | ExternalFile | Emoji | null;
411
- cover: File | ExternalFile | null;
412
- properties: PropertyValueMap;
413
- url: string;
414
- }
415
- /**
416
- * Update Block (input)
417
- */
418
- export declare type UpdateBlock = UpdateBlockBase | ParagraphUpdateBlock | HeadingOneUpdateBlock | HeadingTwoUpdateBlock | HeadingThreeUpdateBlock | BulletedListItemUpdateBlock | NumberedListItemUpdateBlock | ToggleUpdateBlock | ToDoUpdateBlock;
419
- interface UpdateBlockBase {
420
- archived?: boolean;
421
- }
422
- interface TextContentUpdate extends UpdateBlockBase {
423
- text: RichTextInput[];
424
- }
425
- interface ParagraphUpdateBlock extends UpdateBlockBase {
426
- paragraph: TextContentUpdate;
427
- }
428
- interface HeadingOneUpdateBlock extends UpdateBlockBase {
429
- heading_1: TextContentUpdate;
430
- }
431
- interface HeadingTwoUpdateBlock extends UpdateBlockBase {
432
- heading_2: TextContentUpdate;
433
- }
434
- interface HeadingThreeUpdateBlock extends UpdateBlockBase {
435
- heading_3: TextContentUpdate;
436
- }
437
- interface BulletedListItemUpdateBlock extends UpdateBlockBase {
438
- bulleted_list_item: TextContentUpdate;
439
- }
440
- interface NumberedListItemUpdateBlock extends UpdateBlockBase {
441
- numbered_list_item: TextContentUpdate;
442
- }
443
- interface ToggleUpdateBlock extends UpdateBlockBase {
444
- toggle: TextContentUpdate;
445
- }
446
- interface ToDoUpdateBlock extends UpdateBlockBase {
447
- to_do: {
448
- text?: RichTextInput[];
449
- checked?: boolean;
450
- };
451
- }
452
- export declare type ParentInput = Omit<ParentDatabase, "type"> | Omit<ParentPage, "type">;
453
- export declare type ParentPageInput = Omit<ParentPage, "type">;
454
- interface ParentDatabase {
455
- type: "database_id";
456
- database_id: string;
457
- }
458
- interface ParentPage {
459
- type: "page_id";
460
- page_id: string;
461
- }
462
- interface ParentWorkspace {
463
- type: "workspace";
464
- }
465
- export declare type PropertyValue = TitlePropertyValue | RichTextPropertyValue | NumberPropertyValue | SelectPropertyValue | MultiSelectPropertyValue | DatePropertyValue | FormulaPropertyValue | RollupPropertyValue | RelationPropertyValue | PeoplePropertyValue | FilesPropertyValue | CheckboxPropertyValue | URLPropertyValue | EmailPropertyValue | PhoneNumberPropertyValue | CreatedTimePropertyValue | CreatedByPropertyValue | LastEditedTimePropertyValue | LastEditedByPropertyValue;
466
- export declare type PropertyValueWithoutId = DistributiveOmit<PropertyValue, "id">;
467
- export declare type InputPropertyValue = DistributiveExtend<DistributiveOmit<InputPropertyValueWithRequiredId, "id">, {
468
- id?: string;
469
- }>;
470
- export declare type InputPropertyValueWithRequiredId = TitleInputPropertyValue | RichTextInputPropertyValue | NumberPropertyValue | SelectPropertyValue | MultiSelectPropertyValue | DatePropertyValue | FormulaPropertyValue | RollupPropertyValue | PeoplePropertyValue | FilesPropertyInputValue | CheckboxPropertyValue | URLPropertyValue | EmailPropertyValue | PhoneNumberPropertyValue | CreatedTimePropertyValue | CreatedByPropertyValue | LastEditedTimePropertyValue | LastEditedByPropertyValue;
471
- export interface PropertyValueBase {
472
- id: string;
473
- type: string;
474
- }
475
- export interface TitlePropertyValue extends PropertyValueBase {
476
- type: "title";
477
- title: RichText[];
478
- }
479
- export interface RichTextPropertyValue extends PropertyValueBase {
480
- type: "rich_text";
481
- rich_text: RichText[];
482
- }
483
- export interface TitleInputPropertyValue extends PropertyValueBase {
484
- type: "title";
485
- title: RichTextInput[];
486
- }
487
- export interface RichTextInputPropertyValue extends PropertyValueBase {
488
- type: "rich_text";
489
- rich_text: RichTextInput[];
490
- }
491
- export interface NumberPropertyValue extends PropertyValueBase {
492
- type: "number";
493
- number: number | null;
494
- }
495
- export interface SelectPropertyValue extends PropertyValueBase {
496
- type: "select";
497
- select: SelectOption | null;
498
- }
499
- export interface MultiSelectPropertyValue extends PropertyValueBase {
500
- type: "multi_select";
501
- multi_select: MultiSelectOption[];
502
- }
503
- export interface DatePropertyValue extends PropertyValueBase {
504
- type: "date";
505
- date: Date | null;
506
- }
507
- export interface FormulaPropertyValue extends PropertyValueBase {
508
- type: "formula";
509
- formula: StringFormulaValue | NumberFormulaValue | BooleanFormulaValue | DateFormulaValue;
510
- }
511
- export interface StringFormulaValue {
512
- type: "string";
513
- string?: string;
514
- }
515
- export interface NumberFormulaValue {
516
- type: "number";
517
- number?: number;
518
- }
519
- export interface BooleanFormulaValue {
520
- type: "boolean";
521
- boolean: boolean;
522
- }
523
- export interface DateFormulaValue {
524
- type: "date";
525
- date: Date;
526
- }
527
- export interface RollupPropertyValue extends PropertyValueBase {
528
- type: "rollup";
529
- rollup: NumberRollupValue | DateRollupValue | ArrayRollupValue;
530
- }
531
- export interface RelationPropertyValue extends PropertyValueBase {
532
- type: "relation";
533
- relation: {
534
- id: string;
535
- }[];
536
- }
537
- export interface NumberRollupValue {
538
- type: "number";
539
- number: number | null;
540
- }
541
- export interface DateRollupValue {
542
- type: "date";
543
- date: Date | null;
544
- }
545
- export interface ArrayRollupValue {
546
- type: "array";
547
- array: PropertyValueWithoutId[];
548
- }
549
- export interface PeoplePropertyValue extends PropertyValueBase {
550
- type: "people";
551
- people: User[];
552
- }
553
- declare type FileWithName = {
554
- name: string;
555
- } & (File | ExternalFile);
556
- declare type ExternalFileWithName = {
557
- name: string;
558
- } & ExternalFile;
559
- export interface FilesPropertyValue extends PropertyValueBase {
560
- type: "files";
561
- files: FileWithName[];
562
- }
563
- export interface FilesPropertyInputValue extends PropertyValueBase {
564
- type: "files";
565
- files: ExternalFileWithName[];
566
- }
567
- export interface CheckboxPropertyValue extends PropertyValueBase {
568
- type: "checkbox";
569
- checkbox: boolean;
570
- }
571
- export interface URLPropertyValue extends PropertyValueBase {
572
- type: "url";
573
- url: string | null;
574
- }
575
- export interface EmailPropertyValue extends PropertyValueBase {
576
- type: "email";
577
- email: string | null;
578
- }
579
- export interface PhoneNumberPropertyValue extends PropertyValueBase {
580
- type: "phone_number";
581
- phone_number: string | null;
582
- }
583
- export interface CreatedTimePropertyValue extends PropertyValueBase {
584
- type: "created_time";
585
- created_time: string;
586
- }
587
- export interface CreatedByPropertyValue extends PropertyValueBase {
588
- type: "created_by";
589
- created_by: User;
590
- }
591
- export interface LastEditedTimePropertyValue extends PropertyValueBase {
592
- type: "last_edited_time";
593
- last_edited_time: string;
594
- }
595
- export interface LastEditedByPropertyValue extends PropertyValueBase {
596
- type: "last_edited_by";
597
- last_edited_by: User;
598
- }
599
- export declare type RichText = RichTextText | RichTextMention | RichTextEquation;
600
- export declare type RichTextInput = RichTextTextInput | RichTextMention | RichTextEquation;
601
- export interface RichTextBaseInput {
602
- plain_text?: string;
603
- href?: string;
604
- annotations?: Annotations;
605
- type: string;
606
- }
607
- export interface RichTextTextInput extends RichTextBaseInput {
608
- type: "text";
609
- text: {
610
- content: string;
611
- link?: {
612
- type: "url";
613
- url: string;
614
- };
615
- };
616
- }
617
- export declare type RichTextBase = RequiredBy<RichTextBaseInput, "plain_text" | "annotations">;
618
- export declare type RichTextText = RequiredBy<RichTextTextInput, "plain_text" | "annotations">;
619
- export interface RichTextMention extends RichTextBase {
620
- type: "mention";
621
- mention: UserMention | PageMention | DatabaseMention | DateMention;
622
- }
623
- export interface UserMention {
624
- type: "user";
625
- user: User;
626
- }
627
- export interface PageMention {
628
- type: "page";
629
- page: {
630
- id: string;
631
- };
632
- }
633
- export interface DatabaseMention {
634
- type: "database";
635
- database: {
636
- id: string;
637
- };
638
- }
639
- export interface DateMention {
640
- type: "date";
641
- date: DatePropertyValue;
642
- }
643
- export interface RichTextEquation extends RichTextBase {
644
- type: "equation";
645
- equation: {
646
- expression: string;
647
- };
648
- }
649
- export interface Annotations {
650
- bold: boolean;
651
- italic: boolean;
652
- strikethrough: boolean;
653
- underline: boolean;
654
- code: boolean;
655
- color: Color | BackgroundColor;
656
- }
657
- export declare type PropertySchema = TitlePropertySchema | RichTextPropertySchema | NumberPropertySchema | SelectPropertySchema | MultiSelectPropertySchema | DatePropertySchema | PeoplePropertySchema | FilePropertySchema | CheckboxPropertySchema | URLPropertySchema | EmailPropertySchema | PhoneNumberPropertySchema | FormulaPropertySchema | RollupPropertySchema | RelationPropertySchema | CreatedTimePropertySchema | CreatedByPropertySchema | LastEditedTimePropertySchema | LastEditedByPropertySchema;
658
- export interface TitlePropertySchema {
659
- title: Record<string, never>;
660
- }
661
- export interface RichTextPropertySchema {
662
- rich_text: Record<string, never>;
663
- }
664
- export interface NumberPropertySchema {
665
- number: {
666
- format?: "number" | "number_with_commas" | "percent" | "dollar" | "canadian_dollar" | "euro" | "pound" | "yen" | "ruble" | "rupee" | "won" | "yuan" | "real" | "lira" | "rupiah" | "franc" | "hong_kong_dollar" | "new_zealand_dollar" | "krona" | "norwegian_krone" | "mexican_peso" | "rand" | "new_taiwan_dollar" | "danish_krone" | "zloty" | "baht" | "forint" | "koruna" | "shekel" | "chilean_peso" | "philippine_peso" | "dirham" | "colombian_peso" | "riyal" | "ringgit" | "leu";
667
- };
668
- }
669
- interface SelectOptionSchema {
670
- name: string;
671
- color?: Color;
672
- }
673
- declare type MultiSelectOptionSchema = SelectOptionSchema;
674
- export interface SelectPropertySchema {
675
- select: {
676
- options?: SelectOptionSchema[];
677
- };
678
- }
679
- export interface MultiSelectPropertySchema {
680
- multi_select: {
681
- options?: MultiSelectOptionSchema[];
682
- };
683
- }
684
- export interface DatePropertySchema {
685
- date: Record<string, never>;
686
- }
687
- export interface PeoplePropertySchema {
688
- people: Record<string, never>;
689
- }
690
- export interface FilePropertySchema {
691
- files: Record<string, never>;
692
- }
693
- export interface CheckboxPropertySchema {
694
- checkbox: Record<string, never>;
695
- }
696
- export interface URLPropertySchema {
697
- url: Record<string, never>;
698
- }
699
- export interface EmailPropertySchema {
700
- email: Record<string, never>;
701
- }
702
- export interface PhoneNumberPropertySchema {
703
- phone_number: Record<string, never>;
704
- }
705
- export interface FormulaPropertySchema {
706
- formula: {
707
- expression: string;
708
- };
709
- }
710
- export interface RollupPropertySchema {
711
- rollup: {
712
- relation_property_name?: string;
713
- relation_property_id?: string;
714
- rollup_property_name?: string;
715
- rollup_property_id?: string;
716
- function: "count_all" | "count_values" | "count_unique_values" | "count_empty" | "count_not_empty" | "percent_empty" | "percent_not_empty" | "sum" | "average" | "median" | "min" | "max" | "range" | "show_original";
717
- };
718
- }
719
- export interface RelationPropertySchema {
720
- relation: {
721
- database_id: string;
722
- };
723
- }
724
- export interface CreatedTimePropertySchema {
725
- created_time: Record<string, never>;
726
- }
727
- export interface CreatedByPropertySchema {
728
- created_by: Record<string, never>;
729
- }
730
- export interface LastEditedTimePropertySchema {
731
- last_edited_time: Record<string, never>;
732
- }
733
- export interface LastEditedByPropertySchema {
734
- last_edited_by: Record<string, never>;
735
- }
736
- export interface RenamePropertySchema {
737
- name: string;
738
- }
739
- declare type UpdateSelectOptionSchema = SelectOptionSchema | SelectOption;
740
- export interface UpdateSelectPropertySchema {
741
- select: {
742
- options?: UpdateSelectOptionSchema[];
743
- };
744
- }
745
- export interface UpdateMultiSelectPropertySchema {
746
- multi_select: {
747
- options?: UpdateSelectOptionSchema[];
748
- };
749
- }
750
- export declare type UpdatePropertySchema = PropertySchema | UpdateSelectPropertySchema | UpdateMultiSelectPropertySchema | RenamePropertySchema | null;
751
- interface FileBase {
752
- type: "file";
753
- file: {
754
- url: string;
755
- };
756
- }
757
- export declare type File = FileBase & {
758
- file: {
759
- expiry_time: string;
760
- };
761
- };
762
- export declare type FileInput = PartialBy<FileBase, "type">;
763
- export interface ExternalFile {
764
- type: "external";
765
- external: {
766
- url: string;
767
- };
768
- }
769
- export declare type ExternalFileInput = PartialBy<ExternalFile, "type">;
770
- export interface Emoji {
771
- type: "emoji";
772
- emoji: string;
773
- }
774
- export declare type EmojiInput = PartialBy<Emoji, "type">;
775
- export {};
776
- //# sourceMappingURL=api-types.d.ts.map