@automate.ax/integration-contracts 0.89.2 → 0.90.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.
@@ -2,7 +2,7 @@ import * as z from "zod";
2
2
  import { type NotionSemanticWebhookEvent, type NotionWebhookEvent } from "./schemas.js";
3
3
  export * from "./schemas.js";
4
4
  export declare const NOTION_TRIGGER_CONFIG_SCHEMA: z.ZodObject<{}, z.core.$strip>;
5
- export declare const NOTION_WEBHOOK_EVENT_TYPES: readonly ["comment.created", "comment.deleted", "comment.updated", "data_source.content_updated", "data_source.created", "data_source.deleted", "data_source.moved", "data_source.schema_updated", "data_source.undeleted", "database.created", "database.deleted", "database.moved", "database.undeleted", "file_upload.completed", "file_upload.created", "file_upload.expired", "file_upload.upload_failed", "page.content_updated", "page.created", "page.deleted", "page.locked", "page.moved", "page.properties_updated", "page.transcription_block.transcript_deleted", "page.undeleted", "page.unlocked", "view.created", "view.deleted", "view.updated"];
5
+ export declare const NOTION_WEBHOOK_EVENT_TYPES: readonly ["comment.created", "comment.deleted", "comment.updated", "data_source.content_updated", "data_source.created", "data_source.deleted", "data_source.moved", "data_source.schema_updated", "data_source.undeleted", "database.content_updated", "database.created", "database.deleted", "database.moved", "database.schema_updated", "database.undeleted", "file_upload.completed", "file_upload.created", "file_upload.expired", "file_upload.upload_failed", "page.content_updated", "page.created", "page.deleted", "page.locked", "page.moved", "page.properties_updated", "page.transcription_block.transcript_deleted", "page.undeleted", "page.unlocked", "view.created", "view.deleted", "view.updated"];
6
6
  type NotionTriggerContract<TEvent> = {
7
7
  readonly configSchema: typeof NOTION_TRIGGER_CONFIG_SCHEMA;
8
8
  readonly eventSchema: z.ZodType<TEvent>;
@@ -11,9 +11,11 @@ type NotionSemanticTriggerTypes = {
11
11
  readonly "notion.comment.created": "comment.created";
12
12
  readonly "notion.comment.deleted": "comment.deleted";
13
13
  readonly "notion.comment.updated": "comment.updated";
14
+ readonly "notion.database.contentUpdated": "database.content_updated";
14
15
  readonly "notion.database.created": "database.created";
15
16
  readonly "notion.database.deleted": "database.deleted";
16
17
  readonly "notion.database.moved": "database.moved";
18
+ readonly "notion.database.schemaUpdated": "database.schema_updated";
17
19
  readonly "notion.database.undeleted": "database.undeleted";
18
20
  readonly "notion.dataSource.contentUpdated": "data_source.content_updated";
19
21
  readonly "notion.dataSource.created": "data_source.created";
@@ -53,9 +55,11 @@ export declare const notionEventTypeMap: {
53
55
  readonly "data_source.moved": "notion.dataSource.moved";
54
56
  readonly "data_source.schema_updated": "notion.dataSource.schemaUpdated";
55
57
  readonly "data_source.undeleted": "notion.dataSource.undeleted";
58
+ readonly "database.content_updated": "notion.database.contentUpdated";
56
59
  readonly "database.created": "notion.database.created";
57
60
  readonly "database.deleted": "notion.database.deleted";
58
61
  readonly "database.moved": "notion.database.moved";
62
+ readonly "database.schema_updated": "notion.database.schemaUpdated";
59
63
  readonly "database.undeleted": "notion.database.undeleted";
60
64
  readonly "file_upload.completed": "notion.fileUpload.completed";
61
65
  readonly "file_upload.created": "notion.fileUpload.created";
@@ -12,9 +12,11 @@ export const NOTION_WEBHOOK_EVENT_TYPES = [
12
12
  "data_source.moved",
13
13
  "data_source.schema_updated",
14
14
  "data_source.undeleted",
15
+ "database.content_updated",
15
16
  "database.created",
16
17
  "database.deleted",
17
18
  "database.moved",
19
+ "database.schema_updated",
18
20
  "database.undeleted",
19
21
  "file_upload.completed",
20
22
  "file_upload.created",
@@ -43,9 +45,11 @@ export const notionEventTypeMap = {
43
45
  "data_source.moved": "notion.dataSource.moved",
44
46
  "data_source.schema_updated": "notion.dataSource.schemaUpdated",
45
47
  "data_source.undeleted": "notion.dataSource.undeleted",
48
+ "database.content_updated": "notion.database.contentUpdated",
46
49
  "database.created": "notion.database.created",
47
50
  "database.deleted": "notion.database.deleted",
48
51
  "database.moved": "notion.database.moved",
52
+ "database.schema_updated": "notion.database.schemaUpdated",
49
53
  "database.undeleted": "notion.database.undeleted",
50
54
  "file_upload.completed": "notion.fileUpload.completed",
51
55
  "file_upload.created": "notion.fileUpload.created",
@@ -68,9 +72,11 @@ export const notionTriggerContracts = {
68
72
  "notion.comment.created": semanticContract("comment.created"),
69
73
  "notion.comment.deleted": semanticContract("comment.deleted"),
70
74
  "notion.comment.updated": semanticContract("comment.updated"),
75
+ "notion.database.contentUpdated": semanticContract("database.content_updated"),
71
76
  "notion.database.created": semanticContract("database.created"),
72
77
  "notion.database.deleted": semanticContract("database.deleted"),
73
78
  "notion.database.moved": semanticContract("database.moved"),
79
+ "notion.database.schemaUpdated": semanticContract("database.schema_updated"),
74
80
  "notion.database.undeleted": semanticContract("database.undeleted"),
75
81
  "notion.dataSource.contentUpdated": semanticContract("data_source.content_updated"),
76
82
  "notion.dataSource.created": semanticContract("data_source.created"),
@@ -477,6 +477,67 @@ declare const RAW_NOTION_EVENT_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
477
477
  timestamp: z.ZodISODateTime;
478
478
  workspace_id: z.ZodUUID;
479
479
  workspace_name: z.ZodString;
480
+ }, z.core.$catchall<z.ZodJSONSchema>>, z.ZodObject<{
481
+ data: z.ZodObject<{
482
+ parent: z.ZodObject<{
483
+ data_source_id: z.ZodOptional<z.ZodUUID>;
484
+ id: z.ZodUUID;
485
+ type: z.ZodEnum<{
486
+ team: "team";
487
+ space: "space";
488
+ agent: "agent";
489
+ block: "block";
490
+ page: "page";
491
+ database: "database";
492
+ }>;
493
+ }, z.core.$strip>;
494
+ updated_blocks: z.ZodArray<z.ZodObject<{
495
+ id: z.ZodUUID;
496
+ type: z.ZodEnum<{
497
+ block: "block";
498
+ page: "page";
499
+ database: "database";
500
+ }>;
501
+ }, z.core.$strip>>;
502
+ }, z.core.$strip>;
503
+ entity: z.ZodObject<{
504
+ id: z.ZodUUID;
505
+ type: z.ZodEnum<{
506
+ block: "block";
507
+ database: "database";
508
+ data_source: "data_source";
509
+ }>;
510
+ }, z.core.$strip>;
511
+ type: z.ZodLiteral<"database.content_updated">;
512
+ accessible_by: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
513
+ id: z.ZodUUID;
514
+ type: z.ZodLiteral<"person">;
515
+ }, z.core.$strip>, z.ZodObject<{
516
+ id: z.ZodUUID;
517
+ type: z.ZodLiteral<"bot">;
518
+ }, z.core.$strip>], "type">>>;
519
+ api_version: z.ZodEnum<{
520
+ "2022-06-28": "2022-06-28";
521
+ "2025-09-03": "2025-09-03";
522
+ "2026-03-11": "2026-03-11";
523
+ }>;
524
+ attempt_number: z.ZodNumber;
525
+ authors: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
526
+ id: z.ZodUUID;
527
+ type: z.ZodLiteral<"person">;
528
+ }, z.core.$strip>, z.ZodObject<{
529
+ id: z.ZodUUID;
530
+ type: z.ZodLiteral<"bot">;
531
+ }, z.core.$strip>, z.ZodObject<{
532
+ id: z.ZodUUID;
533
+ type: z.ZodLiteral<"agent">;
534
+ }, z.core.$strip>], "type">>;
535
+ id: z.ZodUUID;
536
+ integration_id: z.ZodUUID;
537
+ subscription_id: z.ZodUUID;
538
+ timestamp: z.ZodISODateTime;
539
+ workspace_id: z.ZodUUID;
540
+ workspace_name: z.ZodString;
480
541
  }, z.core.$catchall<z.ZodJSONSchema>>, z.ZodObject<{
481
542
  data: z.ZodObject<{
482
543
  parent: z.ZodObject<{
@@ -636,6 +697,68 @@ declare const RAW_NOTION_EVENT_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
636
697
  timestamp: z.ZodISODateTime;
637
698
  workspace_id: z.ZodUUID;
638
699
  workspace_name: z.ZodString;
700
+ }, z.core.$catchall<z.ZodJSONSchema>>, z.ZodObject<{
701
+ data: z.ZodObject<{
702
+ parent: z.ZodObject<{
703
+ data_source_id: z.ZodOptional<z.ZodUUID>;
704
+ id: z.ZodUUID;
705
+ type: z.ZodEnum<{
706
+ team: "team";
707
+ space: "space";
708
+ agent: "agent";
709
+ block: "block";
710
+ page: "page";
711
+ database: "database";
712
+ }>;
713
+ }, z.core.$strip>;
714
+ updated_properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
715
+ action: z.ZodEnum<{
716
+ deleted: "deleted";
717
+ created: "created";
718
+ updated: "updated";
719
+ }>;
720
+ id: z.ZodString;
721
+ name: z.ZodNullable<z.ZodString>;
722
+ }, z.core.$strip>>>;
723
+ }, z.core.$strip>;
724
+ entity: z.ZodObject<{
725
+ id: z.ZodUUID;
726
+ type: z.ZodEnum<{
727
+ block: "block";
728
+ database: "database";
729
+ data_source: "data_source";
730
+ }>;
731
+ }, z.core.$strip>;
732
+ type: z.ZodLiteral<"database.schema_updated">;
733
+ accessible_by: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
734
+ id: z.ZodUUID;
735
+ type: z.ZodLiteral<"person">;
736
+ }, z.core.$strip>, z.ZodObject<{
737
+ id: z.ZodUUID;
738
+ type: z.ZodLiteral<"bot">;
739
+ }, z.core.$strip>], "type">>>;
740
+ api_version: z.ZodEnum<{
741
+ "2022-06-28": "2022-06-28";
742
+ "2025-09-03": "2025-09-03";
743
+ "2026-03-11": "2026-03-11";
744
+ }>;
745
+ attempt_number: z.ZodNumber;
746
+ authors: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
747
+ id: z.ZodUUID;
748
+ type: z.ZodLiteral<"person">;
749
+ }, z.core.$strip>, z.ZodObject<{
750
+ id: z.ZodUUID;
751
+ type: z.ZodLiteral<"bot">;
752
+ }, z.core.$strip>, z.ZodObject<{
753
+ id: z.ZodUUID;
754
+ type: z.ZodLiteral<"agent">;
755
+ }, z.core.$strip>], "type">>;
756
+ id: z.ZodUUID;
757
+ integration_id: z.ZodUUID;
758
+ subscription_id: z.ZodUUID;
759
+ timestamp: z.ZodISODateTime;
760
+ workspace_id: z.ZodUUID;
761
+ workspace_name: z.ZodString;
639
762
  }, z.core.$catchall<z.ZodJSONSchema>>, z.ZodObject<{
640
763
  data: z.ZodObject<{
641
764
  parent: z.ZodObject<{
@@ -1933,6 +2056,67 @@ export declare const NOTION_EVENT_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
1933
2056
  timestamp: z.ZodISODateTime;
1934
2057
  workspace_id: z.ZodUUID;
1935
2058
  workspace_name: z.ZodString;
2059
+ }, z.core.$catchall<z.ZodJSONSchema>>, z.ZodObject<{
2060
+ data: z.ZodObject<{
2061
+ parent: z.ZodObject<{
2062
+ data_source_id: z.ZodOptional<z.ZodUUID>;
2063
+ id: z.ZodUUID;
2064
+ type: z.ZodEnum<{
2065
+ team: "team";
2066
+ space: "space";
2067
+ agent: "agent";
2068
+ block: "block";
2069
+ page: "page";
2070
+ database: "database";
2071
+ }>;
2072
+ }, z.core.$strip>;
2073
+ updated_blocks: z.ZodArray<z.ZodObject<{
2074
+ id: z.ZodUUID;
2075
+ type: z.ZodEnum<{
2076
+ block: "block";
2077
+ page: "page";
2078
+ database: "database";
2079
+ }>;
2080
+ }, z.core.$strip>>;
2081
+ }, z.core.$strip>;
2082
+ entity: z.ZodObject<{
2083
+ id: z.ZodUUID;
2084
+ type: z.ZodEnum<{
2085
+ block: "block";
2086
+ database: "database";
2087
+ data_source: "data_source";
2088
+ }>;
2089
+ }, z.core.$strip>;
2090
+ type: z.ZodLiteral<"database.content_updated">;
2091
+ accessible_by: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
2092
+ id: z.ZodUUID;
2093
+ type: z.ZodLiteral<"person">;
2094
+ }, z.core.$strip>, z.ZodObject<{
2095
+ id: z.ZodUUID;
2096
+ type: z.ZodLiteral<"bot">;
2097
+ }, z.core.$strip>], "type">>>;
2098
+ api_version: z.ZodEnum<{
2099
+ "2022-06-28": "2022-06-28";
2100
+ "2025-09-03": "2025-09-03";
2101
+ "2026-03-11": "2026-03-11";
2102
+ }>;
2103
+ attempt_number: z.ZodNumber;
2104
+ authors: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
2105
+ id: z.ZodUUID;
2106
+ type: z.ZodLiteral<"person">;
2107
+ }, z.core.$strip>, z.ZodObject<{
2108
+ id: z.ZodUUID;
2109
+ type: z.ZodLiteral<"bot">;
2110
+ }, z.core.$strip>, z.ZodObject<{
2111
+ id: z.ZodUUID;
2112
+ type: z.ZodLiteral<"agent">;
2113
+ }, z.core.$strip>], "type">>;
2114
+ id: z.ZodUUID;
2115
+ integration_id: z.ZodUUID;
2116
+ subscription_id: z.ZodUUID;
2117
+ timestamp: z.ZodISODateTime;
2118
+ workspace_id: z.ZodUUID;
2119
+ workspace_name: z.ZodString;
1936
2120
  }, z.core.$catchall<z.ZodJSONSchema>>, z.ZodObject<{
1937
2121
  data: z.ZodObject<{
1938
2122
  parent: z.ZodObject<{
@@ -2092,6 +2276,68 @@ export declare const NOTION_EVENT_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
2092
2276
  timestamp: z.ZodISODateTime;
2093
2277
  workspace_id: z.ZodUUID;
2094
2278
  workspace_name: z.ZodString;
2279
+ }, z.core.$catchall<z.ZodJSONSchema>>, z.ZodObject<{
2280
+ data: z.ZodObject<{
2281
+ parent: z.ZodObject<{
2282
+ data_source_id: z.ZodOptional<z.ZodUUID>;
2283
+ id: z.ZodUUID;
2284
+ type: z.ZodEnum<{
2285
+ team: "team";
2286
+ space: "space";
2287
+ agent: "agent";
2288
+ block: "block";
2289
+ page: "page";
2290
+ database: "database";
2291
+ }>;
2292
+ }, z.core.$strip>;
2293
+ updated_properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
2294
+ action: z.ZodEnum<{
2295
+ deleted: "deleted";
2296
+ created: "created";
2297
+ updated: "updated";
2298
+ }>;
2299
+ id: z.ZodString;
2300
+ name: z.ZodNullable<z.ZodString>;
2301
+ }, z.core.$strip>>>;
2302
+ }, z.core.$strip>;
2303
+ entity: z.ZodObject<{
2304
+ id: z.ZodUUID;
2305
+ type: z.ZodEnum<{
2306
+ block: "block";
2307
+ database: "database";
2308
+ data_source: "data_source";
2309
+ }>;
2310
+ }, z.core.$strip>;
2311
+ type: z.ZodLiteral<"database.schema_updated">;
2312
+ accessible_by: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
2313
+ id: z.ZodUUID;
2314
+ type: z.ZodLiteral<"person">;
2315
+ }, z.core.$strip>, z.ZodObject<{
2316
+ id: z.ZodUUID;
2317
+ type: z.ZodLiteral<"bot">;
2318
+ }, z.core.$strip>], "type">>>;
2319
+ api_version: z.ZodEnum<{
2320
+ "2022-06-28": "2022-06-28";
2321
+ "2025-09-03": "2025-09-03";
2322
+ "2026-03-11": "2026-03-11";
2323
+ }>;
2324
+ attempt_number: z.ZodNumber;
2325
+ authors: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
2326
+ id: z.ZodUUID;
2327
+ type: z.ZodLiteral<"person">;
2328
+ }, z.core.$strip>, z.ZodObject<{
2329
+ id: z.ZodUUID;
2330
+ type: z.ZodLiteral<"bot">;
2331
+ }, z.core.$strip>, z.ZodObject<{
2332
+ id: z.ZodUUID;
2333
+ type: z.ZodLiteral<"agent">;
2334
+ }, z.core.$strip>], "type">>;
2335
+ id: z.ZodUUID;
2336
+ integration_id: z.ZodUUID;
2337
+ subscription_id: z.ZodUUID;
2338
+ timestamp: z.ZodISODateTime;
2339
+ workspace_id: z.ZodUUID;
2340
+ workspace_name: z.ZodString;
2095
2341
  }, z.core.$catchall<z.ZodJSONSchema>>, z.ZodObject<{
2096
2342
  data: z.ZodObject<{
2097
2343
  parent: z.ZodObject<{
@@ -78,9 +78,24 @@ const RAW_NOTION_EVENT_SCHEMA = z.discriminatedUnion("type", [
78
78
  .optional(),
79
79
  })),
80
80
  eventWithDataSchema("data_source.undeleted", DATABASE_ENTITY_SCHEMA, PARENT_DATA_SCHEMA),
81
+ eventWithDataSchema("database.content_updated", DATABASE_ENTITY_SCHEMA, z.object({
82
+ parent: PARENT_SCHEMA,
83
+ updated_blocks: UPDATED_BLOCK_SCHEMA.array(),
84
+ })),
81
85
  eventWithDataSchema("database.created", DATABASE_ENTITY_SCHEMA, PARENT_DATA_SCHEMA),
82
86
  eventWithDataSchema("database.deleted", DATABASE_ENTITY_SCHEMA, PARENT_DATA_SCHEMA),
83
87
  eventWithDataSchema("database.moved", DATABASE_ENTITY_SCHEMA, PARENT_DATA_SCHEMA),
88
+ eventWithDataSchema("database.schema_updated", DATABASE_ENTITY_SCHEMA, z.object({
89
+ parent: PARENT_SCHEMA,
90
+ updated_properties: z
91
+ .object({
92
+ action: z.enum(["created", "updated", "deleted"]),
93
+ id: z.string(),
94
+ name: z.string().nullable(),
95
+ })
96
+ .array()
97
+ .optional(),
98
+ })),
84
99
  eventWithDataSchema("database.undeleted", DATABASE_ENTITY_SCHEMA, PARENT_DATA_SCHEMA),
85
100
  eventSchema("file_upload.completed", FILE_UPLOAD_ENTITY_SCHEMA),
86
101
  eventSchema("file_upload.created", FILE_UPLOAD_ENTITY_SCHEMA),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automate.ax/integration-contracts",
3
- "version": "0.89.2",
3
+ "version": "0.90.0",
4
4
  "description": "Shared integration payload contracts and provider primitives for Automate.ax.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -47,7 +47,7 @@
47
47
  }
48
48
  },
49
49
  "dependencies": {
50
- "@automate.ax/codec": "0.89.2",
50
+ "@automate.ax/codec": "0.90.0",
51
51
  "@cfworker/json-schema": "^4.1.1",
52
52
  "@googleapis/calendar": "^15.0.0",
53
53
  "@googleapis/forms": "^6.0.1",
@@ -21,9 +21,11 @@ export const NOTION_WEBHOOK_EVENT_TYPES = [
21
21
  "data_source.moved",
22
22
  "data_source.schema_updated",
23
23
  "data_source.undeleted",
24
+ "database.content_updated",
24
25
  "database.created",
25
26
  "database.deleted",
26
27
  "database.moved",
28
+ "database.schema_updated",
27
29
  "database.undeleted",
28
30
  "file_upload.completed",
29
31
  "file_upload.created",
@@ -52,9 +54,11 @@ type NotionSemanticTriggerTypes = {
52
54
  readonly "notion.comment.created": "comment.created"
53
55
  readonly "notion.comment.deleted": "comment.deleted"
54
56
  readonly "notion.comment.updated": "comment.updated"
57
+ readonly "notion.database.contentUpdated": "database.content_updated"
55
58
  readonly "notion.database.created": "database.created"
56
59
  readonly "notion.database.deleted": "database.deleted"
57
60
  readonly "notion.database.moved": "database.moved"
61
+ readonly "notion.database.schemaUpdated": "database.schema_updated"
58
62
  readonly "notion.database.undeleted": "database.undeleted"
59
63
  readonly "notion.dataSource.contentUpdated": "data_source.content_updated"
60
64
  readonly "notion.dataSource.created": "data_source.created"
@@ -98,9 +102,11 @@ export const notionEventTypeMap = {
98
102
  "data_source.moved": "notion.dataSource.moved",
99
103
  "data_source.schema_updated": "notion.dataSource.schemaUpdated",
100
104
  "data_source.undeleted": "notion.dataSource.undeleted",
105
+ "database.content_updated": "notion.database.contentUpdated",
101
106
  "database.created": "notion.database.created",
102
107
  "database.deleted": "notion.database.deleted",
103
108
  "database.moved": "notion.database.moved",
109
+ "database.schema_updated": "notion.database.schemaUpdated",
104
110
  "database.undeleted": "notion.database.undeleted",
105
111
  "file_upload.completed": "notion.fileUpload.completed",
106
112
  "file_upload.created": "notion.fileUpload.created",
@@ -128,9 +134,13 @@ export const notionTriggerContracts: NotionTriggerContracts = {
128
134
  "notion.comment.created": semanticContract("comment.created"),
129
135
  "notion.comment.deleted": semanticContract("comment.deleted"),
130
136
  "notion.comment.updated": semanticContract("comment.updated"),
137
+ "notion.database.contentUpdated": semanticContract(
138
+ "database.content_updated",
139
+ ),
131
140
  "notion.database.created": semanticContract("database.created"),
132
141
  "notion.database.deleted": semanticContract("database.deleted"),
133
142
  "notion.database.moved": semanticContract("database.moved"),
143
+ "notion.database.schemaUpdated": semanticContract("database.schema_updated"),
134
144
  "notion.database.undeleted": semanticContract("database.undeleted"),
135
145
  "notion.dataSource.contentUpdated": semanticContract(
136
146
  "data_source.content_updated",
@@ -8,9 +8,11 @@ import type {
8
8
  DataSourceMovedWebhookPayload,
9
9
  DataSourceSchemaUpdatedWebhookPayload,
10
10
  DataSourceUndeletedWebhookPayload,
11
+ DatabaseContentUpdatedWebhookPayload,
11
12
  DatabaseCreatedWebhookPayload,
12
13
  DatabaseDeletedWebhookPayload,
13
14
  DatabaseMovedWebhookPayload,
15
+ DatabaseSchemaUpdatedWebhookPayload,
14
16
  DatabaseUndeletedWebhookPayload,
15
17
  FileUploadCompletedWebhookPayload,
16
18
  FileUploadCreatedWebhookPayload,
@@ -41,9 +43,11 @@ type OfficialNotionWebhookEvent =
41
43
  | DataSourceMovedWebhookPayload
42
44
  | DataSourceSchemaUpdatedWebhookPayload
43
45
  | DataSourceUndeletedWebhookPayload
46
+ | DatabaseContentUpdatedWebhookPayload
44
47
  | DatabaseCreatedWebhookPayload
45
48
  | DatabaseDeletedWebhookPayload
46
49
  | DatabaseMovedWebhookPayload
50
+ | DatabaseSchemaUpdatedWebhookPayload
47
51
  | DatabaseUndeletedWebhookPayload
48
52
  | FileUploadCompletedWebhookPayload
49
53
  | FileUploadCreatedWebhookPayload
@@ -193,6 +197,14 @@ const RAW_NOTION_EVENT_SCHEMA = z.discriminatedUnion("type", [
193
197
  DATABASE_ENTITY_SCHEMA,
194
198
  PARENT_DATA_SCHEMA,
195
199
  ),
200
+ eventWithDataSchema(
201
+ "database.content_updated",
202
+ DATABASE_ENTITY_SCHEMA,
203
+ z.object({
204
+ parent: PARENT_SCHEMA,
205
+ updated_blocks: UPDATED_BLOCK_SCHEMA.array(),
206
+ }),
207
+ ),
196
208
  eventWithDataSchema(
197
209
  "database.created",
198
210
  DATABASE_ENTITY_SCHEMA,
@@ -208,6 +220,21 @@ const RAW_NOTION_EVENT_SCHEMA = z.discriminatedUnion("type", [
208
220
  DATABASE_ENTITY_SCHEMA,
209
221
  PARENT_DATA_SCHEMA,
210
222
  ),
223
+ eventWithDataSchema(
224
+ "database.schema_updated",
225
+ DATABASE_ENTITY_SCHEMA,
226
+ z.object({
227
+ parent: PARENT_SCHEMA,
228
+ updated_properties: z
229
+ .object({
230
+ action: z.enum(["created", "updated", "deleted"]),
231
+ id: z.string(),
232
+ name: z.string().nullable(),
233
+ })
234
+ .array()
235
+ .optional(),
236
+ }),
237
+ ),
211
238
  eventWithDataSchema(
212
239
  "database.undeleted",
213
240
  DATABASE_ENTITY_SCHEMA,