@automate.ax/integration-contracts 0.91.0 → 0.92.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.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"];
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"];
6
6
  type NotionTriggerContract<TEvent> = {
7
7
  readonly configSchema: typeof NOTION_TRIGGER_CONFIG_SCHEMA;
8
8
  readonly eventSchema: z.ZodType<TEvent>;
@@ -11,11 +11,9 @@ 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";
15
14
  readonly "notion.database.created": "database.created";
16
15
  readonly "notion.database.deleted": "database.deleted";
17
16
  readonly "notion.database.moved": "database.moved";
18
- readonly "notion.database.schemaUpdated": "database.schema_updated";
19
17
  readonly "notion.database.undeleted": "database.undeleted";
20
18
  readonly "notion.dataSource.contentUpdated": "data_source.content_updated";
21
19
  readonly "notion.dataSource.created": "data_source.created";
@@ -55,11 +53,9 @@ export declare const notionEventTypeMap: {
55
53
  readonly "data_source.moved": "notion.dataSource.moved";
56
54
  readonly "data_source.schema_updated": "notion.dataSource.schemaUpdated";
57
55
  readonly "data_source.undeleted": "notion.dataSource.undeleted";
58
- readonly "database.content_updated": "notion.database.contentUpdated";
59
56
  readonly "database.created": "notion.database.created";
60
57
  readonly "database.deleted": "notion.database.deleted";
61
58
  readonly "database.moved": "notion.database.moved";
62
- readonly "database.schema_updated": "notion.database.schemaUpdated";
63
59
  readonly "database.undeleted": "notion.database.undeleted";
64
60
  readonly "file_upload.completed": "notion.fileUpload.completed";
65
61
  readonly "file_upload.created": "notion.fileUpload.created";
@@ -12,11 +12,9 @@ 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",
16
15
  "database.created",
17
16
  "database.deleted",
18
17
  "database.moved",
19
- "database.schema_updated",
20
18
  "database.undeleted",
21
19
  "file_upload.completed",
22
20
  "file_upload.created",
@@ -45,11 +43,9 @@ export const notionEventTypeMap = {
45
43
  "data_source.moved": "notion.dataSource.moved",
46
44
  "data_source.schema_updated": "notion.dataSource.schemaUpdated",
47
45
  "data_source.undeleted": "notion.dataSource.undeleted",
48
- "database.content_updated": "notion.database.contentUpdated",
49
46
  "database.created": "notion.database.created",
50
47
  "database.deleted": "notion.database.deleted",
51
48
  "database.moved": "notion.database.moved",
52
- "database.schema_updated": "notion.database.schemaUpdated",
53
49
  "database.undeleted": "notion.database.undeleted",
54
50
  "file_upload.completed": "notion.fileUpload.completed",
55
51
  "file_upload.created": "notion.fileUpload.created",
@@ -72,11 +68,9 @@ export const notionTriggerContracts = {
72
68
  "notion.comment.created": semanticContract("comment.created"),
73
69
  "notion.comment.deleted": semanticContract("comment.deleted"),
74
70
  "notion.comment.updated": semanticContract("comment.updated"),
75
- "notion.database.contentUpdated": semanticContract("database.content_updated"),
76
71
  "notion.database.created": semanticContract("database.created"),
77
72
  "notion.database.deleted": semanticContract("database.deleted"),
78
73
  "notion.database.moved": semanticContract("database.moved"),
79
- "notion.database.schemaUpdated": semanticContract("database.schema_updated"),
80
74
  "notion.database.undeleted": semanticContract("database.undeleted"),
81
75
  "notion.dataSource.contentUpdated": semanticContract("data_source.content_updated"),
82
76
  "notion.dataSource.created": semanticContract("data_source.created"),
@@ -477,67 +477,6 @@ 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;
541
480
  }, z.core.$catchall<z.ZodJSONSchema>>, z.ZodObject<{
542
481
  data: z.ZodObject<{
543
482
  parent: z.ZodObject<{
@@ -697,68 +636,6 @@ declare const RAW_NOTION_EVENT_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
697
636
  timestamp: z.ZodISODateTime;
698
637
  workspace_id: z.ZodUUID;
699
638
  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;
762
639
  }, z.core.$catchall<z.ZodJSONSchema>>, z.ZodObject<{
763
640
  data: z.ZodObject<{
764
641
  parent: z.ZodObject<{
@@ -2056,67 +1933,6 @@ export declare const NOTION_EVENT_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
2056
1933
  timestamp: z.ZodISODateTime;
2057
1934
  workspace_id: z.ZodUUID;
2058
1935
  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;
2120
1936
  }, z.core.$catchall<z.ZodJSONSchema>>, z.ZodObject<{
2121
1937
  data: z.ZodObject<{
2122
1938
  parent: z.ZodObject<{
@@ -2276,68 +2092,6 @@ export declare const NOTION_EVENT_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
2276
2092
  timestamp: z.ZodISODateTime;
2277
2093
  workspace_id: z.ZodUUID;
2278
2094
  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;
2341
2095
  }, z.core.$catchall<z.ZodJSONSchema>>, z.ZodObject<{
2342
2096
  data: z.ZodObject<{
2343
2097
  parent: z.ZodObject<{
@@ -78,24 +78,9 @@ 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
- })),
85
81
  eventWithDataSchema("database.created", DATABASE_ENTITY_SCHEMA, PARENT_DATA_SCHEMA),
86
82
  eventWithDataSchema("database.deleted", DATABASE_ENTITY_SCHEMA, PARENT_DATA_SCHEMA),
87
83
  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
- })),
99
84
  eventWithDataSchema("database.undeleted", DATABASE_ENTITY_SCHEMA, PARENT_DATA_SCHEMA),
100
85
  eventSchema("file_upload.completed", FILE_UPLOAD_ENTITY_SCHEMA),
101
86
  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.91.0",
3
+ "version": "0.92.0",
4
4
  "description": "Shared integration payload contracts and provider primitives for Automate.ax.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -48,7 +48,7 @@
48
48
  }
49
49
  },
50
50
  "dependencies": {
51
- "@automate.ax/codec": "0.91.0",
51
+ "@automate.ax/codec": "0.92.0",
52
52
  "@cfworker/json-schema": "^4.1.1",
53
53
  "@googleapis/calendar": "^15.0.0",
54
54
  "@googleapis/forms": "^6.0.1",
package/src/close/api.ts CHANGED
@@ -29,6 +29,7 @@ interface CloseRequestOptions<TSchema extends z.ZodType> {
29
29
  string,
30
30
  boolean | number | string | readonly string[] | null | undefined
31
31
  >
32
+ responseKeyFormat?: "camelCase" | "provider"
32
33
  responseSchema: TSchema
33
34
  }
34
35
 
@@ -65,7 +66,8 @@ export function getCloseApi(secret: unknown) {
65
66
  *
66
67
  * Query keys are provider-native so callers can use Close's
67
68
  * double-underscore filters. Request bodies and responses use public
68
- * camelCase keys.
69
+ * camelCase keys unless an opaque provider response must retain exact
70
+ * keys.
69
71
  *
70
72
  * @param path - Relative path below Close's API root.
71
73
  * @param options - Request method, query, body, and response schema.
@@ -118,8 +120,9 @@ export function getCloseApi(secret: unknown) {
118
120
  method: options.method ?? "GET",
119
121
  })
120
122
  const text = await response.text()
123
+ const parsed = text ? parseJson(text) : null
121
124
  const result = CLOSE_RESPONSE_SCHEMA.safeParse(
122
- fromClose(text ? parseJson(text) : null),
125
+ options.responseKeyFormat === "provider" ? parsed : fromClose(parsed),
123
126
  )
124
127
  if (!response.ok || !result.success) {
125
128
  throw new CloseApiError(
@@ -161,11 +161,19 @@ export type GitHubCheckRunNeutralEvent = GitHubCheckRunCompletedEvent & {
161
161
  conclusion: "neutral"
162
162
  }
163
163
  }
164
- export type GitHubCheckRunPendingEvent = GitHubCheckRunCompletedEvent & {
165
- check_run: GitHubCheckRunCompletedEvent["check_run"] & {
166
- conclusion: "pending"
167
- }
168
- }
164
+ export type GitHubCheckRunPendingEvent =
165
+ | (GitHubCheckRunCreatedEvent & {
166
+ check_run: GitHubCheckRunCreatedEvent["check_run"] & {
167
+ conclusion: null
168
+ status: "pending"
169
+ }
170
+ })
171
+ | (GitHubCheckRunCompletedEvent & {
172
+ check_run: GitHubCheckRunCompletedEvent["check_run"] & {
173
+ conclusion: "pending"
174
+ status: "completed"
175
+ }
176
+ })
169
177
  export type GitHubCheckRunSkippedEvent = GitHubCheckRunCompletedEvent & {
170
178
  check_run: GitHubCheckRunCompletedEvent["check_run"] & {
171
179
  conclusion: "skipped"
@@ -176,11 +184,19 @@ export type GitHubCheckRunStaleEvent = GitHubCheckRunCompletedEvent & {
176
184
  conclusion: "stale"
177
185
  }
178
186
  }
179
- export type GitHubCheckRunWaitingEvent = GitHubCheckRunCompletedEvent & {
180
- check_run: GitHubCheckRunCompletedEvent["check_run"] & {
181
- conclusion: "waiting"
182
- }
183
- }
187
+ export type GitHubCheckRunWaitingEvent =
188
+ | (GitHubCheckRunCreatedEvent & {
189
+ check_run: GitHubCheckRunCreatedEvent["check_run"] & {
190
+ conclusion: null
191
+ status: "waiting"
192
+ }
193
+ })
194
+ | (GitHubCheckRunCompletedEvent & {
195
+ check_run: GitHubCheckRunCompletedEvent["check_run"] & {
196
+ conclusion: "waiting"
197
+ status: "completed"
198
+ }
199
+ })
184
200
 
185
201
  /** Official GitHub check-suite webhook payload union. */
186
202
  export type GitHubCheckSuiteEvent = GitHubWebhookPayload<
@@ -671,7 +687,12 @@ export const GITHUB_CHECK_RUN_PENDING_EVENT_SCHEMA: GitHubWebhookSchema<GitHubCh
671
687
  githubSemanticEventSchema<GitHubCheckRunEvent, GitHubCheckRunPendingEvent>(
672
688
  GITHUB_CHECK_RUN_EVENT_SCHEMA,
673
689
  (event) =>
674
- event.action === "completed" && event.check_run.conclusion === "pending",
690
+ (event.action === "created" &&
691
+ event.check_run.status === "pending" &&
692
+ event.check_run.conclusion === null) ||
693
+ (event.action === "completed" &&
694
+ event.check_run.status === "completed" &&
695
+ event.check_run.conclusion === "pending"),
675
696
  )
676
697
  export const GITHUB_CHECK_RUN_SKIPPED_EVENT_SCHEMA: GitHubWebhookSchema<GitHubCheckRunSkippedEvent> =
677
698
  githubSemanticEventSchema<GitHubCheckRunEvent, GitHubCheckRunSkippedEvent>(
@@ -689,7 +710,12 @@ export const GITHUB_CHECK_RUN_WAITING_EVENT_SCHEMA: GitHubWebhookSchema<GitHubCh
689
710
  githubSemanticEventSchema<GitHubCheckRunEvent, GitHubCheckRunWaitingEvent>(
690
711
  GITHUB_CHECK_RUN_EVENT_SCHEMA,
691
712
  (event) =>
692
- event.action === "completed" && event.check_run.conclusion === "waiting",
713
+ (event.action === "created" &&
714
+ event.check_run.status === "waiting" &&
715
+ event.check_run.conclusion === null) ||
716
+ (event.action === "completed" &&
717
+ event.check_run.status === "completed" &&
718
+ event.check_run.conclusion === "waiting"),
693
719
  )
694
720
 
695
721
  export const GITHUB_CHECK_SUITE_EVENT_SCHEMA: GitHubWebhookSchema<GitHubCheckSuiteEvent> =
@@ -611,7 +611,7 @@ export type components = {
611
611
  * @example queued
612
612
  * @enum {string}
613
613
  */
614
- status: "queued" | "in_progress" | "completed" | "pending";
614
+ status: "queued" | "in_progress" | "completed" | "pending" | "requested" | "waiting";
615
615
  /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */
616
616
  url: string;
617
617
  };