@notionhq/custom-blocks-host 0.6.0 → 0.7.0
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/browser.js +1 -1
- package/dist/compatibility/normalizeSandboxToHostMessage.d.ts +13 -14
- package/dist/compatibility/normalizeSandboxToHostMessage.d.ts.map +1 -1
- package/dist/compatibility/pages/toPageWithNullTextFallbackProperties.d.ts.map +1 -1
- package/dist/compatibility/pages/toPageWithNullTextFallbackProperties.js +0 -1
- package/dist/compatibility/protocol3To4/addMetadataReadSchemasForProtocol3To4.d.ts +15 -34
- package/dist/compatibility/protocol3To4/addMetadataReadSchemasForProtocol3To4.d.ts.map +1 -1
- package/dist/compatibility/protocol3To5/toPropertyValueForProtocol3To5.d.ts.map +1 -1
- package/dist/compatibility/protocol3To5/toPropertyValueForProtocol3To5.js +0 -2
- package/dist/context/initialState.d.ts +39 -38
- package/dist/context/initialState.d.ts.map +1 -1
- package/dist/manifest/types.d.ts +13 -2
- package/dist/manifest/types.d.ts.map +1 -1
- package/dist/protocol/compatibility/protocol3To5/bridgePage.d.ts +0 -4
- package/dist/protocol/dataSources/bridgeDataSourceBinding.d.ts +0 -4
- package/dist/protocol/dataSources/bridgeDataSourceBindings.d.ts +0 -4
- package/dist/protocol/dataSources/collectionSchema.d.ts +0 -4
- package/dist/protocol/dataSources/messages/dataSourcesChanged.d.ts +0 -4
- package/dist/protocol/dataSources/messages/queryDataSource.d.ts +0 -10
- package/dist/protocol/dataSources/notionDataSource.d.ts +0 -8
- package/dist/protocol/dataSources/properties/propertySchema.d.ts +3 -7
- package/dist/protocol/dataSources/properties/propertySchema.js +1 -3
- package/dist/protocol/handshake/connect.d.ts +13 -2
- package/dist/protocol/handshake/init.d.ts +13 -6
- package/dist/protocol/index.d.ts +3 -3
- package/dist/protocol/index.js +1 -1
- package/dist/protocol/manifest/capabilities.d.ts +19 -8
- package/dist/protocol/manifest/capabilities.js +9 -3
- package/dist/protocol/manifest/manifest.d.ts +27 -4
- package/dist/protocol/manifest/manifest.js +6 -0
- package/dist/protocol/messages/hostToSandbox.d.ts +26 -72
- package/dist/protocol/messages/sandboxToHost.d.ts +13 -14
- package/dist/protocol/pages/bridgePage.d.ts +0 -5
- package/dist/protocol/pages/bridgePage.js +0 -1
- package/dist/protocol/pages/messages/createPage.d.ts +0 -22
- package/dist/protocol/pages/messages/getPage.d.ts +0 -14
- package/dist/protocol/pages/messages/updatePage.d.ts +0 -18
- package/dist/protocol/pages/properties/bridgePagePropertyMaps.d.ts +0 -8
- package/dist/protocol/pages/properties/bridgePagePropertyValue.d.ts +0 -4
- package/dist/protocol/pages/properties/bridgePagePropertyValue.js +0 -5
- package/dist/protocol/utils/protocolVersion.d.ts +1 -1
- package/dist/protocol/utils/protocolVersion.js +1 -1
- package/docs/bridge/changelog.md +11 -3
- package/docs/bridge/protocol.md +9 -3
- package/docs/compatibility.md +1 -1
- package/package.json +1 -1
- package/src/compatibility/pages/toPageWithNullTextFallbackProperties.ts +0 -1
- package/src/compatibility/protocol3To5/toPropertyValueForProtocol3To5.ts +0 -2
|
@@ -73,12 +73,23 @@ export declare const customBlockHostInitialStateSchema: v.ObjectSchema<{
|
|
|
73
73
|
readonly properties: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
|
|
74
74
|
readonly name: v.StringSchema<undefined>;
|
|
75
75
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
76
|
-
readonly type: v.PicklistSchema<readonly ["title", "rich_text", "number", "checkbox", "url", "email", "phone_number", "select", "multi_select", "status", "date", "people", "files", "unique_id", "relation", "place", "formula", "rollup", "button", "verification", "
|
|
76
|
+
readonly type: v.PicklistSchema<readonly ["title", "rich_text", "number", "checkbox", "url", "email", "phone_number", "select", "multi_select", "status", "date", "people", "files", "unique_id", "relation", "place", "formula", "rollup", "button", "verification", "location", "created_time", "last_edited_time", "created_by", "last_edited_by"], undefined>;
|
|
77
77
|
}, undefined>, undefined>, {}>;
|
|
78
78
|
}, undefined>, undefined>, {}>;
|
|
79
|
+
readonly pages: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
|
|
80
|
+
readonly name: v.StringSchema<undefined>;
|
|
81
|
+
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
82
|
+
readonly icon: v.OptionalSchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
83
|
+
readonly type: v.LiteralSchema<"emoji", undefined>;
|
|
84
|
+
readonly emoji: v.StringSchema<undefined>;
|
|
85
|
+
}, undefined>, v.ObjectSchema<{
|
|
86
|
+
readonly type: v.LiteralSchema<"external", undefined>;
|
|
87
|
+
readonly url: v.StringSchema<undefined>;
|
|
88
|
+
}, undefined>], undefined>, undefined>;
|
|
89
|
+
}, undefined>, undefined>, undefined>;
|
|
79
90
|
readonly capabilities: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
80
91
|
readonly capability: v.StringSchema<undefined>;
|
|
81
|
-
readonly resource: v.StringSchema<undefined>;
|
|
92
|
+
readonly resource: v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.MinLengthAction<string[], 1, undefined>]>], undefined>;
|
|
82
93
|
}, undefined>, undefined>, undefined>;
|
|
83
94
|
}, undefined>;
|
|
84
95
|
readonly dataSources: v.ObjectSchema<{
|
|
@@ -199,10 +210,6 @@ export declare const customBlockHostInitialStateSchema: v.ObjectSchema<{
|
|
|
199
210
|
readonly name: v.StringSchema<undefined>;
|
|
200
211
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
201
212
|
readonly type: v.LiteralSchema<"verification", undefined>;
|
|
202
|
-
}, undefined>, v.ObjectSchema<{
|
|
203
|
-
readonly name: v.StringSchema<undefined>;
|
|
204
|
-
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
205
|
-
readonly type: v.LiteralSchema<"last_visited_time", undefined>;
|
|
206
213
|
}, undefined>, v.ObjectSchema<{
|
|
207
214
|
readonly name: v.StringSchema<undefined>;
|
|
208
215
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -318,12 +325,23 @@ export declare const customBlockHostPreparedStateResultSchema: v.VariantSchema<"
|
|
|
318
325
|
readonly properties: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
|
|
319
326
|
readonly name: v.StringSchema<undefined>;
|
|
320
327
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
321
|
-
readonly type: v.PicklistSchema<readonly ["title", "rich_text", "number", "checkbox", "url", "email", "phone_number", "select", "multi_select", "status", "date", "people", "files", "unique_id", "relation", "place", "formula", "rollup", "button", "verification", "
|
|
328
|
+
readonly type: v.PicklistSchema<readonly ["title", "rich_text", "number", "checkbox", "url", "email", "phone_number", "select", "multi_select", "status", "date", "people", "files", "unique_id", "relation", "place", "formula", "rollup", "button", "verification", "location", "created_time", "last_edited_time", "created_by", "last_edited_by"], undefined>;
|
|
322
329
|
}, undefined>, undefined>, {}>;
|
|
323
330
|
}, undefined>, undefined>, {}>;
|
|
331
|
+
readonly pages: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
|
|
332
|
+
readonly name: v.StringSchema<undefined>;
|
|
333
|
+
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
334
|
+
readonly icon: v.OptionalSchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
335
|
+
readonly type: v.LiteralSchema<"emoji", undefined>;
|
|
336
|
+
readonly emoji: v.StringSchema<undefined>;
|
|
337
|
+
}, undefined>, v.ObjectSchema<{
|
|
338
|
+
readonly type: v.LiteralSchema<"external", undefined>;
|
|
339
|
+
readonly url: v.StringSchema<undefined>;
|
|
340
|
+
}, undefined>], undefined>, undefined>;
|
|
341
|
+
}, undefined>, undefined>, undefined>;
|
|
324
342
|
readonly capabilities: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
325
343
|
readonly capability: v.StringSchema<undefined>;
|
|
326
|
-
readonly resource: v.StringSchema<undefined>;
|
|
344
|
+
readonly resource: v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.MinLengthAction<string[], 1, undefined>]>], undefined>;
|
|
327
345
|
}, undefined>, undefined>, undefined>;
|
|
328
346
|
}, undefined>;
|
|
329
347
|
readonly dataSources: v.ObjectSchema<{
|
|
@@ -444,10 +462,6 @@ export declare const customBlockHostPreparedStateResultSchema: v.VariantSchema<"
|
|
|
444
462
|
readonly name: v.StringSchema<undefined>;
|
|
445
463
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
446
464
|
readonly type: v.LiteralSchema<"verification", undefined>;
|
|
447
|
-
}, undefined>, v.ObjectSchema<{
|
|
448
|
-
readonly name: v.StringSchema<undefined>;
|
|
449
|
-
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
450
|
-
readonly type: v.LiteralSchema<"last_visited_time", undefined>;
|
|
451
465
|
}, undefined>, v.ObjectSchema<{
|
|
452
466
|
readonly name: v.StringSchema<undefined>;
|
|
453
467
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -557,12 +571,23 @@ export declare const customBlockHostPreparedStateResultSchema: v.VariantSchema<"
|
|
|
557
571
|
readonly properties: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
|
|
558
572
|
readonly name: v.StringSchema<undefined>;
|
|
559
573
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
560
|
-
readonly type: v.PicklistSchema<readonly ["title", "rich_text", "number", "checkbox", "url", "email", "phone_number", "select", "multi_select", "status", "date", "people", "files", "unique_id", "relation", "place", "formula", "rollup", "button", "verification", "
|
|
574
|
+
readonly type: v.PicklistSchema<readonly ["title", "rich_text", "number", "checkbox", "url", "email", "phone_number", "select", "multi_select", "status", "date", "people", "files", "unique_id", "relation", "place", "formula", "rollup", "button", "verification", "location", "created_time", "last_edited_time", "created_by", "last_edited_by"], undefined>;
|
|
561
575
|
}, undefined>, undefined>, {}>;
|
|
562
576
|
}, undefined>, undefined>, {}>;
|
|
577
|
+
readonly pages: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
|
|
578
|
+
readonly name: v.StringSchema<undefined>;
|
|
579
|
+
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
580
|
+
readonly icon: v.OptionalSchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
581
|
+
readonly type: v.LiteralSchema<"emoji", undefined>;
|
|
582
|
+
readonly emoji: v.StringSchema<undefined>;
|
|
583
|
+
}, undefined>, v.ObjectSchema<{
|
|
584
|
+
readonly type: v.LiteralSchema<"external", undefined>;
|
|
585
|
+
readonly url: v.StringSchema<undefined>;
|
|
586
|
+
}, undefined>], undefined>, undefined>;
|
|
587
|
+
}, undefined>, undefined>, undefined>;
|
|
563
588
|
readonly capabilities: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
564
589
|
readonly capability: v.StringSchema<undefined>;
|
|
565
|
-
readonly resource: v.StringSchema<undefined>;
|
|
590
|
+
readonly resource: v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.MinLengthAction<string[], 1, undefined>]>], undefined>;
|
|
566
591
|
}, undefined>, undefined>, undefined>;
|
|
567
592
|
}, undefined>;
|
|
568
593
|
readonly dataSources: v.ObjectSchema<{
|
|
@@ -683,10 +708,6 @@ export declare const customBlockHostPreparedStateResultSchema: v.VariantSchema<"
|
|
|
683
708
|
readonly name: v.StringSchema<undefined>;
|
|
684
709
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
685
710
|
readonly type: v.LiteralSchema<"verification", undefined>;
|
|
686
|
-
}, undefined>, v.ObjectSchema<{
|
|
687
|
-
readonly name: v.StringSchema<undefined>;
|
|
688
|
-
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
689
|
-
readonly type: v.LiteralSchema<"last_visited_time", undefined>;
|
|
690
711
|
}, undefined>, v.ObjectSchema<{
|
|
691
712
|
readonly name: v.StringSchema<undefined>;
|
|
692
713
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -890,10 +911,6 @@ export declare const customBlockHostPreparedStateResultSchema: v.VariantSchema<"
|
|
|
890
911
|
name: string;
|
|
891
912
|
description?: string | undefined;
|
|
892
913
|
type: "verification";
|
|
893
|
-
} | {
|
|
894
|
-
name: string;
|
|
895
|
-
description?: string | undefined;
|
|
896
|
-
type: "last_visited_time";
|
|
897
914
|
} | {
|
|
898
915
|
name: string;
|
|
899
916
|
description?: string | undefined;
|
|
@@ -1100,10 +1117,6 @@ export declare const customBlockHostPreparedStateResultSchema: v.VariantSchema<"
|
|
|
1100
1117
|
name: string;
|
|
1101
1118
|
description?: string | undefined;
|
|
1102
1119
|
type: "verification";
|
|
1103
|
-
} | {
|
|
1104
|
-
name: string;
|
|
1105
|
-
description?: string | undefined;
|
|
1106
|
-
type: "last_visited_time";
|
|
1107
1120
|
} | {
|
|
1108
1121
|
name: string;
|
|
1109
1122
|
description?: string | undefined;
|
|
@@ -1311,10 +1324,6 @@ export declare const customBlockHostPreparedStateResultSchema: v.VariantSchema<"
|
|
|
1311
1324
|
name: string;
|
|
1312
1325
|
description?: string | undefined;
|
|
1313
1326
|
type: "verification";
|
|
1314
|
-
} | {
|
|
1315
|
-
name: string;
|
|
1316
|
-
description?: string | undefined;
|
|
1317
|
-
type: "last_visited_time";
|
|
1318
1327
|
} | {
|
|
1319
1328
|
name: string;
|
|
1320
1329
|
description?: string | undefined;
|
|
@@ -1523,10 +1532,6 @@ export declare const customBlockHostPreparedStateResultSchema: v.VariantSchema<"
|
|
|
1523
1532
|
name: string;
|
|
1524
1533
|
description?: string | undefined;
|
|
1525
1534
|
type: "verification";
|
|
1526
|
-
} | {
|
|
1527
|
-
name: string;
|
|
1528
|
-
description?: string | undefined;
|
|
1529
|
-
type: "last_visited_time";
|
|
1530
1535
|
} | {
|
|
1531
1536
|
name: string;
|
|
1532
1537
|
description?: string | undefined;
|
|
@@ -1734,10 +1739,6 @@ export declare const customBlockHostPreparedStateResultSchema: v.VariantSchema<"
|
|
|
1734
1739
|
name: string;
|
|
1735
1740
|
description?: string | undefined;
|
|
1736
1741
|
type: "verification";
|
|
1737
|
-
} | {
|
|
1738
|
-
name: string;
|
|
1739
|
-
description?: string | undefined;
|
|
1740
|
-
type: "last_visited_time";
|
|
1741
1742
|
} | {
|
|
1742
1743
|
name: string;
|
|
1743
1744
|
description?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initialState.d.ts","sourceRoot":"","sources":["../../src/context/initialState.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,uDAAuD,CAAA;AAItG,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAElE,eAAO,MAAM,iCAAiC;;IAE7C;;;OAGG
|
|
1
|
+
{"version":3,"file":"initialState.d.ts","sourceRoot":"","sources":["../../src/context/initialState.ts"],"names":[],"mappings":"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"}
|
package/dist/manifest/types.d.ts
CHANGED
|
@@ -31,12 +31,23 @@ export declare const customBlockHostManifestResultSchema: v.VariantSchema<"statu
|
|
|
31
31
|
readonly properties: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
|
|
32
32
|
readonly name: v.StringSchema<undefined>;
|
|
33
33
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
34
|
-
readonly type: v.PicklistSchema<readonly ["title", "rich_text", "number", "checkbox", "url", "email", "phone_number", "select", "multi_select", "status", "date", "people", "files", "unique_id", "relation", "place", "formula", "rollup", "button", "verification", "
|
|
34
|
+
readonly type: v.PicklistSchema<readonly ["title", "rich_text", "number", "checkbox", "url", "email", "phone_number", "select", "multi_select", "status", "date", "people", "files", "unique_id", "relation", "place", "formula", "rollup", "button", "verification", "location", "created_time", "last_edited_time", "created_by", "last_edited_by"], undefined>;
|
|
35
35
|
}, undefined>, undefined>, {}>;
|
|
36
36
|
}, undefined>, undefined>, {}>;
|
|
37
|
+
readonly pages: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
|
|
38
|
+
readonly name: v.StringSchema<undefined>;
|
|
39
|
+
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
40
|
+
readonly icon: v.OptionalSchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
41
|
+
readonly type: v.LiteralSchema<"emoji", undefined>;
|
|
42
|
+
readonly emoji: v.StringSchema<undefined>;
|
|
43
|
+
}, undefined>, v.ObjectSchema<{
|
|
44
|
+
readonly type: v.LiteralSchema<"external", undefined>;
|
|
45
|
+
readonly url: v.StringSchema<undefined>;
|
|
46
|
+
}, undefined>], undefined>, undefined>;
|
|
47
|
+
}, undefined>, undefined>, undefined>;
|
|
37
48
|
readonly capabilities: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
38
49
|
readonly capability: v.StringSchema<undefined>;
|
|
39
|
-
readonly resource: v.StringSchema<undefined>;
|
|
50
|
+
readonly resource: v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.MinLengthAction<string[], 1, undefined>]>], undefined>;
|
|
40
51
|
}, undefined>, undefined>, undefined>;
|
|
41
52
|
}, undefined>;
|
|
42
53
|
}, undefined>, v.ObjectSchema<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/manifest/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,uDAAuD,CAAA;AACtF,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAElE,+FAA+F;AAC/F,MAAM,MAAM,yBAAyB;AACpC,gGAAgG;AAC9F,MAAM;AACR,4FAA4F;GAC1F,SAAS,CAAA;AAEZ,eAAO,MAAM,mCAAmC
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/manifest/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,uDAAuD,CAAA;AACtF,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAElE,+FAA+F;AAC/F,MAAM,MAAM,yBAAyB;AACpC,gGAAgG;AAC9F,MAAM;AACR,4FAA4F;GAC1F,SAAS,CAAA;AAEZ,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAM9C,CAAA;AAEF,+FAA+F;AAC/F,MAAM,MAAM,6BAA6B,GAAG,qBAAqB,CAAC;IACjE,QAAQ,EAAE,CAAC,CAAC,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;CAC7C,CAAC,CAAA;AAEF,MAAM,MAAM,uCAAuC,GAAG,CAAC,CAAC,WAAW,CAClE,OAAO,mCAAmC,CAC1C,CAAA"}
|
|
@@ -206,10 +206,6 @@ export declare const bridgePageForProtocol3To5Schema: v.ObjectSchema<{
|
|
|
206
206
|
readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
|
|
207
207
|
readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
208
208
|
}, undefined>, undefined>;
|
|
209
|
-
}, undefined>, v.ObjectSchema<{
|
|
210
|
-
readonly id: v.StringSchema<undefined>;
|
|
211
|
-
readonly type: v.LiteralSchema<"last_visited_time", undefined>;
|
|
212
|
-
readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
213
209
|
}, undefined>, v.ObjectSchema<{
|
|
214
210
|
readonly id: v.StringSchema<undefined>;
|
|
215
211
|
readonly type: v.LiteralSchema<"unique_id", undefined>;
|
|
@@ -121,10 +121,6 @@ export declare const bridgeDataSourceBindingSchema: v.ObjectSchema<{
|
|
|
121
121
|
readonly name: v.StringSchema<undefined>;
|
|
122
122
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
123
123
|
readonly type: v.LiteralSchema<"verification", undefined>;
|
|
124
|
-
}, undefined>, v.ObjectSchema<{
|
|
125
|
-
readonly name: v.StringSchema<undefined>;
|
|
126
|
-
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
127
|
-
readonly type: v.LiteralSchema<"last_visited_time", undefined>;
|
|
128
124
|
}, undefined>, v.ObjectSchema<{
|
|
129
125
|
readonly name: v.StringSchema<undefined>;
|
|
130
126
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -116,10 +116,6 @@ export declare const bridgeDataSourceBindingsSchema: v.RecordSchema<v.StringSche
|
|
|
116
116
|
readonly name: v.StringSchema<undefined>;
|
|
117
117
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
118
118
|
readonly type: v.LiteralSchema<"verification", undefined>;
|
|
119
|
-
}, undefined>, v.ObjectSchema<{
|
|
120
|
-
readonly name: v.StringSchema<undefined>;
|
|
121
|
-
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
122
|
-
readonly type: v.LiteralSchema<"last_visited_time", undefined>;
|
|
123
119
|
}, undefined>, v.ObjectSchema<{
|
|
124
120
|
readonly name: v.StringSchema<undefined>;
|
|
125
121
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -115,10 +115,6 @@ export declare const notionCollectionSchemaValidator: v.ObjectSchema<{
|
|
|
115
115
|
readonly name: v.StringSchema<undefined>;
|
|
116
116
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
117
117
|
readonly type: v.LiteralSchema<"verification", undefined>;
|
|
118
|
-
}, undefined>, v.ObjectSchema<{
|
|
119
|
-
readonly name: v.StringSchema<undefined>;
|
|
120
|
-
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
121
|
-
readonly type: v.LiteralSchema<"last_visited_time", undefined>;
|
|
122
118
|
}, undefined>, v.ObjectSchema<{
|
|
123
119
|
readonly name: v.StringSchema<undefined>;
|
|
124
120
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -124,10 +124,6 @@ export declare const dataSourcesChangedMessageSchema: v.ObjectSchema<{
|
|
|
124
124
|
readonly name: v.StringSchema<undefined>;
|
|
125
125
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
126
126
|
readonly type: v.LiteralSchema<"verification", undefined>;
|
|
127
|
-
}, undefined>, v.ObjectSchema<{
|
|
128
|
-
readonly name: v.StringSchema<undefined>;
|
|
129
|
-
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
130
|
-
readonly type: v.LiteralSchema<"last_visited_time", undefined>;
|
|
131
127
|
}, undefined>, v.ObjectSchema<{
|
|
132
128
|
readonly name: v.StringSchema<undefined>;
|
|
133
129
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -745,10 +745,6 @@ export declare const queryDataSourceResultMessageSchema: v.VariantSchema<"status
|
|
|
745
745
|
readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
|
|
746
746
|
readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
747
747
|
}, undefined>, undefined>;
|
|
748
|
-
}, undefined>, v.ObjectSchema<{
|
|
749
|
-
readonly id: v.StringSchema<undefined>;
|
|
750
|
-
readonly type: v.LiteralSchema<"last_visited_time", undefined>;
|
|
751
|
-
readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
752
748
|
}, undefined>, v.ObjectSchema<{
|
|
753
749
|
readonly id: v.StringSchema<undefined>;
|
|
754
750
|
readonly type: v.LiteralSchema<"unique_id", undefined>;
|
|
@@ -784,7 +780,6 @@ export declare const queryDataSourceResultMessageSchema: v.VariantSchema<"status
|
|
|
784
780
|
readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
|
|
785
781
|
readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
786
782
|
}, undefined>, undefined>, null>;
|
|
787
|
-
readonly last_visited_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
|
|
788
783
|
readonly created_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
|
|
789
784
|
readonly last_edited_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
|
|
790
785
|
readonly icon: v.OptionalSchema<v.NullableSchema<v.VariantSchema<"type", [v.LooseObjectSchema<{
|
|
@@ -1054,10 +1049,6 @@ export declare const queryDataSourceResultMessageWithProtocol3To5CompatibilitySc
|
|
|
1054
1049
|
readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
|
|
1055
1050
|
readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1056
1051
|
}, undefined>, undefined>;
|
|
1057
|
-
}, undefined>, v.ObjectSchema<{
|
|
1058
|
-
readonly id: v.StringSchema<undefined>;
|
|
1059
|
-
readonly type: v.LiteralSchema<"last_visited_time", undefined>;
|
|
1060
|
-
readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1061
1052
|
}, undefined>, v.ObjectSchema<{
|
|
1062
1053
|
readonly id: v.StringSchema<undefined>;
|
|
1063
1054
|
readonly type: v.LiteralSchema<"unique_id", undefined>;
|
|
@@ -1093,7 +1084,6 @@ export declare const queryDataSourceResultMessageWithProtocol3To5CompatibilitySc
|
|
|
1093
1084
|
readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
|
|
1094
1085
|
readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1095
1086
|
}, undefined>, undefined>, null>;
|
|
1096
|
-
readonly last_visited_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
|
|
1097
1087
|
readonly created_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
|
|
1098
1088
|
readonly last_edited_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
|
|
1099
1089
|
readonly icon: v.OptionalSchema<v.NullableSchema<v.VariantSchema<"type", [v.LooseObjectSchema<{
|
|
@@ -122,10 +122,6 @@ export declare const notionDataSourceSchema: v.ObjectSchema<{
|
|
|
122
122
|
readonly name: v.StringSchema<undefined>;
|
|
123
123
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
124
124
|
readonly type: v.LiteralSchema<"verification", undefined>;
|
|
125
|
-
}, undefined>, v.ObjectSchema<{
|
|
126
|
-
readonly name: v.StringSchema<undefined>;
|
|
127
|
-
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
128
|
-
readonly type: v.LiteralSchema<"last_visited_time", undefined>;
|
|
129
125
|
}, undefined>, v.ObjectSchema<{
|
|
130
126
|
readonly name: v.StringSchema<undefined>;
|
|
131
127
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -274,10 +270,6 @@ export declare const notionDataSourceSchema: v.ObjectSchema<{
|
|
|
274
270
|
readonly name: v.StringSchema<undefined>;
|
|
275
271
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
276
272
|
readonly type: v.LiteralSchema<"verification", undefined>;
|
|
277
|
-
}, undefined>, v.ObjectSchema<{
|
|
278
|
-
readonly name: v.StringSchema<undefined>;
|
|
279
|
-
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
280
|
-
readonly type: v.LiteralSchema<"last_visited_time", undefined>;
|
|
281
273
|
}, undefined>, v.ObjectSchema<{
|
|
282
274
|
readonly name: v.StringSchema<undefined>;
|
|
283
275
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -30,12 +30,12 @@ export type NotionDualProperty = v.InferOutput<typeof notionDualPropertySchema>;
|
|
|
30
30
|
* Mirrors the Notion public API
|
|
31
31
|
* [property object](https://developers.notion.com/reference/property-object)
|
|
32
32
|
* type field. Internal-only types (`button`, `verification`,
|
|
33
|
-
* `
|
|
33
|
+
* `location`) and the four built-ins (`created_time`,
|
|
34
34
|
* `last_edited_time`, `created_by`, `last_edited_by`) are included under their
|
|
35
35
|
* bridge-native names.
|
|
36
36
|
*/
|
|
37
|
-
export declare const NOTION_PROPERTY_TYPES: readonly ["title", "rich_text", "number", "checkbox", "url", "email", "phone_number", "select", "multi_select", "status", "date", "people", "files", "unique_id", "relation", "place", "formula", "rollup", "button", "verification", "
|
|
38
|
-
export declare const notionPropertyTypeSchema: v.PicklistSchema<readonly ["title", "rich_text", "number", "checkbox", "url", "email", "phone_number", "select", "multi_select", "status", "date", "people", "files", "unique_id", "relation", "place", "formula", "rollup", "button", "verification", "
|
|
37
|
+
export declare const NOTION_PROPERTY_TYPES: readonly ["title", "rich_text", "number", "checkbox", "url", "email", "phone_number", "select", "multi_select", "status", "date", "people", "files", "unique_id", "relation", "place", "formula", "rollup", "button", "verification", "location", "created_time", "last_edited_time", "created_by", "last_edited_by"];
|
|
38
|
+
export declare const notionPropertyTypeSchema: v.PicklistSchema<readonly ["title", "rich_text", "number", "checkbox", "url", "email", "phone_number", "select", "multi_select", "status", "date", "people", "files", "unique_id", "relation", "place", "formula", "rollup", "button", "verification", "location", "created_time", "last_edited_time", "created_by", "last_edited_by"], undefined>;
|
|
39
39
|
/**
|
|
40
40
|
* String literal union of every supported Notion property type. Same set as
|
|
41
41
|
* the discriminator in `NotionPropertySchema` — split out so the manifest
|
|
@@ -163,10 +163,6 @@ export declare const notionPropertySchemaSchema: v.VariantSchema<"type", [v.Obje
|
|
|
163
163
|
readonly name: v.StringSchema<undefined>;
|
|
164
164
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
165
165
|
readonly type: v.LiteralSchema<"verification", undefined>;
|
|
166
|
-
}, undefined>, v.ObjectSchema<{
|
|
167
|
-
readonly name: v.StringSchema<undefined>;
|
|
168
|
-
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
169
|
-
readonly type: v.LiteralSchema<"last_visited_time", undefined>;
|
|
170
166
|
}, undefined>, v.ObjectSchema<{
|
|
171
167
|
readonly name: v.StringSchema<undefined>;
|
|
172
168
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -51,7 +51,7 @@ const baseProp = v.object({
|
|
|
51
51
|
* Mirrors the Notion public API
|
|
52
52
|
* [property object](https://developers.notion.com/reference/property-object)
|
|
53
53
|
* type field. Internal-only types (`button`, `verification`,
|
|
54
|
-
* `
|
|
54
|
+
* `location`) and the four built-ins (`created_time`,
|
|
55
55
|
* `last_edited_time`, `created_by`, `last_edited_by`) are included under their
|
|
56
56
|
* bridge-native names.
|
|
57
57
|
*/
|
|
@@ -76,7 +76,6 @@ export const NOTION_PROPERTY_TYPES = [
|
|
|
76
76
|
"rollup",
|
|
77
77
|
"button",
|
|
78
78
|
"verification",
|
|
79
|
-
"last_visited_time",
|
|
80
79
|
"location",
|
|
81
80
|
"created_time",
|
|
82
81
|
"last_edited_time",
|
|
@@ -147,7 +146,6 @@ export const notionPropertySchemaSchema = v.variant("type", [
|
|
|
147
146
|
// Internal-only types passed through under their bridge-native names.
|
|
148
147
|
v.object({ ...baseProp.entries, type: v.literal("button") }),
|
|
149
148
|
v.object({ ...baseProp.entries, type: v.literal("verification") }),
|
|
150
|
-
v.object({ ...baseProp.entries, type: v.literal("last_visited_time") }),
|
|
151
149
|
v.object({ ...baseProp.entries, type: v.literal("location") }),
|
|
152
150
|
// Synthetic built-ins. The host always emits one of each per data source.
|
|
153
151
|
v.object({ ...baseProp.entries, type: v.literal("created_time") }),
|
|
@@ -35,12 +35,23 @@ export declare const connectMessageSchema: v.VariantSchema<"status", [v.ObjectSc
|
|
|
35
35
|
readonly properties: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
|
|
36
36
|
readonly name: v.StringSchema<undefined>;
|
|
37
37
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
38
|
-
readonly type: v.PicklistSchema<readonly ["title", "rich_text", "number", "checkbox", "url", "email", "phone_number", "select", "multi_select", "status", "date", "people", "files", "unique_id", "relation", "place", "formula", "rollup", "button", "verification", "
|
|
38
|
+
readonly type: v.PicklistSchema<readonly ["title", "rich_text", "number", "checkbox", "url", "email", "phone_number", "select", "multi_select", "status", "date", "people", "files", "unique_id", "relation", "place", "formula", "rollup", "button", "verification", "location", "created_time", "last_edited_time", "created_by", "last_edited_by"], undefined>;
|
|
39
39
|
}, undefined>, undefined>, {}>;
|
|
40
40
|
}, undefined>, undefined>, {}>;
|
|
41
|
+
readonly pages: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
|
|
42
|
+
readonly name: v.StringSchema<undefined>;
|
|
43
|
+
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
44
|
+
readonly icon: v.OptionalSchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
45
|
+
readonly type: v.LiteralSchema<"emoji", undefined>;
|
|
46
|
+
readonly emoji: v.StringSchema<undefined>;
|
|
47
|
+
}, undefined>, v.ObjectSchema<{
|
|
48
|
+
readonly type: v.LiteralSchema<"external", undefined>;
|
|
49
|
+
readonly url: v.StringSchema<undefined>;
|
|
50
|
+
}, undefined>], undefined>, undefined>;
|
|
51
|
+
}, undefined>, undefined>, undefined>;
|
|
41
52
|
readonly capabilities: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
42
53
|
readonly capability: v.StringSchema<undefined>;
|
|
43
|
-
readonly resource: v.StringSchema<undefined>;
|
|
54
|
+
readonly resource: v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.MinLengthAction<string[], 1, undefined>]>], undefined>;
|
|
44
55
|
}, undefined>, undefined>, undefined>;
|
|
45
56
|
}, undefined>, undefined>;
|
|
46
57
|
}, undefined>, v.ObjectSchema<{
|
|
@@ -99,12 +99,23 @@ export declare const initMessageSchema: v.VariantSchema<"status", [v.ObjectSchem
|
|
|
99
99
|
readonly properties: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
|
|
100
100
|
readonly name: v.StringSchema<undefined>;
|
|
101
101
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
102
|
-
readonly type: v.PicklistSchema<readonly ["title", "rich_text", "number", "checkbox", "url", "email", "phone_number", "select", "multi_select", "status", "date", "people", "files", "unique_id", "relation", "place", "formula", "rollup", "button", "verification", "
|
|
102
|
+
readonly type: v.PicklistSchema<readonly ["title", "rich_text", "number", "checkbox", "url", "email", "phone_number", "select", "multi_select", "status", "date", "people", "files", "unique_id", "relation", "place", "formula", "rollup", "button", "verification", "location", "created_time", "last_edited_time", "created_by", "last_edited_by"], undefined>;
|
|
103
103
|
}, undefined>, undefined>, {}>;
|
|
104
104
|
}, undefined>, undefined>, {}>;
|
|
105
|
+
readonly pages: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
|
|
106
|
+
readonly name: v.StringSchema<undefined>;
|
|
107
|
+
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
108
|
+
readonly icon: v.OptionalSchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
109
|
+
readonly type: v.LiteralSchema<"emoji", undefined>;
|
|
110
|
+
readonly emoji: v.StringSchema<undefined>;
|
|
111
|
+
}, undefined>, v.ObjectSchema<{
|
|
112
|
+
readonly type: v.LiteralSchema<"external", undefined>;
|
|
113
|
+
readonly url: v.StringSchema<undefined>;
|
|
114
|
+
}, undefined>], undefined>, undefined>;
|
|
115
|
+
}, undefined>, undefined>, undefined>;
|
|
105
116
|
readonly capabilities: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
106
117
|
readonly capability: v.StringSchema<undefined>;
|
|
107
|
-
readonly resource: v.StringSchema<undefined>;
|
|
118
|
+
readonly resource: v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.MinLengthAction<string[], 1, undefined>]>], undefined>;
|
|
108
119
|
}, undefined>, undefined>, undefined>;
|
|
109
120
|
}, undefined>;
|
|
110
121
|
readonly dataSources: v.ObjectSchema<{
|
|
@@ -225,10 +236,6 @@ export declare const initMessageSchema: v.VariantSchema<"status", [v.ObjectSchem
|
|
|
225
236
|
readonly name: v.StringSchema<undefined>;
|
|
226
237
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
227
238
|
readonly type: v.LiteralSchema<"verification", undefined>;
|
|
228
|
-
}, undefined>, v.ObjectSchema<{
|
|
229
|
-
readonly name: v.StringSchema<undefined>;
|
|
230
|
-
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
231
|
-
readonly type: v.LiteralSchema<"last_visited_time", undefined>;
|
|
232
239
|
}, undefined>, v.ObjectSchema<{
|
|
233
240
|
readonly name: v.StringSchema<undefined>;
|
|
234
241
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
package/dist/protocol/index.d.ts
CHANGED
|
@@ -86,10 +86,10 @@ export type { CustomBlockInitResultErrorCode, CustomBlockInitResultErrorInfo, In
|
|
|
86
86
|
export { customBlockInitResultErrorCodeSchema, customBlockInitResultErrorInfoSchema, initResultMessageSchema, } from "./handshake/initResult.js";
|
|
87
87
|
export { isInitHandshakeMessage } from "./handshake/isInitHandshakeMessage.js";
|
|
88
88
|
export * from "./icons.js";
|
|
89
|
-
export type { CustomBlockCapabilityDeclaration, CustomBlockCapabilityName, CustomBlockCapabilityResourceName, CustomBlockOriginResourceName, } from "./manifest/capabilities.js";
|
|
89
|
+
export type { CustomBlockCapabilityDeclaration, CustomBlockCapabilityName, CustomBlockCapabilityResourceName, CustomBlockDataSourceResourceName, CustomBlockOriginResourceName, } from "./manifest/capabilities.js";
|
|
90
90
|
export { customBlockCapabilityDeclarationSchema } from "./manifest/capabilities.js";
|
|
91
|
-
export type { BridgeCustomBlockManifest, ManifestDataSource, ManifestIcon, ManifestProperty, } from "./manifest/manifest.js";
|
|
92
|
-
export { manifestDataSourceSchema, manifestIconSchema, manifestPropertySchema, manifestSchema, } from "./manifest/manifest.js";
|
|
91
|
+
export type { BridgeCustomBlockManifest, ManifestDataSource, ManifestIcon, ManifestPage, ManifestProperty, } from "./manifest/manifest.js";
|
|
92
|
+
export { manifestDataSourceSchema, manifestIconSchema, manifestPageSchema, manifestPropertySchema, manifestSchema, } from "./manifest/manifest.js";
|
|
93
93
|
export type { HostToSandboxMessage, HostToSandboxMessageWithProtocol3To5Compatibility, } from "./messages/hostToSandbox.js";
|
|
94
94
|
export { hostToSandboxMessageSchema, hostToSandboxMessageWithProtocol3To5CompatibilitySchema, } from "./messages/hostToSandbox.js";
|
|
95
95
|
export { readIncomingType } from "./messages/incomingType.js";
|
package/dist/protocol/index.js
CHANGED
|
@@ -44,7 +44,7 @@ export { customBlockInitResultErrorCodeSchema, customBlockInitResultErrorInfoSch
|
|
|
44
44
|
export { isInitHandshakeMessage } from "./handshake/isInitHandshakeMessage.js";
|
|
45
45
|
export * from "./icons.js";
|
|
46
46
|
export { customBlockCapabilityDeclarationSchema } from "./manifest/capabilities.js";
|
|
47
|
-
export { manifestDataSourceSchema, manifestIconSchema, manifestPropertySchema, manifestSchema, } from "./manifest/manifest.js";
|
|
47
|
+
export { manifestDataSourceSchema, manifestIconSchema, manifestPageSchema, manifestPropertySchema, manifestSchema, } from "./manifest/manifest.js";
|
|
48
48
|
export { hostToSandboxMessageSchema, hostToSandboxMessageWithProtocol3To5CompatibilitySchema, } from "./messages/hostToSandbox.js";
|
|
49
49
|
export { readIncomingType } from "./messages/incomingType.js";
|
|
50
50
|
export { invalidHostMessageSchema } from "./messages/invalidHostMessage.js";
|
|
@@ -4,12 +4,18 @@ import * as v from "valibot";
|
|
|
4
4
|
* (`capability`) and what it acts on (`resource`). Viewers approve declared
|
|
5
5
|
* entries before the block loads.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* `resource` is one resource or a non-empty array of them. An array declares
|
|
8
|
+
* the capability on each element. A resource string is never split, so
|
|
9
|
+
* `"data_source:tasks,projects"` names one key.
|
|
10
|
+
*
|
|
11
|
+
* Names are open strings so a newer vocabulary never makes an older host or SDK
|
|
12
|
+
* reject a manifest. Notion stores each array element as its own entry at
|
|
13
|
+
* deploy, so the manifest a deployed block receives in `init` has string
|
|
14
|
+
* resources only.
|
|
9
15
|
*/
|
|
10
16
|
export declare const customBlockCapabilityDeclarationSchema: v.ObjectSchema<{
|
|
11
17
|
readonly capability: v.StringSchema<undefined>;
|
|
12
|
-
readonly resource: v.StringSchema<undefined>;
|
|
18
|
+
readonly resource: v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.MinLengthAction<string[], 1, undefined>]>], undefined>;
|
|
13
19
|
}, undefined>;
|
|
14
20
|
export type CustomBlockCapabilityDeclaration = v.InferOutput<typeof customBlockCapabilityDeclarationSchema>;
|
|
15
21
|
/**
|
|
@@ -23,12 +29,17 @@ export type CustomBlockCapabilityName = "user" | "user.read" | "user.read_email"
|
|
|
23
29
|
/**
|
|
24
30
|
* Resource names that hosts recognize. User capabilities take `current_user`
|
|
25
31
|
* or `workspace` (every member of the workspace). Page capabilities take
|
|
26
|
-
* `workspace` (every page the viewer can access), `containing_page`,
|
|
27
|
-
* `data_source
|
|
28
|
-
* `page.insert` into the viewer's Private
|
|
29
|
-
* `network.fetch` takes a bare HTTPS origin.
|
|
32
|
+
* `workspace` (every page the viewer can access), `containing_page`,
|
|
33
|
+
* `data_source:<key>`, or `data_source` (every declared data source).
|
|
34
|
+
* `private` is reserved for a future `page.insert` into the viewer's Private
|
|
35
|
+
* section and is not accepted yet. `network.fetch` takes a bare HTTPS origin.
|
|
36
|
+
*/
|
|
37
|
+
export type CustomBlockCapabilityResourceName = "current_user" | "workspace" | "containing_page" | "data_source" | CustomBlockDataSourceResourceName | CustomBlockOriginResourceName;
|
|
38
|
+
/**
|
|
39
|
+
* The data source bound to one key of the manifest's `dataSources`, such as
|
|
40
|
+
* `data_source:tasks`. The key must match a declared data source exactly.
|
|
30
41
|
*/
|
|
31
|
-
export type
|
|
42
|
+
export type CustomBlockDataSourceResourceName = `data_source:${string}`;
|
|
32
43
|
/**
|
|
33
44
|
* An HTTPS origin the block loads content from and connects to, such as
|
|
34
45
|
* `https://api.example.com`. `https://*.example.com` covers subdomains. Hosts
|
|
@@ -4,10 +4,16 @@ import * as v from "valibot";
|
|
|
4
4
|
* (`capability`) and what it acts on (`resource`). Viewers approve declared
|
|
5
5
|
* entries before the block loads.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* `resource` is one resource or a non-empty array of them. An array declares
|
|
8
|
+
* the capability on each element. A resource string is never split, so
|
|
9
|
+
* `"data_source:tasks,projects"` names one key.
|
|
10
|
+
*
|
|
11
|
+
* Names are open strings so a newer vocabulary never makes an older host or SDK
|
|
12
|
+
* reject a manifest. Notion stores each array element as its own entry at
|
|
13
|
+
* deploy, so the manifest a deployed block receives in `init` has string
|
|
14
|
+
* resources only.
|
|
9
15
|
*/
|
|
10
16
|
export const customBlockCapabilityDeclarationSchema = v.object({
|
|
11
17
|
capability: v.string(),
|
|
12
|
-
resource: v.string(),
|
|
18
|
+
resource: v.union([v.string(), v.pipe(v.array(v.string()), v.minLength(1))]),
|
|
13
19
|
});
|