@notionhq/custom-blocks 0.1.37 → 0.1.39

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 (42) hide show
  1. package/README.md +5 -0
  2. package/bin/notion-custom-blocks/build.d.ts +23 -0
  3. package/bin/notion-custom-blocks/bundle.d.ts +4 -0
  4. package/bin/notion-custom-blocks/bundle.js +2 -0
  5. package/bin/notion-custom-blocks/cli.d.ts +8 -0
  6. package/bin/notion-custom-blocks/tar.d.ts +11 -0
  7. package/bin/notion-custom-blocks/upload.d.ts +14 -0
  8. package/bin/notion-custom-blocks/upload.js +14 -0
  9. package/bin/notion-custom-blocks/upload.test.d.ts +1 -0
  10. package/bin/notion-custom-blocks/upload.test.js +35 -0
  11. package/dist/bridge/SandboxBridge.d.ts.map +1 -1
  12. package/dist/bridge/pendingRequests.d.ts.map +1 -1
  13. package/dist/bridge/sandboxClient.d.ts.map +1 -1
  14. package/dist/init.d.ts.map +1 -1
  15. package/dist/protocol/dataSources/dataSource.d.ts +135 -135
  16. package/dist/protocol/dataSources/propertySchema.d.ts +27 -27
  17. package/dist/protocol/messages/createPage.d.ts +15 -15
  18. package/dist/protocol/messages/createPageResult.d.ts +17 -15
  19. package/dist/protocol/messages/dataSourcesChanged.d.ts +27 -27
  20. package/dist/protocol/messages/getPage.d.ts +17 -15
  21. package/dist/protocol/messages/hostToSandbox.d.ts +114 -100
  22. package/dist/protocol/messages/init.d.ts +32 -28
  23. package/dist/protocol/messages/pageChanged.d.ts +2 -0
  24. package/dist/protocol/messages/parentChanged.d.ts +2 -0
  25. package/dist/protocol/messages/sandboxToHost.d.ts +30 -30
  26. package/dist/protocol/messages/updatePage.d.ts +15 -15
  27. package/dist/protocol/messages/updatePageResult.d.ts +17 -15
  28. package/dist/protocol/pages/page.d.ts +49 -45
  29. package/dist/protocol/parent.d.ts +5 -1
  30. package/dist/protocol/parent.js +1 -0
  31. package/dist/react/DebugMessageLog.d.ts +1 -1
  32. package/dist/react/DebugMessageLog.d.ts.map +1 -1
  33. package/dist/react/NotionCustomBlock.d.ts +1 -1
  34. package/dist/react/NotionCustomBlock.d.ts.map +1 -1
  35. package/dist/react/NotionCustomBlock.js +1 -1
  36. package/dist/react/NotionTokenScope.d.ts +1 -1
  37. package/dist/react/NotionTokenScope.d.ts.map +1 -1
  38. package/dist/version.js +1 -1
  39. package/docs/block-location.md +13 -1
  40. package/docs/deployment.md +15 -0
  41. package/docs/pages.md +1 -1
  42. package/package.json +16 -12
@@ -33,36 +33,39 @@ export declare const updatePageResultMessageSchema: v.VariantSchema<"status", [v
33
33
  }, undefined>, v.ObjectSchema<{
34
34
  readonly type: v.LiteralSchema<"agent_id", undefined>;
35
35
  readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
36
+ }, undefined>, v.ObjectSchema<{
37
+ readonly type: v.LiteralSchema<"unavailable", undefined>;
36
38
  }, undefined>], undefined>;
37
39
  readonly properties: v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
40
+ readonly id: v.StringSchema<undefined>;
38
41
  readonly type: v.LiteralSchema<"title", undefined>;
39
42
  readonly title: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
40
- readonly id: v.StringSchema<undefined>;
41
43
  }, undefined>, v.ObjectSchema<{
44
+ readonly id: v.StringSchema<undefined>;
42
45
  readonly type: v.LiteralSchema<"rich_text", undefined>;
43
46
  readonly rich_text: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
44
- readonly id: v.StringSchema<undefined>;
45
47
  }, undefined>, v.ObjectSchema<{
48
+ readonly id: v.StringSchema<undefined>;
46
49
  readonly type: v.LiteralSchema<"number", undefined>;
47
50
  readonly number: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
48
- readonly id: v.StringSchema<undefined>;
49
51
  }, undefined>, v.ObjectSchema<{
52
+ readonly id: v.StringSchema<undefined>;
50
53
  readonly type: v.LiteralSchema<"url", undefined>;
51
54
  readonly url: v.NullableSchema<v.StringSchema<undefined>, undefined>;
52
- readonly id: v.StringSchema<undefined>;
53
55
  }, undefined>, v.ObjectSchema<{
56
+ readonly id: v.StringSchema<undefined>;
54
57
  readonly type: v.LiteralSchema<"email", undefined>;
55
58
  readonly email: v.NullableSchema<v.StringSchema<undefined>, undefined>;
56
- readonly id: v.StringSchema<undefined>;
57
59
  }, undefined>, v.ObjectSchema<{
60
+ readonly id: v.StringSchema<undefined>;
58
61
  readonly type: v.LiteralSchema<"phone_number", undefined>;
59
62
  readonly phone_number: v.NullableSchema<v.StringSchema<undefined>, undefined>;
60
- readonly id: v.StringSchema<undefined>;
61
63
  }, undefined>, v.ObjectSchema<{
64
+ readonly id: v.StringSchema<undefined>;
62
65
  readonly type: v.LiteralSchema<"checkbox", undefined>;
63
66
  readonly checkbox: v.BooleanSchema<undefined>;
64
- readonly id: v.StringSchema<undefined>;
65
67
  }, undefined>, v.ObjectSchema<{
68
+ readonly id: v.StringSchema<undefined>;
66
69
  readonly type: v.LiteralSchema<"select", undefined>;
67
70
  readonly select: v.NullableSchema<v.UnionSchema<[v.ObjectSchema<{
68
71
  readonly id: v.StringSchema<undefined>;
@@ -75,8 +78,8 @@ export declare const updatePageResultMessageSchema: v.VariantSchema<"status", [v
75
78
  readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
76
79
  readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
77
80
  }, undefined>], undefined>, undefined>;
78
- readonly id: v.StringSchema<undefined>;
79
81
  }, undefined>, v.ObjectSchema<{
82
+ readonly id: v.StringSchema<undefined>;
80
83
  readonly type: v.LiteralSchema<"status", undefined>;
81
84
  readonly status: v.NullableSchema<v.UnionSchema<[v.ObjectSchema<{
82
85
  readonly id: v.StringSchema<undefined>;
@@ -89,8 +92,8 @@ export declare const updatePageResultMessageSchema: v.VariantSchema<"status", [v
89
92
  readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
90
93
  readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
91
94
  }, undefined>], undefined>, undefined>;
92
- readonly id: v.StringSchema<undefined>;
93
95
  }, undefined>, v.ObjectSchema<{
96
+ readonly id: v.StringSchema<undefined>;
94
97
  readonly type: v.LiteralSchema<"multi_select", undefined>;
95
98
  readonly multi_select: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
96
99
  readonly id: v.StringSchema<undefined>;
@@ -103,16 +106,16 @@ export declare const updatePageResultMessageSchema: v.VariantSchema<"status", [v
103
106
  readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
104
107
  readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
105
108
  }, undefined>], undefined>, undefined>;
106
- readonly id: v.StringSchema<undefined>;
107
109
  }, undefined>, v.ObjectSchema<{
110
+ readonly id: v.StringSchema<undefined>;
108
111
  readonly type: v.LiteralSchema<"date", undefined>;
109
112
  readonly date: v.NullableSchema<v.ObjectSchema<{
110
113
  readonly start: v.StringSchema<undefined>;
111
114
  readonly end: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
112
115
  readonly time_zone: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
113
116
  }, undefined>, undefined>;
114
- readonly id: v.StringSchema<undefined>;
115
117
  }, undefined>, v.ObjectSchema<{
118
+ readonly id: v.StringSchema<undefined>;
116
119
  readonly type: v.LiteralSchema<"people", undefined>;
117
120
  readonly people: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
118
121
  readonly object: v.OptionalSchema<v.LiteralSchema<"user", undefined>, undefined>;
@@ -122,15 +125,15 @@ export declare const updatePageResultMessageSchema: v.VariantSchema<"status", [v
122
125
  readonly id: v.StringSchema<undefined>;
123
126
  readonly name: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
124
127
  }, undefined>], undefined>, undefined>;
125
- readonly id: v.StringSchema<undefined>;
126
128
  }, undefined>, v.ObjectSchema<{
129
+ readonly id: v.StringSchema<undefined>;
127
130
  readonly type: v.LiteralSchema<"relation", undefined>;
128
131
  readonly has_more: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
129
132
  readonly relation: v.ArraySchema<v.ObjectSchema<{
130
133
  readonly id: v.StringSchema<undefined>;
131
134
  }, undefined>, undefined>;
132
- readonly id: v.StringSchema<undefined>;
133
135
  }, undefined>, v.ObjectSchema<{
136
+ readonly id: v.StringSchema<undefined>;
134
137
  readonly type: v.LiteralSchema<"files", undefined>;
135
138
  readonly files: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
136
139
  readonly type: v.LiteralSchema<"external", undefined>;
@@ -146,8 +149,8 @@ export declare const updatePageResultMessageSchema: v.VariantSchema<"status", [v
146
149
  readonly expiry_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
147
150
  }, undefined>;
148
151
  }, undefined>], undefined>, undefined>;
149
- readonly id: v.StringSchema<undefined>;
150
152
  }, undefined>, v.ObjectSchema<{
153
+ readonly id: v.StringSchema<undefined>;
151
154
  readonly type: v.LiteralSchema<"place", undefined>;
152
155
  readonly place: v.NullableSchema<v.ObjectSchema<{
153
156
  readonly lat: v.NumberSchema<undefined>;
@@ -157,7 +160,6 @@ export declare const updatePageResultMessageSchema: v.VariantSchema<"status", [v
157
160
  readonly aws_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
158
161
  readonly google_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
159
162
  }, undefined>, undefined>;
160
- readonly id: v.StringSchema<undefined>;
161
163
  }, undefined>], undefined>, undefined>;
162
164
  readonly created_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
163
165
  readonly last_edited_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
@@ -30,6 +30,8 @@ export declare const customBlockPageSchema: v.ObjectSchema<{
30
30
  }, undefined>, v.ObjectSchema<{
31
31
  readonly type: v.LiteralSchema<"agent_id", undefined>;
32
32
  readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
33
+ }, undefined>, v.ObjectSchema<{
34
+ readonly type: v.LiteralSchema<"unavailable", undefined>;
33
35
  }, undefined>], undefined>;
34
36
  }, undefined>;
35
37
  export type CustomBlockPage = v.InferOutput<typeof customBlockPageSchema>;
@@ -155,34 +157,35 @@ export type NotionPlaceInput = v.InferOutput<typeof notionPlaceInputSchema>;
155
157
  * A page property value.
156
158
  */
157
159
  export declare const notionPagePropertyValueSchema: v.VariantSchema<"type", [v.ObjectSchema<{
160
+ readonly id: v.StringSchema<undefined>;
158
161
  readonly type: v.LiteralSchema<"title", undefined>;
159
162
  readonly title: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
160
- readonly id: v.StringSchema<undefined>;
161
163
  }, undefined>, v.ObjectSchema<{
164
+ readonly id: v.StringSchema<undefined>;
162
165
  readonly type: v.LiteralSchema<"rich_text", undefined>;
163
166
  readonly rich_text: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
164
- readonly id: v.StringSchema<undefined>;
165
167
  }, undefined>, v.ObjectSchema<{
168
+ readonly id: v.StringSchema<undefined>;
166
169
  readonly type: v.LiteralSchema<"number", undefined>;
167
170
  readonly number: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
168
- readonly id: v.StringSchema<undefined>;
169
171
  }, undefined>, v.ObjectSchema<{
172
+ readonly id: v.StringSchema<undefined>;
170
173
  readonly type: v.LiteralSchema<"url", undefined>;
171
174
  readonly url: v.NullableSchema<v.StringSchema<undefined>, undefined>;
172
- readonly id: v.StringSchema<undefined>;
173
175
  }, undefined>, v.ObjectSchema<{
176
+ readonly id: v.StringSchema<undefined>;
174
177
  readonly type: v.LiteralSchema<"email", undefined>;
175
178
  readonly email: v.NullableSchema<v.StringSchema<undefined>, undefined>;
176
- readonly id: v.StringSchema<undefined>;
177
179
  }, undefined>, v.ObjectSchema<{
180
+ readonly id: v.StringSchema<undefined>;
178
181
  readonly type: v.LiteralSchema<"phone_number", undefined>;
179
182
  readonly phone_number: v.NullableSchema<v.StringSchema<undefined>, undefined>;
180
- readonly id: v.StringSchema<undefined>;
181
183
  }, undefined>, v.ObjectSchema<{
184
+ readonly id: v.StringSchema<undefined>;
182
185
  readonly type: v.LiteralSchema<"checkbox", undefined>;
183
186
  readonly checkbox: v.BooleanSchema<undefined>;
184
- readonly id: v.StringSchema<undefined>;
185
187
  }, undefined>, v.ObjectSchema<{
188
+ readonly id: v.StringSchema<undefined>;
186
189
  readonly type: v.LiteralSchema<"select", undefined>;
187
190
  readonly select: v.NullableSchema<v.UnionSchema<[v.ObjectSchema<{
188
191
  readonly id: v.StringSchema<undefined>;
@@ -195,8 +198,8 @@ export declare const notionPagePropertyValueSchema: v.VariantSchema<"type", [v.O
195
198
  readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
196
199
  readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
197
200
  }, undefined>], undefined>, undefined>;
198
- readonly id: v.StringSchema<undefined>;
199
201
  }, undefined>, v.ObjectSchema<{
202
+ readonly id: v.StringSchema<undefined>;
200
203
  readonly type: v.LiteralSchema<"status", undefined>;
201
204
  readonly status: v.NullableSchema<v.UnionSchema<[v.ObjectSchema<{
202
205
  readonly id: v.StringSchema<undefined>;
@@ -209,8 +212,8 @@ export declare const notionPagePropertyValueSchema: v.VariantSchema<"type", [v.O
209
212
  readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
210
213
  readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
211
214
  }, undefined>], undefined>, undefined>;
212
- readonly id: v.StringSchema<undefined>;
213
215
  }, undefined>, v.ObjectSchema<{
216
+ readonly id: v.StringSchema<undefined>;
214
217
  readonly type: v.LiteralSchema<"multi_select", undefined>;
215
218
  readonly multi_select: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
216
219
  readonly id: v.StringSchema<undefined>;
@@ -223,16 +226,16 @@ export declare const notionPagePropertyValueSchema: v.VariantSchema<"type", [v.O
223
226
  readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
224
227
  readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
225
228
  }, undefined>], undefined>, undefined>;
226
- readonly id: v.StringSchema<undefined>;
227
229
  }, undefined>, v.ObjectSchema<{
230
+ readonly id: v.StringSchema<undefined>;
228
231
  readonly type: v.LiteralSchema<"date", undefined>;
229
232
  readonly date: v.NullableSchema<v.ObjectSchema<{
230
233
  readonly start: v.StringSchema<undefined>;
231
234
  readonly end: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
232
235
  readonly time_zone: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
233
236
  }, undefined>, undefined>;
234
- readonly id: v.StringSchema<undefined>;
235
237
  }, undefined>, v.ObjectSchema<{
238
+ readonly id: v.StringSchema<undefined>;
236
239
  readonly type: v.LiteralSchema<"people", undefined>;
237
240
  readonly people: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
238
241
  readonly object: v.OptionalSchema<v.LiteralSchema<"user", undefined>, undefined>;
@@ -242,15 +245,15 @@ export declare const notionPagePropertyValueSchema: v.VariantSchema<"type", [v.O
242
245
  readonly id: v.StringSchema<undefined>;
243
246
  readonly name: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
244
247
  }, undefined>], undefined>, undefined>;
245
- readonly id: v.StringSchema<undefined>;
246
248
  }, undefined>, v.ObjectSchema<{
249
+ readonly id: v.StringSchema<undefined>;
247
250
  readonly type: v.LiteralSchema<"relation", undefined>;
248
251
  readonly has_more: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
249
252
  readonly relation: v.ArraySchema<v.ObjectSchema<{
250
253
  readonly id: v.StringSchema<undefined>;
251
254
  }, undefined>, undefined>;
252
- readonly id: v.StringSchema<undefined>;
253
255
  }, undefined>, v.ObjectSchema<{
256
+ readonly id: v.StringSchema<undefined>;
254
257
  readonly type: v.LiteralSchema<"files", undefined>;
255
258
  readonly files: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
256
259
  readonly type: v.LiteralSchema<"external", undefined>;
@@ -266,8 +269,8 @@ export declare const notionPagePropertyValueSchema: v.VariantSchema<"type", [v.O
266
269
  readonly expiry_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
267
270
  }, undefined>;
268
271
  }, undefined>], undefined>, undefined>;
269
- readonly id: v.StringSchema<undefined>;
270
272
  }, undefined>, v.ObjectSchema<{
273
+ readonly id: v.StringSchema<undefined>;
271
274
  readonly type: v.LiteralSchema<"place", undefined>;
272
275
  readonly place: v.NullableSchema<v.ObjectSchema<{
273
276
  readonly lat: v.NumberSchema<undefined>;
@@ -277,38 +280,38 @@ export declare const notionPagePropertyValueSchema: v.VariantSchema<"type", [v.O
277
280
  readonly aws_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
278
281
  readonly google_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
279
282
  }, undefined>, undefined>;
280
- readonly id: v.StringSchema<undefined>;
281
283
  }, undefined>], undefined>;
282
284
  export type NotionPagePropertyValue = v.InferOutput<typeof notionPagePropertyValueSchema>;
283
285
  export declare const notionPagePropertyWriteMapSchema: v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
286
+ readonly id: v.StringSchema<undefined>;
284
287
  readonly type: v.LiteralSchema<"title", undefined>;
285
288
  readonly title: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
286
- readonly id: v.StringSchema<undefined>;
287
289
  }, undefined>, v.ObjectSchema<{
290
+ readonly id: v.StringSchema<undefined>;
288
291
  readonly type: v.LiteralSchema<"rich_text", undefined>;
289
292
  readonly rich_text: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
290
- readonly id: v.StringSchema<undefined>;
291
293
  }, undefined>, v.ObjectSchema<{
294
+ readonly id: v.StringSchema<undefined>;
292
295
  readonly type: v.LiteralSchema<"number", undefined>;
293
296
  readonly number: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
294
- readonly id: v.StringSchema<undefined>;
295
297
  }, undefined>, v.ObjectSchema<{
298
+ readonly id: v.StringSchema<undefined>;
296
299
  readonly type: v.LiteralSchema<"url", undefined>;
297
300
  readonly url: v.NullableSchema<v.StringSchema<undefined>, undefined>;
298
- readonly id: v.StringSchema<undefined>;
299
301
  }, undefined>, v.ObjectSchema<{
302
+ readonly id: v.StringSchema<undefined>;
300
303
  readonly type: v.LiteralSchema<"email", undefined>;
301
304
  readonly email: v.NullableSchema<v.StringSchema<undefined>, undefined>;
302
- readonly id: v.StringSchema<undefined>;
303
305
  }, undefined>, v.ObjectSchema<{
306
+ readonly id: v.StringSchema<undefined>;
304
307
  readonly type: v.LiteralSchema<"phone_number", undefined>;
305
308
  readonly phone_number: v.NullableSchema<v.StringSchema<undefined>, undefined>;
306
- readonly id: v.StringSchema<undefined>;
307
309
  }, undefined>, v.ObjectSchema<{
310
+ readonly id: v.StringSchema<undefined>;
308
311
  readonly type: v.LiteralSchema<"checkbox", undefined>;
309
312
  readonly checkbox: v.BooleanSchema<undefined>;
310
- readonly id: v.StringSchema<undefined>;
311
313
  }, undefined>, v.ObjectSchema<{
314
+ readonly id: v.StringSchema<undefined>;
312
315
  readonly type: v.LiteralSchema<"select", undefined>;
313
316
  readonly select: v.NullableSchema<v.UnionSchema<[v.ObjectSchema<{
314
317
  readonly id: v.StringSchema<undefined>;
@@ -321,8 +324,8 @@ export declare const notionPagePropertyWriteMapSchema: v.RecordSchema<v.StringSc
321
324
  readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
322
325
  readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
323
326
  }, undefined>], undefined>, undefined>;
324
- readonly id: v.StringSchema<undefined>;
325
327
  }, undefined>, v.ObjectSchema<{
328
+ readonly id: v.StringSchema<undefined>;
326
329
  readonly type: v.LiteralSchema<"status", undefined>;
327
330
  readonly status: v.NullableSchema<v.UnionSchema<[v.ObjectSchema<{
328
331
  readonly id: v.StringSchema<undefined>;
@@ -335,8 +338,8 @@ export declare const notionPagePropertyWriteMapSchema: v.RecordSchema<v.StringSc
335
338
  readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
336
339
  readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
337
340
  }, undefined>], undefined>, undefined>;
338
- readonly id: v.StringSchema<undefined>;
339
341
  }, undefined>, v.ObjectSchema<{
342
+ readonly id: v.StringSchema<undefined>;
340
343
  readonly type: v.LiteralSchema<"multi_select", undefined>;
341
344
  readonly multi_select: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
342
345
  readonly id: v.StringSchema<undefined>;
@@ -349,16 +352,16 @@ export declare const notionPagePropertyWriteMapSchema: v.RecordSchema<v.StringSc
349
352
  readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
350
353
  readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
351
354
  }, undefined>], undefined>, undefined>;
352
- readonly id: v.StringSchema<undefined>;
353
355
  }, undefined>, v.ObjectSchema<{
356
+ readonly id: v.StringSchema<undefined>;
354
357
  readonly type: v.LiteralSchema<"date", undefined>;
355
358
  readonly date: v.NullableSchema<v.ObjectSchema<{
356
359
  readonly start: v.StringSchema<undefined>;
357
360
  readonly end: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
358
361
  readonly time_zone: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
359
362
  }, undefined>, undefined>;
360
- readonly id: v.StringSchema<undefined>;
361
363
  }, undefined>, v.ObjectSchema<{
364
+ readonly id: v.StringSchema<undefined>;
362
365
  readonly type: v.LiteralSchema<"people", undefined>;
363
366
  readonly people: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
364
367
  readonly object: v.OptionalSchema<v.LiteralSchema<"user", undefined>, undefined>;
@@ -368,15 +371,15 @@ export declare const notionPagePropertyWriteMapSchema: v.RecordSchema<v.StringSc
368
371
  readonly id: v.StringSchema<undefined>;
369
372
  readonly name: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
370
373
  }, undefined>], undefined>, undefined>;
371
- readonly id: v.StringSchema<undefined>;
372
374
  }, undefined>, v.ObjectSchema<{
375
+ readonly id: v.StringSchema<undefined>;
373
376
  readonly type: v.LiteralSchema<"relation", undefined>;
374
377
  readonly has_more: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
375
378
  readonly relation: v.ArraySchema<v.ObjectSchema<{
376
379
  readonly id: v.StringSchema<undefined>;
377
380
  }, undefined>, undefined>;
378
- readonly id: v.StringSchema<undefined>;
379
381
  }, undefined>, v.ObjectSchema<{
382
+ readonly id: v.StringSchema<undefined>;
380
383
  readonly type: v.LiteralSchema<"files", undefined>;
381
384
  readonly files: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
382
385
  readonly type: v.LiteralSchema<"external", undefined>;
@@ -392,8 +395,8 @@ export declare const notionPagePropertyWriteMapSchema: v.RecordSchema<v.StringSc
392
395
  readonly expiry_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
393
396
  }, undefined>;
394
397
  }, undefined>], undefined>, undefined>;
395
- readonly id: v.StringSchema<undefined>;
396
398
  }, undefined>, v.ObjectSchema<{
399
+ readonly id: v.StringSchema<undefined>;
397
400
  readonly type: v.LiteralSchema<"place", undefined>;
398
401
  readonly place: v.NullableSchema<v.ObjectSchema<{
399
402
  readonly lat: v.NumberSchema<undefined>;
@@ -403,7 +406,6 @@ export declare const notionPagePropertyWriteMapSchema: v.RecordSchema<v.StringSc
403
406
  readonly aws_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
404
407
  readonly google_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
405
408
  }, undefined>, undefined>;
406
- readonly id: v.StringSchema<undefined>;
407
409
  }, undefined>], undefined>, undefined>;
408
410
  export type NotionPagePropertyWriteMap = v.InferOutput<typeof notionPagePropertyWriteMapSchema>;
409
411
  /**
@@ -427,36 +429,39 @@ export declare const notionPageSchema: v.ObjectSchema<{
427
429
  }, undefined>, v.ObjectSchema<{
428
430
  readonly type: v.LiteralSchema<"agent_id", undefined>;
429
431
  readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
432
+ }, undefined>, v.ObjectSchema<{
433
+ readonly type: v.LiteralSchema<"unavailable", undefined>;
430
434
  }, undefined>], undefined>;
431
435
  readonly properties: v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
436
+ readonly id: v.StringSchema<undefined>;
432
437
  readonly type: v.LiteralSchema<"title", undefined>;
433
438
  readonly title: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
434
- readonly id: v.StringSchema<undefined>;
435
439
  }, undefined>, v.ObjectSchema<{
440
+ readonly id: v.StringSchema<undefined>;
436
441
  readonly type: v.LiteralSchema<"rich_text", undefined>;
437
442
  readonly rich_text: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
438
- readonly id: v.StringSchema<undefined>;
439
443
  }, undefined>, v.ObjectSchema<{
444
+ readonly id: v.StringSchema<undefined>;
440
445
  readonly type: v.LiteralSchema<"number", undefined>;
441
446
  readonly number: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
442
- readonly id: v.StringSchema<undefined>;
443
447
  }, undefined>, v.ObjectSchema<{
448
+ readonly id: v.StringSchema<undefined>;
444
449
  readonly type: v.LiteralSchema<"url", undefined>;
445
450
  readonly url: v.NullableSchema<v.StringSchema<undefined>, undefined>;
446
- readonly id: v.StringSchema<undefined>;
447
451
  }, undefined>, v.ObjectSchema<{
452
+ readonly id: v.StringSchema<undefined>;
448
453
  readonly type: v.LiteralSchema<"email", undefined>;
449
454
  readonly email: v.NullableSchema<v.StringSchema<undefined>, undefined>;
450
- readonly id: v.StringSchema<undefined>;
451
455
  }, undefined>, v.ObjectSchema<{
456
+ readonly id: v.StringSchema<undefined>;
452
457
  readonly type: v.LiteralSchema<"phone_number", undefined>;
453
458
  readonly phone_number: v.NullableSchema<v.StringSchema<undefined>, undefined>;
454
- readonly id: v.StringSchema<undefined>;
455
459
  }, undefined>, v.ObjectSchema<{
460
+ readonly id: v.StringSchema<undefined>;
456
461
  readonly type: v.LiteralSchema<"checkbox", undefined>;
457
462
  readonly checkbox: v.BooleanSchema<undefined>;
458
- readonly id: v.StringSchema<undefined>;
459
463
  }, undefined>, v.ObjectSchema<{
464
+ readonly id: v.StringSchema<undefined>;
460
465
  readonly type: v.LiteralSchema<"select", undefined>;
461
466
  readonly select: v.NullableSchema<v.UnionSchema<[v.ObjectSchema<{
462
467
  readonly id: v.StringSchema<undefined>;
@@ -469,8 +474,8 @@ export declare const notionPageSchema: v.ObjectSchema<{
469
474
  readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
470
475
  readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
471
476
  }, undefined>], undefined>, undefined>;
472
- readonly id: v.StringSchema<undefined>;
473
477
  }, undefined>, v.ObjectSchema<{
478
+ readonly id: v.StringSchema<undefined>;
474
479
  readonly type: v.LiteralSchema<"status", undefined>;
475
480
  readonly status: v.NullableSchema<v.UnionSchema<[v.ObjectSchema<{
476
481
  readonly id: v.StringSchema<undefined>;
@@ -483,8 +488,8 @@ export declare const notionPageSchema: v.ObjectSchema<{
483
488
  readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
484
489
  readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
485
490
  }, undefined>], undefined>, undefined>;
486
- readonly id: v.StringSchema<undefined>;
487
491
  }, undefined>, v.ObjectSchema<{
492
+ readonly id: v.StringSchema<undefined>;
488
493
  readonly type: v.LiteralSchema<"multi_select", undefined>;
489
494
  readonly multi_select: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
490
495
  readonly id: v.StringSchema<undefined>;
@@ -497,16 +502,16 @@ export declare const notionPageSchema: v.ObjectSchema<{
497
502
  readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
498
503
  readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
499
504
  }, undefined>], undefined>, undefined>;
500
- readonly id: v.StringSchema<undefined>;
501
505
  }, undefined>, v.ObjectSchema<{
506
+ readonly id: v.StringSchema<undefined>;
502
507
  readonly type: v.LiteralSchema<"date", undefined>;
503
508
  readonly date: v.NullableSchema<v.ObjectSchema<{
504
509
  readonly start: v.StringSchema<undefined>;
505
510
  readonly end: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
506
511
  readonly time_zone: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
507
512
  }, undefined>, undefined>;
508
- readonly id: v.StringSchema<undefined>;
509
513
  }, undefined>, v.ObjectSchema<{
514
+ readonly id: v.StringSchema<undefined>;
510
515
  readonly type: v.LiteralSchema<"people", undefined>;
511
516
  readonly people: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
512
517
  readonly object: v.OptionalSchema<v.LiteralSchema<"user", undefined>, undefined>;
@@ -516,15 +521,15 @@ export declare const notionPageSchema: v.ObjectSchema<{
516
521
  readonly id: v.StringSchema<undefined>;
517
522
  readonly name: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
518
523
  }, undefined>], undefined>, undefined>;
519
- readonly id: v.StringSchema<undefined>;
520
524
  }, undefined>, v.ObjectSchema<{
525
+ readonly id: v.StringSchema<undefined>;
521
526
  readonly type: v.LiteralSchema<"relation", undefined>;
522
527
  readonly has_more: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
523
528
  readonly relation: v.ArraySchema<v.ObjectSchema<{
524
529
  readonly id: v.StringSchema<undefined>;
525
530
  }, undefined>, undefined>;
526
- readonly id: v.StringSchema<undefined>;
527
531
  }, undefined>, v.ObjectSchema<{
532
+ readonly id: v.StringSchema<undefined>;
528
533
  readonly type: v.LiteralSchema<"files", undefined>;
529
534
  readonly files: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
530
535
  readonly type: v.LiteralSchema<"external", undefined>;
@@ -540,8 +545,8 @@ export declare const notionPageSchema: v.ObjectSchema<{
540
545
  readonly expiry_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
541
546
  }, undefined>;
542
547
  }, undefined>], undefined>, undefined>;
543
- readonly id: v.StringSchema<undefined>;
544
548
  }, undefined>, v.ObjectSchema<{
549
+ readonly id: v.StringSchema<undefined>;
545
550
  readonly type: v.LiteralSchema<"place", undefined>;
546
551
  readonly place: v.NullableSchema<v.ObjectSchema<{
547
552
  readonly lat: v.NumberSchema<undefined>;
@@ -551,7 +556,6 @@ export declare const notionPageSchema: v.ObjectSchema<{
551
556
  readonly aws_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
552
557
  readonly google_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
553
558
  }, undefined>, undefined>;
554
- readonly id: v.StringSchema<undefined>;
555
559
  }, undefined>], undefined>, undefined>;
556
560
  readonly created_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
557
561
  readonly last_edited_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
@@ -14,15 +14,19 @@ export declare const notionParentSchema: v.VariantSchema<"type", [v.ObjectSchema
14
14
  }, undefined>, v.ObjectSchema<{
15
15
  readonly type: v.LiteralSchema<"agent_id", undefined>;
16
16
  readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
17
+ }, undefined>, v.ObjectSchema<{
18
+ readonly type: v.LiteralSchema<"unavailable", undefined>;
17
19
  }, undefined>], undefined>;
18
20
  /**
19
21
  * A record's parent reference.
20
22
  *
21
- * Mirrors Notion's public API:
23
+ * Uses Notion public API parent names, plus an unavailable state:
22
24
  * - `page_id` — parented directly under a page.
23
25
  * - `block_id` — parented under a non-page container block (toggle, column, callout, ...).
24
26
  * - `data_source_id` — parented under a collection (data source).
25
27
  * - `workspace` — top-level / team-rooted.
26
28
  * - `agent_id` — owned by an agent, such as an agent instruction page or its blocks.
29
+ * - `unavailable` — the viewer cannot access the parent resource. Neither its ID nor its kind
30
+ * is exposed, including when a readable child identifies the parent as a data source.
27
31
  */
28
32
  export type NotionParent = v.InferOutput<typeof notionParentSchema>;
@@ -9,4 +9,5 @@ export const notionParentSchema = v.variant("type", [
9
9
  v.object({ type: v.literal("workspace"), workspace: v.literal(true) }),
10
10
  v.object({ type: v.literal("block_id"), block_id: notionBlockIdSchema }),
11
11
  v.object({ type: v.literal("agent_id"), agent_id: notionAgentIdSchema }),
12
+ v.object({ type: v.literal("unavailable") }),
12
13
  ]);
@@ -1,2 +1,2 @@
1
- export declare function DebugMessageLog(): import("react/jsx-runtime").JSX.Element;
1
+ export declare function DebugMessageLog(): import("react").JSX.Element;
2
2
  //# sourceMappingURL=DebugMessageLog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DebugMessageLog.d.ts","sourceRoot":"","sources":["../../src/react/DebugMessageLog.tsx"],"names":[],"mappings":"AAGA,wBAAgB,eAAe,4CAa9B"}
1
+ {"version":3,"file":"DebugMessageLog.d.ts","sourceRoot":"","sources":["../../src/react/DebugMessageLog.tsx"],"names":[],"mappings":"AAGA,wBAAgB,eAAe,gCAa9B"}
@@ -45,5 +45,5 @@ export type NotionCustomBlockProps = InitCustomBlockOptions & {
45
45
  * Inside `children`, every SDK hook is guaranteed to return a populated
46
46
  * value. Outside the provider (or during the loading window), they throw.
47
47
  */
48
- export declare function NotionCustomBlock({ children, timeoutMs, fallback, errorFallback, autoResize, }: NotionCustomBlockProps): import("react/jsx-runtime").JSX.Element;
48
+ export declare function NotionCustomBlock({ children, timeoutMs, fallback, errorFallback, autoResize, }: NotionCustomBlockProps): import("react").JSX.Element;
49
49
  //# sourceMappingURL=NotionCustomBlock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NotionCustomBlock.d.ts","sourceRoot":"","sources":["../../src/react/NotionCustomBlock.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAwC,MAAM,OAAO,CAAA;AAE5E,OAAO,EAAE,KAAK,sBAAsB,EAAoB,MAAM,YAAY,CAAA;AAM1E,OAAO,yBAAyB,CAAA;AAEhC;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,sBAAsB,GAAG;IAC7D,QAAQ,EAAE,SAAS,CAAA;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB;;;;OAIG;IACH,aAAa,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,SAAS,CAAC,CAAA;IACzD;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,iBAAiB,CAAC,EACjC,QAAQ,EACR,SAAS,EACT,QAAe,EACf,aAAa,EACb,UAAiB,GACjB,EAAE,sBAAsB,2CAsExB"}
1
+ {"version":3,"file":"NotionCustomBlock.d.ts","sourceRoot":"","sources":["../../src/react/NotionCustomBlock.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAwC,MAAM,OAAO,CAAA;AAE5E,OAAO,EAAE,KAAK,sBAAsB,EAAoB,MAAM,YAAY,CAAA;AAM1E,OAAO,yBAAyB,CAAA;AAEhC;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,sBAAsB,GAAG;IAC7D,QAAQ,EAAE,SAAS,CAAA;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB;;;;OAIG;IACH,aAAa,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,SAAS,CAAC,CAAA;IACzD;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,iBAAiB,CAAC,EACjC,QAAQ,EACR,SAAS,EACT,QAAe,EACf,aAAa,EACb,UAAiB,GACjB,EAAE,sBAAsB,+BAsExB"}
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useLayoutEffect, useState } from "react";
3
3
  import { customBlockHost } from "../bridge/sandboxClient.js";
4
4
  import { NotInIframeError } from "../init.js";
@@ -6,5 +6,5 @@ export type NotionTokenScopeProps = {
6
6
  * Makes Notion design tokens available to descendants and keeps their
7
7
  * host-controlled appearance in sync.
8
8
  */
9
- export declare function NotionTokenScope({ children }: NotionTokenScopeProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare function NotionTokenScope({ children }: NotionTokenScopeProps): import("react").JSX.Element;
10
10
  //# sourceMappingURL=NotionTokenScope.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NotionTokenScope.d.ts","sourceRoot":"","sources":["../../src/react/NotionTokenScope.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,MAAM,MAAM,qBAAqB,GAAG;IACnC,QAAQ,EAAE,SAAS,CAAA;CACnB,CAAA;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,EAAE,qBAAqB,2CAanE"}
1
+ {"version":3,"file":"NotionTokenScope.d.ts","sourceRoot":"","sources":["../../src/react/NotionTokenScope.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,MAAM,MAAM,qBAAqB,GAAG;IACnC,QAAQ,EAAE,SAAS,CAAA;CACnB,CAAA;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,EAAE,qBAAqB,+BAanE"}
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.1.37"
7
+ export const CUSTOM_BLOCKS_SDK_VERSION = "0.1.39"
@@ -38,7 +38,8 @@ type NotionParent =
38
38
  | { type: "block_id"; block_id: NotionBlockId } // inline custom block under a toggle/column/callout/...
39
39
  | { type: "data_source_id"; data_source_id: string } // custom block backing a custom collection view
40
40
  | { type: "workspace"; workspace: true } // top-level block parented by a team / workspace
41
- | { type: "agent_id"; agent_id: NotionAgentId }; // agent-owned instruction content
41
+ | { type: "agent_id"; agent_id: NotionAgentId } // agent-owned instruction content
42
+ | { type: "unavailable" }; // access denied; no parent ID or kind
42
43
  ```
43
44
 
44
45
  For non-React renderers, use `customBlock.getParent()` after `initCustomBlock()` resolves.
@@ -85,6 +86,17 @@ For anything beyond location — title, icon, properties — fetch the page thro
85
86
 
86
87
  For non-React renderers, use `customBlock.getPage()` after `initCustomBlock()` resolves.
87
88
 
89
+ When the viewer cannot access the parent resource, the host returns
90
+ `{ type: "unavailable" }`, including on `usePage().parent`. This applies to every
91
+ parent kind, including data sources, even when the readable child identifies
92
+ the parent. Neither the parent's ID nor its kind is exposed. An unavailable
93
+ parent does not prevent initialization when the block and containing page are
94
+ readable; other initialization requirements still apply.
95
+
96
+ Treat `unavailable` as unknown when branching on location: it does not establish
97
+ whether the containing page is a database row. A parent that is still loading
98
+ is not reported as access denied.
99
+
88
100
  ### `useTheme()`
89
101
 
90
102
  Returns the host's current theme.
@@ -27,6 +27,21 @@ static Apps SDK capabilities. Paths in the manifest stay relative to the project
27
27
  root (the current directory, or `--cwd`). Without `--manifest`, the command
28
28
  continues to import the Workers SDK bundle at `dist/index.js`.
29
29
 
30
+ Node build tools use one entrypoint:
31
+
32
+ ```ts
33
+ import { build, upload } from "@notionhq/custom-blocks/bundle"
34
+ ```
35
+
36
+ `build` accepts `BuildArgs` and returns `BuildOutput` containing `BuiltBlock`
37
+ results. `upload` accepts `UploadsInput`, a map of block keys to `UploadTarget`,
38
+ and returns `UploadOutput`. `printBuildOutput` writes the sentinel-wrapped build
39
+ result; `parseUploadsInput` validates JSON upload arguments. The Apps CLI calls
40
+ these functions from `build-blocks` and `upload-blocks`.
30
41
 
31
42
  Relative `--out` paths also resolve from `--cwd`. Build results include
32
43
  `bundleSizeBytes`, the exact compressed tarball length, for size-bound uploads.
44
+
45
+ Upload targets may include a `headers` map containing the headers returned by
46
+ the server presign, including `Content-Length` and object tags. The uploader
47
+ forwards these alongside the tarball checksum and content type.
package/docs/pages.md CHANGED
@@ -132,7 +132,7 @@ Do **not** send `{ type: "file_upload", file_upload: { id } }`; the host will re
132
132
  - `NotionPage` — the page record returned by every successful call.
133
133
  - `NotionPageId` — branded string ID for a page.
134
134
  - `NotionPageIcon` / `NotionPageCover` — icon and cover variants Notion supports.
135
- - `NotionParent` — a block's parent reference (`page_id` / `block_id` / `data_source_id` / `workspace`), as returned on `NotionPage.parent` and by `useParent()`.
135
+ - `NotionParent` — a block's parent reference (`page_id` / `block_id` / `data_source_id` / `workspace` / `agent_id` / `unavailable`), as returned on `NotionPage.parent` and by `useParent()`.
136
136
  - `NotionPagePropertyValue` — a single property value as returned on a `NotionPage`.
137
137
  - `NotionPagePropertyInputValue` — a single property value as accepted by `pages.create` / `pages.update` (may omit `id` for `create`).
138
138
  - `NotionPagePropertyInputMap` — input map for `pages.create` (keys can be raw property IDs, or semantic keys when creating into a mapped data source).