@notionhq/custom-blocks 0.4.0 → 0.5.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 (129) hide show
  1. package/dist/bridge/SandboxBridge.d.ts +0 -16
  2. package/dist/bridge/SandboxBridge.d.ts.map +1 -1
  3. package/dist/bridge/SandboxBridge.js +0 -38
  4. package/dist/dataSources/bridge/resolveDataSourceQuery.js +3 -3
  5. package/dist/dataSources/bridge/resolveDataSources.js +4 -4
  6. package/dist/dataSources/filters/resolveFilter.d.ts.map +1 -1
  7. package/dist/dataSources/filters/resolveFilter.js +13 -3
  8. package/dist/dataSources/filters/types.d.ts +9 -3
  9. package/dist/dataSources/filters/types.d.ts.map +1 -1
  10. package/dist/dataSources/properties/resolvePropertyAddress.js +1 -1
  11. package/dist/dataSources/properties/resolvePropertyWriteMapForDataSource.js +1 -1
  12. package/dist/dataSources/resolvePageDataSource.js +2 -2
  13. package/dist/dataSources/subscribeToDataSource.d.ts +1 -4
  14. package/dist/dataSources/subscribeToDataSource.d.ts.map +1 -1
  15. package/dist/dataSources/subscribeToDataSource.js +2 -3
  16. package/dist/files/files.d.ts +2 -0
  17. package/dist/files/files.d.ts.map +1 -0
  18. package/dist/files/files.js +1 -0
  19. package/dist/files/icons.d.ts +2 -0
  20. package/dist/files/icons.d.ts.map +1 -0
  21. package/dist/files/icons.js +1 -0
  22. package/dist/index.d.ts +4 -4
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/initialization/getInitBindingError.js +2 -2
  25. package/dist/manifest/types.d.ts +4 -3
  26. package/dist/manifest/types.d.ts.map +1 -1
  27. package/dist/pages/bridge/getPageForDataSource.js +1 -1
  28. package/dist/pages/bridge/toNotionPageFieldsFromBridgePage.d.ts +4 -1
  29. package/dist/pages/bridge/toNotionPageFieldsFromBridgePage.d.ts.map +1 -1
  30. package/dist/pages/bridge/toNotionPagePropertyFromBridgeProperty.d.ts.map +1 -1
  31. package/dist/pages/bridge/toNotionPagePropertyFromBridgeProperty.js +0 -2
  32. package/dist/pages/bridge/updatePage.js +1 -1
  33. package/dist/pages/properties/getPropertyByKey.js +2 -2
  34. package/dist/pages/types.d.ts +8 -10
  35. package/dist/pages/types.d.ts.map +1 -1
  36. package/dist/protocol/compatibility/protocol3To10/dataSourceBindings.d.ts +530 -0
  37. package/dist/protocol/compatibility/protocol3To10/dataSourceBindings.js +25 -0
  38. package/dist/protocol/compatibility/protocol3To5/bridgePage.d.ts +6 -7
  39. package/dist/protocol/compatibility/protocol3To5/bridgePage.js +3 -3
  40. package/dist/protocol/context/containingPage.d.ts +3 -0
  41. package/dist/protocol/context/messages/pageChanged.d.ts +3 -0
  42. package/dist/protocol/context/messages/parentChanged.d.ts +3 -0
  43. package/dist/protocol/context/parent.d.ts +3 -0
  44. package/dist/protocol/context/parent.js +6 -1
  45. package/dist/protocol/dataSources/bridgeDataSourceBinding.d.ts +3 -7
  46. package/dist/protocol/dataSources/bridgeDataSourceBinding.js +5 -5
  47. package/dist/protocol/dataSources/bridgeDataSourceBindings.d.ts +2 -6
  48. package/dist/protocol/dataSources/{collectionPointer.d.ts → dataSourcePointer.d.ts} +2 -2
  49. package/dist/protocol/dataSources/{collectionPointer.js → dataSourcePointer.js} +1 -1
  50. package/dist/protocol/dataSources/{collectionSchema.d.ts → dataSourceSchema.d.ts} +2 -6
  51. package/dist/protocol/dataSources/{collectionSchema.js → dataSourceSchema.js} +1 -1
  52. package/dist/protocol/dataSources/filters/bridgeDataSourceFilter.d.ts +1458 -12
  53. package/dist/protocol/dataSources/filters/bridgeDataSourceFilterCondition.d.ts +729 -6
  54. package/dist/protocol/dataSources/filters/bridgeDataSourceFilterCondition.js +14 -2
  55. package/dist/protocol/dataSources/filters/peopleFilterOperator.d.ts +3 -3
  56. package/dist/protocol/dataSources/filters/peopleFilterOperator.js +1 -1
  57. package/dist/protocol/dataSources/filters/timestampFilterOperator.d.ts +354 -0
  58. package/dist/protocol/dataSources/filters/timestampFilterOperator.js +4 -0
  59. package/dist/protocol/dataSources/messages/dataSourcesChanged.d.ts +2 -6
  60. package/dist/protocol/dataSources/messages/queryDataSource.d.ts +1470 -26
  61. package/dist/protocol/dataSources/notionDataSource.d.ts +3 -11
  62. package/dist/protocol/dataSources/notionDataSource.js +5 -5
  63. package/dist/protocol/dataSources/properties/propertySchema.d.ts +4 -9
  64. package/dist/protocol/dataSources/properties/propertySchema.js +2 -4
  65. package/dist/protocol/dataSources/resolveDataSourceBinding.d.ts +4 -4
  66. package/dist/protocol/dataSources/resolveDataSourceBinding.js +2 -2
  67. package/dist/protocol/files.d.ts +32 -0
  68. package/dist/protocol/files.js +17 -0
  69. package/dist/protocol/handshake/connect.d.ts +1 -1
  70. package/dist/protocol/handshake/init.d.ts +9 -7
  71. package/dist/protocol/icons.d.ts +22 -7
  72. package/dist/protocol/icons.js +19 -7
  73. package/dist/protocol/index.d.ts +16 -14
  74. package/dist/protocol/index.js +10 -7
  75. package/dist/protocol/manifest/manifest.d.ts +9 -9
  76. package/dist/protocol/manifest/manifest.js +7 -7
  77. package/dist/protocol/messages/hostToSandbox.d.ts +100 -103
  78. package/dist/protocol/messages/sandboxToHost.d.ts +1471 -37
  79. package/dist/protocol/pages/bridgePage.d.ts +6 -7
  80. package/dist/protocol/pages/bridgePage.js +3 -3
  81. package/dist/protocol/pages/messages/createPage.d.ts +547 -40
  82. package/dist/protocol/pages/messages/createPage.js +27 -15
  83. package/dist/protocol/pages/messages/getPage.d.ts +18 -21
  84. package/dist/protocol/pages/messages/updatePage.d.ts +21 -28
  85. package/dist/protocol/pages/messages/updatePage.js +3 -3
  86. package/dist/protocol/pages/pageAppearance.d.ts +5 -59
  87. package/dist/protocol/pages/pageAppearance.js +11 -40
  88. package/dist/protocol/pages/properties/bridgePagePropertyMaps.d.ts +4 -12
  89. package/dist/protocol/pages/properties/bridgePagePropertyValue.d.ts +2 -6
  90. package/dist/protocol/pages/properties/bridgePagePropertyValue.js +2 -7
  91. package/dist/protocol/utils/ids.d.ts +2 -0
  92. package/dist/protocol/utils/ids.js +1 -0
  93. package/dist/protocol/utils/protocolVersion.d.ts +2 -1
  94. package/dist/protocol/utils/protocolVersion.js +3 -1
  95. package/dist/react/NotionCustomBlock.d.ts.map +1 -1
  96. package/dist/react/NotionCustomBlock.js +1 -15
  97. package/dist/utils/version.js +1 -1
  98. package/docs/data-sources.md +74 -76
  99. package/docs/deployment.md +4 -5
  100. package/docs/pages.md +91 -55
  101. package/package.json +1 -1
  102. package/src/bridge/SandboxBridge.ts +0 -55
  103. package/src/dataSources/bridge/resolveDataSourceQuery.ts +3 -3
  104. package/src/dataSources/bridge/resolveDataSources.ts +4 -4
  105. package/src/dataSources/filters/resolveFilter.ts +12 -3
  106. package/src/dataSources/filters/types.ts +7 -4
  107. package/src/dataSources/properties/resolvePropertyAddress.ts +1 -1
  108. package/src/dataSources/properties/resolvePropertyWriteMapForDataSource.ts +1 -1
  109. package/src/dataSources/resolvePageDataSource.ts +2 -2
  110. package/src/dataSources/subscribeToDataSource.ts +7 -19
  111. package/src/files/files.ts +5 -0
  112. package/src/files/icons.ts +9 -0
  113. package/src/index.ts +6 -11
  114. package/src/initialization/getInitBindingError.ts +2 -2
  115. package/src/manifest/types.ts +9 -3
  116. package/src/pages/bridge/getPageForDataSource.ts +1 -1
  117. package/src/pages/bridge/toNotionPagePropertyFromBridgeProperty.ts +0 -2
  118. package/src/pages/bridge/updatePage.ts +1 -1
  119. package/src/pages/properties/getPropertyByKey.ts +2 -2
  120. package/src/pages/types.ts +9 -13
  121. package/src/react/NotionCustomBlock.tsx +1 -16
  122. package/dist/protocol/dataSources/filters/createdByFilterOperator.d.ts +0 -17
  123. package/dist/protocol/dataSources/filters/createdByFilterOperator.js +0 -11
  124. package/dist/protocol/pages/properties/fileInput.d.ts +0 -16
  125. package/dist/protocol/pages/properties/fileInput.js +0 -16
  126. package/dist/react/DebugMessageLog.d.ts +0 -2
  127. package/dist/react/DebugMessageLog.d.ts.map +0 -1
  128. package/dist/react/DebugMessageLog.js +0 -23
  129. package/src/react/DebugMessageLog.tsx +0 -34
@@ -1,7 +1,7 @@
1
1
  import * as v from "valibot";
2
2
  export declare const notionDataSourceSchema: v.ObjectSchema<{
3
3
  readonly key: v.StringSchema<undefined>;
4
- readonly collectionPointer: v.OptionalSchema<v.ObjectSchema<{
4
+ readonly dataSourcePointer: v.OptionalSchema<v.ObjectSchema<{
5
5
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionDataSourceId">]>;
6
6
  readonly table: v.StringSchema<undefined>;
7
7
  readonly spaceId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionSpaceId">]>, undefined>;
@@ -11,7 +11,7 @@ export declare const notionDataSourceSchema: v.ObjectSchema<{
11
11
  * schema to validate filter and sort references. Undefined when the host does not provide a
12
12
  * database schema.
13
13
  */
14
- readonly collectionSchema: v.OptionalSchema<v.ObjectSchema<{
14
+ readonly dataSourceSchema: v.OptionalSchema<v.ObjectSchema<{
15
15
  readonly id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionDataSourceId">]>, undefined>;
16
16
  readonly propertiesById: v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
17
17
  readonly name: v.StringSchema<undefined>;
@@ -122,10 +122,6 @@ export declare const notionDataSourceSchema: v.ObjectSchema<{
122
122
  readonly name: v.StringSchema<undefined>;
123
123
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
124
124
  readonly type: v.LiteralSchema<"verification", undefined>;
125
- }, undefined>, v.ObjectSchema<{
126
- readonly name: v.StringSchema<undefined>;
127
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
128
- readonly type: v.LiteralSchema<"location", undefined>;
129
125
  }, undefined>, v.ObjectSchema<{
130
126
  readonly name: v.StringSchema<undefined>;
131
127
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
@@ -159,7 +155,7 @@ export declare const notionDataSourceSchema: v.ObjectSchema<{
159
155
  * database properties when the host provides their schema.
160
156
  *
161
157
  * Use `propertiesById` to read a value. Use this map to read the value's schema. Use
162
- * `collectionSchema` to validate filter and sort references.
158
+ * `dataSourceSchema` to validate filter and sort references.
163
159
  */
164
160
  readonly propertySchemasById: v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
165
161
  readonly name: v.StringSchema<undefined>;
@@ -270,10 +266,6 @@ export declare const notionDataSourceSchema: v.ObjectSchema<{
270
266
  readonly name: v.StringSchema<undefined>;
271
267
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
272
268
  readonly type: v.LiteralSchema<"verification", undefined>;
273
- }, undefined>, v.ObjectSchema<{
274
- readonly name: v.StringSchema<undefined>;
275
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
276
- readonly type: v.LiteralSchema<"location", undefined>;
277
269
  }, undefined>, v.ObjectSchema<{
278
270
  readonly name: v.StringSchema<undefined>;
279
271
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
@@ -1,16 +1,16 @@
1
1
  import * as v from "valibot";
2
- import { collectionPointerValidator } from "./collectionPointer.js";
3
- import { notionCollectionSchemaValidator } from "./collectionSchema.js";
2
+ import { dataSourcePointerValidator } from "./dataSourcePointer.js";
3
+ import { notionDataSourceSchemaValidator } from "./dataSourceSchema.js";
4
4
  import { notionPropertySchemaSchema } from "./properties/propertySchema.js";
5
5
  export const notionDataSourceSchema = v.object({
6
6
  key: v.string(),
7
- collectionPointer: v.optional(collectionPointerValidator),
7
+ dataSourcePointer: v.optional(dataSourcePointerValidator),
8
8
  /**
9
9
  * Describes database properties. Use this schema to resolve property bindings. Use this
10
10
  * schema to validate filter and sort references. Undefined when the host does not provide a
11
11
  * database schema.
12
12
  */
13
- collectionSchema: v.optional(notionCollectionSchemaValidator),
13
+ dataSourceSchema: v.optional(notionDataSourceSchemaValidator),
14
14
  /**
15
15
  * Maps user-defined property keys to database property IDs. Use this map to resolve a key
16
16
  * such as `name` to its database property ID. A value of `undefined` marks a declared
@@ -26,7 +26,7 @@ export const notionDataSourceSchema = v.object({
26
26
  * database properties when the host provides their schema.
27
27
  *
28
28
  * Use `propertiesById` to read a value. Use this map to read the value's schema. Use
29
- * `collectionSchema` to validate filter and sort references.
29
+ * `dataSourceSchema` to validate filter and sort references.
30
30
  */
31
31
  propertySchemasById: v.record(v.string(), notionPropertySchemaSchema),
32
32
  /**
@@ -29,13 +29,12 @@ export type NotionDualProperty = v.InferOutput<typeof notionDualPropertySchema>;
29
29
  * Every Notion property type the bridge speaks, in a single readable list.
30
30
  * Mirrors the Notion public API
31
31
  * [property object](https://developers.notion.com/reference/property-object)
32
- * type field. Internal-only types (`button`, `verification`,
33
- * `location`) and the four built-ins (`created_time`,
32
+ * type field. Internal-only types (`button`, `verification`) and the four built-ins (`created_time`,
34
33
  * `last_edited_time`, `created_by`, `last_edited_by`) are included under their
35
34
  * bridge-native names.
36
35
  */
37
- export declare const NOTION_PROPERTY_TYPES: 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", "location", "created_time", "last_edited_time", "created_by", "last_edited_by"];
38
- export declare const notionPropertyTypeSchema: 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", "location", "created_time", "last_edited_time", "created_by", "last_edited_by"], undefined>;
36
+ export declare const NOTION_PROPERTY_TYPES: 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", "created_time", "last_edited_time", "created_by", "last_edited_by"];
37
+ export declare const notionPropertyTypeSchema: 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", "created_time", "last_edited_time", "created_by", "last_edited_by"], undefined>;
39
38
  /**
40
39
  * String literal union of every supported Notion property type. Same set as
41
40
  * the discriminator in `NotionPropertySchema` — split out so the manifest
@@ -48,7 +47,7 @@ export type NotionPropertyType = v.InferOutput<typeof notionPropertyTypeSchema>;
48
47
  * Keep this list narrower than {@link NOTION_PROPERTY_TYPES} when a property
49
48
  * type is exposed but its sort value is not yet represented by every host.
50
49
  */
51
- export declare const CUSTOM_BLOCK_DATA_SOURCE_SORTABLE_PROPERTY_TYPES: readonly ["title", "rich_text", "number", "checkbox", "url", "email", "phone_number", "date", "created_time", "last_edited_time", "people", "created_by"];
50
+ export declare const CUSTOM_BLOCK_DATA_SOURCE_SORTABLE_PROPERTY_TYPES: readonly ["title", "rich_text", "number", "checkbox", "url", "email", "phone_number", "date", "created_time", "last_edited_time", "people", "created_by", "last_edited_by"];
52
51
  export type CustomBlockDataSourceSortablePropertyType = (typeof CUSTOM_BLOCK_DATA_SOURCE_SORTABLE_PROPERTY_TYPES)[number];
53
52
  /**
54
53
  * Per-property schema as exposed by the host over the custom-block bridge.
@@ -163,10 +162,6 @@ export declare const notionPropertySchemaSchema: v.VariantSchema<"type", [v.Obje
163
162
  readonly name: v.StringSchema<undefined>;
164
163
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
165
164
  readonly type: v.LiteralSchema<"verification", undefined>;
166
- }, undefined>, v.ObjectSchema<{
167
- readonly name: v.StringSchema<undefined>;
168
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
169
- readonly type: v.LiteralSchema<"location", undefined>;
170
165
  }, undefined>, v.ObjectSchema<{
171
166
  readonly name: v.StringSchema<undefined>;
172
167
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
@@ -50,8 +50,7 @@ const baseProp = v.object({
50
50
  * Every Notion property type the bridge speaks, in a single readable list.
51
51
  * Mirrors the Notion public API
52
52
  * [property object](https://developers.notion.com/reference/property-object)
53
- * type field. Internal-only types (`button`, `verification`,
54
- * `location`) and the four built-ins (`created_time`,
53
+ * type field. Internal-only types (`button`, `verification`) and the four built-ins (`created_time`,
55
54
  * `last_edited_time`, `created_by`, `last_edited_by`) are included under their
56
55
  * bridge-native names.
57
56
  */
@@ -76,7 +75,6 @@ export const NOTION_PROPERTY_TYPES = [
76
75
  "rollup",
77
76
  "button",
78
77
  "verification",
79
- "location",
80
78
  "created_time",
81
79
  "last_edited_time",
82
80
  "created_by",
@@ -101,6 +99,7 @@ export const CUSTOM_BLOCK_DATA_SOURCE_SORTABLE_PROPERTY_TYPES = [
101
99
  "last_edited_time",
102
100
  "people",
103
101
  "created_by",
102
+ "last_edited_by",
104
103
  ];
105
104
  /**
106
105
  * Per-property schema as exposed by the host over the custom-block bridge.
@@ -146,7 +145,6 @@ export const notionPropertySchemaSchema = v.variant("type", [
146
145
  // Internal-only types passed through under their bridge-native names.
147
146
  v.object({ ...baseProp.entries, type: v.literal("button") }),
148
147
  v.object({ ...baseProp.entries, type: v.literal("verification") }),
149
- v.object({ ...baseProp.entries, type: v.literal("location") }),
150
148
  // Synthetic built-ins. The host always emits one of each per data source.
151
149
  v.object({ ...baseProp.entries, type: v.literal("created_time") }),
152
150
  v.object({ ...baseProp.entries, type: v.literal("last_edited_time") }),
@@ -1,5 +1,5 @@
1
- import type { ManifestDataSource } from "../manifest/manifest.js";
2
- import type { NotionCollectionSchema } from "./collectionSchema.js";
1
+ import type { BridgeManifestDataSource } from "../manifest/manifest.js";
2
+ import type { NotionDataSourceSchema } from "./dataSourceSchema.js";
3
3
  export type MappedPropertyBinding = {
4
4
  status: "mapped";
5
5
  propertyKey: string;
@@ -26,7 +26,7 @@ export type ResolvedDataSourceBinding = {
26
26
  * Each boundary calls this independently and chooses its own errors or UI behavior.
27
27
  */
28
28
  export declare function resolveDataSourceBinding(args: {
29
- manifestDataSource: ManifestDataSource;
30
- collectionSchema: Pick<NotionCollectionSchema, "propertiesById"> | undefined;
29
+ manifestDataSource: BridgeManifestDataSource;
30
+ dataSourceSchema: Pick<NotionDataSourceSchema, "propertiesById"> | undefined;
31
31
  propertyIdsByKey: Record<string, string | undefined> | undefined;
32
32
  }): ResolvedDataSourceBinding;
@@ -7,10 +7,10 @@ export function resolveDataSourceBinding(args) {
7
7
  const propertyId = args.propertyIdsByKey?.[propertyKey];
8
8
  const mappedSchema = propertyId === undefined
9
9
  ? undefined
10
- : args.collectionSchema?.propertiesById[propertyId];
10
+ : args.dataSourceSchema?.propertiesById[propertyId];
11
11
  return resolvePropertyBinding(propertyKey, propertyId, mappedSchema?.type, property.type);
12
12
  });
13
- if (args.collectionSchema === undefined) {
13
+ if (args.dataSourceSchema === undefined) {
14
14
  return { status: "missing_schema", properties };
15
15
  }
16
16
  if (properties.every(property => property.status === "mapped")) {
@@ -0,0 +1,32 @@
1
+ import * as v from "valibot";
2
+ export declare const bridgeExternalFileSchema: v.ObjectSchema<{
3
+ readonly type: v.LiteralSchema<"external", undefined>;
4
+ readonly external: v.ObjectSchema<{
5
+ readonly url: v.StringSchema<undefined>;
6
+ }, undefined>;
7
+ }, undefined>;
8
+ export type BridgeExternalFile = v.InferOutput<typeof bridgeExternalFileSchema>;
9
+ export declare const bridgeNotionHostedFileSchema: v.ObjectSchema<{
10
+ readonly type: v.LiteralSchema<"file", undefined>;
11
+ readonly file: v.ObjectSchema<{
12
+ readonly url: v.StringSchema<undefined>;
13
+ readonly expiry_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
14
+ }, undefined>;
15
+ }, undefined>;
16
+ export type BridgeNotionHostedFile = v.InferOutput<typeof bridgeNotionHostedFileSchema>;
17
+ /** Property entries add a display label stored in Notion, independent of the file URL. */
18
+ export declare const bridgeFilePropertyItemSchema: v.UnionSchema<[v.ObjectSchema<{
19
+ readonly type: v.LiteralSchema<"external", undefined>;
20
+ readonly external: v.ObjectSchema<{
21
+ readonly url: v.StringSchema<undefined>;
22
+ }, undefined>;
23
+ readonly name: v.StringSchema<undefined>;
24
+ }, undefined>, v.ObjectSchema<{
25
+ readonly type: v.LiteralSchema<"file", undefined>;
26
+ readonly file: v.ObjectSchema<{
27
+ readonly url: v.StringSchema<undefined>;
28
+ readonly expiry_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
29
+ }, undefined>;
30
+ readonly name: v.StringSchema<undefined>;
31
+ }, undefined>], undefined>;
32
+ export type BridgeFilePropertyItem = v.InferOutput<typeof bridgeFilePropertyItemSchema>;
@@ -0,0 +1,17 @@
1
+ import * as v from "valibot";
2
+ export const bridgeExternalFileSchema = v.object({
3
+ type: v.literal("external"),
4
+ external: v.object({ url: v.string() }),
5
+ });
6
+ export const bridgeNotionHostedFileSchema = v.object({
7
+ type: v.literal("file"),
8
+ file: v.object({
9
+ url: v.string(),
10
+ expiry_time: v.optional(v.string()),
11
+ }),
12
+ });
13
+ /** Property entries add a display label stored in Notion, independent of the file URL. */
14
+ export const bridgeFilePropertyItemSchema = v.union([
15
+ v.object({ ...bridgeExternalFileSchema.entries, name: v.string() }),
16
+ v.object({ ...bridgeNotionHostedFileSchema.entries, name: v.string() }),
17
+ ]);
@@ -35,7 +35,7 @@ export declare const connectMessageSchema: v.VariantSchema<"status", [v.ObjectSc
35
35
  readonly properties: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
36
36
  readonly name: v.StringSchema<undefined>;
37
37
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
38
- 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", "location", "created_time", "last_edited_time", "created_by", "last_edited_by"], undefined>;
38
+ 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", "created_time", "last_edited_time", "created_by", "last_edited_by"], undefined>;
39
39
  }, undefined>, undefined>, {}>;
40
40
  }, undefined>, undefined>, {}>;
41
41
  readonly pages: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
@@ -50,6 +50,9 @@ export declare const initMessageSchema: v.VariantSchema<"status", [v.ObjectSchem
50
50
  }, undefined>, v.ObjectSchema<{
51
51
  readonly type: v.LiteralSchema<"agent_id", undefined>;
52
52
  readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
53
+ }, undefined>, v.ObjectSchema<{
54
+ readonly type: v.LiteralSchema<"app_installation_id", undefined>;
55
+ readonly app_installation_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAppInstallationId">]>;
53
56
  }, undefined>, v.ObjectSchema<{
54
57
  readonly type: v.LiteralSchema<"unavailable", undefined>;
55
58
  }, undefined>], undefined>;
@@ -73,6 +76,9 @@ export declare const initMessageSchema: v.VariantSchema<"status", [v.ObjectSchem
73
76
  }, undefined>, v.ObjectSchema<{
74
77
  readonly type: v.LiteralSchema<"agent_id", undefined>;
75
78
  readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
79
+ }, undefined>, v.ObjectSchema<{
80
+ readonly type: v.LiteralSchema<"app_installation_id", undefined>;
81
+ readonly app_installation_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAppInstallationId">]>;
76
82
  }, undefined>, v.ObjectSchema<{
77
83
  readonly type: v.LiteralSchema<"unavailable", undefined>;
78
84
  }, undefined>], undefined>;
@@ -99,7 +105,7 @@ export declare const initMessageSchema: v.VariantSchema<"status", [v.ObjectSchem
99
105
  readonly properties: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
100
106
  readonly name: v.StringSchema<undefined>;
101
107
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
102
- 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", "location", "created_time", "last_edited_time", "created_by", "last_edited_by"], undefined>;
108
+ 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", "created_time", "last_edited_time", "created_by", "last_edited_by"], undefined>;
103
109
  }, undefined>, undefined>, {}>;
104
110
  }, undefined>, undefined>, {}>;
105
111
  readonly pages: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
@@ -120,12 +126,12 @@ export declare const initMessageSchema: v.VariantSchema<"status", [v.ObjectSchem
120
126
  }, undefined>;
121
127
  readonly dataSources: v.ObjectSchema<{
122
128
  readonly bindings: v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
123
- readonly collectionPointer: v.OptionalSchema<v.ObjectSchema<{
129
+ readonly dataSourcePointer: v.OptionalSchema<v.ObjectSchema<{
124
130
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionDataSourceId">]>;
125
131
  readonly table: v.StringSchema<undefined>;
126
132
  readonly spaceId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionSpaceId">]>, undefined>;
127
133
  }, undefined>, undefined>;
128
- readonly collectionSchema: v.OptionalSchema<v.ObjectSchema<{
134
+ readonly dataSourceSchema: v.OptionalSchema<v.ObjectSchema<{
129
135
  readonly id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionDataSourceId">]>, undefined>;
130
136
  readonly propertiesById: v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
131
137
  readonly name: v.StringSchema<undefined>;
@@ -236,10 +242,6 @@ export declare const initMessageSchema: v.VariantSchema<"status", [v.ObjectSchem
236
242
  readonly name: v.StringSchema<undefined>;
237
243
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
238
244
  readonly type: v.LiteralSchema<"verification", undefined>;
239
- }, undefined>, v.ObjectSchema<{
240
- readonly name: v.StringSchema<undefined>;
241
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
242
- readonly type: v.LiteralSchema<"location", undefined>;
243
245
  }, undefined>, v.ObjectSchema<{
244
246
  readonly name: v.StringSchema<undefined>;
245
247
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
@@ -1,17 +1,32 @@
1
1
  import * as v from "valibot";
2
2
  /** Icon names stay open as hosts add to their catalogs. */
3
- export declare const notionIconNameSchema: v.StringSchema<undefined>;
4
- export type NotionIconName = v.InferOutput<typeof notionIconNameSchema>;
5
- declare const knownNotionIconColorSchema: v.PicklistSchema<["gray", "lightgray", "brown", "yellow", "orange", "green", "blue", "purple", "pink", "red"], undefined>;
3
+ export declare const bridgeIconNameSchema: v.StringSchema<undefined>;
4
+ export type BridgeIconName = v.InferOutput<typeof bridgeIconNameSchema>;
5
+ declare const knownBridgeIconColorSchema: v.PicklistSchema<["gray", "lightgray", "brown", "yellow", "orange", "green", "blue", "purple", "pink", "red"], undefined>;
6
6
  /** Known colors remain discoverable while reads and writes accept future colors. */
7
- export type NotionIconColor = v.InferOutput<typeof knownNotionIconColorSchema> | (string & {});
8
- export declare const notionIconColorSchema: v.GenericSchema<NotionIconColor>;
7
+ export type BridgeIconColor = v.InferOutput<typeof knownBridgeIconColorSchema> | (string & {});
8
+ export declare const bridgeIconColorSchema: v.GenericSchema<BridgeIconColor>;
9
9
  /** Reads and writes share an open shape; hosts resolve names and default omitted colors. */
10
- export declare const notionNativeIconSchema: v.LooseObjectSchema<{
10
+ export declare const bridgeIconSchema: v.LooseObjectSchema<{
11
11
  readonly type: v.LiteralSchema<"icon", undefined>;
12
12
  readonly icon: v.LooseObjectSchema<{
13
13
  readonly name: v.StringSchema<undefined>;
14
- readonly color: v.OptionalSchema<v.GenericSchema<NotionIconColor>, undefined>;
14
+ readonly color: v.OptionalSchema<v.GenericSchema<BridgeIconColor>, undefined>;
15
15
  }, undefined>;
16
16
  }, undefined>;
17
+ export type BridgeIcon = v.InferOutput<typeof bridgeIconSchema>;
18
+ export declare const bridgeEmojiSchema: v.ObjectSchema<{
19
+ readonly type: v.LiteralSchema<"emoji", undefined>;
20
+ readonly emoji: v.StringSchema<undefined>;
21
+ }, undefined>;
22
+ export type BridgeEmoji = v.InferOutput<typeof bridgeEmojiSchema>;
23
+ export declare const bridgeCustomEmojiSchema: v.ObjectSchema<{
24
+ readonly type: v.LiteralSchema<"custom_emoji", undefined>;
25
+ readonly custom_emoji: v.ObjectSchema<{
26
+ readonly id: v.StringSchema<undefined>;
27
+ readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
28
+ readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
29
+ }, undefined>;
30
+ }, undefined>;
31
+ export type BridgeCustomEmoji = v.InferOutput<typeof bridgeCustomEmojiSchema>;
17
32
  export {};
@@ -1,7 +1,7 @@
1
1
  import * as v from "valibot";
2
2
  /** Icon names stay open as hosts add to their catalogs. */
3
- export const notionIconNameSchema = v.string();
4
- const knownNotionIconColorSchema = v.picklist([
3
+ export const bridgeIconNameSchema = v.string();
4
+ const knownBridgeIconColorSchema = v.picklist([
5
5
  "gray",
6
6
  "lightgray",
7
7
  "brown",
@@ -13,15 +13,27 @@ const knownNotionIconColorSchema = v.picklist([
13
13
  "pink",
14
14
  "red",
15
15
  ]);
16
- export const notionIconColorSchema = v.union([
17
- knownNotionIconColorSchema,
16
+ export const bridgeIconColorSchema = v.union([
17
+ knownBridgeIconColorSchema,
18
18
  v.string(),
19
19
  ]);
20
20
  /** Reads and writes share an open shape; hosts resolve names and default omitted colors. */
21
- export const notionNativeIconSchema = v.looseObject({
21
+ export const bridgeIconSchema = v.looseObject({
22
22
  type: v.literal("icon"),
23
23
  icon: v.looseObject({
24
- name: notionIconNameSchema,
25
- color: v.optional(notionIconColorSchema),
24
+ name: bridgeIconNameSchema,
25
+ color: v.optional(bridgeIconColorSchema),
26
+ }),
27
+ });
28
+ export const bridgeEmojiSchema = v.object({
29
+ type: v.literal("emoji"),
30
+ emoji: v.string(),
31
+ });
32
+ export const bridgeCustomEmojiSchema = v.object({
33
+ type: v.literal("custom_emoji"),
34
+ custom_emoji: v.object({
35
+ id: v.string(),
36
+ name: v.optional(v.string()),
37
+ url: v.optional(v.string()),
26
38
  }),
27
39
  });
@@ -5,6 +5,8 @@ export type { NotionDataSourcePageForProtocol3To5 } from "./compatibility/protoc
5
5
  export { notionDataSourcePageForProtocol3To5Schema } from "./compatibility/protocol3To5/dataSourcePage.js";
6
6
  export type { NotionDataSourceValue } from "./compatibility/protocol3To5/dataSourceValue.js";
7
7
  export { notionDataSourceValueSchema } from "./compatibility/protocol3To5/dataSourceValue.js";
8
+ export type { DataSourceBindingsMessageForProtocol3To10 } from "./compatibility/protocol3To10/dataSourceBindings.js";
9
+ export { bridgeDataSourceBindingsForProtocol3To10Schema, dataSourceBindingsMessageForProtocol3To10Schema, } from "./compatibility/protocol3To10/dataSourceBindings.js";
8
10
  export type { CustomBlockPage } from "./context/containingPage.js";
9
11
  export { customBlockPageSchema } from "./context/containingPage.js";
10
12
  export type { NotionContrastMode } from "./context/contrast.js";
@@ -29,9 +31,10 @@ export type { BridgeDataSourceBinding } from "./dataSources/bridgeDataSourceBind
29
31
  export { bridgeDataSourceBindingSchema } from "./dataSources/bridgeDataSourceBinding.js";
30
32
  export type { BridgeDataSourceBindings } from "./dataSources/bridgeDataSourceBindings.js";
31
33
  export { bridgeDataSourceBindingsSchema } from "./dataSources/bridgeDataSourceBindings.js";
32
- export type { NotionCollectionPointer } from "./dataSources/collectionPointer.js";
33
- export type { NotionCollectionSchema } from "./dataSources/collectionSchema.js";
34
- export { notionCollectionSchemaValidator } from "./dataSources/collectionSchema.js";
34
+ export type { NotionDataSourcePointer } from "./dataSources/dataSourcePointer.js";
35
+ export { dataSourcePointerValidator } from "./dataSources/dataSourcePointer.js";
36
+ export type { NotionDataSourceSchema } from "./dataSources/dataSourceSchema.js";
37
+ export { notionDataSourceSchemaValidator } from "./dataSources/dataSourceSchema.js";
35
38
  export type { CustomBlockDataSourceResolutionErrorCode, CustomBlockDataSourceResolutionErrorInfo, CustomBlockPropertyErrorCode, CustomBlockPropertyErrorInfo, } from "./dataSources/errors.js";
36
39
  export { customBlockDataSourceResolutionErrorCodeSchema, customBlockPropertyErrorCodeSchema, } from "./dataSources/errors.js";
37
40
  export type { BridgeDataSourceFilter } from "./dataSources/filters/bridgeDataSourceFilter.js";
@@ -44,8 +47,6 @@ export type { CustomBlockCheckboxFilterOperator } from "./dataSources/filters/ch
44
47
  export { customBlockCheckboxFilterOperatorSchema } from "./dataSources/filters/checkboxFilterOperator.js";
45
48
  export type { CustomBlockContainsFilterOperator } from "./dataSources/filters/containsFilterOperator.js";
46
49
  export { customBlockContainsFilterOperatorSchema } from "./dataSources/filters/containsFilterOperator.js";
47
- export type { CustomBlockCreatedByFilterOperator } from "./dataSources/filters/createdByFilterOperator.js";
48
- export { customBlockCreatedByFilterOperatorSchema } from "./dataSources/filters/createdByFilterOperator.js";
49
50
  export type { CustomBlockDateFilterOperator, CustomBlockRelativeDateValue, } from "./dataSources/filters/dateFilterOperator.js";
50
51
  export { customBlockDateFilterOperatorSchema, customBlockRelativeDateValueSchema, } from "./dataSources/filters/dateFilterOperator.js";
51
52
  export type { CustomBlockNumberFilterOperator } from "./dataSources/filters/numberFilterOperator.js";
@@ -62,6 +63,8 @@ export type { CustomBlockStatusGroupFilterOperator, CustomBlockStatusGroupName,
62
63
  export { customBlockStatusGroupFilterOperatorSchema, customBlockStatusGroupNameSchema, } from "./dataSources/filters/statusGroupFilterOperator.js";
63
64
  export type { CustomBlockTextFilterOperator } from "./dataSources/filters/textFilterOperator.js";
64
65
  export { customBlockTextFilterOperatorSchema } from "./dataSources/filters/textFilterOperator.js";
66
+ export type { CustomBlockTimestampFilterOperator } from "./dataSources/filters/timestampFilterOperator.js";
67
+ export { customBlockTimestampFilterOperatorSchema } from "./dataSources/filters/timestampFilterOperator.js";
65
68
  export type { MakeBridgeDataSourceBindingArgs } from "./dataSources/makeBridgeDataSourceBinding.js";
66
69
  export { makeBridgeDataSourceBinding } from "./dataSources/makeBridgeDataSourceBinding.js";
67
70
  export type { DataSourcesChangedMessage } from "./dataSources/messages/dataSourcesChanged.js";
@@ -80,6 +83,7 @@ export type { MappedPropertyBinding, ResolvedDataSourceBinding, ResolvedProperty
80
83
  export { resolveDataSourceBinding } from "./dataSources/resolveDataSourceBinding.js";
81
84
  export type { NotionSortDirection } from "./dataSources/sortDirection.js";
82
85
  export { notionSortDirectionSchema } from "./dataSources/sortDirection.js";
86
+ export * from "./files.js";
83
87
  export type { ConnectMessage } from "./handshake/connect.js";
84
88
  export { connectMessageSchema } from "./handshake/connect.js";
85
89
  export type { CustomBlockInitErrorCode, CustomBlockInitErrorInfo, CustomBlockInitializationErrorCode, CustomBlockInitializationErrorInfo, InitMessage, } from "./handshake/init.js";
@@ -90,8 +94,8 @@ export { isInitHandshakeMessage } from "./handshake/isInitHandshakeMessage.js";
90
94
  export * from "./icons.js";
91
95
  export type { CustomBlockDataSourceResourceName, CustomBlockGrant, CustomBlockGrantAction, CustomBlockGrantResourceName, CustomBlockOriginResourceName, } from "./manifest/grants.js";
92
96
  export { customBlockGrantSchema } from "./manifest/grants.js";
93
- export type { BridgeCustomBlockManifest, ManifestDataSource, ManifestIcon, ManifestPage, ManifestProperty, } from "./manifest/manifest.js";
94
- export { manifestDataSourceSchema, manifestIconSchema, manifestPageSchema, manifestPropertySchema, manifestSchema, } from "./manifest/manifest.js";
97
+ export type { BridgeCustomBlockManifest, BridgeManifestDataSource, BridgeManifestIcon, BridgeManifestProperty, ManifestPage, } from "./manifest/manifest.js";
98
+ export { bridgeManifestDataSourceSchema, bridgeManifestIconSchema, bridgeManifestPropertySchema, manifestPageSchema, manifestSchema, } from "./manifest/manifest.js";
95
99
  export type { HostToSandboxMessage, HostToSandboxMessageWithProtocol3To5Compatibility, } from "./messages/hostToSandbox.js";
96
100
  export { hostToSandboxMessageSchema, hostToSandboxMessageWithProtocol3To5CompatibilitySchema, } from "./messages/hostToSandbox.js";
97
101
  export { readIncomingType } from "./messages/incomingType.js";
@@ -109,21 +113,19 @@ export { bridgePageSchema } from "./pages/bridgePage.js";
109
113
  export type { MakeBridgePageArgs } from "./pages/makeBridgePage.js";
110
114
  export { makeBridgePage } from "./pages/makeBridgePage.js";
111
115
  export type { CreatePageMessage, CreatePageMessageParent, CreatePageResultMessage, CreatePageResultMessageWithProtocol3To5Compatibility, CustomBlockCreatePageErrorCode, CustomBlockCreatePageErrorInfo, NotionCreatePagePosition, } from "./pages/messages/createPage.js";
112
- export { createPageMessageSchema, createPageParentSchema, createPageResultMessageSchema, createPageResultMessageWithProtocol3To5CompatibilitySchema, customBlockCreatePageErrorCodeSchema, customBlockCreatePageErrorInfoSchema, notionCreatePagePositionSchema, } from "./pages/messages/createPage.js";
116
+ export { createPageArgsSchema, createPageMessageSchema, createPageParentSchema, createPageResultMessageSchema, createPageResultMessageWithProtocol3To5CompatibilitySchema, customBlockCreatePageErrorCodeSchema, customBlockCreatePageErrorInfoSchema, notionCreatePagePositionSchema, } from "./pages/messages/createPage.js";
113
117
  export type { CustomBlockGetPageErrorCode, CustomBlockGetPageErrorInfo, GetPageMessage, GetPageResultMessage, GetPageResultMessageWithProtocol3To5Compatibility, } from "./pages/messages/getPage.js";
114
118
  export { customBlockGetPageErrorCodeSchema, customBlockGetPageErrorInfoSchema, getPageMessageSchema, getPageResultMessageSchema, getPageResultMessageWithProtocol3To5CompatibilitySchema, } from "./pages/messages/getPage.js";
115
119
  export type { CustomBlockOpenPageErrorCode, CustomBlockOpenPageErrorInfo, OpenPageMessage, OpenPageMode, OpenPageResultMessage, } from "./pages/messages/openPage.js";
116
120
  export { customBlockOpenPageErrorCodeSchema, customBlockOpenPageErrorInfoSchema, openPageMessageSchema, openPageModeSchema, openPageResultMessageSchema, } from "./pages/messages/openPage.js";
117
121
  export type { CustomBlockUpdatePageErrorCode, CustomBlockUpdatePageErrorInfo, UpdatePageMessage, UpdatePageResultMessage, UpdatePageResultMessageWithProtocol3To5Compatibility, } from "./pages/messages/updatePage.js";
118
122
  export { customBlockUpdatePageErrorCodeSchema, customBlockUpdatePageErrorInfoSchema, updatePageMessageSchema, updatePageResultMessageSchema, updatePageResultMessageWithProtocol3To5CompatibilitySchema, } from "./pages/messages/updatePage.js";
119
- export type { NotionPageCover, NotionPageIcon } from "./pages/pageAppearance.js";
120
- export { type NotionCreatePageIcon, notionCreatePageIconSchema, notionCustomEmojiIconSchema, notionEmojiIconSchema, notionExternalFileSchema, notionHostedFileSchema, notionPageCoverSchema, notionPageIconSchema, } from "./pages/pageAppearance.js";
123
+ export { type BridgePageCover, type BridgePageIcon, bridgePageCoverSchema, bridgePageIconSchema, } from "./pages/pageAppearance.js";
121
124
  export type { BridgePagePropertyReadMap, BridgePagePropertyWriteMap, } from "./pages/properties/bridgePagePropertyMaps.js";
122
125
  export { bridgePagePropertyReadMapSchema, bridgePagePropertyWriteMapSchema, } from "./pages/properties/bridgePagePropertyMaps.js";
123
126
  export type { BridgePagePropertyValue } from "./pages/properties/bridgePagePropertyValue.js";
124
127
  export { bridgePagePropertyValueSchema } from "./pages/properties/bridgePagePropertyValue.js";
125
128
  export type { NotionDateInput } from "./pages/properties/dateInput.js";
126
- export type { NotionFileInput } from "./pages/properties/fileInput.js";
127
129
  export type { NotionPlaceInput } from "./pages/properties/placeInput.js";
128
130
  export type { NotionRelationInput } from "./pages/properties/relationInput.js";
129
131
  export type { NotionRichTextItem } from "./pages/properties/richText.js";
@@ -145,10 +147,10 @@ export type { NotionUserId } from "./users/userId.js";
145
147
  export { notionUserIdSchema } from "./users/userId.js";
146
148
  export type { CustomBlockErrorCode, CustomBlockErrorInfo, CustomBlockGrantErrorCode, CustomBlockRequestErrorCode, } from "./utils/errors.js";
147
149
  export { customBlockErrorInfoSchema, NOT_GRANTED_ERROR_CODE, } from "./utils/errors.js";
148
- export type { NotionAgentId, NotionBlockId, NotionDataSourceId, NotionPageId, NotionSpaceId, } from "./utils/ids.js";
149
- export { notionAgentIdSchema, notionBlockIdSchema, notionDataSourceIdSchema, notionPageIdSchema, notionSpaceIdSchema, } from "./utils/ids.js";
150
+ export type { NotionAgentId, NotionAppInstallationId, NotionBlockId, NotionDataSourceId, NotionPageId, NotionSpaceId, } from "./utils/ids.js";
151
+ export { notionAgentIdSchema, notionAppInstallationIdSchema, notionBlockIdSchema, notionDataSourceIdSchema, notionPageIdSchema, notionSpaceIdSchema, } from "./utils/ids.js";
150
152
  export { isLocalBlockServerUrl } from "./utils/isLocalBlockServerUrl.js";
151
- export { LATEST_BRIDGE_PROTOCOL_VERSION, NATIVE_ICON_PROTOCOL_VERSION, TEXT_FALLBACK_PROPERTY_PROTOCOL_VERSION, UNIFIED_PAGE_PROTOCOL_VERSION, } from "./utils/protocolVersion.js";
153
+ export { DATA_SOURCE_NAMING_PROTOCOL_VERSION, LATEST_BRIDGE_PROTOCOL_VERSION, NATIVE_ICON_PROTOCOL_VERSION, TEXT_FALLBACK_PROPERTY_PROTOCOL_VERSION, UNIFIED_PAGE_PROTOCOL_VERSION, } from "./utils/protocolVersion.js";
152
154
  export { readRequestId } from "./utils/readRequestId.js";
153
155
  export type { NotionRecordPointer } from "./utils/recordPointer.js";
154
156
  export { notionRecordPointerSchema } from "./utils/recordPointer.js";
@@ -2,6 +2,7 @@
2
2
  export { bridgePageForProtocol3To5Schema } from "./compatibility/protocol3To5/bridgePage.js";
3
3
  export { notionDataSourcePageForProtocol3To5Schema } from "./compatibility/protocol3To5/dataSourcePage.js";
4
4
  export { notionDataSourceValueSchema } from "./compatibility/protocol3To5/dataSourceValue.js";
5
+ export { bridgeDataSourceBindingsForProtocol3To10Schema, dataSourceBindingsMessageForProtocol3To10Schema, } from "./compatibility/protocol3To10/dataSourceBindings.js";
5
6
  export { customBlockPageSchema } from "./context/containingPage.js";
6
7
  export { DEFAULT_CONTRAST_MODE, notionContrastModeSchema, } from "./context/contrast.js";
7
8
  export { contrastModeChangedMessageSchema } from "./context/messages/contrastModeChanged.js";
@@ -14,14 +15,14 @@ export { notionThemeSchema } from "./context/theme.js";
14
15
  export { bridgeArchiveStatusSchema } from "./dataSources/bridgeArchiveStatus.js";
15
16
  export { bridgeDataSourceBindingSchema } from "./dataSources/bridgeDataSourceBinding.js";
16
17
  export { bridgeDataSourceBindingsSchema } from "./dataSources/bridgeDataSourceBindings.js";
17
- export { notionCollectionSchemaValidator } from "./dataSources/collectionSchema.js";
18
+ export { dataSourcePointerValidator } from "./dataSources/dataSourcePointer.js";
19
+ export { notionDataSourceSchemaValidator } from "./dataSources/dataSourceSchema.js";
18
20
  export { customBlockDataSourceResolutionErrorCodeSchema, customBlockPropertyErrorCodeSchema, } from "./dataSources/errors.js";
19
21
  export { bridgeDataSourceFilterSchema } from "./dataSources/filters/bridgeDataSourceFilter.js";
20
22
  export { bridgeDataSourceFilterConditionSchema } from "./dataSources/filters/bridgeDataSourceFilterCondition.js";
21
23
  export { bridgeDataSourceSortSchema, CUSTOM_BLOCK_DATA_SOURCE_QUERY_MAX_SORTS, } from "./dataSources/filters/bridgeDataSourceSort.js";
22
24
  export { customBlockCheckboxFilterOperatorSchema } from "./dataSources/filters/checkboxFilterOperator.js";
23
25
  export { customBlockContainsFilterOperatorSchema } from "./dataSources/filters/containsFilterOperator.js";
24
- export { customBlockCreatedByFilterOperatorSchema } from "./dataSources/filters/createdByFilterOperator.js";
25
26
  export { customBlockDateFilterOperatorSchema, customBlockRelativeDateValueSchema, } from "./dataSources/filters/dateFilterOperator.js";
26
27
  export { customBlockNumberFilterOperatorSchema } from "./dataSources/filters/numberFilterOperator.js";
27
28
  export { customBlockOptionFilterOperatorSchema } from "./dataSources/filters/optionFilterOperator.js";
@@ -30,6 +31,7 @@ export { customBlockRelationFilterOperatorSchema } from "./dataSources/filters/r
30
31
  export { customBlockStatusFilterOperatorSchema } from "./dataSources/filters/statusFilterOperator.js";
31
32
  export { customBlockStatusGroupFilterOperatorSchema, customBlockStatusGroupNameSchema, } from "./dataSources/filters/statusGroupFilterOperator.js";
32
33
  export { customBlockTextFilterOperatorSchema } from "./dataSources/filters/textFilterOperator.js";
34
+ export { customBlockTimestampFilterOperatorSchema } from "./dataSources/filters/timestampFilterOperator.js";
33
35
  export { makeBridgeDataSourceBinding } from "./dataSources/makeBridgeDataSourceBinding.js";
34
36
  export { dataSourcesChangedMessageSchema } from "./dataSources/messages/dataSourcesChanged.js";
35
37
  export { customBlockQueryDataSourceErrorCodeSchema, customBlockQueryDataSourceErrorInfoSchema, queryDataSourceMessageSchema, queryDataSourceResultMessageSchema, queryDataSourceResultMessageWithProtocol3To5CompatibilitySchema, } from "./dataSources/messages/queryDataSource.js";
@@ -39,13 +41,14 @@ export { notionDateRangeSchema, notionDateReminderSchema, notionDateSchema, noti
39
41
  export { CUSTOM_BLOCK_DATA_SOURCE_SORTABLE_PROPERTY_TYPES, NOTION_BUILTIN_PROPERTY_IDS, NOTION_BUILTIN_PROPERTY_SCHEMAS, NOTION_PROPERTY_TYPES, notionDualPropertySchema, notionPropertyColorSchema, notionPropertyOptionSchema, notionPropertySchemaSchema, notionPropertyTypeSchema, notionStatusGroupSchema, } from "./dataSources/properties/propertySchema.js";
40
42
  export { resolveDataSourceBinding } from "./dataSources/resolveDataSourceBinding.js";
41
43
  export { notionSortDirectionSchema } from "./dataSources/sortDirection.js";
44
+ export * from "./files.js";
42
45
  export { connectMessageSchema } from "./handshake/connect.js";
43
46
  export { CustomBlockInitializationError, customBlockInitErrorCodeSchema, customBlockInitErrorInfoSchema, initMessageSchema, } from "./handshake/init.js";
44
47
  export { customBlockInitResultErrorCodeSchema, customBlockInitResultErrorInfoSchema, initResultMessageSchema, } from "./handshake/initResult.js";
45
48
  export { isInitHandshakeMessage } from "./handshake/isInitHandshakeMessage.js";
46
49
  export * from "./icons.js";
47
50
  export { customBlockGrantSchema } from "./manifest/grants.js";
48
- export { manifestDataSourceSchema, manifestIconSchema, manifestPageSchema, manifestPropertySchema, manifestSchema, } from "./manifest/manifest.js";
51
+ export { bridgeManifestDataSourceSchema, bridgeManifestIconSchema, bridgeManifestPropertySchema, manifestPageSchema, manifestSchema, } from "./manifest/manifest.js";
49
52
  export { hostToSandboxMessageSchema, hostToSandboxMessageWithProtocol3To5CompatibilitySchema, } from "./messages/hostToSandbox.js";
50
53
  export { readIncomingType } from "./messages/incomingType.js";
51
54
  export { invalidHostMessageSchema } from "./messages/invalidHostMessage.js";
@@ -54,11 +57,11 @@ export { sandboxToHostMessageSchema } from "./messages/sandboxToHost.js";
54
57
  export { customBlockOpenExternalUrlErrorCodeSchema, customBlockOpenExternalUrlErrorInfoSchema, openExternalUrlMessageSchema, openExternalUrlResultMessageSchema, } from "./navigation/openExternalUrl.js";
55
58
  export { bridgePageSchema } from "./pages/bridgePage.js";
56
59
  export { makeBridgePage } from "./pages/makeBridgePage.js";
57
- export { createPageMessageSchema, createPageParentSchema, createPageResultMessageSchema, createPageResultMessageWithProtocol3To5CompatibilitySchema, customBlockCreatePageErrorCodeSchema, customBlockCreatePageErrorInfoSchema, notionCreatePagePositionSchema, } from "./pages/messages/createPage.js";
60
+ export { createPageArgsSchema, createPageMessageSchema, createPageParentSchema, createPageResultMessageSchema, createPageResultMessageWithProtocol3To5CompatibilitySchema, customBlockCreatePageErrorCodeSchema, customBlockCreatePageErrorInfoSchema, notionCreatePagePositionSchema, } from "./pages/messages/createPage.js";
58
61
  export { customBlockGetPageErrorCodeSchema, customBlockGetPageErrorInfoSchema, getPageMessageSchema, getPageResultMessageSchema, getPageResultMessageWithProtocol3To5CompatibilitySchema, } from "./pages/messages/getPage.js";
59
62
  export { customBlockOpenPageErrorCodeSchema, customBlockOpenPageErrorInfoSchema, openPageMessageSchema, openPageModeSchema, openPageResultMessageSchema, } from "./pages/messages/openPage.js";
60
63
  export { customBlockUpdatePageErrorCodeSchema, customBlockUpdatePageErrorInfoSchema, updatePageMessageSchema, updatePageResultMessageSchema, updatePageResultMessageWithProtocol3To5CompatibilitySchema, } from "./pages/messages/updatePage.js";
61
- export { notionCreatePageIconSchema, notionCustomEmojiIconSchema, notionEmojiIconSchema, notionExternalFileSchema, notionHostedFileSchema, notionPageCoverSchema, notionPageIconSchema, } from "./pages/pageAppearance.js";
64
+ export { bridgePageCoverSchema, bridgePageIconSchema, } from "./pages/pageAppearance.js";
62
65
  export { bridgePagePropertyReadMapSchema, bridgePagePropertyWriteMapSchema, } from "./pages/properties/bridgePagePropertyMaps.js";
63
66
  export { bridgePagePropertyValueSchema } from "./pages/properties/bridgePagePropertyValue.js";
64
67
  export { bridgeUserSchema } from "./users/bridgeUser.js";
@@ -69,8 +72,8 @@ export { customBlockGetUserErrorCodeSchema, customBlockGetUserErrorInfoSchema, g
69
72
  export { customBlockListUsersErrorCodeSchema, customBlockListUsersErrorInfoSchema, listUsersMessageSchema, listUsersResultMessageSchema, } from "./users/messages/listUsers.js";
70
73
  export { notionUserIdSchema } from "./users/userId.js";
71
74
  export { customBlockErrorInfoSchema, NOT_GRANTED_ERROR_CODE, } from "./utils/errors.js";
72
- export { notionAgentIdSchema, notionBlockIdSchema, notionDataSourceIdSchema, notionPageIdSchema, notionSpaceIdSchema, } from "./utils/ids.js";
75
+ export { notionAgentIdSchema, notionAppInstallationIdSchema, notionBlockIdSchema, notionDataSourceIdSchema, notionPageIdSchema, notionSpaceIdSchema, } from "./utils/ids.js";
73
76
  export { isLocalBlockServerUrl } from "./utils/isLocalBlockServerUrl.js";
74
- export { LATEST_BRIDGE_PROTOCOL_VERSION, NATIVE_ICON_PROTOCOL_VERSION, TEXT_FALLBACK_PROPERTY_PROTOCOL_VERSION, UNIFIED_PAGE_PROTOCOL_VERSION, } from "./utils/protocolVersion.js";
77
+ export { DATA_SOURCE_NAMING_PROTOCOL_VERSION, LATEST_BRIDGE_PROTOCOL_VERSION, NATIVE_ICON_PROTOCOL_VERSION, TEXT_FALLBACK_PROPERTY_PROTOCOL_VERSION, UNIFIED_PAGE_PROTOCOL_VERSION, } from "./utils/protocolVersion.js";
75
78
  export { readRequestId } from "./utils/readRequestId.js";
76
79
  export { notionRecordPointerSchema } from "./utils/recordPointer.js";