@notionhq/custom-blocks-host 0.3.8 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +143 -225
  3. package/THIRD_PARTY_LICENSES.md +9 -0
  4. package/dist/autoBindProperties.d.ts +5 -2
  5. package/dist/autoBindProperties.d.ts.map +1 -1
  6. package/dist/autoBindProperties.js +5 -2
  7. package/dist/browser.js +1 -1
  8. package/dist/compatibility/addMetadataReadSchemasForProtocol3To4.d.ts +1215 -0
  9. package/dist/compatibility/addMetadataReadSchemasForProtocol3To4.d.ts.map +1 -0
  10. package/dist/compatibility/addMetadataReadSchemasForProtocol3To4.js +27 -0
  11. package/dist/compatibility/normalizeHostToSandboxMessage.d.ts +8 -0
  12. package/dist/compatibility/normalizeHostToSandboxMessage.d.ts.map +1 -0
  13. package/dist/compatibility/normalizeHostToSandboxMessage.js +39 -0
  14. package/dist/compatibility/normalizePageResultsForProtocol3To5.d.ts +11 -0
  15. package/dist/compatibility/normalizePageResultsForProtocol3To5.d.ts.map +1 -0
  16. package/dist/compatibility/normalizePageResultsForProtocol3To5.js +18 -0
  17. package/dist/compatibility/normalizePageResultsForProtocol6.d.ts +9 -0
  18. package/dist/compatibility/normalizePageResultsForProtocol6.d.ts.map +1 -0
  19. package/dist/compatibility/normalizePageResultsForProtocol6.js +18 -0
  20. package/dist/compatibility/normalizeSandboxToHostMessage.d.ts +1091 -0
  21. package/dist/compatibility/normalizeSandboxToHostMessage.d.ts.map +1 -0
  22. package/dist/compatibility/normalizeSandboxToHostMessage.js +9 -0
  23. package/dist/compatibility/pageForProtocol3To5.d.ts +159 -0
  24. package/dist/compatibility/pageForProtocol3To5.d.ts.map +1 -0
  25. package/dist/{lifecycle/legacyPage.js → compatibility/pageForProtocol3To5.js} +50 -9
  26. package/dist/compatibility/pageResult.d.ts +11 -0
  27. package/dist/compatibility/pageResult.d.ts.map +1 -0
  28. package/dist/compatibility/pageWithNullTextFallbackProperties.d.ts +9 -0
  29. package/dist/compatibility/pageWithNullTextFallbackProperties.d.ts.map +1 -0
  30. package/dist/compatibility/pageWithNullTextFallbackProperties.js +46 -0
  31. package/dist/createCustomBlockHost.d.ts +18 -19
  32. package/dist/createCustomBlockHost.d.ts.map +1 -1
  33. package/dist/createCustomBlockHost.js +103 -38
  34. package/dist/index.d.ts +2 -19
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +1 -2
  37. package/dist/{localBlockUrl.d.ts → isAllowedLocalPreviewUrl.d.ts} +2 -2
  38. package/dist/isAllowedLocalPreviewUrl.d.ts.map +1 -0
  39. package/dist/{localBlockUrl.js → isAllowedLocalPreviewUrl.js} +3 -7
  40. package/dist/lifecycle/initErrors.d.ts +1 -0
  41. package/dist/lifecycle/initErrors.d.ts.map +1 -1
  42. package/dist/lifecycle/initErrors.js +7 -0
  43. package/dist/lifecycle/initializationController.d.ts +6 -4
  44. package/dist/lifecycle/initializationController.d.ts.map +1 -1
  45. package/dist/lifecycle/initializationController.js +24 -15
  46. package/dist/lifecycle/resolveManifest.d.ts +13 -0
  47. package/dist/lifecycle/resolveManifest.d.ts.map +1 -0
  48. package/dist/lifecycle/resolveManifest.js +21 -0
  49. package/dist/lifecycle/types.d.ts +1637 -17
  50. package/dist/lifecycle/types.d.ts.map +1 -1
  51. package/dist/lifecycle/types.js +18 -0
  52. package/dist/messages/sandboxMessageRouter.d.ts.map +1 -1
  53. package/dist/messages/sandboxMessageRouter.js +2 -2
  54. package/dist/protocol/dataSources/dataSourcePage.d.ts +3 -4
  55. package/dist/protocol/dataSources/dataSourcePage.js +2 -3
  56. package/dist/protocol/index.d.ts +1 -0
  57. package/dist/protocol/index.js +1 -0
  58. package/dist/protocol/isLocalBlockServerUrl.d.ts +2 -0
  59. package/dist/protocol/isLocalBlockServerUrl.js +9 -0
  60. package/dist/protocol/messages/connect.d.ts +2 -2
  61. package/dist/protocol/messages/connect.js +2 -2
  62. package/dist/protocol/messages/createPageResult.d.ts +2 -2
  63. package/dist/protocol/messages/createPageResult.js +3 -3
  64. package/dist/protocol/messages/getPage.d.ts +2 -2
  65. package/dist/protocol/messages/getPage.js +3 -3
  66. package/dist/protocol/messages/hostToSandbox.d.ts +3 -3
  67. package/dist/protocol/messages/hostToSandbox.js +10 -10
  68. package/dist/protocol/messages/init.d.ts +1 -1
  69. package/dist/protocol/messages/queryDataSourceResult.d.ts +3 -3
  70. package/dist/protocol/messages/queryDataSourceResult.js +6 -3
  71. package/dist/protocol/messages/updatePageResult.d.ts +2 -2
  72. package/dist/protocol/messages/updatePageResult.js +3 -3
  73. package/dist/protocol/pages/page.d.ts +2 -2
  74. package/dist/protocol/pages/page.js +1 -1
  75. package/dist/protocol/protocolVersion.d.ts +3 -2
  76. package/dist/protocol/protocolVersion.js +4 -2
  77. package/dist/protocol.d.ts +9 -0
  78. package/dist/protocol.d.ts.map +1 -0
  79. package/dist/protocol.js +8 -0
  80. package/docs/bridge/changelog.md +67 -0
  81. package/docs/bridge/protocol.md +182 -0
  82. package/docs/bridge/versioning.md +38 -0
  83. package/docs/compatibility.md +68 -0
  84. package/docs/handlers.md +199 -0
  85. package/docs/lifecycle.md +117 -0
  86. package/package.json +11 -3
  87. package/src/autoBindProperties.ts +5 -2
  88. package/src/compatibility/addMetadataReadSchemasForProtocol3To4.ts +36 -0
  89. package/src/compatibility/normalizeHostToSandboxMessage.ts +54 -0
  90. package/src/compatibility/normalizePageResultsForProtocol3To5.ts +28 -0
  91. package/src/compatibility/normalizePageResultsForProtocol6.ts +23 -0
  92. package/src/compatibility/normalizeSandboxToHostMessage.ts +10 -0
  93. package/src/{lifecycle/legacyPage.ts → compatibility/pageForProtocol3To5.ts} +52 -11
  94. package/src/compatibility/pageResult.ts +18 -0
  95. package/src/compatibility/pageWithNullTextFallbackProperties.ts +53 -0
  96. package/src/createCustomBlockHost.ts +152 -62
  97. package/src/index.ts +4 -51
  98. package/src/{localBlockUrl.ts → isAllowedLocalPreviewUrl.ts} +4 -7
  99. package/src/lifecycle/initErrors.ts +9 -0
  100. package/src/lifecycle/initializationController.ts +34 -19
  101. package/src/lifecycle/resolveManifest.ts +31 -0
  102. package/src/lifecycle/types.ts +84 -16
  103. package/src/messages/sandboxMessageRouter.ts +2 -2
  104. package/src/protocol.ts +8 -0
  105. package/dist/lifecycle/legacyPage.d.ts +0 -70
  106. package/dist/lifecycle/legacyPage.d.ts.map +0 -1
  107. package/dist/lifecycle/loadCustomBlockManifest.d.ts +0 -16
  108. package/dist/lifecycle/loadCustomBlockManifest.d.ts.map +0 -1
  109. package/dist/lifecycle/loadCustomBlockManifest.js +0 -65
  110. package/dist/lifecycle/manifestOptions.d.ts +0 -17
  111. package/dist/lifecycle/manifestOptions.d.ts.map +0 -1
  112. package/dist/lifecycle/normalizeHostToSandboxMessage.d.ts +0 -6
  113. package/dist/lifecycle/normalizeHostToSandboxMessage.d.ts.map +0 -1
  114. package/dist/lifecycle/normalizeHostToSandboxMessage.js +0 -16
  115. package/dist/lifecycle/normalizePage.d.ts +0 -7
  116. package/dist/lifecycle/normalizePage.d.ts.map +0 -1
  117. package/dist/lifecycle/normalizePage.js +0 -22
  118. package/dist/localBlockUrl.d.ts.map +0 -1
  119. package/src/lifecycle/loadCustomBlockManifest.ts +0 -89
  120. package/src/lifecycle/manifestOptions.ts +0 -19
  121. package/src/lifecycle/normalizeHostToSandboxMessage.ts +0 -29
  122. package/src/lifecycle/normalizePage.ts +0 -35
  123. /package/dist/{lifecycle/manifestOptions.js → compatibility/pageResult.js} +0 -0
@@ -1,25 +1,114 @@
1
1
  import { notionDataSourceBindingsSchema } from "../protocol/dataSources/dataSource.js";
2
- import { type CustomBlockManifest } from "../protocol/manifest.js";
2
+ import { type CustomBlockManifest, manifestSchema } from "../protocol/manifest.js";
3
3
  import type { ConnectMessage } from "../protocol/messages/connect.js";
4
- import type { CustomBlockInitErrorInfo } from "../protocol/messages/init.js";
4
+ import { type CustomBlockInitErrorInfo } from "../protocol/messages/init.js";
5
5
  import * as v from "valibot";
6
+ import type { CustomBlockHostFailure } from "../messages/types.js";
7
+ /** Selects the manifest used to initialize a custom block. Both sources load independently. */
8
+ export type CustomBlockManifestSource =
9
+ /** Uses the persisted manifest returned by the host adapter's getPersistedManifest callback. */
10
+ "host"
11
+ /** Uses the manifest sent in connect by a sandbox on a separate HTTP(S) loopback origin. */
12
+ | "sandbox";
13
+ export declare const customBlockHostManifestResultSchema: v.VariantSchema<"status", [v.ObjectSchema<{
14
+ readonly status: v.LiteralSchema<"success", undefined>;
15
+ readonly manifest: v.ObjectSchema<{
16
+ readonly version: v.LiteralSchema<1, undefined>;
17
+ readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
18
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
19
+ readonly slashCommand: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
20
+ readonly icon: v.OptionalSchema<v.ObjectSchema<{
21
+ readonly type: v.LiteralSchema<"emoji", undefined>;
22
+ readonly emoji: v.StringSchema<undefined>;
23
+ }, undefined>, undefined>;
24
+ readonly dataSources: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
25
+ readonly name: v.StringSchema<undefined>;
26
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
27
+ readonly icon: v.OptionalSchema<v.VariantSchema<"type", [v.ObjectSchema<{
28
+ readonly type: v.LiteralSchema<"emoji", undefined>;
29
+ readonly emoji: v.StringSchema<undefined>;
30
+ }, undefined>, v.ObjectSchema<{
31
+ readonly type: v.LiteralSchema<"external", undefined>;
32
+ readonly url: v.StringSchema<undefined>;
33
+ }, undefined>], undefined>, undefined>;
34
+ readonly properties: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
35
+ readonly name: v.StringSchema<undefined>;
36
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
37
+ readonly type: v.PicklistSchema<readonly ["title", "rich_text", "number", "checkbox", "url", "email", "phone_number", "select", "multi_select", "status", "date", "people", "files", "unique_id", "relation", "place", "formula", "rollup", "button", "verification", "last_visited_time", "location", "created_time", "last_edited_time", "created_by", "last_edited_by"], undefined>;
38
+ }, undefined>, undefined>, {}>;
39
+ }, undefined>, undefined>, {}>;
40
+ }, undefined>;
41
+ }, undefined>, v.ObjectSchema<{
42
+ readonly status: v.LiteralSchema<"error", undefined>;
43
+ readonly error: v.ObjectSchema<{
44
+ readonly code: v.StringSchema<undefined>;
45
+ readonly message: v.StringSchema<undefined>;
46
+ readonly isRetryable: v.BooleanSchema<undefined>;
47
+ }, undefined>;
48
+ }, undefined>], undefined>;
49
+ /** A persisted manifest or an explicit loading error. The host validates and normalizes it. */
50
+ export type CustomBlockHostManifestResult = {
51
+ status: "success";
52
+ manifest: v.InferInput<typeof manifestSchema>;
53
+ } | {
54
+ status: "error";
55
+ error: CustomBlockInitErrorInfo;
56
+ };
57
+ export type CustomBlockHostNormalizedManifestResult = v.InferOutput<typeof customBlockHostManifestResultSchema>;
6
58
  export type ConnectSuccessMessage = Extract<ConnectMessage, {
7
59
  status: "success";
8
60
  }>;
9
- /** Tracks initialization and lifetime for one host instance. */
10
- export type InitStatus =
11
- /** The host is waiting for the sandbox's first `connect` message. */
12
- "waitingForConnect"
13
- /** The host is waiting for host state preparation to complete `init`. */
14
- | "preparingInit"
15
- /** The host is waiting for a matching `initResult` after it sends `init`. */
16
- | "waitingForInitResult"
17
- /** The host is initialized and can send live updates. */
18
- | "initialized"
19
- /** The host is in an error state after an initialization failure or timeout. */
20
- | "error"
21
- /** The host is stopped and no longer sends or accepts sandbox messages. */
22
- | "stopped";
61
+ /**
62
+ * Accepted lifecycle transitions for one host and iframe. The host reports
63
+ * waitingForConnect during creation. Handshake failures can skip intermediate
64
+ * statuses, and runtime failures can occur after initialization.
65
+ *
66
+ * failed and stopped are terminal. Stopping a failed host releases resources
67
+ * without replacing its failure status. Create a new host and iframe to retry.
68
+ */
69
+ export type CustomBlockHostStatus =
70
+ /** The host is listening for the sandbox's first connect message. */
71
+ {
72
+ status: "waitingForConnect";
73
+ }
74
+ /**
75
+ * The host accepted connect. The local manifest comes from a permitted
76
+ * local sandbox. It does not replace a selected persisted manifest.
77
+ */
78
+ | {
79
+ status: "preparingInit";
80
+ localManifest: CustomBlockManifest | undefined;
81
+ bridgeProtocolVersion: number;
82
+ sdkVersion: string;
83
+ }
84
+ /** Successful init has been sent. The host awaits its matching initResult. */
85
+ | {
86
+ status: "waitingForInitResult";
87
+ }
88
+ /**
89
+ * The sandbox acknowledged setup. resolvedManifest is the declaration selected by
90
+ * the host, and initialHeight is the sandbox's initial content height in CSS
91
+ * pixels. The height is optional.
92
+ */
93
+ | {
94
+ status: "initialized";
95
+ resolvedManifest: CustomBlockManifest;
96
+ initialHeight: number | undefined;
97
+ }
98
+ /**
99
+ * Initialization or runtime failed. error identifies the phase, reporting
100
+ * source, code, and whether a fresh host and iframe could plausibly succeed.
101
+ */
102
+ | {
103
+ status: "failed";
104
+ error: CustomBlockHostFailure;
105
+ }
106
+ /** The embedding application explicitly stopped the host and released its resources. */
107
+ | {
108
+ status: "stopped";
109
+ };
110
+ /** Internal lifecycle discriminant, shared with the public status contract. */
111
+ export type InitStatus = CustomBlockHostStatus["status"];
23
112
  export type CustomBlockHostDataSourcesPayload = {
24
113
  bindings: v.InferInput<typeof notionDataSourceBindingsSchema>;
25
114
  };
@@ -268,7 +357,1538 @@ export type CustomBlockHostInitialStateResult = {
268
357
  status: "error";
269
358
  error: CustomBlockInitErrorInfo;
270
359
  };
271
- /** Adapter-owned state; the runtime adds its selected manifest to init. */
360
+ export declare const customBlockHostPreparedStateResultSchema: v.VariantSchema<"status", [v.ObjectSchema<{
361
+ readonly status: v.LiteralSchema<"success", undefined>;
362
+ readonly initialState: Omit<v.ObjectSchema<{
363
+ readonly theme: v.PicklistSchema<["light", "dark"], undefined>;
364
+ /**
365
+ * Defaults to standard for existing host integrations.
366
+ * TODO(custom-blocks): Make this required when MIN_HOST_SUPPORTED_BRIDGE_PROTOCOL_VERSION increases to 4.
367
+ */
368
+ readonly contrastMode: v.OptionalSchema<v.PicklistSchema<["standard", "high"], undefined>, undefined>;
369
+ readonly blockId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionBlockId">]>;
370
+ readonly parent: v.VariantSchema<"type", [v.ObjectSchema<{
371
+ readonly type: v.LiteralSchema<"page_id", undefined>;
372
+ readonly page_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
373
+ }, undefined>, v.ObjectSchema<{
374
+ readonly type: v.LiteralSchema<"data_source_id", undefined>;
375
+ readonly data_source_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionDataSourceId">]>;
376
+ }, undefined>, v.ObjectSchema<{
377
+ readonly type: v.LiteralSchema<"workspace", undefined>;
378
+ readonly workspace: v.LiteralSchema<true, undefined>;
379
+ }, undefined>, v.ObjectSchema<{
380
+ readonly type: v.LiteralSchema<"block_id", undefined>;
381
+ readonly block_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionBlockId">]>;
382
+ }, undefined>, v.ObjectSchema<{
383
+ readonly type: v.LiteralSchema<"agent_id", undefined>;
384
+ readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
385
+ }, undefined>, v.ObjectSchema<{
386
+ readonly type: v.LiteralSchema<"unavailable", undefined>;
387
+ }, undefined>], undefined>;
388
+ readonly page: v.VariantSchema<"type", [v.ObjectSchema<{
389
+ readonly type: v.LiteralSchema<"unavailable", undefined>;
390
+ }, undefined>, v.ObjectSchema<{
391
+ readonly type: v.LiteralSchema<"page", undefined>;
392
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
393
+ readonly parent: v.VariantSchema<"type", [v.ObjectSchema<{
394
+ readonly type: v.LiteralSchema<"page_id", undefined>;
395
+ readonly page_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
396
+ }, undefined>, v.ObjectSchema<{
397
+ readonly type: v.LiteralSchema<"data_source_id", undefined>;
398
+ readonly data_source_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionDataSourceId">]>;
399
+ }, undefined>, v.ObjectSchema<{
400
+ readonly type: v.LiteralSchema<"workspace", undefined>;
401
+ readonly workspace: v.LiteralSchema<true, undefined>;
402
+ }, undefined>, v.ObjectSchema<{
403
+ readonly type: v.LiteralSchema<"block_id", undefined>;
404
+ readonly block_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionBlockId">]>;
405
+ }, undefined>, v.ObjectSchema<{
406
+ readonly type: v.LiteralSchema<"agent_id", undefined>;
407
+ readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
408
+ }, undefined>, v.ObjectSchema<{
409
+ readonly type: v.LiteralSchema<"unavailable", undefined>;
410
+ }, undefined>], undefined>;
411
+ }, undefined>], undefined>;
412
+ readonly manifest: v.ObjectSchema<{
413
+ readonly version: v.LiteralSchema<1, undefined>;
414
+ readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
415
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
416
+ readonly slashCommand: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
417
+ readonly icon: v.OptionalSchema<v.ObjectSchema<{
418
+ readonly type: v.LiteralSchema<"emoji", undefined>;
419
+ readonly emoji: v.StringSchema<undefined>;
420
+ }, undefined>, undefined>;
421
+ readonly dataSources: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
422
+ readonly name: v.StringSchema<undefined>;
423
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
424
+ readonly icon: v.OptionalSchema<v.VariantSchema<"type", [v.ObjectSchema<{
425
+ readonly type: v.LiteralSchema<"emoji", undefined>;
426
+ readonly emoji: v.StringSchema<undefined>;
427
+ }, undefined>, v.ObjectSchema<{
428
+ readonly type: v.LiteralSchema<"external", undefined>;
429
+ readonly url: v.StringSchema<undefined>;
430
+ }, undefined>], undefined>, undefined>;
431
+ readonly properties: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
432
+ readonly name: v.StringSchema<undefined>;
433
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
434
+ readonly type: v.PicklistSchema<readonly ["title", "rich_text", "number", "checkbox", "url", "email", "phone_number", "select", "multi_select", "status", "date", "people", "files", "unique_id", "relation", "place", "formula", "rollup", "button", "verification", "last_visited_time", "location", "created_time", "last_edited_time", "created_by", "last_edited_by"], undefined>;
435
+ }, undefined>, undefined>, {}>;
436
+ }, undefined>, undefined>, {}>;
437
+ }, undefined>;
438
+ readonly dataSources: v.ObjectSchema<{
439
+ readonly bindings: v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
440
+ readonly collectionPointer: v.OptionalSchema<v.ObjectSchema<{
441
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionDataSourceId">]>;
442
+ readonly table: v.StringSchema<undefined>;
443
+ readonly spaceId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionSpaceId">]>, undefined>;
444
+ }, undefined>, undefined>;
445
+ readonly collectionSchema: v.OptionalSchema<v.ObjectSchema<{
446
+ readonly id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionDataSourceId">]>, undefined>;
447
+ readonly propertiesById: v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
448
+ readonly name: v.StringSchema<undefined>;
449
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
450
+ readonly type: v.LiteralSchema<"title", undefined>;
451
+ }, undefined>, v.ObjectSchema<{
452
+ readonly name: v.StringSchema<undefined>;
453
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
454
+ readonly type: v.LiteralSchema<"rich_text", undefined>;
455
+ }, undefined>, v.ObjectSchema<{
456
+ readonly name: v.StringSchema<undefined>;
457
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
458
+ readonly type: v.LiteralSchema<"number", undefined>;
459
+ }, undefined>, v.ObjectSchema<{
460
+ readonly name: v.StringSchema<undefined>;
461
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
462
+ readonly type: v.LiteralSchema<"checkbox", undefined>;
463
+ }, undefined>, v.ObjectSchema<{
464
+ readonly name: v.StringSchema<undefined>;
465
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
466
+ readonly type: v.LiteralSchema<"url", undefined>;
467
+ }, undefined>, v.ObjectSchema<{
468
+ readonly name: v.StringSchema<undefined>;
469
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
470
+ readonly type: v.LiteralSchema<"email", undefined>;
471
+ }, undefined>, v.ObjectSchema<{
472
+ readonly name: v.StringSchema<undefined>;
473
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
474
+ readonly type: v.LiteralSchema<"phone_number", undefined>;
475
+ }, undefined>, v.ObjectSchema<{
476
+ readonly name: v.StringSchema<undefined>;
477
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
478
+ readonly type: v.LiteralSchema<"select", undefined>;
479
+ readonly options: v.ArraySchema<v.ObjectSchema<{
480
+ readonly id: v.StringSchema<undefined>;
481
+ readonly name: v.StringSchema<undefined>;
482
+ readonly color: v.OptionalSchema<v.PicklistSchema<["default", "gray", "brown", "orange", "yellow", "green", "blue", "purple", "pink", "red", "gray_background", "brown_background", "orange_background", "yellow_background", "green_background", "blue_background", "purple_background", "pink_background", "red_background", "default_background"], undefined>, undefined>;
483
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
484
+ }, undefined>, undefined>;
485
+ }, undefined>, v.ObjectSchema<{
486
+ readonly name: v.StringSchema<undefined>;
487
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
488
+ readonly type: v.LiteralSchema<"multi_select", undefined>;
489
+ readonly options: v.ArraySchema<v.ObjectSchema<{
490
+ readonly id: v.StringSchema<undefined>;
491
+ readonly name: v.StringSchema<undefined>;
492
+ readonly color: v.OptionalSchema<v.PicklistSchema<["default", "gray", "brown", "orange", "yellow", "green", "blue", "purple", "pink", "red", "gray_background", "brown_background", "orange_background", "yellow_background", "green_background", "blue_background", "purple_background", "pink_background", "red_background", "default_background"], undefined>, undefined>;
493
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
494
+ }, undefined>, undefined>;
495
+ }, undefined>, v.ObjectSchema<{
496
+ readonly name: v.StringSchema<undefined>;
497
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
498
+ readonly type: v.LiteralSchema<"status", undefined>;
499
+ readonly options: v.ArraySchema<v.ObjectSchema<{
500
+ readonly id: v.StringSchema<undefined>;
501
+ readonly name: v.StringSchema<undefined>;
502
+ readonly color: v.OptionalSchema<v.PicklistSchema<["default", "gray", "brown", "orange", "yellow", "green", "blue", "purple", "pink", "red", "gray_background", "brown_background", "orange_background", "yellow_background", "green_background", "blue_background", "purple_background", "pink_background", "red_background", "default_background"], undefined>, undefined>;
503
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
504
+ }, undefined>, undefined>;
505
+ readonly groups: v.ArraySchema<v.ObjectSchema<{
506
+ readonly id: v.StringSchema<undefined>;
507
+ readonly name: v.StringSchema<undefined>;
508
+ readonly color: v.OptionalSchema<v.PicklistSchema<["default", "gray", "brown", "orange", "yellow", "green", "blue", "purple", "pink", "red", "gray_background", "brown_background", "orange_background", "yellow_background", "green_background", "blue_background", "purple_background", "pink_background", "red_background", "default_background"], undefined>, undefined>;
509
+ readonly option_ids: v.ArraySchema<v.StringSchema<undefined>, undefined>;
510
+ }, undefined>, undefined>;
511
+ }, undefined>, v.ObjectSchema<{
512
+ readonly name: v.StringSchema<undefined>;
513
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
514
+ readonly type: v.LiteralSchema<"date", undefined>;
515
+ }, undefined>, v.ObjectSchema<{
516
+ readonly name: v.StringSchema<undefined>;
517
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
518
+ readonly type: v.LiteralSchema<"people", undefined>;
519
+ }, undefined>, v.ObjectSchema<{
520
+ readonly name: v.StringSchema<undefined>;
521
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
522
+ readonly type: v.LiteralSchema<"files", undefined>;
523
+ }, undefined>, v.ObjectSchema<{
524
+ readonly name: v.StringSchema<undefined>;
525
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
526
+ readonly type: v.LiteralSchema<"unique_id", undefined>;
527
+ }, undefined>, v.ObjectSchema<{
528
+ readonly name: v.StringSchema<undefined>;
529
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
530
+ readonly type: v.LiteralSchema<"relation", undefined>;
531
+ readonly data_source_id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
532
+ readonly dual_property: v.OptionalSchema<v.ObjectSchema<{
533
+ readonly synced_property_id: v.StringSchema<undefined>;
534
+ readonly synced_property_name: v.StringSchema<undefined>;
535
+ }, undefined>, undefined>;
536
+ }, undefined>, v.ObjectSchema<{
537
+ readonly name: v.StringSchema<undefined>;
538
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
539
+ readonly type: v.LiteralSchema<"place", undefined>;
540
+ }, undefined>, v.ObjectSchema<{
541
+ readonly name: v.StringSchema<undefined>;
542
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
543
+ readonly type: v.LiteralSchema<"formula", undefined>;
544
+ }, undefined>, v.ObjectSchema<{
545
+ readonly name: v.StringSchema<undefined>;
546
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
547
+ readonly type: v.LiteralSchema<"rollup", undefined>;
548
+ }, undefined>, v.ObjectSchema<{
549
+ readonly name: v.StringSchema<undefined>;
550
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
551
+ readonly type: v.LiteralSchema<"button", undefined>;
552
+ }, undefined>, v.ObjectSchema<{
553
+ readonly name: v.StringSchema<undefined>;
554
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
555
+ readonly type: v.LiteralSchema<"verification", undefined>;
556
+ }, undefined>, v.ObjectSchema<{
557
+ readonly name: v.StringSchema<undefined>;
558
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
559
+ readonly type: v.LiteralSchema<"last_visited_time", undefined>;
560
+ }, undefined>, v.ObjectSchema<{
561
+ readonly name: v.StringSchema<undefined>;
562
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
563
+ readonly type: v.LiteralSchema<"location", undefined>;
564
+ }, undefined>, v.ObjectSchema<{
565
+ readonly name: v.StringSchema<undefined>;
566
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
567
+ readonly type: v.LiteralSchema<"created_time", undefined>;
568
+ }, undefined>, v.ObjectSchema<{
569
+ readonly name: v.StringSchema<undefined>;
570
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
571
+ readonly type: v.LiteralSchema<"last_edited_time", undefined>;
572
+ }, undefined>, v.ObjectSchema<{
573
+ readonly name: v.StringSchema<undefined>;
574
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
575
+ readonly type: v.LiteralSchema<"created_by", undefined>;
576
+ }, undefined>, v.ObjectSchema<{
577
+ readonly name: v.StringSchema<undefined>;
578
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
579
+ readonly type: v.LiteralSchema<"last_edited_by", undefined>;
580
+ }, undefined>], undefined>, undefined>;
581
+ }, undefined>, undefined>;
582
+ readonly propertyIdsByKey: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.OptionalSchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>;
583
+ }, undefined>, undefined>;
584
+ }, undefined>;
585
+ readonly currentUser: v.ObjectSchema<{
586
+ readonly object: v.LiteralSchema<"user", undefined>;
587
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionUserId">]>;
588
+ readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
589
+ readonly avatar_url: v.NullableSchema<v.StringSchema<undefined>, undefined>;
590
+ readonly type: v.LiteralSchema<"person", undefined>;
591
+ readonly person: v.ObjectSchema<{
592
+ readonly email: v.StringSchema<undefined>;
593
+ }, undefined>;
594
+ }, undefined>;
595
+ }, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
596
+ readonly entries: Omit<{
597
+ readonly theme: v.PicklistSchema<["light", "dark"], undefined>;
598
+ /**
599
+ * Defaults to standard for existing host integrations.
600
+ * TODO(custom-blocks): Make this required when MIN_HOST_SUPPORTED_BRIDGE_PROTOCOL_VERSION increases to 4.
601
+ */
602
+ readonly contrastMode: v.OptionalSchema<v.PicklistSchema<["standard", "high"], undefined>, undefined>;
603
+ readonly blockId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionBlockId">]>;
604
+ readonly parent: v.VariantSchema<"type", [v.ObjectSchema<{
605
+ readonly type: v.LiteralSchema<"page_id", undefined>;
606
+ readonly page_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
607
+ }, undefined>, v.ObjectSchema<{
608
+ readonly type: v.LiteralSchema<"data_source_id", undefined>;
609
+ readonly data_source_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionDataSourceId">]>;
610
+ }, undefined>, v.ObjectSchema<{
611
+ readonly type: v.LiteralSchema<"workspace", undefined>;
612
+ readonly workspace: v.LiteralSchema<true, undefined>;
613
+ }, undefined>, v.ObjectSchema<{
614
+ readonly type: v.LiteralSchema<"block_id", undefined>;
615
+ readonly block_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionBlockId">]>;
616
+ }, undefined>, v.ObjectSchema<{
617
+ readonly type: v.LiteralSchema<"agent_id", undefined>;
618
+ readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
619
+ }, undefined>, v.ObjectSchema<{
620
+ readonly type: v.LiteralSchema<"unavailable", undefined>;
621
+ }, undefined>], undefined>;
622
+ readonly page: v.VariantSchema<"type", [v.ObjectSchema<{
623
+ readonly type: v.LiteralSchema<"unavailable", undefined>;
624
+ }, undefined>, v.ObjectSchema<{
625
+ readonly type: v.LiteralSchema<"page", undefined>;
626
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
627
+ readonly parent: v.VariantSchema<"type", [v.ObjectSchema<{
628
+ readonly type: v.LiteralSchema<"page_id", undefined>;
629
+ readonly page_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
630
+ }, undefined>, v.ObjectSchema<{
631
+ readonly type: v.LiteralSchema<"data_source_id", undefined>;
632
+ readonly data_source_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionDataSourceId">]>;
633
+ }, undefined>, v.ObjectSchema<{
634
+ readonly type: v.LiteralSchema<"workspace", undefined>;
635
+ readonly workspace: v.LiteralSchema<true, undefined>;
636
+ }, undefined>, v.ObjectSchema<{
637
+ readonly type: v.LiteralSchema<"block_id", undefined>;
638
+ readonly block_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionBlockId">]>;
639
+ }, undefined>, v.ObjectSchema<{
640
+ readonly type: v.LiteralSchema<"agent_id", undefined>;
641
+ readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
642
+ }, undefined>, v.ObjectSchema<{
643
+ readonly type: v.LiteralSchema<"unavailable", undefined>;
644
+ }, undefined>], undefined>;
645
+ }, undefined>], undefined>;
646
+ readonly manifest: v.ObjectSchema<{
647
+ readonly version: v.LiteralSchema<1, undefined>;
648
+ readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
649
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
650
+ readonly slashCommand: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
651
+ readonly icon: v.OptionalSchema<v.ObjectSchema<{
652
+ readonly type: v.LiteralSchema<"emoji", undefined>;
653
+ readonly emoji: v.StringSchema<undefined>;
654
+ }, undefined>, undefined>;
655
+ readonly dataSources: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
656
+ readonly name: v.StringSchema<undefined>;
657
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
658
+ readonly icon: v.OptionalSchema<v.VariantSchema<"type", [v.ObjectSchema<{
659
+ readonly type: v.LiteralSchema<"emoji", undefined>;
660
+ readonly emoji: v.StringSchema<undefined>;
661
+ }, undefined>, v.ObjectSchema<{
662
+ readonly type: v.LiteralSchema<"external", undefined>;
663
+ readonly url: v.StringSchema<undefined>;
664
+ }, undefined>], undefined>, undefined>;
665
+ readonly properties: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
666
+ readonly name: v.StringSchema<undefined>;
667
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
668
+ readonly type: v.PicklistSchema<readonly ["title", "rich_text", "number", "checkbox", "url", "email", "phone_number", "select", "multi_select", "status", "date", "people", "files", "unique_id", "relation", "place", "formula", "rollup", "button", "verification", "last_visited_time", "location", "created_time", "last_edited_time", "created_by", "last_edited_by"], undefined>;
669
+ }, undefined>, undefined>, {}>;
670
+ }, undefined>, undefined>, {}>;
671
+ }, undefined>;
672
+ readonly dataSources: v.ObjectSchema<{
673
+ readonly bindings: v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
674
+ readonly collectionPointer: v.OptionalSchema<v.ObjectSchema<{
675
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionDataSourceId">]>;
676
+ readonly table: v.StringSchema<undefined>;
677
+ readonly spaceId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionSpaceId">]>, undefined>;
678
+ }, undefined>, undefined>;
679
+ readonly collectionSchema: v.OptionalSchema<v.ObjectSchema<{
680
+ readonly id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionDataSourceId">]>, undefined>;
681
+ readonly propertiesById: v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
682
+ readonly name: v.StringSchema<undefined>;
683
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
684
+ readonly type: v.LiteralSchema<"title", undefined>;
685
+ }, undefined>, v.ObjectSchema<{
686
+ readonly name: v.StringSchema<undefined>;
687
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
688
+ readonly type: v.LiteralSchema<"rich_text", undefined>;
689
+ }, undefined>, v.ObjectSchema<{
690
+ readonly name: v.StringSchema<undefined>;
691
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
692
+ readonly type: v.LiteralSchema<"number", undefined>;
693
+ }, undefined>, v.ObjectSchema<{
694
+ readonly name: v.StringSchema<undefined>;
695
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
696
+ readonly type: v.LiteralSchema<"checkbox", undefined>;
697
+ }, undefined>, v.ObjectSchema<{
698
+ readonly name: v.StringSchema<undefined>;
699
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
700
+ readonly type: v.LiteralSchema<"url", undefined>;
701
+ }, undefined>, v.ObjectSchema<{
702
+ readonly name: v.StringSchema<undefined>;
703
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
704
+ readonly type: v.LiteralSchema<"email", undefined>;
705
+ }, undefined>, v.ObjectSchema<{
706
+ readonly name: v.StringSchema<undefined>;
707
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
708
+ readonly type: v.LiteralSchema<"phone_number", undefined>;
709
+ }, undefined>, v.ObjectSchema<{
710
+ readonly name: v.StringSchema<undefined>;
711
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
712
+ readonly type: v.LiteralSchema<"select", undefined>;
713
+ readonly options: v.ArraySchema<v.ObjectSchema<{
714
+ readonly id: v.StringSchema<undefined>;
715
+ readonly name: v.StringSchema<undefined>;
716
+ readonly color: v.OptionalSchema<v.PicklistSchema<["default", "gray", "brown", "orange", "yellow", "green", "blue", "purple", "pink", "red", "gray_background", "brown_background", "orange_background", "yellow_background", "green_background", "blue_background", "purple_background", "pink_background", "red_background", "default_background"], undefined>, undefined>;
717
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
718
+ }, undefined>, undefined>;
719
+ }, undefined>, v.ObjectSchema<{
720
+ readonly name: v.StringSchema<undefined>;
721
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
722
+ readonly type: v.LiteralSchema<"multi_select", undefined>;
723
+ readonly options: v.ArraySchema<v.ObjectSchema<{
724
+ readonly id: v.StringSchema<undefined>;
725
+ readonly name: v.StringSchema<undefined>;
726
+ readonly color: v.OptionalSchema<v.PicklistSchema<["default", "gray", "brown", "orange", "yellow", "green", "blue", "purple", "pink", "red", "gray_background", "brown_background", "orange_background", "yellow_background", "green_background", "blue_background", "purple_background", "pink_background", "red_background", "default_background"], undefined>, undefined>;
727
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
728
+ }, undefined>, undefined>;
729
+ }, undefined>, v.ObjectSchema<{
730
+ readonly name: v.StringSchema<undefined>;
731
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
732
+ readonly type: v.LiteralSchema<"status", undefined>;
733
+ readonly options: v.ArraySchema<v.ObjectSchema<{
734
+ readonly id: v.StringSchema<undefined>;
735
+ readonly name: v.StringSchema<undefined>;
736
+ readonly color: v.OptionalSchema<v.PicklistSchema<["default", "gray", "brown", "orange", "yellow", "green", "blue", "purple", "pink", "red", "gray_background", "brown_background", "orange_background", "yellow_background", "green_background", "blue_background", "purple_background", "pink_background", "red_background", "default_background"], undefined>, undefined>;
737
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
738
+ }, undefined>, undefined>;
739
+ readonly groups: v.ArraySchema<v.ObjectSchema<{
740
+ readonly id: v.StringSchema<undefined>;
741
+ readonly name: v.StringSchema<undefined>;
742
+ readonly color: v.OptionalSchema<v.PicklistSchema<["default", "gray", "brown", "orange", "yellow", "green", "blue", "purple", "pink", "red", "gray_background", "brown_background", "orange_background", "yellow_background", "green_background", "blue_background", "purple_background", "pink_background", "red_background", "default_background"], undefined>, undefined>;
743
+ readonly option_ids: v.ArraySchema<v.StringSchema<undefined>, undefined>;
744
+ }, undefined>, undefined>;
745
+ }, undefined>, v.ObjectSchema<{
746
+ readonly name: v.StringSchema<undefined>;
747
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
748
+ readonly type: v.LiteralSchema<"date", undefined>;
749
+ }, undefined>, v.ObjectSchema<{
750
+ readonly name: v.StringSchema<undefined>;
751
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
752
+ readonly type: v.LiteralSchema<"people", undefined>;
753
+ }, undefined>, v.ObjectSchema<{
754
+ readonly name: v.StringSchema<undefined>;
755
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
756
+ readonly type: v.LiteralSchema<"files", undefined>;
757
+ }, undefined>, v.ObjectSchema<{
758
+ readonly name: v.StringSchema<undefined>;
759
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
760
+ readonly type: v.LiteralSchema<"unique_id", undefined>;
761
+ }, undefined>, v.ObjectSchema<{
762
+ readonly name: v.StringSchema<undefined>;
763
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
764
+ readonly type: v.LiteralSchema<"relation", undefined>;
765
+ readonly data_source_id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
766
+ readonly dual_property: v.OptionalSchema<v.ObjectSchema<{
767
+ readonly synced_property_id: v.StringSchema<undefined>;
768
+ readonly synced_property_name: v.StringSchema<undefined>;
769
+ }, undefined>, undefined>;
770
+ }, undefined>, v.ObjectSchema<{
771
+ readonly name: v.StringSchema<undefined>;
772
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
773
+ readonly type: v.LiteralSchema<"place", undefined>;
774
+ }, undefined>, v.ObjectSchema<{
775
+ readonly name: v.StringSchema<undefined>;
776
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
777
+ readonly type: v.LiteralSchema<"formula", undefined>;
778
+ }, undefined>, v.ObjectSchema<{
779
+ readonly name: v.StringSchema<undefined>;
780
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
781
+ readonly type: v.LiteralSchema<"rollup", undefined>;
782
+ }, undefined>, v.ObjectSchema<{
783
+ readonly name: v.StringSchema<undefined>;
784
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
785
+ readonly type: v.LiteralSchema<"button", undefined>;
786
+ }, undefined>, v.ObjectSchema<{
787
+ readonly name: v.StringSchema<undefined>;
788
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
789
+ readonly type: v.LiteralSchema<"verification", undefined>;
790
+ }, undefined>, v.ObjectSchema<{
791
+ readonly name: v.StringSchema<undefined>;
792
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
793
+ readonly type: v.LiteralSchema<"last_visited_time", undefined>;
794
+ }, undefined>, v.ObjectSchema<{
795
+ readonly name: v.StringSchema<undefined>;
796
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
797
+ readonly type: v.LiteralSchema<"location", undefined>;
798
+ }, undefined>, v.ObjectSchema<{
799
+ readonly name: v.StringSchema<undefined>;
800
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
801
+ readonly type: v.LiteralSchema<"created_time", undefined>;
802
+ }, undefined>, v.ObjectSchema<{
803
+ readonly name: v.StringSchema<undefined>;
804
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
805
+ readonly type: v.LiteralSchema<"last_edited_time", undefined>;
806
+ }, undefined>, v.ObjectSchema<{
807
+ readonly name: v.StringSchema<undefined>;
808
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
809
+ readonly type: v.LiteralSchema<"created_by", undefined>;
810
+ }, undefined>, v.ObjectSchema<{
811
+ readonly name: v.StringSchema<undefined>;
812
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
813
+ readonly type: v.LiteralSchema<"last_edited_by", undefined>;
814
+ }, undefined>], undefined>, undefined>;
815
+ }, undefined>, undefined>;
816
+ readonly propertyIdsByKey: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.OptionalSchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>;
817
+ }, undefined>, undefined>;
818
+ }, undefined>;
819
+ readonly currentUser: v.ObjectSchema<{
820
+ readonly object: v.LiteralSchema<"user", undefined>;
821
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionUserId">]>;
822
+ readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
823
+ readonly avatar_url: v.NullableSchema<v.StringSchema<undefined>, undefined>;
824
+ readonly type: v.LiteralSchema<"person", undefined>;
825
+ readonly person: v.ObjectSchema<{
826
+ readonly email: v.StringSchema<undefined>;
827
+ }, undefined>;
828
+ }, undefined>;
829
+ }, "manifest">;
830
+ readonly "~standard": v.StandardProps<{
831
+ theme: "dark" | "light";
832
+ contrastMode?: "high" | "standard" | undefined;
833
+ blockId: string;
834
+ parent: {
835
+ type: "page_id";
836
+ page_id: string;
837
+ } | {
838
+ type: "data_source_id";
839
+ data_source_id: string;
840
+ } | {
841
+ type: "workspace";
842
+ workspace: true;
843
+ } | {
844
+ type: "block_id";
845
+ block_id: string;
846
+ } | {
847
+ type: "agent_id";
848
+ agent_id: string;
849
+ } | {
850
+ type: "unavailable";
851
+ };
852
+ page: {
853
+ type: "unavailable";
854
+ } | {
855
+ type: "page";
856
+ id: string;
857
+ parent: {
858
+ type: "page_id";
859
+ page_id: string;
860
+ } | {
861
+ type: "data_source_id";
862
+ data_source_id: string;
863
+ } | {
864
+ type: "workspace";
865
+ workspace: true;
866
+ } | {
867
+ type: "block_id";
868
+ block_id: string;
869
+ } | {
870
+ type: "agent_id";
871
+ agent_id: string;
872
+ } | {
873
+ type: "unavailable";
874
+ };
875
+ };
876
+ dataSources: {
877
+ bindings: {
878
+ [x: string]: {
879
+ collectionPointer?: {
880
+ id: string;
881
+ table: string;
882
+ spaceId?: string | undefined;
883
+ } | undefined;
884
+ collectionSchema?: {
885
+ id?: string | undefined;
886
+ propertiesById: {
887
+ [x: string]: {
888
+ name: string;
889
+ description?: string | undefined;
890
+ type: "title";
891
+ } | {
892
+ name: string;
893
+ description?: string | undefined;
894
+ type: "rich_text";
895
+ } | {
896
+ name: string;
897
+ description?: string | undefined;
898
+ type: "number";
899
+ } | {
900
+ name: string;
901
+ description?: string | undefined;
902
+ type: "checkbox";
903
+ } | {
904
+ name: string;
905
+ description?: string | undefined;
906
+ type: "url";
907
+ } | {
908
+ name: string;
909
+ description?: string | undefined;
910
+ type: "email";
911
+ } | {
912
+ name: string;
913
+ description?: string | undefined;
914
+ type: "phone_number";
915
+ } | {
916
+ name: string;
917
+ description?: string | undefined;
918
+ type: "select";
919
+ options: {
920
+ id: string;
921
+ name: string;
922
+ 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;
923
+ description?: string | undefined;
924
+ }[];
925
+ } | {
926
+ name: string;
927
+ description?: string | undefined;
928
+ type: "multi_select";
929
+ options: {
930
+ id: string;
931
+ name: string;
932
+ 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;
933
+ description?: string | undefined;
934
+ }[];
935
+ } | {
936
+ name: string;
937
+ description?: string | undefined;
938
+ type: "status";
939
+ options: {
940
+ id: string;
941
+ name: string;
942
+ 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;
943
+ description?: string | undefined;
944
+ }[];
945
+ groups: {
946
+ id: string;
947
+ name: string;
948
+ 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;
949
+ option_ids: string[];
950
+ }[];
951
+ } | {
952
+ name: string;
953
+ description?: string | undefined;
954
+ type: "date";
955
+ } | {
956
+ name: string;
957
+ description?: string | undefined;
958
+ type: "people";
959
+ } | {
960
+ name: string;
961
+ description?: string | undefined;
962
+ type: "files";
963
+ } | {
964
+ name: string;
965
+ description?: string | undefined;
966
+ type: "unique_id";
967
+ } | {
968
+ name: string;
969
+ description?: string | undefined;
970
+ type: "relation";
971
+ data_source_id?: string | undefined;
972
+ dual_property?: {
973
+ synced_property_id: string;
974
+ synced_property_name: string;
975
+ } | undefined;
976
+ } | {
977
+ name: string;
978
+ description?: string | undefined;
979
+ type: "place";
980
+ } | {
981
+ name: string;
982
+ description?: string | undefined;
983
+ type: "formula";
984
+ } | {
985
+ name: string;
986
+ description?: string | undefined;
987
+ type: "rollup";
988
+ } | {
989
+ name: string;
990
+ description?: string | undefined;
991
+ type: "button";
992
+ } | {
993
+ name: string;
994
+ description?: string | undefined;
995
+ type: "verification";
996
+ } | {
997
+ name: string;
998
+ description?: string | undefined;
999
+ type: "last_visited_time";
1000
+ } | {
1001
+ name: string;
1002
+ description?: string | undefined;
1003
+ type: "location";
1004
+ } | {
1005
+ name: string;
1006
+ description?: string | undefined;
1007
+ type: "created_time";
1008
+ } | {
1009
+ name: string;
1010
+ description?: string | undefined;
1011
+ type: "last_edited_time";
1012
+ } | {
1013
+ name: string;
1014
+ description?: string | undefined;
1015
+ type: "created_by";
1016
+ } | {
1017
+ name: string;
1018
+ description?: string | undefined;
1019
+ type: "last_edited_by";
1020
+ };
1021
+ };
1022
+ } | undefined;
1023
+ propertyIdsByKey?: {
1024
+ [x: string]: string | undefined;
1025
+ } | undefined;
1026
+ };
1027
+ };
1028
+ };
1029
+ currentUser: {
1030
+ object: "user";
1031
+ id: string;
1032
+ name?: string | undefined;
1033
+ avatar_url: string | null;
1034
+ type: "person";
1035
+ person: {
1036
+ email: string;
1037
+ };
1038
+ };
1039
+ }, {
1040
+ theme: "dark" | "light";
1041
+ contrastMode?: "high" | "standard" | undefined;
1042
+ blockId: string & v.Brand<"NotionBlockId">;
1043
+ parent: {
1044
+ type: "page_id";
1045
+ page_id: string & v.Brand<"NotionPageId">;
1046
+ } | {
1047
+ type: "data_source_id";
1048
+ data_source_id: string & v.Brand<"NotionDataSourceId">;
1049
+ } | {
1050
+ type: "workspace";
1051
+ workspace: true;
1052
+ } | {
1053
+ type: "block_id";
1054
+ block_id: string & v.Brand<"NotionBlockId">;
1055
+ } | {
1056
+ type: "agent_id";
1057
+ agent_id: string & v.Brand<"NotionAgentId">;
1058
+ } | {
1059
+ type: "unavailable";
1060
+ };
1061
+ page: {
1062
+ type: "unavailable";
1063
+ } | {
1064
+ type: "page";
1065
+ id: string & v.Brand<"NotionPageId">;
1066
+ parent: {
1067
+ type: "page_id";
1068
+ page_id: string & v.Brand<"NotionPageId">;
1069
+ } | {
1070
+ type: "data_source_id";
1071
+ data_source_id: string & v.Brand<"NotionDataSourceId">;
1072
+ } | {
1073
+ type: "workspace";
1074
+ workspace: true;
1075
+ } | {
1076
+ type: "block_id";
1077
+ block_id: string & v.Brand<"NotionBlockId">;
1078
+ } | {
1079
+ type: "agent_id";
1080
+ agent_id: string & v.Brand<"NotionAgentId">;
1081
+ } | {
1082
+ type: "unavailable";
1083
+ };
1084
+ };
1085
+ dataSources: {
1086
+ bindings: {
1087
+ [x: string]: {
1088
+ collectionPointer?: {
1089
+ id: string & v.Brand<"NotionDataSourceId">;
1090
+ table: string;
1091
+ spaceId?: (string & v.Brand<"NotionSpaceId">) | undefined;
1092
+ } | undefined;
1093
+ collectionSchema?: {
1094
+ id?: (string & v.Brand<"NotionDataSourceId">) | undefined;
1095
+ propertiesById: {
1096
+ [x: string]: {
1097
+ name: string;
1098
+ description?: string | undefined;
1099
+ type: "title";
1100
+ } | {
1101
+ name: string;
1102
+ description?: string | undefined;
1103
+ type: "rich_text";
1104
+ } | {
1105
+ name: string;
1106
+ description?: string | undefined;
1107
+ type: "number";
1108
+ } | {
1109
+ name: string;
1110
+ description?: string | undefined;
1111
+ type: "checkbox";
1112
+ } | {
1113
+ name: string;
1114
+ description?: string | undefined;
1115
+ type: "url";
1116
+ } | {
1117
+ name: string;
1118
+ description?: string | undefined;
1119
+ type: "email";
1120
+ } | {
1121
+ name: string;
1122
+ description?: string | undefined;
1123
+ type: "phone_number";
1124
+ } | {
1125
+ name: string;
1126
+ description?: string | undefined;
1127
+ type: "select";
1128
+ options: {
1129
+ id: string;
1130
+ name: string;
1131
+ 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;
1132
+ description?: string | undefined;
1133
+ }[];
1134
+ } | {
1135
+ name: string;
1136
+ description?: string | undefined;
1137
+ type: "multi_select";
1138
+ options: {
1139
+ id: string;
1140
+ name: string;
1141
+ 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;
1142
+ description?: string | undefined;
1143
+ }[];
1144
+ } | {
1145
+ name: string;
1146
+ description?: string | undefined;
1147
+ type: "status";
1148
+ options: {
1149
+ id: string;
1150
+ name: string;
1151
+ 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;
1152
+ description?: string | undefined;
1153
+ }[];
1154
+ groups: {
1155
+ id: string;
1156
+ name: string;
1157
+ 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;
1158
+ option_ids: string[];
1159
+ }[];
1160
+ } | {
1161
+ name: string;
1162
+ description?: string | undefined;
1163
+ type: "date";
1164
+ } | {
1165
+ name: string;
1166
+ description?: string | undefined;
1167
+ type: "people";
1168
+ } | {
1169
+ name: string;
1170
+ description?: string | undefined;
1171
+ type: "files";
1172
+ } | {
1173
+ name: string;
1174
+ description?: string | undefined;
1175
+ type: "unique_id";
1176
+ } | {
1177
+ name: string;
1178
+ description?: string | undefined;
1179
+ type: "relation";
1180
+ data_source_id?: string | undefined;
1181
+ dual_property?: {
1182
+ synced_property_id: string;
1183
+ synced_property_name: string;
1184
+ } | undefined;
1185
+ } | {
1186
+ name: string;
1187
+ description?: string | undefined;
1188
+ type: "place";
1189
+ } | {
1190
+ name: string;
1191
+ description?: string | undefined;
1192
+ type: "formula";
1193
+ } | {
1194
+ name: string;
1195
+ description?: string | undefined;
1196
+ type: "rollup";
1197
+ } | {
1198
+ name: string;
1199
+ description?: string | undefined;
1200
+ type: "button";
1201
+ } | {
1202
+ name: string;
1203
+ description?: string | undefined;
1204
+ type: "verification";
1205
+ } | {
1206
+ name: string;
1207
+ description?: string | undefined;
1208
+ type: "last_visited_time";
1209
+ } | {
1210
+ name: string;
1211
+ description?: string | undefined;
1212
+ type: "location";
1213
+ } | {
1214
+ name: string;
1215
+ description?: string | undefined;
1216
+ type: "created_time";
1217
+ } | {
1218
+ name: string;
1219
+ description?: string | undefined;
1220
+ type: "last_edited_time";
1221
+ } | {
1222
+ name: string;
1223
+ description?: string | undefined;
1224
+ type: "created_by";
1225
+ } | {
1226
+ name: string;
1227
+ description?: string | undefined;
1228
+ type: "last_edited_by";
1229
+ };
1230
+ };
1231
+ } | undefined;
1232
+ propertyIdsByKey?: {
1233
+ [x: string]: string | undefined;
1234
+ } | undefined;
1235
+ };
1236
+ };
1237
+ };
1238
+ currentUser: {
1239
+ object: "user";
1240
+ id: string & v.Brand<"NotionUserId">;
1241
+ name?: string | undefined;
1242
+ avatar_url: string | null;
1243
+ type: "person";
1244
+ person: {
1245
+ email: string;
1246
+ };
1247
+ };
1248
+ }>;
1249
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
1250
+ theme: "dark" | "light";
1251
+ contrastMode?: "high" | "standard" | undefined;
1252
+ blockId: string & v.Brand<"NotionBlockId">;
1253
+ parent: {
1254
+ type: "page_id";
1255
+ page_id: string & v.Brand<"NotionPageId">;
1256
+ } | {
1257
+ type: "data_source_id";
1258
+ data_source_id: string & v.Brand<"NotionDataSourceId">;
1259
+ } | {
1260
+ type: "workspace";
1261
+ workspace: true;
1262
+ } | {
1263
+ type: "block_id";
1264
+ block_id: string & v.Brand<"NotionBlockId">;
1265
+ } | {
1266
+ type: "agent_id";
1267
+ agent_id: string & v.Brand<"NotionAgentId">;
1268
+ } | {
1269
+ type: "unavailable";
1270
+ };
1271
+ page: {
1272
+ type: "unavailable";
1273
+ } | {
1274
+ type: "page";
1275
+ id: string & v.Brand<"NotionPageId">;
1276
+ parent: {
1277
+ type: "page_id";
1278
+ page_id: string & v.Brand<"NotionPageId">;
1279
+ } | {
1280
+ type: "data_source_id";
1281
+ data_source_id: string & v.Brand<"NotionDataSourceId">;
1282
+ } | {
1283
+ type: "workspace";
1284
+ workspace: true;
1285
+ } | {
1286
+ type: "block_id";
1287
+ block_id: string & v.Brand<"NotionBlockId">;
1288
+ } | {
1289
+ type: "agent_id";
1290
+ agent_id: string & v.Brand<"NotionAgentId">;
1291
+ } | {
1292
+ type: "unavailable";
1293
+ };
1294
+ };
1295
+ dataSources: {
1296
+ bindings: {
1297
+ [x: string]: {
1298
+ collectionPointer?: {
1299
+ id: string & v.Brand<"NotionDataSourceId">;
1300
+ table: string;
1301
+ spaceId?: (string & v.Brand<"NotionSpaceId">) | undefined;
1302
+ } | undefined;
1303
+ collectionSchema?: {
1304
+ id?: (string & v.Brand<"NotionDataSourceId">) | undefined;
1305
+ propertiesById: {
1306
+ [x: string]: {
1307
+ name: string;
1308
+ description?: string | undefined;
1309
+ type: "title";
1310
+ } | {
1311
+ name: string;
1312
+ description?: string | undefined;
1313
+ type: "rich_text";
1314
+ } | {
1315
+ name: string;
1316
+ description?: string | undefined;
1317
+ type: "number";
1318
+ } | {
1319
+ name: string;
1320
+ description?: string | undefined;
1321
+ type: "checkbox";
1322
+ } | {
1323
+ name: string;
1324
+ description?: string | undefined;
1325
+ type: "url";
1326
+ } | {
1327
+ name: string;
1328
+ description?: string | undefined;
1329
+ type: "email";
1330
+ } | {
1331
+ name: string;
1332
+ description?: string | undefined;
1333
+ type: "phone_number";
1334
+ } | {
1335
+ name: string;
1336
+ description?: string | undefined;
1337
+ type: "select";
1338
+ options: {
1339
+ id: string;
1340
+ name: string;
1341
+ 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;
1342
+ description?: string | undefined;
1343
+ }[];
1344
+ } | {
1345
+ name: string;
1346
+ description?: string | undefined;
1347
+ type: "multi_select";
1348
+ options: {
1349
+ id: string;
1350
+ name: string;
1351
+ 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;
1352
+ description?: string | undefined;
1353
+ }[];
1354
+ } | {
1355
+ name: string;
1356
+ description?: string | undefined;
1357
+ type: "status";
1358
+ options: {
1359
+ id: string;
1360
+ name: string;
1361
+ 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;
1362
+ description?: string | undefined;
1363
+ }[];
1364
+ groups: {
1365
+ id: string;
1366
+ name: string;
1367
+ 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;
1368
+ option_ids: string[];
1369
+ }[];
1370
+ } | {
1371
+ name: string;
1372
+ description?: string | undefined;
1373
+ type: "date";
1374
+ } | {
1375
+ name: string;
1376
+ description?: string | undefined;
1377
+ type: "people";
1378
+ } | {
1379
+ name: string;
1380
+ description?: string | undefined;
1381
+ type: "files";
1382
+ } | {
1383
+ name: string;
1384
+ description?: string | undefined;
1385
+ type: "unique_id";
1386
+ } | {
1387
+ name: string;
1388
+ description?: string | undefined;
1389
+ type: "relation";
1390
+ data_source_id?: string | undefined;
1391
+ dual_property?: {
1392
+ synced_property_id: string;
1393
+ synced_property_name: string;
1394
+ } | undefined;
1395
+ } | {
1396
+ name: string;
1397
+ description?: string | undefined;
1398
+ type: "place";
1399
+ } | {
1400
+ name: string;
1401
+ description?: string | undefined;
1402
+ type: "formula";
1403
+ } | {
1404
+ name: string;
1405
+ description?: string | undefined;
1406
+ type: "rollup";
1407
+ } | {
1408
+ name: string;
1409
+ description?: string | undefined;
1410
+ type: "button";
1411
+ } | {
1412
+ name: string;
1413
+ description?: string | undefined;
1414
+ type: "verification";
1415
+ } | {
1416
+ name: string;
1417
+ description?: string | undefined;
1418
+ type: "last_visited_time";
1419
+ } | {
1420
+ name: string;
1421
+ description?: string | undefined;
1422
+ type: "location";
1423
+ } | {
1424
+ name: string;
1425
+ description?: string | undefined;
1426
+ type: "created_time";
1427
+ } | {
1428
+ name: string;
1429
+ description?: string | undefined;
1430
+ type: "last_edited_time";
1431
+ } | {
1432
+ name: string;
1433
+ description?: string | undefined;
1434
+ type: "created_by";
1435
+ } | {
1436
+ name: string;
1437
+ description?: string | undefined;
1438
+ type: "last_edited_by";
1439
+ };
1440
+ };
1441
+ } | undefined;
1442
+ propertyIdsByKey?: {
1443
+ [x: string]: string | undefined;
1444
+ } | undefined;
1445
+ };
1446
+ };
1447
+ };
1448
+ currentUser: {
1449
+ object: "user";
1450
+ id: string & v.Brand<"NotionUserId">;
1451
+ name?: string | undefined;
1452
+ avatar_url: string | null;
1453
+ type: "person";
1454
+ person: {
1455
+ email: string;
1456
+ };
1457
+ };
1458
+ }, v.ArrayIssue | v.LiteralIssue | v.ObjectIssue | v.PicklistIssue | v.RecordIssue | v.StringIssue | v.VariantIssue>;
1459
+ readonly "~types"?: {
1460
+ readonly input: {
1461
+ theme: "dark" | "light";
1462
+ contrastMode?: "high" | "standard" | undefined;
1463
+ blockId: string;
1464
+ parent: {
1465
+ type: "page_id";
1466
+ page_id: string;
1467
+ } | {
1468
+ type: "data_source_id";
1469
+ data_source_id: string;
1470
+ } | {
1471
+ type: "workspace";
1472
+ workspace: true;
1473
+ } | {
1474
+ type: "block_id";
1475
+ block_id: string;
1476
+ } | {
1477
+ type: "agent_id";
1478
+ agent_id: string;
1479
+ } | {
1480
+ type: "unavailable";
1481
+ };
1482
+ page: {
1483
+ type: "unavailable";
1484
+ } | {
1485
+ type: "page";
1486
+ id: string;
1487
+ parent: {
1488
+ type: "page_id";
1489
+ page_id: string;
1490
+ } | {
1491
+ type: "data_source_id";
1492
+ data_source_id: string;
1493
+ } | {
1494
+ type: "workspace";
1495
+ workspace: true;
1496
+ } | {
1497
+ type: "block_id";
1498
+ block_id: string;
1499
+ } | {
1500
+ type: "agent_id";
1501
+ agent_id: string;
1502
+ } | {
1503
+ type: "unavailable";
1504
+ };
1505
+ };
1506
+ dataSources: {
1507
+ bindings: {
1508
+ [x: string]: {
1509
+ collectionPointer?: {
1510
+ id: string;
1511
+ table: string;
1512
+ spaceId?: string | undefined;
1513
+ } | undefined;
1514
+ collectionSchema?: {
1515
+ id?: string | undefined;
1516
+ propertiesById: {
1517
+ [x: string]: {
1518
+ name: string;
1519
+ description?: string | undefined;
1520
+ type: "title";
1521
+ } | {
1522
+ name: string;
1523
+ description?: string | undefined;
1524
+ type: "rich_text";
1525
+ } | {
1526
+ name: string;
1527
+ description?: string | undefined;
1528
+ type: "number";
1529
+ } | {
1530
+ name: string;
1531
+ description?: string | undefined;
1532
+ type: "checkbox";
1533
+ } | {
1534
+ name: string;
1535
+ description?: string | undefined;
1536
+ type: "url";
1537
+ } | {
1538
+ name: string;
1539
+ description?: string | undefined;
1540
+ type: "email";
1541
+ } | {
1542
+ name: string;
1543
+ description?: string | undefined;
1544
+ type: "phone_number";
1545
+ } | {
1546
+ name: string;
1547
+ description?: string | undefined;
1548
+ type: "select";
1549
+ options: {
1550
+ id: string;
1551
+ name: string;
1552
+ 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;
1553
+ description?: string | undefined;
1554
+ }[];
1555
+ } | {
1556
+ name: string;
1557
+ description?: string | undefined;
1558
+ type: "multi_select";
1559
+ options: {
1560
+ id: string;
1561
+ name: string;
1562
+ 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;
1563
+ description?: string | undefined;
1564
+ }[];
1565
+ } | {
1566
+ name: string;
1567
+ description?: string | undefined;
1568
+ type: "status";
1569
+ options: {
1570
+ id: string;
1571
+ name: string;
1572
+ 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;
1573
+ description?: string | undefined;
1574
+ }[];
1575
+ groups: {
1576
+ id: string;
1577
+ name: string;
1578
+ 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;
1579
+ option_ids: string[];
1580
+ }[];
1581
+ } | {
1582
+ name: string;
1583
+ description?: string | undefined;
1584
+ type: "date";
1585
+ } | {
1586
+ name: string;
1587
+ description?: string | undefined;
1588
+ type: "people";
1589
+ } | {
1590
+ name: string;
1591
+ description?: string | undefined;
1592
+ type: "files";
1593
+ } | {
1594
+ name: string;
1595
+ description?: string | undefined;
1596
+ type: "unique_id";
1597
+ } | {
1598
+ name: string;
1599
+ description?: string | undefined;
1600
+ type: "relation";
1601
+ data_source_id?: string | undefined;
1602
+ dual_property?: {
1603
+ synced_property_id: string;
1604
+ synced_property_name: string;
1605
+ } | undefined;
1606
+ } | {
1607
+ name: string;
1608
+ description?: string | undefined;
1609
+ type: "place";
1610
+ } | {
1611
+ name: string;
1612
+ description?: string | undefined;
1613
+ type: "formula";
1614
+ } | {
1615
+ name: string;
1616
+ description?: string | undefined;
1617
+ type: "rollup";
1618
+ } | {
1619
+ name: string;
1620
+ description?: string | undefined;
1621
+ type: "button";
1622
+ } | {
1623
+ name: string;
1624
+ description?: string | undefined;
1625
+ type: "verification";
1626
+ } | {
1627
+ name: string;
1628
+ description?: string | undefined;
1629
+ type: "last_visited_time";
1630
+ } | {
1631
+ name: string;
1632
+ description?: string | undefined;
1633
+ type: "location";
1634
+ } | {
1635
+ name: string;
1636
+ description?: string | undefined;
1637
+ type: "created_time";
1638
+ } | {
1639
+ name: string;
1640
+ description?: string | undefined;
1641
+ type: "last_edited_time";
1642
+ } | {
1643
+ name: string;
1644
+ description?: string | undefined;
1645
+ type: "created_by";
1646
+ } | {
1647
+ name: string;
1648
+ description?: string | undefined;
1649
+ type: "last_edited_by";
1650
+ };
1651
+ };
1652
+ } | undefined;
1653
+ propertyIdsByKey?: {
1654
+ [x: string]: string | undefined;
1655
+ } | undefined;
1656
+ };
1657
+ };
1658
+ };
1659
+ currentUser: {
1660
+ object: "user";
1661
+ id: string;
1662
+ name?: string | undefined;
1663
+ avatar_url: string | null;
1664
+ type: "person";
1665
+ person: {
1666
+ email: string;
1667
+ };
1668
+ };
1669
+ };
1670
+ readonly output: {
1671
+ theme: "dark" | "light";
1672
+ contrastMode?: "high" | "standard" | undefined;
1673
+ blockId: string & v.Brand<"NotionBlockId">;
1674
+ parent: {
1675
+ type: "page_id";
1676
+ page_id: string & v.Brand<"NotionPageId">;
1677
+ } | {
1678
+ type: "data_source_id";
1679
+ data_source_id: string & v.Brand<"NotionDataSourceId">;
1680
+ } | {
1681
+ type: "workspace";
1682
+ workspace: true;
1683
+ } | {
1684
+ type: "block_id";
1685
+ block_id: string & v.Brand<"NotionBlockId">;
1686
+ } | {
1687
+ type: "agent_id";
1688
+ agent_id: string & v.Brand<"NotionAgentId">;
1689
+ } | {
1690
+ type: "unavailable";
1691
+ };
1692
+ page: {
1693
+ type: "unavailable";
1694
+ } | {
1695
+ type: "page";
1696
+ id: string & v.Brand<"NotionPageId">;
1697
+ parent: {
1698
+ type: "page_id";
1699
+ page_id: string & v.Brand<"NotionPageId">;
1700
+ } | {
1701
+ type: "data_source_id";
1702
+ data_source_id: string & v.Brand<"NotionDataSourceId">;
1703
+ } | {
1704
+ type: "workspace";
1705
+ workspace: true;
1706
+ } | {
1707
+ type: "block_id";
1708
+ block_id: string & v.Brand<"NotionBlockId">;
1709
+ } | {
1710
+ type: "agent_id";
1711
+ agent_id: string & v.Brand<"NotionAgentId">;
1712
+ } | {
1713
+ type: "unavailable";
1714
+ };
1715
+ };
1716
+ dataSources: {
1717
+ bindings: {
1718
+ [x: string]: {
1719
+ collectionPointer?: {
1720
+ id: string & v.Brand<"NotionDataSourceId">;
1721
+ table: string;
1722
+ spaceId?: (string & v.Brand<"NotionSpaceId">) | undefined;
1723
+ } | undefined;
1724
+ collectionSchema?: {
1725
+ id?: (string & v.Brand<"NotionDataSourceId">) | undefined;
1726
+ propertiesById: {
1727
+ [x: string]: {
1728
+ name: string;
1729
+ description?: string | undefined;
1730
+ type: "title";
1731
+ } | {
1732
+ name: string;
1733
+ description?: string | undefined;
1734
+ type: "rich_text";
1735
+ } | {
1736
+ name: string;
1737
+ description?: string | undefined;
1738
+ type: "number";
1739
+ } | {
1740
+ name: string;
1741
+ description?: string | undefined;
1742
+ type: "checkbox";
1743
+ } | {
1744
+ name: string;
1745
+ description?: string | undefined;
1746
+ type: "url";
1747
+ } | {
1748
+ name: string;
1749
+ description?: string | undefined;
1750
+ type: "email";
1751
+ } | {
1752
+ name: string;
1753
+ description?: string | undefined;
1754
+ type: "phone_number";
1755
+ } | {
1756
+ name: string;
1757
+ description?: string | undefined;
1758
+ type: "select";
1759
+ options: {
1760
+ id: string;
1761
+ name: string;
1762
+ 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;
1763
+ description?: string | undefined;
1764
+ }[];
1765
+ } | {
1766
+ name: string;
1767
+ description?: string | undefined;
1768
+ type: "multi_select";
1769
+ options: {
1770
+ id: string;
1771
+ name: string;
1772
+ 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;
1773
+ description?: string | undefined;
1774
+ }[];
1775
+ } | {
1776
+ name: string;
1777
+ description?: string | undefined;
1778
+ type: "status";
1779
+ options: {
1780
+ id: string;
1781
+ name: string;
1782
+ 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;
1783
+ description?: string | undefined;
1784
+ }[];
1785
+ groups: {
1786
+ id: string;
1787
+ name: string;
1788
+ 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;
1789
+ option_ids: string[];
1790
+ }[];
1791
+ } | {
1792
+ name: string;
1793
+ description?: string | undefined;
1794
+ type: "date";
1795
+ } | {
1796
+ name: string;
1797
+ description?: string | undefined;
1798
+ type: "people";
1799
+ } | {
1800
+ name: string;
1801
+ description?: string | undefined;
1802
+ type: "files";
1803
+ } | {
1804
+ name: string;
1805
+ description?: string | undefined;
1806
+ type: "unique_id";
1807
+ } | {
1808
+ name: string;
1809
+ description?: string | undefined;
1810
+ type: "relation";
1811
+ data_source_id?: string | undefined;
1812
+ dual_property?: {
1813
+ synced_property_id: string;
1814
+ synced_property_name: string;
1815
+ } | undefined;
1816
+ } | {
1817
+ name: string;
1818
+ description?: string | undefined;
1819
+ type: "place";
1820
+ } | {
1821
+ name: string;
1822
+ description?: string | undefined;
1823
+ type: "formula";
1824
+ } | {
1825
+ name: string;
1826
+ description?: string | undefined;
1827
+ type: "rollup";
1828
+ } | {
1829
+ name: string;
1830
+ description?: string | undefined;
1831
+ type: "button";
1832
+ } | {
1833
+ name: string;
1834
+ description?: string | undefined;
1835
+ type: "verification";
1836
+ } | {
1837
+ name: string;
1838
+ description?: string | undefined;
1839
+ type: "last_visited_time";
1840
+ } | {
1841
+ name: string;
1842
+ description?: string | undefined;
1843
+ type: "location";
1844
+ } | {
1845
+ name: string;
1846
+ description?: string | undefined;
1847
+ type: "created_time";
1848
+ } | {
1849
+ name: string;
1850
+ description?: string | undefined;
1851
+ type: "last_edited_time";
1852
+ } | {
1853
+ name: string;
1854
+ description?: string | undefined;
1855
+ type: "created_by";
1856
+ } | {
1857
+ name: string;
1858
+ description?: string | undefined;
1859
+ type: "last_edited_by";
1860
+ };
1861
+ };
1862
+ } | undefined;
1863
+ propertyIdsByKey?: {
1864
+ [x: string]: string | undefined;
1865
+ } | undefined;
1866
+ };
1867
+ };
1868
+ };
1869
+ currentUser: {
1870
+ object: "user";
1871
+ id: string & v.Brand<"NotionUserId">;
1872
+ name?: string | undefined;
1873
+ avatar_url: string | null;
1874
+ type: "person";
1875
+ person: {
1876
+ email: string;
1877
+ };
1878
+ };
1879
+ };
1880
+ readonly issue: v.ArrayIssue | v.LiteralIssue | v.ObjectIssue | v.PicklistIssue | v.RecordIssue | v.StringIssue | v.VariantIssue;
1881
+ } | undefined;
1882
+ };
1883
+ }, undefined>, v.ObjectSchema<{
1884
+ readonly status: v.LiteralSchema<"error", undefined>;
1885
+ readonly error: v.ObjectSchema<{
1886
+ readonly code: v.StringSchema<undefined>;
1887
+ readonly message: v.StringSchema<undefined>;
1888
+ readonly isRetryable: v.BooleanSchema<undefined>;
1889
+ }, undefined>;
1890
+ }, undefined>], undefined>;
1891
+ /** Adapter-owned state or an explicit preparation error. The host adds the manifest to init. */
272
1892
  export type CustomBlockHostPreparedStateResult = {
273
1893
  status: "success";
274
1894
  initialState: Omit<CustomBlockHostInitialState, "manifest">;