@notionhq/custom-blocks-host 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/README.md +204 -0
  2. package/dist/autoBindProperties.d.ts +21 -0
  3. package/dist/autoBindProperties.d.ts.map +1 -0
  4. package/dist/autoBindProperties.js +38 -0
  5. package/dist/createCustomBlockHost.d.ts +46 -0
  6. package/dist/createCustomBlockHost.d.ts.map +1 -0
  7. package/dist/createCustomBlockHost.js +433 -0
  8. package/dist/index.d.ts +6 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +2 -0
  11. package/dist/lifecycle/initErrors.d.ts +13 -0
  12. package/dist/lifecycle/initErrors.d.ts.map +1 -0
  13. package/dist/lifecycle/initErrors.js +152 -0
  14. package/dist/lifecycle/initializationController.d.ts +54 -0
  15. package/dist/lifecycle/initializationController.d.ts.map +1 -0
  16. package/dist/lifecycle/initializationController.js +182 -0
  17. package/dist/lifecycle/protocolVersion.d.ts +2 -0
  18. package/dist/lifecycle/protocolVersion.d.ts.map +1 -0
  19. package/dist/lifecycle/protocolVersion.js +3 -0
  20. package/dist/lifecycle/types.d.ts +28 -0
  21. package/dist/lifecycle/types.d.ts.map +1 -0
  22. package/dist/lifecycle/types.js +1 -0
  23. package/dist/messages/invalidSandboxMessage.d.ts +7 -0
  24. package/dist/messages/invalidSandboxMessage.d.ts.map +1 -0
  25. package/dist/messages/invalidSandboxMessage.js +21 -0
  26. package/dist/messages/types.d.ts +29 -0
  27. package/dist/messages/types.d.ts.map +1 -0
  28. package/dist/messages/types.js +1 -0
  29. package/dist/protocol/contrast.d.ts +4 -0
  30. package/dist/protocol/contrast.js +3 -0
  31. package/dist/protocol/dataSources/dataSource.d.ts +731 -0
  32. package/dist/protocol/dataSources/dataSource.js +37 -0
  33. package/dist/protocol/dataSources/dataSourcePage.d.ts +72 -0
  34. package/dist/protocol/dataSources/dataSourcePage.js +12 -0
  35. package/dist/protocol/dataSources/dataSourceValue.d.ts +66 -0
  36. package/dist/protocol/dataSources/dataSourceValue.js +14 -0
  37. package/dist/protocol/dataSources/dateValue.d.ts +157 -0
  38. package/dist/protocol/dataSources/dateValue.js +59 -0
  39. package/dist/protocol/dataSources/errors.d.ts +8 -0
  40. package/dist/protocol/dataSources/errors.js +7 -0
  41. package/dist/protocol/dataSources/propertySchema.d.ts +197 -0
  42. package/dist/protocol/dataSources/propertySchema.js +165 -0
  43. package/dist/protocol/dataSources/recordPointer.d.ts +9 -0
  44. package/dist/protocol/dataSources/recordPointer.js +8 -0
  45. package/dist/protocol/errors.d.ts +12 -0
  46. package/dist/protocol/errors.js +6 -0
  47. package/dist/protocol/ids.d.ts +31 -0
  48. package/dist/protocol/ids.js +26 -0
  49. package/dist/protocol/incomingType.d.ts +9 -0
  50. package/dist/protocol/incomingType.js +17 -0
  51. package/dist/protocol/index.d.ts +48 -0
  52. package/dist/protocol/index.js +48 -0
  53. package/dist/protocol/manifest.d.ts +60 -0
  54. package/dist/protocol/manifest.js +32 -0
  55. package/dist/protocol/messagePayload.d.ts +19 -0
  56. package/dist/protocol/messagePayload.js +1 -0
  57. package/dist/protocol/messages/connect.d.ts +47 -0
  58. package/dist/protocol/messages/connect.js +38 -0
  59. package/dist/protocol/messages/contrastModeChanged.d.ts +7 -0
  60. package/dist/protocol/messages/contrastModeChanged.js +7 -0
  61. package/dist/protocol/messages/createPage.d.ts +200 -0
  62. package/dist/protocol/messages/createPage.js +52 -0
  63. package/dist/protocol/messages/createPageResult.d.ts +213 -0
  64. package/dist/protocol/messages/createPageResult.js +28 -0
  65. package/dist/protocol/messages/currentUserChanged.d.ts +18 -0
  66. package/dist/protocol/messages/currentUserChanged.js +9 -0
  67. package/dist/protocol/messages/dataSourcesChanged.d.ts +157 -0
  68. package/dist/protocol/messages/dataSourcesChanged.js +13 -0
  69. package/dist/protocol/messages/getPage.d.ts +218 -0
  70. package/dist/protocol/messages/getPage.js +33 -0
  71. package/dist/protocol/messages/getUser.d.ts +44 -0
  72. package/dist/protocol/messages/getUser.js +32 -0
  73. package/dist/protocol/messages/hostToSandbox.d.ts +1167 -0
  74. package/dist/protocol/messages/hostToSandbox.js +34 -0
  75. package/dist/protocol/messages/init.d.ts +259 -0
  76. package/dist/protocol/messages/init.js +56 -0
  77. package/dist/protocol/messages/initResult.d.ts +37 -0
  78. package/dist/protocol/messages/initResult.js +28 -0
  79. package/dist/protocol/messages/invalidHostMessage.d.ts +14 -0
  80. package/dist/protocol/messages/invalidHostMessage.js +13 -0
  81. package/dist/protocol/messages/invalidSandboxMessage.d.ts +14 -0
  82. package/dist/protocol/messages/invalidSandboxMessage.js +13 -0
  83. package/dist/protocol/messages/listUsers.d.ts +52 -0
  84. package/dist/protocol/messages/listUsers.js +33 -0
  85. package/dist/protocol/messages/pageChanged.d.ts +27 -0
  86. package/dist/protocol/messages/pageChanged.js +9 -0
  87. package/dist/protocol/messages/parentChanged.d.ts +24 -0
  88. package/dist/protocol/messages/parentChanged.js +9 -0
  89. package/dist/protocol/messages/queryDataSource.d.ts +985 -0
  90. package/dist/protocol/messages/queryDataSource.js +123 -0
  91. package/dist/protocol/messages/queryDataSourceResult.d.ts +93 -0
  92. package/dist/protocol/messages/queryDataSourceResult.js +28 -0
  93. package/dist/protocol/messages/resize.d.ts +11 -0
  94. package/dist/protocol/messages/resize.js +10 -0
  95. package/dist/protocol/messages/sandboxToHost.d.ts +744 -0
  96. package/dist/protocol/messages/sandboxToHost.js +27 -0
  97. package/dist/protocol/messages/themeChanged.d.ts +10 -0
  98. package/dist/protocol/messages/themeChanged.js +10 -0
  99. package/dist/protocol/messages/updatePage.d.ts +180 -0
  100. package/dist/protocol/messages/updatePage.js +22 -0
  101. package/dist/protocol/messages/updatePageResult.d.ts +212 -0
  102. package/dist/protocol/messages/updatePageResult.js +27 -0
  103. package/dist/protocol/pages/page.d.ts +597 -0
  104. package/dist/protocol/pages/page.js +212 -0
  105. package/dist/protocol/parent.d.ts +28 -0
  106. package/dist/protocol/parent.js +12 -0
  107. package/dist/protocol/protocolVersion.d.ts +6 -0
  108. package/dist/protocol/protocolVersion.js +6 -0
  109. package/dist/protocol/theme.d.ts +3 -0
  110. package/dist/protocol/theme.js +2 -0
  111. package/dist/protocol/users/user.d.ts +32 -0
  112. package/dist/protocol/users/user.js +20 -0
  113. package/dist/queries/querySubscriptions.d.ts +17 -0
  114. package/dist/queries/querySubscriptions.d.ts.map +1 -0
  115. package/dist/queries/querySubscriptions.js +38 -0
  116. package/dist/queries/types.d.ts +4 -0
  117. package/dist/queries/types.d.ts.map +1 -0
  118. package/dist/queries/types.js +1 -0
  119. package/dist/queries/validateQueryDataSourceFilter.d.ts +5 -0
  120. package/dist/queries/validateQueryDataSourceFilter.d.ts.map +1 -0
  121. package/dist/queries/validateQueryDataSourceFilter.js +72 -0
  122. package/dist/queries/validateQueryDataSourceSorts.d.ts +8 -0
  123. package/dist/queries/validateQueryDataSourceSorts.d.ts.map +1 -0
  124. package/dist/queries/validateQueryDataSourceSorts.js +47 -0
  125. package/dist/utils.d.ts +5 -0
  126. package/dist/utils.d.ts.map +1 -0
  127. package/dist/utils.js +6 -0
  128. package/package.json +26 -0
  129. package/src/autoBindProperties.ts +63 -0
  130. package/src/createCustomBlockHost.ts +605 -0
  131. package/src/index.ts +25 -0
  132. package/src/lifecycle/initErrors.ts +165 -0
  133. package/src/lifecycle/initializationController.ts +290 -0
  134. package/src/lifecycle/protocolVersion.ts +3 -0
  135. package/src/lifecycle/types.ts +40 -0
  136. package/src/messages/invalidSandboxMessage.ts +35 -0
  137. package/src/messages/types.ts +80 -0
  138. package/src/queries/querySubscriptions.ts +57 -0
  139. package/src/queries/types.ts +10 -0
  140. package/src/queries/validateQueryDataSourceFilter.ts +101 -0
  141. package/src/queries/validateQueryDataSourceSorts.ts +69 -0
  142. package/src/utils.ts +8 -0
@@ -0,0 +1,37 @@
1
+ import * as v from "valibot";
2
+ import { notionDataSourceIdSchema, notionSpaceIdSchema } from "../ids.js";
3
+ import { notionPropertySchemaSchema } from "./propertySchema.js";
4
+ const collectionPointerValidator = v.object({
5
+ id: notionDataSourceIdSchema,
6
+ table: v.string(),
7
+ spaceId: v.optional(notionSpaceIdSchema),
8
+ });
9
+ export const notionCollectionSchemaValidator = v.object({
10
+ id: v.optional(notionDataSourceIdSchema),
11
+ propertiesById: v.record(v.string(), notionPropertySchemaSchema),
12
+ });
13
+ /**
14
+ * Bridge shape for a single data source: a semantic key bound (optionally) to a collection,
15
+ * its property name → ID mapping, and its column schemas.
16
+ */
17
+ export const notionDataSourceSchema = v.object({
18
+ key: v.string(),
19
+ collectionPointer: v.optional(collectionPointerValidator),
20
+ collectionSchema: v.optional(notionCollectionSchemaValidator),
21
+ /**
22
+ * Keyed mapping of user-defined keys to a raw property ID. A key mapped to `undefined`
23
+ * is a declared-but-unbound slot.
24
+ */
25
+ propertyIdsByKey: v.record(v.string(), v.optional(v.string())),
26
+ /**
27
+ * Keyed mapping of raw property IDs to their schema. Always includes the four built-ins
28
+ * (`created_time`, `last_edited_time`, `created_by`, `last_edited_by`).
29
+ */
30
+ propertySchemasById: v.record(v.string(), notionPropertySchemaSchema),
31
+ });
32
+ export const notionDataSourceBindingSchema = v.object({
33
+ collectionPointer: v.optional(collectionPointerValidator),
34
+ collectionSchema: v.optional(notionCollectionSchemaValidator),
35
+ propertyIdsByKey: v.optional(v.record(v.string(), v.optional(v.string()))),
36
+ });
37
+ export const notionDataSourceBindingsSchema = v.record(v.string(), notionDataSourceBindingSchema);
@@ -0,0 +1,72 @@
1
+ import * as v from "valibot";
2
+ /**
3
+ * Bridge shape for a data source page, as parsed from inbound host messages. The host keys
4
+ * properties by raw property ID. The four built-ins (`created_time`, `last_edited_time`,
5
+ * `created_by`, `last_edited_by`) are normally present, possibly with `undefined` values.
6
+ */
7
+ export declare const notionDataSourcePageBridgeSchema: v.ObjectSchema<{
8
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
9
+ readonly propertiesById: v.RecordSchema<v.StringSchema<undefined>, v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>, v.BooleanSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
10
+ readonly type: v.LiteralSchema<"date", undefined>;
11
+ readonly start_date: v.StringSchema<undefined>;
12
+ readonly reminder: v.OptionalSchema<v.UnionSchema<[v.ObjectSchema<{
13
+ readonly unit: v.PicklistSchema<["year", "month", "week", "day"], undefined>;
14
+ readonly value: v.NumberSchema<undefined>;
15
+ readonly time: v.StringSchema<undefined>;
16
+ readonly defaultTimeZone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
17
+ }, undefined>, v.ObjectSchema<{
18
+ readonly unit: v.LiteralSchema<"none", undefined>;
19
+ }, undefined>], undefined>, undefined>;
20
+ }, undefined>, v.ObjectSchema<{
21
+ readonly type: v.LiteralSchema<"daterange", undefined>;
22
+ readonly start_date: v.StringSchema<undefined>;
23
+ readonly end_date: v.StringSchema<undefined>;
24
+ readonly reminder: v.OptionalSchema<v.UnionSchema<[v.ObjectSchema<{
25
+ readonly unit: v.PicklistSchema<["year", "month", "week", "day"], undefined>;
26
+ readonly value: v.NumberSchema<undefined>;
27
+ readonly time: v.StringSchema<undefined>;
28
+ readonly defaultTimeZone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
29
+ }, undefined>, v.ObjectSchema<{
30
+ readonly unit: v.LiteralSchema<"none", undefined>;
31
+ }, undefined>], undefined>, undefined>;
32
+ }, undefined>, v.ObjectSchema<{
33
+ readonly type: v.LiteralSchema<"datetime", undefined>;
34
+ readonly start_date: v.StringSchema<undefined>;
35
+ readonly start_time: v.StringSchema<undefined>;
36
+ readonly time_zone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
37
+ readonly reminder: v.OptionalSchema<v.UnionSchema<[v.UnionSchema<[v.ObjectSchema<{
38
+ readonly unit: v.PicklistSchema<["year", "month", "week", "day"], undefined>;
39
+ readonly value: v.NumberSchema<undefined>;
40
+ readonly time: v.StringSchema<undefined>;
41
+ readonly defaultTimeZone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
42
+ }, undefined>, v.ObjectSchema<{
43
+ readonly unit: v.PicklistSchema<["hour", "minute"], undefined>;
44
+ readonly value: v.NumberSchema<undefined>;
45
+ }, undefined>], undefined>, v.ObjectSchema<{
46
+ readonly unit: v.LiteralSchema<"none", undefined>;
47
+ }, undefined>], undefined>, undefined>;
48
+ }, undefined>, v.ObjectSchema<{
49
+ readonly type: v.LiteralSchema<"datetimerange", undefined>;
50
+ readonly start_date: v.StringSchema<undefined>;
51
+ readonly start_time: v.StringSchema<undefined>;
52
+ readonly end_date: v.StringSchema<undefined>;
53
+ readonly end_time: v.StringSchema<undefined>;
54
+ readonly time_zone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
55
+ readonly reminder: v.OptionalSchema<v.UnionSchema<[v.UnionSchema<[v.ObjectSchema<{
56
+ readonly unit: v.PicklistSchema<["year", "month", "week", "day"], undefined>;
57
+ readonly value: v.NumberSchema<undefined>;
58
+ readonly time: v.StringSchema<undefined>;
59
+ readonly defaultTimeZone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
60
+ }, undefined>, v.ObjectSchema<{
61
+ readonly unit: v.PicklistSchema<["hour", "minute"], undefined>;
62
+ readonly value: v.NumberSchema<undefined>;
63
+ }, undefined>], undefined>, v.ObjectSchema<{
64
+ readonly unit: v.LiteralSchema<"none", undefined>;
65
+ }, undefined>], undefined>, undefined>;
66
+ }, undefined>], undefined>, v.ArraySchema<v.StringSchema<undefined>, undefined>, v.ArraySchema<v.ObjectSchema<{
67
+ readonly id: v.StringSchema<undefined>;
68
+ readonly table: v.StringSchema<undefined>;
69
+ }, undefined>, undefined>], undefined>, undefined>, undefined>;
70
+ }, undefined>;
71
+ /** Internal SDK type for a parsed bridge page. */
72
+ export type NotionDataSourcePageBridge = v.InferOutput<typeof notionDataSourcePageBridgeSchema>;
@@ -0,0 +1,12 @@
1
+ import * as v from "valibot";
2
+ import { notionPageIdSchema } from "../ids.js";
3
+ import { notionDataSourceValueSchema } from "./dataSourceValue.js";
4
+ /**
5
+ * Bridge shape for a data source page, as parsed from inbound host messages. The host keys
6
+ * properties by raw property ID. The four built-ins (`created_time`, `last_edited_time`,
7
+ * `created_by`, `last_edited_by`) are normally present, possibly with `undefined` values.
8
+ */
9
+ export const notionDataSourcePageBridgeSchema = v.object({
10
+ id: notionPageIdSchema,
11
+ propertiesById: v.record(v.string(), v.optional(notionDataSourceValueSchema)),
12
+ });
@@ -0,0 +1,66 @@
1
+ import * as v from "valibot";
2
+ /**
3
+ * Possible types for a data source value.
4
+ */
5
+ export declare const notionDataSourceValueSchema: v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>, v.BooleanSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
6
+ readonly type: v.LiteralSchema<"date", undefined>;
7
+ readonly start_date: v.StringSchema<undefined>;
8
+ readonly reminder: v.OptionalSchema<v.UnionSchema<[v.ObjectSchema<{
9
+ readonly unit: v.PicklistSchema<["year", "month", "week", "day"], undefined>;
10
+ readonly value: v.NumberSchema<undefined>;
11
+ readonly time: v.StringSchema<undefined>;
12
+ readonly defaultTimeZone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
13
+ }, undefined>, v.ObjectSchema<{
14
+ readonly unit: v.LiteralSchema<"none", undefined>;
15
+ }, undefined>], undefined>, undefined>;
16
+ }, undefined>, v.ObjectSchema<{
17
+ readonly type: v.LiteralSchema<"daterange", undefined>;
18
+ readonly start_date: v.StringSchema<undefined>;
19
+ readonly end_date: v.StringSchema<undefined>;
20
+ readonly reminder: v.OptionalSchema<v.UnionSchema<[v.ObjectSchema<{
21
+ readonly unit: v.PicklistSchema<["year", "month", "week", "day"], undefined>;
22
+ readonly value: v.NumberSchema<undefined>;
23
+ readonly time: v.StringSchema<undefined>;
24
+ readonly defaultTimeZone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
25
+ }, undefined>, v.ObjectSchema<{
26
+ readonly unit: v.LiteralSchema<"none", undefined>;
27
+ }, undefined>], undefined>, undefined>;
28
+ }, undefined>, v.ObjectSchema<{
29
+ readonly type: v.LiteralSchema<"datetime", undefined>;
30
+ readonly start_date: v.StringSchema<undefined>;
31
+ readonly start_time: v.StringSchema<undefined>;
32
+ readonly time_zone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
33
+ readonly reminder: v.OptionalSchema<v.UnionSchema<[v.UnionSchema<[v.ObjectSchema<{
34
+ readonly unit: v.PicklistSchema<["year", "month", "week", "day"], undefined>;
35
+ readonly value: v.NumberSchema<undefined>;
36
+ readonly time: v.StringSchema<undefined>;
37
+ readonly defaultTimeZone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
38
+ }, undefined>, v.ObjectSchema<{
39
+ readonly unit: v.PicklistSchema<["hour", "minute"], undefined>;
40
+ readonly value: v.NumberSchema<undefined>;
41
+ }, undefined>], undefined>, v.ObjectSchema<{
42
+ readonly unit: v.LiteralSchema<"none", undefined>;
43
+ }, undefined>], undefined>, undefined>;
44
+ }, undefined>, v.ObjectSchema<{
45
+ readonly type: v.LiteralSchema<"datetimerange", undefined>;
46
+ readonly start_date: v.StringSchema<undefined>;
47
+ readonly start_time: v.StringSchema<undefined>;
48
+ readonly end_date: v.StringSchema<undefined>;
49
+ readonly end_time: v.StringSchema<undefined>;
50
+ readonly time_zone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
51
+ readonly reminder: v.OptionalSchema<v.UnionSchema<[v.UnionSchema<[v.ObjectSchema<{
52
+ readonly unit: v.PicklistSchema<["year", "month", "week", "day"], undefined>;
53
+ readonly value: v.NumberSchema<undefined>;
54
+ readonly time: v.StringSchema<undefined>;
55
+ readonly defaultTimeZone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
56
+ }, undefined>, v.ObjectSchema<{
57
+ readonly unit: v.PicklistSchema<["hour", "minute"], undefined>;
58
+ readonly value: v.NumberSchema<undefined>;
59
+ }, undefined>], undefined>, v.ObjectSchema<{
60
+ readonly unit: v.LiteralSchema<"none", undefined>;
61
+ }, undefined>], undefined>, undefined>;
62
+ }, undefined>], undefined>, v.ArraySchema<v.StringSchema<undefined>, undefined>, v.ArraySchema<v.ObjectSchema<{
63
+ readonly id: v.StringSchema<undefined>;
64
+ readonly table: v.StringSchema<undefined>;
65
+ }, undefined>, undefined>], undefined>;
66
+ export type NotionDataSourceValue = v.InferOutput<typeof notionDataSourceValueSchema>;
@@ -0,0 +1,14 @@
1
+ import * as v from "valibot";
2
+ import { notionDateValueSchema } from "./dateValue.js";
3
+ import { notionRecordPointerSchema } from "./recordPointer.js";
4
+ /**
5
+ * Possible types for a data source value.
6
+ */
7
+ export const notionDataSourceValueSchema = v.union([
8
+ v.string(),
9
+ v.number(),
10
+ v.boolean(),
11
+ notionDateValueSchema,
12
+ v.array(v.string()),
13
+ v.array(notionRecordPointerSchema),
14
+ ]);
@@ -0,0 +1,157 @@
1
+ import * as v from "valibot";
2
+ export declare const notionDateReminderSchema: v.ObjectSchema<{
3
+ readonly unit: v.PicklistSchema<["year", "month", "week", "day"], undefined>;
4
+ readonly value: v.NumberSchema<undefined>;
5
+ readonly time: v.StringSchema<undefined>;
6
+ readonly defaultTimeZone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7
+ }, undefined>;
8
+ export type NotionDateReminder = v.InferOutput<typeof notionDateReminderSchema>;
9
+ export declare const notionTimeReminderSchema: v.ObjectSchema<{
10
+ readonly unit: v.PicklistSchema<["hour", "minute"], undefined>;
11
+ readonly value: v.NumberSchema<undefined>;
12
+ }, undefined>;
13
+ export type NotionTimeReminder = v.InferOutput<typeof notionTimeReminderSchema>;
14
+ export declare const notionNoReminderSchema: v.ObjectSchema<{
15
+ readonly unit: v.LiteralSchema<"none", undefined>;
16
+ }, undefined>;
17
+ export type NotionNoReminder = v.InferOutput<typeof notionNoReminderSchema>;
18
+ /**
19
+ * Possible types for a Notion `datetime` reminder.
20
+ */
21
+ export declare const notionDateTimeReminderSchema: v.UnionSchema<[v.ObjectSchema<{
22
+ readonly unit: v.PicklistSchema<["year", "month", "week", "day"], undefined>;
23
+ readonly value: v.NumberSchema<undefined>;
24
+ readonly time: v.StringSchema<undefined>;
25
+ readonly defaultTimeZone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
26
+ }, undefined>, v.ObjectSchema<{
27
+ readonly unit: v.PicklistSchema<["hour", "minute"], undefined>;
28
+ readonly value: v.NumberSchema<undefined>;
29
+ }, undefined>], undefined>;
30
+ export type NotionDateTimeReminder = v.InferOutput<typeof notionDateTimeReminderSchema>;
31
+ export declare const notionDateSchema: v.ObjectSchema<{
32
+ readonly type: v.LiteralSchema<"date", undefined>;
33
+ readonly start_date: v.StringSchema<undefined>;
34
+ readonly reminder: v.OptionalSchema<v.UnionSchema<[v.ObjectSchema<{
35
+ readonly unit: v.PicklistSchema<["year", "month", "week", "day"], undefined>;
36
+ readonly value: v.NumberSchema<undefined>;
37
+ readonly time: v.StringSchema<undefined>;
38
+ readonly defaultTimeZone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
39
+ }, undefined>, v.ObjectSchema<{
40
+ readonly unit: v.LiteralSchema<"none", undefined>;
41
+ }, undefined>], undefined>, undefined>;
42
+ }, undefined>;
43
+ export type NotionDate = v.InferOutput<typeof notionDateSchema>;
44
+ export declare const notionDateRangeSchema: v.ObjectSchema<{
45
+ readonly type: v.LiteralSchema<"daterange", undefined>;
46
+ readonly start_date: v.StringSchema<undefined>;
47
+ readonly end_date: v.StringSchema<undefined>;
48
+ readonly reminder: v.OptionalSchema<v.UnionSchema<[v.ObjectSchema<{
49
+ readonly unit: v.PicklistSchema<["year", "month", "week", "day"], undefined>;
50
+ readonly value: v.NumberSchema<undefined>;
51
+ readonly time: v.StringSchema<undefined>;
52
+ readonly defaultTimeZone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
53
+ }, undefined>, v.ObjectSchema<{
54
+ readonly unit: v.LiteralSchema<"none", undefined>;
55
+ }, undefined>], undefined>, undefined>;
56
+ }, undefined>;
57
+ export type NotionDateRange = v.InferOutput<typeof notionDateRangeSchema>;
58
+ export declare const notionDateTimeSchema: v.ObjectSchema<{
59
+ readonly type: v.LiteralSchema<"datetime", undefined>;
60
+ readonly start_date: v.StringSchema<undefined>;
61
+ readonly start_time: v.StringSchema<undefined>;
62
+ readonly time_zone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
63
+ readonly reminder: v.OptionalSchema<v.UnionSchema<[v.UnionSchema<[v.ObjectSchema<{
64
+ readonly unit: v.PicklistSchema<["year", "month", "week", "day"], undefined>;
65
+ readonly value: v.NumberSchema<undefined>;
66
+ readonly time: v.StringSchema<undefined>;
67
+ readonly defaultTimeZone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
68
+ }, undefined>, v.ObjectSchema<{
69
+ readonly unit: v.PicklistSchema<["hour", "minute"], undefined>;
70
+ readonly value: v.NumberSchema<undefined>;
71
+ }, undefined>], undefined>, v.ObjectSchema<{
72
+ readonly unit: v.LiteralSchema<"none", undefined>;
73
+ }, undefined>], undefined>, undefined>;
74
+ }, undefined>;
75
+ export type NotionDateTime = v.InferOutput<typeof notionDateTimeSchema>;
76
+ export declare const notionDateTimeRangeSchema: v.ObjectSchema<{
77
+ readonly type: v.LiteralSchema<"datetimerange", undefined>;
78
+ readonly start_date: v.StringSchema<undefined>;
79
+ readonly start_time: v.StringSchema<undefined>;
80
+ readonly end_date: v.StringSchema<undefined>;
81
+ readonly end_time: v.StringSchema<undefined>;
82
+ readonly time_zone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
83
+ readonly reminder: v.OptionalSchema<v.UnionSchema<[v.UnionSchema<[v.ObjectSchema<{
84
+ readonly unit: v.PicklistSchema<["year", "month", "week", "day"], undefined>;
85
+ readonly value: v.NumberSchema<undefined>;
86
+ readonly time: v.StringSchema<undefined>;
87
+ readonly defaultTimeZone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
88
+ }, undefined>, v.ObjectSchema<{
89
+ readonly unit: v.PicklistSchema<["hour", "minute"], undefined>;
90
+ readonly value: v.NumberSchema<undefined>;
91
+ }, undefined>], undefined>, v.ObjectSchema<{
92
+ readonly unit: v.LiteralSchema<"none", undefined>;
93
+ }, undefined>], undefined>, undefined>;
94
+ }, undefined>;
95
+ export type NotionDateTimeRange = v.InferOutput<typeof notionDateTimeRangeSchema>;
96
+ /**
97
+ * Possible types for a Notion `date` value.
98
+ */
99
+ export declare const notionDateValueSchema: v.VariantSchema<"type", [v.ObjectSchema<{
100
+ readonly type: v.LiteralSchema<"date", undefined>;
101
+ readonly start_date: v.StringSchema<undefined>;
102
+ readonly reminder: v.OptionalSchema<v.UnionSchema<[v.ObjectSchema<{
103
+ readonly unit: v.PicklistSchema<["year", "month", "week", "day"], undefined>;
104
+ readonly value: v.NumberSchema<undefined>;
105
+ readonly time: v.StringSchema<undefined>;
106
+ readonly defaultTimeZone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
107
+ }, undefined>, v.ObjectSchema<{
108
+ readonly unit: v.LiteralSchema<"none", undefined>;
109
+ }, undefined>], undefined>, undefined>;
110
+ }, undefined>, v.ObjectSchema<{
111
+ readonly type: v.LiteralSchema<"daterange", undefined>;
112
+ readonly start_date: v.StringSchema<undefined>;
113
+ readonly end_date: v.StringSchema<undefined>;
114
+ readonly reminder: v.OptionalSchema<v.UnionSchema<[v.ObjectSchema<{
115
+ readonly unit: v.PicklistSchema<["year", "month", "week", "day"], undefined>;
116
+ readonly value: v.NumberSchema<undefined>;
117
+ readonly time: v.StringSchema<undefined>;
118
+ readonly defaultTimeZone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
119
+ }, undefined>, v.ObjectSchema<{
120
+ readonly unit: v.LiteralSchema<"none", undefined>;
121
+ }, undefined>], undefined>, undefined>;
122
+ }, undefined>, v.ObjectSchema<{
123
+ readonly type: v.LiteralSchema<"datetime", undefined>;
124
+ readonly start_date: v.StringSchema<undefined>;
125
+ readonly start_time: v.StringSchema<undefined>;
126
+ readonly time_zone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
127
+ readonly reminder: v.OptionalSchema<v.UnionSchema<[v.UnionSchema<[v.ObjectSchema<{
128
+ readonly unit: v.PicklistSchema<["year", "month", "week", "day"], undefined>;
129
+ readonly value: v.NumberSchema<undefined>;
130
+ readonly time: v.StringSchema<undefined>;
131
+ readonly defaultTimeZone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
132
+ }, undefined>, v.ObjectSchema<{
133
+ readonly unit: v.PicklistSchema<["hour", "minute"], undefined>;
134
+ readonly value: v.NumberSchema<undefined>;
135
+ }, undefined>], undefined>, v.ObjectSchema<{
136
+ readonly unit: v.LiteralSchema<"none", undefined>;
137
+ }, undefined>], undefined>, undefined>;
138
+ }, undefined>, v.ObjectSchema<{
139
+ readonly type: v.LiteralSchema<"datetimerange", undefined>;
140
+ readonly start_date: v.StringSchema<undefined>;
141
+ readonly start_time: v.StringSchema<undefined>;
142
+ readonly end_date: v.StringSchema<undefined>;
143
+ readonly end_time: v.StringSchema<undefined>;
144
+ readonly time_zone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
145
+ readonly reminder: v.OptionalSchema<v.UnionSchema<[v.UnionSchema<[v.ObjectSchema<{
146
+ readonly unit: v.PicklistSchema<["year", "month", "week", "day"], undefined>;
147
+ readonly value: v.NumberSchema<undefined>;
148
+ readonly time: v.StringSchema<undefined>;
149
+ readonly defaultTimeZone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
150
+ }, undefined>, v.ObjectSchema<{
151
+ readonly unit: v.PicklistSchema<["hour", "minute"], undefined>;
152
+ readonly value: v.NumberSchema<undefined>;
153
+ }, undefined>], undefined>, v.ObjectSchema<{
154
+ readonly unit: v.LiteralSchema<"none", undefined>;
155
+ }, undefined>], undefined>, undefined>;
156
+ }, undefined>], undefined>;
157
+ export type NotionDateValue = Readonly<v.InferOutput<typeof notionDateValueSchema>>;
@@ -0,0 +1,59 @@
1
+ import * as v from "valibot";
2
+ export const notionDateReminderSchema = v.object({
3
+ unit: v.picklist(["year", "month", "week", "day"]),
4
+ value: v.number(),
5
+ time: v.string(),
6
+ defaultTimeZone: v.optional(v.string()),
7
+ });
8
+ export const notionTimeReminderSchema = v.object({
9
+ unit: v.picklist(["hour", "minute"]),
10
+ value: v.number(),
11
+ });
12
+ export const notionNoReminderSchema = v.object({
13
+ unit: v.literal("none"),
14
+ });
15
+ /**
16
+ * Possible types for a Notion `datetime` reminder.
17
+ */
18
+ export const notionDateTimeReminderSchema = v.union([
19
+ notionDateReminderSchema,
20
+ notionTimeReminderSchema,
21
+ ]);
22
+ const dateOrNoReminder = v.optional(v.union([notionDateReminderSchema, notionNoReminderSchema]));
23
+ const dateTimeOrNoReminder = v.optional(v.union([notionDateTimeReminderSchema, notionNoReminderSchema]));
24
+ export const notionDateSchema = v.object({
25
+ type: v.literal("date"),
26
+ start_date: v.string(),
27
+ reminder: dateOrNoReminder,
28
+ });
29
+ export const notionDateRangeSchema = v.object({
30
+ type: v.literal("daterange"),
31
+ start_date: v.string(),
32
+ end_date: v.string(),
33
+ reminder: dateOrNoReminder,
34
+ });
35
+ export const notionDateTimeSchema = v.object({
36
+ type: v.literal("datetime"),
37
+ start_date: v.string(),
38
+ start_time: v.string(),
39
+ time_zone: v.optional(v.string()),
40
+ reminder: dateTimeOrNoReminder,
41
+ });
42
+ export const notionDateTimeRangeSchema = v.object({
43
+ type: v.literal("datetimerange"),
44
+ start_date: v.string(),
45
+ start_time: v.string(),
46
+ end_date: v.string(),
47
+ end_time: v.string(),
48
+ time_zone: v.optional(v.string()),
49
+ reminder: dateTimeOrNoReminder,
50
+ });
51
+ /**
52
+ * Possible types for a Notion `date` value.
53
+ */
54
+ export const notionDateValueSchema = v.variant("type", [
55
+ notionDateSchema,
56
+ notionDateRangeSchema,
57
+ notionDateTimeSchema,
58
+ notionDateTimeRangeSchema,
59
+ ]);
@@ -0,0 +1,8 @@
1
+ import * as v from "valibot";
2
+ import type { CustomBlockErrorInfo } from "../errors.js";
3
+ export declare const customBlockDataSourceResolutionErrorCodeSchema: v.StringSchema<undefined>;
4
+ export type CustomBlockDataSourceResolutionErrorCode = "unknown_data_source_key" | "unmapped_data_source" | (string & {});
5
+ export type CustomBlockDataSourceResolutionErrorInfo = CustomBlockErrorInfo<CustomBlockDataSourceResolutionErrorCode>;
6
+ export declare const customBlockPropertyErrorCodeSchema: v.StringSchema<undefined>;
7
+ export type CustomBlockPropertyErrorCode = "unmapped_property" | "property_id_mismatch" | "duplicate_property" | "invalid_property_value" | (string & {});
8
+ export type CustomBlockPropertyErrorInfo = CustomBlockErrorInfo<CustomBlockPropertyErrorCode>;
@@ -0,0 +1,7 @@
1
+ import * as v from "valibot";
2
+ // The schema accepts any string code. The type lists known codes for
3
+ // autocomplete, with an open string fallback for newer senders.
4
+ export const customBlockDataSourceResolutionErrorCodeSchema = v.string();
5
+ // The schema accepts any string code. The type lists known codes for
6
+ // autocomplete, with an open string fallback for newer senders.
7
+ export const customBlockPropertyErrorCodeSchema = v.string();
@@ -0,0 +1,197 @@
1
+ import * as v from "valibot";
2
+ /**
3
+ * Hex-token identifiers for Notion's named colors. Mirrors the public API's
4
+ * `select.options[].color` enum
5
+ * (https://developers.notion.com/reference/property-object#select).
6
+ */
7
+ export declare const notionPropertyColorSchema: 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>;
8
+ export type NotionPropertyColor = v.InferOutput<typeof notionPropertyColorSchema>;
9
+ export declare const notionPropertyOptionSchema: v.ObjectSchema<{
10
+ readonly id: v.StringSchema<undefined>;
11
+ readonly name: v.StringSchema<undefined>;
12
+ 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>;
13
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
14
+ }, undefined>;
15
+ export type NotionPropertyOption = v.InferOutput<typeof notionPropertyOptionSchema>;
16
+ export declare const notionStatusGroupSchema: v.ObjectSchema<{
17
+ readonly id: v.StringSchema<undefined>;
18
+ readonly name: v.StringSchema<undefined>;
19
+ 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>;
20
+ readonly option_ids: v.ArraySchema<v.StringSchema<undefined>, undefined>;
21
+ }, undefined>;
22
+ export type NotionStatusGroup = v.InferOutput<typeof notionStatusGroupSchema>;
23
+ export declare const notionDualPropertySchema: v.ObjectSchema<{
24
+ readonly synced_property_id: v.StringSchema<undefined>;
25
+ readonly synced_property_name: v.StringSchema<undefined>;
26
+ }, undefined>;
27
+ export type NotionDualProperty = v.InferOutput<typeof notionDualPropertySchema>;
28
+ /**
29
+ * Every Notion property type the bridge speaks, in a single readable list.
30
+ * Mirrors the Notion public API
31
+ * [property object](https://developers.notion.com/reference/property-object)
32
+ * type field. Internal-only types (`button`, `verification`,
33
+ * `last_visited_time`, `location`) and the four built-ins (`created_time`,
34
+ * `last_edited_time`, `created_by`, `last_edited_by`) are included under their
35
+ * bridge-native names.
36
+ */
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", "last_visited_time", "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", "last_visited_time", "location", "created_time", "last_edited_time", "created_by", "last_edited_by"], undefined>;
39
+ /**
40
+ * String literal union of every supported Notion property type. Same set as
41
+ * the discriminator in `NotionPropertySchema` — split out so the manifest
42
+ * can declare expected property types without dragging in the per-type
43
+ * payload shapes.
44
+ */
45
+ export type NotionPropertyType = v.InferOutput<typeof notionPropertyTypeSchema>;
46
+ /**
47
+ * Property types currently supported by the custom-block data source sort API.
48
+ * Keep this list narrower than {@link NOTION_PROPERTY_TYPES} when a property
49
+ * type is exposed but its sort value is not yet represented by every host.
50
+ */
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"];
52
+ export type CustomBlockDataSourceSortablePropertyType = (typeof CUSTOM_BLOCK_DATA_SOURCE_SORTABLE_PROPERTY_TYPES)[number];
53
+ /**
54
+ * Per-property schema as exposed by the host over the custom-block bridge.
55
+ * The `type` discriminator must be one of {@link NOTION_PROPERTY_TYPES}.
56
+ */
57
+ export declare const notionPropertySchemaSchema: v.VariantSchema<"type", [v.ObjectSchema<{
58
+ readonly type: v.LiteralSchema<"title", undefined>;
59
+ readonly name: v.StringSchema<undefined>;
60
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
61
+ }, undefined>, v.ObjectSchema<{
62
+ readonly type: v.LiteralSchema<"rich_text", undefined>;
63
+ readonly name: v.StringSchema<undefined>;
64
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
65
+ }, undefined>, v.ObjectSchema<{
66
+ readonly type: v.LiteralSchema<"number", undefined>;
67
+ readonly name: v.StringSchema<undefined>;
68
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
69
+ }, undefined>, v.ObjectSchema<{
70
+ readonly type: v.LiteralSchema<"checkbox", undefined>;
71
+ readonly name: v.StringSchema<undefined>;
72
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
73
+ }, undefined>, v.ObjectSchema<{
74
+ readonly type: v.LiteralSchema<"url", undefined>;
75
+ readonly name: v.StringSchema<undefined>;
76
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
77
+ }, undefined>, v.ObjectSchema<{
78
+ readonly type: v.LiteralSchema<"email", undefined>;
79
+ readonly name: v.StringSchema<undefined>;
80
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
81
+ }, undefined>, v.ObjectSchema<{
82
+ readonly type: v.LiteralSchema<"phone_number", undefined>;
83
+ readonly name: v.StringSchema<undefined>;
84
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
85
+ }, undefined>, v.ObjectSchema<{
86
+ readonly type: v.LiteralSchema<"select", undefined>;
87
+ readonly options: v.ArraySchema<v.ObjectSchema<{
88
+ readonly id: v.StringSchema<undefined>;
89
+ readonly name: v.StringSchema<undefined>;
90
+ 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>;
91
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
92
+ }, undefined>, undefined>;
93
+ readonly name: v.StringSchema<undefined>;
94
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
95
+ }, undefined>, v.ObjectSchema<{
96
+ readonly type: v.LiteralSchema<"multi_select", undefined>;
97
+ readonly options: v.ArraySchema<v.ObjectSchema<{
98
+ readonly id: v.StringSchema<undefined>;
99
+ readonly name: v.StringSchema<undefined>;
100
+ 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>;
101
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
102
+ }, undefined>, undefined>;
103
+ readonly name: v.StringSchema<undefined>;
104
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
105
+ }, undefined>, v.ObjectSchema<{
106
+ readonly type: v.LiteralSchema<"status", undefined>;
107
+ readonly options: v.ArraySchema<v.ObjectSchema<{
108
+ readonly id: v.StringSchema<undefined>;
109
+ readonly name: v.StringSchema<undefined>;
110
+ 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>;
111
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
112
+ }, undefined>, undefined>;
113
+ readonly groups: v.ArraySchema<v.ObjectSchema<{
114
+ readonly id: v.StringSchema<undefined>;
115
+ readonly name: v.StringSchema<undefined>;
116
+ 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>;
117
+ readonly option_ids: v.ArraySchema<v.StringSchema<undefined>, undefined>;
118
+ }, undefined>, undefined>;
119
+ readonly name: v.StringSchema<undefined>;
120
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
121
+ }, undefined>, v.ObjectSchema<{
122
+ readonly type: v.LiteralSchema<"date", undefined>;
123
+ readonly name: v.StringSchema<undefined>;
124
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
125
+ }, undefined>, v.ObjectSchema<{
126
+ readonly type: v.LiteralSchema<"people", undefined>;
127
+ readonly name: v.StringSchema<undefined>;
128
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
129
+ }, undefined>, v.ObjectSchema<{
130
+ readonly type: v.LiteralSchema<"files", undefined>;
131
+ readonly name: v.StringSchema<undefined>;
132
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
133
+ }, undefined>, v.ObjectSchema<{
134
+ readonly type: v.LiteralSchema<"unique_id", undefined>;
135
+ readonly name: v.StringSchema<undefined>;
136
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
137
+ }, undefined>, v.ObjectSchema<{
138
+ readonly type: v.LiteralSchema<"relation", undefined>;
139
+ readonly data_source_id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
140
+ readonly dual_property: v.OptionalSchema<v.ObjectSchema<{
141
+ readonly synced_property_id: v.StringSchema<undefined>;
142
+ readonly synced_property_name: v.StringSchema<undefined>;
143
+ }, undefined>, undefined>;
144
+ readonly name: v.StringSchema<undefined>;
145
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
146
+ }, undefined>, v.ObjectSchema<{
147
+ readonly type: v.LiteralSchema<"place", undefined>;
148
+ readonly name: v.StringSchema<undefined>;
149
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
150
+ }, undefined>, v.ObjectSchema<{
151
+ readonly type: v.LiteralSchema<"formula", undefined>;
152
+ readonly name: v.StringSchema<undefined>;
153
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
154
+ }, undefined>, v.ObjectSchema<{
155
+ readonly type: v.LiteralSchema<"rollup", undefined>;
156
+ readonly name: v.StringSchema<undefined>;
157
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
158
+ }, undefined>, v.ObjectSchema<{
159
+ readonly type: v.LiteralSchema<"button", undefined>;
160
+ readonly name: v.StringSchema<undefined>;
161
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
162
+ }, undefined>, v.ObjectSchema<{
163
+ readonly type: v.LiteralSchema<"verification", undefined>;
164
+ readonly name: v.StringSchema<undefined>;
165
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
166
+ }, undefined>, v.ObjectSchema<{
167
+ readonly type: v.LiteralSchema<"last_visited_time", undefined>;
168
+ readonly name: v.StringSchema<undefined>;
169
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
170
+ }, undefined>, v.ObjectSchema<{
171
+ readonly type: v.LiteralSchema<"location", undefined>;
172
+ readonly name: v.StringSchema<undefined>;
173
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
174
+ }, undefined>, v.ObjectSchema<{
175
+ readonly type: v.LiteralSchema<"created_time", undefined>;
176
+ readonly name: v.StringSchema<undefined>;
177
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
178
+ }, undefined>, v.ObjectSchema<{
179
+ readonly type: v.LiteralSchema<"last_edited_time", undefined>;
180
+ readonly name: v.StringSchema<undefined>;
181
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
182
+ }, undefined>, v.ObjectSchema<{
183
+ readonly type: v.LiteralSchema<"created_by", undefined>;
184
+ readonly name: v.StringSchema<undefined>;
185
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
186
+ }, undefined>, v.ObjectSchema<{
187
+ readonly type: v.LiteralSchema<"last_edited_by", undefined>;
188
+ readonly name: v.StringSchema<undefined>;
189
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
190
+ }, undefined>], undefined>;
191
+ export type NotionPropertySchema = v.InferOutput<typeof notionPropertySchemaSchema>;
192
+ /**
193
+ * The four synthetic built-in property IDs the host always includes in every
194
+ * data source's `propertySchemasById` and every row's `propertiesById`.
195
+ */
196
+ export declare const NOTION_BUILTIN_PROPERTY_IDS: readonly ["created_time", "last_edited_time", "created_by", "last_edited_by"];
197
+ export type NotionBuiltinPropertyId = (typeof NOTION_BUILTIN_PROPERTY_IDS)[number];