@notionhq/custom-blocks-host 0.2.20 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +170 -239
- package/dist/browser.js +1 -1
- package/dist/createCustomBlockHost.d.ts +5 -5
- package/dist/createCustomBlockHost.d.ts.map +1 -1
- package/dist/createCustomBlockHost.js +54 -15
- package/dist/ids.d.ts +3 -0
- package/dist/ids.d.ts.map +1 -0
- package/dist/ids.js +5 -0
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/lifecycle/loadCustomBlockManifest.d.ts +16 -0
- package/dist/lifecycle/loadCustomBlockManifest.d.ts.map +1 -0
- package/dist/lifecycle/loadCustomBlockManifest.js +65 -0
- package/dist/lifecycle/manifestOptions.d.ts +17 -0
- package/dist/lifecycle/manifestOptions.d.ts.map +1 -0
- package/dist/lifecycle/manifestOptions.js +1 -0
- package/dist/lifecycle/types.d.ts +14 -2
- package/dist/lifecycle/types.d.ts.map +1 -1
- package/dist/lifecycle/types.js +1 -1
- package/dist/protocol/dataSources/dataSourcePage.d.ts +160 -1
- package/dist/protocol/dataSources/dataSourcePage.js +8 -1
- package/dist/protocol/dataSources/propertySchema.d.ts +1 -0
- package/dist/protocol/messages/hostToSandbox.d.ts +159 -2
- package/dist/protocol/messages/queryDataSourceResult.d.ts +159 -2
- package/dist/protocol/messages/queryDataSourceResult.js +5 -2
- package/dist/protocol/protocolVersion.d.ts +2 -1
- package/dist/protocol/protocolVersion.js +4 -1
- package/package.json +1 -1
- package/src/createCustomBlockHost.ts +64 -23
- package/src/ids.ts +9 -0
- package/src/index.ts +12 -1
- package/src/lifecycle/loadCustomBlockManifest.ts +89 -0
- package/src/lifecycle/manifestOptions.ts +19 -0
- package/src/lifecycle/types.ts +17 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lifecycle/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,8BAA8B,EAAE,MAAM,4DAA4D,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lifecycle/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,8BAA8B,EAAE,MAAM,4DAA4D,CAAA;AAE3G,OAAO,EACN,KAAK,mBAAmB,EAExB,MAAM,8CAA8C,CAAA;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAA;AAC1F,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mDAAmD,CAAA;AAKjG,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAC1C,cAAc,EACd;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,CACrB,CAAA;AAED,gEAAgE;AAChE,MAAM,MAAM,UAAU;AACrB,qEAAqE;AACnE,mBAAmB;AACrB,yEAAyE;GACvE,eAAe;AACjB,6EAA6E;GAC3E,sBAAsB;AACxB,yDAAyD;GACvD,aAAa;AACf,gFAAgF;GAC9E,OAAO;AACT,2EAA2E;GACzE,SAAS,CAAA;AAEZ,MAAM,MAAM,iCAAiC,GAAG;IAC/C,QAAQ,EAAE,CAAC,CAAC,UAAU,CAAC,OAAO,8BAA8B,CAAC,CAAA;CAC7D,CAAA;AAED,MAAM,MAAM,2CAA2C,GAAG;IACzD,QAAQ,EAAE,CAAC,CAAC,WAAW,CAAC,OAAO,8BAA8B,CAAC,CAAA;CAC9D,CAAA;AAED,eAAO,MAAM,iCAAiC;;IAE7C;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAQF,CAAA;AAEF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,UAAU,CACrD,OAAO,iCAAiC,CACxC,CAAA;AAED,MAAM,MAAM,iCAAiC,GAC1C;IACA,MAAM,EAAE,SAAS,CAAA;IACjB,YAAY,EAAE,2BAA2B,CAAA;CACxC,GACD;IACA,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,wBAAwB,CAAA;CAC9B,CAAA;AAEJ,2EAA2E;AAC3E,MAAM,MAAM,kCAAkC,GAC3C;IACA,MAAM,EAAE,SAAS,CAAA;IACjB,YAAY,EAAE,IAAI,CAAC,2BAA2B,EAAE,UAAU,CAAC,CAAA;CAC1D,GACD;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,wBAAwB,CAAA;CAAE,CAAA;AAEvD,MAAM,MAAM,kCAAkC,GAAG,CAAC,IAAI,EAAE;IACvD,QAAQ,EAAE,mBAAmB,CAAA;IAC7B,MAAM,EAAE,WAAW,CAAA;CACnB,KAAK,OAAO,CAAC,kCAAkC,CAAC,CAAA"}
|
package/dist/lifecycle/types.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { notionContrastModeSchema } from "../protocol/contrast.js";
|
|
2
2
|
import { notionDataSourceBindingsSchema } from "../protocol/dataSources/dataSource.js";
|
|
3
3
|
import { notionBlockIdSchema } from "../protocol/ids.js";
|
|
4
|
-
import { manifestSchema } from "../protocol/manifest.js";
|
|
4
|
+
import { manifestSchema, } from "../protocol/manifest.js";
|
|
5
5
|
import { customBlockPageSchema } from "../protocol/pages/page.js";
|
|
6
6
|
import { notionParentSchema } from "../protocol/parent.js";
|
|
7
7
|
import { notionThemeSchema } from "../protocol/theme.js";
|
|
@@ -4,7 +4,7 @@ import * as v from "valibot";
|
|
|
4
4
|
* properties by raw property ID. The four built-ins (`created_time`, `last_edited_time`,
|
|
5
5
|
* `created_by`, `last_edited_by`) are normally present, possibly with `undefined` values.
|
|
6
6
|
*/
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const legacyNotionDataSourcePageBridgeSchema: v.ObjectSchema<{
|
|
8
8
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
|
|
9
9
|
/** Whether the page or an ancestor is archived. */
|
|
10
10
|
readonly is_archived: v.BooleanSchema<undefined>;
|
|
@@ -72,5 +72,164 @@ export declare const notionDataSourcePageBridgeSchema: v.ObjectSchema<{
|
|
|
72
72
|
readonly table: v.StringSchema<undefined>;
|
|
73
73
|
}, undefined>, undefined>], undefined>, undefined>, undefined>;
|
|
74
74
|
}, undefined>;
|
|
75
|
+
export declare const notionDataSourcePageBridgeSchema: v.ObjectSchema<{
|
|
76
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
|
|
77
|
+
readonly is_archived: v.BooleanSchema<undefined>;
|
|
78
|
+
readonly in_trash: v.BooleanSchema<undefined>;
|
|
79
|
+
readonly properties: v.RecordSchema<v.StringSchema<undefined>, v.OptionalSchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
80
|
+
readonly id: v.StringSchema<undefined>;
|
|
81
|
+
readonly type: v.LiteralSchema<"title", undefined>;
|
|
82
|
+
readonly title: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
83
|
+
}, undefined>, v.ObjectSchema<{
|
|
84
|
+
readonly id: v.StringSchema<undefined>;
|
|
85
|
+
readonly type: v.LiteralSchema<"rich_text", undefined>;
|
|
86
|
+
readonly rich_text: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
87
|
+
}, undefined>, v.ObjectSchema<{
|
|
88
|
+
readonly id: v.StringSchema<undefined>;
|
|
89
|
+
readonly type: v.LiteralSchema<"number", undefined>;
|
|
90
|
+
readonly number: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
91
|
+
}, undefined>, v.ObjectSchema<{
|
|
92
|
+
readonly id: v.StringSchema<undefined>;
|
|
93
|
+
readonly type: v.LiteralSchema<"url", undefined>;
|
|
94
|
+
readonly url: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
95
|
+
}, undefined>, v.ObjectSchema<{
|
|
96
|
+
readonly id: v.StringSchema<undefined>;
|
|
97
|
+
readonly type: v.LiteralSchema<"email", undefined>;
|
|
98
|
+
readonly email: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
99
|
+
}, undefined>, v.ObjectSchema<{
|
|
100
|
+
readonly id: v.StringSchema<undefined>;
|
|
101
|
+
readonly type: v.LiteralSchema<"phone_number", undefined>;
|
|
102
|
+
readonly phone_number: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
103
|
+
}, undefined>, v.ObjectSchema<{
|
|
104
|
+
readonly id: v.StringSchema<undefined>;
|
|
105
|
+
readonly type: v.LiteralSchema<"checkbox", undefined>;
|
|
106
|
+
readonly checkbox: v.BooleanSchema<undefined>;
|
|
107
|
+
}, undefined>, v.ObjectSchema<{
|
|
108
|
+
readonly id: v.StringSchema<undefined>;
|
|
109
|
+
readonly type: v.LiteralSchema<"select", undefined>;
|
|
110
|
+
readonly select: v.NullableSchema<v.UnionSchema<[v.ObjectSchema<{
|
|
111
|
+
readonly id: v.StringSchema<undefined>;
|
|
112
|
+
readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
113
|
+
readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
114
|
+
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
115
|
+
}, undefined>, v.ObjectSchema<{
|
|
116
|
+
readonly name: v.StringSchema<undefined>;
|
|
117
|
+
readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
118
|
+
readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
119
|
+
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
120
|
+
}, undefined>], undefined>, undefined>;
|
|
121
|
+
}, undefined>, v.ObjectSchema<{
|
|
122
|
+
readonly id: v.StringSchema<undefined>;
|
|
123
|
+
readonly type: v.LiteralSchema<"status", undefined>;
|
|
124
|
+
readonly status: v.NullableSchema<v.UnionSchema<[v.ObjectSchema<{
|
|
125
|
+
readonly id: v.StringSchema<undefined>;
|
|
126
|
+
readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
127
|
+
readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
128
|
+
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
129
|
+
}, undefined>, v.ObjectSchema<{
|
|
130
|
+
readonly name: v.StringSchema<undefined>;
|
|
131
|
+
readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
132
|
+
readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
133
|
+
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
134
|
+
}, undefined>], undefined>, undefined>;
|
|
135
|
+
}, undefined>, v.ObjectSchema<{
|
|
136
|
+
readonly id: v.StringSchema<undefined>;
|
|
137
|
+
readonly type: v.LiteralSchema<"multi_select", undefined>;
|
|
138
|
+
readonly multi_select: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
139
|
+
readonly id: v.StringSchema<undefined>;
|
|
140
|
+
readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
141
|
+
readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
142
|
+
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
143
|
+
}, undefined>, v.ObjectSchema<{
|
|
144
|
+
readonly name: v.StringSchema<undefined>;
|
|
145
|
+
readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
146
|
+
readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
147
|
+
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
148
|
+
}, undefined>], undefined>, undefined>;
|
|
149
|
+
}, undefined>, v.ObjectSchema<{
|
|
150
|
+
readonly id: v.StringSchema<undefined>;
|
|
151
|
+
readonly type: v.LiteralSchema<"date", undefined>;
|
|
152
|
+
readonly date: v.NullableSchema<v.ObjectSchema<{
|
|
153
|
+
readonly start: v.StringSchema<undefined>;
|
|
154
|
+
readonly end: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
155
|
+
readonly time_zone: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
156
|
+
}, undefined>, undefined>;
|
|
157
|
+
}, undefined>, v.ObjectSchema<{
|
|
158
|
+
readonly id: v.StringSchema<undefined>;
|
|
159
|
+
readonly type: v.LiteralSchema<"people", undefined>;
|
|
160
|
+
readonly people: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
161
|
+
readonly object: v.OptionalSchema<v.LiteralSchema<"user", undefined>, undefined>;
|
|
162
|
+
readonly id: v.StringSchema<undefined>;
|
|
163
|
+
}, undefined>, v.ObjectSchema<{
|
|
164
|
+
readonly object: v.LiteralSchema<"group", undefined>;
|
|
165
|
+
readonly id: v.StringSchema<undefined>;
|
|
166
|
+
readonly name: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
167
|
+
}, undefined>], undefined>, undefined>;
|
|
168
|
+
}, undefined>, v.ObjectSchema<{
|
|
169
|
+
readonly id: v.StringSchema<undefined>;
|
|
170
|
+
readonly type: v.LiteralSchema<"relation", undefined>;
|
|
171
|
+
readonly has_more: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
172
|
+
readonly relation: v.ArraySchema<v.ObjectSchema<{
|
|
173
|
+
readonly id: v.StringSchema<undefined>;
|
|
174
|
+
}, undefined>, undefined>;
|
|
175
|
+
}, undefined>, v.ObjectSchema<{
|
|
176
|
+
readonly id: v.StringSchema<undefined>;
|
|
177
|
+
readonly type: v.LiteralSchema<"files", undefined>;
|
|
178
|
+
readonly files: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
179
|
+
readonly type: v.LiteralSchema<"external", undefined>;
|
|
180
|
+
readonly name: v.StringSchema<undefined>;
|
|
181
|
+
readonly external: v.ObjectSchema<{
|
|
182
|
+
readonly url: v.StringSchema<undefined>;
|
|
183
|
+
}, undefined>;
|
|
184
|
+
}, undefined>, v.ObjectSchema<{
|
|
185
|
+
readonly type: v.LiteralSchema<"file", undefined>;
|
|
186
|
+
readonly name: v.StringSchema<undefined>;
|
|
187
|
+
readonly file: v.ObjectSchema<{
|
|
188
|
+
readonly url: v.StringSchema<undefined>;
|
|
189
|
+
readonly expiry_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
190
|
+
}, undefined>;
|
|
191
|
+
}, undefined>], undefined>, undefined>;
|
|
192
|
+
}, undefined>, v.ObjectSchema<{
|
|
193
|
+
readonly id: v.StringSchema<undefined>;
|
|
194
|
+
readonly type: v.LiteralSchema<"place", undefined>;
|
|
195
|
+
readonly place: v.NullableSchema<v.ObjectSchema<{
|
|
196
|
+
readonly lat: v.NumberSchema<undefined>;
|
|
197
|
+
readonly lon: v.NumberSchema<undefined>;
|
|
198
|
+
readonly name: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
199
|
+
readonly address: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
200
|
+
readonly aws_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
201
|
+
readonly google_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
202
|
+
}, undefined>, undefined>;
|
|
203
|
+
}, undefined>, v.ObjectSchema<{
|
|
204
|
+
readonly id: v.StringSchema<undefined>;
|
|
205
|
+
readonly type: v.LiteralSchema<"created_time", undefined>;
|
|
206
|
+
readonly created_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
207
|
+
}, undefined>, v.ObjectSchema<{
|
|
208
|
+
readonly id: v.StringSchema<undefined>;
|
|
209
|
+
readonly type: v.LiteralSchema<"last_edited_time", undefined>;
|
|
210
|
+
readonly last_edited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
211
|
+
}, undefined>, v.ObjectSchema<{
|
|
212
|
+
readonly id: v.StringSchema<undefined>;
|
|
213
|
+
readonly type: v.LiteralSchema<"created_by", undefined>;
|
|
214
|
+
readonly created_by: v.NullableSchema<v.ObjectSchema<{
|
|
215
|
+
readonly id: v.StringSchema<undefined>;
|
|
216
|
+
readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
|
|
217
|
+
readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
218
|
+
}, undefined>, undefined>;
|
|
219
|
+
}, undefined>, v.ObjectSchema<{
|
|
220
|
+
readonly id: v.StringSchema<undefined>;
|
|
221
|
+
readonly type: v.LiteralSchema<"last_edited_by", undefined>;
|
|
222
|
+
readonly last_edited_by: v.NullableSchema<v.ObjectSchema<{
|
|
223
|
+
readonly id: v.StringSchema<undefined>;
|
|
224
|
+
readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
|
|
225
|
+
readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
226
|
+
}, undefined>, undefined>;
|
|
227
|
+
}, undefined>, v.ObjectSchema<{
|
|
228
|
+
readonly id: v.StringSchema<undefined>;
|
|
229
|
+
readonly type: v.LiteralSchema<"last_visited_time", undefined>;
|
|
230
|
+
readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
231
|
+
}, undefined>], undefined>, undefined>, undefined>;
|
|
232
|
+
}, undefined>;
|
|
233
|
+
export type LegacyNotionDataSourcePageBridge = v.InferOutput<typeof legacyNotionDataSourcePageBridgeSchema>;
|
|
75
234
|
/** Internal SDK type for a parsed bridge page. */
|
|
76
235
|
export type NotionDataSourcePageBridge = v.InferOutput<typeof notionDataSourcePageBridgeSchema>;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
2
|
import { notionPageIdSchema } from "../ids.js";
|
|
3
|
+
import { notionPagePropertyValueSchema } from "../pages/page.js";
|
|
3
4
|
import { notionDataSourceValueSchema } from "./dataSourceValue.js";
|
|
4
5
|
/**
|
|
5
6
|
* Bridge shape for a data source page, as parsed from inbound host messages. The host keys
|
|
6
7
|
* properties by raw property ID. The four built-ins (`created_time`, `last_edited_time`,
|
|
7
8
|
* `created_by`, `last_edited_by`) are normally present, possibly with `undefined` values.
|
|
8
9
|
*/
|
|
9
|
-
export const
|
|
10
|
+
export const legacyNotionDataSourcePageBridgeSchema = v.object({
|
|
10
11
|
id: notionPageIdSchema,
|
|
11
12
|
/** Whether the page or an ancestor is archived. */
|
|
12
13
|
is_archived: v.boolean(),
|
|
@@ -14,3 +15,9 @@ export const notionDataSourcePageBridgeSchema = v.object({
|
|
|
14
15
|
in_trash: v.boolean(),
|
|
15
16
|
propertiesById: v.record(v.string(), v.optional(notionDataSourceValueSchema)),
|
|
16
17
|
});
|
|
18
|
+
export const notionDataSourcePageBridgeSchema = v.object({
|
|
19
|
+
id: notionPageIdSchema,
|
|
20
|
+
is_archived: v.boolean(),
|
|
21
|
+
in_trash: v.boolean(),
|
|
22
|
+
properties: v.record(v.string(), v.optional(notionPagePropertyValueSchema)),
|
|
23
|
+
});
|
|
@@ -189,6 +189,7 @@ export declare const notionPropertySchemaSchema: v.VariantSchema<"type", [v.Obje
|
|
|
189
189
|
readonly type: v.LiteralSchema<"last_edited_by", undefined>;
|
|
190
190
|
}, undefined>], undefined>;
|
|
191
191
|
export type NotionPropertySchema = v.InferOutput<typeof notionPropertySchemaSchema>;
|
|
192
|
+
export type NotionPropertySchemasById = Record<string, NotionPropertySchema>;
|
|
192
193
|
/**
|
|
193
194
|
* The four synthetic built-in property IDs the host always includes in every
|
|
194
195
|
* data source's `propertySchemasById` and every row's `propertiesById`.
|
|
@@ -460,7 +460,164 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
|
|
|
460
460
|
readonly type: v.LiteralSchema<"queryDataSourceResult", undefined>;
|
|
461
461
|
readonly subscriptionId: v.StringSchema<undefined>;
|
|
462
462
|
readonly status: v.LiteralSchema<"success", undefined>;
|
|
463
|
-
readonly items: v.ArraySchema<v.ObjectSchema<{
|
|
463
|
+
readonly items: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
464
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
|
|
465
|
+
readonly is_archived: v.BooleanSchema<undefined>;
|
|
466
|
+
readonly in_trash: v.BooleanSchema<undefined>;
|
|
467
|
+
readonly properties: v.RecordSchema<v.StringSchema<undefined>, v.OptionalSchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
468
|
+
readonly id: v.StringSchema<undefined>;
|
|
469
|
+
readonly type: v.LiteralSchema<"title", undefined>;
|
|
470
|
+
readonly title: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
471
|
+
}, undefined>, v.ObjectSchema<{
|
|
472
|
+
readonly id: v.StringSchema<undefined>;
|
|
473
|
+
readonly type: v.LiteralSchema<"rich_text", undefined>;
|
|
474
|
+
readonly rich_text: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
475
|
+
}, undefined>, v.ObjectSchema<{
|
|
476
|
+
readonly id: v.StringSchema<undefined>;
|
|
477
|
+
readonly type: v.LiteralSchema<"number", undefined>;
|
|
478
|
+
readonly number: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
479
|
+
}, undefined>, v.ObjectSchema<{
|
|
480
|
+
readonly id: v.StringSchema<undefined>;
|
|
481
|
+
readonly type: v.LiteralSchema<"url", undefined>;
|
|
482
|
+
readonly url: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
483
|
+
}, undefined>, v.ObjectSchema<{
|
|
484
|
+
readonly id: v.StringSchema<undefined>;
|
|
485
|
+
readonly type: v.LiteralSchema<"email", undefined>;
|
|
486
|
+
readonly email: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
487
|
+
}, undefined>, v.ObjectSchema<{
|
|
488
|
+
readonly id: v.StringSchema<undefined>;
|
|
489
|
+
readonly type: v.LiteralSchema<"phone_number", undefined>;
|
|
490
|
+
readonly phone_number: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
491
|
+
}, undefined>, v.ObjectSchema<{
|
|
492
|
+
readonly id: v.StringSchema<undefined>;
|
|
493
|
+
readonly type: v.LiteralSchema<"checkbox", undefined>;
|
|
494
|
+
readonly checkbox: v.BooleanSchema<undefined>;
|
|
495
|
+
}, undefined>, v.ObjectSchema<{
|
|
496
|
+
readonly id: v.StringSchema<undefined>;
|
|
497
|
+
readonly type: v.LiteralSchema<"select", undefined>;
|
|
498
|
+
readonly select: v.NullableSchema<v.UnionSchema<[v.ObjectSchema<{
|
|
499
|
+
readonly id: v.StringSchema<undefined>;
|
|
500
|
+
readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
501
|
+
readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
502
|
+
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
503
|
+
}, undefined>, v.ObjectSchema<{
|
|
504
|
+
readonly name: v.StringSchema<undefined>;
|
|
505
|
+
readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
506
|
+
readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
507
|
+
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
508
|
+
}, undefined>], undefined>, undefined>;
|
|
509
|
+
}, undefined>, v.ObjectSchema<{
|
|
510
|
+
readonly id: v.StringSchema<undefined>;
|
|
511
|
+
readonly type: v.LiteralSchema<"status", undefined>;
|
|
512
|
+
readonly status: v.NullableSchema<v.UnionSchema<[v.ObjectSchema<{
|
|
513
|
+
readonly id: v.StringSchema<undefined>;
|
|
514
|
+
readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
515
|
+
readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
516
|
+
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
517
|
+
}, undefined>, v.ObjectSchema<{
|
|
518
|
+
readonly name: v.StringSchema<undefined>;
|
|
519
|
+
readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
520
|
+
readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
521
|
+
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
522
|
+
}, undefined>], undefined>, undefined>;
|
|
523
|
+
}, undefined>, v.ObjectSchema<{
|
|
524
|
+
readonly id: v.StringSchema<undefined>;
|
|
525
|
+
readonly type: v.LiteralSchema<"multi_select", undefined>;
|
|
526
|
+
readonly multi_select: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
527
|
+
readonly id: v.StringSchema<undefined>;
|
|
528
|
+
readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
529
|
+
readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
530
|
+
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
531
|
+
}, undefined>, v.ObjectSchema<{
|
|
532
|
+
readonly name: v.StringSchema<undefined>;
|
|
533
|
+
readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
534
|
+
readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
535
|
+
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
536
|
+
}, undefined>], undefined>, undefined>;
|
|
537
|
+
}, undefined>, v.ObjectSchema<{
|
|
538
|
+
readonly id: v.StringSchema<undefined>;
|
|
539
|
+
readonly type: v.LiteralSchema<"date", undefined>;
|
|
540
|
+
readonly date: v.NullableSchema<v.ObjectSchema<{
|
|
541
|
+
readonly start: v.StringSchema<undefined>;
|
|
542
|
+
readonly end: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
543
|
+
readonly time_zone: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
544
|
+
}, undefined>, undefined>;
|
|
545
|
+
}, undefined>, v.ObjectSchema<{
|
|
546
|
+
readonly id: v.StringSchema<undefined>;
|
|
547
|
+
readonly type: v.LiteralSchema<"people", undefined>;
|
|
548
|
+
readonly people: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
549
|
+
readonly object: v.OptionalSchema<v.LiteralSchema<"user", undefined>, undefined>;
|
|
550
|
+
readonly id: v.StringSchema<undefined>;
|
|
551
|
+
}, undefined>, v.ObjectSchema<{
|
|
552
|
+
readonly object: v.LiteralSchema<"group", undefined>;
|
|
553
|
+
readonly id: v.StringSchema<undefined>;
|
|
554
|
+
readonly name: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
555
|
+
}, undefined>], undefined>, undefined>;
|
|
556
|
+
}, undefined>, v.ObjectSchema<{
|
|
557
|
+
readonly id: v.StringSchema<undefined>;
|
|
558
|
+
readonly type: v.LiteralSchema<"relation", undefined>;
|
|
559
|
+
readonly has_more: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
560
|
+
readonly relation: v.ArraySchema<v.ObjectSchema<{
|
|
561
|
+
readonly id: v.StringSchema<undefined>;
|
|
562
|
+
}, undefined>, undefined>;
|
|
563
|
+
}, undefined>, v.ObjectSchema<{
|
|
564
|
+
readonly id: v.StringSchema<undefined>;
|
|
565
|
+
readonly type: v.LiteralSchema<"files", undefined>;
|
|
566
|
+
readonly files: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
567
|
+
readonly type: v.LiteralSchema<"external", undefined>;
|
|
568
|
+
readonly name: v.StringSchema<undefined>;
|
|
569
|
+
readonly external: v.ObjectSchema<{
|
|
570
|
+
readonly url: v.StringSchema<undefined>;
|
|
571
|
+
}, undefined>;
|
|
572
|
+
}, undefined>, v.ObjectSchema<{
|
|
573
|
+
readonly type: v.LiteralSchema<"file", undefined>;
|
|
574
|
+
readonly name: v.StringSchema<undefined>;
|
|
575
|
+
readonly file: v.ObjectSchema<{
|
|
576
|
+
readonly url: v.StringSchema<undefined>;
|
|
577
|
+
readonly expiry_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
578
|
+
}, undefined>;
|
|
579
|
+
}, undefined>], undefined>, undefined>;
|
|
580
|
+
}, undefined>, v.ObjectSchema<{
|
|
581
|
+
readonly id: v.StringSchema<undefined>;
|
|
582
|
+
readonly type: v.LiteralSchema<"place", undefined>;
|
|
583
|
+
readonly place: v.NullableSchema<v.ObjectSchema<{
|
|
584
|
+
readonly lat: v.NumberSchema<undefined>;
|
|
585
|
+
readonly lon: v.NumberSchema<undefined>;
|
|
586
|
+
readonly name: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
587
|
+
readonly address: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
588
|
+
readonly aws_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
589
|
+
readonly google_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
590
|
+
}, undefined>, undefined>;
|
|
591
|
+
}, undefined>, v.ObjectSchema<{
|
|
592
|
+
readonly id: v.StringSchema<undefined>;
|
|
593
|
+
readonly type: v.LiteralSchema<"created_time", undefined>;
|
|
594
|
+
readonly created_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
595
|
+
}, undefined>, v.ObjectSchema<{
|
|
596
|
+
readonly id: v.StringSchema<undefined>;
|
|
597
|
+
readonly type: v.LiteralSchema<"last_edited_time", undefined>;
|
|
598
|
+
readonly last_edited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
599
|
+
}, undefined>, v.ObjectSchema<{
|
|
600
|
+
readonly id: v.StringSchema<undefined>;
|
|
601
|
+
readonly type: v.LiteralSchema<"created_by", undefined>;
|
|
602
|
+
readonly created_by: v.NullableSchema<v.ObjectSchema<{
|
|
603
|
+
readonly id: v.StringSchema<undefined>;
|
|
604
|
+
readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
|
|
605
|
+
readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
606
|
+
}, undefined>, undefined>;
|
|
607
|
+
}, undefined>, v.ObjectSchema<{
|
|
608
|
+
readonly id: v.StringSchema<undefined>;
|
|
609
|
+
readonly type: v.LiteralSchema<"last_edited_by", undefined>;
|
|
610
|
+
readonly last_edited_by: v.NullableSchema<v.ObjectSchema<{
|
|
611
|
+
readonly id: v.StringSchema<undefined>;
|
|
612
|
+
readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
|
|
613
|
+
readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
614
|
+
}, undefined>, undefined>;
|
|
615
|
+
}, undefined>, v.ObjectSchema<{
|
|
616
|
+
readonly id: v.StringSchema<undefined>;
|
|
617
|
+
readonly type: v.LiteralSchema<"last_visited_time", undefined>;
|
|
618
|
+
readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
619
|
+
}, undefined>], undefined>, undefined>, undefined>;
|
|
620
|
+
}, undefined>, v.ObjectSchema<{
|
|
464
621
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
|
|
465
622
|
readonly is_archived: v.BooleanSchema<undefined>;
|
|
466
623
|
readonly in_trash: v.BooleanSchema<undefined>;
|
|
@@ -525,7 +682,7 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
|
|
|
525
682
|
readonly id: v.StringSchema<undefined>;
|
|
526
683
|
readonly table: v.StringSchema<undefined>;
|
|
527
684
|
}, undefined>, undefined>], undefined>, undefined>, undefined>;
|
|
528
|
-
}, undefined>, undefined>;
|
|
685
|
+
}, undefined>], undefined>, undefined>;
|
|
529
686
|
readonly hasMore: v.BooleanSchema<undefined>;
|
|
530
687
|
}, undefined>, v.ObjectSchema<{
|
|
531
688
|
readonly type: v.LiteralSchema<"queryDataSourceResult", undefined>;
|
|
@@ -15,7 +15,164 @@ export declare const queryDataSourceResultMessageSchema: v.VariantSchema<"status
|
|
|
15
15
|
readonly type: v.LiteralSchema<"queryDataSourceResult", undefined>;
|
|
16
16
|
readonly subscriptionId: v.StringSchema<undefined>;
|
|
17
17
|
readonly status: v.LiteralSchema<"success", undefined>;
|
|
18
|
-
readonly items: v.ArraySchema<v.ObjectSchema<{
|
|
18
|
+
readonly items: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
19
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
|
|
20
|
+
readonly is_archived: v.BooleanSchema<undefined>;
|
|
21
|
+
readonly in_trash: v.BooleanSchema<undefined>;
|
|
22
|
+
readonly properties: v.RecordSchema<v.StringSchema<undefined>, v.OptionalSchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
23
|
+
readonly id: v.StringSchema<undefined>;
|
|
24
|
+
readonly type: v.LiteralSchema<"title", undefined>;
|
|
25
|
+
readonly title: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
26
|
+
}, undefined>, v.ObjectSchema<{
|
|
27
|
+
readonly id: v.StringSchema<undefined>;
|
|
28
|
+
readonly type: v.LiteralSchema<"rich_text", undefined>;
|
|
29
|
+
readonly rich_text: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
30
|
+
}, undefined>, v.ObjectSchema<{
|
|
31
|
+
readonly id: v.StringSchema<undefined>;
|
|
32
|
+
readonly type: v.LiteralSchema<"number", undefined>;
|
|
33
|
+
readonly number: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
34
|
+
}, undefined>, v.ObjectSchema<{
|
|
35
|
+
readonly id: v.StringSchema<undefined>;
|
|
36
|
+
readonly type: v.LiteralSchema<"url", undefined>;
|
|
37
|
+
readonly url: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
38
|
+
}, undefined>, v.ObjectSchema<{
|
|
39
|
+
readonly id: v.StringSchema<undefined>;
|
|
40
|
+
readonly type: v.LiteralSchema<"email", undefined>;
|
|
41
|
+
readonly email: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
42
|
+
}, undefined>, v.ObjectSchema<{
|
|
43
|
+
readonly id: v.StringSchema<undefined>;
|
|
44
|
+
readonly type: v.LiteralSchema<"phone_number", undefined>;
|
|
45
|
+
readonly phone_number: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
46
|
+
}, undefined>, v.ObjectSchema<{
|
|
47
|
+
readonly id: v.StringSchema<undefined>;
|
|
48
|
+
readonly type: v.LiteralSchema<"checkbox", undefined>;
|
|
49
|
+
readonly checkbox: v.BooleanSchema<undefined>;
|
|
50
|
+
}, undefined>, v.ObjectSchema<{
|
|
51
|
+
readonly id: v.StringSchema<undefined>;
|
|
52
|
+
readonly type: v.LiteralSchema<"select", undefined>;
|
|
53
|
+
readonly select: v.NullableSchema<v.UnionSchema<[v.ObjectSchema<{
|
|
54
|
+
readonly id: v.StringSchema<undefined>;
|
|
55
|
+
readonly name: 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>, v.ObjectSchema<{
|
|
59
|
+
readonly name: v.StringSchema<undefined>;
|
|
60
|
+
readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
61
|
+
readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
62
|
+
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
63
|
+
}, undefined>], undefined>, undefined>;
|
|
64
|
+
}, undefined>, v.ObjectSchema<{
|
|
65
|
+
readonly id: v.StringSchema<undefined>;
|
|
66
|
+
readonly type: v.LiteralSchema<"status", undefined>;
|
|
67
|
+
readonly status: v.NullableSchema<v.UnionSchema<[v.ObjectSchema<{
|
|
68
|
+
readonly id: v.StringSchema<undefined>;
|
|
69
|
+
readonly name: 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>, v.ObjectSchema<{
|
|
73
|
+
readonly name: v.StringSchema<undefined>;
|
|
74
|
+
readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
75
|
+
readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
76
|
+
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
77
|
+
}, undefined>], undefined>, undefined>;
|
|
78
|
+
}, undefined>, v.ObjectSchema<{
|
|
79
|
+
readonly id: v.StringSchema<undefined>;
|
|
80
|
+
readonly type: v.LiteralSchema<"multi_select", undefined>;
|
|
81
|
+
readonly multi_select: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
82
|
+
readonly id: v.StringSchema<undefined>;
|
|
83
|
+
readonly name: 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>, v.ObjectSchema<{
|
|
87
|
+
readonly name: v.StringSchema<undefined>;
|
|
88
|
+
readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
89
|
+
readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
90
|
+
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
91
|
+
}, undefined>], undefined>, undefined>;
|
|
92
|
+
}, undefined>, v.ObjectSchema<{
|
|
93
|
+
readonly id: v.StringSchema<undefined>;
|
|
94
|
+
readonly type: v.LiteralSchema<"date", undefined>;
|
|
95
|
+
readonly date: v.NullableSchema<v.ObjectSchema<{
|
|
96
|
+
readonly start: v.StringSchema<undefined>;
|
|
97
|
+
readonly end: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
98
|
+
readonly time_zone: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
99
|
+
}, undefined>, undefined>;
|
|
100
|
+
}, undefined>, v.ObjectSchema<{
|
|
101
|
+
readonly id: v.StringSchema<undefined>;
|
|
102
|
+
readonly type: v.LiteralSchema<"people", undefined>;
|
|
103
|
+
readonly people: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
104
|
+
readonly object: v.OptionalSchema<v.LiteralSchema<"user", undefined>, undefined>;
|
|
105
|
+
readonly id: v.StringSchema<undefined>;
|
|
106
|
+
}, undefined>, v.ObjectSchema<{
|
|
107
|
+
readonly object: v.LiteralSchema<"group", undefined>;
|
|
108
|
+
readonly id: v.StringSchema<undefined>;
|
|
109
|
+
readonly name: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
110
|
+
}, undefined>], undefined>, undefined>;
|
|
111
|
+
}, undefined>, v.ObjectSchema<{
|
|
112
|
+
readonly id: v.StringSchema<undefined>;
|
|
113
|
+
readonly type: v.LiteralSchema<"relation", undefined>;
|
|
114
|
+
readonly has_more: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
115
|
+
readonly relation: v.ArraySchema<v.ObjectSchema<{
|
|
116
|
+
readonly id: v.StringSchema<undefined>;
|
|
117
|
+
}, undefined>, undefined>;
|
|
118
|
+
}, undefined>, v.ObjectSchema<{
|
|
119
|
+
readonly id: v.StringSchema<undefined>;
|
|
120
|
+
readonly type: v.LiteralSchema<"files", undefined>;
|
|
121
|
+
readonly files: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
122
|
+
readonly type: v.LiteralSchema<"external", undefined>;
|
|
123
|
+
readonly name: v.StringSchema<undefined>;
|
|
124
|
+
readonly external: v.ObjectSchema<{
|
|
125
|
+
readonly url: v.StringSchema<undefined>;
|
|
126
|
+
}, undefined>;
|
|
127
|
+
}, undefined>, v.ObjectSchema<{
|
|
128
|
+
readonly type: v.LiteralSchema<"file", undefined>;
|
|
129
|
+
readonly name: v.StringSchema<undefined>;
|
|
130
|
+
readonly file: v.ObjectSchema<{
|
|
131
|
+
readonly url: v.StringSchema<undefined>;
|
|
132
|
+
readonly expiry_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
133
|
+
}, undefined>;
|
|
134
|
+
}, undefined>], undefined>, undefined>;
|
|
135
|
+
}, undefined>, v.ObjectSchema<{
|
|
136
|
+
readonly id: v.StringSchema<undefined>;
|
|
137
|
+
readonly type: v.LiteralSchema<"place", undefined>;
|
|
138
|
+
readonly place: v.NullableSchema<v.ObjectSchema<{
|
|
139
|
+
readonly lat: v.NumberSchema<undefined>;
|
|
140
|
+
readonly lon: v.NumberSchema<undefined>;
|
|
141
|
+
readonly name: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
142
|
+
readonly address: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
143
|
+
readonly aws_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
144
|
+
readonly google_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
145
|
+
}, undefined>, undefined>;
|
|
146
|
+
}, undefined>, v.ObjectSchema<{
|
|
147
|
+
readonly id: v.StringSchema<undefined>;
|
|
148
|
+
readonly type: v.LiteralSchema<"created_time", undefined>;
|
|
149
|
+
readonly created_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
150
|
+
}, undefined>, v.ObjectSchema<{
|
|
151
|
+
readonly id: v.StringSchema<undefined>;
|
|
152
|
+
readonly type: v.LiteralSchema<"last_edited_time", undefined>;
|
|
153
|
+
readonly last_edited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
154
|
+
}, undefined>, v.ObjectSchema<{
|
|
155
|
+
readonly id: v.StringSchema<undefined>;
|
|
156
|
+
readonly type: v.LiteralSchema<"created_by", undefined>;
|
|
157
|
+
readonly created_by: v.NullableSchema<v.ObjectSchema<{
|
|
158
|
+
readonly id: v.StringSchema<undefined>;
|
|
159
|
+
readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
|
|
160
|
+
readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
161
|
+
}, undefined>, undefined>;
|
|
162
|
+
}, undefined>, v.ObjectSchema<{
|
|
163
|
+
readonly id: v.StringSchema<undefined>;
|
|
164
|
+
readonly type: v.LiteralSchema<"last_edited_by", undefined>;
|
|
165
|
+
readonly last_edited_by: v.NullableSchema<v.ObjectSchema<{
|
|
166
|
+
readonly id: v.StringSchema<undefined>;
|
|
167
|
+
readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
|
|
168
|
+
readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
169
|
+
}, undefined>, undefined>;
|
|
170
|
+
}, undefined>, v.ObjectSchema<{
|
|
171
|
+
readonly id: v.StringSchema<undefined>;
|
|
172
|
+
readonly type: v.LiteralSchema<"last_visited_time", undefined>;
|
|
173
|
+
readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
174
|
+
}, undefined>], undefined>, undefined>, undefined>;
|
|
175
|
+
}, undefined>, v.ObjectSchema<{
|
|
19
176
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
|
|
20
177
|
readonly is_archived: v.BooleanSchema<undefined>;
|
|
21
178
|
readonly in_trash: v.BooleanSchema<undefined>;
|
|
@@ -80,7 +237,7 @@ export declare const queryDataSourceResultMessageSchema: v.VariantSchema<"status
|
|
|
80
237
|
readonly id: v.StringSchema<undefined>;
|
|
81
238
|
readonly table: v.StringSchema<undefined>;
|
|
82
239
|
}, undefined>, undefined>], undefined>, undefined>, undefined>;
|
|
83
|
-
}, undefined>, undefined>;
|
|
240
|
+
}, undefined>], undefined>, undefined>;
|
|
84
241
|
readonly hasMore: v.BooleanSchema<undefined>;
|
|
85
242
|
}, undefined>, v.ObjectSchema<{
|
|
86
243
|
readonly type: v.LiteralSchema<"queryDataSourceResult", undefined>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
import { notionDataSourcePageBridgeSchema } from "../dataSources/dataSourcePage.js";
|
|
2
|
+
import { legacyNotionDataSourcePageBridgeSchema, notionDataSourcePageBridgeSchema, } from "../dataSources/dataSourcePage.js";
|
|
3
3
|
// The schema accepts any string code. The type lists known codes for
|
|
4
4
|
// autocomplete, with an open string fallback for newer senders.
|
|
5
5
|
export const customBlockQueryDataSourceErrorCodeSchema = v.string();
|
|
@@ -16,7 +16,10 @@ export const queryDataSourceResultMessageSchema = v.variant("status", [
|
|
|
16
16
|
type: v.literal("queryDataSourceResult"),
|
|
17
17
|
subscriptionId: v.string(),
|
|
18
18
|
status: v.literal("success"),
|
|
19
|
-
items: v.array(
|
|
19
|
+
items: v.array(v.union([
|
|
20
|
+
notionDataSourcePageBridgeSchema,
|
|
21
|
+
legacyNotionDataSourcePageBridgeSchema,
|
|
22
|
+
])),
|
|
20
23
|
hasMore: v.boolean(),
|
|
21
24
|
}),
|
|
22
25
|
v.object({
|
|
@@ -3,4 +3,5 @@
|
|
|
3
3
|
* Increase this value for breaking wire changes. Hosts can continue to accept
|
|
4
4
|
* older versions, so this value does not set the minimum or maximum they accept.
|
|
5
5
|
*/
|
|
6
|
-
export declare const LATEST_BRIDGE_PROTOCOL_VERSION =
|
|
6
|
+
export declare const LATEST_BRIDGE_PROTOCOL_VERSION = 6;
|
|
7
|
+
export declare const LEGACY_PROPERTY_SHAPE_PROTOCOL_VERSION = 6;
|
|
@@ -3,4 +3,7 @@
|
|
|
3
3
|
* Increase this value for breaking wire changes. Hosts can continue to accept
|
|
4
4
|
* older versions, so this value does not set the minimum or maximum they accept.
|
|
5
5
|
*/
|
|
6
|
-
export const LATEST_BRIDGE_PROTOCOL_VERSION =
|
|
6
|
+
export const LATEST_BRIDGE_PROTOCOL_VERSION = 6;
|
|
7
|
+
// Protocol 6 introduces name-keyed property objects for data source queries.
|
|
8
|
+
// Keep this cutoff fixed when the latest protocol version increases.
|
|
9
|
+
export const LEGACY_PROPERTY_SHAPE_PROTOCOL_VERSION = 6;
|