@notionhq/custom-blocks-host 0.6.0 → 0.8.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 +16 -16
- 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 +17 -36
- 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 +45 -44
- package/dist/context/initialState.d.ts.map +1 -1
- package/dist/manifest/types.d.ts +15 -4
- package/dist/manifest/types.d.ts.map +1 -1
- package/dist/protocol/compatibility/protocol3To5/bridgePage.d.ts +0 -4
- package/dist/protocol/dataSources/bridgeArchiveStatus.d.ts +3 -0
- package/dist/protocol/dataSources/bridgeArchiveStatus.js +6 -0
- 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 +3 -12
- package/dist/protocol/dataSources/messages/queryDataSource.js +2 -0
- 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 +15 -4
- package/dist/protocol/handshake/init.d.ts +15 -8
- package/dist/protocol/index.d.ts +8 -6
- package/dist/protocol/index.js +4 -3
- package/dist/protocol/manifest/grants.d.ts +48 -0
- package/dist/protocol/manifest/grants.js +19 -0
- package/dist/protocol/manifest/manifest.d.ts +33 -10
- package/dist/protocol/manifest/manifest.js +11 -5
- package/dist/protocol/messages/hostToSandbox.d.ts +30 -76
- package/dist/protocol/messages/sandboxToHost.d.ts +16 -16
- 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 +2 -24
- package/dist/protocol/pages/messages/getPage.d.ts +2 -16
- package/dist/protocol/pages/messages/openPage.d.ts +2 -2
- package/dist/protocol/pages/messages/updatePage.d.ts +2 -20
- 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/users/messages/getUser.d.ts +2 -2
- package/dist/protocol/users/messages/listUsers.d.ts +2 -2
- package/dist/protocol/utils/errors.d.ts +4 -4
- package/dist/protocol/utils/errors.js +3 -3
- 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 +14 -7
- 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
- package/dist/protocol/manifest/capabilities.d.ts +0 -37
- package/dist/protocol/manifest/capabilities.js +0 -13
|
@@ -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
|
|
80
|
-
readonly
|
|
81
|
-
readonly
|
|
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>;
|
|
90
|
+
readonly grants: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
91
|
+
readonly action: 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>, {}>;
|
|
324
|
-
readonly
|
|
325
|
-
readonly
|
|
326
|
-
readonly
|
|
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>;
|
|
342
|
+
readonly grants: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
343
|
+
readonly action: 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>, {}>;
|
|
563
|
-
readonly
|
|
564
|
-
readonly
|
|
565
|
-
readonly
|
|
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>;
|
|
588
|
+
readonly grants: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
589
|
+
readonly action: 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
|
|
38
|
-
readonly
|
|
39
|
-
readonly
|
|
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>;
|
|
48
|
+
readonly grants: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
49
|
+
readonly action: 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>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
import type {
|
|
2
|
+
import type { CustomBlockErrorCode, CustomBlockErrorInfo, CustomBlockGrantErrorCode } from "../../utils/errors.js";
|
|
3
3
|
/**
|
|
4
4
|
* Message sent by the sandbox to ask the host for the current rows in a resolved
|
|
5
5
|
* Notion data source.
|
|
@@ -521,10 +521,11 @@ export declare const queryDataSourceMessageSchema: v.ObjectSchema<{
|
|
|
521
521
|
readonly propertyId: v.StringSchema<undefined>;
|
|
522
522
|
readonly direction: v.PicklistSchema<["ascending", "descending"], undefined>;
|
|
523
523
|
}, undefined>, undefined>, undefined>;
|
|
524
|
+
readonly archive_status: v.OptionalSchema<v.PicklistSchema<["active", "archived", "all"], undefined>, undefined>;
|
|
524
525
|
}, undefined>;
|
|
525
526
|
export type QueryDataSourceMessage = v.InferOutput<typeof queryDataSourceMessageSchema>;
|
|
526
527
|
export declare const customBlockQueryDataSourceErrorCodeSchema: v.StringSchema<undefined>;
|
|
527
|
-
export type CustomBlockQueryDataSourceErrorCode = CustomBlockErrorCode<"query_data_source_failed" | "invalid_data_source_query" | "data_source_query_invalid_limit" | "invalid_data_source_query_filter" | "invalid_data_source_query_sort" | "unknown_data_source_key" | "unmapped_data_source" | "data_source_inaccessible" | "data_source_schema_unavailable" |
|
|
528
|
+
export type CustomBlockQueryDataSourceErrorCode = CustomBlockErrorCode<"query_data_source_failed" | "invalid_data_source_query" | "data_source_query_invalid_limit" | "invalid_data_source_query_filter" | "invalid_data_source_query_sort" | "unknown_data_source_key" | "unmapped_data_source" | "data_source_inaccessible" | "data_source_schema_unavailable" | CustomBlockGrantErrorCode>;
|
|
528
529
|
export type CustomBlockQueryDataSourceErrorInfo = CustomBlockErrorInfo<CustomBlockQueryDataSourceErrorCode>;
|
|
529
530
|
export declare const customBlockQueryDataSourceErrorInfoSchema: v.ObjectSchema<{
|
|
530
531
|
readonly code: v.StringSchema<undefined>;
|
|
@@ -745,10 +746,6 @@ export declare const queryDataSourceResultMessageSchema: v.VariantSchema<"status
|
|
|
745
746
|
readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
|
|
746
747
|
readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
747
748
|
}, 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
749
|
}, undefined>, v.ObjectSchema<{
|
|
753
750
|
readonly id: v.StringSchema<undefined>;
|
|
754
751
|
readonly type: v.LiteralSchema<"unique_id", undefined>;
|
|
@@ -784,7 +781,6 @@ export declare const queryDataSourceResultMessageSchema: v.VariantSchema<"status
|
|
|
784
781
|
readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
|
|
785
782
|
readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
786
783
|
}, undefined>, undefined>, null>;
|
|
787
|
-
readonly last_visited_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
|
|
788
784
|
readonly created_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
|
|
789
785
|
readonly last_edited_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
|
|
790
786
|
readonly icon: v.OptionalSchema<v.NullableSchema<v.VariantSchema<"type", [v.LooseObjectSchema<{
|
|
@@ -1054,10 +1050,6 @@ export declare const queryDataSourceResultMessageWithProtocol3To5CompatibilitySc
|
|
|
1054
1050
|
readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
|
|
1055
1051
|
readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1056
1052
|
}, 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
1053
|
}, undefined>, v.ObjectSchema<{
|
|
1062
1054
|
readonly id: v.StringSchema<undefined>;
|
|
1063
1055
|
readonly type: v.LiteralSchema<"unique_id", undefined>;
|
|
@@ -1093,7 +1085,6 @@ export declare const queryDataSourceResultMessageWithProtocol3To5CompatibilitySc
|
|
|
1093
1085
|
readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
|
|
1094
1086
|
readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1095
1087
|
}, undefined>, undefined>, null>;
|
|
1096
|
-
readonly last_visited_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
|
|
1097
1088
|
readonly created_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
|
|
1098
1089
|
readonly last_edited_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
|
|
1099
1090
|
readonly icon: v.OptionalSchema<v.NullableSchema<v.VariantSchema<"type", [v.LooseObjectSchema<{
|
|
@@ -2,6 +2,7 @@ import * as v from "valibot";
|
|
|
2
2
|
import { notionDataSourcePageForProtocol3To5Schema } from "../../compatibility/protocol3To5/dataSourcePage.js";
|
|
3
3
|
import { bridgePageSchema } from "../../pages/bridgePage.js";
|
|
4
4
|
import { notionDataSourceIdSchema } from "../../utils/ids.js";
|
|
5
|
+
import { bridgeArchiveStatusSchema } from "../bridgeArchiveStatus.js";
|
|
5
6
|
import { bridgeDataSourceFilterSchema } from "../filters/bridgeDataSourceFilter.js";
|
|
6
7
|
import { bridgeDataSourceSortSchema } from "../filters/bridgeDataSourceSort.js";
|
|
7
8
|
/**
|
|
@@ -20,6 +21,7 @@ export const queryDataSourceMessageSchema = v.object({
|
|
|
20
21
|
filter: v.optional(bridgeDataSourceFilterSchema),
|
|
21
22
|
/** Sandbox-resolved property sorts, in priority order. */
|
|
22
23
|
sorts: v.optional(v.array(bridgeDataSourceSortSchema)),
|
|
24
|
+
archive_status: v.optional(bridgeArchiveStatusSchema),
|
|
23
25
|
});
|
|
24
26
|
// The schema accepts any string code. The type lists known codes for
|
|
25
27
|
// autocomplete, with an open string fallback for newer senders.
|
|
@@ -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
|
|
42
|
-
readonly
|
|
43
|
-
readonly
|
|
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>;
|
|
52
|
+
readonly grants: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
53
|
+
readonly action: 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
|
|
106
|
-
readonly
|
|
107
|
-
readonly
|
|
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>;
|
|
116
|
+
readonly grants: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
117
|
+
readonly action: 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
|
@@ -23,6 +23,8 @@ export type { BridgeParent, DataSourceParent, NotionParent, PageParent, } from "
|
|
|
23
23
|
export { dataSourceParentSchema, notionParentSchema, pageParentSchema, } from "./context/parent.js";
|
|
24
24
|
export type { NotionTheme } from "./context/theme.js";
|
|
25
25
|
export { notionThemeSchema } from "./context/theme.js";
|
|
26
|
+
export type { BridgeArchiveStatus } from "./dataSources/bridgeArchiveStatus.js";
|
|
27
|
+
export { bridgeArchiveStatusSchema } from "./dataSources/bridgeArchiveStatus.js";
|
|
26
28
|
export type { BridgeDataSourceBinding } from "./dataSources/bridgeDataSourceBinding.js";
|
|
27
29
|
export { bridgeDataSourceBindingSchema } from "./dataSources/bridgeDataSourceBinding.js";
|
|
28
30
|
export type { BridgeDataSourceBindings } from "./dataSources/bridgeDataSourceBindings.js";
|
|
@@ -86,10 +88,10 @@ export type { CustomBlockInitResultErrorCode, CustomBlockInitResultErrorInfo, In
|
|
|
86
88
|
export { customBlockInitResultErrorCodeSchema, customBlockInitResultErrorInfoSchema, initResultMessageSchema, } from "./handshake/initResult.js";
|
|
87
89
|
export { isInitHandshakeMessage } from "./handshake/isInitHandshakeMessage.js";
|
|
88
90
|
export * from "./icons.js";
|
|
89
|
-
export type {
|
|
90
|
-
export {
|
|
91
|
-
export type { BridgeCustomBlockManifest, ManifestDataSource, ManifestIcon, ManifestProperty, } from "./manifest/manifest.js";
|
|
92
|
-
export { manifestDataSourceSchema, manifestIconSchema, manifestPropertySchema, manifestSchema, } from "./manifest/manifest.js";
|
|
91
|
+
export type { CustomBlockDataSourceResourceName, CustomBlockGrant, CustomBlockGrantAction, CustomBlockGrantResourceName, CustomBlockOriginResourceName, } from "./manifest/grants.js";
|
|
92
|
+
export { customBlockGrantSchema } from "./manifest/grants.js";
|
|
93
|
+
export type { BridgeCustomBlockManifest, ManifestDataSource, ManifestIcon, ManifestPage, ManifestProperty, } from "./manifest/manifest.js";
|
|
94
|
+
export { manifestDataSourceSchema, manifestIconSchema, manifestPageSchema, manifestPropertySchema, manifestSchema, } from "./manifest/manifest.js";
|
|
93
95
|
export type { HostToSandboxMessage, HostToSandboxMessageWithProtocol3To5Compatibility, } from "./messages/hostToSandbox.js";
|
|
94
96
|
export { hostToSandboxMessageSchema, hostToSandboxMessageWithProtocol3To5CompatibilitySchema, } from "./messages/hostToSandbox.js";
|
|
95
97
|
export { readIncomingType } from "./messages/incomingType.js";
|
|
@@ -141,8 +143,8 @@ export type { CustomBlockListUsersErrorCode, CustomBlockListUsersErrorInfo, List
|
|
|
141
143
|
export { customBlockListUsersErrorCodeSchema, customBlockListUsersErrorInfoSchema, listUsersMessageSchema, listUsersResultMessageSchema, } from "./users/messages/listUsers.js";
|
|
142
144
|
export type { NotionUserId } from "./users/userId.js";
|
|
143
145
|
export { notionUserIdSchema } from "./users/userId.js";
|
|
144
|
-
export type {
|
|
145
|
-
export {
|
|
146
|
+
export type { CustomBlockErrorCode, CustomBlockErrorInfo, CustomBlockGrantErrorCode, CustomBlockRequestErrorCode, } from "./utils/errors.js";
|
|
147
|
+
export { customBlockErrorInfoSchema, NOT_GRANTED_ERROR_CODE, } from "./utils/errors.js";
|
|
146
148
|
export type { NotionAgentId, NotionBlockId, NotionDataSourceId, NotionPageId, NotionSpaceId, } from "./utils/ids.js";
|
|
147
149
|
export { notionAgentIdSchema, notionBlockIdSchema, notionDataSourceIdSchema, notionPageIdSchema, notionSpaceIdSchema, } from "./utils/ids.js";
|
|
148
150
|
export { isLocalBlockServerUrl } from "./utils/isLocalBlockServerUrl.js";
|
package/dist/protocol/index.js
CHANGED
|
@@ -11,6 +11,7 @@ export { resizeMessageSchema } from "./context/messages/resize.js";
|
|
|
11
11
|
export { themeChangedMessageSchema } from "./context/messages/themeChanged.js";
|
|
12
12
|
export { dataSourceParentSchema, notionParentSchema, pageParentSchema, } from "./context/parent.js";
|
|
13
13
|
export { notionThemeSchema } from "./context/theme.js";
|
|
14
|
+
export { bridgeArchiveStatusSchema } from "./dataSources/bridgeArchiveStatus.js";
|
|
14
15
|
export { bridgeDataSourceBindingSchema } from "./dataSources/bridgeDataSourceBinding.js";
|
|
15
16
|
export { bridgeDataSourceBindingsSchema } from "./dataSources/bridgeDataSourceBindings.js";
|
|
16
17
|
export { notionCollectionSchemaValidator } from "./dataSources/collectionSchema.js";
|
|
@@ -43,8 +44,8 @@ export { CustomBlockInitializationError, customBlockInitErrorCodeSchema, customB
|
|
|
43
44
|
export { customBlockInitResultErrorCodeSchema, customBlockInitResultErrorInfoSchema, initResultMessageSchema, } from "./handshake/initResult.js";
|
|
44
45
|
export { isInitHandshakeMessage } from "./handshake/isInitHandshakeMessage.js";
|
|
45
46
|
export * from "./icons.js";
|
|
46
|
-
export {
|
|
47
|
-
export { manifestDataSourceSchema, manifestIconSchema, manifestPropertySchema, manifestSchema, } from "./manifest/manifest.js";
|
|
47
|
+
export { customBlockGrantSchema } from "./manifest/grants.js";
|
|
48
|
+
export { manifestDataSourceSchema, manifestIconSchema, manifestPageSchema, manifestPropertySchema, manifestSchema, } from "./manifest/manifest.js";
|
|
48
49
|
export { hostToSandboxMessageSchema, hostToSandboxMessageWithProtocol3To5CompatibilitySchema, } from "./messages/hostToSandbox.js";
|
|
49
50
|
export { readIncomingType } from "./messages/incomingType.js";
|
|
50
51
|
export { invalidHostMessageSchema } from "./messages/invalidHostMessage.js";
|
|
@@ -67,7 +68,7 @@ export { currentUserChangedMessageSchema } from "./users/messages/currentUserCha
|
|
|
67
68
|
export { customBlockGetUserErrorCodeSchema, customBlockGetUserErrorInfoSchema, getUserMessageSchema, getUserResultMessageSchema, } from "./users/messages/getUser.js";
|
|
68
69
|
export { customBlockListUsersErrorCodeSchema, customBlockListUsersErrorInfoSchema, listUsersMessageSchema, listUsersResultMessageSchema, } from "./users/messages/listUsers.js";
|
|
69
70
|
export { notionUserIdSchema } from "./users/userId.js";
|
|
70
|
-
export {
|
|
71
|
+
export { customBlockErrorInfoSchema, NOT_GRANTED_ERROR_CODE, } from "./utils/errors.js";
|
|
71
72
|
export { notionAgentIdSchema, notionBlockIdSchema, notionDataSourceIdSchema, notionPageIdSchema, notionSpaceIdSchema, } from "./utils/ids.js";
|
|
72
73
|
export { isLocalBlockServerUrl } from "./utils/isLocalBlockServerUrl.js";
|
|
73
74
|
export { LATEST_BRIDGE_PROTOCOL_VERSION, NATIVE_ICON_PROTOCOL_VERSION, TEXT_FALLBACK_PROPERTY_PROTOCOL_VERSION, UNIFIED_PAGE_PROTOCOL_VERSION, } from "./utils/protocolVersion.js";
|