@notionhq/custom-blocks 0.1.16 → 0.1.17
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 +1 -2
- package/dist/bridge/SandboxBridge.d.ts.map +1 -1
- package/dist/bridge/dataSources/resolveProperty.d.ts +2 -1
- package/dist/bridge/dataSources/resolveProperty.d.ts.map +1 -1
- package/dist/bridge/hostState.d.ts +2 -1
- package/dist/bridge/hostState.d.ts.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/protocol/dataSources/dataSourcePage.d.ts +1 -52
- package/dist/protocol/dataSources/dataSourcePage.d.ts.map +1 -1
- package/dist/protocol/dataSources/dataSourcePage.js +1 -3
- package/dist/protocol/pages/page.d.ts +0 -14
- package/dist/protocol/pages/page.d.ts.map +1 -1
- package/dist/types.d.ts +64 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/src/bridge/SandboxBridge.ts +2 -4
- package/src/bridge/dataSources/resolveProperty.ts +2 -4
- package/src/bridge/hostState.ts +6 -6
- package/src/index.ts +0 -8
- package/src/types.ts +72 -10
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { NotionDataSource } from "../protocol/dataSources/dataSource.js";
|
|
2
|
-
import type { NotionDataSourcePageUpdateArgs, NotionDataSourcePageUpdateResult } from "../protocol/dataSources/dataSourcePage.js";
|
|
3
2
|
import { type InitMessage } from "../protocol/messages/init.js";
|
|
4
|
-
import type { CreatePageArgs, CreatePageResult, GetPageResult, GetUserResult, ListUsersArgs, ListUsersResult, NotionPageId, NotionUserId, UpdatePageArgs, UpdatePageResult, UseDataSourceOptions } from "../types.js";
|
|
3
|
+
import type { CreatePageArgs, CreatePageResult, GetPageResult, GetUserResult, ListUsersArgs, ListUsersResult, NotionDataSourcePageUpdateArgs, NotionDataSourcePageUpdateResult, NotionPageId, NotionUserId, UpdatePageArgs, UpdatePageResult, UseDataSourceOptions } from "../types.js";
|
|
5
4
|
import { type CustomBlockHostState } from "./hostState.js";
|
|
6
5
|
import type { ManifestLoadResult } from "./loadManifest.js";
|
|
7
6
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SandboxBridge.d.ts","sourceRoot":"","sources":["../../../../home/runner/work/custom-blocks/custom-blocks/sdk/src/bridge/SandboxBridge.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,gBAAgB,EAEhB,MAAM,4DAA4D,CAAA;
|
|
1
|
+
{"version":3,"file":"SandboxBridge.d.ts","sourceRoot":"","sources":["../../../../home/runner/work/custom-blocks/custom-blocks/sdk/src/bridge/SandboxBridge.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,gBAAgB,EAEhB,MAAM,4DAA4D,CAAA;AAWnE,OAAO,EAEN,KAAK,WAAW,EAEhB,MAAM,mDAAmD,CAAA;AAc1D,OAAO,KAAK,EACX,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,aAAa,EACb,eAAe,EACf,8BAA8B,EAC9B,gCAAgC,EAChC,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,MAAM,aAAa,CAAA;AAKpB,OAAO,EACN,KAAK,oBAAoB,EAGzB,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAG3D;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC7B,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,GAAG,UAAU,CAAA;IAC9B,IAAI,EAAE,OAAO,CAAA;CACb,CAAA;AAED,qBAAa,aAAa;IACzB,OAAO,CAAC,SAAS,CAIhB;IACD,OAAO,CAAC,SAAS,CAAwB;IACzC,OAAO,CAAC,UAAU,CAAwB;IAC1C,OAAO,CAAC,mBAAmB,CAAwB;IACnD,OAAO,CAAC,aA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,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC;IAYrD,OAAO,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC;IAYrD,SAAS,CAAC,IAAI,GAAE,aAAkB,GAAG,OAAO,CAAC,eAAe,CAAC;IAa7D,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;IA2C3D;;;;OAIG;IACH,oBAAoB,CAAC,IAAI,EAAE;QAC1B,UAAU,EAAE,gBAAgB,CAAA;QAC5B,MAAM,EAAE,YAAY,CAAA;QACpB,cAAc,EAAE,8BAA8B,CAAA;KAC9C,GAAG,OAAO,CAAC,gCAAgC,CAAC;IAuB7C;;;;OAIG;IACH,OAAO,CAAC,uBAAuB;CAkE/B"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { NotionDataSource } from "../../protocol/dataSources/dataSource.js";
|
|
2
2
|
import type { CustomBlockPropertyErrorInfo } from "../../protocol/dataSources/errors.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { NotionPagePropertyWriteMap } from "../../protocol/pages/page.js";
|
|
4
|
+
import type { NotionPagePropertyInputMap } from "../../types.js";
|
|
4
5
|
export type { CustomBlockPropertyErrorCode, CustomBlockPropertyErrorInfo, } from "../../protocol/dataSources/errors.js";
|
|
5
6
|
export type PropertyWriteMapResolutionResult = {
|
|
6
7
|
status: "success";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveProperty.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/custom-blocks/custom-blocks/sdk/src/bridge/dataSources/resolveProperty.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4DAA4D,CAAA;AAClG,OAAO,KAAK,EAEX,4BAA4B,EAC5B,MAAM,wDAAwD,CAAA;AAC/D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"resolveProperty.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/custom-blocks/custom-blocks/sdk/src/bridge/dataSources/resolveProperty.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4DAA4D,CAAA;AAClG,OAAO,KAAK,EAEX,4BAA4B,EAC5B,MAAM,wDAAwD,CAAA;AAC/D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gDAAgD,CAAA;AAGhG,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAEhE,YAAY,EACX,4BAA4B,EAC5B,4BAA4B,GAC5B,MAAM,wDAAwD,CAAA;AAE/D,MAAM,MAAM,gCAAgC,GACzC;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,UAAU,EAAE,0BAA0B,CAAA;CAAE,GAC7D;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,4BAA4B,CAAA;CAAE,CAAA;AAS3D;;;;;;GAMG;AACH,wBAAgB,oCAAoC,CAAC,IAAI,EAAE;IAC1D,UAAU,EAAE,gBAAgB,GAAG,SAAS,CAAA;IACxC,UAAU,EAAE,0BAA0B,CAAA;IACtC,aAAa,EAAE,MAAM,CAAA;CACrB,GAAG,gCAAgC,CAwDnC;AAED;;;GAGG;AACH,wBAAgB,sCAAsC,CAAC,IAAI,EAAE;IAC5D,UAAU,EAAE,gBAAgB,GAAG,SAAS,CAAA;IACxC,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;CACrB,GACE;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GACzC;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,4BAA4B,CAAA;CAAE,CAsB1D"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NotionContrastMode } from "../protocol/contrast.js";
|
|
2
2
|
import type { NotionDataSource } from "../protocol/dataSources/dataSource.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { NotionDataSourcePageBridge } from "../protocol/dataSources/dataSourcePage.js";
|
|
4
4
|
import type { NotionPropertySchema } from "../protocol/dataSources/propertySchema.js";
|
|
5
5
|
import type { NotionBlockId } from "../protocol/ids.js";
|
|
6
6
|
import type { CustomBlockManifest } from "../protocol/manifest.js";
|
|
@@ -9,6 +9,7 @@ import type { CustomBlockPage, NotionPageId } from "../protocol/pages/page.js";
|
|
|
9
9
|
import type { NotionParent } from "../protocol/parent.js";
|
|
10
10
|
import type { NotionTheme } from "../protocol/theme.js";
|
|
11
11
|
import type { NotionUser } from "../protocol/users/user.js";
|
|
12
|
+
import type { NotionDataSourcePage, NotionDataSourcePageUpdateArgs, NotionDataSourcePageUpdateResult } from "../types.js";
|
|
12
13
|
export type CustomBlockHostState = UninitializedHostState | InitializedHostState;
|
|
13
14
|
export type UninitializedHostState = {
|
|
14
15
|
status: "uninitialized";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hostState.d.ts","sourceRoot":"","sources":["../../../../home/runner/work/custom-blocks/custom-blocks/sdk/src/bridge/hostState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAA;AACtF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4DAA4D,CAAA;AAClG,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"hostState.d.ts","sourceRoot":"","sources":["../../../../home/runner/work/custom-blocks/custom-blocks/sdk/src/bridge/hostState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAA;AACtF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4DAA4D,CAAA;AAClG,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gEAAgE,CAAA;AAEhH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gEAAgE,CAAA;AAC1G,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAA;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c,CAAC,EAAE,MAAM,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,wBAAgB,+BAA+B,IAAI,oBAAoB,CAMtE;AAED;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG;IACjC,KAAK,EAAE,oBAAoB,EAAE,CAAA;IAC7B,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,kBAAkB,CAAC,CAAA;IACvD,mBAAmB,EAAE;QAAE,CAAC,UAAU,EAAE,MAAM,GAAG,oBAAoB,CAAA;KAAE,CAAA;IACnE,gBAAgB,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;KAAE,CAAA;IACvD,oBAAoB,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB,GAAG,SAAS,CAAA;KAAE,CAAA;IACzE,SAAS,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,mCAAmC,CAAA;CAC3C,CAAA;AAWD;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,IAAI,EAAE;IAC3C,UAAU,EAAE,gBAAgB,CAAA;IAC5B,MAAM,EAAE,YAAY,CAAA;IACpB,cAAc,EAAE,8BAA8B,CAAA;CAC9C,KAAK,OAAO,CAAC,gCAAgC,CAAC,CAAA;AAE/C,wBAAgB,sBAAsB,CACrC,SAAS,EAAE,oBAAoB,EAC/B,GAAG,EAAE,MAAM,EACX,oBAAoB,EAAE,sBAAsB,GAC1C,mBAAmB,CAgErB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export type { NotionContrastMode } from "./protocol/contrast.js";
|
|
10
10
|
export type { NotionCollectionSchema, NotionDataSource, } from "./protocol/dataSources/dataSource.js";
|
|
11
|
-
export type { NotionDataSourcePage, NotionDataSourcePageUpdateArgs, NotionDataSourcePageUpdateInput, NotionDataSourcePageUpdateResult, } from "./protocol/dataSources/dataSourcePage.js";
|
|
12
11
|
export type { NotionDataSourceValue } from "./protocol/dataSources/dataSourceValue.js";
|
|
13
12
|
export type { NotionDate, NotionDateRange, NotionDateReminder, NotionDateTime, NotionDateTimeRange, NotionDateTimeReminder, NotionDateValue, NotionNoReminder, NotionTimeReminder, } from "./protocol/dataSources/dateValue.js";
|
|
14
13
|
export type { CustomBlockDataSourceResolutionErrorCode, CustomBlockDataSourceResolutionErrorInfo, CustomBlockPropertyErrorCode, CustomBlockPropertyErrorInfo, } from "./protocol/dataSources/errors.js";
|
|
@@ -27,7 +26,7 @@ export { CustomBlockInitializationError } from "./protocol/messages/init.js";
|
|
|
27
26
|
export type { CustomBlockListUsersErrorCode, CustomBlockListUsersErrorInfo, } from "./protocol/messages/listUsers.js";
|
|
28
27
|
export type { CustomBlockQueryDataSourceErrorCode, CustomBlockQueryDataSourceErrorInfo, } from "./protocol/messages/queryDataSourceResult.js";
|
|
29
28
|
export type { CustomBlockUpdatePageErrorCode, CustomBlockUpdatePageErrorInfo, } from "./protocol/messages/updatePageResult.js";
|
|
30
|
-
export type { NotionPage, NotionPageCover, NotionPageIcon, NotionPageId,
|
|
29
|
+
export type { NotionPage, NotionPageCover, NotionPageIcon, NotionPageId, NotionPagePropertyValue, NotionPagePropertyWriteMap, } from "./protocol/pages/page.js";
|
|
31
30
|
export type { NotionParent } from "./protocol/parent.js";
|
|
32
31
|
export type { NotionTheme } from "./protocol/theme.js";
|
|
33
32
|
export { pages, users } from "./bridge/sandboxClient.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../home/runner/work/custom-blocks/custom-blocks/sdk/src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,YAAY,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAA;AACtF,YAAY,EACX,sBAAsB,EACtB,gBAAgB,GAChB,MAAM,4DAA4D,CAAA;AACnE,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../home/runner/work/custom-blocks/custom-blocks/sdk/src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,YAAY,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAA;AACtF,YAAY,EACX,sBAAsB,EACtB,gBAAgB,GAChB,MAAM,4DAA4D,CAAA;AACnE,YAAY,EAAE,qBAAqB,EAAE,MAAM,iEAAiE,CAAA;AAC5G,YAAY,EACX,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,sBAAsB,EACtB,eAAe,EACf,gBAAgB,EAChB,kBAAkB,GAClB,MAAM,2DAA2D,CAAA;AAClE,YAAY,EACX,wCAAwC,EACxC,wCAAwC,EACxC,4BAA4B,EAC5B,4BAA4B,GAC5B,MAAM,wDAAwD,CAAA;AAC/D,YAAY,EACX,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,GACjB,MAAM,gEAAgE,CAAA;AACvE,OAAO,EACN,2BAA2B,EAC3B,qBAAqB,GACrB,MAAM,gEAAgE,CAAA;AACvE,YAAY,EAAE,mBAAmB,EAAE,MAAM,+DAA+D,CAAA;AACxG,YAAY,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAA;AACtF,YAAY,EACX,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,aAAa,GACb,MAAM,yCAAyC,CAAA;AAChD,YAAY,EACX,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,GAChB,MAAM,8CAA8C,CAAA;AACrD,YAAY,EAAE,wBAAwB,EAAE,MAAM,yDAAyD,CAAA;AACvG,YAAY,EACX,8BAA8B,EAC9B,8BAA8B,GAC9B,MAAM,+DAA+D,CAAA;AACtE,YAAY,EACX,2BAA2B,EAC3B,2BAA2B,GAC3B,MAAM,sDAAsD,CAAA;AAC7D,YAAY,EACX,2BAA2B,EAC3B,2BAA2B,GAC3B,MAAM,sDAAsD,CAAA;AAC7D,YAAY,EACX,kCAAkC,EAClC,kCAAkC,GAClC,MAAM,mDAAmD,CAAA;AAC1D,OAAO,EAAE,8BAA8B,EAAE,MAAM,mDAAmD,CAAA;AAClG,YAAY,EACX,6BAA6B,EAC7B,6BAA6B,GAC7B,MAAM,wDAAwD,CAAA;AAC/D,YAAY,EACX,mCAAmC,EACnC,mCAAmC,GACnC,MAAM,oEAAoE,CAAA;AAC3E,YAAY,EACX,8BAA8B,EAC9B,8BAA8B,GAC9B,MAAM,+DAA+D,CAAA;AACtE,YAAY,EACX,UAAU,EACV,eAAe,EACf,cAAc,EACd,YAAY,EACZ,uBAAuB,EACvB,0BAA0B,GAC1B,MAAM,gDAAgD,CAAA;AACvD,YAAY,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAA;AAC9E,YAAY,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAA;AAC5E,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACrE,OAAO,EACN,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,eAAe,EACf,gBAAgB,GAChB,MAAM,WAAW,CAAA;AAClB,cAAc,YAAY,CAAA"}
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
import type { CustomBlockUpdatePageErrorInfo } from "../messages/updatePageResult.js";
|
|
3
|
-
import type { NotionPage, NotionPageCover, NotionPageIcon, NotionPageId, NotionPagePropertyInputMap } from "../pages/page.js";
|
|
4
|
-
import { type NotionDataSourceValue } from "./dataSourceValue.js";
|
|
5
2
|
/**
|
|
6
3
|
* Bridge shape for a data source page, as parsed from inbound host messages. The host keys
|
|
7
4
|
* properties by raw property ID. The four built-ins (`created_time`, `last_edited_time`,
|
|
8
5
|
* `created_by`, `last_edited_by`) are normally present, possibly with `undefined` values.
|
|
9
|
-
*
|
|
10
|
-
* Internal to the SDK. The consumer-facing shape is {@link NotionDataSourcePage}.
|
|
11
6
|
*/
|
|
12
7
|
export declare const notionDataSourcePageBridgeSchema: v.ObjectSchema<{
|
|
13
|
-
readonly id: v.CustomSchema<NotionPageId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
8
|
+
readonly id: v.CustomSchema<import("../ids.js").NotionPageId, v.ErrorMessage<v.CustomIssue> | undefined>;
|
|
14
9
|
readonly propertiesById: v.RecordSchema<v.StringSchema<undefined>, v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>, v.BooleanSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
15
10
|
readonly type: v.LiteralSchema<"date", undefined>;
|
|
16
11
|
readonly start_date: v.StringSchema<undefined>;
|
|
@@ -75,50 +70,4 @@ export declare const notionDataSourcePageBridgeSchema: v.ObjectSchema<{
|
|
|
75
70
|
}, undefined>;
|
|
76
71
|
/** Internal SDK type for a parsed bridge page. */
|
|
77
72
|
export type NotionDataSourcePageBridge = v.InferOutput<typeof notionDataSourcePageBridgeSchema>;
|
|
78
|
-
export type NotionDataSourcePageUpdateArgs = {
|
|
79
|
-
properties?: NotionPagePropertyInputMap;
|
|
80
|
-
icon?: NotionPageIcon;
|
|
81
|
-
cover?: NotionPageCover;
|
|
82
|
-
archived?: boolean;
|
|
83
|
-
};
|
|
84
|
-
/**
|
|
85
|
-
* @deprecated Use `NotionDataSourcePageUpdateArgs` instead.
|
|
86
|
-
*
|
|
87
|
-
* TODO(custom-blocks): Remove this alias when bumping the SDK version to 0.2.0.
|
|
88
|
-
*/
|
|
89
|
-
export type NotionDataSourcePageUpdateInput = NotionDataSourcePageUpdateArgs;
|
|
90
|
-
export type NotionDataSourcePageUpdateResult = {
|
|
91
|
-
status: "success";
|
|
92
|
-
page: NotionPage;
|
|
93
|
-
} | {
|
|
94
|
-
status: "error";
|
|
95
|
-
error: CustomBlockUpdatePageErrorInfo;
|
|
96
|
-
};
|
|
97
|
-
/**
|
|
98
|
-
* Consumer-facing page shape returned from {@link useDataSource}. Derived from the bridge payload
|
|
99
|
-
* plus the data source's `propertyIdsByKey`.
|
|
100
|
-
*/
|
|
101
|
-
export type NotionDataSourcePage = {
|
|
102
|
-
id: NotionPageId;
|
|
103
|
-
/**
|
|
104
|
-
* Keyed mapping of raw property IDs to their value. Includes all properties on the data source,
|
|
105
|
-
* including the four built-ins (`created_time`, `last_edited_time`, `created_by`,
|
|
106
|
-
* `last_edited_by`).
|
|
107
|
-
*/
|
|
108
|
-
propertiesById: {
|
|
109
|
-
[propertyId: string]: NotionDataSourceValue | undefined;
|
|
110
|
-
};
|
|
111
|
-
/**
|
|
112
|
-
* Keyed mapping of user-defined keys to their value. Only includes properties that are mapped
|
|
113
|
-
* to a raw property ID in the data source's `propertyIdsByKey`.
|
|
114
|
-
*/
|
|
115
|
-
propertiesByKey: {
|
|
116
|
-
[key: string]: NotionDataSourceValue | undefined;
|
|
117
|
-
};
|
|
118
|
-
/**
|
|
119
|
-
* Updates this page using the data source's property-key bindings. The SDK resolves property
|
|
120
|
-
* keys to raw property IDs before sending the bridge message to the host.
|
|
121
|
-
*/
|
|
122
|
-
update: (args: NotionDataSourcePageUpdateArgs) => Promise<NotionDataSourcePageUpdateResult>;
|
|
123
|
-
};
|
|
124
73
|
//# sourceMappingURL=dataSourcePage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataSourcePage.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/custom-blocks/custom-blocks/protocol/src/dataSources/dataSourcePage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"dataSourcePage.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/custom-blocks/custom-blocks/protocol/src/dataSources/dataSourcePage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAI5B;;;;GAIG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAG3C,CAAA;AAEF,kDAAkD;AAClD,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,WAAW,CACrD,OAAO,gCAAgC,CACvC,CAAA"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
2
|
import { notionPageIdSchema } from "../ids.js";
|
|
3
|
-
import { notionDataSourceValueSchema
|
|
3
|
+
import { notionDataSourceValueSchema } from "./dataSourceValue.js";
|
|
4
4
|
/**
|
|
5
5
|
* Bridge shape for a data source page, as parsed from inbound host messages. The host keys
|
|
6
6
|
* properties by raw property ID. The four built-ins (`created_time`, `last_edited_time`,
|
|
7
7
|
* `created_by`, `last_edited_by`) are normally present, possibly with `undefined` values.
|
|
8
|
-
*
|
|
9
|
-
* Internal to the SDK. The consumer-facing shape is {@link NotionDataSourcePage}.
|
|
10
8
|
*/
|
|
11
9
|
export const notionDataSourcePageBridgeSchema = v.object({
|
|
12
10
|
id: notionPageIdSchema,
|
|
@@ -281,20 +281,6 @@ export declare const notionPagePropertyValueSchema: v.VariantSchema<"type", [v.O
|
|
|
281
281
|
readonly id: v.StringSchema<undefined>;
|
|
282
282
|
}, undefined>], undefined>;
|
|
283
283
|
export type NotionPagePropertyValue = v.InferOutput<typeof notionPagePropertyValueSchema>;
|
|
284
|
-
type WithOptionalPropertyId<T> = T extends {
|
|
285
|
-
id: string;
|
|
286
|
-
} ? Omit<T, "id"> & {
|
|
287
|
-
id?: string;
|
|
288
|
-
} : never;
|
|
289
|
-
/**
|
|
290
|
-
* Public SDK page property write input. Keys may be raw property IDs or data source
|
|
291
|
-
* property keys. `id` is optional because the SDK resolves the final raw property ID
|
|
292
|
-
* from the map key before sending the bridge message.
|
|
293
|
-
*/
|
|
294
|
-
export type NotionPagePropertyInputValue = WithOptionalPropertyId<NotionPagePropertyValue>;
|
|
295
|
-
export type NotionPagePropertyInputMap = {
|
|
296
|
-
[propertyIdOrKey: string]: NotionPagePropertyInputValue;
|
|
297
|
-
};
|
|
298
284
|
export declare const notionPagePropertyWriteMapSchema: v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
299
285
|
readonly type: v.LiteralSchema<"title", undefined>;
|
|
300
286
|
readonly title: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/custom-blocks/custom-blocks/protocol/src/pages/page.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAI5B,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAE7C;;GAEG;AACH,eAAO,MAAM,qBAAqB;;IAEjC;;;;OAIG;;;;;;;;;;;;;;;;;aAEF,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE,eAAO,MAAM,qBAAqB;;;aAGhC,CAAA;AACF,eAAO,MAAM,2BAA2B;;;;;;;aAOtC,CAAA;AACF,eAAO,MAAM,wBAAwB;;;;;aAGnC,CAAA;AACF,eAAO,MAAM,sBAAsB;;;;;;aAMjC,CAAA;AAGF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;0BAK/B,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE,eAAO,MAAM,qBAAqB;;;;;;;;;;;0BAGhC,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAA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|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/custom-blocks/custom-blocks/protocol/src/pages/page.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAI5B,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAE7C;;GAEG;AACH,eAAO,MAAM,qBAAqB;;IAEjC;;;;OAIG;;;;;;;;;;;;;;;;;aAEF,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE,eAAO,MAAM,qBAAqB;;;aAGhC,CAAA;AACF,eAAO,MAAM,2BAA2B;;;;;;;aAOtC,CAAA;AACF,eAAO,MAAM,wBAAwB;;;;;aAGnC,CAAA;AACF,eAAO,MAAM,sBAAsB;;;;;;aAMjC,CAAA;AAGF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;0BAK/B,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE,eAAO,MAAM,qBAAqB;;;;;;;;;;;0BAGhC,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAIzE,QAAA,MAAM,wBAAwB,uEAAoC,CAAA;AAClE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAE/E,QAAA,MAAM,6BAA6B;;;;;;;;;;0BAajC,CAAA;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,WAAW,CAClD,OAAO,6BAA6B,CACpC,CAAA;AAED,QAAA,MAAM,qBAAqB;;;;aAIzB,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE,QAAA,MA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAY3B,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,gBAAgB,CAAC,CAAA"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { NotionCollectionSchema } from "./protocol/dataSources/dataSource.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { NotionDataSourceValue } from "./protocol/dataSources/dataSourceValue.js";
|
|
3
3
|
import type { NotionPropertySchema } from "./protocol/dataSources/propertySchema.js";
|
|
4
|
-
import type { NotionDataSourceId } from "./protocol/ids.js";
|
|
4
|
+
import type { NotionDataSourceId, NotionPageId } from "./protocol/ids.js";
|
|
5
5
|
import type { NotionCreatePagePosition } from "./protocol/messages/createPage.js";
|
|
6
6
|
import type { CustomBlockCreatePageErrorInfo } from "./protocol/messages/createPageResult.js";
|
|
7
7
|
import type { CustomBlockGetPageErrorInfo } from "./protocol/messages/getPage.js";
|
|
@@ -10,14 +10,72 @@ import type { CustomBlockListUsersErrorInfo, ListUsersMessage } from "./protocol
|
|
|
10
10
|
import type { CustomBlockQueryDataSourceErrorInfo } from "./protocol/messages/queryDataSourceResult.js";
|
|
11
11
|
import type { UpdatePageMessage } from "./protocol/messages/updatePage.js";
|
|
12
12
|
import type { CustomBlockUpdatePageErrorInfo } from "./protocol/messages/updatePageResult.js";
|
|
13
|
-
import type { NotionPage,
|
|
13
|
+
import type { NotionPage, NotionPageCover, NotionPageIcon, NotionPagePropertyValue } from "./protocol/pages/page.js";
|
|
14
14
|
import type { NotionUser, NotionUserList } from "./protocol/users/user.js";
|
|
15
|
-
export type { NotionDataSourcePageUpdateArgs, NotionDataSourcePageUpdateInput, NotionDataSourcePageUpdateResult, } from "./protocol/dataSources/dataSourcePage.js";
|
|
16
15
|
export type { CustomBlockErrorInfo } from "./protocol/errors.js";
|
|
17
|
-
export type { NotionDataSourceId, NotionSpaceId, } from "./protocol/ids.js";
|
|
18
|
-
export type { NotionPageId } from "./protocol/pages/page.js";
|
|
16
|
+
export type { NotionDataSourceId, NotionPageId, NotionSpaceId, } from "./protocol/ids.js";
|
|
19
17
|
export type { NotionUser, NotionUserId, NotionUserList, } from "./protocol/users/user.js";
|
|
20
18
|
export type { CustomBlockCreatePageErrorInfo, CustomBlockGetPageErrorInfo, CustomBlockGetUserErrorInfo, CustomBlockListUsersErrorInfo, CustomBlockQueryDataSourceErrorInfo, CustomBlockUpdatePageErrorInfo, };
|
|
19
|
+
type WithOptionalPropertyId<T> = T extends {
|
|
20
|
+
id: string;
|
|
21
|
+
} ? Omit<T, "id"> & {
|
|
22
|
+
id?: string;
|
|
23
|
+
} : never;
|
|
24
|
+
/**
|
|
25
|
+
* Public SDK page property write input. Keys may be raw property IDs or data source
|
|
26
|
+
* property keys. `id` is optional because the SDK resolves the final raw property ID
|
|
27
|
+
* from the map key before sending the bridge message.
|
|
28
|
+
*/
|
|
29
|
+
export type NotionPagePropertyInputValue = WithOptionalPropertyId<NotionPagePropertyValue>;
|
|
30
|
+
export type NotionPagePropertyInputMap = {
|
|
31
|
+
[propertyIdOrKey: string]: NotionPagePropertyInputValue;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Consumer-facing page shape returned from `useDataSource`. Derived from the bridge payload
|
|
35
|
+
* plus the data source's `propertyIdsByKey`.
|
|
36
|
+
*/
|
|
37
|
+
export type NotionDataSourcePage = {
|
|
38
|
+
id: NotionPageId;
|
|
39
|
+
/**
|
|
40
|
+
* Keyed mapping of raw property IDs to their value. Includes all properties on the data source,
|
|
41
|
+
* including the four built-ins (`created_time`, `last_edited_time`, `created_by`,
|
|
42
|
+
* `last_edited_by`).
|
|
43
|
+
*/
|
|
44
|
+
propertiesById: {
|
|
45
|
+
[propertyId: string]: NotionDataSourceValue | undefined;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Keyed mapping of user-defined keys to their value. Only includes properties that are mapped
|
|
49
|
+
* to a raw property ID in the data source's `propertyIdsByKey`.
|
|
50
|
+
*/
|
|
51
|
+
propertiesByKey: {
|
|
52
|
+
[key: string]: NotionDataSourceValue | undefined;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Updates this page using the data source's property-key bindings. The SDK resolves property
|
|
56
|
+
* keys to raw property IDs before sending the bridge message to the host.
|
|
57
|
+
*/
|
|
58
|
+
update: (args: NotionDataSourcePageUpdateArgs) => Promise<NotionDataSourcePageUpdateResult>;
|
|
59
|
+
};
|
|
60
|
+
export type NotionDataSourcePageUpdateArgs = {
|
|
61
|
+
properties?: NotionPagePropertyInputMap;
|
|
62
|
+
icon?: NotionPageIcon;
|
|
63
|
+
cover?: NotionPageCover;
|
|
64
|
+
archived?: boolean;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* @deprecated Use `NotionDataSourcePageUpdateArgs` instead.
|
|
68
|
+
*
|
|
69
|
+
* TODO(custom-blocks): Remove this alias when bumping the SDK version to 0.2.0.
|
|
70
|
+
*/
|
|
71
|
+
export type NotionDataSourcePageUpdateInput = NotionDataSourcePageUpdateArgs;
|
|
72
|
+
export type NotionDataSourcePageUpdateResult = {
|
|
73
|
+
status: "success";
|
|
74
|
+
page: NotionPage;
|
|
75
|
+
} | {
|
|
76
|
+
status: "error";
|
|
77
|
+
error: CustomBlockUpdatePageErrorInfo;
|
|
78
|
+
};
|
|
21
79
|
/**
|
|
22
80
|
* Return shape of `useDataSource`.
|
|
23
81
|
*
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../home/runner/work/custom-blocks/custom-blocks/sdk/src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4DAA4D,CAAA;AACxG,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","s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3
|
NotionDataSource,
|
|
4
4
|
NotionDataSourceBindings,
|
|
5
5
|
} from "@notionhq/custom-blocks-protocol/dataSources/dataSource.js"
|
|
6
|
-
import type {
|
|
7
|
-
NotionDataSourcePageUpdateArgs,
|
|
8
|
-
NotionDataSourcePageUpdateResult,
|
|
9
|
-
} from "@notionhq/custom-blocks-protocol/dataSources/dataSourcePage.js"
|
|
10
6
|
import { readIncomingType } from "@notionhq/custom-blocks-protocol/incomingType.js"
|
|
11
7
|
import type { CustomBlockManifest } from "@notionhq/custom-blocks-protocol/manifest.js"
|
|
12
8
|
import type { ConnectMessage } from "@notionhq/custom-blocks-protocol/messages/connect.js"
|
|
@@ -42,6 +38,8 @@ import type {
|
|
|
42
38
|
GetUserResult,
|
|
43
39
|
ListUsersArgs,
|
|
44
40
|
ListUsersResult,
|
|
41
|
+
NotionDataSourcePageUpdateArgs,
|
|
42
|
+
NotionDataSourcePageUpdateResult,
|
|
45
43
|
NotionPageId,
|
|
46
44
|
NotionUserId,
|
|
47
45
|
UpdatePageArgs,
|
|
@@ -3,12 +3,10 @@ import type {
|
|
|
3
3
|
CustomBlockPropertyErrorCode,
|
|
4
4
|
CustomBlockPropertyErrorInfo,
|
|
5
5
|
} from "@notionhq/custom-blocks-protocol/dataSources/errors.js"
|
|
6
|
-
import type {
|
|
7
|
-
NotionPagePropertyInputMap,
|
|
8
|
-
NotionPagePropertyWriteMap,
|
|
9
|
-
} from "@notionhq/custom-blocks-protocol/pages/page.js"
|
|
6
|
+
import type { NotionPagePropertyWriteMap } from "@notionhq/custom-blocks-protocol/pages/page.js"
|
|
10
7
|
import { notionPagePropertyValueSchema } from "@notionhq/custom-blocks-protocol/pages/page.js"
|
|
11
8
|
import * as v from "valibot"
|
|
9
|
+
import type { NotionPagePropertyInputMap } from "../../types.js"
|
|
12
10
|
|
|
13
11
|
export type {
|
|
14
12
|
CustomBlockPropertyErrorCode,
|
package/src/bridge/hostState.ts
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import type { NotionContrastMode } from "@notionhq/custom-blocks-protocol/contrast.js"
|
|
2
2
|
import type { NotionDataSource } from "@notionhq/custom-blocks-protocol/dataSources/dataSource.js"
|
|
3
|
-
import type {
|
|
4
|
-
NotionDataSourcePage,
|
|
5
|
-
NotionDataSourcePageBridge,
|
|
6
|
-
NotionDataSourcePageUpdateArgs,
|
|
7
|
-
NotionDataSourcePageUpdateResult,
|
|
8
|
-
} from "@notionhq/custom-blocks-protocol/dataSources/dataSourcePage.js"
|
|
3
|
+
import type { NotionDataSourcePageBridge } from "@notionhq/custom-blocks-protocol/dataSources/dataSourcePage.js"
|
|
9
4
|
import type { NotionDataSourceValue } from "@notionhq/custom-blocks-protocol/dataSources/dataSourceValue.js"
|
|
10
5
|
import type { NotionPropertySchema } from "@notionhq/custom-blocks-protocol/dataSources/propertySchema.js"
|
|
11
6
|
import type { NotionBlockId } from "@notionhq/custom-blocks-protocol/ids.js"
|
|
@@ -18,6 +13,11 @@ import type {
|
|
|
18
13
|
import type { NotionParent } from "@notionhq/custom-blocks-protocol/parent.js"
|
|
19
14
|
import type { NotionTheme } from "@notionhq/custom-blocks-protocol/theme.js"
|
|
20
15
|
import type { NotionUser } from "@notionhq/custom-blocks-protocol/users/user.js"
|
|
16
|
+
import type {
|
|
17
|
+
NotionDataSourcePage,
|
|
18
|
+
NotionDataSourcePageUpdateArgs,
|
|
19
|
+
NotionDataSourcePageUpdateResult,
|
|
20
|
+
} from "../types.js"
|
|
21
21
|
|
|
22
22
|
export type CustomBlockHostState = UninitializedHostState | InitializedHostState
|
|
23
23
|
|
package/src/index.ts
CHANGED
|
@@ -12,12 +12,6 @@ export type {
|
|
|
12
12
|
NotionCollectionSchema,
|
|
13
13
|
NotionDataSource,
|
|
14
14
|
} from "@notionhq/custom-blocks-protocol/dataSources/dataSource.js"
|
|
15
|
-
export type {
|
|
16
|
-
NotionDataSourcePage,
|
|
17
|
-
NotionDataSourcePageUpdateArgs,
|
|
18
|
-
NotionDataSourcePageUpdateInput,
|
|
19
|
-
NotionDataSourcePageUpdateResult,
|
|
20
|
-
} from "@notionhq/custom-blocks-protocol/dataSources/dataSourcePage.js"
|
|
21
15
|
export type { NotionDataSourceValue } from "@notionhq/custom-blocks-protocol/dataSources/dataSourceValue.js"
|
|
22
16
|
export type {
|
|
23
17
|
NotionDate,
|
|
@@ -98,8 +92,6 @@ export type {
|
|
|
98
92
|
NotionPageCover,
|
|
99
93
|
NotionPageIcon,
|
|
100
94
|
NotionPageId,
|
|
101
|
-
NotionPagePropertyInputMap,
|
|
102
|
-
NotionPagePropertyInputValue,
|
|
103
95
|
NotionPagePropertyValue,
|
|
104
96
|
NotionPagePropertyWriteMap,
|
|
105
97
|
} from "@notionhq/custom-blocks-protocol/pages/page.js"
|
package/src/types.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { NotionCollectionSchema } from "@notionhq/custom-blocks-protocol/dataSources/dataSource.js"
|
|
2
|
-
import type {
|
|
2
|
+
import type { NotionDataSourceValue } from "@notionhq/custom-blocks-protocol/dataSources/dataSourceValue.js"
|
|
3
3
|
import type { NotionPropertySchema } from "@notionhq/custom-blocks-protocol/dataSources/propertySchema.js"
|
|
4
|
-
import type {
|
|
4
|
+
import type {
|
|
5
|
+
NotionDataSourceId,
|
|
6
|
+
NotionPageId,
|
|
7
|
+
} from "@notionhq/custom-blocks-protocol/ids.js"
|
|
5
8
|
import type { NotionCreatePagePosition } from "@notionhq/custom-blocks-protocol/messages/createPage.js"
|
|
6
9
|
import type { CustomBlockCreatePageErrorInfo } from "@notionhq/custom-blocks-protocol/messages/createPageResult.js"
|
|
7
10
|
import type { CustomBlockGetPageErrorInfo } from "@notionhq/custom-blocks-protocol/messages/getPage.js"
|
|
@@ -15,25 +18,21 @@ import type { UpdatePageMessage } from "@notionhq/custom-blocks-protocol/message
|
|
|
15
18
|
import type { CustomBlockUpdatePageErrorInfo } from "@notionhq/custom-blocks-protocol/messages/updatePageResult.js"
|
|
16
19
|
import type {
|
|
17
20
|
NotionPage,
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
NotionPageCover,
|
|
22
|
+
NotionPageIcon,
|
|
23
|
+
NotionPagePropertyValue,
|
|
20
24
|
} from "@notionhq/custom-blocks-protocol/pages/page.js"
|
|
21
25
|
import type {
|
|
22
26
|
NotionUser,
|
|
23
27
|
NotionUserList,
|
|
24
28
|
} from "@notionhq/custom-blocks-protocol/users/user.js"
|
|
25
29
|
|
|
26
|
-
export type {
|
|
27
|
-
NotionDataSourcePageUpdateArgs,
|
|
28
|
-
NotionDataSourcePageUpdateInput,
|
|
29
|
-
NotionDataSourcePageUpdateResult,
|
|
30
|
-
} from "@notionhq/custom-blocks-protocol/dataSources/dataSourcePage.js"
|
|
31
30
|
export type { CustomBlockErrorInfo } from "@notionhq/custom-blocks-protocol/errors.js"
|
|
32
31
|
export type {
|
|
33
32
|
NotionDataSourceId,
|
|
33
|
+
NotionPageId,
|
|
34
34
|
NotionSpaceId,
|
|
35
35
|
} from "@notionhq/custom-blocks-protocol/ids.js"
|
|
36
|
-
export type { NotionPageId } from "@notionhq/custom-blocks-protocol/pages/page.js"
|
|
37
36
|
export type {
|
|
38
37
|
NotionUser,
|
|
39
38
|
NotionUserId,
|
|
@@ -48,6 +47,69 @@ export type {
|
|
|
48
47
|
CustomBlockUpdatePageErrorInfo,
|
|
49
48
|
}
|
|
50
49
|
|
|
50
|
+
type WithOptionalPropertyId<T> = T extends { id: string }
|
|
51
|
+
? Omit<T, "id"> & { id?: string }
|
|
52
|
+
: never
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Public SDK page property write input. Keys may be raw property IDs or data source
|
|
56
|
+
* property keys. `id` is optional because the SDK resolves the final raw property ID
|
|
57
|
+
* from the map key before sending the bridge message.
|
|
58
|
+
*/
|
|
59
|
+
export type NotionPagePropertyInputValue =
|
|
60
|
+
WithOptionalPropertyId<NotionPagePropertyValue>
|
|
61
|
+
|
|
62
|
+
export type NotionPagePropertyInputMap = {
|
|
63
|
+
[propertyIdOrKey: string]: NotionPagePropertyInputValue
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Consumer-facing page shape returned from `useDataSource`. Derived from the bridge payload
|
|
68
|
+
* plus the data source's `propertyIdsByKey`.
|
|
69
|
+
*/
|
|
70
|
+
export type NotionDataSourcePage = {
|
|
71
|
+
id: NotionPageId
|
|
72
|
+
/**
|
|
73
|
+
* Keyed mapping of raw property IDs to their value. Includes all properties on the data source,
|
|
74
|
+
* including the four built-ins (`created_time`, `last_edited_time`, `created_by`,
|
|
75
|
+
* `last_edited_by`).
|
|
76
|
+
*/
|
|
77
|
+
propertiesById: { [propertyId: string]: NotionDataSourceValue | undefined }
|
|
78
|
+
/**
|
|
79
|
+
* Keyed mapping of user-defined keys to their value. Only includes properties that are mapped
|
|
80
|
+
* to a raw property ID in the data source's `propertyIdsByKey`.
|
|
81
|
+
*/
|
|
82
|
+
propertiesByKey: { [key: string]: NotionDataSourceValue | undefined }
|
|
83
|
+
/**
|
|
84
|
+
* Updates this page using the data source's property-key bindings. The SDK resolves property
|
|
85
|
+
* keys to raw property IDs before sending the bridge message to the host.
|
|
86
|
+
*/
|
|
87
|
+
update: (
|
|
88
|
+
args: NotionDataSourcePageUpdateArgs,
|
|
89
|
+
) => Promise<NotionDataSourcePageUpdateResult>
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export type NotionDataSourcePageUpdateArgs = {
|
|
93
|
+
properties?: NotionPagePropertyInputMap
|
|
94
|
+
icon?: NotionPageIcon
|
|
95
|
+
cover?: NotionPageCover
|
|
96
|
+
archived?: boolean
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @deprecated Use `NotionDataSourcePageUpdateArgs` instead.
|
|
101
|
+
*
|
|
102
|
+
* TODO(custom-blocks): Remove this alias when bumping the SDK version to 0.2.0.
|
|
103
|
+
*/
|
|
104
|
+
export type NotionDataSourcePageUpdateInput = NotionDataSourcePageUpdateArgs
|
|
105
|
+
|
|
106
|
+
export type NotionDataSourcePageUpdateResult =
|
|
107
|
+
| {
|
|
108
|
+
status: "success"
|
|
109
|
+
page: NotionPage
|
|
110
|
+
}
|
|
111
|
+
| { status: "error"; error: CustomBlockUpdatePageErrorInfo }
|
|
112
|
+
|
|
51
113
|
/**
|
|
52
114
|
* Return shape of `useDataSource`.
|
|
53
115
|
*
|