@notionhq/custom-blocks 0.4.0 → 0.5.1
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 +2 -41
- package/dist/bridge/parseHostToSandboxMessage.d.ts +3658 -0
- package/dist/bridge/parseHostToSandboxMessage.d.ts.map +1 -0
- package/dist/bridge/parseHostToSandboxMessage.js +47 -0
- package/dist/dataSources/bridge/resolveDataSourceQuery.js +3 -3
- package/dist/dataSources/bridge/resolveDataSources.js +5 -5
- 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 +75 -76
- package/docs/deployment.md +4 -5
- package/docs/pages.md +90 -56
- package/package.json +1 -1
- package/src/bridge/SandboxBridge.ts +3 -58
- package/src/bridge/parseHostToSandboxMessage.ts +54 -0
- package/src/dataSources/bridge/resolveDataSourceQuery.ts +3 -3
- package/src/dataSources/bridge/resolveDataSources.ts +6 -6
- 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseHostToSandboxMessage.d.ts","sourceRoot":"","sources":["../../src/bridge/parseHostToSandboxMessage.ts"],"names":[],"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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMtD"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { bridgeDataSourceBindingSchema } from "../protocol/dataSources/bridgeDataSourceBinding.js";
|
|
2
|
+
import { dataSourcePointerValidator } from "../protocol/dataSources/dataSourcePointer.js";
|
|
3
|
+
import { notionDataSourceSchemaValidator } from "../protocol/dataSources/dataSourceSchema.js";
|
|
4
|
+
import { initMessageSchema } from "../protocol/handshake/init.js";
|
|
5
|
+
import { hostToSandboxMessageSchema } from "../protocol/messages/hostToSandbox.js";
|
|
6
|
+
import { readIncomingType } from "../protocol/messages/incomingType.js";
|
|
7
|
+
import * as v from "valibot";
|
|
8
|
+
/**
|
|
9
|
+
* Older hosts such as 0.9.0 send `collectionPointer` and `collectionSchema` during
|
|
10
|
+
* initialization and live updates. Normalize these pre-protocol-11 names to
|
|
11
|
+
* `dataSourcePointer` and `dataSourceSchema` before exposing bindings to SDK consumers.
|
|
12
|
+
* Current fields take precedence when both names are present. Malformed fields and
|
|
13
|
+
* invalid property mappings still fail validation; this compatibility does not add
|
|
14
|
+
* host operations or repair bindings the Notion client cannot read from storage.
|
|
15
|
+
*/
|
|
16
|
+
export function parseHostToSandboxMessage(data) {
|
|
17
|
+
const type = readIncomingType(data);
|
|
18
|
+
if (type === "init" || type === "dataSourcesChanged") {
|
|
19
|
+
return v.safeParse(bindingMessageSchema, data);
|
|
20
|
+
}
|
|
21
|
+
return v.safeParse(hostToSandboxMessageSchema, data);
|
|
22
|
+
}
|
|
23
|
+
const bindingSchema = v.pipe(v.object({
|
|
24
|
+
...bridgeDataSourceBindingSchema.entries,
|
|
25
|
+
collectionPointer: v.optional(dataSourcePointerValidator),
|
|
26
|
+
collectionSchema: v.optional(notionDataSourceSchemaValidator),
|
|
27
|
+
}), v.transform(({ collectionPointer, collectionSchema, ...binding }) => ({
|
|
28
|
+
...binding,
|
|
29
|
+
dataSourcePointer: binding.dataSourcePointer ?? collectionPointer,
|
|
30
|
+
dataSourceSchema: binding.dataSourceSchema ?? collectionSchema,
|
|
31
|
+
})));
|
|
32
|
+
const dataSourcesSchema = v.object({
|
|
33
|
+
bindings: v.record(v.string(), bindingSchema),
|
|
34
|
+
});
|
|
35
|
+
const bindingMessageSchema = v.variant("type", [
|
|
36
|
+
v.variant("status", [
|
|
37
|
+
v.object({
|
|
38
|
+
...initMessageSchema.options[0].entries,
|
|
39
|
+
dataSources: dataSourcesSchema,
|
|
40
|
+
}),
|
|
41
|
+
initMessageSchema.options[1],
|
|
42
|
+
]),
|
|
43
|
+
v.object({
|
|
44
|
+
type: v.literal("dataSourcesChanged"),
|
|
45
|
+
dataSources: dataSourcesSchema,
|
|
46
|
+
}),
|
|
47
|
+
]);
|
|
@@ -19,7 +19,7 @@ export function resolveDataSourceQuery(args) {
|
|
|
19
19
|
if (dataSource.inaccessible === true) {
|
|
20
20
|
return { status: "error", error: dataSourceInaccessibleError(key) };
|
|
21
21
|
}
|
|
22
|
-
if (dataSource.
|
|
22
|
+
if (dataSource.dataSourcePointer === undefined) {
|
|
23
23
|
return {
|
|
24
24
|
status: "error",
|
|
25
25
|
error: {
|
|
@@ -40,7 +40,7 @@ export function resolveDataSourceQuery(args) {
|
|
|
40
40
|
const queryOptions = resolvedOptions.options;
|
|
41
41
|
if ((queryOptions?.filter !== undefined ||
|
|
42
42
|
(Array.isArray(queryOptions?.sorts) && queryOptions.sorts.length > 0)) &&
|
|
43
|
-
dataSource.
|
|
43
|
+
dataSource.dataSourceSchema === undefined) {
|
|
44
44
|
return {
|
|
45
45
|
status: "error",
|
|
46
46
|
error: {
|
|
@@ -83,7 +83,7 @@ export function resolveDataSourceQuery(args) {
|
|
|
83
83
|
return {
|
|
84
84
|
status: "ok",
|
|
85
85
|
query: {
|
|
86
|
-
dataSourceId: dataSource.
|
|
86
|
+
dataSourceId: dataSource.dataSourcePointer.id,
|
|
87
87
|
limit: limit.limit,
|
|
88
88
|
filter: filter.filter,
|
|
89
89
|
sorts: sorts.sorts,
|
|
@@ -9,10 +9,10 @@ import { resolveDataSourceBinding } from "../../protocol/dataSources/resolveData
|
|
|
9
9
|
export function resolveDataSources(args) {
|
|
10
10
|
return Object.entries(args.manifest.dataSources).map(([key, manifestDataSource]) => {
|
|
11
11
|
const binding = args.dataSourceBindings[key];
|
|
12
|
-
const
|
|
12
|
+
const dataSourceProperties = binding?.dataSourceSchema?.propertiesById ?? {};
|
|
13
13
|
const resolvedBinding = resolveDataSourceBinding({
|
|
14
14
|
manifestDataSource,
|
|
15
|
-
|
|
15
|
+
dataSourceSchema: binding?.dataSourceSchema,
|
|
16
16
|
propertyIdsByKey: binding?.propertyIdsByKey,
|
|
17
17
|
});
|
|
18
18
|
const propertyIdsByKey = {};
|
|
@@ -22,10 +22,10 @@ export function resolveDataSources(args) {
|
|
|
22
22
|
}
|
|
23
23
|
return {
|
|
24
24
|
key,
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
dataSourcePointer: binding?.dataSourcePointer,
|
|
26
|
+
dataSourceSchema: binding?.dataSourceSchema,
|
|
27
27
|
propertyIdsByKey,
|
|
28
|
-
propertySchemasById:
|
|
28
|
+
propertySchemasById: dataSourceProperties,
|
|
29
29
|
...(binding?.inaccessible === true && { inaccessible: true }),
|
|
30
30
|
};
|
|
31
31
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveFilter.d.ts","sourceRoot":"","sources":["../../../src/dataSources/filters/resolveFilter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gFAAgF,CAAA;
|
|
1
|
+
{"version":3,"file":"resolveFilter.d.ts","sourceRoot":"","sources":["../../../src/dataSources/filters/resolveFilter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gFAAgF,CAAA;AAK5H,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kEAAkE,CAAA;AAUxG,wBAAgB,aAAa,CAC5B,MAAM,EAAE,OAAO,EACf,UAAU,EAAE,gBAAgB,GAE1B;IAAE,MAAM,EAAE,IAAI,CAAC;IAAC,MAAM,CAAC,EAAE,sBAAsB,CAAA;CAAE,GACjD;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAsCpC"}
|
|
@@ -100,13 +100,23 @@ function parsePropertyFilter(args) {
|
|
|
100
100
|
!Object.values(filter.number).every(entry => typeof entry !== "number" || Number.isFinite(entry))) {
|
|
101
101
|
return invalidOperator("number");
|
|
102
102
|
}
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
let dateOperator;
|
|
104
|
+
if ("date" in filter) {
|
|
105
|
+
dateOperator = filter.date;
|
|
106
|
+
}
|
|
107
|
+
else if ("created_time" in filter) {
|
|
108
|
+
dateOperator = filter.created_time;
|
|
109
|
+
}
|
|
110
|
+
else if ("last_edited_time" in filter) {
|
|
111
|
+
dateOperator = filter.last_edited_time;
|
|
112
|
+
}
|
|
113
|
+
if (dateOperator !== undefined &&
|
|
114
|
+
!Object.entries(dateOperator).every(([key, entry]) => key === "target" ||
|
|
105
115
|
entry === true ||
|
|
106
116
|
typeof entry === "object" ||
|
|
107
117
|
v.is(customBlockRelativeDateValueSchema, entry) ||
|
|
108
118
|
isValidIsoDate(entry))) {
|
|
109
|
-
return invalidOperator(
|
|
119
|
+
return invalidOperator(branch);
|
|
110
120
|
}
|
|
111
121
|
return { status: "ok", filter };
|
|
112
122
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { CustomBlockCheckboxFilterOperator } from "../../protocol/dataSources/filters/checkboxFilterOperator.js";
|
|
2
2
|
import type { CustomBlockContainsFilterOperator } from "../../protocol/dataSources/filters/containsFilterOperator.js";
|
|
3
|
-
import type { CustomBlockCreatedByFilterOperator } from "../../protocol/dataSources/filters/createdByFilterOperator.js";
|
|
4
3
|
import type { CustomBlockDateFilterOperator } from "../../protocol/dataSources/filters/dateFilterOperator.js";
|
|
5
4
|
import type { CustomBlockNumberFilterOperator } from "../../protocol/dataSources/filters/numberFilterOperator.js";
|
|
6
5
|
import type { CustomBlockOptionFilterOperator } from "../../protocol/dataSources/filters/optionFilterOperator.js";
|
|
@@ -8,6 +7,7 @@ import type { CustomBlockPeopleFilterOperator, CustomBlockPersonFilterValue } fr
|
|
|
8
7
|
import type { CustomBlockRelationFilterOperator } from "../../protocol/dataSources/filters/relationFilterOperator.js";
|
|
9
8
|
import type { CustomBlockStatusFilterOperator } from "../../protocol/dataSources/filters/statusFilterOperator.js";
|
|
10
9
|
import type { CustomBlockTextFilterOperator } from "../../protocol/dataSources/filters/textFilterOperator.js";
|
|
10
|
+
import type { CustomBlockTimestampFilterOperator } from "../../protocol/dataSources/filters/timestampFilterOperator.js";
|
|
11
11
|
import type { NotionSortDirection } from "../../protocol/dataSources/sortDirection.js";
|
|
12
12
|
import type { ExclusiveUnion } from "../../utils/typeUtils.js";
|
|
13
13
|
export type NotionDataSourceTextFilterOperator = ExclusiveUnion<CustomBlockTextFilterOperator>;
|
|
@@ -17,7 +17,7 @@ export type NotionDataSourceOptionFilterOperator = ExclusiveUnion<CustomBlockOpt
|
|
|
17
17
|
export type NotionDataSourceStatusFilterOperator = ExclusiveUnion<CustomBlockStatusFilterOperator>;
|
|
18
18
|
export type NotionDataSourceContainsFilterOperator = ExclusiveUnion<CustomBlockContainsFilterOperator>;
|
|
19
19
|
export type NotionDataSourceDateFilterOperator = ExclusiveUnion<CustomBlockDateFilterOperator>;
|
|
20
|
-
export type
|
|
20
|
+
export type NotionDataSourceTimestampFilterOperator = ExclusiveUnion<CustomBlockTimestampFilterOperator>;
|
|
21
21
|
export type NotionDataSourcePersonFilterValue = CustomBlockPersonFilterValue;
|
|
22
22
|
export type NotionDataSourcePeopleFilterOperator = ExclusiveUnion<CustomBlockPeopleFilterOperator>;
|
|
23
23
|
export type NotionDataSourceRelationFilterOperator = ExclusiveUnion<CustomBlockRelationFilterOperator>;
|
|
@@ -50,12 +50,18 @@ export type NotionDataSourcePropertyFilter = NotionDataSourcePropertyAddress & E
|
|
|
50
50
|
status: NotionDataSourceStatusFilterOperator;
|
|
51
51
|
} | {
|
|
52
52
|
date: NotionDataSourceDateFilterOperator;
|
|
53
|
+
} | {
|
|
54
|
+
created_time: NotionDataSourceTimestampFilterOperator;
|
|
55
|
+
} | {
|
|
56
|
+
last_edited_time: NotionDataSourceTimestampFilterOperator;
|
|
53
57
|
} | {
|
|
54
58
|
people: NotionDataSourcePeopleFilterOperator;
|
|
55
59
|
} | {
|
|
56
60
|
relation: NotionDataSourceRelationFilterOperator;
|
|
57
61
|
} | {
|
|
58
|
-
created_by:
|
|
62
|
+
created_by: NotionDataSourcePeopleFilterOperator;
|
|
63
|
+
} | {
|
|
64
|
+
last_edited_by: NotionDataSourcePeopleFilterOperator;
|
|
59
65
|
}>;
|
|
60
66
|
export type NotionDataSourceSort = NotionDataSourcePropertyAddress & {
|
|
61
67
|
direction: NotionSortDirection;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/dataSources/filters/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,gFAAgF,CAAA;AACvI,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,gFAAgF,CAAA;AACvI,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/dataSources/filters/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,gFAAgF,CAAA;AACvI,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,gFAAgF,CAAA;AACvI,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4EAA4E,CAAA;AAC/H,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,8EAA8E,CAAA;AACnI,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,8EAA8E,CAAA;AACnI,OAAO,KAAK,EACX,+BAA+B,EAC/B,4BAA4B,EAC5B,MAAM,8EAA8E,CAAA;AACrF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,gFAAgF,CAAA;AACvI,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,8EAA8E,CAAA;AACnI,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4EAA4E,CAAA;AAC/H,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,iFAAiF,CAAA;AACzI,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+DAA+D,CAAA;AACxG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAE9D,MAAM,MAAM,kCAAkC,GAC7C,cAAc,CAAC,6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IAAE,MAAM,EAAE,oCAAoC,CAAA;CAAE,GAChD;IAAE,YAAY,EAAE,sCAAsC,CAAA;CAAE,GACxD;IAAE,MAAM,EAAE,oCAAoC,CAAA;CAAE,GAChD;IAAE,IAAI,EAAE,kCAAkC,CAAA;CAAE,GAC5C;IAAE,YAAY,EAAE,uCAAuC,CAAA;CAAE,GACzD;IAAE,gBAAgB,EAAE,uCAAuC,CAAA;CAAE,GAC7D;IAAE,MAAM,EAAE,oCAAoC,CAAA;CAAE,GAChD;IAAE,QAAQ,EAAE,sCAAsC,CAAA;CAAE,GACpD;IAAE,UAAU,EAAE,oCAAoC,CAAA;CAAE,GACpD;IAAE,cAAc,EAAE,oCAAoC,CAAA;CAAE,CAC1D,CAAA;AAEF,MAAM,MAAM,oBAAoB,GAAG,+BAA+B,GAAG;IACpE,SAAS,EAAE,mBAAmB,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAClD,8BAA8B,GAAG;IAAE,GAAG,EAAE,8BAA8B,EAAE,CAAA;CAAE,CAC1E,CAAA"}
|
|
@@ -39,7 +39,7 @@ export function resolvePropertyAddress(value, dataSource) {
|
|
|
39
39
|
}
|
|
40
40
|
propertyId = value.propertyId;
|
|
41
41
|
}
|
|
42
|
-
const properties = dataSource.
|
|
42
|
+
const properties = dataSource.dataSourceSchema?.propertiesById ?? {};
|
|
43
43
|
if (!Object.hasOwn(properties, propertyId)) {
|
|
44
44
|
return {
|
|
45
45
|
status: "error",
|
|
@@ -71,7 +71,7 @@ function resolveWriteIdentifier(args) {
|
|
|
71
71
|
? dataSource.propertyIdsByKey[identifier]
|
|
72
72
|
: undefined;
|
|
73
73
|
if (propertyId === undefined ||
|
|
74
|
-
!dataSource.
|
|
74
|
+
!dataSource.dataSourceSchema?.propertiesById[propertyId]) {
|
|
75
75
|
return {
|
|
76
76
|
status: "error",
|
|
77
77
|
error: makePropertyError("unmapped_property", `Cannot resolve property key "${identifier}" on this page.`),
|
|
@@ -25,7 +25,7 @@ export function resolvePageDataSource(args) {
|
|
|
25
25
|
if (dataSource.inaccessible === true) {
|
|
26
26
|
return { status: "error", error: dataSourceInaccessibleError(key) };
|
|
27
27
|
}
|
|
28
|
-
if (dataSource.
|
|
28
|
+
if (dataSource.dataSourcePointer === undefined) {
|
|
29
29
|
return {
|
|
30
30
|
status: "error",
|
|
31
31
|
error: {
|
|
@@ -38,6 +38,6 @@ export function resolvePageDataSource(args) {
|
|
|
38
38
|
return {
|
|
39
39
|
status: "success",
|
|
40
40
|
dataSource,
|
|
41
|
-
dataSourceId: dataSource.
|
|
41
|
+
dataSourceId: dataSource.dataSourcePointer.id,
|
|
42
42
|
};
|
|
43
43
|
}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import type { CustomBlockQueryDataSourceErrorInfo } from "../protocol/dataSources/messages/queryDataSource.js";
|
|
2
1
|
import type { SubscribeToDataSourceArgs } from "./types.js";
|
|
3
|
-
export declare function subscribeToDataSource(
|
|
4
|
-
/** @deprecated Pass onError in the first argument instead. */
|
|
5
|
-
export declare function subscribeToDataSource(args: SubscribeToDataSourceArgs, onError?: (error: CustomBlockQueryDataSourceErrorInfo) => void): () => void;
|
|
2
|
+
export declare function subscribeToDataSource({ key, onSnapshot, onError, options: providedOptions, }: SubscribeToDataSourceArgs): () => void;
|
|
6
3
|
//# sourceMappingURL=subscribeToDataSource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscribeToDataSource.d.ts","sourceRoot":"","sources":["../../src/dataSources/subscribeToDataSource.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"subscribeToDataSource.d.ts","sourceRoot":"","sources":["../../src/dataSources/subscribeToDataSource.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAA;AAE3D,wBAAgB,qBAAqB,CAAC,EACrC,GAAG,EACH,UAAU,EACV,OAAO,EACP,OAAO,EAAE,eAAoB,GAC7B,EAAE,yBAAyB,GAAG,MAAM,IAAI,CAkHxC"}
|
|
@@ -2,8 +2,7 @@ import { getBridge } from "../bridge/getBridge.js";
|
|
|
2
2
|
import { makeNotionPage } from "../pages/makeNotionPage.js";
|
|
3
3
|
import { notifyListener } from "../utils/notifyListener.js";
|
|
4
4
|
import { resolveDataSourceQuery } from "./bridge/resolveDataSourceQuery.js";
|
|
5
|
-
export function subscribeToDataSource({ key, onSnapshot, onError
|
|
6
|
-
const onError = providedOnError ?? legacyOnError;
|
|
5
|
+
export function subscribeToDataSource({ key, onSnapshot, onError, options: providedOptions = {}, }) {
|
|
7
6
|
const options = structuredClone(providedOptions);
|
|
8
7
|
const bridge = getBridge();
|
|
9
8
|
const subscriptionId = `data-source:${globalThis.crypto.randomUUID()}`;
|
|
@@ -51,7 +50,7 @@ export function subscribeToDataSource({ key, onSnapshot, onError: providedOnErro
|
|
|
51
50
|
return;
|
|
52
51
|
}
|
|
53
52
|
const backingSourceChanged = bindingSignature !== undefined &&
|
|
54
|
-
dataSource?.
|
|
53
|
+
dataSource?.dataSourcePointer?.id !== nextSource?.dataSourcePointer?.id;
|
|
55
54
|
bindingSignature = signature;
|
|
56
55
|
dataSource = nextSource;
|
|
57
56
|
if (backingSourceChanged) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/files/files.ts"],"names":[],"mappings":"AAAA,YAAY,EACX,kBAAkB,IAAI,kBAAkB,EACxC,sBAAsB,IAAI,sBAAsB,EAChD,sBAAsB,IAAI,gBAAgB,GAC1C,MAAM,2CAA2C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/files/icons.ts"],"names":[],"mappings":"AAEA,YAAY,EACX,iBAAiB,IAAI,iBAAiB,EACtC,WAAW,IAAI,WAAW,EAC1B,UAAU,IAAI,UAAU,EACxB,eAAe,IAAI,eAAe,EAClC,cAAc,IAAI,cAAc,GAChC,MAAM,2CAA2C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export type { CustomBlockPage } from "./protocol/context/containingPage.js";
|
|
|
10
10
|
export type { NotionContrastMode } from "./protocol/context/contrast.js";
|
|
11
11
|
export type { NotionParent } from "./protocol/context/parent.js";
|
|
12
12
|
export type { NotionTheme } from "./protocol/context/theme.js";
|
|
13
|
-
export type {
|
|
13
|
+
export type { NotionDataSourceSchema } from "./protocol/dataSources/dataSourceSchema.js";
|
|
14
14
|
export type { CustomBlockDataSourceResolutionErrorCode, CustomBlockDataSourceResolutionErrorInfo, CustomBlockPropertyErrorCode, CustomBlockPropertyErrorInfo, } from "./protocol/dataSources/errors.js";
|
|
15
15
|
export type { CustomBlockQueryDataSourceErrorCode, CustomBlockQueryDataSourceErrorInfo, } from "./protocol/dataSources/messages/queryDataSource.js";
|
|
16
16
|
export type { NotionDataSource } from "./protocol/dataSources/notionDataSource.js";
|
|
@@ -20,9 +20,7 @@ export { NOTION_PROPERTY_TYPES } from "./protocol/dataSources/properties/propert
|
|
|
20
20
|
export type { NotionSortDirection } from "./protocol/dataSources/sortDirection.js";
|
|
21
21
|
export type { CustomBlockInitializationErrorCode, CustomBlockInitializationErrorInfo, } from "./protocol/handshake/init.js";
|
|
22
22
|
export { CustomBlockInitializationError } from "./protocol/handshake/init.js";
|
|
23
|
-
export type { NotionIconColor, NotionIconName, } from "./protocol/icons.js";
|
|
24
23
|
export type { CustomBlockGrant, CustomBlockGrantAction, CustomBlockGrantResourceName, } from "./protocol/manifest/grants.js";
|
|
25
|
-
export type { ManifestDataSource, ManifestIcon, ManifestProperty, } from "./protocol/manifest/manifest.js";
|
|
26
24
|
export type { CustomBlockOpenExternalUrlErrorCode, CustomBlockOpenExternalUrlErrorInfo, } from "./protocol/navigation/openExternalUrl.js";
|
|
27
25
|
export type { CustomBlockCreatePageErrorCode, CustomBlockCreatePageErrorInfo, NotionCreatePagePosition, } from "./protocol/pages/messages/createPage.js";
|
|
28
26
|
export type { CustomBlockGetPageErrorCode, CustomBlockGetPageErrorInfo, } from "./protocol/pages/messages/getPage.js";
|
|
@@ -37,10 +35,12 @@ export { customBlock } from "./context/index.js";
|
|
|
37
35
|
export type * from "./dataSources/filters/types.js";
|
|
38
36
|
export { dataSources } from "./dataSources/index.js";
|
|
39
37
|
export type * from "./dataSources/types.js";
|
|
38
|
+
export type * from "./files/files.js";
|
|
39
|
+
export type * from "./files/icons.js";
|
|
40
40
|
export { initCustomBlock } from "./initialization/initCustomBlock.js";
|
|
41
41
|
export { NotInIframeError } from "./initialization/NotInIframeError.js";
|
|
42
42
|
export type { CustomBlockInitPayload } from "./initialization/types.js";
|
|
43
|
-
export type {
|
|
43
|
+
export type { NotionCustomBlockManifest, NotionManifestDataSource, NotionManifestIcon, NotionManifestProperty, } from "./manifest/types.js";
|
|
44
44
|
export { links } from "./navigation/index.js";
|
|
45
45
|
export type * from "./navigation/types.js";
|
|
46
46
|
export { pages } from "./pages/index.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,YAAY,EAAE,eAAe,EAAE,MAAM,4DAA4D,CAAA;AACjG,YAAY,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAA;AAC9F,YAAY,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAA;AACtF,YAAY,EAAE,WAAW,EAAE,MAAM,mDAAmD,CAAA;AACpF,YAAY,EAAE,sBAAsB,EAAE,MAAM,kEAAkE,CAAA;AAC9G,YAAY,EACX,wCAAwC,EACxC,wCAAwC,EACxC,4BAA4B,EAC5B,4BAA4B,GAC5B,MAAM,wDAAwD,CAAA;AAC/D,YAAY,EACX,mCAAmC,EAC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,EAAE,MAAM,wBAAwB,CAAA;AACpD,mBAAmB,wBAAwB,CAAA;AAC3C,mBAAmB,kBAAkB,CAAA;AACrC,mBAAmB,kBAAkB,CAAA;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAA;AACvE,YAAY,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AACvE,YAAY,EACX,yBAAyB,EACzB,wBAAwB,EACxB,kBAAkB,EAClB,sBAAsB,GACtB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAC7C,mBAAmB,uBAAuB,CAAA;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACxC,mBAAmB,kBAAkB,CAAA;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACxC,mBAAmB,kBAAkB,CAAA"}
|
|
@@ -4,8 +4,8 @@ export function getInitBindingError(manifest, dataSources) {
|
|
|
4
4
|
if (dataSource?.inaccessible === true) {
|
|
5
5
|
continue;
|
|
6
6
|
}
|
|
7
|
-
if (dataSource?.
|
|
8
|
-
dataSource.
|
|
7
|
+
if (dataSource?.dataSourcePointer === undefined ||
|
|
8
|
+
dataSource.dataSourceSchema === undefined) {
|
|
9
9
|
return {
|
|
10
10
|
code: "invalid_init_bindings",
|
|
11
11
|
message: `Host did not provide a complete binding for data source "${dataSourceKey}".`,
|
package/dist/manifest/types.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { BridgeCustomBlockManifest } from "../protocol/manifest/manifest.js";
|
|
1
|
+
import type { BridgeCustomBlockManifest, BridgeManifestDataSource, BridgeManifestIcon, BridgeManifestProperty } from "../protocol/manifest/manifest.js";
|
|
2
2
|
/** A block's declared metadata, data sources, and grants. */
|
|
3
3
|
export type NotionCustomBlockManifest = BridgeCustomBlockManifest;
|
|
4
|
-
|
|
5
|
-
export type
|
|
4
|
+
export type NotionManifestIcon = BridgeManifestIcon;
|
|
5
|
+
export type NotionManifestProperty = BridgeManifestProperty;
|
|
6
|
+
export type NotionManifestDataSource = BridgeManifestDataSource;
|
|
6
7
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/manifest/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/manifest/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,yBAAyB,EACzB,wBAAwB,EACxB,kBAAkB,EAClB,sBAAsB,EACtB,MAAM,uDAAuD,CAAA;AAE9D,6DAA6D;AAC7D,MAAM,MAAM,yBAAyB,GAAG,yBAAyB,CAAA;AAEjE,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,CAAA;AACnD,MAAM,MAAM,sBAAsB,GAAG,sBAAsB,CAAA;AAC3D,MAAM,MAAM,wBAAwB,GAAG,wBAAwB,CAAA"}
|
|
@@ -2,7 +2,7 @@ import { getPageResultMessageSchema } from "../../protocol/pages/messages/getPag
|
|
|
2
2
|
import { makeNotionPage } from "../makeNotionPage.js";
|
|
3
3
|
export async function getPageForDataSource(bridge, args) {
|
|
4
4
|
const { pageId, dataSource } = args;
|
|
5
|
-
const dataSourceId = dataSource?.
|
|
5
|
+
const dataSourceId = dataSource?.dataSourcePointer?.id;
|
|
6
6
|
const result = await bridge.request({ type: "getPage", dataSourceId, pageId }, getPageResultMessageSchema);
|
|
7
7
|
if (result.status === "error") {
|
|
8
8
|
return result;
|
|
@@ -18,6 +18,9 @@ export declare function toNotionPageFieldsFromBridgePage(page: BridgePage): {
|
|
|
18
18
|
} | {
|
|
19
19
|
type: "agent_id";
|
|
20
20
|
agent_id: string & import("valibot").Brand<"NotionAgentId">;
|
|
21
|
+
} | {
|
|
22
|
+
type: "app_installation_id";
|
|
23
|
+
app_installation_id: string & import("valibot").Brand<"NotionAppInstallationId">;
|
|
21
24
|
} | {
|
|
22
25
|
type: "unavailable";
|
|
23
26
|
};
|
|
@@ -59,7 +62,7 @@ export declare function toNotionPageFieldsFromBridgePage(page: BridgePage): {
|
|
|
59
62
|
type: "icon";
|
|
60
63
|
icon: {
|
|
61
64
|
name: string;
|
|
62
|
-
color?: import("../../protocol/icons.js").
|
|
65
|
+
color?: import("../../protocol/icons.js").BridgeIconColor | undefined;
|
|
63
66
|
} & {
|
|
64
67
|
[key: string]: unknown;
|
|
65
68
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toNotionPageFieldsFromBridgePage.d.ts","sourceRoot":"","sources":["../../../src/pages/bridge/toNotionPageFieldsFromBridgePage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sDAAsD,CAAA;AACtF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAG5D,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,UAAU
|
|
1
|
+
{"version":3,"file":"toNotionPageFieldsFromBridgePage.d.ts","sourceRoot":"","sources":["../../../src/pages/bridge/toNotionPageFieldsFromBridgePage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sDAAsD,CAAA;AACtF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAG5D,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBhE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toNotionPagePropertyFromBridgeProperty.d.ts","sourceRoot":"","sources":["../../../src/pages/bridge/toNotionPagePropertyFromBridgeProperty.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8EAA8E,CAAA;AAE3H,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAE1D,wBAAgB,sCAAsC,CACrD,KAAK,EAAE,uBAAuB,GAC5B,uBAAuB,
|
|
1
|
+
{"version":3,"file":"toNotionPagePropertyFromBridgeProperty.d.ts","sourceRoot":"","sources":["../../../src/pages/bridge/toNotionPagePropertyFromBridgeProperty.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8EAA8E,CAAA;AAE3H,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAE1D,wBAAgB,sCAAsC,CACrD,KAAK,EAAE,uBAAuB,GAC5B,uBAAuB,CAkFzB"}
|
|
@@ -70,8 +70,6 @@ export function toNotionPagePropertyFromBridgeProperty(value) {
|
|
|
70
70
|
return { id: value.id, type: value.type, button: value.button };
|
|
71
71
|
case "formula":
|
|
72
72
|
return { id: value.id, type: value.type, formula: value.formula };
|
|
73
|
-
case "location":
|
|
74
|
-
return { id: value.id, type: value.type, location: value.location };
|
|
75
73
|
case "rollup":
|
|
76
74
|
return { id: value.id, type: value.type, rollup: value.rollup };
|
|
77
75
|
case "verification":
|
|
@@ -19,7 +19,7 @@ export function updatePage(bridge, args) {
|
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
const { dataSource } = args;
|
|
22
|
-
const dataSourceId = dataSource?.
|
|
22
|
+
const dataSourceId = dataSource?.dataSourcePointer?.id;
|
|
23
23
|
const resolved = resolvePropertyWriteMapForDataSource({
|
|
24
24
|
dataSource,
|
|
25
25
|
properties: args.properties === undefined ? {} : args.properties,
|
|
@@ -5,8 +5,8 @@ export function getPropertyByKey(hostState, args) {
|
|
|
5
5
|
? hostState.dataSources.find(source => source.key === dataSource?.key)
|
|
6
6
|
: undefined;
|
|
7
7
|
// Keep the captured mapping valid only while its key remains bound to the original database.
|
|
8
|
-
if (!dataSource?.
|
|
9
|
-
currentDataSource?.
|
|
8
|
+
if (!dataSource?.dataSourcePointer ||
|
|
9
|
+
currentDataSource?.dataSourcePointer?.id !== dataSource.dataSourcePointer.id) {
|
|
10
10
|
return null;
|
|
11
11
|
}
|
|
12
12
|
const propertyId = Object.hasOwn(dataSource.propertyIdsByKey, propertyKey)
|
package/dist/pages/types.d.ts
CHANGED
|
@@ -3,18 +3,19 @@ import type { CustomBlockCreatePageErrorInfo, NotionCreatePagePosition } from ".
|
|
|
3
3
|
import type { CustomBlockGetPageErrorInfo } from "../protocol/pages/messages/getPage.js";
|
|
4
4
|
import type { CustomBlockOpenPageErrorInfo, OpenPageMode } from "../protocol/pages/messages/openPage.js";
|
|
5
5
|
import type { CustomBlockUpdatePageErrorInfo } from "../protocol/pages/messages/updatePage.js";
|
|
6
|
-
import type {
|
|
6
|
+
import type { BridgePageCover, BridgePageIcon } from "../protocol/pages/pageAppearance.js";
|
|
7
7
|
import type { NotionDateInput } from "../protocol/pages/properties/dateInput.js";
|
|
8
|
-
import type { NotionFileInput } from "../protocol/pages/properties/fileInput.js";
|
|
9
8
|
import type { NotionPlaceInput } from "../protocol/pages/properties/placeInput.js";
|
|
10
9
|
import type { NotionRelationInput } from "../protocol/pages/properties/relationInput.js";
|
|
11
10
|
import type { NotionRichTextItem } from "../protocol/pages/properties/richText.js";
|
|
12
11
|
import type { NotionSelectOptionInput } from "../protocol/pages/properties/selectOption.js";
|
|
13
12
|
import type { NotionUserInput } from "../protocol/pages/properties/userInput.js";
|
|
14
13
|
import type { NotionPageId } from "../protocol/utils/ids.js";
|
|
14
|
+
import type { NotionFilePropertyItem } from "../files/files.js";
|
|
15
15
|
import type { KeyedDataSourceParent } from "./parent.js";
|
|
16
|
-
export type { NotionPageCover, NotionPageIcon, } from "../protocol/pages/pageAppearance.js";
|
|
17
16
|
export type { NotionDateInput } from "../protocol/pages/properties/dateInput.js";
|
|
17
|
+
export type NotionPageIcon = BridgePageIcon;
|
|
18
|
+
export type NotionPageCover = BridgePageCover;
|
|
18
19
|
export type NotionPagePropertyValue = {
|
|
19
20
|
id: string;
|
|
20
21
|
} & ({
|
|
@@ -59,7 +60,7 @@ export type NotionPagePropertyValue = {
|
|
|
59
60
|
has_more?: boolean;
|
|
60
61
|
} | {
|
|
61
62
|
type: "files";
|
|
62
|
-
files:
|
|
63
|
+
files: NotionFilePropertyItem[];
|
|
63
64
|
} | {
|
|
64
65
|
type: "place";
|
|
65
66
|
place: NotionPlaceInput | null;
|
|
@@ -84,9 +85,6 @@ export type NotionPagePropertyValue = {
|
|
|
84
85
|
} | {
|
|
85
86
|
type: "formula";
|
|
86
87
|
formula: string;
|
|
87
|
-
} | {
|
|
88
|
-
type: "location";
|
|
89
|
-
location: string;
|
|
90
88
|
} | {
|
|
91
89
|
type: "rollup";
|
|
92
90
|
rollup: string;
|
|
@@ -102,7 +100,7 @@ export type NotionPagePropertyWriteMap = Record<string, NotionPagePropertyValue>
|
|
|
102
100
|
* from the map key before sending the bridge message.
|
|
103
101
|
*/
|
|
104
102
|
export type NotionPagePropertyInputValue = Exclude<NotionPagePropertyWriteMap[string], {
|
|
105
|
-
type: "created_time" | "last_edited_time" | "created_by" | "last_edited_by" | "unique_id" | "button" | "formula" | "
|
|
103
|
+
type: "created_time" | "last_edited_time" | "created_by" | "last_edited_by" | "unique_id" | "button" | "formula" | "rollup" | "verification";
|
|
106
104
|
}> extends infer PropertyValue ? PropertyValue extends {
|
|
107
105
|
id: string;
|
|
108
106
|
} ? Omit<PropertyValue, "id"> & {
|
|
@@ -160,7 +158,7 @@ export type CreatePageResult = {
|
|
|
160
158
|
*
|
|
161
159
|
* - `page_id`: Create a child page under the given Notion page.
|
|
162
160
|
* - `data_source_id`: Create a row inside the given Notion data source. The public API's
|
|
163
|
-
* `data_source_id` is the same UUID as the `
|
|
161
|
+
* `data_source_id` is the same UUID as the `dataSourcePointer.id` exposed in `dataSources`,
|
|
164
162
|
* so either value works here.
|
|
165
163
|
* - `data_source_key`: Create a row inside the data source that the custom block was configured with
|
|
166
164
|
* under this semantic key. The SDK resolves the key to a `data_source_id` locally before
|
|
@@ -172,7 +170,7 @@ export type { CreatePageParent } from "./parent.js";
|
|
|
172
170
|
*/
|
|
173
171
|
export type CreatePageArgs = {
|
|
174
172
|
properties: NotionPagePropertyInputMap;
|
|
175
|
-
icon?:
|
|
173
|
+
icon?: NotionPageIcon;
|
|
176
174
|
cover?: NotionPageCover;
|
|
177
175
|
} & ({
|
|
178
176
|
parent: PageParent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/pages/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,MAAM,oDAAoD,CAAA;AAC3D,OAAO,KAAK,EACX,8BAA8B,EAC9B,wBAAwB,EACxB,MAAM,+DAA+D,CAAA;AACtE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,4DAA4D,CAAA;AAC7G,OAAO,KAAK,EACX,4BAA4B,EAC5B,YAAY,EACZ,MAAM,6DAA6D,CAAA;AACpE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,+DAA+D,CAAA;AACnH,OAAO,KAAK,EACX,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/pages/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,MAAM,oDAAoD,CAAA;AAC3D,OAAO,KAAK,EACX,8BAA8B,EAC9B,wBAAwB,EACxB,MAAM,+DAA+D,CAAA;AACtE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,4DAA4D,CAAA;AAC7G,OAAO,KAAK,EACX,4BAA4B,EAC5B,YAAY,EACZ,MAAM,6DAA6D,CAAA;AACpE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,+DAA+D,CAAA;AACnH,OAAO,KAAK,EACX,eAAe,EACf,cAAc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