@notionhq/custom-blocks 0.2.23 β†’ 0.2.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
1
  import type { NotionDataSource } from "../../protocol/dataSources/dataSource.js";
2
2
  import type { CustomBlockPropertyErrorInfo } from "../../protocol/dataSources/errors.js";
3
- import type { NotionPagePropertyWriteMap } from "../../protocol/pages/page.js";
3
+ import type { CreatePageMessage } from "../../protocol/messages/createPage.js";
4
4
  import type { NotionPagePropertyInputMap } from "../../types.js";
5
5
  export type PropertyWriteMapResolutionResult = {
6
6
  status: "success";
7
- properties: NotionPagePropertyWriteMap;
7
+ properties: CreatePageMessage["properties"];
8
8
  } | {
9
9
  status: "error";
10
10
  error: CustomBlockPropertyErrorInfo;
@@ -14,7 +14,7 @@ export type PropertyWriteMapResolutionResult = {
14
14
  *
15
15
  * Identifiers in `properties` may be raw property IDs or data source property keys; the latter
16
16
  * are looked up in the `dataSource`'s `propertyIdsByKey`. Each value is re-parsed through
17
- * `notionPagePropertyValueSchema` with its `id` rewritten to the resolved property ID.
17
+ * the page property value schema with its `id` rewritten to the resolved property ID.
18
18
  */
19
19
  export declare function resolvePropertyWriteMapForDataSource(args: {
20
20
  dataSource: NotionDataSource | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"resolveProperty.d.ts","sourceRoot":"","sources":["../../../src/bridge/dataSources/resolveProperty.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4DAA4D,CAAA;AAClG,OAAO,KAAK,EAEX,4BAA4B,EAC5B,MAAM,wDAAwD,CAAA;AAC/D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gDAAgD,CAAA;AAGhG,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAEhE,MAAM,MAAM,gCAAgC,GACzC;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,UAAU,EAAE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AAgB,GAAG,SAAS,CAAA;IACxC,UAAU,EAAE,0BAA0B,CAAA;IACtC,aAAa,EAAE,MAAM,CAAA;CACrB,GAAG,gCAAgC,CAwDnC;AAED;;;GAGG;AACH,wBAAgB,sCAAsC,CAAC,IAAI,EAAE;IAC5D,UAAU,EAAE,gBAAgB,GAAG,SAAS,CAAA;IACxC,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;CACrB,GACE;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GACzC;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,4BAA4B,CAAA;CAAE,CAsB1D"}
@@ -8,7 +8,7 @@ function makePropertyError(code, message) {
8
8
  *
9
9
  * Identifiers in `properties` may be raw property IDs or data source property keys; the latter
10
10
  * are looked up in the `dataSource`'s `propertyIdsByKey`. Each value is re-parsed through
11
- * `notionPagePropertyValueSchema` with its `id` rewritten to the resolved property ID.
11
+ * the page property value schema with its `id` rewritten to the resolved property ID.
12
12
  */
13
13
  export function resolvePropertyWriteMapForDataSource(args) {
14
14
  const { dataSource, properties, operationName } = args;
package/dist/index.d.ts CHANGED
@@ -28,7 +28,7 @@ export type { CustomBlockListUsersErrorCode, CustomBlockListUsersErrorInfo, } fr
28
28
  export type { CustomBlockOpenPageErrorCode, CustomBlockOpenPageErrorInfo, OpenPageMode, } from "./protocol/messages/openPage.js";
29
29
  export type { CustomBlockQueryDataSourceErrorCode, CustomBlockQueryDataSourceErrorInfo, } from "./protocol/messages/queryDataSourceResult.js";
30
30
  export type { CustomBlockUpdatePageErrorCode, CustomBlockUpdatePageErrorInfo, } from "./protocol/messages/updatePageResult.js";
31
- export type { CustomBlockPage, NotionPage, NotionPageCover, NotionPageIcon, NotionPagePropertyValue, NotionPagePropertyWriteMap, } from "./protocol/pages/page.js";
31
+ export type { CustomBlockPage, NotionPage, NotionPageCover, NotionPageIcon, NotionPagePropertyReadMap, NotionPagePropertyValue, NotionPagePropertyWriteMap, } from "./protocol/pages/page.js";
32
32
  export type { NotionParent } from "./protocol/parent.js";
33
33
  export type { NotionTheme } from "./protocol/theme.js";
34
34
  export { pages, users } from "./bridge/sandboxClient.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,YAAY,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAA;AACtF,YAAY,EACX,sBAAsB,EACtB,gBAAgB,GAChB,MAAM,4DAA4D,CAAA;AACnE,YAAY,EAAE,qBAAqB,EAAE,MAAM,iEAAiE,CAAA;AAC5G,YAAY,EACX,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,sBAAsB,EACtB,eAAe,EACf,gBAAgB,EAChB,kBAAkB,GAClB,MAAM,2DAA2D,CAAA;AAClE,YAAY,EACX,wCAAwC,EACxC,wCAAwC,EACxC,4BAA4B,EAC5B,4BAA4B,GAC5B,MAAM,wDAAwD,CAAA;AAC/D,YAAY,EACX,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,GACjB,MAAM,gEAAgE,CAAA;AACvE,OAAO,EACN,2BAA2B,EAC3B,qBAAqB,GACrB,MAAM,gEAAgE,CAAA;AACvE,YAAY,EAAE,mBAAmB,EAAE,MAAM,+DAA+D,CAAA;AACxG,YAAY,EAAE,mBAAmB,EAAE,MAAM,+DAA+D,CAAA;AACxG,YAAY,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAA;AACtF,YAAY,EACX,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,YAAY,EACZ,aAAa,GACb,MAAM,yCAAyC,CAAA;AAChD,YAAY,EACX,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,GAChB,MAAM,8CAA8C,CAAA;AACrD,YA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C,MAAM,mDAAmD,CAAA;AAC1D,OAAO,EAAE,8BAA8B,EAAE,MAAM,mDAAmD,CAAA;AAClG,YAAY,EACX,6BAA6B,EAC7B,6BAA6B,GAC7B,MAAM,wDAAwD,CAAA;AAC/D,YAAY,EACX,4BAA4B,EAC5B,4BAA4B,EAC5B,YAAY,GACZ,MAAM,uDAAuD,CAAA;AAC9D,YAAY,EACX,mCAAmC,EACnC,mCAAmC,GACnC,MAAM,oEAAoE,CAAA;AAC3E,YAAY,EACX,8BAA8B,EAC9B,8BAA8B,GAC9B,MAAM,+DAA+D,CAAA;AACtE,YAAY,EACX,eAAe,EACf,UAAU,EACV,eAAe,EACf,cAAc,EACd,yBAAyB,EACzB,uBAAuB,EACvB,0BAA0B,GAC1B,MAAM,gDAAgD,CAAA;AACvD,YAAY,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAA;AAC9E,YAAY,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAA;AAC5E,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EACN,KAAK,sBAAsB,EAC3B,eAAe,EACf,gBAAgB,GAChB,MAAM,WAAW,CAAA;AAClB,cAAc,YAAY,CAAA"}
@@ -181,6 +181,34 @@ export declare const createPageMessageSchema: v.ObjectSchema<{
181
181
  readonly aws_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
182
182
  readonly google_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
183
183
  }, undefined>, undefined>;
184
+ }, undefined>, v.ObjectSchema<{
185
+ readonly id: v.StringSchema<undefined>;
186
+ readonly type: v.LiteralSchema<"created_time", undefined>;
187
+ readonly created_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
188
+ }, undefined>, v.ObjectSchema<{
189
+ readonly id: v.StringSchema<undefined>;
190
+ readonly type: v.LiteralSchema<"last_edited_time", undefined>;
191
+ readonly last_edited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
192
+ }, undefined>, v.ObjectSchema<{
193
+ readonly id: v.StringSchema<undefined>;
194
+ readonly type: v.LiteralSchema<"created_by", undefined>;
195
+ readonly created_by: v.NullableSchema<v.ObjectSchema<{
196
+ readonly id: v.StringSchema<undefined>;
197
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
198
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
199
+ }, undefined>, undefined>;
200
+ }, undefined>, v.ObjectSchema<{
201
+ readonly id: v.StringSchema<undefined>;
202
+ readonly type: v.LiteralSchema<"last_edited_by", undefined>;
203
+ readonly last_edited_by: v.NullableSchema<v.ObjectSchema<{
204
+ readonly id: v.StringSchema<undefined>;
205
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
206
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
207
+ }, undefined>, undefined>;
208
+ }, undefined>, v.ObjectSchema<{
209
+ readonly id: v.StringSchema<undefined>;
210
+ readonly type: v.LiteralSchema<"last_visited_time", undefined>;
211
+ readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
184
212
  }, undefined>], undefined>, undefined>;
185
213
  readonly position: v.OptionalSchema<v.VariantSchema<"type", [v.ObjectSchema<{
186
214
  readonly type: v.LiteralSchema<"start", undefined>;
@@ -1,6 +1,6 @@
1
1
  import * as v from "valibot";
2
2
  import { notionBlockIdSchema, notionDataSourceIdSchema, notionPageIdSchema, } from "../ids.js";
3
- import { notionPagePropertyWriteMapSchema } from "../pages/page.js";
3
+ import { notionPagePropertyReadMapSchema } from "../pages/page.js";
4
4
  /**
5
5
  * Describes where the newly created page should be inserted.
6
6
  * - `start` / `end` (default): prepend / append to the request's `parent`
@@ -46,6 +46,6 @@ export const createPageMessageSchema = v.object({
46
46
  * To create a page with manifest-defined property keys, call `pages.create`. The SDK resolves
47
47
  * those keys before it sends this message.
48
48
  */
49
- properties: notionPagePropertyWriteMapSchema,
49
+ properties: notionPagePropertyReadMapSchema,
50
50
  position: v.optional(notionCreatePagePositionSchema),
51
51
  });
@@ -161,6 +161,34 @@ export declare const createPageResultMessageSchema: v.VariantSchema<"status", [v
161
161
  readonly aws_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
162
162
  readonly google_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
163
163
  }, undefined>, undefined>;
164
+ }, undefined>, v.ObjectSchema<{
165
+ readonly id: v.StringSchema<undefined>;
166
+ readonly type: v.LiteralSchema<"created_time", undefined>;
167
+ readonly created_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
168
+ }, undefined>, v.ObjectSchema<{
169
+ readonly id: v.StringSchema<undefined>;
170
+ readonly type: v.LiteralSchema<"last_edited_time", undefined>;
171
+ readonly last_edited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
172
+ }, undefined>, v.ObjectSchema<{
173
+ readonly id: v.StringSchema<undefined>;
174
+ readonly type: v.LiteralSchema<"created_by", undefined>;
175
+ readonly created_by: v.NullableSchema<v.ObjectSchema<{
176
+ readonly id: v.StringSchema<undefined>;
177
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
178
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
179
+ }, undefined>, undefined>;
180
+ }, undefined>, v.ObjectSchema<{
181
+ readonly id: v.StringSchema<undefined>;
182
+ readonly type: v.LiteralSchema<"last_edited_by", undefined>;
183
+ readonly last_edited_by: v.NullableSchema<v.ObjectSchema<{
184
+ readonly id: v.StringSchema<undefined>;
185
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
186
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
187
+ }, undefined>, undefined>;
188
+ }, undefined>, v.ObjectSchema<{
189
+ readonly id: v.StringSchema<undefined>;
190
+ readonly type: v.LiteralSchema<"last_visited_time", undefined>;
191
+ readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
164
192
  }, undefined>], undefined>, undefined>;
165
193
  readonly created_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
166
194
  readonly last_edited_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
@@ -166,6 +166,34 @@ export declare const getPageResultMessageSchema: v.VariantSchema<"status", [v.Ob
166
166
  readonly aws_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
167
167
  readonly google_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
168
168
  }, undefined>, undefined>;
169
+ }, undefined>, v.ObjectSchema<{
170
+ readonly id: v.StringSchema<undefined>;
171
+ readonly type: v.LiteralSchema<"created_time", undefined>;
172
+ readonly created_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
173
+ }, undefined>, v.ObjectSchema<{
174
+ readonly id: v.StringSchema<undefined>;
175
+ readonly type: v.LiteralSchema<"last_edited_time", undefined>;
176
+ readonly last_edited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
177
+ }, undefined>, v.ObjectSchema<{
178
+ readonly id: v.StringSchema<undefined>;
179
+ readonly type: v.LiteralSchema<"created_by", undefined>;
180
+ readonly created_by: v.NullableSchema<v.ObjectSchema<{
181
+ readonly id: v.StringSchema<undefined>;
182
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
183
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
184
+ }, undefined>, undefined>;
185
+ }, undefined>, v.ObjectSchema<{
186
+ readonly id: v.StringSchema<undefined>;
187
+ readonly type: v.LiteralSchema<"last_edited_by", undefined>;
188
+ readonly last_edited_by: v.NullableSchema<v.ObjectSchema<{
189
+ readonly id: v.StringSchema<undefined>;
190
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
191
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
192
+ }, undefined>, undefined>;
193
+ }, undefined>, v.ObjectSchema<{
194
+ readonly id: v.StringSchema<undefined>;
195
+ readonly type: v.LiteralSchema<"last_visited_time", undefined>;
196
+ readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
169
197
  }, undefined>], undefined>, undefined>;
170
198
  readonly created_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
171
199
  readonly last_edited_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
@@ -685,6 +685,34 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
685
685
  readonly aws_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
686
686
  readonly google_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
687
687
  }, undefined>, undefined>;
688
+ }, undefined>, v.ObjectSchema<{
689
+ readonly id: v.StringSchema<undefined>;
690
+ readonly type: v.LiteralSchema<"created_time", undefined>;
691
+ readonly created_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
692
+ }, undefined>, v.ObjectSchema<{
693
+ readonly id: v.StringSchema<undefined>;
694
+ readonly type: v.LiteralSchema<"last_edited_time", undefined>;
695
+ readonly last_edited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
696
+ }, undefined>, v.ObjectSchema<{
697
+ readonly id: v.StringSchema<undefined>;
698
+ readonly type: v.LiteralSchema<"created_by", undefined>;
699
+ readonly created_by: v.NullableSchema<v.ObjectSchema<{
700
+ readonly id: v.StringSchema<undefined>;
701
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
702
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
703
+ }, undefined>, undefined>;
704
+ }, undefined>, v.ObjectSchema<{
705
+ readonly id: v.StringSchema<undefined>;
706
+ readonly type: v.LiteralSchema<"last_edited_by", undefined>;
707
+ readonly last_edited_by: v.NullableSchema<v.ObjectSchema<{
708
+ readonly id: v.StringSchema<undefined>;
709
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
710
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
711
+ }, undefined>, undefined>;
712
+ }, undefined>, v.ObjectSchema<{
713
+ readonly id: v.StringSchema<undefined>;
714
+ readonly type: v.LiteralSchema<"last_visited_time", undefined>;
715
+ readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
688
716
  }, undefined>], undefined>, undefined>;
689
717
  readonly created_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
690
718
  readonly last_edited_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
@@ -885,6 +913,34 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
885
913
  readonly aws_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
886
914
  readonly google_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
887
915
  }, undefined>, undefined>;
916
+ }, undefined>, v.ObjectSchema<{
917
+ readonly id: v.StringSchema<undefined>;
918
+ readonly type: v.LiteralSchema<"created_time", undefined>;
919
+ readonly created_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
920
+ }, undefined>, v.ObjectSchema<{
921
+ readonly id: v.StringSchema<undefined>;
922
+ readonly type: v.LiteralSchema<"last_edited_time", undefined>;
923
+ readonly last_edited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
924
+ }, undefined>, v.ObjectSchema<{
925
+ readonly id: v.StringSchema<undefined>;
926
+ readonly type: v.LiteralSchema<"created_by", undefined>;
927
+ readonly created_by: v.NullableSchema<v.ObjectSchema<{
928
+ readonly id: v.StringSchema<undefined>;
929
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
930
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
931
+ }, undefined>, undefined>;
932
+ }, undefined>, v.ObjectSchema<{
933
+ readonly id: v.StringSchema<undefined>;
934
+ readonly type: v.LiteralSchema<"last_edited_by", undefined>;
935
+ readonly last_edited_by: v.NullableSchema<v.ObjectSchema<{
936
+ readonly id: v.StringSchema<undefined>;
937
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
938
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
939
+ }, undefined>, undefined>;
940
+ }, undefined>, v.ObjectSchema<{
941
+ readonly id: v.StringSchema<undefined>;
942
+ readonly type: v.LiteralSchema<"last_visited_time", undefined>;
943
+ readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
888
944
  }, undefined>], undefined>, undefined>;
889
945
  readonly created_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
890
946
  readonly last_edited_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
@@ -1152,6 +1208,34 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
1152
1208
  readonly aws_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
1153
1209
  readonly google_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
1154
1210
  }, undefined>, undefined>;
1211
+ }, undefined>, v.ObjectSchema<{
1212
+ readonly id: v.StringSchema<undefined>;
1213
+ readonly type: v.LiteralSchema<"created_time", undefined>;
1214
+ readonly created_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1215
+ }, undefined>, v.ObjectSchema<{
1216
+ readonly id: v.StringSchema<undefined>;
1217
+ readonly type: v.LiteralSchema<"last_edited_time", undefined>;
1218
+ readonly last_edited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1219
+ }, undefined>, v.ObjectSchema<{
1220
+ readonly id: v.StringSchema<undefined>;
1221
+ readonly type: v.LiteralSchema<"created_by", undefined>;
1222
+ readonly created_by: v.NullableSchema<v.ObjectSchema<{
1223
+ readonly id: v.StringSchema<undefined>;
1224
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
1225
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1226
+ }, undefined>, undefined>;
1227
+ }, undefined>, v.ObjectSchema<{
1228
+ readonly id: v.StringSchema<undefined>;
1229
+ readonly type: v.LiteralSchema<"last_edited_by", undefined>;
1230
+ readonly last_edited_by: v.NullableSchema<v.ObjectSchema<{
1231
+ readonly id: v.StringSchema<undefined>;
1232
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
1233
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1234
+ }, undefined>, undefined>;
1235
+ }, undefined>, v.ObjectSchema<{
1236
+ readonly id: v.StringSchema<undefined>;
1237
+ readonly type: v.LiteralSchema<"last_visited_time", undefined>;
1238
+ readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1155
1239
  }, undefined>], undefined>, undefined>;
1156
1240
  readonly created_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1157
1241
  readonly last_edited_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
@@ -701,6 +701,34 @@ export declare const sandboxToHostMessageSchema: v.VariantSchema<"type", [v.Vari
701
701
  readonly aws_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
702
702
  readonly google_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
703
703
  }, undefined>, undefined>;
704
+ }, undefined>, v.ObjectSchema<{
705
+ readonly id: v.StringSchema<undefined>;
706
+ readonly type: v.LiteralSchema<"created_time", undefined>;
707
+ readonly created_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
708
+ }, undefined>, v.ObjectSchema<{
709
+ readonly id: v.StringSchema<undefined>;
710
+ readonly type: v.LiteralSchema<"last_edited_time", undefined>;
711
+ readonly last_edited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
712
+ }, undefined>, v.ObjectSchema<{
713
+ readonly id: v.StringSchema<undefined>;
714
+ readonly type: v.LiteralSchema<"created_by", undefined>;
715
+ readonly created_by: v.NullableSchema<v.ObjectSchema<{
716
+ readonly id: v.StringSchema<undefined>;
717
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
718
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
719
+ }, undefined>, undefined>;
720
+ }, undefined>, v.ObjectSchema<{
721
+ readonly id: v.StringSchema<undefined>;
722
+ readonly type: v.LiteralSchema<"last_edited_by", undefined>;
723
+ readonly last_edited_by: v.NullableSchema<v.ObjectSchema<{
724
+ readonly id: v.StringSchema<undefined>;
725
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
726
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
727
+ }, undefined>, undefined>;
728
+ }, undefined>, v.ObjectSchema<{
729
+ readonly id: v.StringSchema<undefined>;
730
+ readonly type: v.LiteralSchema<"last_visited_time", undefined>;
731
+ readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
704
732
  }, undefined>], undefined>, undefined>;
705
733
  readonly position: v.OptionalSchema<v.VariantSchema<"type", [v.ObjectSchema<{
706
734
  readonly type: v.LiteralSchema<"start", undefined>;
@@ -859,6 +887,34 @@ export declare const sandboxToHostMessageSchema: v.VariantSchema<"type", [v.Vari
859
887
  readonly aws_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
860
888
  readonly google_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
861
889
  }, undefined>, undefined>;
890
+ }, undefined>, v.ObjectSchema<{
891
+ readonly id: v.StringSchema<undefined>;
892
+ readonly type: v.LiteralSchema<"created_time", undefined>;
893
+ readonly created_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
894
+ }, undefined>, v.ObjectSchema<{
895
+ readonly id: v.StringSchema<undefined>;
896
+ readonly type: v.LiteralSchema<"last_edited_time", undefined>;
897
+ readonly last_edited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
898
+ }, undefined>, v.ObjectSchema<{
899
+ readonly id: v.StringSchema<undefined>;
900
+ readonly type: v.LiteralSchema<"created_by", undefined>;
901
+ readonly created_by: v.NullableSchema<v.ObjectSchema<{
902
+ readonly id: v.StringSchema<undefined>;
903
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
904
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
905
+ }, undefined>, undefined>;
906
+ }, undefined>, v.ObjectSchema<{
907
+ readonly id: v.StringSchema<undefined>;
908
+ readonly type: v.LiteralSchema<"last_edited_by", undefined>;
909
+ readonly last_edited_by: v.NullableSchema<v.ObjectSchema<{
910
+ readonly id: v.StringSchema<undefined>;
911
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
912
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
913
+ }, undefined>, undefined>;
914
+ }, undefined>, v.ObjectSchema<{
915
+ readonly id: v.StringSchema<undefined>;
916
+ readonly type: v.LiteralSchema<"last_visited_time", undefined>;
917
+ readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
862
918
  }, undefined>], undefined>, undefined>, undefined>;
863
919
  readonly icon: v.OptionalSchema<v.VariantSchema<"type", [v.ObjectSchema<{
864
920
  readonly type: v.LiteralSchema<"emoji", undefined>;
@@ -137,6 +137,34 @@ export declare const updatePageMessageSchema: v.ObjectSchema<{
137
137
  readonly aws_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
138
138
  readonly google_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
139
139
  }, undefined>, undefined>;
140
+ }, undefined>, v.ObjectSchema<{
141
+ readonly id: v.StringSchema<undefined>;
142
+ readonly type: v.LiteralSchema<"created_time", undefined>;
143
+ readonly created_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
144
+ }, undefined>, v.ObjectSchema<{
145
+ readonly id: v.StringSchema<undefined>;
146
+ readonly type: v.LiteralSchema<"last_edited_time", undefined>;
147
+ readonly last_edited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
148
+ }, undefined>, v.ObjectSchema<{
149
+ readonly id: v.StringSchema<undefined>;
150
+ readonly type: v.LiteralSchema<"created_by", undefined>;
151
+ readonly created_by: v.NullableSchema<v.ObjectSchema<{
152
+ readonly id: v.StringSchema<undefined>;
153
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
154
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
155
+ }, undefined>, undefined>;
156
+ }, undefined>, v.ObjectSchema<{
157
+ readonly id: v.StringSchema<undefined>;
158
+ readonly type: v.LiteralSchema<"last_edited_by", undefined>;
159
+ readonly last_edited_by: v.NullableSchema<v.ObjectSchema<{
160
+ readonly id: v.StringSchema<undefined>;
161
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
162
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
163
+ }, undefined>, undefined>;
164
+ }, undefined>, v.ObjectSchema<{
165
+ readonly id: v.StringSchema<undefined>;
166
+ readonly type: v.LiteralSchema<"last_visited_time", undefined>;
167
+ readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
140
168
  }, undefined>], undefined>, undefined>, undefined>;
141
169
  readonly icon: v.OptionalSchema<v.VariantSchema<"type", [v.ObjectSchema<{
142
170
  readonly type: v.LiteralSchema<"emoji", undefined>;
@@ -1,6 +1,6 @@
1
1
  import * as v from "valibot";
2
2
  import { notionPageIdSchema } from "../ids.js";
3
- import { notionPageCoverSchema, notionPageIconSchema, notionPagePropertyWriteMapSchema, } from "../pages/page.js";
3
+ import { notionPageCoverSchema, notionPageIconSchema, notionPagePropertyReadMapSchema, } from "../pages/page.js";
4
4
  /**
5
5
  * The sandbox sends this message to patch a page.
6
6
  */
@@ -15,7 +15,7 @@ export const updatePageMessageSchema = v.object({
15
15
  * To update a page with manifest-defined property keys, call `row.update()` on a row returned
16
16
  * by `useDataSource()`. The SDK resolves those keys before it sends this message.
17
17
  */
18
- properties: v.optional(notionPagePropertyWriteMapSchema),
18
+ properties: v.optional(notionPagePropertyReadMapSchema),
19
19
  icon: v.optional(notionPageIconSchema),
20
20
  cover: v.optional(notionPageCoverSchema),
21
21
  archived: v.optional(v.boolean()),
@@ -160,6 +160,34 @@ export declare const updatePageResultMessageSchema: v.VariantSchema<"status", [v
160
160
  readonly aws_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
161
161
  readonly google_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
162
162
  }, undefined>, undefined>;
163
+ }, undefined>, v.ObjectSchema<{
164
+ readonly id: v.StringSchema<undefined>;
165
+ readonly type: v.LiteralSchema<"created_time", undefined>;
166
+ readonly created_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
167
+ }, undefined>, v.ObjectSchema<{
168
+ readonly id: v.StringSchema<undefined>;
169
+ readonly type: v.LiteralSchema<"last_edited_time", undefined>;
170
+ readonly last_edited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
171
+ }, undefined>, v.ObjectSchema<{
172
+ readonly id: v.StringSchema<undefined>;
173
+ readonly type: v.LiteralSchema<"created_by", undefined>;
174
+ readonly created_by: v.NullableSchema<v.ObjectSchema<{
175
+ readonly id: v.StringSchema<undefined>;
176
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
177
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
178
+ }, undefined>, undefined>;
179
+ }, undefined>, v.ObjectSchema<{
180
+ readonly id: v.StringSchema<undefined>;
181
+ readonly type: v.LiteralSchema<"last_edited_by", undefined>;
182
+ readonly last_edited_by: v.NullableSchema<v.ObjectSchema<{
183
+ readonly id: v.StringSchema<undefined>;
184
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
185
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
186
+ }, undefined>, undefined>;
187
+ }, undefined>, v.ObjectSchema<{
188
+ readonly id: v.StringSchema<undefined>;
189
+ readonly type: v.LiteralSchema<"last_visited_time", undefined>;
190
+ readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
163
191
  }, undefined>], undefined>, undefined>;
164
192
  readonly created_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
165
193
  readonly last_edited_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
@@ -283,9 +283,37 @@ export declare const notionPagePropertyValueSchema: v.VariantSchema<"type", [v.O
283
283
  readonly aws_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
284
284
  readonly google_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
285
285
  }, undefined>, undefined>;
286
+ }, undefined>, v.ObjectSchema<{
287
+ readonly id: v.StringSchema<undefined>;
288
+ readonly type: v.LiteralSchema<"created_time", undefined>;
289
+ readonly created_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
290
+ }, undefined>, v.ObjectSchema<{
291
+ readonly id: v.StringSchema<undefined>;
292
+ readonly type: v.LiteralSchema<"last_edited_time", undefined>;
293
+ readonly last_edited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
294
+ }, undefined>, v.ObjectSchema<{
295
+ readonly id: v.StringSchema<undefined>;
296
+ readonly type: v.LiteralSchema<"created_by", undefined>;
297
+ readonly created_by: v.NullableSchema<v.ObjectSchema<{
298
+ readonly id: v.StringSchema<undefined>;
299
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
300
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
301
+ }, undefined>, undefined>;
302
+ }, undefined>, v.ObjectSchema<{
303
+ readonly id: v.StringSchema<undefined>;
304
+ readonly type: v.LiteralSchema<"last_edited_by", undefined>;
305
+ readonly last_edited_by: v.NullableSchema<v.ObjectSchema<{
306
+ readonly id: v.StringSchema<undefined>;
307
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
308
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
309
+ }, undefined>, undefined>;
310
+ }, undefined>, v.ObjectSchema<{
311
+ readonly id: v.StringSchema<undefined>;
312
+ readonly type: v.LiteralSchema<"last_visited_time", undefined>;
313
+ readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
286
314
  }, undefined>], undefined>;
287
315
  export type NotionPagePropertyValue = v.InferOutput<typeof notionPagePropertyValueSchema>;
288
- export declare const notionPagePropertyWriteMapSchema: v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
316
+ export declare const notionPagePropertyReadMapSchema: v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
289
317
  readonly id: v.StringSchema<undefined>;
290
318
  readonly type: v.LiteralSchema<"title", undefined>;
291
319
  readonly title: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
@@ -409,8 +437,39 @@ export declare const notionPagePropertyWriteMapSchema: v.RecordSchema<v.StringSc
409
437
  readonly aws_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
410
438
  readonly google_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
411
439
  }, undefined>, undefined>;
440
+ }, undefined>, v.ObjectSchema<{
441
+ readonly id: v.StringSchema<undefined>;
442
+ readonly type: v.LiteralSchema<"created_time", undefined>;
443
+ readonly created_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
444
+ }, undefined>, v.ObjectSchema<{
445
+ readonly id: v.StringSchema<undefined>;
446
+ readonly type: v.LiteralSchema<"last_edited_time", undefined>;
447
+ readonly last_edited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
448
+ }, undefined>, v.ObjectSchema<{
449
+ readonly id: v.StringSchema<undefined>;
450
+ readonly type: v.LiteralSchema<"created_by", undefined>;
451
+ readonly created_by: v.NullableSchema<v.ObjectSchema<{
452
+ readonly id: v.StringSchema<undefined>;
453
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
454
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
455
+ }, undefined>, undefined>;
456
+ }, undefined>, v.ObjectSchema<{
457
+ readonly id: v.StringSchema<undefined>;
458
+ readonly type: v.LiteralSchema<"last_edited_by", undefined>;
459
+ readonly last_edited_by: v.NullableSchema<v.ObjectSchema<{
460
+ readonly id: v.StringSchema<undefined>;
461
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
462
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
463
+ }, undefined>, undefined>;
464
+ }, undefined>, v.ObjectSchema<{
465
+ readonly id: v.StringSchema<undefined>;
466
+ readonly type: v.LiteralSchema<"last_visited_time", undefined>;
467
+ readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
412
468
  }, undefined>], undefined>, undefined>;
413
- export type NotionPagePropertyWriteMap = v.InferOutput<typeof notionPagePropertyWriteMapSchema>;
469
+ export type NotionPagePropertyReadMap = v.InferOutput<typeof notionPagePropertyReadMapSchema>;
470
+ export type NotionPagePropertyWriteMap = Record<string, Exclude<NotionPagePropertyValue, {
471
+ type: "created_time" | "last_edited_time" | "created_by" | "last_edited_by" | "last_visited_time";
472
+ }>>;
414
473
  /**
415
474
  * The `Page` object returned in `createPageResult` messages.
416
475
  */
@@ -559,6 +618,34 @@ export declare const notionPageSchema: v.ObjectSchema<{
559
618
  readonly aws_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
560
619
  readonly google_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
561
620
  }, undefined>, undefined>;
621
+ }, undefined>, v.ObjectSchema<{
622
+ readonly id: v.StringSchema<undefined>;
623
+ readonly type: v.LiteralSchema<"created_time", undefined>;
624
+ readonly created_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
625
+ }, undefined>, v.ObjectSchema<{
626
+ readonly id: v.StringSchema<undefined>;
627
+ readonly type: v.LiteralSchema<"last_edited_time", undefined>;
628
+ readonly last_edited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
629
+ }, undefined>, v.ObjectSchema<{
630
+ readonly id: v.StringSchema<undefined>;
631
+ readonly type: v.LiteralSchema<"created_by", undefined>;
632
+ readonly created_by: v.NullableSchema<v.ObjectSchema<{
633
+ readonly id: v.StringSchema<undefined>;
634
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
635
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
636
+ }, undefined>, undefined>;
637
+ }, undefined>, v.ObjectSchema<{
638
+ readonly id: v.StringSchema<undefined>;
639
+ readonly type: v.LiteralSchema<"last_edited_by", undefined>;
640
+ readonly last_edited_by: v.NullableSchema<v.ObjectSchema<{
641
+ readonly id: v.StringSchema<undefined>;
642
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
643
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
644
+ }, undefined>, undefined>;
645
+ }, undefined>, v.ObjectSchema<{
646
+ readonly id: v.StringSchema<undefined>;
647
+ readonly type: v.LiteralSchema<"last_visited_time", undefined>;
648
+ readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
562
649
  }, undefined>], undefined>, undefined>;
563
650
  readonly created_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
564
651
  readonly last_edited_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
@@ -5,6 +5,7 @@
5
5
  * shape the host delivers for messages like `createPageResult`.
6
6
  */
7
7
  import * as v from "valibot";
8
+ import { notionRecordPointerSchema } from "../dataSources/recordPointer.js";
8
9
  import { notionPageIdSchema } from "../ids.js";
9
10
  import { notionParentSchema } from "../parent.js";
10
11
  /**
@@ -117,6 +118,11 @@ const notionPlaceInputSchema = v.object({
117
118
  const pagePropertyBaseSchema = {
118
119
  id: v.string(),
119
120
  };
121
+ const metadataActorSchema = v.nullable(v.object({
122
+ ...notionRecordPointerSchema.entries,
123
+ table: v.picklist(["notion_user", "bot", "organization_bot"]),
124
+ spaceId: v.optional(v.string()),
125
+ }));
120
126
  /**
121
127
  * A page property value.
122
128
  */
@@ -197,8 +203,33 @@ export const notionPagePropertyValueSchema = v.variant("type", [
197
203
  type: v.literal("place"),
198
204
  place: v.nullable(notionPlaceInputSchema),
199
205
  }),
206
+ v.object({
207
+ ...pagePropertyBaseSchema,
208
+ type: v.literal("created_time"),
209
+ created_time: nullableStringSchema,
210
+ }),
211
+ v.object({
212
+ ...pagePropertyBaseSchema,
213
+ type: v.literal("last_edited_time"),
214
+ last_edited_time: nullableStringSchema,
215
+ }),
216
+ v.object({
217
+ ...pagePropertyBaseSchema,
218
+ type: v.literal("created_by"),
219
+ created_by: metadataActorSchema,
220
+ }),
221
+ v.object({
222
+ ...pagePropertyBaseSchema,
223
+ type: v.literal("last_edited_by"),
224
+ last_edited_by: metadataActorSchema,
225
+ }),
226
+ v.object({
227
+ ...pagePropertyBaseSchema,
228
+ type: v.literal("last_visited_time"),
229
+ last_visited_time: nullableStringSchema,
230
+ }),
200
231
  ]);
201
- export const notionPagePropertyWriteMapSchema = v.record(v.string(), notionPagePropertyValueSchema);
232
+ export const notionPagePropertyReadMapSchema = v.record(v.string(), notionPagePropertyValueSchema);
202
233
  /**
203
234
  * The `Page` object returned in `createPageResult` messages.
204
235
  */
@@ -206,7 +237,7 @@ export const notionPageSchema = v.object({
206
237
  object: v.literal("page"),
207
238
  id: notionPageIdSchema,
208
239
  parent: notionParentSchema,
209
- properties: notionPagePropertyWriteMapSchema,
240
+ properties: notionPagePropertyReadMapSchema,
210
241
  created_time: v.optional(v.string()),
211
242
  last_edited_time: v.optional(v.string()),
212
243
  icon: v.optional(notionPageIconSchema),
package/dist/types.d.ts CHANGED
@@ -14,7 +14,7 @@ import type { CustomBlockCheckboxFilterOperator, CustomBlockContainsFilterOperat
14
14
  import type { CustomBlockQueryDataSourceErrorInfo } from "./protocol/messages/queryDataSourceResult.js";
15
15
  import type { UpdatePageMessage } from "./protocol/messages/updatePage.js";
16
16
  import type { CustomBlockUpdatePageErrorInfo, UpdatePageResultMessage } from "./protocol/messages/updatePageResult.js";
17
- import type { NotionPageCover, NotionPageIcon, NotionPagePropertyValue } from "./protocol/pages/page.js";
17
+ import type { NotionPageCover, NotionPageIcon, NotionPagePropertyWriteMap } from "./protocol/pages/page.js";
18
18
  import type { ExclusiveUnion } from "./typeUtils.js";
19
19
  export type { CustomBlockErrorInfo } from "./protocol/errors.js";
20
20
  export type { NotionDataSourceId, NotionSpaceId, } from "./protocol/ids.js";
@@ -25,7 +25,7 @@ export type { CustomBlockCreatePageErrorInfo, CustomBlockGetPageErrorInfo, Custo
25
25
  * property keys. `id` is optional because the SDK resolves the final raw property ID
26
26
  * from the map key before sending the bridge message.
27
27
  */
28
- export type NotionPagePropertyInputValue = NotionPagePropertyValue extends infer PropertyValue ? PropertyValue extends {
28
+ export type NotionPagePropertyInputValue = NotionPagePropertyWriteMap[string] extends infer PropertyValue ? PropertyValue extends {
29
29
  id: string;
30
30
  } ? Omit<PropertyValue, "id"> & {
31
31
  id?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4DAA4D,CAAA;AACxG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,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AM,MAAM,cAAc,GAAG,oBAAoB,CAChD,qBAAqB,EACrB,4BAA4B,CAC5B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,CAClD,uBAAuB,EACvB,8BAA8B,CAC9B,CAAA;AAED,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,gBAAgB,EAAE,MAAM,GAAG,WAAW,CAAC,CAAA;AAExE,MAAM,MAAM,eAAe,GAAG,oBAAoB,CACjD,sBAAsB,EACtB,6BAA6B,CAC7B,CAAA;AAED,MAAM,MAAM,aAAa,GAAG,oBAAoB,CAC/C,oBAAoB,EACpB,2BAA2B,CAC3B,CAAA"}
package/dist/version.js CHANGED
@@ -4,4 +4,4 @@
4
4
  *
5
5
  * WARNING: Generated during SDK publish. Do not edit in the published package.
6
6
  */
7
- export const CUSTOM_BLOCKS_SDK_VERSION = "0.2.23"
7
+ export const CUSTOM_BLOCKS_SDK_VERSION = "0.2.24"
@@ -354,6 +354,9 @@ The four built-ins (`created_time`, `last_edited_time`, `created_by`, `last_edit
354
354
  present in row `propertiesById` and snapshot `propertySchemasById`. They have no semantic keys, so
355
355
  they do not appear in the `*ByKey` views.
356
356
 
357
+ Matching metadata columns also appear under their schema property IDs and bound semantic keys.
358
+ `last_visited_time` requires an internal schema property and resolves the current viewer’s visit.
359
+
357
360
  `collectionSchema.propertiesById` contains only actual database properties. The SDK uses this map to
358
361
  resolve bindings and validate every filter and sort reference. Synthetic metadata in
359
362
  `propertySchemasById` does not make a property available for filters or sorts.
@@ -504,34 +507,34 @@ This table shows property support for custom blocks running in Notion.
504
507
  - πŸ”΄ **Unavailable:** The SDK does not expose this operation.
505
508
  - ⚫ **Not supported in Notion:** Notion itself does not support this operation in the stated case.
506
509
 
507
- | Property type | Query result | Update row | Filter | Sort |
508
- | ------------------- | --------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
509
- | `title` | 🟒 Plain text | 🟑 Plain text only | 🟒 Supported | 🟒 Supported |
510
- | `rich_text` | 🟒 Plain text | 🟑 Plain text only | 🟒 Supported | 🟒 Supported |
511
- | `number` | 🟒 Number | 🟒 Supported | 🟒 Supported | 🟒 Supported |
512
- | `checkbox` | 🟒 Boolean | 🟒 Supported | 🟒 Supported | 🟒 Supported |
513
- | `url` | 🟒 String | 🟒 Supported | 🟒 Supported | 🟒 Supported |
514
- | `email` | 🟒 String | 🟒 Supported | 🟒 Supported | 🟒 Supported |
515
- | `phone_number` | 🟒 String | 🟒 Supported | 🟒 Supported | 🟒 Supported |
516
- | `select` | 🟒 Option name | 🟑 Set value only | 🟒 Supported | πŸ”΄ Unavailable |
517
- | `multi_select` | 🟒 Array of option names | 🟑 Set values only | 🟒 Supported | πŸ”΄ Unavailable |
518
- | `status` | 🟒 Option name | 🟑 Set value only | 🟒 Option names, group names, or empty checks | πŸ”΄ Unavailable |
519
- | `date` | 🟒 `NotionDateValue` | 🟑 Minute precision | 🟒 Supported | 🟒 Supported |
520
- | `people` | 🟒 Array of record pointers | 🟒 Supported | 🟒 Supported | 🟒 Native name ordering |
521
- | `files` | 🟑 Text fallback | 🟑 File URLs only | πŸ”΄ Unavailable | πŸ”΄ Unavailable |
522
- | `unique_id` | 🟑 Text fallback | πŸ”΄ Unavailable | πŸ”΄ Unavailable | πŸ”΄ Unavailable |
523
- | `relation` | 🟒 Array of record pointers | 🟑 Replaces value. Rejects `has_more: true`. | 🟒 Supported | πŸ”΄ Unavailable for standard relations. ⚫ Notion cannot sort XLDB targets. |
524
- | `place` | 🟑 Text fallback | 🟒 Supported | πŸ”΄ Unavailable | πŸ”΄ Unavailable |
525
- | `formula` | 🟑 Text fallback | πŸ”΄ Unavailable | πŸ”΄ Unavailable | πŸ”΄ Unavailable |
526
- | `rollup` | 🟑 Text fallback | πŸ”΄ Unavailable | πŸ”΄ Unavailable | πŸ”΄ Unavailable for numeric targets or numeric aggregations. ⚫ Notion cannot sort other rollups. |
527
- | `button` | 🟑 Text fallback | πŸ”΄ Unavailable | ⚫ Not supported in Notion | ⚫ Not supported in Notion |
528
- | `verification` | 🟑 Text fallback | πŸ”΄ Unavailable | πŸ”΄ Unavailable | πŸ”΄ Unavailable |
529
- | `last_visited_time` | 🟑 Text fallback | πŸ”΄ Unavailable | πŸ”΄ Unavailable | πŸ”΄ Unavailable |
530
- | `location` | 🟑 Text fallback | πŸ”΄ Unavailable | πŸ”΄ Unavailable elsewhere. ⚫ Notion disables filters in My Meetings and Library system databases. | πŸ”΄ Unavailable elsewhere. ⚫ Notion disables sorts in Library system databases. |
531
- | `created_time` | 🟒 `NotionDateTime` in UTC | πŸ”΄ Unavailable | πŸ”΄ Unavailable | 🟑 Schema property only |
532
- | `last_edited_time` | 🟒 `NotionDateTime` in UTC | πŸ”΄ Unavailable | πŸ”΄ Unavailable | 🟑 Schema property only |
533
- | `created_by` | 🟒 Array of record pointers | πŸ”΄ Unavailable | 🟑 Schema-backed creator filters | 🟑 Schema property only |
534
- | `last_edited_by` | 🟒 Array of record pointers | πŸ”΄ Unavailable | πŸ”΄ Unavailable | πŸ”΄ Unavailable |
510
+ | Property type | Query result | Update row | Filter | Sort |
511
+ | ------------------- | ----------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
512
+ | `title` | 🟒 Plain text | 🟑 Plain text only | 🟒 Supported | 🟒 Supported |
513
+ | `rich_text` | 🟒 Plain text | 🟑 Plain text only | 🟒 Supported | 🟒 Supported |
514
+ | `number` | 🟒 Number | 🟒 Supported | 🟒 Supported | 🟒 Supported |
515
+ | `checkbox` | 🟒 Boolean | 🟒 Supported | 🟒 Supported | 🟒 Supported |
516
+ | `url` | 🟒 String | 🟒 Supported | 🟒 Supported | 🟒 Supported |
517
+ | `email` | 🟒 String | 🟒 Supported | 🟒 Supported | 🟒 Supported |
518
+ | `phone_number` | 🟒 String | 🟒 Supported | 🟒 Supported | 🟒 Supported |
519
+ | `select` | 🟒 Option name | 🟑 Set value only | 🟒 Supported | πŸ”΄ Unavailable |
520
+ | `multi_select` | 🟒 Array of option names | 🟑 Set values only | 🟒 Supported | πŸ”΄ Unavailable |
521
+ | `status` | 🟒 Option name | 🟑 Set value only | 🟒 Option names, group names, or empty checks | πŸ”΄ Unavailable |
522
+ | `date` | 🟒 `NotionDateValue` | 🟑 Minute precision | 🟒 Supported | 🟒 Supported |
523
+ | `people` | 🟒 Array of record pointers | 🟒 Supported | 🟒 Supported | 🟒 Native name ordering |
524
+ | `files` | 🟑 Text fallback | 🟑 File URLs only | πŸ”΄ Unavailable | πŸ”΄ Unavailable |
525
+ | `unique_id` | 🟑 Text fallback | πŸ”΄ Unavailable | πŸ”΄ Unavailable | πŸ”΄ Unavailable |
526
+ | `relation` | 🟒 Array of record pointers | 🟑 Replaces value. Rejects `has_more: true`. | 🟒 Supported | πŸ”΄ Unavailable for standard relations. ⚫ Notion cannot sort XLDB targets. |
527
+ | `place` | 🟑 Text fallback | 🟒 Supported | πŸ”΄ Unavailable | πŸ”΄ Unavailable |
528
+ | `formula` | 🟑 Text fallback | πŸ”΄ Unavailable | πŸ”΄ Unavailable | πŸ”΄ Unavailable |
529
+ | `rollup` | 🟑 Text fallback | πŸ”΄ Unavailable | πŸ”΄ Unavailable | πŸ”΄ Unavailable for numeric targets or numeric aggregations. ⚫ Notion cannot sort other rollups. |
530
+ | `button` | 🟑 Text fallback | πŸ”΄ Unavailable | ⚫ Not supported in Notion | ⚫ Not supported in Notion |
531
+ | `verification` | 🟑 Text fallback | πŸ”΄ Unavailable | πŸ”΄ Unavailable | πŸ”΄ Unavailable |
532
+ | `last_visited_time` | 🟑 Viewer’s `NotionDateTime` in UTC | πŸ”΄ Unavailable | πŸ”΄ Unavailable | πŸ”΄ Unavailable |
533
+ | `location` | 🟑 Text fallback | πŸ”΄ Unavailable | πŸ”΄ Unavailable elsewhere. ⚫ Notion disables filters in My Meetings and Library system databases. | πŸ”΄ Unavailable elsewhere. ⚫ Notion disables sorts in Library system databases. |
534
+ | `created_time` | 🟒 `NotionDateTime` in UTC | πŸ”΄ Unavailable | πŸ”΄ Unavailable | 🟑 Schema property only |
535
+ | `last_edited_time` | 🟒 `NotionDateTime` in UTC | πŸ”΄ Unavailable | πŸ”΄ Unavailable | 🟑 Schema property only |
536
+ | `created_by` | 🟒 Array of record pointers | πŸ”΄ Unavailable | 🟑 Schema-backed creator filters | 🟑 Schema property only |
537
+ | `last_edited_by` | 🟒 Array of record pointers | πŸ”΄ Unavailable | πŸ”΄ Unavailable | πŸ”΄ Unavailable |
535
538
 
536
539
  ### Notes
537
540
 
package/docs/pages.md CHANGED
@@ -193,8 +193,7 @@ Do **not** send `{ type: "file_upload", file_upload: { id } }`; the host will re
193
193
  This table shows property support for custom blocks running in Notion.
194
194
 
195
195
  - **Read value** shows `page.properties` in responses from `pages.get`, `pages.create`, and
196
- `pages.update`. The table identifies top-level fields separately. Unavailable values are absent
197
- from `page.properties`.
196
+ `pages.update`. Unsupported property types are omitted from `page.properties`.
198
197
  - **Create** covers property writes through `pages.create`.
199
198
  - **Update** covers property writes through `pages.update`.
200
199
 
@@ -228,12 +227,12 @@ and a property in its schema.
228
227
  | `rollup` | πŸ”΄ Unavailable | πŸ”΄ Unavailable | πŸ”΄ Unavailable |
229
228
  | `button` | πŸ”΄ Unavailable | πŸ”΄ Unavailable | πŸ”΄ Unavailable |
230
229
  | `verification` | πŸ”΄ Unavailable | πŸ”΄ Unavailable | πŸ”΄ Unavailable |
231
- | `last_visited_time` | πŸ”΄ Unavailable | πŸ”΄ Unavailable | πŸ”΄ Unavailable |
230
+ | `last_visited_time` | 🟑 Current viewer’s ISO timestamp | πŸ”΄ Unavailable | πŸ”΄ Unavailable |
232
231
  | `location` | πŸ”΄ Unavailable | πŸ”΄ Unavailable | πŸ”΄ Unavailable |
233
- | `created_time` | 🟑 Top-level ISO timestamp only | πŸ”΄ Unavailable | πŸ”΄ Unavailable |
234
- | `last_edited_time` | 🟑 Top-level ISO timestamp only | πŸ”΄ Unavailable | πŸ”΄ Unavailable |
235
- | `created_by` | πŸ”΄ Unavailable | πŸ”΄ Unavailable | πŸ”΄ Unavailable |
236
- | `last_edited_by` | πŸ”΄ Unavailable | πŸ”΄ Unavailable | πŸ”΄ Unavailable |
232
+ | `created_time` | 🟒 ISO timestamp in UTC | πŸ”΄ Unavailable | πŸ”΄ Unavailable |
233
+ | `last_edited_time` | 🟒 ISO timestamp in UTC | πŸ”΄ Unavailable | πŸ”΄ Unavailable |
234
+ | `created_by` | 🟒 Actor record pointer | πŸ”΄ Unavailable | πŸ”΄ Unavailable |
235
+ | `last_edited_by` | 🟒 Actor record pointer | πŸ”΄ Unavailable | πŸ”΄ Unavailable |
237
236
 
238
237
  ### Notes
239
238
 
@@ -248,10 +247,9 @@ and a property in its schema.
248
247
  source. Create/update responses include link items only. File writes accept `external` URLs and
249
248
  existing `file` URLs and store them as links. Upload references (`file_upload`) are unsupported.
250
249
  - Relation writes replace the value and reject `has_more: true`.
251
- - `created_time` and `last_edited_time` are read-only top-level fields on `page`, when available.
252
- The host omits them from `page.properties`. The host does not return `created_by` or
253
- `last_edited_by`, even as top-level fields. The host does not return structured page values for
254
- formula, rollup, unique ID, or the other omitted types.
250
+ - Top-level `created_time` and `last_edited_time` remain available independently of schema
251
+ properties.
252
+ - Formula, rollup, unique ID, and other omitted types do not return structured page values.
255
253
 
256
254
  For flattened query values, filters, and sorts, see
257
255
  [Data source property support](./data-sources.md#property-support).
@@ -269,6 +267,7 @@ For flattened query values, filters, and sorts, see
269
267
  `pages.update` (may omit `id` for `create`).
270
268
  - `NotionPagePropertyInputMap` β€” input map for `pages.create` (keys can be raw property IDs, or
271
269
  semantic keys when creating into a mapped data source).
270
+ - `NotionPagePropertyReadMap`: maps property IDs to returned property values.
272
271
  - `NotionPagePropertyWriteMap` β€” input map for `pages.update` (raw property IDs only).
273
272
  - `NotionCreatePagePosition` β€” `start` / `end` / `before` / `after` insertion variants.
274
273
  - `OpenPageMode` β€” `"side_peek"` / `"center_peek"`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@notionhq/custom-blocks",
3
- "version": "0.2.23",
3
+ "version": "0.2.24",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -3,13 +3,13 @@ import type {
3
3
  CustomBlockPropertyErrorCode,
4
4
  CustomBlockPropertyErrorInfo,
5
5
  } from "@notionhq/custom-blocks-protocol/dataSources/errors.js"
6
- import type { NotionPagePropertyWriteMap } from "@notionhq/custom-blocks-protocol/pages/page.js"
6
+ import type { CreatePageMessage } from "@notionhq/custom-blocks-protocol/messages/createPage.js"
7
7
  import { notionPagePropertyValueSchema } from "@notionhq/custom-blocks-protocol/pages/page.js"
8
8
  import * as v from "valibot"
9
9
  import type { NotionPagePropertyInputMap } from "../../types.js"
10
10
 
11
11
  export type PropertyWriteMapResolutionResult =
12
- | { status: "success"; properties: NotionPagePropertyWriteMap }
12
+ | { status: "success"; properties: CreatePageMessage["properties"] }
13
13
  | { status: "error"; error: CustomBlockPropertyErrorInfo }
14
14
 
15
15
  function makePropertyError(
@@ -24,7 +24,7 @@ function makePropertyError(
24
24
  *
25
25
  * Identifiers in `properties` may be raw property IDs or data source property keys; the latter
26
26
  * are looked up in the `dataSource`'s `propertyIdsByKey`. Each value is re-parsed through
27
- * `notionPagePropertyValueSchema` with its `id` rewritten to the resolved property ID.
27
+ * the page property value schema with its `id` rewritten to the resolved property ID.
28
28
  */
29
29
  export function resolvePropertyWriteMapForDataSource(args: {
30
30
  dataSource: NotionDataSource | undefined
@@ -33,7 +33,7 @@ export function resolvePropertyWriteMapForDataSource(args: {
33
33
  }): PropertyWriteMapResolutionResult {
34
34
  const { dataSource, properties, operationName } = args
35
35
 
36
- const resolvedProperties: NotionPagePropertyWriteMap = {}
36
+ const resolvedProperties: CreatePageMessage["properties"] = {}
37
37
  for (const [identifier, value] of Object.entries(properties)) {
38
38
  const propertyIdResult = resolvePropertyIdentifierForDataSource({
39
39
  dataSource,
package/src/index.ts CHANGED
@@ -99,6 +99,7 @@ export type {
99
99
  NotionPage,
100
100
  NotionPageCover,
101
101
  NotionPageIcon,
102
+ NotionPagePropertyReadMap,
102
103
  NotionPagePropertyValue,
103
104
  NotionPagePropertyWriteMap,
104
105
  } from "@notionhq/custom-blocks-protocol/pages/page.js"
package/src/types.ts CHANGED
@@ -52,7 +52,7 @@ import type {
52
52
  import type {
53
53
  NotionPageCover,
54
54
  NotionPageIcon,
55
- NotionPagePropertyValue,
55
+ NotionPagePropertyWriteMap,
56
56
  } from "@notionhq/custom-blocks-protocol/pages/page.js"
57
57
 
58
58
  import type { ExclusiveUnion } from "./typeUtils.js"
@@ -83,7 +83,7 @@ export type {
83
83
  * from the map key before sending the bridge message.
84
84
  */
85
85
  export type NotionPagePropertyInputValue =
86
- NotionPagePropertyValue extends infer PropertyValue
86
+ NotionPagePropertyWriteMap[string] extends infer PropertyValue
87
87
  ? PropertyValue extends { id: string }
88
88
  ? Omit<PropertyValue, "id"> & { id?: string }
89
89
  : never