@notionhq/custom-blocks-host 0.1.2 → 0.1.3
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.
- package/dist/protocol/messages/createPageResult.d.ts +2 -0
- package/dist/protocol/messages/getPage.d.ts +2 -0
- package/dist/protocol/messages/hostToSandbox.d.ts +14 -0
- package/dist/protocol/messages/init.d.ts +4 -0
- package/dist/protocol/messages/pageChanged.d.ts +2 -0
- package/dist/protocol/messages/parentChanged.d.ts +2 -0
- package/dist/protocol/messages/updatePageResult.d.ts +2 -0
- package/dist/protocol/pages/page.d.ts +4 -0
- package/dist/protocol/parent.d.ts +5 -1
- package/dist/protocol/parent.js +1 -0
- package/package.json +1 -1
|
@@ -34,6 +34,8 @@ export declare const createPageResultMessageSchema: v.VariantSchema<"status", [v
|
|
|
34
34
|
}, undefined>, v.ObjectSchema<{
|
|
35
35
|
readonly type: v.LiteralSchema<"agent_id", undefined>;
|
|
36
36
|
readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
|
|
37
|
+
}, undefined>, v.ObjectSchema<{
|
|
38
|
+
readonly type: v.LiteralSchema<"unavailable", undefined>;
|
|
37
39
|
}, undefined>], undefined>;
|
|
38
40
|
readonly properties: v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
39
41
|
readonly type: v.LiteralSchema<"title", undefined>;
|
|
@@ -39,6 +39,8 @@ export declare const getPageResultMessageSchema: v.VariantSchema<"status", [v.Ob
|
|
|
39
39
|
}, undefined>, v.ObjectSchema<{
|
|
40
40
|
readonly type: v.LiteralSchema<"agent_id", undefined>;
|
|
41
41
|
readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
|
|
42
|
+
}, undefined>, v.ObjectSchema<{
|
|
43
|
+
readonly type: v.LiteralSchema<"unavailable", undefined>;
|
|
42
44
|
}, undefined>], undefined>;
|
|
43
45
|
readonly properties: v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
44
46
|
readonly type: v.LiteralSchema<"title", undefined>;
|
|
@@ -24,6 +24,8 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
|
|
|
24
24
|
}, undefined>, v.ObjectSchema<{
|
|
25
25
|
readonly type: v.LiteralSchema<"agent_id", undefined>;
|
|
26
26
|
readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
|
|
27
|
+
}, undefined>, v.ObjectSchema<{
|
|
28
|
+
readonly type: v.LiteralSchema<"unavailable", undefined>;
|
|
27
29
|
}, undefined>], undefined>;
|
|
28
30
|
readonly page: v.ObjectSchema<{
|
|
29
31
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
|
|
@@ -42,6 +44,8 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
|
|
|
42
44
|
}, undefined>, v.ObjectSchema<{
|
|
43
45
|
readonly type: v.LiteralSchema<"agent_id", undefined>;
|
|
44
46
|
readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
|
|
47
|
+
}, undefined>, v.ObjectSchema<{
|
|
48
|
+
readonly type: v.LiteralSchema<"unavailable", undefined>;
|
|
45
49
|
}, undefined>], undefined>;
|
|
46
50
|
}, undefined>;
|
|
47
51
|
readonly manifest: v.ObjectSchema<{
|
|
@@ -252,6 +256,8 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
|
|
|
252
256
|
}, undefined>, v.ObjectSchema<{
|
|
253
257
|
readonly type: v.LiteralSchema<"agent_id", undefined>;
|
|
254
258
|
readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
|
|
259
|
+
}, undefined>, v.ObjectSchema<{
|
|
260
|
+
readonly type: v.LiteralSchema<"unavailable", undefined>;
|
|
255
261
|
}, undefined>], undefined>;
|
|
256
262
|
}, undefined>, v.ObjectSchema<{
|
|
257
263
|
readonly type: v.LiteralSchema<"pageChanged", undefined>;
|
|
@@ -272,6 +278,8 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
|
|
|
272
278
|
}, undefined>, v.ObjectSchema<{
|
|
273
279
|
readonly type: v.LiteralSchema<"agent_id", undefined>;
|
|
274
280
|
readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
|
|
281
|
+
}, undefined>, v.ObjectSchema<{
|
|
282
|
+
readonly type: v.LiteralSchema<"unavailable", undefined>;
|
|
275
283
|
}, undefined>], undefined>;
|
|
276
284
|
}, undefined>;
|
|
277
285
|
}, undefined>, v.ObjectSchema<{
|
|
@@ -535,6 +543,8 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
|
|
|
535
543
|
}, undefined>, v.ObjectSchema<{
|
|
536
544
|
readonly type: v.LiteralSchema<"agent_id", undefined>;
|
|
537
545
|
readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
|
|
546
|
+
}, undefined>, v.ObjectSchema<{
|
|
547
|
+
readonly type: v.LiteralSchema<"unavailable", undefined>;
|
|
538
548
|
}, undefined>], undefined>;
|
|
539
549
|
readonly properties: v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
540
550
|
readonly type: v.LiteralSchema<"title", undefined>;
|
|
@@ -732,6 +742,8 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
|
|
|
732
742
|
}, undefined>, v.ObjectSchema<{
|
|
733
743
|
readonly type: v.LiteralSchema<"agent_id", undefined>;
|
|
734
744
|
readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
|
|
745
|
+
}, undefined>, v.ObjectSchema<{
|
|
746
|
+
readonly type: v.LiteralSchema<"unavailable", undefined>;
|
|
735
747
|
}, undefined>], undefined>;
|
|
736
748
|
readonly properties: v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
737
749
|
readonly type: v.LiteralSchema<"title", undefined>;
|
|
@@ -982,6 +994,8 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
|
|
|
982
994
|
}, undefined>, v.ObjectSchema<{
|
|
983
995
|
readonly type: v.LiteralSchema<"agent_id", undefined>;
|
|
984
996
|
readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
|
|
997
|
+
}, undefined>, v.ObjectSchema<{
|
|
998
|
+
readonly type: v.LiteralSchema<"unavailable", undefined>;
|
|
985
999
|
}, undefined>], undefined>;
|
|
986
1000
|
readonly properties: v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
987
1001
|
readonly type: v.LiteralSchema<"title", undefined>;
|
|
@@ -50,6 +50,8 @@ export declare const initMessageSchema: v.VariantSchema<"status", [v.ObjectSchem
|
|
|
50
50
|
}, undefined>, v.ObjectSchema<{
|
|
51
51
|
readonly type: v.LiteralSchema<"agent_id", undefined>;
|
|
52
52
|
readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
|
|
53
|
+
}, undefined>, v.ObjectSchema<{
|
|
54
|
+
readonly type: v.LiteralSchema<"unavailable", undefined>;
|
|
53
55
|
}, undefined>], undefined>;
|
|
54
56
|
readonly page: v.ObjectSchema<{
|
|
55
57
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
|
|
@@ -68,6 +70,8 @@ export declare const initMessageSchema: v.VariantSchema<"status", [v.ObjectSchem
|
|
|
68
70
|
}, undefined>, v.ObjectSchema<{
|
|
69
71
|
readonly type: v.LiteralSchema<"agent_id", undefined>;
|
|
70
72
|
readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
|
|
73
|
+
}, undefined>, v.ObjectSchema<{
|
|
74
|
+
readonly type: v.LiteralSchema<"unavailable", undefined>;
|
|
71
75
|
}, undefined>], undefined>;
|
|
72
76
|
}, undefined>;
|
|
73
77
|
readonly manifest: v.ObjectSchema<{
|
|
@@ -21,6 +21,8 @@ export declare const pageChangedMessageSchema: v.ObjectSchema<{
|
|
|
21
21
|
}, undefined>, v.ObjectSchema<{
|
|
22
22
|
readonly type: v.LiteralSchema<"agent_id", undefined>;
|
|
23
23
|
readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
|
|
24
|
+
}, undefined>, v.ObjectSchema<{
|
|
25
|
+
readonly type: v.LiteralSchema<"unavailable", undefined>;
|
|
24
26
|
}, undefined>], undefined>;
|
|
25
27
|
}, undefined>;
|
|
26
28
|
}, undefined>;
|
|
@@ -19,6 +19,8 @@ export declare const parentChangedMessageSchema: v.ObjectSchema<{
|
|
|
19
19
|
}, undefined>, v.ObjectSchema<{
|
|
20
20
|
readonly type: v.LiteralSchema<"agent_id", undefined>;
|
|
21
21
|
readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
|
|
22
|
+
}, undefined>, v.ObjectSchema<{
|
|
23
|
+
readonly type: v.LiteralSchema<"unavailable", undefined>;
|
|
22
24
|
}, undefined>], undefined>;
|
|
23
25
|
}, undefined>;
|
|
24
26
|
export type ParentChangedMessage = v.InferOutput<typeof parentChangedMessageSchema>;
|
|
@@ -33,6 +33,8 @@ 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<{
|
|
38
40
|
readonly type: v.LiteralSchema<"title", 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>;
|
|
@@ -427,6 +429,8 @@ 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<{
|
|
432
436
|
readonly type: v.LiteralSchema<"title", 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
|
-
*
|
|
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>;
|
package/dist/protocol/parent.js
CHANGED
|
@@ -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
|
]);
|