@notionhq/custom-blocks 0.5.0 → 0.5.1

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.
@@ -0,0 +1,3658 @@
1
+ import * as v from "valibot";
2
+ /**
3
+ * Older hosts such as 0.9.0 send `collectionPointer` and `collectionSchema` during
4
+ * initialization and live updates. Normalize these pre-protocol-11 names to
5
+ * `dataSourcePointer` and `dataSourceSchema` before exposing bindings to SDK consumers.
6
+ * Current fields take precedence when both names are present. Malformed fields and
7
+ * invalid property mappings still fail validation; this compatibility does not add
8
+ * host operations or repair bindings the Notion client cannot read from storage.
9
+ */
10
+ export declare function parseHostToSandboxMessage(data: unknown): {
11
+ readonly typed: true;
12
+ readonly success: true;
13
+ readonly output: {
14
+ type: "getPageResult";
15
+ requestId: string;
16
+ status: "success";
17
+ page: {
18
+ object: "page";
19
+ id: string & v.Brand<"NotionPageId">;
20
+ parent: {
21
+ type: "page_id";
22
+ page_id: string & v.Brand<"NotionPageId">;
23
+ } | {
24
+ type: "data_source_id";
25
+ data_source_id: string & v.Brand<"NotionDataSourceId">;
26
+ } | {
27
+ type: "workspace";
28
+ workspace: true;
29
+ } | {
30
+ type: "block_id";
31
+ block_id: string & v.Brand<"NotionBlockId">;
32
+ } | {
33
+ type: "agent_id";
34
+ agent_id: string & v.Brand<"NotionAgentId">;
35
+ } | {
36
+ type: "app_installation_id";
37
+ app_installation_id: string & v.Brand<"NotionAppInstallationId">;
38
+ } | {
39
+ type: "unavailable";
40
+ };
41
+ properties: {
42
+ [x: string]: {
43
+ id: string;
44
+ type: "title";
45
+ title: {
46
+ [x: string]: unknown;
47
+ }[];
48
+ } | {
49
+ id: string;
50
+ type: "rich_text";
51
+ rich_text: {
52
+ [x: string]: unknown;
53
+ }[];
54
+ } | {
55
+ id: string;
56
+ type: "number";
57
+ number: number | null;
58
+ } | {
59
+ id: string;
60
+ type: "url";
61
+ url: string | null;
62
+ } | {
63
+ id: string;
64
+ type: "email";
65
+ email: string | null;
66
+ } | {
67
+ id: string;
68
+ type: "phone_number";
69
+ phone_number: string | null;
70
+ } | {
71
+ id: string;
72
+ type: "checkbox";
73
+ checkbox: boolean;
74
+ } | {
75
+ id: string;
76
+ type: "select";
77
+ select: {
78
+ id: string;
79
+ name?: string | undefined;
80
+ color?: string | undefined;
81
+ description?: string | null | undefined;
82
+ } | {
83
+ name: string;
84
+ id?: string | undefined;
85
+ color?: string | undefined;
86
+ description?: string | null | undefined;
87
+ } | null;
88
+ } | {
89
+ id: string;
90
+ type: "status";
91
+ status: {
92
+ id: string;
93
+ name?: string | undefined;
94
+ color?: string | undefined;
95
+ description?: string | null | undefined;
96
+ } | {
97
+ name: string;
98
+ id?: string | undefined;
99
+ color?: string | undefined;
100
+ description?: string | null | undefined;
101
+ } | null;
102
+ } | {
103
+ id: string;
104
+ type: "multi_select";
105
+ multi_select: ({
106
+ id: string;
107
+ name?: string | undefined;
108
+ color?: string | undefined;
109
+ description?: string | null | undefined;
110
+ } | {
111
+ name: string;
112
+ id?: string | undefined;
113
+ color?: string | undefined;
114
+ description?: string | null | undefined;
115
+ })[];
116
+ } | {
117
+ id: string;
118
+ type: "date";
119
+ date: {
120
+ end?: string | null | undefined;
121
+ time_zone?: string | null | undefined;
122
+ reminder?: {
123
+ unit: "day" | "month" | "week" | "year";
124
+ value: number;
125
+ time: string;
126
+ defaultTimeZone?: string | undefined;
127
+ } | {
128
+ unit: "none";
129
+ } | {
130
+ unit: "hour" | "minute";
131
+ value: number;
132
+ } | undefined;
133
+ start: string;
134
+ } | {
135
+ start: string;
136
+ end?: string | null | undefined;
137
+ reminder?: {
138
+ unit: "day" | "month" | "week" | "year";
139
+ value: number;
140
+ time: string;
141
+ defaultTimeZone?: string | undefined;
142
+ } | {
143
+ unit: "none";
144
+ } | {
145
+ unit: "hour" | "minute";
146
+ value: number;
147
+ } | undefined;
148
+ time_zone: string;
149
+ } | {
150
+ start: string;
151
+ end?: string | null | undefined;
152
+ time_zone?: string | null | undefined;
153
+ reminder?: {
154
+ unit: "day" | "month" | "week" | "year";
155
+ value: number;
156
+ time: string;
157
+ defaultTimeZone?: string | undefined;
158
+ } | {
159
+ unit: "none";
160
+ } | undefined;
161
+ } | null;
162
+ } | {
163
+ id: string;
164
+ type: "people";
165
+ people: ({
166
+ object?: "user" | undefined;
167
+ id: string;
168
+ } | {
169
+ object: "group";
170
+ id: string;
171
+ name?: string | null | undefined;
172
+ })[];
173
+ } | {
174
+ id: string;
175
+ type: "relation";
176
+ has_more?: boolean | undefined;
177
+ relation: {
178
+ id: string;
179
+ }[];
180
+ } | {
181
+ id: string;
182
+ type: "files";
183
+ files: ({
184
+ type: "external";
185
+ external: {
186
+ url: string;
187
+ };
188
+ name: string;
189
+ } | {
190
+ type: "file";
191
+ file: {
192
+ url: string;
193
+ expiry_time?: string | undefined;
194
+ };
195
+ name: string;
196
+ })[];
197
+ } | {
198
+ id: string;
199
+ type: "place";
200
+ place: {
201
+ lat: number;
202
+ lon: number;
203
+ name?: string | null | undefined;
204
+ address?: string | null | undefined;
205
+ aws_place_id?: string | null | undefined;
206
+ google_place_id?: string | null | undefined;
207
+ } | null;
208
+ } | {
209
+ id: string;
210
+ type: "created_time";
211
+ created_time: string | null;
212
+ } | {
213
+ id: string;
214
+ type: "last_edited_time";
215
+ last_edited_time: string | null;
216
+ } | {
217
+ id: string;
218
+ type: "created_by";
219
+ created_by: {
220
+ id: string;
221
+ table: "bot" | "notion_user" | "organization_bot";
222
+ spaceId?: string | undefined;
223
+ } | null;
224
+ } | {
225
+ id: string;
226
+ type: "last_edited_by";
227
+ last_edited_by: {
228
+ id: string;
229
+ table: "bot" | "notion_user" | "organization_bot";
230
+ spaceId?: string | undefined;
231
+ } | null;
232
+ } | {
233
+ id: string;
234
+ type: "unique_id";
235
+ unique_id: string;
236
+ } | {
237
+ id: string;
238
+ type: "button";
239
+ button: string;
240
+ } | {
241
+ id: string;
242
+ type: "formula";
243
+ formula: string;
244
+ } | {
245
+ id: string;
246
+ type: "rollup";
247
+ rollup: string;
248
+ } | {
249
+ id: string;
250
+ type: "verification";
251
+ verification: string;
252
+ } | null;
253
+ };
254
+ created_by: {
255
+ id: string;
256
+ table: "bot" | "notion_user" | "organization_bot";
257
+ spaceId?: string | undefined;
258
+ } | null;
259
+ last_edited_by: {
260
+ id: string;
261
+ table: "bot" | "notion_user" | "organization_bot";
262
+ spaceId?: string | undefined;
263
+ } | null;
264
+ created_time: string | null;
265
+ last_edited_time: string | null;
266
+ icon: {
267
+ type: "emoji";
268
+ emoji: string;
269
+ } | {
270
+ type: "custom_emoji";
271
+ custom_emoji: {
272
+ id: string;
273
+ name?: string | undefined;
274
+ url?: string | undefined;
275
+ };
276
+ } | {
277
+ type: "external";
278
+ external: {
279
+ url: string;
280
+ };
281
+ } | {
282
+ type: "file";
283
+ file: {
284
+ url: string;
285
+ expiry_time?: string | undefined;
286
+ };
287
+ } | ({
288
+ type: "icon";
289
+ icon: {
290
+ name: string;
291
+ color?: import("../protocol/icons.js").BridgeIconColor | undefined;
292
+ } & {
293
+ [key: string]: unknown;
294
+ };
295
+ } & {
296
+ [key: string]: unknown;
297
+ }) | null;
298
+ cover: {
299
+ type: "external";
300
+ external: {
301
+ url: string;
302
+ };
303
+ } | {
304
+ type: "file";
305
+ file: {
306
+ url: string;
307
+ expiry_time?: string | undefined;
308
+ };
309
+ } | null;
310
+ url: string | null;
311
+ public_url: string | null;
312
+ is_archived: boolean;
313
+ in_trash: boolean;
314
+ };
315
+ } | {
316
+ type: "getPageResult";
317
+ requestId: string;
318
+ status: "error";
319
+ error: {
320
+ code: string;
321
+ message: string;
322
+ isRetryable: boolean;
323
+ };
324
+ } | {
325
+ type: "contrastModeChanged";
326
+ contrastMode: "high" | "standard";
327
+ } | {
328
+ type: "dataSourcesChanged";
329
+ dataSources: {
330
+ bindings: {
331
+ [x: string]: {
332
+ dataSourcePointer?: {
333
+ id: string & v.Brand<"NotionDataSourceId">;
334
+ table: string;
335
+ spaceId?: (string & v.Brand<"NotionSpaceId">) | undefined;
336
+ } | undefined;
337
+ dataSourceSchema?: {
338
+ id?: (string & v.Brand<"NotionDataSourceId">) | undefined;
339
+ propertiesById: {
340
+ [x: string]: {
341
+ name: string;
342
+ description?: string | undefined;
343
+ type: "title";
344
+ } | {
345
+ name: string;
346
+ description?: string | undefined;
347
+ type: "rich_text";
348
+ } | {
349
+ name: string;
350
+ description?: string | undefined;
351
+ type: "number";
352
+ } | {
353
+ name: string;
354
+ description?: string | undefined;
355
+ type: "checkbox";
356
+ } | {
357
+ name: string;
358
+ description?: string | undefined;
359
+ type: "url";
360
+ } | {
361
+ name: string;
362
+ description?: string | undefined;
363
+ type: "email";
364
+ } | {
365
+ name: string;
366
+ description?: string | undefined;
367
+ type: "phone_number";
368
+ } | {
369
+ name: string;
370
+ description?: string | undefined;
371
+ type: "select";
372
+ options: {
373
+ id: string;
374
+ name: string;
375
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
376
+ description?: string | undefined;
377
+ }[];
378
+ } | {
379
+ name: string;
380
+ description?: string | undefined;
381
+ type: "multi_select";
382
+ options: {
383
+ id: string;
384
+ name: string;
385
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
386
+ description?: string | undefined;
387
+ }[];
388
+ } | {
389
+ name: string;
390
+ description?: string | undefined;
391
+ type: "status";
392
+ options: {
393
+ id: string;
394
+ name: string;
395
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
396
+ description?: string | undefined;
397
+ }[];
398
+ groups: {
399
+ id: string;
400
+ name: string;
401
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
402
+ option_ids: string[];
403
+ }[];
404
+ } | {
405
+ name: string;
406
+ description?: string | undefined;
407
+ type: "date";
408
+ } | {
409
+ name: string;
410
+ description?: string | undefined;
411
+ type: "people";
412
+ } | {
413
+ name: string;
414
+ description?: string | undefined;
415
+ type: "files";
416
+ } | {
417
+ name: string;
418
+ description?: string | undefined;
419
+ type: "unique_id";
420
+ } | {
421
+ name: string;
422
+ description?: string | undefined;
423
+ type: "relation";
424
+ data_source_id?: string | undefined;
425
+ dual_property?: {
426
+ synced_property_id: string;
427
+ synced_property_name: string;
428
+ } | undefined;
429
+ } | {
430
+ name: string;
431
+ description?: string | undefined;
432
+ type: "place";
433
+ } | {
434
+ name: string;
435
+ description?: string | undefined;
436
+ type: "formula";
437
+ } | {
438
+ name: string;
439
+ description?: string | undefined;
440
+ type: "rollup";
441
+ } | {
442
+ name: string;
443
+ description?: string | undefined;
444
+ type: "button";
445
+ } | {
446
+ name: string;
447
+ description?: string | undefined;
448
+ type: "verification";
449
+ } | {
450
+ name: string;
451
+ description?: string | undefined;
452
+ type: "created_time";
453
+ } | {
454
+ name: string;
455
+ description?: string | undefined;
456
+ type: "last_edited_time";
457
+ } | {
458
+ name: string;
459
+ description?: string | undefined;
460
+ type: "created_by";
461
+ } | {
462
+ name: string;
463
+ description?: string | undefined;
464
+ type: "last_edited_by";
465
+ };
466
+ };
467
+ } | undefined;
468
+ propertyIdsByKey?: {
469
+ [x: string]: string | undefined;
470
+ } | undefined;
471
+ inaccessible?: true | undefined;
472
+ };
473
+ };
474
+ };
475
+ } | {
476
+ type: "init";
477
+ initializationId: string;
478
+ status: "success";
479
+ theme: "dark" | "light";
480
+ contrastMode: "high" | "standard";
481
+ blockId: string & v.Brand<"NotionBlockId">;
482
+ parent: {
483
+ type: "page_id";
484
+ page_id: string & v.Brand<"NotionPageId">;
485
+ } | {
486
+ type: "data_source_id";
487
+ data_source_id: string & v.Brand<"NotionDataSourceId">;
488
+ } | {
489
+ type: "workspace";
490
+ workspace: true;
491
+ } | {
492
+ type: "block_id";
493
+ block_id: string & v.Brand<"NotionBlockId">;
494
+ } | {
495
+ type: "agent_id";
496
+ agent_id: string & v.Brand<"NotionAgentId">;
497
+ } | {
498
+ type: "app_installation_id";
499
+ app_installation_id: string & v.Brand<"NotionAppInstallationId">;
500
+ } | {
501
+ type: "unavailable";
502
+ };
503
+ page: {
504
+ type: "unavailable";
505
+ } | {
506
+ type: "page";
507
+ id: string & v.Brand<"NotionPageId">;
508
+ parent: {
509
+ type: "page_id";
510
+ page_id: string & v.Brand<"NotionPageId">;
511
+ } | {
512
+ type: "data_source_id";
513
+ data_source_id: string & v.Brand<"NotionDataSourceId">;
514
+ } | {
515
+ type: "workspace";
516
+ workspace: true;
517
+ } | {
518
+ type: "block_id";
519
+ block_id: string & v.Brand<"NotionBlockId">;
520
+ } | {
521
+ type: "agent_id";
522
+ agent_id: string & v.Brand<"NotionAgentId">;
523
+ } | {
524
+ type: "app_installation_id";
525
+ app_installation_id: string & v.Brand<"NotionAppInstallationId">;
526
+ } | {
527
+ type: "unavailable";
528
+ };
529
+ };
530
+ manifest: {
531
+ version: 1;
532
+ name?: string | undefined;
533
+ description?: string | undefined;
534
+ slashCommand?: string | undefined;
535
+ icon?: {
536
+ type: "emoji";
537
+ emoji: string;
538
+ } | undefined;
539
+ dataSources: {
540
+ [x: string]: {
541
+ name: string;
542
+ description?: string | undefined;
543
+ icon?: {
544
+ type: "emoji";
545
+ emoji: string;
546
+ } | {
547
+ type: "external";
548
+ url: string;
549
+ } | undefined;
550
+ properties: {
551
+ [x: string]: {
552
+ name: string;
553
+ description?: string | undefined;
554
+ type: "button" | "checkbox" | "created_by" | "created_time" | "date" | "email" | "files" | "formula" | "last_edited_by" | "last_edited_time" | "multi_select" | "number" | "people" | "phone_number" | "place" | "relation" | "rich_text" | "rollup" | "select" | "status" | "title" | "unique_id" | "url" | "verification";
555
+ };
556
+ };
557
+ };
558
+ };
559
+ pages?: {
560
+ [x: string]: {
561
+ name: string;
562
+ description?: string | undefined;
563
+ icon?: {
564
+ type: "emoji";
565
+ emoji: string;
566
+ } | {
567
+ type: "external";
568
+ url: string;
569
+ } | undefined;
570
+ };
571
+ } | undefined;
572
+ grants?: {
573
+ action: string;
574
+ resource: string | string[];
575
+ }[] | undefined;
576
+ };
577
+ dataSources: {
578
+ bindings: {
579
+ [x: string]: {
580
+ dataSourcePointer?: {
581
+ id: string & v.Brand<"NotionDataSourceId">;
582
+ table: string;
583
+ spaceId?: (string & v.Brand<"NotionSpaceId">) | undefined;
584
+ } | undefined;
585
+ dataSourceSchema?: {
586
+ id?: (string & v.Brand<"NotionDataSourceId">) | undefined;
587
+ propertiesById: {
588
+ [x: string]: {
589
+ name: string;
590
+ description?: string | undefined;
591
+ type: "title";
592
+ } | {
593
+ name: string;
594
+ description?: string | undefined;
595
+ type: "rich_text";
596
+ } | {
597
+ name: string;
598
+ description?: string | undefined;
599
+ type: "number";
600
+ } | {
601
+ name: string;
602
+ description?: string | undefined;
603
+ type: "checkbox";
604
+ } | {
605
+ name: string;
606
+ description?: string | undefined;
607
+ type: "url";
608
+ } | {
609
+ name: string;
610
+ description?: string | undefined;
611
+ type: "email";
612
+ } | {
613
+ name: string;
614
+ description?: string | undefined;
615
+ type: "phone_number";
616
+ } | {
617
+ name: string;
618
+ description?: string | undefined;
619
+ type: "select";
620
+ options: {
621
+ id: string;
622
+ name: string;
623
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
624
+ description?: string | undefined;
625
+ }[];
626
+ } | {
627
+ name: string;
628
+ description?: string | undefined;
629
+ type: "multi_select";
630
+ options: {
631
+ id: string;
632
+ name: string;
633
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
634
+ description?: string | undefined;
635
+ }[];
636
+ } | {
637
+ name: string;
638
+ description?: string | undefined;
639
+ type: "status";
640
+ options: {
641
+ id: string;
642
+ name: string;
643
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
644
+ description?: string | undefined;
645
+ }[];
646
+ groups: {
647
+ id: string;
648
+ name: string;
649
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
650
+ option_ids: string[];
651
+ }[];
652
+ } | {
653
+ name: string;
654
+ description?: string | undefined;
655
+ type: "date";
656
+ } | {
657
+ name: string;
658
+ description?: string | undefined;
659
+ type: "people";
660
+ } | {
661
+ name: string;
662
+ description?: string | undefined;
663
+ type: "files";
664
+ } | {
665
+ name: string;
666
+ description?: string | undefined;
667
+ type: "unique_id";
668
+ } | {
669
+ name: string;
670
+ description?: string | undefined;
671
+ type: "relation";
672
+ data_source_id?: string | undefined;
673
+ dual_property?: {
674
+ synced_property_id: string;
675
+ synced_property_name: string;
676
+ } | undefined;
677
+ } | {
678
+ name: string;
679
+ description?: string | undefined;
680
+ type: "place";
681
+ } | {
682
+ name: string;
683
+ description?: string | undefined;
684
+ type: "formula";
685
+ } | {
686
+ name: string;
687
+ description?: string | undefined;
688
+ type: "rollup";
689
+ } | {
690
+ name: string;
691
+ description?: string | undefined;
692
+ type: "button";
693
+ } | {
694
+ name: string;
695
+ description?: string | undefined;
696
+ type: "verification";
697
+ } | {
698
+ name: string;
699
+ description?: string | undefined;
700
+ type: "created_time";
701
+ } | {
702
+ name: string;
703
+ description?: string | undefined;
704
+ type: "last_edited_time";
705
+ } | {
706
+ name: string;
707
+ description?: string | undefined;
708
+ type: "created_by";
709
+ } | {
710
+ name: string;
711
+ description?: string | undefined;
712
+ type: "last_edited_by";
713
+ };
714
+ };
715
+ } | undefined;
716
+ propertyIdsByKey?: {
717
+ [x: string]: string | undefined;
718
+ } | undefined;
719
+ inaccessible?: true | undefined;
720
+ };
721
+ };
722
+ };
723
+ currentUser: {
724
+ object: "user";
725
+ id: string & v.Brand<"NotionUserId">;
726
+ name?: string | undefined;
727
+ avatar_url: string | null;
728
+ type: "person";
729
+ person: {
730
+ email: string;
731
+ };
732
+ };
733
+ } | {
734
+ type: "init";
735
+ initializationId: string;
736
+ status: "error";
737
+ error: {
738
+ code: string;
739
+ message: string;
740
+ isRetryable: boolean;
741
+ };
742
+ } | {
743
+ type: "themeChanged";
744
+ theme: "dark" | "light";
745
+ } | {
746
+ type: "parentChanged";
747
+ parent: {
748
+ type: "page_id";
749
+ page_id: string & v.Brand<"NotionPageId">;
750
+ } | {
751
+ type: "data_source_id";
752
+ data_source_id: string & v.Brand<"NotionDataSourceId">;
753
+ } | {
754
+ type: "workspace";
755
+ workspace: true;
756
+ } | {
757
+ type: "block_id";
758
+ block_id: string & v.Brand<"NotionBlockId">;
759
+ } | {
760
+ type: "agent_id";
761
+ agent_id: string & v.Brand<"NotionAgentId">;
762
+ } | {
763
+ type: "app_installation_id";
764
+ app_installation_id: string & v.Brand<"NotionAppInstallationId">;
765
+ } | {
766
+ type: "unavailable";
767
+ };
768
+ } | {
769
+ type: "pageChanged";
770
+ page: {
771
+ type: "unavailable";
772
+ } | {
773
+ type: "page";
774
+ id: string & v.Brand<"NotionPageId">;
775
+ parent: {
776
+ type: "page_id";
777
+ page_id: string & v.Brand<"NotionPageId">;
778
+ } | {
779
+ type: "data_source_id";
780
+ data_source_id: string & v.Brand<"NotionDataSourceId">;
781
+ } | {
782
+ type: "workspace";
783
+ workspace: true;
784
+ } | {
785
+ type: "block_id";
786
+ block_id: string & v.Brand<"NotionBlockId">;
787
+ } | {
788
+ type: "agent_id";
789
+ agent_id: string & v.Brand<"NotionAgentId">;
790
+ } | {
791
+ type: "app_installation_id";
792
+ app_installation_id: string & v.Brand<"NotionAppInstallationId">;
793
+ } | {
794
+ type: "unavailable";
795
+ };
796
+ };
797
+ } | {
798
+ type: "currentUserChanged";
799
+ currentUser: {
800
+ object: "user";
801
+ id: string & v.Brand<"NotionUserId">;
802
+ name?: string | undefined;
803
+ avatar_url: string | null;
804
+ type: "person";
805
+ person: {
806
+ email: string;
807
+ };
808
+ };
809
+ } | {
810
+ type: "getUserResult";
811
+ requestId: string;
812
+ status: "success";
813
+ user: {
814
+ object: "user";
815
+ id: string & v.Brand<"NotionUserId">;
816
+ name?: string | undefined;
817
+ avatar_url: string | null;
818
+ type: "person";
819
+ person: {
820
+ email: string;
821
+ };
822
+ };
823
+ } | {
824
+ type: "getUserResult";
825
+ requestId: string;
826
+ status: "error";
827
+ error: {
828
+ code: string;
829
+ message: string;
830
+ isRetryable: boolean;
831
+ };
832
+ } | {
833
+ type: "listUsersResult";
834
+ requestId: string;
835
+ status: "success";
836
+ list: {
837
+ object: "list";
838
+ results: {
839
+ object: "user";
840
+ id: string & v.Brand<"NotionUserId">;
841
+ name?: string | undefined;
842
+ avatar_url: string | null;
843
+ type: "person";
844
+ person: {
845
+ email: string;
846
+ };
847
+ }[];
848
+ next_cursor: string | null;
849
+ has_more: boolean;
850
+ type: "user";
851
+ user: {
852
+ [x: string]: unknown;
853
+ };
854
+ };
855
+ } | {
856
+ type: "listUsersResult";
857
+ requestId: string;
858
+ status: "error";
859
+ error: {
860
+ code: string;
861
+ message: string;
862
+ isRetryable: boolean;
863
+ };
864
+ } | {
865
+ type: "openPageResult";
866
+ requestId: string;
867
+ status: "success";
868
+ pageId: string & v.Brand<"NotionPageId">;
869
+ } | {
870
+ type: "openPageResult";
871
+ requestId: string;
872
+ status: "error";
873
+ error: {
874
+ code: string;
875
+ message: string;
876
+ isRetryable: boolean;
877
+ };
878
+ } | {
879
+ type: "openExternalUrlResult";
880
+ requestId: string;
881
+ status: "success";
882
+ } | {
883
+ type: "openExternalUrlResult";
884
+ requestId: string;
885
+ status: "error";
886
+ error: {
887
+ code: string;
888
+ message: string;
889
+ isRetryable: boolean;
890
+ };
891
+ } | {
892
+ type: "invalidSandboxMessage";
893
+ requestId?: string | undefined;
894
+ reason: string;
895
+ } | {
896
+ type: "queryDataSourceResult";
897
+ subscriptionId: string;
898
+ status: "success";
899
+ items: {
900
+ object: "page";
901
+ id: string & v.Brand<"NotionPageId">;
902
+ parent: {
903
+ type: "page_id";
904
+ page_id: string & v.Brand<"NotionPageId">;
905
+ } | {
906
+ type: "data_source_id";
907
+ data_source_id: string & v.Brand<"NotionDataSourceId">;
908
+ } | {
909
+ type: "workspace";
910
+ workspace: true;
911
+ } | {
912
+ type: "block_id";
913
+ block_id: string & v.Brand<"NotionBlockId">;
914
+ } | {
915
+ type: "agent_id";
916
+ agent_id: string & v.Brand<"NotionAgentId">;
917
+ } | {
918
+ type: "app_installation_id";
919
+ app_installation_id: string & v.Brand<"NotionAppInstallationId">;
920
+ } | {
921
+ type: "unavailable";
922
+ };
923
+ properties: {
924
+ [x: string]: {
925
+ id: string;
926
+ type: "title";
927
+ title: {
928
+ [x: string]: unknown;
929
+ }[];
930
+ } | {
931
+ id: string;
932
+ type: "rich_text";
933
+ rich_text: {
934
+ [x: string]: unknown;
935
+ }[];
936
+ } | {
937
+ id: string;
938
+ type: "number";
939
+ number: number | null;
940
+ } | {
941
+ id: string;
942
+ type: "url";
943
+ url: string | null;
944
+ } | {
945
+ id: string;
946
+ type: "email";
947
+ email: string | null;
948
+ } | {
949
+ id: string;
950
+ type: "phone_number";
951
+ phone_number: string | null;
952
+ } | {
953
+ id: string;
954
+ type: "checkbox";
955
+ checkbox: boolean;
956
+ } | {
957
+ id: string;
958
+ type: "select";
959
+ select: {
960
+ id: string;
961
+ name?: string | undefined;
962
+ color?: string | undefined;
963
+ description?: string | null | undefined;
964
+ } | {
965
+ name: string;
966
+ id?: string | undefined;
967
+ color?: string | undefined;
968
+ description?: string | null | undefined;
969
+ } | null;
970
+ } | {
971
+ id: string;
972
+ type: "status";
973
+ status: {
974
+ id: string;
975
+ name?: string | undefined;
976
+ color?: string | undefined;
977
+ description?: string | null | undefined;
978
+ } | {
979
+ name: string;
980
+ id?: string | undefined;
981
+ color?: string | undefined;
982
+ description?: string | null | undefined;
983
+ } | null;
984
+ } | {
985
+ id: string;
986
+ type: "multi_select";
987
+ multi_select: ({
988
+ id: string;
989
+ name?: string | undefined;
990
+ color?: string | undefined;
991
+ description?: string | null | undefined;
992
+ } | {
993
+ name: string;
994
+ id?: string | undefined;
995
+ color?: string | undefined;
996
+ description?: string | null | undefined;
997
+ })[];
998
+ } | {
999
+ id: string;
1000
+ type: "date";
1001
+ date: {
1002
+ end?: string | null | undefined;
1003
+ time_zone?: string | null | undefined;
1004
+ reminder?: {
1005
+ unit: "day" | "month" | "week" | "year";
1006
+ value: number;
1007
+ time: string;
1008
+ defaultTimeZone?: string | undefined;
1009
+ } | {
1010
+ unit: "none";
1011
+ } | {
1012
+ unit: "hour" | "minute";
1013
+ value: number;
1014
+ } | undefined;
1015
+ start: string;
1016
+ } | {
1017
+ start: string;
1018
+ end?: string | null | undefined;
1019
+ reminder?: {
1020
+ unit: "day" | "month" | "week" | "year";
1021
+ value: number;
1022
+ time: string;
1023
+ defaultTimeZone?: string | undefined;
1024
+ } | {
1025
+ unit: "none";
1026
+ } | {
1027
+ unit: "hour" | "minute";
1028
+ value: number;
1029
+ } | undefined;
1030
+ time_zone: string;
1031
+ } | {
1032
+ start: string;
1033
+ end?: string | null | undefined;
1034
+ time_zone?: string | null | undefined;
1035
+ reminder?: {
1036
+ unit: "day" | "month" | "week" | "year";
1037
+ value: number;
1038
+ time: string;
1039
+ defaultTimeZone?: string | undefined;
1040
+ } | {
1041
+ unit: "none";
1042
+ } | undefined;
1043
+ } | null;
1044
+ } | {
1045
+ id: string;
1046
+ type: "people";
1047
+ people: ({
1048
+ object?: "user" | undefined;
1049
+ id: string;
1050
+ } | {
1051
+ object: "group";
1052
+ id: string;
1053
+ name?: string | null | undefined;
1054
+ })[];
1055
+ } | {
1056
+ id: string;
1057
+ type: "relation";
1058
+ has_more?: boolean | undefined;
1059
+ relation: {
1060
+ id: string;
1061
+ }[];
1062
+ } | {
1063
+ id: string;
1064
+ type: "files";
1065
+ files: ({
1066
+ type: "external";
1067
+ external: {
1068
+ url: string;
1069
+ };
1070
+ name: string;
1071
+ } | {
1072
+ type: "file";
1073
+ file: {
1074
+ url: string;
1075
+ expiry_time?: string | undefined;
1076
+ };
1077
+ name: string;
1078
+ })[];
1079
+ } | {
1080
+ id: string;
1081
+ type: "place";
1082
+ place: {
1083
+ lat: number;
1084
+ lon: number;
1085
+ name?: string | null | undefined;
1086
+ address?: string | null | undefined;
1087
+ aws_place_id?: string | null | undefined;
1088
+ google_place_id?: string | null | undefined;
1089
+ } | null;
1090
+ } | {
1091
+ id: string;
1092
+ type: "created_time";
1093
+ created_time: string | null;
1094
+ } | {
1095
+ id: string;
1096
+ type: "last_edited_time";
1097
+ last_edited_time: string | null;
1098
+ } | {
1099
+ id: string;
1100
+ type: "created_by";
1101
+ created_by: {
1102
+ id: string;
1103
+ table: "bot" | "notion_user" | "organization_bot";
1104
+ spaceId?: string | undefined;
1105
+ } | null;
1106
+ } | {
1107
+ id: string;
1108
+ type: "last_edited_by";
1109
+ last_edited_by: {
1110
+ id: string;
1111
+ table: "bot" | "notion_user" | "organization_bot";
1112
+ spaceId?: string | undefined;
1113
+ } | null;
1114
+ } | {
1115
+ id: string;
1116
+ type: "unique_id";
1117
+ unique_id: string;
1118
+ } | {
1119
+ id: string;
1120
+ type: "button";
1121
+ button: string;
1122
+ } | {
1123
+ id: string;
1124
+ type: "formula";
1125
+ formula: string;
1126
+ } | {
1127
+ id: string;
1128
+ type: "rollup";
1129
+ rollup: string;
1130
+ } | {
1131
+ id: string;
1132
+ type: "verification";
1133
+ verification: string;
1134
+ } | null;
1135
+ };
1136
+ created_by: {
1137
+ id: string;
1138
+ table: "bot" | "notion_user" | "organization_bot";
1139
+ spaceId?: string | undefined;
1140
+ } | null;
1141
+ last_edited_by: {
1142
+ id: string;
1143
+ table: "bot" | "notion_user" | "organization_bot";
1144
+ spaceId?: string | undefined;
1145
+ } | null;
1146
+ created_time: string | null;
1147
+ last_edited_time: string | null;
1148
+ icon: {
1149
+ type: "emoji";
1150
+ emoji: string;
1151
+ } | {
1152
+ type: "custom_emoji";
1153
+ custom_emoji: {
1154
+ id: string;
1155
+ name?: string | undefined;
1156
+ url?: string | undefined;
1157
+ };
1158
+ } | {
1159
+ type: "external";
1160
+ external: {
1161
+ url: string;
1162
+ };
1163
+ } | {
1164
+ type: "file";
1165
+ file: {
1166
+ url: string;
1167
+ expiry_time?: string | undefined;
1168
+ };
1169
+ } | ({
1170
+ type: "icon";
1171
+ icon: {
1172
+ name: string;
1173
+ color?: import("../protocol/icons.js").BridgeIconColor | undefined;
1174
+ } & {
1175
+ [key: string]: unknown;
1176
+ };
1177
+ } & {
1178
+ [key: string]: unknown;
1179
+ }) | null;
1180
+ cover: {
1181
+ type: "external";
1182
+ external: {
1183
+ url: string;
1184
+ };
1185
+ } | {
1186
+ type: "file";
1187
+ file: {
1188
+ url: string;
1189
+ expiry_time?: string | undefined;
1190
+ };
1191
+ } | null;
1192
+ url: string | null;
1193
+ public_url: string | null;
1194
+ is_archived: boolean;
1195
+ in_trash: boolean;
1196
+ }[];
1197
+ hasMore: boolean;
1198
+ } | {
1199
+ type: "queryDataSourceResult";
1200
+ subscriptionId: string;
1201
+ status: "error";
1202
+ error: {
1203
+ code: string;
1204
+ message: string;
1205
+ isRetryable: boolean;
1206
+ };
1207
+ } | {
1208
+ type: "createPageResult";
1209
+ requestId: string;
1210
+ status: "success";
1211
+ page: {
1212
+ object: "page";
1213
+ id: string & v.Brand<"NotionPageId">;
1214
+ parent: {
1215
+ type: "page_id";
1216
+ page_id: string & v.Brand<"NotionPageId">;
1217
+ } | {
1218
+ type: "data_source_id";
1219
+ data_source_id: string & v.Brand<"NotionDataSourceId">;
1220
+ } | {
1221
+ type: "workspace";
1222
+ workspace: true;
1223
+ } | {
1224
+ type: "block_id";
1225
+ block_id: string & v.Brand<"NotionBlockId">;
1226
+ } | {
1227
+ type: "agent_id";
1228
+ agent_id: string & v.Brand<"NotionAgentId">;
1229
+ } | {
1230
+ type: "app_installation_id";
1231
+ app_installation_id: string & v.Brand<"NotionAppInstallationId">;
1232
+ } | {
1233
+ type: "unavailable";
1234
+ };
1235
+ properties: {
1236
+ [x: string]: {
1237
+ id: string;
1238
+ type: "title";
1239
+ title: {
1240
+ [x: string]: unknown;
1241
+ }[];
1242
+ } | {
1243
+ id: string;
1244
+ type: "rich_text";
1245
+ rich_text: {
1246
+ [x: string]: unknown;
1247
+ }[];
1248
+ } | {
1249
+ id: string;
1250
+ type: "number";
1251
+ number: number | null;
1252
+ } | {
1253
+ id: string;
1254
+ type: "url";
1255
+ url: string | null;
1256
+ } | {
1257
+ id: string;
1258
+ type: "email";
1259
+ email: string | null;
1260
+ } | {
1261
+ id: string;
1262
+ type: "phone_number";
1263
+ phone_number: string | null;
1264
+ } | {
1265
+ id: string;
1266
+ type: "checkbox";
1267
+ checkbox: boolean;
1268
+ } | {
1269
+ id: string;
1270
+ type: "select";
1271
+ select: {
1272
+ id: string;
1273
+ name?: string | undefined;
1274
+ color?: string | undefined;
1275
+ description?: string | null | undefined;
1276
+ } | {
1277
+ name: string;
1278
+ id?: string | undefined;
1279
+ color?: string | undefined;
1280
+ description?: string | null | undefined;
1281
+ } | null;
1282
+ } | {
1283
+ id: string;
1284
+ type: "status";
1285
+ status: {
1286
+ id: string;
1287
+ name?: string | undefined;
1288
+ color?: string | undefined;
1289
+ description?: string | null | undefined;
1290
+ } | {
1291
+ name: string;
1292
+ id?: string | undefined;
1293
+ color?: string | undefined;
1294
+ description?: string | null | undefined;
1295
+ } | null;
1296
+ } | {
1297
+ id: string;
1298
+ type: "multi_select";
1299
+ multi_select: ({
1300
+ id: string;
1301
+ name?: string | undefined;
1302
+ color?: string | undefined;
1303
+ description?: string | null | undefined;
1304
+ } | {
1305
+ name: string;
1306
+ id?: string | undefined;
1307
+ color?: string | undefined;
1308
+ description?: string | null | undefined;
1309
+ })[];
1310
+ } | {
1311
+ id: string;
1312
+ type: "date";
1313
+ date: {
1314
+ end?: string | null | undefined;
1315
+ time_zone?: string | null | undefined;
1316
+ reminder?: {
1317
+ unit: "day" | "month" | "week" | "year";
1318
+ value: number;
1319
+ time: string;
1320
+ defaultTimeZone?: string | undefined;
1321
+ } | {
1322
+ unit: "none";
1323
+ } | {
1324
+ unit: "hour" | "minute";
1325
+ value: number;
1326
+ } | undefined;
1327
+ start: string;
1328
+ } | {
1329
+ start: string;
1330
+ end?: string | null | undefined;
1331
+ reminder?: {
1332
+ unit: "day" | "month" | "week" | "year";
1333
+ value: number;
1334
+ time: string;
1335
+ defaultTimeZone?: string | undefined;
1336
+ } | {
1337
+ unit: "none";
1338
+ } | {
1339
+ unit: "hour" | "minute";
1340
+ value: number;
1341
+ } | undefined;
1342
+ time_zone: string;
1343
+ } | {
1344
+ start: string;
1345
+ end?: string | null | undefined;
1346
+ time_zone?: string | null | undefined;
1347
+ reminder?: {
1348
+ unit: "day" | "month" | "week" | "year";
1349
+ value: number;
1350
+ time: string;
1351
+ defaultTimeZone?: string | undefined;
1352
+ } | {
1353
+ unit: "none";
1354
+ } | undefined;
1355
+ } | null;
1356
+ } | {
1357
+ id: string;
1358
+ type: "people";
1359
+ people: ({
1360
+ object?: "user" | undefined;
1361
+ id: string;
1362
+ } | {
1363
+ object: "group";
1364
+ id: string;
1365
+ name?: string | null | undefined;
1366
+ })[];
1367
+ } | {
1368
+ id: string;
1369
+ type: "relation";
1370
+ has_more?: boolean | undefined;
1371
+ relation: {
1372
+ id: string;
1373
+ }[];
1374
+ } | {
1375
+ id: string;
1376
+ type: "files";
1377
+ files: ({
1378
+ type: "external";
1379
+ external: {
1380
+ url: string;
1381
+ };
1382
+ name: string;
1383
+ } | {
1384
+ type: "file";
1385
+ file: {
1386
+ url: string;
1387
+ expiry_time?: string | undefined;
1388
+ };
1389
+ name: string;
1390
+ })[];
1391
+ } | {
1392
+ id: string;
1393
+ type: "place";
1394
+ place: {
1395
+ lat: number;
1396
+ lon: number;
1397
+ name?: string | null | undefined;
1398
+ address?: string | null | undefined;
1399
+ aws_place_id?: string | null | undefined;
1400
+ google_place_id?: string | null | undefined;
1401
+ } | null;
1402
+ } | {
1403
+ id: string;
1404
+ type: "created_time";
1405
+ created_time: string | null;
1406
+ } | {
1407
+ id: string;
1408
+ type: "last_edited_time";
1409
+ last_edited_time: string | null;
1410
+ } | {
1411
+ id: string;
1412
+ type: "created_by";
1413
+ created_by: {
1414
+ id: string;
1415
+ table: "bot" | "notion_user" | "organization_bot";
1416
+ spaceId?: string | undefined;
1417
+ } | null;
1418
+ } | {
1419
+ id: string;
1420
+ type: "last_edited_by";
1421
+ last_edited_by: {
1422
+ id: string;
1423
+ table: "bot" | "notion_user" | "organization_bot";
1424
+ spaceId?: string | undefined;
1425
+ } | null;
1426
+ } | {
1427
+ id: string;
1428
+ type: "unique_id";
1429
+ unique_id: string;
1430
+ } | {
1431
+ id: string;
1432
+ type: "button";
1433
+ button: string;
1434
+ } | {
1435
+ id: string;
1436
+ type: "formula";
1437
+ formula: string;
1438
+ } | {
1439
+ id: string;
1440
+ type: "rollup";
1441
+ rollup: string;
1442
+ } | {
1443
+ id: string;
1444
+ type: "verification";
1445
+ verification: string;
1446
+ } | null;
1447
+ };
1448
+ created_by: {
1449
+ id: string;
1450
+ table: "bot" | "notion_user" | "organization_bot";
1451
+ spaceId?: string | undefined;
1452
+ } | null;
1453
+ last_edited_by: {
1454
+ id: string;
1455
+ table: "bot" | "notion_user" | "organization_bot";
1456
+ spaceId?: string | undefined;
1457
+ } | null;
1458
+ created_time: string | null;
1459
+ last_edited_time: string | null;
1460
+ icon: {
1461
+ type: "emoji";
1462
+ emoji: string;
1463
+ } | {
1464
+ type: "custom_emoji";
1465
+ custom_emoji: {
1466
+ id: string;
1467
+ name?: string | undefined;
1468
+ url?: string | undefined;
1469
+ };
1470
+ } | {
1471
+ type: "external";
1472
+ external: {
1473
+ url: string;
1474
+ };
1475
+ } | {
1476
+ type: "file";
1477
+ file: {
1478
+ url: string;
1479
+ expiry_time?: string | undefined;
1480
+ };
1481
+ } | ({
1482
+ type: "icon";
1483
+ icon: {
1484
+ name: string;
1485
+ color?: import("../protocol/icons.js").BridgeIconColor | undefined;
1486
+ } & {
1487
+ [key: string]: unknown;
1488
+ };
1489
+ } & {
1490
+ [key: string]: unknown;
1491
+ }) | null;
1492
+ cover: {
1493
+ type: "external";
1494
+ external: {
1495
+ url: string;
1496
+ };
1497
+ } | {
1498
+ type: "file";
1499
+ file: {
1500
+ url: string;
1501
+ expiry_time?: string | undefined;
1502
+ };
1503
+ } | null;
1504
+ url: string | null;
1505
+ public_url: string | null;
1506
+ is_archived: boolean;
1507
+ in_trash: boolean;
1508
+ };
1509
+ } | {
1510
+ type: "createPageResult";
1511
+ requestId: string;
1512
+ status: "error";
1513
+ error: {
1514
+ code: string;
1515
+ message: string;
1516
+ isRetryable: boolean;
1517
+ };
1518
+ } | {
1519
+ type: "updatePageResult";
1520
+ requestId: string;
1521
+ status: "success";
1522
+ page: {
1523
+ object: "page";
1524
+ id: string & v.Brand<"NotionPageId">;
1525
+ parent: {
1526
+ type: "page_id";
1527
+ page_id: string & v.Brand<"NotionPageId">;
1528
+ } | {
1529
+ type: "data_source_id";
1530
+ data_source_id: string & v.Brand<"NotionDataSourceId">;
1531
+ } | {
1532
+ type: "workspace";
1533
+ workspace: true;
1534
+ } | {
1535
+ type: "block_id";
1536
+ block_id: string & v.Brand<"NotionBlockId">;
1537
+ } | {
1538
+ type: "agent_id";
1539
+ agent_id: string & v.Brand<"NotionAgentId">;
1540
+ } | {
1541
+ type: "app_installation_id";
1542
+ app_installation_id: string & v.Brand<"NotionAppInstallationId">;
1543
+ } | {
1544
+ type: "unavailable";
1545
+ };
1546
+ properties: {
1547
+ [x: string]: {
1548
+ id: string;
1549
+ type: "title";
1550
+ title: {
1551
+ [x: string]: unknown;
1552
+ }[];
1553
+ } | {
1554
+ id: string;
1555
+ type: "rich_text";
1556
+ rich_text: {
1557
+ [x: string]: unknown;
1558
+ }[];
1559
+ } | {
1560
+ id: string;
1561
+ type: "number";
1562
+ number: number | null;
1563
+ } | {
1564
+ id: string;
1565
+ type: "url";
1566
+ url: string | null;
1567
+ } | {
1568
+ id: string;
1569
+ type: "email";
1570
+ email: string | null;
1571
+ } | {
1572
+ id: string;
1573
+ type: "phone_number";
1574
+ phone_number: string | null;
1575
+ } | {
1576
+ id: string;
1577
+ type: "checkbox";
1578
+ checkbox: boolean;
1579
+ } | {
1580
+ id: string;
1581
+ type: "select";
1582
+ select: {
1583
+ id: string;
1584
+ name?: string | undefined;
1585
+ color?: string | undefined;
1586
+ description?: string | null | undefined;
1587
+ } | {
1588
+ name: string;
1589
+ id?: string | undefined;
1590
+ color?: string | undefined;
1591
+ description?: string | null | undefined;
1592
+ } | null;
1593
+ } | {
1594
+ id: string;
1595
+ type: "status";
1596
+ status: {
1597
+ id: string;
1598
+ name?: string | undefined;
1599
+ color?: string | undefined;
1600
+ description?: string | null | undefined;
1601
+ } | {
1602
+ name: string;
1603
+ id?: string | undefined;
1604
+ color?: string | undefined;
1605
+ description?: string | null | undefined;
1606
+ } | null;
1607
+ } | {
1608
+ id: string;
1609
+ type: "multi_select";
1610
+ multi_select: ({
1611
+ id: string;
1612
+ name?: string | undefined;
1613
+ color?: string | undefined;
1614
+ description?: string | null | undefined;
1615
+ } | {
1616
+ name: string;
1617
+ id?: string | undefined;
1618
+ color?: string | undefined;
1619
+ description?: string | null | undefined;
1620
+ })[];
1621
+ } | {
1622
+ id: string;
1623
+ type: "date";
1624
+ date: {
1625
+ end?: string | null | undefined;
1626
+ time_zone?: string | null | undefined;
1627
+ reminder?: {
1628
+ unit: "day" | "month" | "week" | "year";
1629
+ value: number;
1630
+ time: string;
1631
+ defaultTimeZone?: string | undefined;
1632
+ } | {
1633
+ unit: "none";
1634
+ } | {
1635
+ unit: "hour" | "minute";
1636
+ value: number;
1637
+ } | undefined;
1638
+ start: string;
1639
+ } | {
1640
+ start: string;
1641
+ end?: string | null | undefined;
1642
+ reminder?: {
1643
+ unit: "day" | "month" | "week" | "year";
1644
+ value: number;
1645
+ time: string;
1646
+ defaultTimeZone?: string | undefined;
1647
+ } | {
1648
+ unit: "none";
1649
+ } | {
1650
+ unit: "hour" | "minute";
1651
+ value: number;
1652
+ } | undefined;
1653
+ time_zone: string;
1654
+ } | {
1655
+ start: string;
1656
+ end?: string | null | undefined;
1657
+ time_zone?: string | null | undefined;
1658
+ reminder?: {
1659
+ unit: "day" | "month" | "week" | "year";
1660
+ value: number;
1661
+ time: string;
1662
+ defaultTimeZone?: string | undefined;
1663
+ } | {
1664
+ unit: "none";
1665
+ } | undefined;
1666
+ } | null;
1667
+ } | {
1668
+ id: string;
1669
+ type: "people";
1670
+ people: ({
1671
+ object?: "user" | undefined;
1672
+ id: string;
1673
+ } | {
1674
+ object: "group";
1675
+ id: string;
1676
+ name?: string | null | undefined;
1677
+ })[];
1678
+ } | {
1679
+ id: string;
1680
+ type: "relation";
1681
+ has_more?: boolean | undefined;
1682
+ relation: {
1683
+ id: string;
1684
+ }[];
1685
+ } | {
1686
+ id: string;
1687
+ type: "files";
1688
+ files: ({
1689
+ type: "external";
1690
+ external: {
1691
+ url: string;
1692
+ };
1693
+ name: string;
1694
+ } | {
1695
+ type: "file";
1696
+ file: {
1697
+ url: string;
1698
+ expiry_time?: string | undefined;
1699
+ };
1700
+ name: string;
1701
+ })[];
1702
+ } | {
1703
+ id: string;
1704
+ type: "place";
1705
+ place: {
1706
+ lat: number;
1707
+ lon: number;
1708
+ name?: string | null | undefined;
1709
+ address?: string | null | undefined;
1710
+ aws_place_id?: string | null | undefined;
1711
+ google_place_id?: string | null | undefined;
1712
+ } | null;
1713
+ } | {
1714
+ id: string;
1715
+ type: "created_time";
1716
+ created_time: string | null;
1717
+ } | {
1718
+ id: string;
1719
+ type: "last_edited_time";
1720
+ last_edited_time: string | null;
1721
+ } | {
1722
+ id: string;
1723
+ type: "created_by";
1724
+ created_by: {
1725
+ id: string;
1726
+ table: "bot" | "notion_user" | "organization_bot";
1727
+ spaceId?: string | undefined;
1728
+ } | null;
1729
+ } | {
1730
+ id: string;
1731
+ type: "last_edited_by";
1732
+ last_edited_by: {
1733
+ id: string;
1734
+ table: "bot" | "notion_user" | "organization_bot";
1735
+ spaceId?: string | undefined;
1736
+ } | null;
1737
+ } | {
1738
+ id: string;
1739
+ type: "unique_id";
1740
+ unique_id: string;
1741
+ } | {
1742
+ id: string;
1743
+ type: "button";
1744
+ button: string;
1745
+ } | {
1746
+ id: string;
1747
+ type: "formula";
1748
+ formula: string;
1749
+ } | {
1750
+ id: string;
1751
+ type: "rollup";
1752
+ rollup: string;
1753
+ } | {
1754
+ id: string;
1755
+ type: "verification";
1756
+ verification: string;
1757
+ } | null;
1758
+ };
1759
+ created_by: {
1760
+ id: string;
1761
+ table: "bot" | "notion_user" | "organization_bot";
1762
+ spaceId?: string | undefined;
1763
+ } | null;
1764
+ last_edited_by: {
1765
+ id: string;
1766
+ table: "bot" | "notion_user" | "organization_bot";
1767
+ spaceId?: string | undefined;
1768
+ } | null;
1769
+ created_time: string | null;
1770
+ last_edited_time: string | null;
1771
+ icon: {
1772
+ type: "emoji";
1773
+ emoji: string;
1774
+ } | {
1775
+ type: "custom_emoji";
1776
+ custom_emoji: {
1777
+ id: string;
1778
+ name?: string | undefined;
1779
+ url?: string | undefined;
1780
+ };
1781
+ } | {
1782
+ type: "external";
1783
+ external: {
1784
+ url: string;
1785
+ };
1786
+ } | {
1787
+ type: "file";
1788
+ file: {
1789
+ url: string;
1790
+ expiry_time?: string | undefined;
1791
+ };
1792
+ } | ({
1793
+ type: "icon";
1794
+ icon: {
1795
+ name: string;
1796
+ color?: import("../protocol/icons.js").BridgeIconColor | undefined;
1797
+ } & {
1798
+ [key: string]: unknown;
1799
+ };
1800
+ } & {
1801
+ [key: string]: unknown;
1802
+ }) | null;
1803
+ cover: {
1804
+ type: "external";
1805
+ external: {
1806
+ url: string;
1807
+ };
1808
+ } | {
1809
+ type: "file";
1810
+ file: {
1811
+ url: string;
1812
+ expiry_time?: string | undefined;
1813
+ };
1814
+ } | null;
1815
+ url: string | null;
1816
+ public_url: string | null;
1817
+ is_archived: boolean;
1818
+ in_trash: boolean;
1819
+ };
1820
+ } | {
1821
+ type: "updatePageResult";
1822
+ requestId: string;
1823
+ status: "error";
1824
+ error: {
1825
+ code: string;
1826
+ message: string;
1827
+ isRetryable: boolean;
1828
+ };
1829
+ };
1830
+ readonly issues: undefined;
1831
+ } | {
1832
+ readonly typed: true;
1833
+ readonly success: false;
1834
+ readonly output: {
1835
+ type: "getPageResult";
1836
+ requestId: string;
1837
+ status: "success";
1838
+ page: {
1839
+ object: "page";
1840
+ id: string & v.Brand<"NotionPageId">;
1841
+ parent: {
1842
+ type: "page_id";
1843
+ page_id: string & v.Brand<"NotionPageId">;
1844
+ } | {
1845
+ type: "data_source_id";
1846
+ data_source_id: string & v.Brand<"NotionDataSourceId">;
1847
+ } | {
1848
+ type: "workspace";
1849
+ workspace: true;
1850
+ } | {
1851
+ type: "block_id";
1852
+ block_id: string & v.Brand<"NotionBlockId">;
1853
+ } | {
1854
+ type: "agent_id";
1855
+ agent_id: string & v.Brand<"NotionAgentId">;
1856
+ } | {
1857
+ type: "app_installation_id";
1858
+ app_installation_id: string & v.Brand<"NotionAppInstallationId">;
1859
+ } | {
1860
+ type: "unavailable";
1861
+ };
1862
+ properties: {
1863
+ [x: string]: {
1864
+ id: string;
1865
+ type: "title";
1866
+ title: {
1867
+ [x: string]: unknown;
1868
+ }[];
1869
+ } | {
1870
+ id: string;
1871
+ type: "rich_text";
1872
+ rich_text: {
1873
+ [x: string]: unknown;
1874
+ }[];
1875
+ } | {
1876
+ id: string;
1877
+ type: "number";
1878
+ number: number | null;
1879
+ } | {
1880
+ id: string;
1881
+ type: "url";
1882
+ url: string | null;
1883
+ } | {
1884
+ id: string;
1885
+ type: "email";
1886
+ email: string | null;
1887
+ } | {
1888
+ id: string;
1889
+ type: "phone_number";
1890
+ phone_number: string | null;
1891
+ } | {
1892
+ id: string;
1893
+ type: "checkbox";
1894
+ checkbox: boolean;
1895
+ } | {
1896
+ id: string;
1897
+ type: "select";
1898
+ select: {
1899
+ id: string;
1900
+ name?: string | undefined;
1901
+ color?: string | undefined;
1902
+ description?: string | null | undefined;
1903
+ } | {
1904
+ name: string;
1905
+ id?: string | undefined;
1906
+ color?: string | undefined;
1907
+ description?: string | null | undefined;
1908
+ } | null;
1909
+ } | {
1910
+ id: string;
1911
+ type: "status";
1912
+ status: {
1913
+ id: string;
1914
+ name?: string | undefined;
1915
+ color?: string | undefined;
1916
+ description?: string | null | undefined;
1917
+ } | {
1918
+ name: string;
1919
+ id?: string | undefined;
1920
+ color?: string | undefined;
1921
+ description?: string | null | undefined;
1922
+ } | null;
1923
+ } | {
1924
+ id: string;
1925
+ type: "multi_select";
1926
+ multi_select: ({
1927
+ id: string;
1928
+ name?: string | undefined;
1929
+ color?: string | undefined;
1930
+ description?: string | null | undefined;
1931
+ } | {
1932
+ name: string;
1933
+ id?: string | undefined;
1934
+ color?: string | undefined;
1935
+ description?: string | null | undefined;
1936
+ })[];
1937
+ } | {
1938
+ id: string;
1939
+ type: "date";
1940
+ date: {
1941
+ end?: string | null | undefined;
1942
+ time_zone?: string | null | undefined;
1943
+ reminder?: {
1944
+ unit: "day" | "month" | "week" | "year";
1945
+ value: number;
1946
+ time: string;
1947
+ defaultTimeZone?: string | undefined;
1948
+ } | {
1949
+ unit: "none";
1950
+ } | {
1951
+ unit: "hour" | "minute";
1952
+ value: number;
1953
+ } | undefined;
1954
+ start: string;
1955
+ } | {
1956
+ start: string;
1957
+ end?: string | null | undefined;
1958
+ reminder?: {
1959
+ unit: "day" | "month" | "week" | "year";
1960
+ value: number;
1961
+ time: string;
1962
+ defaultTimeZone?: string | undefined;
1963
+ } | {
1964
+ unit: "none";
1965
+ } | {
1966
+ unit: "hour" | "minute";
1967
+ value: number;
1968
+ } | undefined;
1969
+ time_zone: string;
1970
+ } | {
1971
+ start: string;
1972
+ end?: string | null | undefined;
1973
+ time_zone?: string | null | undefined;
1974
+ reminder?: {
1975
+ unit: "day" | "month" | "week" | "year";
1976
+ value: number;
1977
+ time: string;
1978
+ defaultTimeZone?: string | undefined;
1979
+ } | {
1980
+ unit: "none";
1981
+ } | undefined;
1982
+ } | null;
1983
+ } | {
1984
+ id: string;
1985
+ type: "people";
1986
+ people: ({
1987
+ object?: "user" | undefined;
1988
+ id: string;
1989
+ } | {
1990
+ object: "group";
1991
+ id: string;
1992
+ name?: string | null | undefined;
1993
+ })[];
1994
+ } | {
1995
+ id: string;
1996
+ type: "relation";
1997
+ has_more?: boolean | undefined;
1998
+ relation: {
1999
+ id: string;
2000
+ }[];
2001
+ } | {
2002
+ id: string;
2003
+ type: "files";
2004
+ files: ({
2005
+ type: "external";
2006
+ external: {
2007
+ url: string;
2008
+ };
2009
+ name: string;
2010
+ } | {
2011
+ type: "file";
2012
+ file: {
2013
+ url: string;
2014
+ expiry_time?: string | undefined;
2015
+ };
2016
+ name: string;
2017
+ })[];
2018
+ } | {
2019
+ id: string;
2020
+ type: "place";
2021
+ place: {
2022
+ lat: number;
2023
+ lon: number;
2024
+ name?: string | null | undefined;
2025
+ address?: string | null | undefined;
2026
+ aws_place_id?: string | null | undefined;
2027
+ google_place_id?: string | null | undefined;
2028
+ } | null;
2029
+ } | {
2030
+ id: string;
2031
+ type: "created_time";
2032
+ created_time: string | null;
2033
+ } | {
2034
+ id: string;
2035
+ type: "last_edited_time";
2036
+ last_edited_time: string | null;
2037
+ } | {
2038
+ id: string;
2039
+ type: "created_by";
2040
+ created_by: {
2041
+ id: string;
2042
+ table: "bot" | "notion_user" | "organization_bot";
2043
+ spaceId?: string | undefined;
2044
+ } | null;
2045
+ } | {
2046
+ id: string;
2047
+ type: "last_edited_by";
2048
+ last_edited_by: {
2049
+ id: string;
2050
+ table: "bot" | "notion_user" | "organization_bot";
2051
+ spaceId?: string | undefined;
2052
+ } | null;
2053
+ } | {
2054
+ id: string;
2055
+ type: "unique_id";
2056
+ unique_id: string;
2057
+ } | {
2058
+ id: string;
2059
+ type: "button";
2060
+ button: string;
2061
+ } | {
2062
+ id: string;
2063
+ type: "formula";
2064
+ formula: string;
2065
+ } | {
2066
+ id: string;
2067
+ type: "rollup";
2068
+ rollup: string;
2069
+ } | {
2070
+ id: string;
2071
+ type: "verification";
2072
+ verification: string;
2073
+ } | null;
2074
+ };
2075
+ created_by: {
2076
+ id: string;
2077
+ table: "bot" | "notion_user" | "organization_bot";
2078
+ spaceId?: string | undefined;
2079
+ } | null;
2080
+ last_edited_by: {
2081
+ id: string;
2082
+ table: "bot" | "notion_user" | "organization_bot";
2083
+ spaceId?: string | undefined;
2084
+ } | null;
2085
+ created_time: string | null;
2086
+ last_edited_time: string | null;
2087
+ icon: {
2088
+ type: "emoji";
2089
+ emoji: string;
2090
+ } | {
2091
+ type: "custom_emoji";
2092
+ custom_emoji: {
2093
+ id: string;
2094
+ name?: string | undefined;
2095
+ url?: string | undefined;
2096
+ };
2097
+ } | {
2098
+ type: "external";
2099
+ external: {
2100
+ url: string;
2101
+ };
2102
+ } | {
2103
+ type: "file";
2104
+ file: {
2105
+ url: string;
2106
+ expiry_time?: string | undefined;
2107
+ };
2108
+ } | ({
2109
+ type: "icon";
2110
+ icon: {
2111
+ name: string;
2112
+ color?: import("../protocol/icons.js").BridgeIconColor | undefined;
2113
+ } & {
2114
+ [key: string]: unknown;
2115
+ };
2116
+ } & {
2117
+ [key: string]: unknown;
2118
+ }) | null;
2119
+ cover: {
2120
+ type: "external";
2121
+ external: {
2122
+ url: string;
2123
+ };
2124
+ } | {
2125
+ type: "file";
2126
+ file: {
2127
+ url: string;
2128
+ expiry_time?: string | undefined;
2129
+ };
2130
+ } | null;
2131
+ url: string | null;
2132
+ public_url: string | null;
2133
+ is_archived: boolean;
2134
+ in_trash: boolean;
2135
+ };
2136
+ } | {
2137
+ type: "getPageResult";
2138
+ requestId: string;
2139
+ status: "error";
2140
+ error: {
2141
+ code: string;
2142
+ message: string;
2143
+ isRetryable: boolean;
2144
+ };
2145
+ } | {
2146
+ type: "contrastModeChanged";
2147
+ contrastMode: "high" | "standard";
2148
+ } | {
2149
+ type: "dataSourcesChanged";
2150
+ dataSources: {
2151
+ bindings: {
2152
+ [x: string]: {
2153
+ dataSourcePointer?: {
2154
+ id: string & v.Brand<"NotionDataSourceId">;
2155
+ table: string;
2156
+ spaceId?: (string & v.Brand<"NotionSpaceId">) | undefined;
2157
+ } | undefined;
2158
+ dataSourceSchema?: {
2159
+ id?: (string & v.Brand<"NotionDataSourceId">) | undefined;
2160
+ propertiesById: {
2161
+ [x: string]: {
2162
+ name: string;
2163
+ description?: string | undefined;
2164
+ type: "title";
2165
+ } | {
2166
+ name: string;
2167
+ description?: string | undefined;
2168
+ type: "rich_text";
2169
+ } | {
2170
+ name: string;
2171
+ description?: string | undefined;
2172
+ type: "number";
2173
+ } | {
2174
+ name: string;
2175
+ description?: string | undefined;
2176
+ type: "checkbox";
2177
+ } | {
2178
+ name: string;
2179
+ description?: string | undefined;
2180
+ type: "url";
2181
+ } | {
2182
+ name: string;
2183
+ description?: string | undefined;
2184
+ type: "email";
2185
+ } | {
2186
+ name: string;
2187
+ description?: string | undefined;
2188
+ type: "phone_number";
2189
+ } | {
2190
+ name: string;
2191
+ description?: string | undefined;
2192
+ type: "select";
2193
+ options: {
2194
+ id: string;
2195
+ name: string;
2196
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
2197
+ description?: string | undefined;
2198
+ }[];
2199
+ } | {
2200
+ name: string;
2201
+ description?: string | undefined;
2202
+ type: "multi_select";
2203
+ options: {
2204
+ id: string;
2205
+ name: string;
2206
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
2207
+ description?: string | undefined;
2208
+ }[];
2209
+ } | {
2210
+ name: string;
2211
+ description?: string | undefined;
2212
+ type: "status";
2213
+ options: {
2214
+ id: string;
2215
+ name: string;
2216
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
2217
+ description?: string | undefined;
2218
+ }[];
2219
+ groups: {
2220
+ id: string;
2221
+ name: string;
2222
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
2223
+ option_ids: string[];
2224
+ }[];
2225
+ } | {
2226
+ name: string;
2227
+ description?: string | undefined;
2228
+ type: "date";
2229
+ } | {
2230
+ name: string;
2231
+ description?: string | undefined;
2232
+ type: "people";
2233
+ } | {
2234
+ name: string;
2235
+ description?: string | undefined;
2236
+ type: "files";
2237
+ } | {
2238
+ name: string;
2239
+ description?: string | undefined;
2240
+ type: "unique_id";
2241
+ } | {
2242
+ name: string;
2243
+ description?: string | undefined;
2244
+ type: "relation";
2245
+ data_source_id?: string | undefined;
2246
+ dual_property?: {
2247
+ synced_property_id: string;
2248
+ synced_property_name: string;
2249
+ } | undefined;
2250
+ } | {
2251
+ name: string;
2252
+ description?: string | undefined;
2253
+ type: "place";
2254
+ } | {
2255
+ name: string;
2256
+ description?: string | undefined;
2257
+ type: "formula";
2258
+ } | {
2259
+ name: string;
2260
+ description?: string | undefined;
2261
+ type: "rollup";
2262
+ } | {
2263
+ name: string;
2264
+ description?: string | undefined;
2265
+ type: "button";
2266
+ } | {
2267
+ name: string;
2268
+ description?: string | undefined;
2269
+ type: "verification";
2270
+ } | {
2271
+ name: string;
2272
+ description?: string | undefined;
2273
+ type: "created_time";
2274
+ } | {
2275
+ name: string;
2276
+ description?: string | undefined;
2277
+ type: "last_edited_time";
2278
+ } | {
2279
+ name: string;
2280
+ description?: string | undefined;
2281
+ type: "created_by";
2282
+ } | {
2283
+ name: string;
2284
+ description?: string | undefined;
2285
+ type: "last_edited_by";
2286
+ };
2287
+ };
2288
+ } | undefined;
2289
+ propertyIdsByKey?: {
2290
+ [x: string]: string | undefined;
2291
+ } | undefined;
2292
+ inaccessible?: true | undefined;
2293
+ };
2294
+ };
2295
+ };
2296
+ } | {
2297
+ type: "init";
2298
+ initializationId: string;
2299
+ status: "success";
2300
+ theme: "dark" | "light";
2301
+ contrastMode: "high" | "standard";
2302
+ blockId: string & v.Brand<"NotionBlockId">;
2303
+ parent: {
2304
+ type: "page_id";
2305
+ page_id: string & v.Brand<"NotionPageId">;
2306
+ } | {
2307
+ type: "data_source_id";
2308
+ data_source_id: string & v.Brand<"NotionDataSourceId">;
2309
+ } | {
2310
+ type: "workspace";
2311
+ workspace: true;
2312
+ } | {
2313
+ type: "block_id";
2314
+ block_id: string & v.Brand<"NotionBlockId">;
2315
+ } | {
2316
+ type: "agent_id";
2317
+ agent_id: string & v.Brand<"NotionAgentId">;
2318
+ } | {
2319
+ type: "app_installation_id";
2320
+ app_installation_id: string & v.Brand<"NotionAppInstallationId">;
2321
+ } | {
2322
+ type: "unavailable";
2323
+ };
2324
+ page: {
2325
+ type: "unavailable";
2326
+ } | {
2327
+ type: "page";
2328
+ id: string & v.Brand<"NotionPageId">;
2329
+ parent: {
2330
+ type: "page_id";
2331
+ page_id: string & v.Brand<"NotionPageId">;
2332
+ } | {
2333
+ type: "data_source_id";
2334
+ data_source_id: string & v.Brand<"NotionDataSourceId">;
2335
+ } | {
2336
+ type: "workspace";
2337
+ workspace: true;
2338
+ } | {
2339
+ type: "block_id";
2340
+ block_id: string & v.Brand<"NotionBlockId">;
2341
+ } | {
2342
+ type: "agent_id";
2343
+ agent_id: string & v.Brand<"NotionAgentId">;
2344
+ } | {
2345
+ type: "app_installation_id";
2346
+ app_installation_id: string & v.Brand<"NotionAppInstallationId">;
2347
+ } | {
2348
+ type: "unavailable";
2349
+ };
2350
+ };
2351
+ manifest: {
2352
+ version: 1;
2353
+ name?: string | undefined;
2354
+ description?: string | undefined;
2355
+ slashCommand?: string | undefined;
2356
+ icon?: {
2357
+ type: "emoji";
2358
+ emoji: string;
2359
+ } | undefined;
2360
+ dataSources: {
2361
+ [x: string]: {
2362
+ name: string;
2363
+ description?: string | undefined;
2364
+ icon?: {
2365
+ type: "emoji";
2366
+ emoji: string;
2367
+ } | {
2368
+ type: "external";
2369
+ url: string;
2370
+ } | undefined;
2371
+ properties: {
2372
+ [x: string]: {
2373
+ name: string;
2374
+ description?: string | undefined;
2375
+ type: "button" | "checkbox" | "created_by" | "created_time" | "date" | "email" | "files" | "formula" | "last_edited_by" | "last_edited_time" | "multi_select" | "number" | "people" | "phone_number" | "place" | "relation" | "rich_text" | "rollup" | "select" | "status" | "title" | "unique_id" | "url" | "verification";
2376
+ };
2377
+ };
2378
+ };
2379
+ };
2380
+ pages?: {
2381
+ [x: string]: {
2382
+ name: string;
2383
+ description?: string | undefined;
2384
+ icon?: {
2385
+ type: "emoji";
2386
+ emoji: string;
2387
+ } | {
2388
+ type: "external";
2389
+ url: string;
2390
+ } | undefined;
2391
+ };
2392
+ } | undefined;
2393
+ grants?: {
2394
+ action: string;
2395
+ resource: string | string[];
2396
+ }[] | undefined;
2397
+ };
2398
+ dataSources: {
2399
+ bindings: {
2400
+ [x: string]: {
2401
+ dataSourcePointer?: {
2402
+ id: string & v.Brand<"NotionDataSourceId">;
2403
+ table: string;
2404
+ spaceId?: (string & v.Brand<"NotionSpaceId">) | undefined;
2405
+ } | undefined;
2406
+ dataSourceSchema?: {
2407
+ id?: (string & v.Brand<"NotionDataSourceId">) | undefined;
2408
+ propertiesById: {
2409
+ [x: string]: {
2410
+ name: string;
2411
+ description?: string | undefined;
2412
+ type: "title";
2413
+ } | {
2414
+ name: string;
2415
+ description?: string | undefined;
2416
+ type: "rich_text";
2417
+ } | {
2418
+ name: string;
2419
+ description?: string | undefined;
2420
+ type: "number";
2421
+ } | {
2422
+ name: string;
2423
+ description?: string | undefined;
2424
+ type: "checkbox";
2425
+ } | {
2426
+ name: string;
2427
+ description?: string | undefined;
2428
+ type: "url";
2429
+ } | {
2430
+ name: string;
2431
+ description?: string | undefined;
2432
+ type: "email";
2433
+ } | {
2434
+ name: string;
2435
+ description?: string | undefined;
2436
+ type: "phone_number";
2437
+ } | {
2438
+ name: string;
2439
+ description?: string | undefined;
2440
+ type: "select";
2441
+ options: {
2442
+ id: string;
2443
+ name: string;
2444
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
2445
+ description?: string | undefined;
2446
+ }[];
2447
+ } | {
2448
+ name: string;
2449
+ description?: string | undefined;
2450
+ type: "multi_select";
2451
+ options: {
2452
+ id: string;
2453
+ name: string;
2454
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
2455
+ description?: string | undefined;
2456
+ }[];
2457
+ } | {
2458
+ name: string;
2459
+ description?: string | undefined;
2460
+ type: "status";
2461
+ options: {
2462
+ id: string;
2463
+ name: string;
2464
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
2465
+ description?: string | undefined;
2466
+ }[];
2467
+ groups: {
2468
+ id: string;
2469
+ name: string;
2470
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
2471
+ option_ids: string[];
2472
+ }[];
2473
+ } | {
2474
+ name: string;
2475
+ description?: string | undefined;
2476
+ type: "date";
2477
+ } | {
2478
+ name: string;
2479
+ description?: string | undefined;
2480
+ type: "people";
2481
+ } | {
2482
+ name: string;
2483
+ description?: string | undefined;
2484
+ type: "files";
2485
+ } | {
2486
+ name: string;
2487
+ description?: string | undefined;
2488
+ type: "unique_id";
2489
+ } | {
2490
+ name: string;
2491
+ description?: string | undefined;
2492
+ type: "relation";
2493
+ data_source_id?: string | undefined;
2494
+ dual_property?: {
2495
+ synced_property_id: string;
2496
+ synced_property_name: string;
2497
+ } | undefined;
2498
+ } | {
2499
+ name: string;
2500
+ description?: string | undefined;
2501
+ type: "place";
2502
+ } | {
2503
+ name: string;
2504
+ description?: string | undefined;
2505
+ type: "formula";
2506
+ } | {
2507
+ name: string;
2508
+ description?: string | undefined;
2509
+ type: "rollup";
2510
+ } | {
2511
+ name: string;
2512
+ description?: string | undefined;
2513
+ type: "button";
2514
+ } | {
2515
+ name: string;
2516
+ description?: string | undefined;
2517
+ type: "verification";
2518
+ } | {
2519
+ name: string;
2520
+ description?: string | undefined;
2521
+ type: "created_time";
2522
+ } | {
2523
+ name: string;
2524
+ description?: string | undefined;
2525
+ type: "last_edited_time";
2526
+ } | {
2527
+ name: string;
2528
+ description?: string | undefined;
2529
+ type: "created_by";
2530
+ } | {
2531
+ name: string;
2532
+ description?: string | undefined;
2533
+ type: "last_edited_by";
2534
+ };
2535
+ };
2536
+ } | undefined;
2537
+ propertyIdsByKey?: {
2538
+ [x: string]: string | undefined;
2539
+ } | undefined;
2540
+ inaccessible?: true | undefined;
2541
+ };
2542
+ };
2543
+ };
2544
+ currentUser: {
2545
+ object: "user";
2546
+ id: string & v.Brand<"NotionUserId">;
2547
+ name?: string | undefined;
2548
+ avatar_url: string | null;
2549
+ type: "person";
2550
+ person: {
2551
+ email: string;
2552
+ };
2553
+ };
2554
+ } | {
2555
+ type: "init";
2556
+ initializationId: string;
2557
+ status: "error";
2558
+ error: {
2559
+ code: string;
2560
+ message: string;
2561
+ isRetryable: boolean;
2562
+ };
2563
+ } | {
2564
+ type: "themeChanged";
2565
+ theme: "dark" | "light";
2566
+ } | {
2567
+ type: "parentChanged";
2568
+ parent: {
2569
+ type: "page_id";
2570
+ page_id: string & v.Brand<"NotionPageId">;
2571
+ } | {
2572
+ type: "data_source_id";
2573
+ data_source_id: string & v.Brand<"NotionDataSourceId">;
2574
+ } | {
2575
+ type: "workspace";
2576
+ workspace: true;
2577
+ } | {
2578
+ type: "block_id";
2579
+ block_id: string & v.Brand<"NotionBlockId">;
2580
+ } | {
2581
+ type: "agent_id";
2582
+ agent_id: string & v.Brand<"NotionAgentId">;
2583
+ } | {
2584
+ type: "app_installation_id";
2585
+ app_installation_id: string & v.Brand<"NotionAppInstallationId">;
2586
+ } | {
2587
+ type: "unavailable";
2588
+ };
2589
+ } | {
2590
+ type: "pageChanged";
2591
+ page: {
2592
+ type: "unavailable";
2593
+ } | {
2594
+ type: "page";
2595
+ id: string & v.Brand<"NotionPageId">;
2596
+ parent: {
2597
+ type: "page_id";
2598
+ page_id: string & v.Brand<"NotionPageId">;
2599
+ } | {
2600
+ type: "data_source_id";
2601
+ data_source_id: string & v.Brand<"NotionDataSourceId">;
2602
+ } | {
2603
+ type: "workspace";
2604
+ workspace: true;
2605
+ } | {
2606
+ type: "block_id";
2607
+ block_id: string & v.Brand<"NotionBlockId">;
2608
+ } | {
2609
+ type: "agent_id";
2610
+ agent_id: string & v.Brand<"NotionAgentId">;
2611
+ } | {
2612
+ type: "app_installation_id";
2613
+ app_installation_id: string & v.Brand<"NotionAppInstallationId">;
2614
+ } | {
2615
+ type: "unavailable";
2616
+ };
2617
+ };
2618
+ } | {
2619
+ type: "currentUserChanged";
2620
+ currentUser: {
2621
+ object: "user";
2622
+ id: string & v.Brand<"NotionUserId">;
2623
+ name?: string | undefined;
2624
+ avatar_url: string | null;
2625
+ type: "person";
2626
+ person: {
2627
+ email: string;
2628
+ };
2629
+ };
2630
+ } | {
2631
+ type: "getUserResult";
2632
+ requestId: string;
2633
+ status: "success";
2634
+ user: {
2635
+ object: "user";
2636
+ id: string & v.Brand<"NotionUserId">;
2637
+ name?: string | undefined;
2638
+ avatar_url: string | null;
2639
+ type: "person";
2640
+ person: {
2641
+ email: string;
2642
+ };
2643
+ };
2644
+ } | {
2645
+ type: "getUserResult";
2646
+ requestId: string;
2647
+ status: "error";
2648
+ error: {
2649
+ code: string;
2650
+ message: string;
2651
+ isRetryable: boolean;
2652
+ };
2653
+ } | {
2654
+ type: "listUsersResult";
2655
+ requestId: string;
2656
+ status: "success";
2657
+ list: {
2658
+ object: "list";
2659
+ results: {
2660
+ object: "user";
2661
+ id: string & v.Brand<"NotionUserId">;
2662
+ name?: string | undefined;
2663
+ avatar_url: string | null;
2664
+ type: "person";
2665
+ person: {
2666
+ email: string;
2667
+ };
2668
+ }[];
2669
+ next_cursor: string | null;
2670
+ has_more: boolean;
2671
+ type: "user";
2672
+ user: {
2673
+ [x: string]: unknown;
2674
+ };
2675
+ };
2676
+ } | {
2677
+ type: "listUsersResult";
2678
+ requestId: string;
2679
+ status: "error";
2680
+ error: {
2681
+ code: string;
2682
+ message: string;
2683
+ isRetryable: boolean;
2684
+ };
2685
+ } | {
2686
+ type: "openPageResult";
2687
+ requestId: string;
2688
+ status: "success";
2689
+ pageId: string & v.Brand<"NotionPageId">;
2690
+ } | {
2691
+ type: "openPageResult";
2692
+ requestId: string;
2693
+ status: "error";
2694
+ error: {
2695
+ code: string;
2696
+ message: string;
2697
+ isRetryable: boolean;
2698
+ };
2699
+ } | {
2700
+ type: "openExternalUrlResult";
2701
+ requestId: string;
2702
+ status: "success";
2703
+ } | {
2704
+ type: "openExternalUrlResult";
2705
+ requestId: string;
2706
+ status: "error";
2707
+ error: {
2708
+ code: string;
2709
+ message: string;
2710
+ isRetryable: boolean;
2711
+ };
2712
+ } | {
2713
+ type: "invalidSandboxMessage";
2714
+ requestId?: string | undefined;
2715
+ reason: string;
2716
+ } | {
2717
+ type: "queryDataSourceResult";
2718
+ subscriptionId: string;
2719
+ status: "success";
2720
+ items: {
2721
+ object: "page";
2722
+ id: string & v.Brand<"NotionPageId">;
2723
+ parent: {
2724
+ type: "page_id";
2725
+ page_id: string & v.Brand<"NotionPageId">;
2726
+ } | {
2727
+ type: "data_source_id";
2728
+ data_source_id: string & v.Brand<"NotionDataSourceId">;
2729
+ } | {
2730
+ type: "workspace";
2731
+ workspace: true;
2732
+ } | {
2733
+ type: "block_id";
2734
+ block_id: string & v.Brand<"NotionBlockId">;
2735
+ } | {
2736
+ type: "agent_id";
2737
+ agent_id: string & v.Brand<"NotionAgentId">;
2738
+ } | {
2739
+ type: "app_installation_id";
2740
+ app_installation_id: string & v.Brand<"NotionAppInstallationId">;
2741
+ } | {
2742
+ type: "unavailable";
2743
+ };
2744
+ properties: {
2745
+ [x: string]: {
2746
+ id: string;
2747
+ type: "title";
2748
+ title: {
2749
+ [x: string]: unknown;
2750
+ }[];
2751
+ } | {
2752
+ id: string;
2753
+ type: "rich_text";
2754
+ rich_text: {
2755
+ [x: string]: unknown;
2756
+ }[];
2757
+ } | {
2758
+ id: string;
2759
+ type: "number";
2760
+ number: number | null;
2761
+ } | {
2762
+ id: string;
2763
+ type: "url";
2764
+ url: string | null;
2765
+ } | {
2766
+ id: string;
2767
+ type: "email";
2768
+ email: string | null;
2769
+ } | {
2770
+ id: string;
2771
+ type: "phone_number";
2772
+ phone_number: string | null;
2773
+ } | {
2774
+ id: string;
2775
+ type: "checkbox";
2776
+ checkbox: boolean;
2777
+ } | {
2778
+ id: string;
2779
+ type: "select";
2780
+ select: {
2781
+ id: string;
2782
+ name?: string | undefined;
2783
+ color?: string | undefined;
2784
+ description?: string | null | undefined;
2785
+ } | {
2786
+ name: string;
2787
+ id?: string | undefined;
2788
+ color?: string | undefined;
2789
+ description?: string | null | undefined;
2790
+ } | null;
2791
+ } | {
2792
+ id: string;
2793
+ type: "status";
2794
+ status: {
2795
+ id: string;
2796
+ name?: string | undefined;
2797
+ color?: string | undefined;
2798
+ description?: string | null | undefined;
2799
+ } | {
2800
+ name: string;
2801
+ id?: string | undefined;
2802
+ color?: string | undefined;
2803
+ description?: string | null | undefined;
2804
+ } | null;
2805
+ } | {
2806
+ id: string;
2807
+ type: "multi_select";
2808
+ multi_select: ({
2809
+ id: string;
2810
+ name?: string | undefined;
2811
+ color?: string | undefined;
2812
+ description?: string | null | undefined;
2813
+ } | {
2814
+ name: string;
2815
+ id?: string | undefined;
2816
+ color?: string | undefined;
2817
+ description?: string | null | undefined;
2818
+ })[];
2819
+ } | {
2820
+ id: string;
2821
+ type: "date";
2822
+ date: {
2823
+ end?: string | null | undefined;
2824
+ time_zone?: string | null | undefined;
2825
+ reminder?: {
2826
+ unit: "day" | "month" | "week" | "year";
2827
+ value: number;
2828
+ time: string;
2829
+ defaultTimeZone?: string | undefined;
2830
+ } | {
2831
+ unit: "none";
2832
+ } | {
2833
+ unit: "hour" | "minute";
2834
+ value: number;
2835
+ } | undefined;
2836
+ start: string;
2837
+ } | {
2838
+ start: string;
2839
+ end?: string | null | undefined;
2840
+ reminder?: {
2841
+ unit: "day" | "month" | "week" | "year";
2842
+ value: number;
2843
+ time: string;
2844
+ defaultTimeZone?: string | undefined;
2845
+ } | {
2846
+ unit: "none";
2847
+ } | {
2848
+ unit: "hour" | "minute";
2849
+ value: number;
2850
+ } | undefined;
2851
+ time_zone: string;
2852
+ } | {
2853
+ start: string;
2854
+ end?: string | null | undefined;
2855
+ time_zone?: string | null | undefined;
2856
+ reminder?: {
2857
+ unit: "day" | "month" | "week" | "year";
2858
+ value: number;
2859
+ time: string;
2860
+ defaultTimeZone?: string | undefined;
2861
+ } | {
2862
+ unit: "none";
2863
+ } | undefined;
2864
+ } | null;
2865
+ } | {
2866
+ id: string;
2867
+ type: "people";
2868
+ people: ({
2869
+ object?: "user" | undefined;
2870
+ id: string;
2871
+ } | {
2872
+ object: "group";
2873
+ id: string;
2874
+ name?: string | null | undefined;
2875
+ })[];
2876
+ } | {
2877
+ id: string;
2878
+ type: "relation";
2879
+ has_more?: boolean | undefined;
2880
+ relation: {
2881
+ id: string;
2882
+ }[];
2883
+ } | {
2884
+ id: string;
2885
+ type: "files";
2886
+ files: ({
2887
+ type: "external";
2888
+ external: {
2889
+ url: string;
2890
+ };
2891
+ name: string;
2892
+ } | {
2893
+ type: "file";
2894
+ file: {
2895
+ url: string;
2896
+ expiry_time?: string | undefined;
2897
+ };
2898
+ name: string;
2899
+ })[];
2900
+ } | {
2901
+ id: string;
2902
+ type: "place";
2903
+ place: {
2904
+ lat: number;
2905
+ lon: number;
2906
+ name?: string | null | undefined;
2907
+ address?: string | null | undefined;
2908
+ aws_place_id?: string | null | undefined;
2909
+ google_place_id?: string | null | undefined;
2910
+ } | null;
2911
+ } | {
2912
+ id: string;
2913
+ type: "created_time";
2914
+ created_time: string | null;
2915
+ } | {
2916
+ id: string;
2917
+ type: "last_edited_time";
2918
+ last_edited_time: string | null;
2919
+ } | {
2920
+ id: string;
2921
+ type: "created_by";
2922
+ created_by: {
2923
+ id: string;
2924
+ table: "bot" | "notion_user" | "organization_bot";
2925
+ spaceId?: string | undefined;
2926
+ } | null;
2927
+ } | {
2928
+ id: string;
2929
+ type: "last_edited_by";
2930
+ last_edited_by: {
2931
+ id: string;
2932
+ table: "bot" | "notion_user" | "organization_bot";
2933
+ spaceId?: string | undefined;
2934
+ } | null;
2935
+ } | {
2936
+ id: string;
2937
+ type: "unique_id";
2938
+ unique_id: string;
2939
+ } | {
2940
+ id: string;
2941
+ type: "button";
2942
+ button: string;
2943
+ } | {
2944
+ id: string;
2945
+ type: "formula";
2946
+ formula: string;
2947
+ } | {
2948
+ id: string;
2949
+ type: "rollup";
2950
+ rollup: string;
2951
+ } | {
2952
+ id: string;
2953
+ type: "verification";
2954
+ verification: string;
2955
+ } | null;
2956
+ };
2957
+ created_by: {
2958
+ id: string;
2959
+ table: "bot" | "notion_user" | "organization_bot";
2960
+ spaceId?: string | undefined;
2961
+ } | null;
2962
+ last_edited_by: {
2963
+ id: string;
2964
+ table: "bot" | "notion_user" | "organization_bot";
2965
+ spaceId?: string | undefined;
2966
+ } | null;
2967
+ created_time: string | null;
2968
+ last_edited_time: string | null;
2969
+ icon: {
2970
+ type: "emoji";
2971
+ emoji: string;
2972
+ } | {
2973
+ type: "custom_emoji";
2974
+ custom_emoji: {
2975
+ id: string;
2976
+ name?: string | undefined;
2977
+ url?: string | undefined;
2978
+ };
2979
+ } | {
2980
+ type: "external";
2981
+ external: {
2982
+ url: string;
2983
+ };
2984
+ } | {
2985
+ type: "file";
2986
+ file: {
2987
+ url: string;
2988
+ expiry_time?: string | undefined;
2989
+ };
2990
+ } | ({
2991
+ type: "icon";
2992
+ icon: {
2993
+ name: string;
2994
+ color?: import("../protocol/icons.js").BridgeIconColor | undefined;
2995
+ } & {
2996
+ [key: string]: unknown;
2997
+ };
2998
+ } & {
2999
+ [key: string]: unknown;
3000
+ }) | null;
3001
+ cover: {
3002
+ type: "external";
3003
+ external: {
3004
+ url: string;
3005
+ };
3006
+ } | {
3007
+ type: "file";
3008
+ file: {
3009
+ url: string;
3010
+ expiry_time?: string | undefined;
3011
+ };
3012
+ } | null;
3013
+ url: string | null;
3014
+ public_url: string | null;
3015
+ is_archived: boolean;
3016
+ in_trash: boolean;
3017
+ }[];
3018
+ hasMore: boolean;
3019
+ } | {
3020
+ type: "queryDataSourceResult";
3021
+ subscriptionId: string;
3022
+ status: "error";
3023
+ error: {
3024
+ code: string;
3025
+ message: string;
3026
+ isRetryable: boolean;
3027
+ };
3028
+ } | {
3029
+ type: "createPageResult";
3030
+ requestId: string;
3031
+ status: "success";
3032
+ page: {
3033
+ object: "page";
3034
+ id: string & v.Brand<"NotionPageId">;
3035
+ parent: {
3036
+ type: "page_id";
3037
+ page_id: string & v.Brand<"NotionPageId">;
3038
+ } | {
3039
+ type: "data_source_id";
3040
+ data_source_id: string & v.Brand<"NotionDataSourceId">;
3041
+ } | {
3042
+ type: "workspace";
3043
+ workspace: true;
3044
+ } | {
3045
+ type: "block_id";
3046
+ block_id: string & v.Brand<"NotionBlockId">;
3047
+ } | {
3048
+ type: "agent_id";
3049
+ agent_id: string & v.Brand<"NotionAgentId">;
3050
+ } | {
3051
+ type: "app_installation_id";
3052
+ app_installation_id: string & v.Brand<"NotionAppInstallationId">;
3053
+ } | {
3054
+ type: "unavailable";
3055
+ };
3056
+ properties: {
3057
+ [x: string]: {
3058
+ id: string;
3059
+ type: "title";
3060
+ title: {
3061
+ [x: string]: unknown;
3062
+ }[];
3063
+ } | {
3064
+ id: string;
3065
+ type: "rich_text";
3066
+ rich_text: {
3067
+ [x: string]: unknown;
3068
+ }[];
3069
+ } | {
3070
+ id: string;
3071
+ type: "number";
3072
+ number: number | null;
3073
+ } | {
3074
+ id: string;
3075
+ type: "url";
3076
+ url: string | null;
3077
+ } | {
3078
+ id: string;
3079
+ type: "email";
3080
+ email: string | null;
3081
+ } | {
3082
+ id: string;
3083
+ type: "phone_number";
3084
+ phone_number: string | null;
3085
+ } | {
3086
+ id: string;
3087
+ type: "checkbox";
3088
+ checkbox: boolean;
3089
+ } | {
3090
+ id: string;
3091
+ type: "select";
3092
+ select: {
3093
+ id: string;
3094
+ name?: string | undefined;
3095
+ color?: string | undefined;
3096
+ description?: string | null | undefined;
3097
+ } | {
3098
+ name: string;
3099
+ id?: string | undefined;
3100
+ color?: string | undefined;
3101
+ description?: string | null | undefined;
3102
+ } | null;
3103
+ } | {
3104
+ id: string;
3105
+ type: "status";
3106
+ status: {
3107
+ id: string;
3108
+ name?: string | undefined;
3109
+ color?: string | undefined;
3110
+ description?: string | null | undefined;
3111
+ } | {
3112
+ name: string;
3113
+ id?: string | undefined;
3114
+ color?: string | undefined;
3115
+ description?: string | null | undefined;
3116
+ } | null;
3117
+ } | {
3118
+ id: string;
3119
+ type: "multi_select";
3120
+ multi_select: ({
3121
+ id: string;
3122
+ name?: string | undefined;
3123
+ color?: string | undefined;
3124
+ description?: string | null | undefined;
3125
+ } | {
3126
+ name: string;
3127
+ id?: string | undefined;
3128
+ color?: string | undefined;
3129
+ description?: string | null | undefined;
3130
+ })[];
3131
+ } | {
3132
+ id: string;
3133
+ type: "date";
3134
+ date: {
3135
+ end?: string | null | undefined;
3136
+ time_zone?: string | null | undefined;
3137
+ reminder?: {
3138
+ unit: "day" | "month" | "week" | "year";
3139
+ value: number;
3140
+ time: string;
3141
+ defaultTimeZone?: string | undefined;
3142
+ } | {
3143
+ unit: "none";
3144
+ } | {
3145
+ unit: "hour" | "minute";
3146
+ value: number;
3147
+ } | undefined;
3148
+ start: string;
3149
+ } | {
3150
+ start: string;
3151
+ end?: string | null | undefined;
3152
+ reminder?: {
3153
+ unit: "day" | "month" | "week" | "year";
3154
+ value: number;
3155
+ time: string;
3156
+ defaultTimeZone?: string | undefined;
3157
+ } | {
3158
+ unit: "none";
3159
+ } | {
3160
+ unit: "hour" | "minute";
3161
+ value: number;
3162
+ } | undefined;
3163
+ time_zone: string;
3164
+ } | {
3165
+ start: string;
3166
+ end?: string | null | undefined;
3167
+ time_zone?: string | null | undefined;
3168
+ reminder?: {
3169
+ unit: "day" | "month" | "week" | "year";
3170
+ value: number;
3171
+ time: string;
3172
+ defaultTimeZone?: string | undefined;
3173
+ } | {
3174
+ unit: "none";
3175
+ } | undefined;
3176
+ } | null;
3177
+ } | {
3178
+ id: string;
3179
+ type: "people";
3180
+ people: ({
3181
+ object?: "user" | undefined;
3182
+ id: string;
3183
+ } | {
3184
+ object: "group";
3185
+ id: string;
3186
+ name?: string | null | undefined;
3187
+ })[];
3188
+ } | {
3189
+ id: string;
3190
+ type: "relation";
3191
+ has_more?: boolean | undefined;
3192
+ relation: {
3193
+ id: string;
3194
+ }[];
3195
+ } | {
3196
+ id: string;
3197
+ type: "files";
3198
+ files: ({
3199
+ type: "external";
3200
+ external: {
3201
+ url: string;
3202
+ };
3203
+ name: string;
3204
+ } | {
3205
+ type: "file";
3206
+ file: {
3207
+ url: string;
3208
+ expiry_time?: string | undefined;
3209
+ };
3210
+ name: string;
3211
+ })[];
3212
+ } | {
3213
+ id: string;
3214
+ type: "place";
3215
+ place: {
3216
+ lat: number;
3217
+ lon: number;
3218
+ name?: string | null | undefined;
3219
+ address?: string | null | undefined;
3220
+ aws_place_id?: string | null | undefined;
3221
+ google_place_id?: string | null | undefined;
3222
+ } | null;
3223
+ } | {
3224
+ id: string;
3225
+ type: "created_time";
3226
+ created_time: string | null;
3227
+ } | {
3228
+ id: string;
3229
+ type: "last_edited_time";
3230
+ last_edited_time: string | null;
3231
+ } | {
3232
+ id: string;
3233
+ type: "created_by";
3234
+ created_by: {
3235
+ id: string;
3236
+ table: "bot" | "notion_user" | "organization_bot";
3237
+ spaceId?: string | undefined;
3238
+ } | null;
3239
+ } | {
3240
+ id: string;
3241
+ type: "last_edited_by";
3242
+ last_edited_by: {
3243
+ id: string;
3244
+ table: "bot" | "notion_user" | "organization_bot";
3245
+ spaceId?: string | undefined;
3246
+ } | null;
3247
+ } | {
3248
+ id: string;
3249
+ type: "unique_id";
3250
+ unique_id: string;
3251
+ } | {
3252
+ id: string;
3253
+ type: "button";
3254
+ button: string;
3255
+ } | {
3256
+ id: string;
3257
+ type: "formula";
3258
+ formula: string;
3259
+ } | {
3260
+ id: string;
3261
+ type: "rollup";
3262
+ rollup: string;
3263
+ } | {
3264
+ id: string;
3265
+ type: "verification";
3266
+ verification: string;
3267
+ } | null;
3268
+ };
3269
+ created_by: {
3270
+ id: string;
3271
+ table: "bot" | "notion_user" | "organization_bot";
3272
+ spaceId?: string | undefined;
3273
+ } | null;
3274
+ last_edited_by: {
3275
+ id: string;
3276
+ table: "bot" | "notion_user" | "organization_bot";
3277
+ spaceId?: string | undefined;
3278
+ } | null;
3279
+ created_time: string | null;
3280
+ last_edited_time: string | null;
3281
+ icon: {
3282
+ type: "emoji";
3283
+ emoji: string;
3284
+ } | {
3285
+ type: "custom_emoji";
3286
+ custom_emoji: {
3287
+ id: string;
3288
+ name?: string | undefined;
3289
+ url?: string | undefined;
3290
+ };
3291
+ } | {
3292
+ type: "external";
3293
+ external: {
3294
+ url: string;
3295
+ };
3296
+ } | {
3297
+ type: "file";
3298
+ file: {
3299
+ url: string;
3300
+ expiry_time?: string | undefined;
3301
+ };
3302
+ } | ({
3303
+ type: "icon";
3304
+ icon: {
3305
+ name: string;
3306
+ color?: import("../protocol/icons.js").BridgeIconColor | undefined;
3307
+ } & {
3308
+ [key: string]: unknown;
3309
+ };
3310
+ } & {
3311
+ [key: string]: unknown;
3312
+ }) | null;
3313
+ cover: {
3314
+ type: "external";
3315
+ external: {
3316
+ url: string;
3317
+ };
3318
+ } | {
3319
+ type: "file";
3320
+ file: {
3321
+ url: string;
3322
+ expiry_time?: string | undefined;
3323
+ };
3324
+ } | null;
3325
+ url: string | null;
3326
+ public_url: string | null;
3327
+ is_archived: boolean;
3328
+ in_trash: boolean;
3329
+ };
3330
+ } | {
3331
+ type: "createPageResult";
3332
+ requestId: string;
3333
+ status: "error";
3334
+ error: {
3335
+ code: string;
3336
+ message: string;
3337
+ isRetryable: boolean;
3338
+ };
3339
+ } | {
3340
+ type: "updatePageResult";
3341
+ requestId: string;
3342
+ status: "success";
3343
+ page: {
3344
+ object: "page";
3345
+ id: string & v.Brand<"NotionPageId">;
3346
+ parent: {
3347
+ type: "page_id";
3348
+ page_id: string & v.Brand<"NotionPageId">;
3349
+ } | {
3350
+ type: "data_source_id";
3351
+ data_source_id: string & v.Brand<"NotionDataSourceId">;
3352
+ } | {
3353
+ type: "workspace";
3354
+ workspace: true;
3355
+ } | {
3356
+ type: "block_id";
3357
+ block_id: string & v.Brand<"NotionBlockId">;
3358
+ } | {
3359
+ type: "agent_id";
3360
+ agent_id: string & v.Brand<"NotionAgentId">;
3361
+ } | {
3362
+ type: "app_installation_id";
3363
+ app_installation_id: string & v.Brand<"NotionAppInstallationId">;
3364
+ } | {
3365
+ type: "unavailable";
3366
+ };
3367
+ properties: {
3368
+ [x: string]: {
3369
+ id: string;
3370
+ type: "title";
3371
+ title: {
3372
+ [x: string]: unknown;
3373
+ }[];
3374
+ } | {
3375
+ id: string;
3376
+ type: "rich_text";
3377
+ rich_text: {
3378
+ [x: string]: unknown;
3379
+ }[];
3380
+ } | {
3381
+ id: string;
3382
+ type: "number";
3383
+ number: number | null;
3384
+ } | {
3385
+ id: string;
3386
+ type: "url";
3387
+ url: string | null;
3388
+ } | {
3389
+ id: string;
3390
+ type: "email";
3391
+ email: string | null;
3392
+ } | {
3393
+ id: string;
3394
+ type: "phone_number";
3395
+ phone_number: string | null;
3396
+ } | {
3397
+ id: string;
3398
+ type: "checkbox";
3399
+ checkbox: boolean;
3400
+ } | {
3401
+ id: string;
3402
+ type: "select";
3403
+ select: {
3404
+ id: string;
3405
+ name?: string | undefined;
3406
+ color?: string | undefined;
3407
+ description?: string | null | undefined;
3408
+ } | {
3409
+ name: string;
3410
+ id?: string | undefined;
3411
+ color?: string | undefined;
3412
+ description?: string | null | undefined;
3413
+ } | null;
3414
+ } | {
3415
+ id: string;
3416
+ type: "status";
3417
+ status: {
3418
+ id: string;
3419
+ name?: string | undefined;
3420
+ color?: string | undefined;
3421
+ description?: string | null | undefined;
3422
+ } | {
3423
+ name: string;
3424
+ id?: string | undefined;
3425
+ color?: string | undefined;
3426
+ description?: string | null | undefined;
3427
+ } | null;
3428
+ } | {
3429
+ id: string;
3430
+ type: "multi_select";
3431
+ multi_select: ({
3432
+ id: string;
3433
+ name?: string | undefined;
3434
+ color?: string | undefined;
3435
+ description?: string | null | undefined;
3436
+ } | {
3437
+ name: string;
3438
+ id?: string | undefined;
3439
+ color?: string | undefined;
3440
+ description?: string | null | undefined;
3441
+ })[];
3442
+ } | {
3443
+ id: string;
3444
+ type: "date";
3445
+ date: {
3446
+ end?: string | null | undefined;
3447
+ time_zone?: string | null | undefined;
3448
+ reminder?: {
3449
+ unit: "day" | "month" | "week" | "year";
3450
+ value: number;
3451
+ time: string;
3452
+ defaultTimeZone?: string | undefined;
3453
+ } | {
3454
+ unit: "none";
3455
+ } | {
3456
+ unit: "hour" | "minute";
3457
+ value: number;
3458
+ } | undefined;
3459
+ start: string;
3460
+ } | {
3461
+ start: string;
3462
+ end?: string | null | undefined;
3463
+ reminder?: {
3464
+ unit: "day" | "month" | "week" | "year";
3465
+ value: number;
3466
+ time: string;
3467
+ defaultTimeZone?: string | undefined;
3468
+ } | {
3469
+ unit: "none";
3470
+ } | {
3471
+ unit: "hour" | "minute";
3472
+ value: number;
3473
+ } | undefined;
3474
+ time_zone: string;
3475
+ } | {
3476
+ start: string;
3477
+ end?: string | null | undefined;
3478
+ time_zone?: string | null | undefined;
3479
+ reminder?: {
3480
+ unit: "day" | "month" | "week" | "year";
3481
+ value: number;
3482
+ time: string;
3483
+ defaultTimeZone?: string | undefined;
3484
+ } | {
3485
+ unit: "none";
3486
+ } | undefined;
3487
+ } | null;
3488
+ } | {
3489
+ id: string;
3490
+ type: "people";
3491
+ people: ({
3492
+ object?: "user" | undefined;
3493
+ id: string;
3494
+ } | {
3495
+ object: "group";
3496
+ id: string;
3497
+ name?: string | null | undefined;
3498
+ })[];
3499
+ } | {
3500
+ id: string;
3501
+ type: "relation";
3502
+ has_more?: boolean | undefined;
3503
+ relation: {
3504
+ id: string;
3505
+ }[];
3506
+ } | {
3507
+ id: string;
3508
+ type: "files";
3509
+ files: ({
3510
+ type: "external";
3511
+ external: {
3512
+ url: string;
3513
+ };
3514
+ name: string;
3515
+ } | {
3516
+ type: "file";
3517
+ file: {
3518
+ url: string;
3519
+ expiry_time?: string | undefined;
3520
+ };
3521
+ name: string;
3522
+ })[];
3523
+ } | {
3524
+ id: string;
3525
+ type: "place";
3526
+ place: {
3527
+ lat: number;
3528
+ lon: number;
3529
+ name?: string | null | undefined;
3530
+ address?: string | null | undefined;
3531
+ aws_place_id?: string | null | undefined;
3532
+ google_place_id?: string | null | undefined;
3533
+ } | null;
3534
+ } | {
3535
+ id: string;
3536
+ type: "created_time";
3537
+ created_time: string | null;
3538
+ } | {
3539
+ id: string;
3540
+ type: "last_edited_time";
3541
+ last_edited_time: string | null;
3542
+ } | {
3543
+ id: string;
3544
+ type: "created_by";
3545
+ created_by: {
3546
+ id: string;
3547
+ table: "bot" | "notion_user" | "organization_bot";
3548
+ spaceId?: string | undefined;
3549
+ } | null;
3550
+ } | {
3551
+ id: string;
3552
+ type: "last_edited_by";
3553
+ last_edited_by: {
3554
+ id: string;
3555
+ table: "bot" | "notion_user" | "organization_bot";
3556
+ spaceId?: string | undefined;
3557
+ } | null;
3558
+ } | {
3559
+ id: string;
3560
+ type: "unique_id";
3561
+ unique_id: string;
3562
+ } | {
3563
+ id: string;
3564
+ type: "button";
3565
+ button: string;
3566
+ } | {
3567
+ id: string;
3568
+ type: "formula";
3569
+ formula: string;
3570
+ } | {
3571
+ id: string;
3572
+ type: "rollup";
3573
+ rollup: string;
3574
+ } | {
3575
+ id: string;
3576
+ type: "verification";
3577
+ verification: string;
3578
+ } | null;
3579
+ };
3580
+ created_by: {
3581
+ id: string;
3582
+ table: "bot" | "notion_user" | "organization_bot";
3583
+ spaceId?: string | undefined;
3584
+ } | null;
3585
+ last_edited_by: {
3586
+ id: string;
3587
+ table: "bot" | "notion_user" | "organization_bot";
3588
+ spaceId?: string | undefined;
3589
+ } | null;
3590
+ created_time: string | null;
3591
+ last_edited_time: string | null;
3592
+ icon: {
3593
+ type: "emoji";
3594
+ emoji: string;
3595
+ } | {
3596
+ type: "custom_emoji";
3597
+ custom_emoji: {
3598
+ id: string;
3599
+ name?: string | undefined;
3600
+ url?: string | undefined;
3601
+ };
3602
+ } | {
3603
+ type: "external";
3604
+ external: {
3605
+ url: string;
3606
+ };
3607
+ } | {
3608
+ type: "file";
3609
+ file: {
3610
+ url: string;
3611
+ expiry_time?: string | undefined;
3612
+ };
3613
+ } | ({
3614
+ type: "icon";
3615
+ icon: {
3616
+ name: string;
3617
+ color?: import("../protocol/icons.js").BridgeIconColor | undefined;
3618
+ } & {
3619
+ [key: string]: unknown;
3620
+ };
3621
+ } & {
3622
+ [key: string]: unknown;
3623
+ }) | null;
3624
+ cover: {
3625
+ type: "external";
3626
+ external: {
3627
+ url: string;
3628
+ };
3629
+ } | {
3630
+ type: "file";
3631
+ file: {
3632
+ url: string;
3633
+ expiry_time?: string | undefined;
3634
+ };
3635
+ } | null;
3636
+ url: string | null;
3637
+ public_url: string | null;
3638
+ is_archived: boolean;
3639
+ in_trash: boolean;
3640
+ };
3641
+ } | {
3642
+ type: "updatePageResult";
3643
+ requestId: string;
3644
+ status: "error";
3645
+ error: {
3646
+ code: string;
3647
+ message: string;
3648
+ isRetryable: boolean;
3649
+ };
3650
+ };
3651
+ readonly issues: [v.ArrayIssue | v.BaseIssue<unknown> | v.BooleanIssue | v.IncludesIssue<string, "T"> | v.LiteralIssue | v.MinLengthIssue<string[], 1> | v.NumberIssue | v.PicklistIssue | v.RecordIssue | v.StringIssue | v.UnionIssue<v.ObjectIssue | v.StringIssue> | v.UnionIssue<v.ArrayIssue | v.MinLengthIssue<string[], 1> | v.StringIssue> | v.UnionIssue<v.LiteralIssue | v.ObjectIssue | v.StringIssue> | v.UnionIssue<v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue> | v.UnionIssue<v.LiteralIssue | v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue> | v.UnionIssue<v.LiteralIssue | v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue | v.UnionIssue<v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue>> | v.UnionIssue<v.IncludesIssue<string, "T"> | v.LiteralIssue | v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue | v.UnionIssue<v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue> | v.UnionIssue<v.LiteralIssue | v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue> | v.UnionIssue<v.LiteralIssue | v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue | v.UnionIssue<v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue>>> | v.VariantIssue, ...(v.ArrayIssue | v.BaseIssue<unknown> | v.BooleanIssue | v.IncludesIssue<string, "T"> | v.LiteralIssue | v.MinLengthIssue<string[], 1> | v.NumberIssue | v.PicklistIssue | v.RecordIssue | v.StringIssue | v.UnionIssue<v.ObjectIssue | v.StringIssue> | v.UnionIssue<v.ArrayIssue | v.MinLengthIssue<string[], 1> | v.StringIssue> | v.UnionIssue<v.LiteralIssue | v.ObjectIssue | v.StringIssue> | v.UnionIssue<v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue> | v.UnionIssue<v.LiteralIssue | v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue> | v.UnionIssue<v.LiteralIssue | v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue | v.UnionIssue<v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue>> | v.UnionIssue<v.IncludesIssue<string, "T"> | v.LiteralIssue | v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue | v.UnionIssue<v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue> | v.UnionIssue<v.LiteralIssue | v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue> | v.UnionIssue<v.LiteralIssue | v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue | v.UnionIssue<v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue>>> | v.VariantIssue)[]];
3652
+ } | {
3653
+ readonly typed: false;
3654
+ readonly success: false;
3655
+ readonly output: unknown;
3656
+ readonly issues: [v.ArrayIssue | v.BaseIssue<unknown> | v.BooleanIssue | v.IncludesIssue<string, "T"> | v.LiteralIssue | v.MinLengthIssue<string[], 1> | v.NumberIssue | v.PicklistIssue | v.RecordIssue | v.StringIssue | v.UnionIssue<v.ObjectIssue | v.StringIssue> | v.UnionIssue<v.ArrayIssue | v.MinLengthIssue<string[], 1> | v.StringIssue> | v.UnionIssue<v.LiteralIssue | v.ObjectIssue | v.StringIssue> | v.UnionIssue<v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue> | v.UnionIssue<v.LiteralIssue | v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue> | v.UnionIssue<v.LiteralIssue | v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue | v.UnionIssue<v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue>> | v.UnionIssue<v.IncludesIssue<string, "T"> | v.LiteralIssue | v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue | v.UnionIssue<v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue> | v.UnionIssue<v.LiteralIssue | v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue> | v.UnionIssue<v.LiteralIssue | v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue | v.UnionIssue<v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue>>> | v.VariantIssue, ...(v.ArrayIssue | v.BaseIssue<unknown> | v.BooleanIssue | v.IncludesIssue<string, "T"> | v.LiteralIssue | v.MinLengthIssue<string[], 1> | v.NumberIssue | v.PicklistIssue | v.RecordIssue | v.StringIssue | v.UnionIssue<v.ObjectIssue | v.StringIssue> | v.UnionIssue<v.ArrayIssue | v.MinLengthIssue<string[], 1> | v.StringIssue> | v.UnionIssue<v.LiteralIssue | v.ObjectIssue | v.StringIssue> | v.UnionIssue<v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue> | v.UnionIssue<v.LiteralIssue | v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue> | v.UnionIssue<v.LiteralIssue | v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue | v.UnionIssue<v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue>> | v.UnionIssue<v.IncludesIssue<string, "T"> | v.LiteralIssue | v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue | v.UnionIssue<v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue> | v.UnionIssue<v.LiteralIssue | v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue> | v.UnionIssue<v.LiteralIssue | v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue | v.UnionIssue<v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue>>> | v.VariantIssue)[]];
3657
+ };
3658
+ //# sourceMappingURL=parseHostToSandboxMessage.d.ts.map