@notionhq/custom-blocks 0.0.59 → 0.0.60
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/bridge/ids.d.ts +9 -0
- package/dist/bridge/ids.d.ts.map +1 -1
- package/dist/bridge/ids.js +1 -0
- package/dist/bridge/messages/createPageResult.d.ts +3 -0
- package/dist/bridge/messages/createPageResult.d.ts.map +1 -1
- package/dist/bridge/messages/getPage.d.ts +3 -0
- package/dist/bridge/messages/getPage.d.ts.map +1 -1
- package/dist/bridge/messages/hostToSandbox.d.ts +15 -0
- package/dist/bridge/messages/hostToSandbox.d.ts.map +1 -1
- package/dist/bridge/messages/init.d.ts +3 -0
- package/dist/bridge/messages/init.d.ts.map +1 -1
- package/dist/bridge/messages/parentChanged.d.ts +3 -0
- package/dist/bridge/messages/parentChanged.d.ts.map +1 -1
- package/dist/bridge/messages/updatePageResult.d.ts +3 -0
- package/dist/bridge/messages/updatePageResult.d.ts.map +1 -1
- package/dist/bridge/pages/page.d.ts +3 -0
- package/dist/bridge/pages/page.d.ts.map +1 -1
- package/dist/bridge/parent.d.ts +4 -0
- package/dist/bridge/parent.d.ts.map +1 -1
- package/dist/bridge/parent.js +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/docs/block-location.md +18 -1
- package/package.json +1 -1
- package/src/bridge/ids.ts +14 -0
- package/src/bridge/parent.ts +3 -0
- package/src/index.ts +1 -0
package/dist/bridge/ids.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import * as v from "valibot";
|
|
|
2
2
|
declare const notionDataSourceIdBrand: unique symbol;
|
|
3
3
|
declare const notionBlockIdBrand: unique symbol;
|
|
4
4
|
declare const notionPageIdBrand: unique symbol;
|
|
5
|
+
declare const notionAgentIdBrand: unique symbol;
|
|
5
6
|
declare const notionSpaceIdBrand: unique symbol;
|
|
6
7
|
/**
|
|
7
8
|
* Branded Notion block ID. Host payloads and SDK APIs use plain strings at runtime,
|
|
@@ -27,6 +28,14 @@ export type NotionPageId = string & {
|
|
|
27
28
|
readonly [notionPageIdBrand]: "NotionPageId";
|
|
28
29
|
};
|
|
29
30
|
export declare const notionPageIdSchema: v.CustomSchema<NotionPageId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
31
|
+
/**
|
|
32
|
+
* Branded Notion agent ID. Agent parents identify the workflow that owns an
|
|
33
|
+
* instruction page or one of its blocks.
|
|
34
|
+
*/
|
|
35
|
+
export type NotionAgentId = string & {
|
|
36
|
+
readonly [notionAgentIdBrand]: "NotionAgentId";
|
|
37
|
+
};
|
|
38
|
+
export declare const notionAgentIdSchema: v.CustomSchema<NotionAgentId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
30
39
|
/**
|
|
31
40
|
* Branded Notion workspace/space ID. Host payloads and SDK APIs use plain strings at runtime,
|
|
32
41
|
* but the brand keeps space IDs from being accidentally mixed with other IDs in TypeScript.
|
package/dist/bridge/ids.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../../../../home/runner/work/custom-blocks/custom-blocks/sdk/src/bridge/ids.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,OAAO,CAAC,MAAM,uBAAuB,EAAE,OAAO,MAAM,CAAA;AACpD,OAAO,CAAC,MAAM,kBAAkB,EAAE,OAAO,MAAM,CAAA;AAC/C,OAAO,CAAC,MAAM,iBAAiB,EAAE,OAAO,MAAM,CAAA;AAC9C,OAAO,CAAC,MAAM,kBAAkB,EAAE,OAAO,MAAM,CAAA;AAE/C;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG;IACpC,QAAQ,CAAC,CAAC,kBAAkB,CAAC,EAAE,eAAe,CAAA;CAC9C,CAAA;AAED,eAAO,MAAM,mBAAmB,0EAG/B,CAAA;AAED;;;GAGG;AACH,MAAM,MAA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AwB,+EAGpC,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG;IACnC,QAAQ,CAAC,CAAC,iBAAiB,CAAC,EAAE,cAAc,CAAA;CAC5C,CAAA;AAED,eAAO,MAAM,kBAAkB,yEAG9B,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG;IACpC,QAAQ,CAAC,CAAC,kBAAkB,CAAC,EAAE,eAAe,CAAA;CAC9C,CAAA;AAED,eAAO,MAAM,mBAAmB,0EAG/B,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG;IACpC,QAAQ,CAAC,CAAC,kBAAkB,CAAC,EAAE,eAAe,CAAA;CAC9C,CAAA;AAED,eAAO,MAAM,mBAAmB,0EAG/B,CAAA"}
|
package/dist/bridge/ids.js
CHANGED
|
@@ -2,4 +2,5 @@ import * as v from "valibot";
|
|
|
2
2
|
export const notionBlockIdSchema = v.custom(value => typeof value === "string", "Expected a Notion block ID");
|
|
3
3
|
export const notionDataSourceIdSchema = v.custom(value => typeof value === "string", "Expected a Notion data source ID");
|
|
4
4
|
export const notionPageIdSchema = v.custom(value => typeof value === "string", "Expected a Notion page ID");
|
|
5
|
+
export const notionAgentIdSchema = v.custom(value => typeof value === "string", "Expected a Notion agent ID");
|
|
5
6
|
export const notionSpaceIdSchema = v.custom(value => typeof value === "string", "Expected a Notion space ID");
|
|
@@ -31,6 +31,9 @@ export declare const createPageResultMessageSchema: v.VariantSchema<"status", [v
|
|
|
31
31
|
}, undefined>, v.ObjectSchema<{
|
|
32
32
|
readonly type: v.LiteralSchema<"block_id", undefined>;
|
|
33
33
|
readonly block_id: v.CustomSchema<import("../ids.js").NotionBlockId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
34
|
+
}, undefined>, v.ObjectSchema<{
|
|
35
|
+
readonly type: v.LiteralSchema<"agent_id", undefined>;
|
|
36
|
+
readonly agent_id: v.CustomSchema<import("../ids.js").NotionAgentId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
34
37
|
}, undefined>], undefined>;
|
|
35
38
|
readonly properties: v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
36
39
|
readonly type: v.LiteralSchema<"title", undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createPageResult.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/custom-blocks/custom-blocks/sdk/src/bridge/messages/createPageResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAKxD,eAAO,MAAM,oCAAoC,2BAAa,CAAA;AAE9D,MAAM,MAAM,8BAA8B,GACvC,oBAAoB,GACpB,qBAAqB,GACrB,oBAAoB,GACpB,0BAA0B,GAC1B,yBAAyB,GACzB,sBAAsB,GACtB,mBAAmB,GACnB,sBAAsB,GACtB,oBAAoB,GACpB,wBAAwB,GACxB,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;AAEhB,MAAM,MAAM,8BAA8B,GACzC,oBAAoB,CAAC,8BAA8B,CAAC,CAAA;AAErD,eAAO,MAAM,oCAAoC;;;;aAI/C,CAAA;AAEF;;GAEG;AACH,eAAO,MAAM,6BAA6B;;;;IAKxC,8BAA8B
|
|
1
|
+
{"version":3,"file":"createPageResult.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/custom-blocks/custom-blocks/sdk/src/bridge/messages/createPageResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAKxD,eAAO,MAAM,oCAAoC,2BAAa,CAAA;AAE9D,MAAM,MAAM,8BAA8B,GACvC,oBAAoB,GACpB,qBAAqB,GACrB,oBAAoB,GACpB,0BAA0B,GAC1B,yBAAyB,GACzB,sBAAsB,GACtB,mBAAmB,GACnB,sBAAsB,GACtB,oBAAoB,GACpB,wBAAwB,GACxB,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;AAEhB,MAAM,MAAM,8BAA8B,GACzC,oBAAoB,CAAC,8BAA8B,CAAC,CAAA;AAErD,eAAO,MAAM,oCAAoC;;;;aAI/C,CAAA;AAEF;;GAEG;AACH,eAAO,MAAM,6BAA6B;;;;IAKxC,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAS9B,CAAA;AAEF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,WAAW,CAClD,OAAO,6BAA6B,CACpC,CAAA"}
|
|
@@ -36,6 +36,9 @@ export declare const getPageResultMessageSchema: v.VariantSchema<"status", [v.Ob
|
|
|
36
36
|
}, undefined>, v.ObjectSchema<{
|
|
37
37
|
readonly type: v.LiteralSchema<"block_id", undefined>;
|
|
38
38
|
readonly block_id: v.CustomSchema<import("../ids.js").NotionBlockId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
39
|
+
}, undefined>, v.ObjectSchema<{
|
|
40
|
+
readonly type: v.LiteralSchema<"agent_id", undefined>;
|
|
41
|
+
readonly agent_id: v.CustomSchema<import("../ids.js").NotionAgentId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
39
42
|
}, undefined>], undefined>;
|
|
40
43
|
readonly properties: v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
41
44
|
readonly type: v.LiteralSchema<"title", undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPage.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/custom-blocks/custom-blocks/sdk/src/bridge/messages/getPage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAMxD,eAAO,MAAM,iCAAiC,2BAAa,CAAA;AAE3D,MAAM,MAAM,2BAA2B,GACpC,iBAAiB,GACjB,oBAAoB,GACpB,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;AAEhB,MAAM,MAAM,2BAA2B,GACtC,oBAAoB,CAAC,2BAA2B,CAAC,CAAA;AAElD,eAAO,MAAM,iCAAiC;;;;aAI5C,CAAA;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;aAI/B,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE,eAAO,MAAM,0BAA0B
|
|
1
|
+
{"version":3,"file":"getPage.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/custom-blocks/custom-blocks/sdk/src/bridge/messages/getPage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAMxD,eAAO,MAAM,iCAAiC,2BAAa,CAAA;AAE3D,MAAM,MAAM,2BAA2B,GACpC,iBAAiB,GACjB,oBAAoB,GACpB,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;AAEhB,MAAM,MAAM,2BAA2B,GACtC,oBAAoB,CAAC,2BAA2B,CAAC,CAAA;AAElD,eAAO,MAAM,iCAAiC;;;;aAI5C,CAAA;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;aAI/B,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAarC,CAAA;AAEF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,WAAW,CAC/C,OAAO,0BAA0B,CACjC,CAAA"}
|
|
@@ -19,6 +19,9 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
|
|
|
19
19
|
}, undefined>, v.ObjectSchema<{
|
|
20
20
|
readonly type: v.LiteralSchema<"block_id", undefined>;
|
|
21
21
|
readonly block_id: v.CustomSchema<import("../ids.js").NotionBlockId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
22
|
+
}, undefined>, v.ObjectSchema<{
|
|
23
|
+
readonly type: v.LiteralSchema<"agent_id", undefined>;
|
|
24
|
+
readonly agent_id: v.CustomSchema<import("../ids.js").NotionAgentId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
22
25
|
}, undefined>], undefined>;
|
|
23
26
|
readonly page: v.ObjectSchema<{
|
|
24
27
|
readonly id: v.CustomSchema<import("../ids.js").NotionPageId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
@@ -205,6 +208,9 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
|
|
|
205
208
|
}, undefined>, v.ObjectSchema<{
|
|
206
209
|
readonly type: v.LiteralSchema<"block_id", undefined>;
|
|
207
210
|
readonly block_id: v.CustomSchema<import("../ids.js").NotionBlockId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
211
|
+
}, undefined>, v.ObjectSchema<{
|
|
212
|
+
readonly type: v.LiteralSchema<"agent_id", undefined>;
|
|
213
|
+
readonly agent_id: v.CustomSchema<import("../ids.js").NotionAgentId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
208
214
|
}, undefined>], undefined>;
|
|
209
215
|
}, undefined>, v.ObjectSchema<{
|
|
210
216
|
readonly type: v.LiteralSchema<"pageChanged", undefined>;
|
|
@@ -465,6 +471,9 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
|
|
|
465
471
|
}, undefined>, v.ObjectSchema<{
|
|
466
472
|
readonly type: v.LiteralSchema<"block_id", undefined>;
|
|
467
473
|
readonly block_id: v.CustomSchema<import("../ids.js").NotionBlockId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
474
|
+
}, undefined>, v.ObjectSchema<{
|
|
475
|
+
readonly type: v.LiteralSchema<"agent_id", undefined>;
|
|
476
|
+
readonly agent_id: v.CustomSchema<import("../ids.js").NotionAgentId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
468
477
|
}, undefined>], undefined>;
|
|
469
478
|
readonly properties: v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
470
479
|
readonly type: v.LiteralSchema<"title", undefined>;
|
|
@@ -659,6 +668,9 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
|
|
|
659
668
|
}, undefined>, v.ObjectSchema<{
|
|
660
669
|
readonly type: v.LiteralSchema<"block_id", undefined>;
|
|
661
670
|
readonly block_id: v.CustomSchema<import("../ids.js").NotionBlockId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
671
|
+
}, undefined>, v.ObjectSchema<{
|
|
672
|
+
readonly type: v.LiteralSchema<"agent_id", undefined>;
|
|
673
|
+
readonly agent_id: v.CustomSchema<import("../ids.js").NotionAgentId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
662
674
|
}, undefined>], undefined>;
|
|
663
675
|
readonly properties: v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
664
676
|
readonly type: v.LiteralSchema<"title", undefined>;
|
|
@@ -906,6 +918,9 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
|
|
|
906
918
|
}, undefined>, v.ObjectSchema<{
|
|
907
919
|
readonly type: v.LiteralSchema<"block_id", undefined>;
|
|
908
920
|
readonly block_id: v.CustomSchema<import("../ids.js").NotionBlockId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
921
|
+
}, undefined>, v.ObjectSchema<{
|
|
922
|
+
readonly type: v.LiteralSchema<"agent_id", undefined>;
|
|
923
|
+
readonly agent_id: v.CustomSchema<import("../ids.js").NotionAgentId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
909
924
|
}, undefined>], undefined>;
|
|
910
925
|
readonly properties: v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
911
926
|
readonly type: v.LiteralSchema<"title", undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hostToSandbox.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/custom-blocks/custom-blocks/sdk/src/bridge/messages/hostToSandbox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAe5B;;GAEG;AACH,eAAO,MAAM,0BAA0B
|
|
1
|
+
{"version":3,"file":"hostToSandbox.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/custom-blocks/custom-blocks/sdk/src/bridge/messages/hostToSandbox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAe5B;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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|
|
36
36
|
readonly type: v.LiteralSchema<"block_id", undefined>;
|
|
37
37
|
readonly block_id: v.CustomSchema<import("../ids.js").NotionBlockId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
38
|
+
}, undefined>, v.ObjectSchema<{
|
|
39
|
+
readonly type: v.LiteralSchema<"agent_id", undefined>;
|
|
40
|
+
readonly agent_id: v.CustomSchema<import("../ids.js").NotionAgentId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
38
41
|
}, undefined>], undefined>;
|
|
39
42
|
readonly page: v.ObjectSchema<{
|
|
40
43
|
readonly id: v.CustomSchema<import("../ids.js").NotionPageId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/custom-blocks/custom-blocks/sdk/src/bridge/messages/init.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AASxD,eAAO,MAAM,8BAA8B,2BAAa,CAAA;AAExD,MAAM,MAAM,wBAAwB,GACjC,UAAU,GACV,eAAe,GACf,sBAAsB,GACtB,kBAAkB,GAClB,0BAA0B,GAC1B,8BAA8B,GAC9B,qBAAqB,GACrB,0BAA0B,GAC1B,6BAA6B,GAC7B,yBAAyB,GACzB,0BAA0B,GAC1B,0BAA0B,GAC1B,eAAe,GACf,cAAc,GACd,eAAe,GACf,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;AAEhB,MAAM,MAAM,wBAAwB,GACnC,oBAAoB,CAAC,wBAAwB,CAAC,CAAA;AAE/C,eAAO,MAAM,8BAA8B;;;;aAIzC,CAAA;AAEF,qBAAa,oBACZ,SAAQ,KACR,YAAW,oBAAoB;gBAEnB,KAAK,EAAE,wBAAwB;IAO3C,IAAI,EAAE,wBAAwB,CAAA;IAC9B,WAAW,EAAE,OAAO,CAAA;CACpB;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/custom-blocks/custom-blocks/sdk/src/bridge/messages/init.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AASxD,eAAO,MAAM,8BAA8B,2BAAa,CAAA;AAExD,MAAM,MAAM,wBAAwB,GACjC,UAAU,GACV,eAAe,GACf,sBAAsB,GACtB,kBAAkB,GAClB,0BAA0B,GAC1B,8BAA8B,GAC9B,qBAAqB,GACrB,0BAA0B,GAC1B,6BAA6B,GAC7B,yBAAyB,GACzB,0BAA0B,GAC1B,0BAA0B,GAC1B,eAAe,GACf,cAAc,GACd,eAAe,GACf,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;AAEhB,MAAM,MAAM,wBAAwB,GACnC,oBAAoB,CAAC,wBAAwB,CAAC,CAAA;AAE/C,eAAO,MAAM,8BAA8B;;;;aAIzC,CAAA;AAEF,qBAAa,oBACZ,SAAQ,KACR,YAAW,oBAAoB;gBAEnB,KAAK,EAAE,wBAAwB;IAO3C,IAAI,EAAE,wBAAwB,CAAA;IAC9B,WAAW,EAAE,OAAO,CAAA;CACpB;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAkB5B,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,iBAAiB,CAAC,CAAA"}
|
|
@@ -16,6 +16,9 @@ export declare const parentChangedMessageSchema: v.ObjectSchema<{
|
|
|
16
16
|
}, undefined>, v.ObjectSchema<{
|
|
17
17
|
readonly type: v.LiteralSchema<"block_id", undefined>;
|
|
18
18
|
readonly block_id: v.CustomSchema<import("../ids.js").NotionBlockId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
19
|
+
}, undefined>, v.ObjectSchema<{
|
|
20
|
+
readonly type: v.LiteralSchema<"agent_id", undefined>;
|
|
21
|
+
readonly agent_id: v.CustomSchema<import("../ids.js").NotionAgentId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
19
22
|
}, undefined>], undefined>;
|
|
20
23
|
}, undefined>;
|
|
21
24
|
export type ParentChangedMessage = v.InferOutput<typeof parentChangedMessageSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parentChanged.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/custom-blocks/custom-blocks/sdk/src/bridge/messages/parentChanged.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAG5B;;GAEG;AACH,eAAO,MAAM,0BAA0B
|
|
1
|
+
{"version":3,"file":"parentChanged.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/custom-blocks/custom-blocks/sdk/src/bridge/messages/parentChanged.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAG5B;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;aAGrC,CAAA;AAEF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,WAAW,CAC/C,OAAO,0BAA0B,CACjC,CAAA"}
|
|
@@ -30,6 +30,9 @@ export declare const updatePageResultMessageSchema: v.VariantSchema<"status", [v
|
|
|
30
30
|
}, undefined>, v.ObjectSchema<{
|
|
31
31
|
readonly type: v.LiteralSchema<"block_id", undefined>;
|
|
32
32
|
readonly block_id: v.CustomSchema<import("../ids.js").NotionBlockId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
33
|
+
}, undefined>, v.ObjectSchema<{
|
|
34
|
+
readonly type: v.LiteralSchema<"agent_id", undefined>;
|
|
35
|
+
readonly agent_id: v.CustomSchema<import("../ids.js").NotionAgentId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
33
36
|
}, undefined>], undefined>;
|
|
34
37
|
readonly properties: v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
35
38
|
readonly type: v.LiteralSchema<"title", undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updatePageResult.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/custom-blocks/custom-blocks/sdk/src/bridge/messages/updatePageResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAKxD,eAAO,MAAM,oCAAoC,2BAAa,CAAA;AAE9D,MAAM,MAAM,8BAA8B,GACvC,oBAAoB,GACpB,qBAAqB,GACrB,oBAAoB,GACpB,0BAA0B,GAC1B,mBAAmB,GACnB,sBAAsB,GACtB,oBAAoB,GACpB,wBAAwB,GACxB,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;AAEhB,MAAM,MAAM,8BAA8B,GACzC,oBAAoB,CAAC,8BAA8B,CAAC,CAAA;AAErD,eAAO,MAAM,oCAAoC;;;;aAI/C,CAAA;AAEF;;GAEG;AACH,eAAO,MAAM,6BAA6B
|
|
1
|
+
{"version":3,"file":"updatePageResult.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/custom-blocks/custom-blocks/sdk/src/bridge/messages/updatePageResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAKxD,eAAO,MAAM,oCAAoC,2BAAa,CAAA;AAE9D,MAAM,MAAM,8BAA8B,GACvC,oBAAoB,GACpB,qBAAqB,GACrB,oBAAoB,GACpB,0BAA0B,GAC1B,mBAAmB,GACnB,sBAAsB,GACtB,oBAAoB,GACpB,wBAAwB,GACxB,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;AAEhB,MAAM,MAAM,8BAA8B,GACzC,oBAAoB,CAAC,8BAA8B,CAAC,CAAA;AAErD,eAAO,MAAM,oCAAoC;;;;aAI/C,CAAA;AAEF;;GAEG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAaxC,CAAA;AAEF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,WAAW,CAClD,OAAO,6BAA6B,CACpC,CAAA"}
|
|
@@ -430,6 +430,9 @@ export declare const notionPageSchema: v.ObjectSchema<{
|
|
|
430
430
|
}, undefined>, v.ObjectSchema<{
|
|
431
431
|
readonly type: v.LiteralSchema<"block_id", undefined>;
|
|
432
432
|
readonly block_id: v.CustomSchema<import("../ids.js").NotionBlockId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
433
|
+
}, undefined>, v.ObjectSchema<{
|
|
434
|
+
readonly type: v.LiteralSchema<"agent_id", undefined>;
|
|
435
|
+
readonly agent_id: v.CustomSchema<import("../ids.js").NotionAgentId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
433
436
|
}, undefined>], undefined>;
|
|
434
437
|
readonly properties: v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
435
438
|
readonly type: v.LiteralSchema<"title", undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.d.ts","sourceRoot":"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eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAG5C,CAAA;AACD,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,WAAW,CACrD,OAAO,gCAAgC,CACvC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/custom-blocks/custom-blocks/sdk/src/bridge/pages/page.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAI5B,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAE7C,eAAO,MAAM,qBAAqB;;aAEhC,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B;;;;;;0BAMtC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,WAAW,CAChD,OAAO,2BAA2B,CAClC,CAAA;AAED,eAAO,MAAM,qBAAqB;;;aAGhC,CAAA;AACF,eAAO,MAAM,2BAA2B;;;;;;;aAOtC,CAAA;AACF,eAAO,MAAM,wBAAwB;;;;;aAGnC,CAAA;AACF,eAAO,MAAM,sBAAsB;;;;;;aAMjC,CAAA;AAGF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;0BAK/B,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE,eAAO,MAAM,qBAAqB;;;;;;;;;;;0BAGhC,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,qBAA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AAI,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,GACtD,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,GAC/B,KAAK,CAAA;AAER;;;;GAIG;AACH,MAAM,MAAM,4BAA4B,GACvC,sBAAsB,CAAC,uBAAuB,CAAC,CAAA;AAEhD,MAAM,MAAM,0BAA0B,GAAG;IACxC,CAAC,eAAe,EAAE,MAAM,GAAG,4BAA4B,CAAA;CACvD,CAAA;AAED,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAG5C,CAAA;AACD,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,WAAW,CACrD,OAAO,gCAAgC,CACvC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAY3B,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,gBAAgB,CAAC,CAAA"}
|
package/dist/bridge/parent.d.ts
CHANGED
|
@@ -11,6 +11,9 @@ export declare const notionParentSchema: v.VariantSchema<"type", [v.ObjectSchema
|
|
|
11
11
|
}, undefined>, v.ObjectSchema<{
|
|
12
12
|
readonly type: v.LiteralSchema<"block_id", undefined>;
|
|
13
13
|
readonly block_id: v.CustomSchema<import("./ids.js").NotionBlockId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
14
|
+
}, undefined>, v.ObjectSchema<{
|
|
15
|
+
readonly type: v.LiteralSchema<"agent_id", undefined>;
|
|
16
|
+
readonly agent_id: v.CustomSchema<import("./ids.js").NotionAgentId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
14
17
|
}, undefined>], undefined>;
|
|
15
18
|
/**
|
|
16
19
|
* A record's parent reference.
|
|
@@ -20,6 +23,7 @@ export declare const notionParentSchema: v.VariantSchema<"type", [v.ObjectSchema
|
|
|
20
23
|
* - `block_id` — parented under a non-page container block (toggle, column, callout, ...).
|
|
21
24
|
* - `data_source_id` — parented under a collection (data source).
|
|
22
25
|
* - `workspace` — top-level / team-rooted.
|
|
26
|
+
* - `agent_id` — owned by an agent, such as an agent instruction page or its blocks.
|
|
23
27
|
*/
|
|
24
28
|
export type NotionParent = v.InferOutput<typeof notionParentSchema>;
|
|
25
29
|
//# sourceMappingURL=parent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parent.d.ts","sourceRoot":"","sources":["../../../../home/runner/work/custom-blocks/custom-blocks/sdk/src/bridge/parent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"parent.d.ts","sourceRoot":"","sources":["../../../../home/runner/work/custom-blocks/custom-blocks/sdk/src/bridge/parent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAQ5B,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;0BAS7B,CAAA;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,kBAAkB,CAAC,CAAA"}
|
package/dist/bridge/parent.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
import { notionBlockIdSchema, notionDataSourceIdSchema, notionPageIdSchema, } from "./ids.js";
|
|
2
|
+
import { notionAgentIdSchema, notionBlockIdSchema, notionDataSourceIdSchema, notionPageIdSchema, } from "./ids.js";
|
|
3
3
|
export const notionParentSchema = v.variant("type", [
|
|
4
4
|
v.object({ type: v.literal("page_id"), page_id: notionPageIdSchema }),
|
|
5
5
|
v.object({
|
|
@@ -8,4 +8,5 @@ export const notionParentSchema = v.variant("type", [
|
|
|
8
8
|
}),
|
|
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
|
+
v.object({ type: v.literal("agent_id"), agent_id: notionAgentIdSchema }),
|
|
11
12
|
]);
|
package/dist/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export { NOTION_BUILTIN_PROPERTY_IDS, NOTION_PROPERTY_TYPES, } from "./bridge/da
|
|
|
16
16
|
export type { NotionRecordPointer } from "./bridge/dataSources/recordPointer.js";
|
|
17
17
|
export type { CustomBlockPropertyErrorCode, CustomBlockPropertyErrorInfo, } from "./bridge/dataSources/resolveProperty.js";
|
|
18
18
|
export type { CustomBlockErrorInfo } from "./bridge/errors.js";
|
|
19
|
-
export type { NotionBlockId, NotionDataSourceId, NotionSpaceId, } from "./bridge/ids.js";
|
|
19
|
+
export type { NotionAgentId, NotionBlockId, NotionDataSourceId, NotionSpaceId, } from "./bridge/ids.js";
|
|
20
20
|
export type { CustomBlockManifest, ManifestDataSource, ManifestIcon, ManifestProperty, } from "./bridge/manifest.js";
|
|
21
21
|
export type { NotionCreatePagePosition } from "./bridge/messages/createPage.js";
|
|
22
22
|
export type { CustomBlockCreatePageErrorCode, CustomBlockCreatePageErrorInfo, } from "./bridge/messages/createPageResult.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../home/runner/work/custom-blocks/custom-blocks/sdk/src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,YAAY,EACX,sBAAsB,EACtB,gBAA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BAAwB,GACxB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAChE,YAAY,EACX,6BAA6B,EAC7B,6BAA6B,GAC7B,MAAM,gCAAgC,CAAA;AACvC,YAAY,EACX,mCAAmC,EACnC,mCAAmC,GACnC,MAAM,4CAA4C,CAAA;AACnD,YAAY,EACX,8BAA8B,EAC9B,8BAA8B,GAC9B,MAAM,uCAAuC,CAAA;AAC9C,YAAY,EACX,UAAU,EACV,eAAe,EACf,cAAc,EACd,YAAY,EACZ,0BAA0B,EAC1B,4BAA4B,EAC5B,uBAAuB,EACvB,0BAA0B,GAC1B,MAAM,wBAAwB,CAAA;AAC/B,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAA;AACxD,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACrE,OAAO,EACN,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,eAAe,EACf,gBAAgB,GAChB,MAAM,WAAW,CAAA;AAClB,cAAc,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../home/runner/work/custom-blocks/custom-blocks/sdk/src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,YAAY,EACX,sBAAsB,EACtB,gBAAgB,GAChB,MAAM,oCAAoC,CAAA;AAC3C,YAAY,EACX,oBAAoB,EACpB,+BAA+B,EAC/B,gCAAgC,GAChC,MAAM,wCAAwC,CAAA;AAC/C,YAAY,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAA;AACpF,YAAY,EACX,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,sBAAsB,EACtB,eAAe,EACf,gB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GAC9B,MAAM,uCAAuC,CAAA;AAC9C,YAAY,EACX,UAAU,EACV,eAAe,EACf,cAAc,EACd,YAAY,EACZ,0BAA0B,EAC1B,4BAA4B,EAC5B,uBAAuB,EACvB,0BAA0B,GAC1B,MAAM,wBAAwB,CAAA;AAC/B,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAA;AACxD,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACrE,OAAO,EACN,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,eAAe,EACf,gBAAgB,GAChB,MAAM,WAAW,CAAA;AAClB,cAAc,YAAY,CAAA"}
|
package/dist/version.js
CHANGED
package/docs/block-location.md
CHANGED
|
@@ -37,11 +37,28 @@ type NotionParent =
|
|
|
37
37
|
| { type: "page_id"; page_id: string } // inline custom block under a page
|
|
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
|
-
| { type: "workspace"; workspace: true }
|
|
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
42
|
```
|
|
42
43
|
|
|
43
44
|
For non-React renderers, use `customBlock.getParent()` after `initCustomBlock()` resolves.
|
|
44
45
|
|
|
46
|
+
To identify custom blocks in agent-owned instruction content:
|
|
47
|
+
|
|
48
|
+
```tsx
|
|
49
|
+
import { useParent } from "ncblock"
|
|
50
|
+
|
|
51
|
+
export function AgentInstructionBadge() {
|
|
52
|
+
const parent = useParent()
|
|
53
|
+
|
|
54
|
+
if (parent.type !== "agent_id") {
|
|
55
|
+
return null
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return <span>Agent: {parent.agent_id}</span>
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
45
62
|
### `usePage()`
|
|
46
63
|
|
|
47
64
|
Returns the nearest enclosing `page` / `collection_view_page` ancestor.
|
package/package.json
CHANGED
package/src/bridge/ids.ts
CHANGED
|
@@ -3,6 +3,7 @@ import * as v from "valibot"
|
|
|
3
3
|
declare const notionDataSourceIdBrand: unique symbol
|
|
4
4
|
declare const notionBlockIdBrand: unique symbol
|
|
5
5
|
declare const notionPageIdBrand: unique symbol
|
|
6
|
+
declare const notionAgentIdBrand: unique symbol
|
|
6
7
|
declare const notionSpaceIdBrand: unique symbol
|
|
7
8
|
|
|
8
9
|
/**
|
|
@@ -44,6 +45,19 @@ export const notionPageIdSchema = v.custom<NotionPageId>(
|
|
|
44
45
|
"Expected a Notion page ID",
|
|
45
46
|
)
|
|
46
47
|
|
|
48
|
+
/**
|
|
49
|
+
* Branded Notion agent ID. Agent parents identify the workflow that owns an
|
|
50
|
+
* instruction page or one of its blocks.
|
|
51
|
+
*/
|
|
52
|
+
export type NotionAgentId = string & {
|
|
53
|
+
readonly [notionAgentIdBrand]: "NotionAgentId"
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export const notionAgentIdSchema = v.custom<NotionAgentId>(
|
|
57
|
+
value => typeof value === "string",
|
|
58
|
+
"Expected a Notion agent ID",
|
|
59
|
+
)
|
|
60
|
+
|
|
47
61
|
/**
|
|
48
62
|
* Branded Notion workspace/space ID. Host payloads and SDK APIs use plain strings at runtime,
|
|
49
63
|
* but the brand keeps space IDs from being accidentally mixed with other IDs in TypeScript.
|
package/src/bridge/parent.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as v from "valibot"
|
|
2
2
|
import {
|
|
3
|
+
notionAgentIdSchema,
|
|
3
4
|
notionBlockIdSchema,
|
|
4
5
|
notionDataSourceIdSchema,
|
|
5
6
|
notionPageIdSchema,
|
|
@@ -13,6 +14,7 @@ export const notionParentSchema = v.variant("type", [
|
|
|
13
14
|
}),
|
|
14
15
|
v.object({ type: v.literal("workspace"), workspace: v.literal(true) }),
|
|
15
16
|
v.object({ type: v.literal("block_id"), block_id: notionBlockIdSchema }),
|
|
17
|
+
v.object({ type: v.literal("agent_id"), agent_id: notionAgentIdSchema }),
|
|
16
18
|
])
|
|
17
19
|
|
|
18
20
|
/**
|
|
@@ -23,5 +25,6 @@ export const notionParentSchema = v.variant("type", [
|
|
|
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.
|
|
28
|
+
* - `agent_id` — owned by an agent, such as an agent instruction page or its blocks.
|
|
26
29
|
*/
|
|
27
30
|
export type NotionParent = v.InferOutput<typeof notionParentSchema>
|