@automate.ax/integration-contracts 0.111.0 → 0.112.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/vercel/index.d.ts +1987 -319
- package/dist/vercel/index.js +145 -1
- package/dist/vercel/schemas.d.ts +2518 -165
- package/dist/vercel/schemas.js +366 -0
- package/package.json +2 -2
- package/src/vercel/index.ts +154 -0
- package/src/vercel/schemas.ts +556 -0
package/src/vercel/schemas.ts
CHANGED
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
import * as z from "zod"
|
|
2
2
|
|
|
3
3
|
export const VERCEL_DEPLOYMENT_EVENT_TYPES = [
|
|
4
|
+
"deployment.check-rerequested",
|
|
5
|
+
"deployment.cleanup",
|
|
4
6
|
"deployment.created",
|
|
5
7
|
"deployment.ready",
|
|
6
8
|
"deployment.succeeded",
|
|
7
9
|
"deployment.error",
|
|
8
10
|
"deployment.canceled",
|
|
9
11
|
"deployment.promoted",
|
|
12
|
+
"deployment.rollback",
|
|
13
|
+
"deployment.integration.action.cancel",
|
|
14
|
+
"deployment.integration.action.cleanup",
|
|
15
|
+
"deployment.integration.action.start",
|
|
16
|
+
] as const
|
|
17
|
+
|
|
18
|
+
export const VERCEL_DOMAIN_EVENT_TYPES = [
|
|
19
|
+
"domain.created",
|
|
20
|
+
"domain.auto-renew-changed",
|
|
21
|
+
"domain.certificate-add",
|
|
22
|
+
"domain.certificate-add-failed",
|
|
23
|
+
"domain.certificate-deleted",
|
|
24
|
+
"domain.certificate-renew",
|
|
25
|
+
"domain.certificate-renew-failed",
|
|
26
|
+
"domain.dns-records-changed",
|
|
27
|
+
"domain.renewal",
|
|
28
|
+
"domain.renewal-failed",
|
|
29
|
+
"domain.transfer-in-completed",
|
|
30
|
+
"domain.transfer-in-failed",
|
|
31
|
+
"domain.transfer-in-started",
|
|
10
32
|
] as const
|
|
11
33
|
|
|
12
34
|
export const VERCEL_PROJECT_EVENT_TYPES = [
|
|
@@ -37,12 +59,40 @@ export const VERCEL_INTEGRATION_CONFIGURATION_EVENT_TYPES = [
|
|
|
37
59
|
"integration-configuration.transferred",
|
|
38
60
|
] as const
|
|
39
61
|
|
|
62
|
+
export const VERCEL_INTEGRATION_RESOURCE_EVENT_TYPES = [
|
|
63
|
+
"integration-resource.project-connected",
|
|
64
|
+
"integration-resource.project-disconnected",
|
|
65
|
+
] as const
|
|
66
|
+
|
|
67
|
+
export const VERCEL_ROLLING_RELEASE_EVENT_TYPES = [
|
|
68
|
+
"project.rolling-release.approved",
|
|
69
|
+
"project.rolling-release.completed",
|
|
70
|
+
"project.rolling-release.aborted",
|
|
71
|
+
"project.rolling-release.started",
|
|
72
|
+
] as const
|
|
73
|
+
|
|
74
|
+
export const VERCEL_FEATURE_FLAG_EVENT_TYPES = [
|
|
75
|
+
"flag.created",
|
|
76
|
+
"flag.updated",
|
|
77
|
+
"flag.deleted",
|
|
78
|
+
"flag.segment.created",
|
|
79
|
+
"flag.segment.updated",
|
|
80
|
+
"flag.segment.deleted",
|
|
81
|
+
] as const
|
|
82
|
+
|
|
83
|
+
export const VERCEL_ALERT_EVENT_TYPES = ["alerts.triggered"] as const
|
|
84
|
+
|
|
40
85
|
export const VERCEL_WEBHOOK_EVENT_TYPES = [
|
|
41
86
|
...VERCEL_DEPLOYMENT_EVENT_TYPES,
|
|
87
|
+
...VERCEL_DOMAIN_EVENT_TYPES,
|
|
42
88
|
...VERCEL_PROJECT_EVENT_TYPES,
|
|
43
89
|
...VERCEL_PROJECT_ENVIRONMENT_VARIABLE_EVENT_TYPES,
|
|
44
90
|
...VERCEL_PROJECT_DOMAIN_EVENT_TYPES,
|
|
45
91
|
...VERCEL_INTEGRATION_CONFIGURATION_EVENT_TYPES,
|
|
92
|
+
...VERCEL_INTEGRATION_RESOURCE_EVENT_TYPES,
|
|
93
|
+
...VERCEL_ROLLING_RELEASE_EVENT_TYPES,
|
|
94
|
+
...VERCEL_FEATURE_FLAG_EVENT_TYPES,
|
|
95
|
+
...VERCEL_ALERT_EVENT_TYPES,
|
|
46
96
|
] as const
|
|
47
97
|
|
|
48
98
|
const VERCEL_TEAM_ACTOR_SCHEMA = z
|
|
@@ -266,6 +316,417 @@ const VERCEL_INTEGRATION_CONFIGURATION_TRANSFERRED_EVENT_PAYLOAD_SCHEMA = z
|
|
|
266
316
|
})
|
|
267
317
|
.catchall(z.json())
|
|
268
318
|
|
|
319
|
+
const VERCEL_DEPLOYMENT_CHECK_REREQUESTED_EVENT_PAYLOAD_SCHEMA =
|
|
320
|
+
VERCEL_ACTOR_SCHEMA.extend({
|
|
321
|
+
/** Check that Vercel asked the integration to run again. */
|
|
322
|
+
check: z.looseObject({ id: z.string() }).catchall(z.json()),
|
|
323
|
+
|
|
324
|
+
/** Deployment that owns the check. */
|
|
325
|
+
deployment: z.looseObject({ id: z.string() }).catchall(z.json()),
|
|
326
|
+
}).catchall(z.json())
|
|
327
|
+
|
|
328
|
+
const VERCEL_DEPLOYMENT_CLEANUP_EVENT_PAYLOAD_SCHEMA =
|
|
329
|
+
VERCEL_ACTOR_SCHEMA.extend({
|
|
330
|
+
/** Permanently deleted deployment. */
|
|
331
|
+
deployment: VERCEL_DEPLOYMENT_REFERENCE_SCHEMA.extend({
|
|
332
|
+
alias: z.string().array(),
|
|
333
|
+
customEnvironmentId: z.string().optional(),
|
|
334
|
+
meta: z.record(z.string(), z.json()),
|
|
335
|
+
regions: z.string().array(),
|
|
336
|
+
target: z.enum(["production", "staging"]).nullable(),
|
|
337
|
+
}),
|
|
338
|
+
|
|
339
|
+
/** Project that owned the deployment. */
|
|
340
|
+
project: VERCEL_PROJECT_REFERENCE_SCHEMA,
|
|
341
|
+
}).catchall(z.json())
|
|
342
|
+
|
|
343
|
+
const VERCEL_DEPLOYMENT_ROLLBACK_EVENT_PAYLOAD_SCHEMA =
|
|
344
|
+
VERCEL_ACTOR_SCHEMA.extend({
|
|
345
|
+
/** Deployment replaced by the rollback. */
|
|
346
|
+
fromDeploymentId: z.string(),
|
|
347
|
+
|
|
348
|
+
/** Project whose traffic is being rolled back. */
|
|
349
|
+
project: VERCEL_PROJECT_REFERENCE_SCHEMA,
|
|
350
|
+
|
|
351
|
+
/** Deployment restored by the rollback. */
|
|
352
|
+
toDeploymentId: z.string(),
|
|
353
|
+
}).catchall(z.json())
|
|
354
|
+
|
|
355
|
+
const VERCEL_DOMAIN_CREATED_EVENT_PAYLOAD_SCHEMA = VERCEL_ACTOR_SCHEMA.extend({
|
|
356
|
+
/** Domain created in the Vercel account. */
|
|
357
|
+
domain: VERCEL_DOMAIN_REFERENCE_SCHEMA.extend({ delegated: z.boolean() }),
|
|
358
|
+
}).catchall(z.json())
|
|
359
|
+
|
|
360
|
+
const VERCEL_DOMAIN_AUTO_RENEW_CHANGED_EVENT_PAYLOAD_SCHEMA =
|
|
361
|
+
VERCEL_ACTOR_SCHEMA.extend({
|
|
362
|
+
/** Domain whose renewal preference changed. */
|
|
363
|
+
domain: VERCEL_DOMAIN_REFERENCE_SCHEMA,
|
|
364
|
+
|
|
365
|
+
/** Current auto-renewal setting. */
|
|
366
|
+
next: z.boolean(),
|
|
367
|
+
|
|
368
|
+
/** Previous auto-renewal setting. */
|
|
369
|
+
previous: z.boolean(),
|
|
370
|
+
}).catchall(z.json())
|
|
371
|
+
|
|
372
|
+
const VERCEL_DOMAIN_CERTIFICATE_EVENT_PAYLOAD_SCHEMA =
|
|
373
|
+
VERCEL_ACTOR_SCHEMA.extend({
|
|
374
|
+
/** Provider certificate fields supplied by Vercel. */
|
|
375
|
+
cert: z.record(z.string(), z.json()),
|
|
376
|
+
}).catchall(z.json())
|
|
377
|
+
|
|
378
|
+
const VERCEL_DOMAIN_CERTIFICATE_FAILED_EVENT_PAYLOAD_SCHEMA =
|
|
379
|
+
VERCEL_ACTOR_SCHEMA.extend({
|
|
380
|
+
/** DNS names for which the certificate operation failed. */
|
|
381
|
+
dnsNames: z.string().array(),
|
|
382
|
+
}).catchall(z.json())
|
|
383
|
+
|
|
384
|
+
const VERCEL_DOMAIN_DNS_RECORDS_CHANGED_EVENT_PAYLOAD_SCHEMA =
|
|
385
|
+
VERCEL_ACTOR_SCHEMA.extend({
|
|
386
|
+
/** Provider DNS changes. */
|
|
387
|
+
changes: z.json().array(),
|
|
388
|
+
|
|
389
|
+
/** DNS zone that changed. */
|
|
390
|
+
zone: z.string(),
|
|
391
|
+
}).catchall(z.json())
|
|
392
|
+
|
|
393
|
+
const VERCEL_DOMAIN_RENEWAL_EVENT_PAYLOAD_SCHEMA = VERCEL_ACTOR_SCHEMA.extend({
|
|
394
|
+
/** Renewed domain. */
|
|
395
|
+
domain: VERCEL_DOMAIN_REFERENCE_SCHEMA,
|
|
396
|
+
|
|
397
|
+
/** New domain expiration time. */
|
|
398
|
+
expirationDate: z.string(),
|
|
399
|
+
|
|
400
|
+
/** Renewal price as a decimal string. */
|
|
401
|
+
price: z.string(),
|
|
402
|
+
|
|
403
|
+
/** Time Vercel renewed the domain. */
|
|
404
|
+
renewedAt: z.string(),
|
|
405
|
+
}).catchall(z.json())
|
|
406
|
+
|
|
407
|
+
const VERCEL_DOMAIN_RENEWAL_FAILED_EVENT_PAYLOAD_SCHEMA =
|
|
408
|
+
VERCEL_ACTOR_SCHEMA.extend({
|
|
409
|
+
/** Domain whose renewal failed. */
|
|
410
|
+
domain: VERCEL_DOMAIN_REFERENCE_SCHEMA,
|
|
411
|
+
|
|
412
|
+
/** Provider reason for the failure. */
|
|
413
|
+
errorReason: z.string(),
|
|
414
|
+
|
|
415
|
+
/** Time the renewal failed. */
|
|
416
|
+
failedAt: z.string(),
|
|
417
|
+
}).catchall(z.json())
|
|
418
|
+
|
|
419
|
+
const VERCEL_DOMAIN_TRANSFER_EVENT_PAYLOAD_SCHEMA = VERCEL_ACTOR_SCHEMA.extend({
|
|
420
|
+
/** Domain transferred into the Vercel account. */
|
|
421
|
+
domain: VERCEL_DOMAIN_REFERENCE_SCHEMA,
|
|
422
|
+
}).catchall(z.json())
|
|
423
|
+
|
|
424
|
+
const VERCEL_FEATURE_FLAG_REFERENCE_SCHEMA = z
|
|
425
|
+
.looseObject({
|
|
426
|
+
createdAt: z.number(),
|
|
427
|
+
id: z.string(),
|
|
428
|
+
projectId: z.string(),
|
|
429
|
+
slug: z.string(),
|
|
430
|
+
updatedAt: z.number(),
|
|
431
|
+
})
|
|
432
|
+
.catchall(z.json())
|
|
433
|
+
|
|
434
|
+
const VERCEL_FEATURE_FLAG_CREATED_EVENT_PAYLOAD_SCHEMA =
|
|
435
|
+
VERCEL_ACTOR_SCHEMA.extend({
|
|
436
|
+
flag: VERCEL_FEATURE_FLAG_REFERENCE_SCHEMA,
|
|
437
|
+
}).catchall(z.json())
|
|
438
|
+
|
|
439
|
+
const VERCEL_FEATURE_FLAG_UPDATED_EVENT_PAYLOAD_SCHEMA =
|
|
440
|
+
VERCEL_FEATURE_FLAG_CREATED_EVENT_PAYLOAD_SCHEMA.extend({
|
|
441
|
+
patch: z.record(z.string(), z.json()),
|
|
442
|
+
previousFlag: VERCEL_FEATURE_FLAG_REFERENCE_SCHEMA,
|
|
443
|
+
})
|
|
444
|
+
|
|
445
|
+
const VERCEL_FEATURE_FLAG_DELETED_EVENT_PAYLOAD_SCHEMA =
|
|
446
|
+
VERCEL_FEATURE_FLAG_CREATED_EVENT_PAYLOAD_SCHEMA.extend({
|
|
447
|
+
deletedAt: z.number(),
|
|
448
|
+
})
|
|
449
|
+
|
|
450
|
+
const VERCEL_FEATURE_FLAG_SEGMENT_REFERENCE_SCHEMA = z
|
|
451
|
+
.looseObject({
|
|
452
|
+
createdAt: z.number(),
|
|
453
|
+
id: z.string(),
|
|
454
|
+
projectId: z.string(),
|
|
455
|
+
slug: z.string(),
|
|
456
|
+
updatedAt: z.number(),
|
|
457
|
+
})
|
|
458
|
+
.catchall(z.json())
|
|
459
|
+
|
|
460
|
+
const VERCEL_FEATURE_FLAG_SEGMENT_CREATED_EVENT_PAYLOAD_SCHEMA =
|
|
461
|
+
VERCEL_ACTOR_SCHEMA.extend({
|
|
462
|
+
segment: VERCEL_FEATURE_FLAG_SEGMENT_REFERENCE_SCHEMA,
|
|
463
|
+
}).catchall(z.json())
|
|
464
|
+
|
|
465
|
+
const VERCEL_FEATURE_FLAG_SEGMENT_UPDATED_EVENT_PAYLOAD_SCHEMA =
|
|
466
|
+
VERCEL_FEATURE_FLAG_SEGMENT_CREATED_EVENT_PAYLOAD_SCHEMA.extend({
|
|
467
|
+
patch: z.record(z.string(), z.json()),
|
|
468
|
+
previousSegment: VERCEL_FEATURE_FLAG_SEGMENT_REFERENCE_SCHEMA,
|
|
469
|
+
})
|
|
470
|
+
|
|
471
|
+
const VERCEL_FEATURE_FLAG_SEGMENT_DELETED_EVENT_PAYLOAD_SCHEMA =
|
|
472
|
+
VERCEL_FEATURE_FLAG_SEGMENT_CREATED_EVENT_PAYLOAD_SCHEMA.extend({
|
|
473
|
+
deletedAt: z.number(),
|
|
474
|
+
})
|
|
475
|
+
|
|
476
|
+
const VERCEL_ROLLING_RELEASE_SCHEMA = z
|
|
477
|
+
.looseObject({
|
|
478
|
+
activeStageIndex: z.number().int(),
|
|
479
|
+
config: z
|
|
480
|
+
.looseObject({
|
|
481
|
+
stages: z.json().array(),
|
|
482
|
+
target: z.string(),
|
|
483
|
+
})
|
|
484
|
+
.catchall(z.json()),
|
|
485
|
+
default: z
|
|
486
|
+
.looseObject({
|
|
487
|
+
baseDeploymentId: z.string(),
|
|
488
|
+
targetDeploymentId: z.string(),
|
|
489
|
+
targetPercentage: z.number().optional(),
|
|
490
|
+
targetStartAt: z.number(),
|
|
491
|
+
targetUpdatedAt: z.number(),
|
|
492
|
+
})
|
|
493
|
+
.catchall(z.json()),
|
|
494
|
+
deploymentIds: z.string().array(),
|
|
495
|
+
ownerId: z.string(),
|
|
496
|
+
projectId: z.string(),
|
|
497
|
+
state: z.enum(["ACTIVE", "COMPLETE", "ABORTED"]),
|
|
498
|
+
writtenBy: z.string(),
|
|
499
|
+
})
|
|
500
|
+
.catchall(z.json())
|
|
501
|
+
|
|
502
|
+
const VERCEL_ROLLING_RELEASE_EVENT_PAYLOAD_SCHEMA = VERCEL_ACTOR_SCHEMA.extend({
|
|
503
|
+
/** Previous rolling release state, when one existed. */
|
|
504
|
+
prevRollingRelease: VERCEL_ROLLING_RELEASE_SCHEMA.nullable().optional(),
|
|
505
|
+
|
|
506
|
+
/** Project running the staged deployment. */
|
|
507
|
+
project: VERCEL_NAMED_PROJECT_REFERENCE_SCHEMA,
|
|
508
|
+
|
|
509
|
+
/** Current rolling release state. */
|
|
510
|
+
rollingRelease: VERCEL_ROLLING_RELEASE_SCHEMA,
|
|
511
|
+
}).catchall(z.json())
|
|
512
|
+
|
|
513
|
+
const VERCEL_ALERT_TRIGGERED_EVENT_PAYLOAD_SCHEMA = z
|
|
514
|
+
.looseObject({
|
|
515
|
+
/** Alerts included in this anomaly notification. */
|
|
516
|
+
alerts: z
|
|
517
|
+
.looseObject({
|
|
518
|
+
alertId: z.string(),
|
|
519
|
+
average: z.number(),
|
|
520
|
+
count: z.number(),
|
|
521
|
+
formattedValues: z.record(z.string(), z.json()),
|
|
522
|
+
metric: z.string(),
|
|
523
|
+
startedAt: z.string(),
|
|
524
|
+
stddev: z.number(),
|
|
525
|
+
title: z.string(),
|
|
526
|
+
type: z.string(),
|
|
527
|
+
unit: z.string(),
|
|
528
|
+
zscore: z.number(),
|
|
529
|
+
zscoreThreshold: z.number(),
|
|
530
|
+
})
|
|
531
|
+
.catchall(z.json())
|
|
532
|
+
.array(),
|
|
533
|
+
|
|
534
|
+
/** Optional identifier shared by related alerts. */
|
|
535
|
+
groupId: z.string().optional(),
|
|
536
|
+
|
|
537
|
+
/** Links to the affected Vercel resources. */
|
|
538
|
+
links: z.looseObject({ observability: z.string() }),
|
|
539
|
+
|
|
540
|
+
/** Stable Vercel project ID. */
|
|
541
|
+
projectId: z.string(),
|
|
542
|
+
|
|
543
|
+
/** Current project slug. */
|
|
544
|
+
projectSlug: z.string(),
|
|
545
|
+
|
|
546
|
+
/** Millisecond timestamp when the anomaly started. */
|
|
547
|
+
startedAt: z.number(),
|
|
548
|
+
|
|
549
|
+
/** Stable Vercel team ID used to route the webhook. */
|
|
550
|
+
teamId: z.string(),
|
|
551
|
+
|
|
552
|
+
/** Current team slug. */
|
|
553
|
+
teamSlug: z.string(),
|
|
554
|
+
})
|
|
555
|
+
.catchall(z.json())
|
|
556
|
+
|
|
557
|
+
const VERCEL_DEPLOYMENT_INTEGRATION_ACTION_EVENT_PAYLOAD_SCHEMA = z
|
|
558
|
+
.looseObject({
|
|
559
|
+
/** Integration-defined deployment action slug. */
|
|
560
|
+
action: z.string(),
|
|
561
|
+
|
|
562
|
+
/** Integration installation that owns the resource. */
|
|
563
|
+
configuration: z.looseObject({ id: z.string() }),
|
|
564
|
+
|
|
565
|
+
/** Deployment affected by the action. */
|
|
566
|
+
deployment: z.looseObject({ id: z.string() }),
|
|
567
|
+
|
|
568
|
+
/** Stable integration installation ID. */
|
|
569
|
+
installationId: z.string(),
|
|
570
|
+
|
|
571
|
+
/** Stable integration resource ID. */
|
|
572
|
+
resourceId: z.string(),
|
|
573
|
+
})
|
|
574
|
+
.catchall(z.json())
|
|
575
|
+
|
|
576
|
+
const VERCEL_INTEGRATION_RESOURCE_PROJECT_EVENT_PAYLOAD_SCHEMA = z
|
|
577
|
+
.looseObject({
|
|
578
|
+
/** Integration installation that owns the resource. */
|
|
579
|
+
configuration: z.looseObject({ id: z.string() }),
|
|
580
|
+
|
|
581
|
+
/** Stable integration installation ID. */
|
|
582
|
+
installationId: z.string(),
|
|
583
|
+
|
|
584
|
+
/** Project connected to or disconnected from the resource. */
|
|
585
|
+
project: VERCEL_PROJECT_REFERENCE_SCHEMA,
|
|
586
|
+
|
|
587
|
+
/** Stable project ID, repeated by Vercel for direct access. */
|
|
588
|
+
projectId: z.string(),
|
|
589
|
+
|
|
590
|
+
/** Stable integration resource ID. */
|
|
591
|
+
resourceId: z.string(),
|
|
592
|
+
|
|
593
|
+
/** Deployment targets connected to the resource. */
|
|
594
|
+
targets: z.string().array(),
|
|
595
|
+
})
|
|
596
|
+
.catchall(z.json())
|
|
597
|
+
|
|
598
|
+
/** Additional current Vercel webhook schemas with exact discriminators. */
|
|
599
|
+
export const VERCEL_ADDITIONAL_EVENT_SCHEMAS = {
|
|
600
|
+
alertTriggered: vercelWebhookEventSchema(
|
|
601
|
+
z.literal("alerts.triggered"),
|
|
602
|
+
VERCEL_ALERT_TRIGGERED_EVENT_PAYLOAD_SCHEMA,
|
|
603
|
+
),
|
|
604
|
+
deploymentCheckRerequested: vercelWebhookEventSchema(
|
|
605
|
+
z.literal("deployment.check-rerequested"),
|
|
606
|
+
VERCEL_DEPLOYMENT_CHECK_REREQUESTED_EVENT_PAYLOAD_SCHEMA,
|
|
607
|
+
),
|
|
608
|
+
deploymentCleanup: vercelWebhookEventSchema(
|
|
609
|
+
z.literal("deployment.cleanup"),
|
|
610
|
+
VERCEL_DEPLOYMENT_CLEANUP_EVENT_PAYLOAD_SCHEMA,
|
|
611
|
+
),
|
|
612
|
+
deploymentIntegrationActionCancel: vercelWebhookEventSchema(
|
|
613
|
+
z.literal("deployment.integration.action.cancel"),
|
|
614
|
+
VERCEL_DEPLOYMENT_INTEGRATION_ACTION_EVENT_PAYLOAD_SCHEMA,
|
|
615
|
+
),
|
|
616
|
+
deploymentIntegrationActionCleanup: vercelWebhookEventSchema(
|
|
617
|
+
z.literal("deployment.integration.action.cleanup"),
|
|
618
|
+
VERCEL_DEPLOYMENT_INTEGRATION_ACTION_EVENT_PAYLOAD_SCHEMA,
|
|
619
|
+
),
|
|
620
|
+
deploymentIntegrationActionStart: vercelWebhookEventSchema(
|
|
621
|
+
z.literal("deployment.integration.action.start"),
|
|
622
|
+
VERCEL_DEPLOYMENT_INTEGRATION_ACTION_EVENT_PAYLOAD_SCHEMA,
|
|
623
|
+
),
|
|
624
|
+
deploymentRollback: vercelWebhookEventSchema(
|
|
625
|
+
z.literal("deployment.rollback"),
|
|
626
|
+
VERCEL_DEPLOYMENT_ROLLBACK_EVENT_PAYLOAD_SCHEMA,
|
|
627
|
+
),
|
|
628
|
+
domainAutoRenewChanged: vercelWebhookEventSchema(
|
|
629
|
+
z.literal("domain.auto-renew-changed"),
|
|
630
|
+
VERCEL_DOMAIN_AUTO_RENEW_CHANGED_EVENT_PAYLOAD_SCHEMA,
|
|
631
|
+
),
|
|
632
|
+
domainCertificateAdd: vercelWebhookEventSchema(
|
|
633
|
+
z.literal("domain.certificate-add"),
|
|
634
|
+
VERCEL_DOMAIN_CERTIFICATE_EVENT_PAYLOAD_SCHEMA,
|
|
635
|
+
),
|
|
636
|
+
domainCertificateAddFailed: vercelWebhookEventSchema(
|
|
637
|
+
z.literal("domain.certificate-add-failed"),
|
|
638
|
+
VERCEL_DOMAIN_CERTIFICATE_FAILED_EVENT_PAYLOAD_SCHEMA,
|
|
639
|
+
),
|
|
640
|
+
domainCertificateDeleted: vercelWebhookEventSchema(
|
|
641
|
+
z.literal("domain.certificate-deleted"),
|
|
642
|
+
VERCEL_DOMAIN_CERTIFICATE_EVENT_PAYLOAD_SCHEMA,
|
|
643
|
+
),
|
|
644
|
+
domainCertificateRenew: vercelWebhookEventSchema(
|
|
645
|
+
z.literal("domain.certificate-renew"),
|
|
646
|
+
VERCEL_DOMAIN_CERTIFICATE_EVENT_PAYLOAD_SCHEMA,
|
|
647
|
+
),
|
|
648
|
+
domainCertificateRenewFailed: vercelWebhookEventSchema(
|
|
649
|
+
z.literal("domain.certificate-renew-failed"),
|
|
650
|
+
VERCEL_DOMAIN_CERTIFICATE_FAILED_EVENT_PAYLOAD_SCHEMA,
|
|
651
|
+
),
|
|
652
|
+
domainCreated: vercelWebhookEventSchema(
|
|
653
|
+
z.literal("domain.created"),
|
|
654
|
+
VERCEL_DOMAIN_CREATED_EVENT_PAYLOAD_SCHEMA,
|
|
655
|
+
),
|
|
656
|
+
domainDnsRecordsChanged: vercelWebhookEventSchema(
|
|
657
|
+
z.literal("domain.dns-records-changed"),
|
|
658
|
+
VERCEL_DOMAIN_DNS_RECORDS_CHANGED_EVENT_PAYLOAD_SCHEMA,
|
|
659
|
+
),
|
|
660
|
+
domainRenewal: vercelWebhookEventSchema(
|
|
661
|
+
z.literal("domain.renewal"),
|
|
662
|
+
VERCEL_DOMAIN_RENEWAL_EVENT_PAYLOAD_SCHEMA,
|
|
663
|
+
),
|
|
664
|
+
domainRenewalFailed: vercelWebhookEventSchema(
|
|
665
|
+
z.literal("domain.renewal-failed"),
|
|
666
|
+
VERCEL_DOMAIN_RENEWAL_FAILED_EVENT_PAYLOAD_SCHEMA,
|
|
667
|
+
),
|
|
668
|
+
domainTransferInCompleted: vercelWebhookEventSchema(
|
|
669
|
+
z.literal("domain.transfer-in-completed"),
|
|
670
|
+
VERCEL_DOMAIN_TRANSFER_EVENT_PAYLOAD_SCHEMA,
|
|
671
|
+
),
|
|
672
|
+
domainTransferInFailed: vercelWebhookEventSchema(
|
|
673
|
+
z.literal("domain.transfer-in-failed"),
|
|
674
|
+
VERCEL_DOMAIN_TRANSFER_EVENT_PAYLOAD_SCHEMA,
|
|
675
|
+
),
|
|
676
|
+
domainTransferInStarted: vercelWebhookEventSchema(
|
|
677
|
+
z.literal("domain.transfer-in-started"),
|
|
678
|
+
VERCEL_DOMAIN_TRANSFER_EVENT_PAYLOAD_SCHEMA,
|
|
679
|
+
),
|
|
680
|
+
featureFlagCreated: vercelWebhookEventSchema(
|
|
681
|
+
z.literal("flag.created"),
|
|
682
|
+
VERCEL_FEATURE_FLAG_CREATED_EVENT_PAYLOAD_SCHEMA,
|
|
683
|
+
),
|
|
684
|
+
featureFlagDeleted: vercelWebhookEventSchema(
|
|
685
|
+
z.literal("flag.deleted"),
|
|
686
|
+
VERCEL_FEATURE_FLAG_DELETED_EVENT_PAYLOAD_SCHEMA,
|
|
687
|
+
),
|
|
688
|
+
featureFlagSegmentCreated: vercelWebhookEventSchema(
|
|
689
|
+
z.literal("flag.segment.created"),
|
|
690
|
+
VERCEL_FEATURE_FLAG_SEGMENT_CREATED_EVENT_PAYLOAD_SCHEMA,
|
|
691
|
+
),
|
|
692
|
+
featureFlagSegmentDeleted: vercelWebhookEventSchema(
|
|
693
|
+
z.literal("flag.segment.deleted"),
|
|
694
|
+
VERCEL_FEATURE_FLAG_SEGMENT_DELETED_EVENT_PAYLOAD_SCHEMA,
|
|
695
|
+
),
|
|
696
|
+
featureFlagSegmentUpdated: vercelWebhookEventSchema(
|
|
697
|
+
z.literal("flag.segment.updated"),
|
|
698
|
+
VERCEL_FEATURE_FLAG_SEGMENT_UPDATED_EVENT_PAYLOAD_SCHEMA,
|
|
699
|
+
),
|
|
700
|
+
featureFlagUpdated: vercelWebhookEventSchema(
|
|
701
|
+
z.literal("flag.updated"),
|
|
702
|
+
VERCEL_FEATURE_FLAG_UPDATED_EVENT_PAYLOAD_SCHEMA,
|
|
703
|
+
),
|
|
704
|
+
integrationResourceProjectConnected: vercelWebhookEventSchema(
|
|
705
|
+
z.literal("integration-resource.project-connected"),
|
|
706
|
+
VERCEL_INTEGRATION_RESOURCE_PROJECT_EVENT_PAYLOAD_SCHEMA,
|
|
707
|
+
),
|
|
708
|
+
integrationResourceProjectDisconnected: vercelWebhookEventSchema(
|
|
709
|
+
z.literal("integration-resource.project-disconnected"),
|
|
710
|
+
VERCEL_INTEGRATION_RESOURCE_PROJECT_EVENT_PAYLOAD_SCHEMA,
|
|
711
|
+
),
|
|
712
|
+
rollingReleaseAborted: vercelWebhookEventSchema(
|
|
713
|
+
z.literal("project.rolling-release.aborted"),
|
|
714
|
+
VERCEL_ROLLING_RELEASE_EVENT_PAYLOAD_SCHEMA,
|
|
715
|
+
),
|
|
716
|
+
rollingReleaseApproved: vercelWebhookEventSchema(
|
|
717
|
+
z.literal("project.rolling-release.approved"),
|
|
718
|
+
VERCEL_ROLLING_RELEASE_EVENT_PAYLOAD_SCHEMA,
|
|
719
|
+
),
|
|
720
|
+
rollingReleaseCompleted: vercelWebhookEventSchema(
|
|
721
|
+
z.literal("project.rolling-release.completed"),
|
|
722
|
+
VERCEL_ROLLING_RELEASE_EVENT_PAYLOAD_SCHEMA,
|
|
723
|
+
),
|
|
724
|
+
rollingReleaseStarted: vercelWebhookEventSchema(
|
|
725
|
+
z.literal("project.rolling-release.started"),
|
|
726
|
+
VERCEL_ROLLING_RELEASE_EVENT_PAYLOAD_SCHEMA,
|
|
727
|
+
),
|
|
728
|
+
} as const
|
|
729
|
+
|
|
269
730
|
/** Vercel deployment-created webhook. */
|
|
270
731
|
export const VERCEL_DEPLOYMENT_CREATED_EVENT_SCHEMA = vercelWebhookEventSchema(
|
|
271
732
|
z.literal("deployment.created"),
|
|
@@ -414,12 +875,35 @@ export const VERCEL_INTEGRATION_CONFIGURATION_TRANSFERRED_EVENT_SCHEMA =
|
|
|
414
875
|
|
|
415
876
|
/** Supported Vercel deployment lifecycle webhook. */
|
|
416
877
|
export const VERCEL_DEPLOYMENT_EVENT_SCHEMA = z.discriminatedUnion("type", [
|
|
878
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.deploymentCheckRerequested,
|
|
879
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.deploymentCleanup,
|
|
417
880
|
VERCEL_DEPLOYMENT_CREATED_EVENT_SCHEMA,
|
|
418
881
|
VERCEL_DEPLOYMENT_READY_EVENT_SCHEMA,
|
|
419
882
|
VERCEL_DEPLOYMENT_SUCCEEDED_EVENT_SCHEMA,
|
|
420
883
|
VERCEL_DEPLOYMENT_FAILED_EVENT_SCHEMA,
|
|
421
884
|
VERCEL_DEPLOYMENT_CANCELED_EVENT_SCHEMA,
|
|
422
885
|
VERCEL_DEPLOYMENT_PROMOTED_EVENT_SCHEMA,
|
|
886
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.deploymentRollback,
|
|
887
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.deploymentIntegrationActionCancel,
|
|
888
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.deploymentIntegrationActionCleanup,
|
|
889
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.deploymentIntegrationActionStart,
|
|
890
|
+
])
|
|
891
|
+
|
|
892
|
+
/** Supported Vercel account-domain webhook. */
|
|
893
|
+
export const VERCEL_DOMAIN_EVENT_SCHEMA = z.discriminatedUnion("type", [
|
|
894
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.domainCreated,
|
|
895
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.domainAutoRenewChanged,
|
|
896
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.domainCertificateAdd,
|
|
897
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.domainCertificateAddFailed,
|
|
898
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.domainCertificateDeleted,
|
|
899
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.domainCertificateRenew,
|
|
900
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.domainCertificateRenewFailed,
|
|
901
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.domainDnsRecordsChanged,
|
|
902
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.domainRenewal,
|
|
903
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.domainRenewalFailed,
|
|
904
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.domainTransferInCompleted,
|
|
905
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.domainTransferInFailed,
|
|
906
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.domainTransferInStarted,
|
|
423
907
|
])
|
|
424
908
|
|
|
425
909
|
/** Supported Vercel project lifecycle webhook. */
|
|
@@ -456,14 +940,63 @@ export const VERCEL_INTEGRATION_CONFIGURATION_EVENT_SCHEMA =
|
|
|
456
940
|
VERCEL_INTEGRATION_CONFIGURATION_TRANSFERRED_EVENT_SCHEMA,
|
|
457
941
|
])
|
|
458
942
|
|
|
943
|
+
/** Supported Vercel integration-resource webhook. */
|
|
944
|
+
export const VERCEL_INTEGRATION_RESOURCE_EVENT_SCHEMA = z.discriminatedUnion(
|
|
945
|
+
"type",
|
|
946
|
+
[
|
|
947
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.integrationResourceProjectConnected,
|
|
948
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.integrationResourceProjectDisconnected,
|
|
949
|
+
],
|
|
950
|
+
)
|
|
951
|
+
|
|
952
|
+
/** Supported Vercel rolling-release webhook. */
|
|
953
|
+
export const VERCEL_ROLLING_RELEASE_EVENT_SCHEMA = z.discriminatedUnion(
|
|
954
|
+
"type",
|
|
955
|
+
[
|
|
956
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.rollingReleaseApproved,
|
|
957
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.rollingReleaseCompleted,
|
|
958
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.rollingReleaseAborted,
|
|
959
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.rollingReleaseStarted,
|
|
960
|
+
],
|
|
961
|
+
)
|
|
962
|
+
|
|
963
|
+
/** Supported Vercel feature-flag webhook. */
|
|
964
|
+
export const VERCEL_FEATURE_FLAG_EVENT_SCHEMA = z.discriminatedUnion("type", [
|
|
965
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.featureFlagCreated,
|
|
966
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.featureFlagUpdated,
|
|
967
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.featureFlagDeleted,
|
|
968
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.featureFlagSegmentCreated,
|
|
969
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.featureFlagSegmentUpdated,
|
|
970
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.featureFlagSegmentDeleted,
|
|
971
|
+
])
|
|
972
|
+
|
|
459
973
|
/** Every Vercel webhook handled by the integration. */
|
|
460
974
|
export const VERCEL_WEBHOOK_EVENT_SCHEMA = z.discriminatedUnion("type", [
|
|
975
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.deploymentCheckRerequested,
|
|
976
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.deploymentCleanup,
|
|
461
977
|
VERCEL_DEPLOYMENT_CREATED_EVENT_SCHEMA,
|
|
462
978
|
VERCEL_DEPLOYMENT_READY_EVENT_SCHEMA,
|
|
463
979
|
VERCEL_DEPLOYMENT_SUCCEEDED_EVENT_SCHEMA,
|
|
464
980
|
VERCEL_DEPLOYMENT_FAILED_EVENT_SCHEMA,
|
|
465
981
|
VERCEL_DEPLOYMENT_CANCELED_EVENT_SCHEMA,
|
|
466
982
|
VERCEL_DEPLOYMENT_PROMOTED_EVENT_SCHEMA,
|
|
983
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.deploymentRollback,
|
|
984
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.deploymentIntegrationActionCancel,
|
|
985
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.deploymentIntegrationActionCleanup,
|
|
986
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.deploymentIntegrationActionStart,
|
|
987
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.domainCreated,
|
|
988
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.domainAutoRenewChanged,
|
|
989
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.domainCertificateAdd,
|
|
990
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.domainCertificateAddFailed,
|
|
991
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.domainCertificateDeleted,
|
|
992
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.domainCertificateRenew,
|
|
993
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.domainCertificateRenewFailed,
|
|
994
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.domainDnsRecordsChanged,
|
|
995
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.domainRenewal,
|
|
996
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.domainRenewalFailed,
|
|
997
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.domainTransferInCompleted,
|
|
998
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.domainTransferInFailed,
|
|
999
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.domainTransferInStarted,
|
|
467
1000
|
VERCEL_PROJECT_CREATED_EVENT_SCHEMA,
|
|
468
1001
|
VERCEL_PROJECT_REMOVED_EVENT_SCHEMA,
|
|
469
1002
|
VERCEL_PROJECT_RENAMED_EVENT_SCHEMA,
|
|
@@ -480,6 +1013,19 @@ export const VERCEL_WEBHOOK_EVENT_SCHEMA = z.discriminatedUnion("type", [
|
|
|
480
1013
|
VERCEL_INTEGRATION_CONFIGURATION_REMOVED_EVENT_SCHEMA,
|
|
481
1014
|
VERCEL_INTEGRATION_CONFIGURATION_SCOPE_CHANGE_CONFIRMED_EVENT_SCHEMA,
|
|
482
1015
|
VERCEL_INTEGRATION_CONFIGURATION_TRANSFERRED_EVENT_SCHEMA,
|
|
1016
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.integrationResourceProjectConnected,
|
|
1017
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.integrationResourceProjectDisconnected,
|
|
1018
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.rollingReleaseApproved,
|
|
1019
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.rollingReleaseCompleted,
|
|
1020
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.rollingReleaseAborted,
|
|
1021
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.rollingReleaseStarted,
|
|
1022
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.featureFlagCreated,
|
|
1023
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.featureFlagUpdated,
|
|
1024
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.featureFlagDeleted,
|
|
1025
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.featureFlagSegmentCreated,
|
|
1026
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.featureFlagSegmentUpdated,
|
|
1027
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.featureFlagSegmentDeleted,
|
|
1028
|
+
VERCEL_ADDITIONAL_EVENT_SCHEMAS.alertTriggered,
|
|
483
1029
|
])
|
|
484
1030
|
|
|
485
1031
|
export type VercelDeploymentCreatedEvent = z.output<
|
|
@@ -552,6 +1098,16 @@ export type VercelIntegrationConfigurationTransferredEvent = z.output<
|
|
|
552
1098
|
export type VercelDeploymentEvent = z.output<
|
|
553
1099
|
typeof VERCEL_DEPLOYMENT_EVENT_SCHEMA
|
|
554
1100
|
>
|
|
1101
|
+
export type VercelDomainEvent = z.output<typeof VERCEL_DOMAIN_EVENT_SCHEMA>
|
|
1102
|
+
export type VercelIntegrationResourceEvent = z.output<
|
|
1103
|
+
typeof VERCEL_INTEGRATION_RESOURCE_EVENT_SCHEMA
|
|
1104
|
+
>
|
|
1105
|
+
export type VercelRollingReleaseEvent = z.output<
|
|
1106
|
+
typeof VERCEL_ROLLING_RELEASE_EVENT_SCHEMA
|
|
1107
|
+
>
|
|
1108
|
+
export type VercelFeatureFlagEvent = z.output<
|
|
1109
|
+
typeof VERCEL_FEATURE_FLAG_EVENT_SCHEMA
|
|
1110
|
+
>
|
|
555
1111
|
export type VercelProjectEvent = z.output<typeof VERCEL_PROJECT_EVENT_SCHEMA>
|
|
556
1112
|
export type VercelProjectEnvironmentVariableEvent = z.output<
|
|
557
1113
|
typeof VERCEL_PROJECT_ENVIRONMENT_VARIABLE_EVENT_SCHEMA
|