@automate.ax/integration-contracts 0.89.0 → 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.
- package/dist/github/additional-events.d.ts +5 -3
- package/dist/github/additional-events.js +9 -1
- package/dist/github/openapi-types.generated.d.ts +27 -29
- package/dist/github/webhook-schemas.generated.json +1 -1
- package/dist/notion/index.d.ts +5 -1
- package/dist/notion/index.js +6 -0
- package/dist/notion/schemas.d.ts +246 -0
- package/dist/notion/schemas.js +15 -0
- package/package.json +2 -2
- package/src/github/additional-events.ts +23 -3
- package/src/github/openapi-types.generated.ts +27 -29
- package/src/github/webhook-schemas.generated.json +1 -1
- package/src/notion/index.ts +10 -0
- package/src/notion/schemas.ts +27 -0
package/src/notion/index.ts
CHANGED
|
@@ -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",
|
package/src/notion/schemas.ts
CHANGED
|
@@ -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,
|