@notionhq/custom-blocks 0.4.0 → 0.5.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/bridge/SandboxBridge.d.ts +0 -16
- package/dist/bridge/SandboxBridge.d.ts.map +1 -1
- package/dist/bridge/SandboxBridge.js +0 -38
- package/dist/dataSources/bridge/resolveDataSourceQuery.js +3 -3
- package/dist/dataSources/bridge/resolveDataSources.js +4 -4
- package/dist/dataSources/filters/resolveFilter.d.ts.map +1 -1
- package/dist/dataSources/filters/resolveFilter.js +13 -3
- package/dist/dataSources/filters/types.d.ts +9 -3
- package/dist/dataSources/filters/types.d.ts.map +1 -1
- package/dist/dataSources/properties/resolvePropertyAddress.js +1 -1
- package/dist/dataSources/properties/resolvePropertyWriteMapForDataSource.js +1 -1
- package/dist/dataSources/resolvePageDataSource.js +2 -2
- package/dist/dataSources/subscribeToDataSource.d.ts +1 -4
- package/dist/dataSources/subscribeToDataSource.d.ts.map +1 -1
- package/dist/dataSources/subscribeToDataSource.js +2 -3
- package/dist/files/files.d.ts +2 -0
- package/dist/files/files.d.ts.map +1 -0
- package/dist/files/files.js +1 -0
- package/dist/files/icons.d.ts +2 -0
- package/dist/files/icons.d.ts.map +1 -0
- package/dist/files/icons.js +1 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/initialization/getInitBindingError.js +2 -2
- package/dist/manifest/types.d.ts +4 -3
- package/dist/manifest/types.d.ts.map +1 -1
- package/dist/pages/bridge/getPageForDataSource.js +1 -1
- package/dist/pages/bridge/toNotionPageFieldsFromBridgePage.d.ts +4 -1
- package/dist/pages/bridge/toNotionPageFieldsFromBridgePage.d.ts.map +1 -1
- package/dist/pages/bridge/toNotionPagePropertyFromBridgeProperty.d.ts.map +1 -1
- package/dist/pages/bridge/toNotionPagePropertyFromBridgeProperty.js +0 -2
- package/dist/pages/bridge/updatePage.js +1 -1
- package/dist/pages/properties/getPropertyByKey.js +2 -2
- package/dist/pages/types.d.ts +8 -10
- package/dist/pages/types.d.ts.map +1 -1
- package/dist/protocol/compatibility/protocol3To10/dataSourceBindings.d.ts +530 -0
- package/dist/protocol/compatibility/protocol3To10/dataSourceBindings.js +25 -0
- package/dist/protocol/compatibility/protocol3To5/bridgePage.d.ts +6 -7
- package/dist/protocol/compatibility/protocol3To5/bridgePage.js +3 -3
- package/dist/protocol/context/containingPage.d.ts +3 -0
- package/dist/protocol/context/messages/pageChanged.d.ts +3 -0
- package/dist/protocol/context/messages/parentChanged.d.ts +3 -0
- package/dist/protocol/context/parent.d.ts +3 -0
- package/dist/protocol/context/parent.js +6 -1
- package/dist/protocol/dataSources/bridgeDataSourceBinding.d.ts +3 -7
- package/dist/protocol/dataSources/bridgeDataSourceBinding.js +5 -5
- package/dist/protocol/dataSources/bridgeDataSourceBindings.d.ts +2 -6
- package/dist/protocol/dataSources/{collectionPointer.d.ts → dataSourcePointer.d.ts} +2 -2
- package/dist/protocol/dataSources/{collectionPointer.js → dataSourcePointer.js} +1 -1
- package/dist/protocol/dataSources/{collectionSchema.d.ts → dataSourceSchema.d.ts} +2 -6
- package/dist/protocol/dataSources/{collectionSchema.js → dataSourceSchema.js} +1 -1
- package/dist/protocol/dataSources/filters/bridgeDataSourceFilter.d.ts +1458 -12
- package/dist/protocol/dataSources/filters/bridgeDataSourceFilterCondition.d.ts +729 -6
- package/dist/protocol/dataSources/filters/bridgeDataSourceFilterCondition.js +14 -2
- package/dist/protocol/dataSources/filters/peopleFilterOperator.d.ts +3 -3
- package/dist/protocol/dataSources/filters/peopleFilterOperator.js +1 -1
- package/dist/protocol/dataSources/filters/timestampFilterOperator.d.ts +354 -0
- package/dist/protocol/dataSources/filters/timestampFilterOperator.js +4 -0
- package/dist/protocol/dataSources/messages/dataSourcesChanged.d.ts +2 -6
- package/dist/protocol/dataSources/messages/queryDataSource.d.ts +1470 -26
- package/dist/protocol/dataSources/notionDataSource.d.ts +3 -11
- package/dist/protocol/dataSources/notionDataSource.js +5 -5
- package/dist/protocol/dataSources/properties/propertySchema.d.ts +4 -9
- package/dist/protocol/dataSources/properties/propertySchema.js +2 -4
- package/dist/protocol/dataSources/resolveDataSourceBinding.d.ts +4 -4
- package/dist/protocol/dataSources/resolveDataSourceBinding.js +2 -2
- package/dist/protocol/files.d.ts +32 -0
- package/dist/protocol/files.js +17 -0
- package/dist/protocol/handshake/connect.d.ts +1 -1
- package/dist/protocol/handshake/init.d.ts +9 -7
- package/dist/protocol/icons.d.ts +22 -7
- package/dist/protocol/icons.js +19 -7
- package/dist/protocol/index.d.ts +16 -14
- package/dist/protocol/index.js +10 -7
- package/dist/protocol/manifest/manifest.d.ts +9 -9
- package/dist/protocol/manifest/manifest.js +7 -7
- package/dist/protocol/messages/hostToSandbox.d.ts +100 -103
- package/dist/protocol/messages/sandboxToHost.d.ts +1471 -37
- package/dist/protocol/pages/bridgePage.d.ts +6 -7
- package/dist/protocol/pages/bridgePage.js +3 -3
- package/dist/protocol/pages/messages/createPage.d.ts +547 -40
- package/dist/protocol/pages/messages/createPage.js +27 -15
- package/dist/protocol/pages/messages/getPage.d.ts +18 -21
- package/dist/protocol/pages/messages/updatePage.d.ts +21 -28
- package/dist/protocol/pages/messages/updatePage.js +3 -3
- package/dist/protocol/pages/pageAppearance.d.ts +5 -59
- package/dist/protocol/pages/pageAppearance.js +11 -40
- package/dist/protocol/pages/properties/bridgePagePropertyMaps.d.ts +4 -12
- package/dist/protocol/pages/properties/bridgePagePropertyValue.d.ts +2 -6
- package/dist/protocol/pages/properties/bridgePagePropertyValue.js +2 -7
- package/dist/protocol/utils/ids.d.ts +2 -0
- package/dist/protocol/utils/ids.js +1 -0
- package/dist/protocol/utils/protocolVersion.d.ts +2 -1
- package/dist/protocol/utils/protocolVersion.js +3 -1
- package/dist/react/NotionCustomBlock.d.ts.map +1 -1
- package/dist/react/NotionCustomBlock.js +1 -15
- package/dist/utils/version.js +1 -1
- package/docs/data-sources.md +74 -76
- package/docs/deployment.md +4 -5
- package/docs/pages.md +91 -55
- package/package.json +1 -1
- package/src/bridge/SandboxBridge.ts +0 -55
- package/src/dataSources/bridge/resolveDataSourceQuery.ts +3 -3
- package/src/dataSources/bridge/resolveDataSources.ts +4 -4
- package/src/dataSources/filters/resolveFilter.ts +12 -3
- package/src/dataSources/filters/types.ts +7 -4
- package/src/dataSources/properties/resolvePropertyAddress.ts +1 -1
- package/src/dataSources/properties/resolvePropertyWriteMapForDataSource.ts +1 -1
- package/src/dataSources/resolvePageDataSource.ts +2 -2
- package/src/dataSources/subscribeToDataSource.ts +7 -19
- package/src/files/files.ts +5 -0
- package/src/files/icons.ts +9 -0
- package/src/index.ts +6 -11
- package/src/initialization/getInitBindingError.ts +2 -2
- package/src/manifest/types.ts +9 -3
- package/src/pages/bridge/getPageForDataSource.ts +1 -1
- package/src/pages/bridge/toNotionPagePropertyFromBridgeProperty.ts +0 -2
- package/src/pages/bridge/updatePage.ts +1 -1
- package/src/pages/properties/getPropertyByKey.ts +2 -2
- package/src/pages/types.ts +9 -13
- package/src/react/NotionCustomBlock.tsx +1 -16
- package/dist/protocol/dataSources/filters/createdByFilterOperator.d.ts +0 -17
- package/dist/protocol/dataSources/filters/createdByFilterOperator.js +0 -11
- package/dist/protocol/pages/properties/fileInput.d.ts +0 -16
- package/dist/protocol/pages/properties/fileInput.js +0 -16
- package/dist/react/DebugMessageLog.d.ts +0 -2
- package/dist/react/DebugMessageLog.d.ts.map +0 -1
- package/dist/react/DebugMessageLog.js +0 -23
- package/src/react/DebugMessageLog.tsx +0 -34
|
@@ -17,6 +17,9 @@ export declare const bridgePageSchema: v.ObjectSchema<{
|
|
|
17
17
|
}, undefined>, v.ObjectSchema<{
|
|
18
18
|
readonly type: v.LiteralSchema<"agent_id", undefined>;
|
|
19
19
|
readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
|
|
20
|
+
}, undefined>, v.ObjectSchema<{
|
|
21
|
+
readonly type: v.LiteralSchema<"app_installation_id", undefined>;
|
|
22
|
+
readonly app_installation_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAppInstallationId">]>;
|
|
20
23
|
}, undefined>, v.ObjectSchema<{
|
|
21
24
|
readonly type: v.LiteralSchema<"unavailable", undefined>;
|
|
22
25
|
}, undefined>], undefined>;
|
|
@@ -159,17 +162,17 @@ export declare const bridgePageSchema: v.ObjectSchema<{
|
|
|
159
162
|
readonly type: v.LiteralSchema<"files", undefined>;
|
|
160
163
|
readonly files: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
161
164
|
readonly type: v.LiteralSchema<"external", undefined>;
|
|
162
|
-
readonly name: v.StringSchema<undefined>;
|
|
163
165
|
readonly external: v.ObjectSchema<{
|
|
164
166
|
readonly url: v.StringSchema<undefined>;
|
|
165
167
|
}, undefined>;
|
|
168
|
+
readonly name: v.StringSchema<undefined>;
|
|
166
169
|
}, undefined>, v.ObjectSchema<{
|
|
167
170
|
readonly type: v.LiteralSchema<"file", undefined>;
|
|
168
|
-
readonly name: v.StringSchema<undefined>;
|
|
169
171
|
readonly file: v.ObjectSchema<{
|
|
170
172
|
readonly url: v.StringSchema<undefined>;
|
|
171
173
|
readonly expiry_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
172
174
|
}, undefined>;
|
|
175
|
+
readonly name: v.StringSchema<undefined>;
|
|
173
176
|
}, undefined>], undefined>, undefined>;
|
|
174
177
|
}, undefined>, v.ObjectSchema<{
|
|
175
178
|
readonly id: v.StringSchema<undefined>;
|
|
@@ -218,10 +221,6 @@ export declare const bridgePageSchema: v.ObjectSchema<{
|
|
|
218
221
|
readonly id: v.StringSchema<undefined>;
|
|
219
222
|
readonly type: v.LiteralSchema<"formula", undefined>;
|
|
220
223
|
readonly formula: v.StringSchema<undefined>;
|
|
221
|
-
}, undefined>, v.ObjectSchema<{
|
|
222
|
-
readonly id: v.StringSchema<undefined>;
|
|
223
|
-
readonly type: v.LiteralSchema<"location", undefined>;
|
|
224
|
-
readonly location: v.StringSchema<undefined>;
|
|
225
224
|
}, undefined>, v.ObjectSchema<{
|
|
226
225
|
readonly id: v.StringSchema<undefined>;
|
|
227
226
|
readonly type: v.LiteralSchema<"rollup", undefined>;
|
|
@@ -247,7 +246,7 @@ export declare const bridgePageSchema: v.ObjectSchema<{
|
|
|
247
246
|
readonly type: v.LiteralSchema<"icon", undefined>;
|
|
248
247
|
readonly icon: v.LooseObjectSchema<{
|
|
249
248
|
readonly name: v.StringSchema<undefined>;
|
|
250
|
-
readonly color: v.OptionalSchema<v.GenericSchema<import("../icons.js").
|
|
249
|
+
readonly color: v.OptionalSchema<v.GenericSchema<import("../icons.js").BridgeIconColor>, undefined>;
|
|
251
250
|
}, undefined>;
|
|
252
251
|
}, undefined>, v.ObjectSchema<{
|
|
253
252
|
readonly type: v.LiteralSchema<"emoji", undefined>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
2
|
import { notionParentSchema } from "../context/parent.js";
|
|
3
3
|
import { notionPageIdSchema } from "../utils/ids.js";
|
|
4
|
-
import {
|
|
4
|
+
import { bridgePageCoverSchema, bridgePageIconSchema, } from "./pageAppearance.js";
|
|
5
5
|
import { bridgePagePropertyReadMapSchema } from "./properties/bridgePagePropertyMaps.js";
|
|
6
6
|
import { metadataActorSchema } from "./properties/metadataActor.js";
|
|
7
7
|
export const bridgePageSchema = v.object({
|
|
@@ -13,8 +13,8 @@ export const bridgePageSchema = v.object({
|
|
|
13
13
|
last_edited_by: v.optional(metadataActorSchema, null),
|
|
14
14
|
created_time: v.optional(v.nullable(v.string()), null),
|
|
15
15
|
last_edited_time: v.optional(v.nullable(v.string()), null),
|
|
16
|
-
icon: v.optional(v.nullable(
|
|
17
|
-
cover: v.optional(v.nullable(
|
|
16
|
+
icon: v.optional(v.nullable(bridgePageIconSchema), null),
|
|
17
|
+
cover: v.optional(v.nullable(bridgePageCoverSchema), null),
|
|
18
18
|
url: v.optional(v.nullable(v.string()), null),
|
|
19
19
|
public_url: v.optional(v.nullable(v.string()), null),
|
|
20
20
|
/** Whether the page or an ancestor is archived. */
|