@notionhq/custom-blocks-dev-shell 0.1.115 → 0.1.116
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/LICENSE +21 -0
- package/README.md +86 -13
- package/THIRD_PARTY_LICENSES.md +133 -0
- package/dist/assets/index-DSaseWP_.js +11 -0
- package/dist/assets/index-Do-x8yIt.css +2 -0
- package/dist/index.html +2 -2
- package/dist-cli/cli/published-cli.js +8467 -51
- package/docs/bindings.md +17 -12
- package/docs/bridge/changelog.md +67 -0
- package/docs/bridge/protocol.md +204 -0
- package/docs/bridge/versioning.md +38 -0
- package/docs/data-sources.md +49 -36
- package/docs/host/README.md +177 -0
- package/docs/host/docs/compatibility.md +68 -0
- package/docs/host/docs/handlers.md +199 -0
- package/docs/host/docs/lifecycle.md +117 -0
- package/package.json +5 -3
- package/dist/assets/index-DXzPwq_J.js +0 -11
- package/dist/assets/index-E1j3FxAu.css +0 -2
- package/dist-cli/cli/binding-cli-flags.js +0 -33
- package/dist-cli/cli/binding-errors.js +0 -15
- package/dist-cli/cli/block-csp.js +0 -84
- package/dist-cli/cli/build-block-registry.js +0 -30
- package/dist-cli/cli/convert-values.js +0 -222
- package/dist-cli/cli/convert.js +0 -210
- package/dist-cli/cli/data-source-files.js +0 -6
- package/dist-cli/cli/data-sources.js +0 -114
- package/dist-cli/cli/dev-shell-launcher.js +0 -239
- package/dist-cli/cli/dev-shell-run.js +0 -72
- package/dist-cli/cli/errors.js +0 -12
- package/dist-cli/cli/launcher-bindings.js +0 -144
- package/dist-cli/cli/materialize.js +0 -105
- package/dist-cli/cli/ports.js +0 -20
- package/dist-cli/cli/prebuilt.js +0 -23
- package/dist-cli/cli/runtime-error-client.js +0 -52
- package/dist-cli/cli/serve-ui.js +0 -110
- package/dist-cli/cli/shared-server.js +0 -70
- package/dist-cli/cli/utils.js +0 -52
- package/dist-cli/cli/vite-block-server.js +0 -125
- package/dist-cli/cli/vite-middleware.js +0 -111
- package/dist-cli/cli/worker-manifest.js +0 -158
- package/dist-cli/protocol/contrast.d.ts +0 -4
- package/dist-cli/protocol/contrast.js +0 -3
- package/dist-cli/protocol/dataSources/dataSource.d.ts +0 -786
- package/dist-cli/protocol/dataSources/dataSource.js +0 -66
- package/dist-cli/protocol/dataSources/dataSourcePage.d.ts +0 -74
- package/dist-cli/protocol/dataSources/dataSourcePage.js +0 -15
- package/dist-cli/protocol/dataSources/dataSourceValue.d.ts +0 -66
- package/dist-cli/protocol/dataSources/dataSourceValue.js +0 -14
- package/dist-cli/protocol/dataSources/dateValue.d.ts +0 -157
- package/dist-cli/protocol/dataSources/dateValue.js +0 -61
- package/dist-cli/protocol/dataSources/errors.d.ts +0 -8
- package/dist-cli/protocol/dataSources/errors.js +0 -7
- package/dist-cli/protocol/dataSources/propertySchema.d.ts +0 -200
- package/dist-cli/protocol/dataSources/propertySchema.js +0 -174
- package/dist-cli/protocol/dataSources/recordPointer.d.ts +0 -9
- package/dist-cli/protocol/dataSources/recordPointer.js +0 -8
- package/dist-cli/protocol/dataSources/sortDirection.d.ts +0 -3
- package/dist-cli/protocol/dataSources/sortDirection.js +0 -2
- package/dist-cli/protocol/errors.d.ts +0 -12
- package/dist-cli/protocol/errors.js +0 -6
- package/dist-cli/protocol/ids.d.ts +0 -31
- package/dist-cli/protocol/ids.js +0 -26
- package/dist-cli/protocol/index.d.ts +0 -53
- package/dist-cli/protocol/index.js +0 -53
- package/dist-cli/protocol/manifest.d.ts +0 -67
- package/dist-cli/protocol/manifest.js +0 -36
- package/dist-cli/protocol/messages/connect.d.ts +0 -54
- package/dist-cli/protocol/messages/connect.js +0 -39
- package/dist-cli/protocol/messages/contrastModeChanged.d.ts +0 -7
- package/dist-cli/protocol/messages/contrastModeChanged.js +0 -7
- package/dist-cli/protocol/messages/createPage.d.ts +0 -290
- package/dist-cli/protocol/messages/createPage.js +0 -51
- package/dist-cli/protocol/messages/createPageResult.d.ts +0 -897
- package/dist-cli/protocol/messages/createPageResult.js +0 -43
- package/dist-cli/protocol/messages/currentUserChanged.d.ts +0 -18
- package/dist-cli/protocol/messages/currentUserChanged.js +0 -9
- package/dist-cli/protocol/messages/dataSourcesChanged.d.ts +0 -157
- package/dist-cli/protocol/messages/dataSourcesChanged.js +0 -13
- package/dist-cli/protocol/messages/getPage.d.ts +0 -902
- package/dist-cli/protocol/messages/getPage.js +0 -48
- package/dist-cli/protocol/messages/getUser.d.ts +0 -44
- package/dist-cli/protocol/messages/getUser.js +0 -32
- package/dist-cli/protocol/messages/hostToSandbox.d.ts +0 -4385
- package/dist-cli/protocol/messages/hostToSandbox.js +0 -48
- package/dist-cli/protocol/messages/incomingType.d.ts +0 -9
- package/dist-cli/protocol/messages/incomingType.js +0 -17
- package/dist-cli/protocol/messages/init.d.ts +0 -273
- package/dist-cli/protocol/messages/init.js +0 -57
- package/dist-cli/protocol/messages/initResult.d.ts +0 -37
- package/dist-cli/protocol/messages/initResult.js +0 -29
- package/dist-cli/protocol/messages/invalidHostMessage.d.ts +0 -14
- package/dist-cli/protocol/messages/invalidHostMessage.js +0 -13
- package/dist-cli/protocol/messages/invalidSandboxMessage.d.ts +0 -14
- package/dist-cli/protocol/messages/invalidSandboxMessage.js +0 -13
- package/dist-cli/protocol/messages/isInitHandshakeMessage.d.ts +0 -4
- package/dist-cli/protocol/messages/isInitHandshakeMessage.js +0 -11
- package/dist-cli/protocol/messages/listUsers.d.ts +0 -52
- package/dist-cli/protocol/messages/listUsers.js +0 -33
- package/dist-cli/protocol/messages/messagePayload.d.ts +0 -19
- package/dist-cli/protocol/messages/messagePayload.js +0 -1
- package/dist-cli/protocol/messages/openExternalUrl.d.ts +0 -32
- package/dist-cli/protocol/messages/openExternalUrl.js +0 -26
- package/dist-cli/protocol/messages/openPage.d.ts +0 -38
- package/dist-cli/protocol/messages/openPage.js +0 -34
- package/dist-cli/protocol/messages/pageChanged.d.ts +0 -32
- package/dist-cli/protocol/messages/pageChanged.js +0 -9
- package/dist-cli/protocol/messages/parentChanged.d.ts +0 -26
- package/dist-cli/protocol/messages/parentChanged.js +0 -9
- package/dist-cli/protocol/messages/queryDataSource.d.ts +0 -1446
- package/dist-cli/protocol/messages/queryDataSource.js +0 -252
- package/dist-cli/protocol/messages/queryDataSourceResult.d.ts +0 -686
- package/dist-cli/protocol/messages/queryDataSourceResult.js +0 -44
- package/dist-cli/protocol/messages/resize.d.ts +0 -11
- package/dist-cli/protocol/messages/resize.js +0 -10
- package/dist-cli/protocol/messages/sandboxToHost.d.ts +0 -1091
- package/dist-cli/protocol/messages/sandboxToHost.js +0 -33
- package/dist-cli/protocol/messages/themeChanged.d.ts +0 -10
- package/dist-cli/protocol/messages/themeChanged.js +0 -10
- package/dist-cli/protocol/messages/unsubscribeDataSourceQuery.d.ts +0 -10
- package/dist-cli/protocol/messages/unsubscribeDataSourceQuery.js +0 -9
- package/dist-cli/protocol/messages/updatePage.d.ts +0 -271
- package/dist-cli/protocol/messages/updatePage.js +0 -23
- package/dist-cli/protocol/messages/updatePageResult.d.ts +0 -895
- package/dist-cli/protocol/messages/updatePageResult.js +0 -41
- package/dist-cli/protocol/pages/page.d.ts +0 -1422
- package/dist-cli/protocol/pages/page.js +0 -318
- package/dist-cli/protocol/parent.d.ts +0 -32
- package/dist-cli/protocol/parent.js +0 -13
- package/dist-cli/protocol/protocolVersion.d.ts +0 -8
- package/dist-cli/protocol/protocolVersion.js +0 -11
- package/dist-cli/protocol/theme.d.ts +0 -3
- package/dist-cli/protocol/theme.js +0 -2
- package/dist-cli/protocol/users/user.d.ts +0 -32
- package/dist-cli/protocol/users/user.js +0 -20
- package/dist-cli/shared/block-registry.js +0 -28
- package/dist-cli/shared/data-source.js +0 -22
- package/dist-cli/shared/runtime-config.js +0 -10
- package/dist-cli/shared/sample-data-source.js +0 -12
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import * as v from "valibot";
|
|
2
|
-
import { connectMessageSchema } from "./connect.js";
|
|
3
|
-
import { createPageMessageSchema } from "./createPage.js";
|
|
4
|
-
import { getPageMessageSchema } from "./getPage.js";
|
|
5
|
-
import { getUserMessageSchema } from "./getUser.js";
|
|
6
|
-
import { initResultMessageSchema } from "./initResult.js";
|
|
7
|
-
import { invalidHostMessageSchema } from "./invalidHostMessage.js";
|
|
8
|
-
import { listUsersMessageSchema } from "./listUsers.js";
|
|
9
|
-
import { openExternalUrlMessageSchema } from "./openExternalUrl.js";
|
|
10
|
-
import { openPageMessageSchema } from "./openPage.js";
|
|
11
|
-
import { queryDataSourceMessageSchema } from "./queryDataSource.js";
|
|
12
|
-
import { resizeMessageSchema } from "./resize.js";
|
|
13
|
-
import { unsubscribeDataSourceQueryMessageSchema } from "./unsubscribeDataSourceQuery.js";
|
|
14
|
-
import { updatePageMessageSchema } from "./updatePage.js";
|
|
15
|
-
/**
|
|
16
|
-
* Discriminated union of every message the sandbox is allowed to send the host. Useful for hosts
|
|
17
|
-
* to validate inbound traffic from sandboxes without re-implementing validation logic.
|
|
18
|
-
*/
|
|
19
|
-
export const sandboxToHostMessageSchema = v.variant("type", [
|
|
20
|
-
connectMessageSchema,
|
|
21
|
-
initResultMessageSchema,
|
|
22
|
-
queryDataSourceMessageSchema,
|
|
23
|
-
unsubscribeDataSourceQueryMessageSchema,
|
|
24
|
-
createPageMessageSchema,
|
|
25
|
-
getPageMessageSchema,
|
|
26
|
-
getUserMessageSchema,
|
|
27
|
-
listUsersMessageSchema,
|
|
28
|
-
openPageMessageSchema,
|
|
29
|
-
openExternalUrlMessageSchema,
|
|
30
|
-
updatePageMessageSchema,
|
|
31
|
-
resizeMessageSchema,
|
|
32
|
-
invalidHostMessageSchema,
|
|
33
|
-
]);
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as v from "valibot";
|
|
2
|
-
/**
|
|
3
|
-
* Message sent by the host every time the theme changes after the initial
|
|
4
|
-
* `init` handshake.
|
|
5
|
-
*/
|
|
6
|
-
export declare const themeChangedMessageSchema: v.ObjectSchema<{
|
|
7
|
-
readonly type: v.LiteralSchema<"themeChanged", undefined>;
|
|
8
|
-
readonly theme: v.PicklistSchema<["light", "dark"], undefined>;
|
|
9
|
-
}, undefined>;
|
|
10
|
-
export type ThemeChangedMessage = v.InferOutput<typeof themeChangedMessageSchema>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as v from "valibot";
|
|
2
|
-
import { notionThemeSchema } from "../theme.js";
|
|
3
|
-
/**
|
|
4
|
-
* Message sent by the host every time the theme changes after the initial
|
|
5
|
-
* `init` handshake.
|
|
6
|
-
*/
|
|
7
|
-
export const themeChangedMessageSchema = v.object({
|
|
8
|
-
type: v.literal("themeChanged"),
|
|
9
|
-
theme: notionThemeSchema,
|
|
10
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as v from "valibot";
|
|
2
|
-
/**
|
|
3
|
-
* Tells the host to stop an active data source query subscription.
|
|
4
|
-
*/
|
|
5
|
-
export declare const unsubscribeDataSourceQueryMessageSchema: v.ObjectSchema<{
|
|
6
|
-
readonly type: v.LiteralSchema<"unsubscribeDataSourceQuery", undefined>;
|
|
7
|
-
/** The subscription to remove from the host. */
|
|
8
|
-
readonly subscriptionId: v.StringSchema<undefined>;
|
|
9
|
-
}, undefined>;
|
|
10
|
-
export type UnsubscribeDataSourceQueryMessage = v.InferOutput<typeof unsubscribeDataSourceQueryMessageSchema>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as v from "valibot";
|
|
2
|
-
/**
|
|
3
|
-
* Tells the host to stop an active data source query subscription.
|
|
4
|
-
*/
|
|
5
|
-
export const unsubscribeDataSourceQueryMessageSchema = v.object({
|
|
6
|
-
type: v.literal("unsubscribeDataSourceQuery"),
|
|
7
|
-
/** The subscription to remove from the host. */
|
|
8
|
-
subscriptionId: v.string(),
|
|
9
|
-
});
|
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
import * as v from "valibot";
|
|
2
|
-
/**
|
|
3
|
-
* The sandbox sends this message to patch a page.
|
|
4
|
-
*/
|
|
5
|
-
export declare const updatePageMessageSchema: v.ObjectSchema<{
|
|
6
|
-
readonly type: v.LiteralSchema<"updatePage", undefined>;
|
|
7
|
-
readonly requestId: v.StringSchema<undefined>;
|
|
8
|
-
readonly pageId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
|
|
9
|
-
readonly dataSourceId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionDataSourceId">]>, undefined>;
|
|
10
|
-
/**
|
|
11
|
-
* Property values, keyed by raw property IDs from Notion.
|
|
12
|
-
*
|
|
13
|
-
* Each value must carry the same raw property ID in its `id` field.
|
|
14
|
-
* To update a page with manifest-defined property keys, call `row.update()` on a row returned
|
|
15
|
-
* by `useDataSource()`. The SDK resolves those keys before it sends this message.
|
|
16
|
-
*/
|
|
17
|
-
readonly properties: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
18
|
-
readonly id: v.StringSchema<undefined>;
|
|
19
|
-
readonly type: v.LiteralSchema<"title", undefined>;
|
|
20
|
-
readonly title: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
21
|
-
}, undefined>, v.ObjectSchema<{
|
|
22
|
-
readonly id: v.StringSchema<undefined>;
|
|
23
|
-
readonly type: v.LiteralSchema<"rich_text", undefined>;
|
|
24
|
-
readonly rich_text: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
25
|
-
}, undefined>, v.ObjectSchema<{
|
|
26
|
-
readonly id: v.StringSchema<undefined>;
|
|
27
|
-
readonly type: v.LiteralSchema<"number", undefined>;
|
|
28
|
-
readonly number: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
29
|
-
}, undefined>, v.ObjectSchema<{
|
|
30
|
-
readonly id: v.StringSchema<undefined>;
|
|
31
|
-
readonly type: v.LiteralSchema<"url", undefined>;
|
|
32
|
-
readonly url: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
33
|
-
}, undefined>, v.ObjectSchema<{
|
|
34
|
-
readonly id: v.StringSchema<undefined>;
|
|
35
|
-
readonly type: v.LiteralSchema<"email", undefined>;
|
|
36
|
-
readonly email: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
37
|
-
}, undefined>, v.ObjectSchema<{
|
|
38
|
-
readonly id: v.StringSchema<undefined>;
|
|
39
|
-
readonly type: v.LiteralSchema<"phone_number", undefined>;
|
|
40
|
-
readonly phone_number: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
41
|
-
}, undefined>, v.ObjectSchema<{
|
|
42
|
-
readonly id: v.StringSchema<undefined>;
|
|
43
|
-
readonly type: v.LiteralSchema<"checkbox", undefined>;
|
|
44
|
-
readonly checkbox: v.BooleanSchema<undefined>;
|
|
45
|
-
}, undefined>, v.ObjectSchema<{
|
|
46
|
-
readonly id: v.StringSchema<undefined>;
|
|
47
|
-
readonly type: v.LiteralSchema<"select", undefined>;
|
|
48
|
-
readonly select: v.NullableSchema<v.UnionSchema<[v.ObjectSchema<{
|
|
49
|
-
readonly id: v.StringSchema<undefined>;
|
|
50
|
-
readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
51
|
-
readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
52
|
-
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
53
|
-
}, undefined>, v.ObjectSchema<{
|
|
54
|
-
readonly name: v.StringSchema<undefined>;
|
|
55
|
-
readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
56
|
-
readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
57
|
-
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
58
|
-
}, undefined>], undefined>, undefined>;
|
|
59
|
-
}, undefined>, v.ObjectSchema<{
|
|
60
|
-
readonly id: v.StringSchema<undefined>;
|
|
61
|
-
readonly type: v.LiteralSchema<"status", undefined>;
|
|
62
|
-
readonly status: v.NullableSchema<v.UnionSchema<[v.ObjectSchema<{
|
|
63
|
-
readonly id: v.StringSchema<undefined>;
|
|
64
|
-
readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
65
|
-
readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
66
|
-
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
67
|
-
}, undefined>, v.ObjectSchema<{
|
|
68
|
-
readonly name: v.StringSchema<undefined>;
|
|
69
|
-
readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
70
|
-
readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
71
|
-
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
72
|
-
}, undefined>], undefined>, undefined>;
|
|
73
|
-
}, undefined>, v.ObjectSchema<{
|
|
74
|
-
readonly id: v.StringSchema<undefined>;
|
|
75
|
-
readonly type: v.LiteralSchema<"multi_select", undefined>;
|
|
76
|
-
readonly multi_select: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
77
|
-
readonly id: v.StringSchema<undefined>;
|
|
78
|
-
readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
79
|
-
readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
80
|
-
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
81
|
-
}, undefined>, v.ObjectSchema<{
|
|
82
|
-
readonly name: v.StringSchema<undefined>;
|
|
83
|
-
readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
84
|
-
readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
85
|
-
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
86
|
-
}, undefined>], undefined>, undefined>;
|
|
87
|
-
}, undefined>, v.ObjectSchema<{
|
|
88
|
-
readonly id: v.StringSchema<undefined>;
|
|
89
|
-
readonly type: v.LiteralSchema<"date", undefined>;
|
|
90
|
-
readonly date: v.NullableSchema<v.UnionSchema<[v.ObjectSchema<{
|
|
91
|
-
readonly end: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
92
|
-
readonly time_zone: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
93
|
-
readonly reminder: v.OptionalSchema<v.UnionSchema<[v.UnionSchema<[v.ObjectSchema<{
|
|
94
|
-
readonly unit: v.PicklistSchema<["year", "month", "week", "day"], undefined>;
|
|
95
|
-
readonly value: v.NumberSchema<undefined>;
|
|
96
|
-
readonly time: v.StringSchema<undefined>;
|
|
97
|
-
readonly defaultTimeZone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
98
|
-
}, undefined>, v.ObjectSchema<{
|
|
99
|
-
readonly unit: v.PicklistSchema<["hour", "minute"], undefined>;
|
|
100
|
-
readonly value: v.NumberSchema<undefined>;
|
|
101
|
-
}, undefined>], undefined>, v.ObjectSchema<{
|
|
102
|
-
readonly unit: v.LiteralSchema<"none", undefined>;
|
|
103
|
-
}, undefined>], undefined>, undefined>;
|
|
104
|
-
readonly start: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IncludesAction<string, "T", undefined>]>;
|
|
105
|
-
}, undefined>, v.ObjectSchema<{
|
|
106
|
-
readonly start: v.StringSchema<undefined>;
|
|
107
|
-
readonly end: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
108
|
-
readonly reminder: v.OptionalSchema<v.UnionSchema<[v.UnionSchema<[v.ObjectSchema<{
|
|
109
|
-
readonly unit: v.PicklistSchema<["year", "month", "week", "day"], undefined>;
|
|
110
|
-
readonly value: v.NumberSchema<undefined>;
|
|
111
|
-
readonly time: v.StringSchema<undefined>;
|
|
112
|
-
readonly defaultTimeZone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
113
|
-
}, undefined>, v.ObjectSchema<{
|
|
114
|
-
readonly unit: v.PicklistSchema<["hour", "minute"], undefined>;
|
|
115
|
-
readonly value: v.NumberSchema<undefined>;
|
|
116
|
-
}, undefined>], undefined>, v.ObjectSchema<{
|
|
117
|
-
readonly unit: v.LiteralSchema<"none", undefined>;
|
|
118
|
-
}, undefined>], undefined>, undefined>;
|
|
119
|
-
readonly time_zone: v.StringSchema<undefined>;
|
|
120
|
-
}, undefined>, v.ObjectSchema<{
|
|
121
|
-
readonly start: v.StringSchema<undefined>;
|
|
122
|
-
readonly end: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
123
|
-
readonly time_zone: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
124
|
-
readonly reminder: v.OptionalSchema<v.UnionSchema<[v.ObjectSchema<{
|
|
125
|
-
readonly unit: v.PicklistSchema<["year", "month", "week", "day"], undefined>;
|
|
126
|
-
readonly value: v.NumberSchema<undefined>;
|
|
127
|
-
readonly time: v.StringSchema<undefined>;
|
|
128
|
-
readonly defaultTimeZone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
129
|
-
}, undefined>, v.ObjectSchema<{
|
|
130
|
-
readonly unit: v.LiteralSchema<"none", undefined>;
|
|
131
|
-
}, undefined>], undefined>, undefined>;
|
|
132
|
-
}, undefined>], undefined>, undefined>;
|
|
133
|
-
}, undefined>, v.ObjectSchema<{
|
|
134
|
-
readonly id: v.StringSchema<undefined>;
|
|
135
|
-
readonly type: v.LiteralSchema<"people", undefined>;
|
|
136
|
-
readonly people: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
137
|
-
readonly object: v.OptionalSchema<v.LiteralSchema<"user", undefined>, undefined>;
|
|
138
|
-
readonly id: v.StringSchema<undefined>;
|
|
139
|
-
}, undefined>, v.ObjectSchema<{
|
|
140
|
-
readonly object: v.LiteralSchema<"group", undefined>;
|
|
141
|
-
readonly id: v.StringSchema<undefined>;
|
|
142
|
-
readonly name: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
143
|
-
}, undefined>], undefined>, undefined>;
|
|
144
|
-
}, undefined>, v.ObjectSchema<{
|
|
145
|
-
readonly id: v.StringSchema<undefined>;
|
|
146
|
-
readonly type: v.LiteralSchema<"relation", undefined>;
|
|
147
|
-
readonly has_more: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
148
|
-
readonly relation: v.ArraySchema<v.ObjectSchema<{
|
|
149
|
-
readonly id: v.StringSchema<undefined>;
|
|
150
|
-
}, undefined>, undefined>;
|
|
151
|
-
}, undefined>, v.ObjectSchema<{
|
|
152
|
-
readonly id: v.StringSchema<undefined>;
|
|
153
|
-
readonly type: v.LiteralSchema<"files", undefined>;
|
|
154
|
-
readonly files: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
155
|
-
readonly type: v.LiteralSchema<"external", undefined>;
|
|
156
|
-
readonly name: v.StringSchema<undefined>;
|
|
157
|
-
readonly external: v.ObjectSchema<{
|
|
158
|
-
readonly url: v.StringSchema<undefined>;
|
|
159
|
-
}, undefined>;
|
|
160
|
-
}, undefined>, v.ObjectSchema<{
|
|
161
|
-
readonly type: v.LiteralSchema<"file", undefined>;
|
|
162
|
-
readonly name: v.StringSchema<undefined>;
|
|
163
|
-
readonly file: v.ObjectSchema<{
|
|
164
|
-
readonly url: v.StringSchema<undefined>;
|
|
165
|
-
readonly expiry_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
166
|
-
}, undefined>;
|
|
167
|
-
}, undefined>], undefined>, undefined>;
|
|
168
|
-
}, undefined>, v.ObjectSchema<{
|
|
169
|
-
readonly id: v.StringSchema<undefined>;
|
|
170
|
-
readonly type: v.LiteralSchema<"place", undefined>;
|
|
171
|
-
readonly place: v.NullableSchema<v.ObjectSchema<{
|
|
172
|
-
readonly lat: v.NumberSchema<undefined>;
|
|
173
|
-
readonly lon: v.NumberSchema<undefined>;
|
|
174
|
-
readonly name: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
175
|
-
readonly address: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
176
|
-
readonly aws_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
177
|
-
readonly google_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
178
|
-
}, undefined>, undefined>;
|
|
179
|
-
}, undefined>, v.ObjectSchema<{
|
|
180
|
-
readonly id: v.StringSchema<undefined>;
|
|
181
|
-
readonly type: v.LiteralSchema<"created_time", undefined>;
|
|
182
|
-
readonly created_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
183
|
-
}, undefined>, v.ObjectSchema<{
|
|
184
|
-
readonly id: v.StringSchema<undefined>;
|
|
185
|
-
readonly type: v.LiteralSchema<"last_edited_time", undefined>;
|
|
186
|
-
readonly last_edited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
187
|
-
}, undefined>, v.ObjectSchema<{
|
|
188
|
-
readonly id: v.StringSchema<undefined>;
|
|
189
|
-
readonly type: v.LiteralSchema<"created_by", undefined>;
|
|
190
|
-
readonly created_by: v.NullableSchema<v.ObjectSchema<{
|
|
191
|
-
readonly id: v.StringSchema<undefined>;
|
|
192
|
-
readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
|
|
193
|
-
readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
194
|
-
}, undefined>, undefined>;
|
|
195
|
-
}, undefined>, v.ObjectSchema<{
|
|
196
|
-
readonly id: v.StringSchema<undefined>;
|
|
197
|
-
readonly type: v.LiteralSchema<"last_edited_by", undefined>;
|
|
198
|
-
readonly last_edited_by: v.NullableSchema<v.ObjectSchema<{
|
|
199
|
-
readonly id: v.StringSchema<undefined>;
|
|
200
|
-
readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
|
|
201
|
-
readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
202
|
-
}, undefined>, undefined>;
|
|
203
|
-
}, undefined>, v.ObjectSchema<{
|
|
204
|
-
readonly id: v.StringSchema<undefined>;
|
|
205
|
-
readonly type: v.LiteralSchema<"last_visited_time", undefined>;
|
|
206
|
-
readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
207
|
-
}, undefined>, v.ObjectSchema<{
|
|
208
|
-
readonly id: v.StringSchema<undefined>;
|
|
209
|
-
readonly type: v.LiteralSchema<"unique_id", undefined>;
|
|
210
|
-
readonly unique_id: v.StringSchema<undefined>;
|
|
211
|
-
}, undefined>, v.ObjectSchema<{
|
|
212
|
-
readonly id: v.StringSchema<undefined>;
|
|
213
|
-
readonly type: v.LiteralSchema<"button", undefined>;
|
|
214
|
-
readonly button: v.StringSchema<undefined>;
|
|
215
|
-
}, undefined>, v.ObjectSchema<{
|
|
216
|
-
readonly id: v.StringSchema<undefined>;
|
|
217
|
-
readonly type: v.LiteralSchema<"formula", undefined>;
|
|
218
|
-
readonly formula: v.StringSchema<undefined>;
|
|
219
|
-
}, undefined>, v.ObjectSchema<{
|
|
220
|
-
readonly id: v.StringSchema<undefined>;
|
|
221
|
-
readonly type: v.LiteralSchema<"location", undefined>;
|
|
222
|
-
readonly location: v.StringSchema<undefined>;
|
|
223
|
-
}, undefined>, v.ObjectSchema<{
|
|
224
|
-
readonly id: v.StringSchema<undefined>;
|
|
225
|
-
readonly type: v.LiteralSchema<"rollup", undefined>;
|
|
226
|
-
readonly rollup: v.StringSchema<undefined>;
|
|
227
|
-
}, undefined>, v.ObjectSchema<{
|
|
228
|
-
readonly id: v.StringSchema<undefined>;
|
|
229
|
-
readonly type: v.LiteralSchema<"verification", undefined>;
|
|
230
|
-
readonly verification: v.StringSchema<undefined>;
|
|
231
|
-
}, undefined>], undefined>, undefined>, undefined>;
|
|
232
|
-
readonly icon: v.OptionalSchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
233
|
-
readonly type: v.LiteralSchema<"emoji", undefined>;
|
|
234
|
-
readonly emoji: v.StringSchema<undefined>;
|
|
235
|
-
}, undefined>, v.ObjectSchema<{
|
|
236
|
-
readonly type: v.LiteralSchema<"custom_emoji", undefined>;
|
|
237
|
-
readonly custom_emoji: v.ObjectSchema<{
|
|
238
|
-
readonly id: v.StringSchema<undefined>;
|
|
239
|
-
readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
240
|
-
readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
241
|
-
}, undefined>;
|
|
242
|
-
}, undefined>, v.ObjectSchema<{
|
|
243
|
-
readonly type: v.LiteralSchema<"external", undefined>;
|
|
244
|
-
readonly external: v.ObjectSchema<{
|
|
245
|
-
readonly url: v.StringSchema<undefined>;
|
|
246
|
-
}, undefined>;
|
|
247
|
-
}, undefined>, v.ObjectSchema<{
|
|
248
|
-
readonly type: v.LiteralSchema<"file", undefined>;
|
|
249
|
-
readonly file: v.ObjectSchema<{
|
|
250
|
-
readonly url: v.StringSchema<undefined>;
|
|
251
|
-
readonly expiry_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
252
|
-
}, undefined>;
|
|
253
|
-
}, undefined>], undefined>, undefined>;
|
|
254
|
-
readonly cover: v.OptionalSchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
255
|
-
readonly type: v.LiteralSchema<"external", undefined>;
|
|
256
|
-
readonly external: v.ObjectSchema<{
|
|
257
|
-
readonly url: v.StringSchema<undefined>;
|
|
258
|
-
}, undefined>;
|
|
259
|
-
}, undefined>, v.ObjectSchema<{
|
|
260
|
-
readonly type: v.LiteralSchema<"file", undefined>;
|
|
261
|
-
readonly file: v.ObjectSchema<{
|
|
262
|
-
readonly url: v.StringSchema<undefined>;
|
|
263
|
-
readonly expiry_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
264
|
-
}, undefined>;
|
|
265
|
-
}, undefined>], undefined>, undefined>;
|
|
266
|
-
readonly archived: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
267
|
-
}, undefined>;
|
|
268
|
-
/**
|
|
269
|
-
* The sandbox sends this message to update a page.
|
|
270
|
-
*/
|
|
271
|
-
export type UpdatePageMessage = v.InferOutput<typeof updatePageMessageSchema>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as v from "valibot";
|
|
2
|
-
import { notionDataSourceIdSchema, notionPageIdSchema } from "../ids.js";
|
|
3
|
-
import { notionPageCoverSchema, notionPageIconSchema, notionPagePropertyWriteMapSchema, } from "../pages/page.js";
|
|
4
|
-
/**
|
|
5
|
-
* The sandbox sends this message to patch a page.
|
|
6
|
-
*/
|
|
7
|
-
export const updatePageMessageSchema = v.object({
|
|
8
|
-
type: v.literal("updatePage"),
|
|
9
|
-
requestId: v.string(),
|
|
10
|
-
pageId: notionPageIdSchema,
|
|
11
|
-
dataSourceId: v.optional(notionDataSourceIdSchema),
|
|
12
|
-
/**
|
|
13
|
-
* Property values, keyed by raw property IDs from Notion.
|
|
14
|
-
*
|
|
15
|
-
* Each value must carry the same raw property ID in its `id` field.
|
|
16
|
-
* To update a page with manifest-defined property keys, call `row.update()` on a row returned
|
|
17
|
-
* by `useDataSource()`. The SDK resolves those keys before it sends this message.
|
|
18
|
-
*/
|
|
19
|
-
properties: v.optional(notionPagePropertyWriteMapSchema),
|
|
20
|
-
icon: v.optional(notionPageIconSchema),
|
|
21
|
-
cover: v.optional(notionPageCoverSchema),
|
|
22
|
-
archived: v.optional(v.boolean()),
|
|
23
|
-
});
|