/** * Auto-generated webhook event schema registry * DO NOT MODIFY - regenerate with: bun run scripts/generate-registry.ts */ import type { WebhookEvent, WebhookEventMap, WebhookEventName, WebhookEvents } from '@octokit/webhooks-types'; import { z } from 'zod'; export type { WebhookEvent, WebhookEventMap, WebhookEventName, WebhookEvents }; interface WebhookRouteKeyEventMap { branchProtectionConfiguration: WebhookEventMap['branch_protection_configuration']; branchProtectionConfigurationDisabled: Extract; branchProtectionConfigurationEnabled: Extract; branchProtectionRule: WebhookEventMap['branch_protection_rule']; branchProtectionRuleCreated: Extract; branchProtectionRuleDeleted: Extract; branchProtectionRuleEdited: Extract; checkRun: WebhookEventMap['check_run']; checkRunCompleted: Extract; checkRunCreated: Extract; checkRunRequestedAction: Extract; checkRunRerequested: Extract; checkSuite: WebhookEventMap['check_suite']; checkSuiteCompleted: Extract; checkSuiteRequested: Extract; checkSuiteRerequested: Extract; codeScanningAlert: WebhookEventMap['code_scanning_alert']; codeScanningAlertAppearedInBranch: Extract; codeScanningAlertClosedByUser: Extract; codeScanningAlertCreated: Extract; codeScanningAlertFixed: Extract; codeScanningAlertReopened: Extract; codeScanningAlertReopenedByUser: Extract; commitComment: WebhookEventMap['commit_comment']; commitCommentCreated: Extract; create: WebhookEventMap['create']; customProperty: WebhookEventMap['custom_property']; customPropertyCreated: Extract; customPropertyDeleted: Extract; customPropertyPromoteToEnterprise: Extract; customPropertyUpdated: Extract; customPropertyValues: WebhookEventMap['custom_property_values']; customPropertyValuesUpdated: Extract; delete: WebhookEventMap['delete']; dependabotAlert: WebhookEventMap['dependabot_alert']; dependabotAlertAutoDismissed: Extract; dependabotAlertAutoReopened: Extract; dependabotAlertCreated: Extract; dependabotAlertDismissed: Extract; dependabotAlertFixed: Extract; dependabotAlertReintroduced: Extract; dependabotAlertReopened: Extract; deployKey: WebhookEventMap['deploy_key']; deployKeyCreated: Extract; deployKeyDeleted: Extract; deployment: WebhookEventMap['deployment']; deploymentCreated: Extract; deploymentProtectionRule: WebhookEventMap['deployment_protection_rule']; deploymentProtectionRuleRequested: Extract; deploymentReview: WebhookEventMap['deployment_review']; deploymentReviewApproved: Extract; deploymentReviewRejected: Extract; deploymentReviewRequested: Extract; deploymentStatus: WebhookEventMap['deployment_status']; deploymentStatusCreated: Extract; discussion: WebhookEventMap['discussion']; discussionAnswered: Extract; discussionCategoryChanged: Extract; discussionClosed: Extract; discussionCreated: Extract; discussionDeleted: Extract; discussionEdited: Extract; discussionLabeled: Extract; discussionLocked: Extract; discussionPinned: Extract; discussionReopened: Extract; discussionTransferred: Extract; discussionUnanswered: Extract; discussionUnlabeled: Extract; discussionUnlocked: Extract; discussionUnpinned: Extract; discussionComment: WebhookEventMap['discussion_comment']; discussionCommentCreated: Extract; discussionCommentDeleted: Extract; discussionCommentEdited: Extract; fork: WebhookEventMap['fork']; githubAppAuthorization: WebhookEventMap['github_app_authorization']; githubAppAuthorizationRevoked: Extract; gollum: WebhookEventMap['gollum']; installation: WebhookEventMap['installation']; installationCreated: Extract; installationDeleted: Extract; installationNewPermissionsAccepted: Extract; installationSuspend: Extract; installationUnsuspend: Extract; installationRepositories: WebhookEventMap['installation_repositories']; installationRepositoriesAdded: Extract; installationRepositoriesRemoved: Extract; installationTarget: WebhookEventMap['installation_target']; installationTargetRenamed: Extract; issueComment: WebhookEventMap['issue_comment']; issueCommentCreated: Extract; issueCommentDeleted: Extract; issueCommentEdited: Extract; issues: WebhookEventMap['issues']; issuesAssigned: Extract; issuesClosed: Extract; issuesDeleted: Extract; issuesDemilestoned: Extract; issuesEdited: Extract; issuesLabeled: Extract; issuesLocked: Extract; issuesMilestoned: Extract; issuesOpened: Extract; issuesPinned: Extract; issuesReopened: Extract; issuesTransferred: Extract; issuesTyped: Extract; issuesUnassigned: Extract; issuesUnlabeled: Extract; issuesUnlocked: Extract; issuesUnpinned: Extract; issuesUntyped: Extract; label: WebhookEventMap['label']; labelCreated: Extract; labelDeleted: Extract; labelEdited: Extract; marketplacePurchase: WebhookEventMap['marketplace_purchase']; marketplacePurchaseCancelled: Extract; marketplacePurchaseChanged: Extract; marketplacePurchasePendingChange: Extract; marketplacePurchasePendingChangeCancelled: Extract; marketplacePurchasePurchased: Extract; member: WebhookEventMap['member']; memberAdded: Extract; memberEdited: Extract; memberRemoved: Extract; membership: WebhookEventMap['membership']; membershipAdded: Extract; membershipRemoved: Extract; mergeGroup: WebhookEventMap['merge_group']; mergeGroupChecksRequested: Extract; mergeGroupDestroyed: Extract; meta: WebhookEventMap['meta']; metaDeleted: Extract; milestone: WebhookEventMap['milestone']; milestoneClosed: Extract; milestoneCreated: Extract; milestoneDeleted: Extract; milestoneEdited: Extract; milestoneOpened: Extract; orgBlock: WebhookEventMap['org_block']; orgBlockBlocked: Extract; orgBlockUnblocked: Extract; organization: WebhookEventMap['organization']; organizationDeleted: Extract; organizationMemberAdded: Extract; organizationMemberInvited: Extract; organizationMemberRemoved: Extract; organizationRenamed: Extract; package: WebhookEventMap['package']; packagePublished: Extract; packageUpdated: Extract; pageBuild: WebhookEventMap['page_build']; ping: WebhookEventMap['ping']; project: WebhookEventMap['project']; projectClosed: Extract; projectCreated: Extract; projectDeleted: Extract; projectEdited: Extract; projectReopened: Extract; projectCard: WebhookEventMap['project_card']; projectCardConverted: Extract; projectCardCreated: Extract; projectCardDeleted: Extract; projectCardEdited: Extract; projectCardMoved: Extract; projectColumn: WebhookEventMap['project_column']; projectColumnCreated: Extract; projectColumnDeleted: Extract; projectColumnEdited: Extract; projectColumnMoved: Extract; projectsV2Item: WebhookEventMap['projects_v2_item']; projectsV2ItemArchived: Extract; projectsV2ItemConverted: Extract; projectsV2ItemCreated: Extract; projectsV2ItemDeleted: Extract; projectsV2ItemEdited: Extract; projectsV2ItemReordered: Extract; projectsV2ItemRestored: Extract; public: WebhookEventMap['public']; pullRequest: WebhookEventMap['pull_request']; pullRequestAssigned: Extract; pullRequestAutoMergeDisabled: Extract; pullRequestAutoMergeEnabled: Extract; pullRequestClosed: Extract; pullRequestConvertedToDraft: Extract; pullRequestDemilestoned: Extract; pullRequestDequeued: Extract; pullRequestEdited: Extract; pullRequestEnqueued: Extract; pullRequestLabeled: Extract; pullRequestLocked: Extract; pullRequestMilestoned: Extract; pullRequestOpened: Extract; pullRequestReadyForReview: Extract; pullRequestReopened: Extract; pullRequestReviewRequestRemoved: Extract; pullRequestReviewRequested: Extract; pullRequestSynchronize: Extract; pullRequestUnassigned: Extract; pullRequestUnlabeled: Extract; pullRequestUnlocked: Extract; pullRequestReview: WebhookEventMap['pull_request_review']; pullRequestReviewDismissed: Extract; pullRequestReviewEdited: Extract; pullRequestReviewSubmitted: Extract; pullRequestReviewComment: WebhookEventMap['pull_request_review_comment']; pullRequestReviewCommentCreated: Extract; pullRequestReviewCommentDeleted: Extract; pullRequestReviewCommentEdited: Extract; pullRequestReviewThread: WebhookEventMap['pull_request_review_thread']; pullRequestReviewThreadResolved: Extract; pullRequestReviewThreadUnresolved: Extract; push: WebhookEventMap['push']; registryPackage: WebhookEventMap['registry_package']; registryPackagePublished: Extract; registryPackageUpdated: Extract; release: WebhookEventMap['release']; releaseCreated: Extract; releaseDeleted: Extract; releaseEdited: Extract; releasePrereleased: Extract; releasePublished: Extract; releaseReleased: Extract; releaseUnpublished: Extract; repository: WebhookEventMap['repository']; repositoryArchived: Extract; repositoryCreated: Extract; repositoryDeleted: Extract; repositoryEdited: Extract; repositoryPrivatized: Extract; repositoryPublicized: Extract; repositoryRenamed: Extract; repositoryTransferred: Extract; repositoryUnarchived: Extract; repositoryDispatch: WebhookEventMap['repository_dispatch']; repositoryDispatchSampleCollected: Extract; repositoryImport: WebhookEventMap['repository_import']; repositoryVulnerabilityAlert: WebhookEventMap['repository_vulnerability_alert']; repositoryVulnerabilityAlertCreate: Extract; repositoryVulnerabilityAlertDismiss: Extract; repositoryVulnerabilityAlertReopen: Extract; repositoryVulnerabilityAlertResolve: Extract; secretScanningAlert: WebhookEventMap['secret_scanning_alert']; secretScanningAlertAssigned: Extract; secretScanningAlertCreated: Extract; secretScanningAlertPubliclyLeaked: Extract; secretScanningAlertReopened: Extract; secretScanningAlertResolved: Extract; secretScanningAlertUnassigned: Extract; secretScanningAlertValidated: Extract; secretScanningAlertLocation: WebhookEventMap['secret_scanning_alert_location']; secretScanningAlertLocationCreated: Extract; securityAdvisory: WebhookEventMap['security_advisory']; securityAdvisoryPublished: Extract; securityAdvisoryUpdated: Extract; securityAdvisoryWithdrawn: Extract; sponsorship: WebhookEventMap['sponsorship']; sponsorshipCancelled: Extract; sponsorshipCreated: Extract; sponsorshipEdited: Extract; sponsorshipPendingCancellation: Extract; sponsorshipPendingTierChange: Extract; sponsorshipTierChanged: Extract; star: WebhookEventMap['star']; starCreated: Extract; starDeleted: Extract; status: WebhookEventMap['status']; team: WebhookEventMap['team']; teamAddedToRepository: Extract; teamCreated: Extract; teamDeleted: Extract; teamEdited: Extract; teamRemovedFromRepository: Extract; teamAdd: WebhookEventMap['team_add']; watch: WebhookEventMap['watch']; watchStarted: Extract; workflowDispatch: WebhookEventMap['workflow_dispatch']; workflowJob: WebhookEventMap['workflow_job']; workflowJobCompleted: Extract; workflowJobInProgress: Extract; workflowJobQueued: Extract; workflowJobWaiting: Extract; workflowRun: WebhookEventMap['workflow_run']; workflowRunCompleted: Extract; workflowRunInProgress: Extract; workflowRunRequested: Extract; } export type WebhookRouteKey = keyof WebhookRouteKeyEventMap; export type WebhookRouteEvent = WebhookRouteKeyEventMap[K]; export type WebhookHandler = (event: WebhookRouteEvent) => void | Promise; export type WebhookErrorHandler = (error: unknown) => void; export interface WebhookRouter { (payload: unknown): void; on(event: K, handler: WebhookHandler): WebhookRouter; on(event: 'error', handler: WebhookErrorHandler): WebhookRouter; off(event: K, handler: WebhookHandler): WebhookRouter; off(event: 'error', handler: WebhookErrorHandler): WebhookRouter; removeAllListeners(event?: string): WebhookRouter; } export declare const schemas: { get(eventType: EventType): z.ZodType; }; export declare function isWebhookEventName(value: unknown): value is WebhookEventName; export declare function isWebhookEvent(value: unknown): value is WebhookEvent; export type WebhookRouteHandlers = Partial<{ [RouteKey in WebhookRouteKey]: (event: WebhookRouteEvent) => void | Promise; }>; export declare function createGithubWebhookRouter(handlers?: WebhookRouteHandlers): WebhookRouter; //# sourceMappingURL=registry.d.ts.map