@notionhq/custom-blocks-host 0.1.5 → 0.1.7

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.
@@ -6,6 +6,10 @@ import * as v from "valibot";
6
6
  */
7
7
  export declare const notionDataSourcePageBridgeSchema: v.ObjectSchema<{
8
8
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
9
+ /** Whether the page or an ancestor is archived. */
10
+ readonly is_archived: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
11
+ /** Whether the page or an ancestor is in Trash. */
12
+ readonly in_trash: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
9
13
  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<{
10
14
  readonly type: v.LiteralSchema<"date", undefined>;
11
15
  readonly start_date: v.StringSchema<undefined>;
@@ -8,5 +8,10 @@ import { notionDataSourceValueSchema } from "./dataSourceValue.js";
8
8
  */
9
9
  export const notionDataSourcePageBridgeSchema = v.object({
10
10
  id: notionPageIdSchema,
11
+ // TODO(custom-blocks): Require is_archived and in_trash in bridge protocol v4.
12
+ /** Whether the page or an ancestor is archived. */
13
+ is_archived: v.optional(v.boolean()),
14
+ /** Whether the page or an ancestor is in Trash. */
15
+ in_trash: v.optional(v.boolean()),
11
16
  propertiesById: v.record(v.string(), v.optional(notionDataSourceValueSchema)),
12
17
  });
@@ -200,6 +200,7 @@ export declare const createPageResultMessageSchema: v.VariantSchema<"status", [v
200
200
  }, undefined>], undefined>, undefined>;
201
201
  readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
202
202
  readonly public_url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
203
+ readonly is_archived: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
203
204
  readonly in_trash: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
204
205
  }, undefined>;
205
206
  }, undefined>, v.ObjectSchema<{
@@ -205,6 +205,7 @@ export declare const getPageResultMessageSchema: v.VariantSchema<"status", [v.Ob
205
205
  }, undefined>], undefined>, undefined>;
206
206
  readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
207
207
  readonly public_url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
208
+ readonly is_archived: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
208
209
  readonly in_trash: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
209
210
  }, undefined>;
210
211
  }, undefined>, v.ObjectSchema<{
@@ -449,6 +449,8 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
449
449
  readonly status: v.LiteralSchema<"success", undefined>;
450
450
  readonly items: v.ArraySchema<v.ObjectSchema<{
451
451
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
452
+ readonly is_archived: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
453
+ readonly in_trash: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
452
454
  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<{
453
455
  readonly type: v.LiteralSchema<"date", undefined>;
454
456
  readonly start_date: v.StringSchema<undefined>;
@@ -709,6 +711,7 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
709
711
  }, undefined>], undefined>, undefined>;
710
712
  readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
711
713
  readonly public_url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
714
+ readonly is_archived: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
712
715
  readonly in_trash: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
713
716
  }, undefined>;
714
717
  }, undefined>, v.ObjectSchema<{
@@ -908,6 +911,7 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
908
911
  }, undefined>], undefined>, undefined>;
909
912
  readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
910
913
  readonly public_url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
914
+ readonly is_archived: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
911
915
  readonly in_trash: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
912
916
  }, undefined>;
913
917
  }, undefined>, v.ObjectSchema<{
@@ -1160,6 +1164,7 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
1160
1164
  }, undefined>], undefined>, undefined>;
1161
1165
  readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1162
1166
  readonly public_url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1167
+ readonly is_archived: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
1163
1168
  readonly in_trash: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
1164
1169
  }, undefined>;
1165
1170
  }, undefined>, v.ObjectSchema<{
@@ -17,6 +17,8 @@ export declare const queryDataSourceResultMessageSchema: v.VariantSchema<"status
17
17
  readonly status: v.LiteralSchema<"success", undefined>;
18
18
  readonly items: v.ArraySchema<v.ObjectSchema<{
19
19
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
20
+ readonly is_archived: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
21
+ readonly in_trash: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
20
22
  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<{
21
23
  readonly type: v.LiteralSchema<"date", undefined>;
22
24
  readonly start_date: v.StringSchema<undefined>;
@@ -199,6 +199,7 @@ export declare const updatePageResultMessageSchema: v.VariantSchema<"status", [v
199
199
  }, undefined>], undefined>, undefined>;
200
200
  readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
201
201
  readonly public_url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
202
+ readonly is_archived: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
202
203
  readonly in_trash: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
203
204
  }, undefined>;
204
205
  }, undefined>, v.ObjectSchema<{
@@ -595,6 +595,9 @@ export declare const notionPageSchema: v.ObjectSchema<{
595
595
  }, undefined>], undefined>, undefined>;
596
596
  readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
597
597
  readonly public_url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
598
+ /** Whether the page or an ancestor is archived. */
599
+ readonly is_archived: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
600
+ /** Whether the page or an ancestor is in Trash. */
598
601
  readonly in_trash: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
599
602
  }, undefined>;
600
603
  export type NotionPage = v.InferOutput<typeof notionPageSchema>;
@@ -207,5 +207,9 @@ export const notionPageSchema = v.object({
207
207
  cover: v.optional(notionPageCoverSchema),
208
208
  url: v.optional(v.string()),
209
209
  public_url: v.optional(v.string()),
210
+ // TODO(custom-blocks): Require is_archived and in_trash in bridge protocol v4.
211
+ /** Whether the page or an ancestor is archived. */
212
+ is_archived: v.optional(v.boolean()),
213
+ /** Whether the page or an ancestor is in Trash. */
210
214
  in_trash: v.optional(v.boolean()),
211
215
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@notionhq/custom-blocks-host",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "Reusable host runtime for Notion custom blocks.",
5
5
  "license": "MIT",
6
6
  "type": "module",