Repository: octokit/webhooks.js
Pull request #406 (2021-01-15 21:13:22)

feat: use new types from `@octokit/webhooks-definitions`
Here it is 🎉 

There's a few things to polish off and discuss before landing this, but the bulk of it is done so making the PR now.

* we're missing some events in our schema definitions.
* I've done a big rename of the types so that they're more accurate (have exported the renamed types under their old names too to be less breaking).
* I've improved the types in places so that they're accurate
* have refactored the type generation script into TS - happy to move it back to JS, or to convert the other scripts into TS
  * I tried originally trying to build the type via types, but it's just too hard (if at all possible) - you can get close with 4.1 features, but even then it's a lot of work for TS to do meaning IDE autocompletion suffers vs us just generating a static type
* probably something else I've forgotten to mention 😅 

I'm breaking some things out into their own little PRs where possible.

G-Rath: I think we're good to go - note this'll be rebased at least twice when I merge in #403 & #410, so approves won't stick until then
gr2m: > While I've marked everything in the old generated payloads as `deprecated`, I'd like to delete them asap.

Should these deprecations be part of this PR or did they already happen?

`@octokit/webhooks` has several deprecated APIs, we can cut a breaking release anytime and get rid of them all at once.
G-Rath: > Should these deprecations be part of this PR or did they already happen?

I've done them in this PR, but can easily break them out into their own PR if you like.
G-Rath: I've pinned the version constraint for `@octokit/webhooks-definitions` to be an exact version, and updated the `update` workflow to update the constraint with the latest version.

The reason for this is that otherwise it can be updated by anything that regenerates the lockfile, which we've got renovate doing every week, but we need to make sure `generate-types` is run every time the version of this package changes which won't happen.
G-Rath: Alright, let's do this! we can fix up any issues in post 😎 

Patch:
diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml
index cc2523f..f7ffe26 100644
--- a/.github/workflows/update.yml
+++ b/.github/workflows/update.yml
@@ -11,8 +11,7 @@ jobs:
       - uses: actions/checkout@v2
       - uses: actions/setup-node@v2
       - run: npm ci
-      - run: npm install @octokit/webhooks-definitions@latest
-      - run: npm run update-known-events
+      - run: npm install --save-dev --save-exact @octokit/webhooks-definitions@latest
       - run: npm run generate-types
       - name: create pull request
         uses: gr2m/create-or-update-pull-request-action@v1.x
diff --git a/README.md b/README.md
index e5f1195..3e5ea21 100644
--- a/README.md
+++ b/README.md
@@ -586,57 +586,63 @@ See the full list of [event types with example payloads](https://docs.github.com
 
 If there are actions for a webhook, events are emitted for both, the webhook name as well as a combination of the webhook name and the action, e.g. `installation` and `installation.created`.
 
-<!-- autogenerated via scripts/update-known-events.js --><table ><thead><tr><th class="name-th">Event</th><th class="actions-th">Actions</th></tr></thead><tbody ><tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#checkrunevent"><code>check_run</code></a></td><td class="actions-td td_text"><code>completed</code><br><code>created</code><br><code>requested_action</code><br><code>rerequested</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#checksuiteevent"><code>check_suite</code></a></td><td class="actions-td td_text"><code>completed</code><br><code>requested</code><br><code>rerequested</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#codescanningalertevent"><code>code_scanning_alert</code></a></td><td class="actions-td td_text"><code>appeared_in_branch</code><br><code>closed_by_user</code><br><code>created</code><br><code>fixed</code><br><code>reopened</code><br><code>reopened_by_user</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#commitcommentevent"><code>commit_comment</code></a></td><td class="actions-td td_text"><code>created</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#contentreferenceevent"><code>content_reference</code></a></td><td class="actions-td td_text"><code>created</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#createevent"><code>create</code></a></td><td class="actions-td td_num"></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#deleteevent"><code>delete</code></a></td><td class="actions-td td_num"></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#deploykeyevent"><code>deploy_key</code></a></td><td class="actions-td td_text"><code>created</code><br><code>deleted</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#deploymentevent"><code>deployment</code></a></td><td class="actions-td td_text"><code>created</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#deploymentstatusevent"><code>deployment_status</code></a></td><td class="actions-td td_text"><code>created</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#forkevent"><code>fork</code></a></td><td class="actions-td td_num"></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#githubappauthorizationevent"><code>github_app_authorization</code></a></td><td class="actions-td td_text"><code>revoked</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#gollumevent"><code>gollum</code></a></td><td class="actions-td td_num"></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#installationevent"><code>installation</code></a></td><td class="actions-td td_text"><code>created</code><br><code>deleted</code><br><code>new_permissions_accepted</code><br><code>suspend</code><br><code>unsuspend</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#installationrepositoriesevent"><code>installation_repositories</code></a></td><td class="actions-td td_text"><code>added</code><br><code>removed</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#issuecommentevent"><code>issue_comment</code></a></td><td class="actions-td td_text"><code>created</code><br><code>deleted</code><br><code>edited</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#issuesevent"><code>issues</code></a></td><td class="actions-td td_text"><code>assigned</code><br><code>closed</code><br><code>deleted</code><br><code>demilestoned</code><br><code>edited</code><br><code>labeled</code><br><code>locked</code><br><code>milestoned</code><br><code>opened</code><br><code>pinned</code><br><code>reopened</code><br><code>transferred</code><br><code>unassigned</code><br><code>unlabeled</code><br><code>unlocked</code><br><code>unpinned</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#labelevent"><code>label</code></a></td><td class="actions-td td_text"><code>created</code><br><code>deleted</code><br><code>edited</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#marketplacepurchaseevent"><code>marketplace_purchase</code></a></td><td class="actions-td td_text"><code>cancelled</code><br><code>changed</code><br><code>pending_change</code><br><code>pending_change_cancelled</code><br><code>purchased</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#memberevent"><code>member</code></a></td><td class="actions-td td_text"><code>added</code><br><code>edited</code><br><code>removed</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#membershipevent"><code>membership</code></a></td><td class="actions-td td_text"><code>added</code><br><code>removed</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#metaevent"><code>meta</code></a></td><td class="actions-td td_text"><code>deleted</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#milestoneevent"><code>milestone</code></a></td><td class="actions-td td_text"><code>closed</code><br><code>created</code><br><code>deleted</code><br><code>edited</code><br><code>opened</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#organizationevent"><code>organization</code></a></td><td class="actions-td td_text"><code>deleted</code><br><code>member_added</code><br><code>member_invited</code><br><code>member_removed</code><br><code>renamed</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#orgblockevent"><code>org_block</code></a></td><td class="actions-td td_text"><code>blocked</code><br><code>unblocked</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#packageevent"><code>package</code></a></td><td class="actions-td td_text"><code>published</code><br><code>updated</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#pagebuildevent"><code>page_build</code></a></td><td class="actions-td td_num"></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#pingevent"><code>ping</code></a></td><td class="actions-td td_num"></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#projectcardevent"><code>project_card</code></a></td><td class="actions-td td_text"><code>converted</code><br><code>created</code><br><code>deleted</code><br><code>edited</code><br><code>moved</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#projectcolumnevent"><code>project_column</code></a></td><td class="actions-td td_text"><code>created</code><br><code>deleted</code><br><code>edited</code><br><code>moved</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#projectevent"><code>project</code></a></td><td class="actions-td td_text"><code>closed</code><br><code>created</code><br><code>deleted</code><br><code>edited</code><br><code>reopened</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#publicevent"><code>public</code></a></td><td class="actions-td td_num"></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#pullrequestevent"><code>pull_request</code></a></td><td class="actions-td td_text"><code>assigned</code><br><code>closed</code><br><code>edited</code><br><code>labeled</code><br><code>locked</code><br><code>merged</code><br><code>opened</code><br><code>ready_for_review</code><br><code>reopened</code><br><code>review_request_removed</code><br><code>review_requested</code><br><code>synchronize</code><br><code>unassigned</code><br><code>unlabeled</code><br><code>unlocked</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#pullrequestreviewevent"><code>pull_request_review</code></a></td><td class="actions-td td_text"><code>dismissed</code><br><code>edited</code><br><code>submitted</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#pullrequestreviewcommentevent"><code>pull_request_review_comment</code></a></td><td class="actions-td td_text"><code>created</code><br><code>deleted</code><br><code>edited</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#pushevent"><code>push</code></a></td><td class="actions-td td_num"></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#releaseevent"><code>release</code></a></td><td class="actions-td td_text"><code>created</code><br><code>deleted</code><br><code>edited</code><br><code>prereleased</code><br><code>published</code><br><code>released</code><br><code>unpublished</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#repositorydispatchevent"><code>repository_dispatch</code></a></td><td class="actions-td td_text"><code>on-demand-test</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#repositoryevent"><code>repository</code></a></td><td class="actions-td td_text"><code>archived</code><br><code>created</code><br><code>deleted</code><br><code>edited</code><br><code>privatized</code><br><code>publicized</code><br><code>renamed</code><br><code>transferred</code><br><code>unarchived</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#repositoryimportevent"><code>repository_import</code></a></td><td class="actions-td td_num"></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#repositoryvulnerabilityalertevent"><code>repository_vulnerability_alert</code></a></td><td class="actions-td td_text"><code>create</code><br><code>dismiss</code><br><code>resolve</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#secretscanningalertevent"><code>secret_scanning_alert</code></a></td><td class="actions-td td_text"><code>created</code><br><code>reopened</code><br><code>resolved</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#securityadvisoryevent"><code>security_advisory</code></a></td><td class="actions-td td_text"><code>performed</code><br><code>published</code><br><code>updated</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#sponsorshipevent"><code>sponsorship</code></a></td><td class="actions-td td_text"><code>cancelled</code><br><code>created</code><br><code>edited</code><br><code>pending_cancellation</code><br><code>pending_tier_change</code><br><code>tier_changed</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#starevent"><code>star</code></a></td><td class="actions-td td_text"><code>created</code><br><code>deleted</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#statusevent"><code>status</code></a></td><td class="actions-td td_num"></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#teamevent"><code>team</code></a></td><td class="actions-td td_text"><code>added_to_repository</code><br><code>created</code><br><code>deleted</code><br><code>edited</code><br><code>removed_from_repository</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#teamaddevent"><code>team_add</code></a></td><td class="actions-td td_num"></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#watchevent"><code>watch</code></a></td><td class="actions-td td_text"><code>started</code></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#workflowdispatchevent"><code>workflow_dispatch</code></a></td><td class="actions-td td_num"></td></tr>
-<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#workflowrunevent"><code>workflow_run</code></a></td><td class="actions-td td_text"><code>action</code><br><code>completed</code><br><code>requested</code></td></tr></tbody></table><!-- /autogenerated via scripts/update-known-events.js -->
+<!-- autogenerated via scripts/generate-types.ts -->
+
+| Event                                                                                                                        | Actions                                                                                                                                                                                                                                             |
+| ---------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [`check_run`](https://developer.github.com/v3/activity/events/types/#checkrunevent)                                          | `completed`<br>`created`<br>`requested_action`<br>`rerequested`                                                                                                                                                                                     |
+| [`check_suite`](https://developer.github.com/v3/activity/events/types/#checksuiteevent)                                      | `completed`<br>`requested`<br>`rerequested`                                                                                                                                                                                                         |
+| [`code_scanning_alert`](https://developer.github.com/v3/activity/events/types/#codescanningalertevent)                       | `appeared_in_branch`<br>`closed_by_user`<br>`created`<br>`fixed`<br>`reopened`<br>`reopened_by_user`                                                                                                                                                |
+| [`commit_comment`](https://developer.github.com/v3/activity/events/types/#commitcommentevent)                                | `created`                                                                                                                                                                                                                                           |
+| [`content_reference`](https://developer.github.com/v3/activity/events/types/#contentreferenceevent)                          | `created`                                                                                                                                                                                                                                           |
+| [`create`](https://developer.github.com/v3/activity/events/types/#createevent)                                               |                                                                                                                                                                                                                                                     |
+| [`delete`](https://developer.github.com/v3/activity/events/types/#deleteevent)                                               |                                                                                                                                                                                                                                                     |
+| [`deploy_key`](https://developer.github.com/v3/activity/events/types/#deploykeyevent)                                        | `created`<br>`deleted`                                                                                                                                                                                                                              |
+| [`deployment`](https://developer.github.com/v3/activity/events/types/#deploymentevent)                                       | `created`                                                                                                                                                                                                                                           |
+| [`deployment_status`](https://developer.github.com/v3/activity/events/types/#deploymentstatusevent)                          | `created`                                                                                                                                                                                                                                           |
+| [`fork`](https://developer.github.com/v3/activity/events/types/#forkevent)                                                   |                                                                                                                                                                                                                                                     |
+| [`github_app_authorization`](https://developer.github.com/v3/activity/events/types/#githubappauthorizationevent)             | `revoked`                                                                                                                                                                                                                                           |
+| [`gollum`](https://developer.github.com/v3/activity/events/types/#gollumevent)                                               |                                                                                                                                                                                                                                                     |
+| [`installation`](https://developer.github.com/v3/activity/events/types/#installationevent)                                   | `created`<br>`deleted`<br>`new_permissions_accepted`<br>`suspend`<br>`unsuspend`                                                                                                                                                                    |
+| [`installation_repositories`](https://developer.github.com/v3/activity/events/types/#installationrepositoriesevent)          | `added`<br>`removed`                                                                                                                                                                                                                                |
+| [`issue_comment`](https://developer.github.com/v3/activity/events/types/#issuecommentevent)                                  | `created`<br>`deleted`<br>`edited`                                                                                                                                                                                                                  |
+| [`issues`](https://developer.github.com/v3/activity/events/types/#issuesevent)                                               | `assigned`<br>`closed`<br>`deleted`<br>`demilestoned`<br>`edited`<br>`labeled`<br>`locked`<br>`milestoned`<br>`opened`<br>`pinned`<br>`reopened`<br>`transferred`<br>`unassigned`<br>`unlabeled`<br>`unlocked`<br>`unpinned`                        |
+| [`label`](https://developer.github.com/v3/activity/events/types/#labelevent)                                                 | `created`<br>`deleted`<br>`edited`                                                                                                                                                                                                                  |
+| [`marketplace_purchase`](https://developer.github.com/v3/activity/events/types/#marketplacepurchaseevent)                    | `cancelled`<br>`changed`<br>`pending_change`<br>`pending_change_cancelled`<br>`purchased`                                                                                                                                                           |
+| [`member`](https://developer.github.com/v3/activity/events/types/#memberevent)                                               | `added`<br>`edited`<br>`removed`                                                                                                                                                                                                                    |
+| [`membership`](https://developer.github.com/v3/activity/events/types/#membershipevent)                                       | `added`<br>`removed`                                                                                                                                                                                                                                |
+| [`meta`](https://developer.github.com/v3/activity/events/types/#metaevent)                                                   | `deleted`                                                                                                                                                                                                                                           |
+| [`milestone`](https://developer.github.com/v3/activity/events/types/#milestoneevent)                                         | `closed`<br>`created`<br>`deleted`<br>`edited`<br>`opened`                                                                                                                                                                                          |
+| [`org_block`](https://developer.github.com/v3/activity/events/types/#orgblockevent)                                          | `blocked`<br>`unblocked`                                                                                                                                                                                                                            |
+| [`organization`](https://developer.github.com/v3/activity/events/types/#organizationevent)                                   | `deleted`<br>`member_added`<br>`member_invited`<br>`member_removed`<br>`renamed`                                                                                                                                                                    |
+| [`package`](https://developer.github.com/v3/activity/events/types/#packageevent)                                             | `published`<br>`updated`                                                                                                                                                                                                                            |
+| [`page_build`](https://developer.github.com/v3/activity/events/types/#pagebuildevent)                                        |                                                                                                                                                                                                                                                     |
+| [`ping`](https://developer.github.com/v3/activity/events/types/#pingevent)                                                   |                                                                                                                                                                                                                                                     |
+| [`project`](https://developer.github.com/v3/activity/events/types/#projectevent)                                             | `closed`<br>`created`<br>`deleted`<br>`edited`<br>`reopened`                                                                                                                                                                                        |
+| [`project_card`](https://developer.github.com/v3/activity/events/types/#projectcardevent)                                    | `converted`<br>`created`<br>`deleted`<br>`edited`<br>`moved`                                                                                                                                                                                        |
+| [`project_column`](https://developer.github.com/v3/activity/events/types/#projectcolumnevent)                                | `created`<br>`deleted`<br>`edited`<br>`moved`                                                                                                                                                                                                       |
+| [`public`](https://developer.github.com/v3/activity/events/types/#publicevent)                                               |                                                                                                                                                                                                                                                     |
+| [`pull_request`](https://developer.github.com/v3/activity/events/types/#pullrequestevent)                                    | `assigned`<br>`closed`<br>`converted_to_draft`<br>`edited`<br>`labeled`<br>`locked`<br>`opened`<br>`ready_for_review`<br>`reopened`<br>`review_request_removed`<br>`review_requested`<br>`synchronize`<br>`unassigned`<br>`unlabeled`<br>`unlocked` |
+| [`pull_request_review`](https://developer.github.com/v3/activity/events/types/#pullrequestreviewevent)                       | `dismissed`<br>`edited`<br>`submitted`                                                                                                                                                                                                              |
+| [`pull_request_review_comment`](https://developer.github.com/v3/activity/events/types/#pullrequestreviewcommentevent)        | `created`<br>`deleted`<br>`edited`                                                                                                                                                                                                                  |
+| [`push`](https://developer.github.com/v3/activity/events/types/#pushevent)                                                   |                                                                                                                                                                                                                                                     |
+| [`release`](https://developer.github.com/v3/activity/events/types/#releaseevent)                                             | `created`<br>`deleted`<br>`edited`<br>`prereleased`<br>`published`<br>`released`<br>`unpublished`                                                                                                                                                   |
+| [`repository`](https://developer.github.com/v3/activity/events/types/#repositoryevent)                                       | `archived`<br>`created`<br>`deleted`<br>`edited`<br>`privatized`<br>`publicized`<br>`renamed`<br>`transferred`<br>`unarchived`                                                                                                                      |
+| [`repository_dispatch`](https://developer.github.com/v3/activity/events/types/#repositorydispatchevent)                      | `on-demand-test`                                                                                                                                                                                                                                    |
+| [`repository_import`](https://developer.github.com/v3/activity/events/types/#repositoryimportevent)                          |                                                                                                                                                                                                                                                     |
+| [`repository_vulnerability_alert`](https://developer.github.com/v3/activity/events/types/#repositoryvulnerabilityalertevent) | `create`<br>`dismiss`<br>`resolve`                                                                                                                                                                                                                  |
+| [`secret_scanning_alert`](https://developer.github.com/v3/activity/events/types/#secretscanningalertevent)                   | `created`<br>`reopened`<br>`resolved`                                                                                                                                                                                                               |
+| [`security_advisory`](https://developer.github.com/v3/activity/events/types/#securityadvisoryevent)                          | `performed`<br>`published`<br>`updated`                                                                                                                                                                                                             |
+| [`sponsorship`](https://developer.github.com/v3/activity/events/types/#sponsorshipevent)                                     | `cancelled`<br>`created`<br>`edited`<br>`pending_cancellation`<br>`pending_tier_change`<br>`tier_changed`                                                                                                                                           |
+| [`star`](https://developer.github.com/v3/activity/events/types/#starevent)                                                   | `created`<br>`deleted`                                                                                                                                                                                                                              |
+| [`status`](https://developer.github.com/v3/activity/events/types/#statusevent)                                               |                                                                                                                                                                                                                                                     |
+| [`team`](https://developer.github.com/v3/activity/events/types/#teamevent)                                                   | `added_to_repository`<br>`created`<br>`deleted`<br>`edited`<br>`removed_from_repository`                                                                                                                                                            |
+| [`team_add`](https://developer.github.com/v3/activity/events/types/#teamaddevent)                                            |                                                                                                                                                                                                                                                     |
+| [`watch`](https://developer.github.com/v3/activity/events/types/#watchevent)                                                 | `started`                                                                                                                                                                                                                                           |
+| [`workflow_dispatch`](https://developer.github.com/v3/activity/events/types/#workflowdispatchevent)                          |                                                                                                                                                                                                                                                     |
+| [`workflow_run`](https://developer.github.com/v3/activity/events/types/#workflowrunevent)                                    | `completed`<br>`requested`                                                                                                                                                                                                                          |
+
+<!-- /autogenerated via scripts/generate-types.ts -->
 
 ## TypeScript
 
diff --git a/package-lock.json b/package-lock.json
index 72318f6..8f2e487 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1086,24 +1086,6 @@
         "minimist": "^1.2.0"
       }
     },
-    "@gimenete/type-writer": {
-      "version": "0.1.5",
-      "resolved": "https://registry.npmjs.org/@gimenete/type-writer/-/type-writer-0.1.5.tgz",
-      "integrity": "sha512-ZeVljCBixwIU4MG3Kqy/3Dc7zfIMCj9kXyCQ6hiutwFqZkTWggrhqNSEc+NfN2ztLjUG+ssdFe7PUcCIXv67aA==",
-      "dev": true,
-      "requires": {
-        "camelcase": "^5.0.0",
-        "prettier": "^1.19.1"
-      },
-      "dependencies": {
-        "prettier": {
-          "version": "1.19.1",
-          "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz",
-          "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==",
-          "dev": true
-        }
-      }
-    },
     "@istanbuljs/load-nyc-config": {
       "version": "1.1.0",
       "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",
@@ -1848,9 +1830,9 @@
       }
     },
     "@octokit/webhooks-definitions": {
-      "version": "3.53.3",
-      "resolved": "https://registry.npmjs.org/@octokit/webhooks-definitions/-/webhooks-definitions-3.53.3.tgz",
-      "integrity": "sha512-wswHP/MEkV7FlmYpJIjBhtoaLw9e6+KcaIy4OkxzG/Y8Cu3RwwxJLRCAoQKNsSOMKpwK0sAQw7TlEYdzT0ow+g==",
+      "version": "3.56.0",
+      "resolved": "https://registry.npmjs.org/@octokit/webhooks-definitions/-/webhooks-definitions-3.56.0.tgz",
+      "integrity": "sha512-56Uf71qvpK6/P4Jy4w36E3r7xIav2ZQ+HW0/Nz2F/YEO/uGcg+8BCvRwdFHj75VpKH+JiLfc5wxtM7GfuQRApA==",
       "dev": true
     },
     "@pika/babel-plugin-esm-import-rewrite": {
@@ -2301,6 +2283,12 @@
         "pretty-format": "^26.0.0"
       }
     },
+    "@types/json-schema": {
+      "version": "7.0.7",
+      "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz",
+      "integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==",
+      "dev": true
+    },
     "@types/minimatch": {
       "version": "3.0.3",
       "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz",
@@ -7585,23 +7573,6 @@
         "signal-exit": "^3.0.2"
       }
     },
-    "lower-case": {
-      "version": "2.0.2",
-      "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz",
-      "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==",
-      "dev": true,
-      "requires": {
-        "tslib": "^2.0.3"
-      },
-      "dependencies": {
-        "tslib": {
-          "version": "2.1.0",
-          "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
-          "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==",
-          "dev": true
-        }
-      }
-    },
     "lowercase-keys": {
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz",
@@ -7991,24 +7962,6 @@
       "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
       "dev": true
     },
-    "no-case": {
-      "version": "3.0.4",
-      "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz",
-      "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==",
-      "dev": true,
-      "requires": {
-        "lower-case": "^2.0.2",
-        "tslib": "^2.0.3"
-      },
-      "dependencies": {
-        "tslib": {
-          "version": "2.1.0",
-          "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
-          "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==",
-          "dev": true
-        }
-      }
-    },
     "node-emoji": {
       "version": "1.10.0",
       "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.10.0.tgz",
@@ -12097,24 +12050,6 @@
       "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==",
       "dev": true
     },
-    "pascal-case": {
-      "version": "3.1.2",
-      "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz",
-      "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==",
-      "dev": true,
-      "requires": {
-        "no-case": "^3.0.4",
-        "tslib": "^2.0.3"
-      },
-      "dependencies": {
-        "tslib": {
-          "version": "2.1.0",
-          "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
-          "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==",
-          "dev": true
-        }
-      }
-    },
     "pascalcase": {
       "version": "0.1.1",
       "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz",
@@ -14087,12 +14022,6 @@
       "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==",
       "dev": true
     },
-    "table-builder": {
-      "version": "2.1.1",
-      "resolved": "https://registry.npmjs.org/table-builder/-/table-builder-2.1.1.tgz",
-      "integrity": "sha512-8nisA2wuyyswF22t8nQzH8itn+W5Q5I6UjGkD6pYtXeKvVhj4En+dXAZz/XiZvx45hoc2v/nXFFRhTeiFPvkXg==",
-      "dev": true
-    },
     "temp-dir": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz",
diff --git a/package.json b/package.json
index 2a27bac..9a77c6e 100644
--- a/package.json
+++ b/package.json
@@ -12,12 +12,11 @@
   "scripts": {
     "build": "pika build",
     "coverage": "jest --coverage && open coverage/lcov-report/index.html",
-    "generate-types": "node scripts/generate-types.js",
+    "generate-types": "ts-node --transpile-only scripts/generate-types.ts",
     "lint": "prettier --check 'src/**/*.{ts,json}' 'scripts/**/*' 'test/**/*' README.md package.json",
     "lint:fix": "prettier --write 'src/**/*.{ts,json}' 'scripts/**/*' 'test/**/*' README.md package.json",
     "pretest": "npm run -s lint",
     "test": "jest --coverage",
-    "update-known-events": "node scripts/update-known-events.js",
     "validate:ts": "tsc --noEmit --noImplicitAny --target es2020 --esModuleInterop --moduleResolution node test/typescript-validate.ts"
   },
   "prettier": {},
@@ -27,25 +26,23 @@
     "debug": "^4.0.0"
   },
   "devDependencies": {
-    "@gimenete/type-writer": "^0.1.5",
     "@jest/types": "^26.6.2",
     "@octokit/tsconfig": "^1.0.1",
-    "@octokit/webhooks-definitions": "^3.22.2",
+    "@octokit/webhooks-definitions": "3.56.0",
     "@pika/pack": "^0.5.0",
     "@pika/plugin-build-node": "^0.9.2",
     "@pika/plugin-ts-standard-pkg": "^0.9.2",
     "@types/debug": "^4.1.5",
     "@types/jest": "^26.0.9",
+    "@types/json-schema": "^7.0.7",
     "@types/node": "^14.0.14",
     "@types/prettier": "^2.0.0",
     "axios": "^0.21.0",
     "get-port": "^5.0.0",
     "jest": "^26.2.2",
-    "pascal-case": "^3.0.0",
     "prettier": "^2.0.1",
     "prettier-plugin-packagejson": "^2.2.9",
     "semantic-release": "^17.0.0",
-    "table-builder": "^2.1.1",
     "ts-jest": "^26.2.0",
     "ts-node": "^9.1.1",
     "typescript": "^4.0.2"
diff --git a/scripts/generate-file.js b/scripts/generate-file.js
deleted file mode 100644
index 0c40808..0000000
--- a/scripts/generate-file.js
+++ /dev/null
@@ -1,9 +0,0 @@
-const { writeFileSync } = require("fs");
-const { format } = require("prettier");
-
-const generateFile = (filepath, content) => {
-  const output = format(content, { filepath });
-  writeFileSync(filepath, output);
-};
-
-exports.generateFile = generateFile;
diff --git a/scripts/generate-types.js b/scripts/generate-types.js
deleted file mode 100644
index a6f7f8f..0000000
--- a/scripts/generate-types.js
+++ /dev/null
@@ -1,104 +0,0 @@
-const { pascalCase } = require("pascal-case");
-const TypeWriter = require("@gimenete/type-writer");
-const webhooks = require("@octokit/webhooks-definitions/index.json");
-const { generateFile } = require("./generate-file");
-
-const tw = new TypeWriter();
-const eventPayloadMapping = [
-  ["error", "WebhookEventHandlerError"],
-  ["*", "WebhookEvent<any>"],
-];
-
-const doNotEditThisFileDisclaimer = `
-// THIS FILE IS GENERATED - DO NOT EDIT DIRECTLY
-// make edits in scripts/generate-types.js`;
-const eventPayloadsVariable = "EventPayloads";
-
-const generatePayloadType = (typeName) => {
-  const namedKeyPaths = {
-    [`${typeName}.repository`]: "PayloadRepository",
-    // This prevents a naming colision between the payload of a `installation_repositories` event
-    // and the `repositories` attribute of a `installation` event
-    "WebhookPayloadInstallation.repositories":
-      "WebhookPayloadInstallation_Repositories",
-  };
-
-  if (typeName !== "WebhookPayloadMarketplacePurchase") {
-    namedKeyPaths[`${typeName}.sender`] = "PayloadSender";
-  }
-
-  return {
-    rootTypeName: typeName,
-    namedKeyPaths,
-  };
-};
-
-const generateEventNameType = (name, actions) => [
-  name,
-  ...actions.map((action) => {
-    return `${name}.${action}`;
-  }),
-];
-
-webhooks.forEach(({ name, actions, examples }) => {
-  if (!examples) {
-    return;
-  }
-
-  const typeName = `WebhookPayload${pascalCase(name)}`;
-  tw.add(examples, generatePayloadType(typeName));
-
-  if (tw.keypaths[`${typeName}Action`]) {
-    delete tw.keypaths[`${typeName}Action`].string;
-
-    actions.forEach(
-      (action) => (tw.keypaths[`${typeName}Action`][`"${action}"`] = {})
-    );
-  }
-
-  const eventNameTypes = generateEventNameType(name, actions);
-  eventNameTypes.forEach((type) => {
-    eventPayloadMapping.push([
-      type,
-      `WebhookEvent<${eventPayloadsVariable}.${typeName}>`,
-    ]);
-  });
-});
-
-tw.add(
-  webhooks.flatMap(({ examples }) =>
-    examples
-      .map((example) => example.sender)
-      .filter((sender) => sender !== undefined)
-  ),
-  {
-    rootTypeName: "PayloadSender",
-  }
-);
-
-const getWebhookPayloadTypeFromEvent = `
-${doNotEditThisFileDisclaimer}
-
-import { ${eventPayloadsVariable} } from "./event-payloads";
-import { WebhookEvent, WebhookEventHandlerError } from "../types";
-
-export interface EventTypesPayload {
-  ${eventPayloadMapping.map(([name, type]) => `"${name}": ${type}`).join(`,\n`)}
-}
-
-export type WebhookEvents = keyof EventTypesPayload
-`;
-
-generateFile(
-  "src/generated/get-webhook-payload-type-from-event.ts",
-  getWebhookPayloadTypeFromEvent
-);
-
-const eventPayloadsContent = `
-${doNotEditThisFileDisclaimer}
-
-export declare module ${eventPayloadsVariable} {
-  ${tw.generate("typescript", { inlined: false })}}
-`;
-
-generateFile("src/generated/event-payloads.ts", eventPayloadsContent);
diff --git a/scripts/generate-types.ts b/scripts/generate-types.ts
new file mode 100755
index 0000000..2baf019
--- /dev/null
+++ b/scripts/generate-types.ts
@@ -0,0 +1,205 @@
+#!/usr/bin/env ts-node-transpile-only
+
+import { strict as assert } from "assert";
+import * as fs from "fs";
+import { JSONSchema7, JSONSchema7Definition } from "json-schema";
+import { format } from "prettier";
+
+type JSONSchemaWithRef = JSONSchema7 & Required<Pick<JSONSchema7, "$ref">>;
+
+interface Schema extends JSONSchema7 {
+  definitions: Record<string, JSONSchema7>;
+  oneOf: JSONSchemaWithRef[];
+}
+
+const schema = require("@octokit/webhooks-definitions/schema.json") as Schema;
+
+const titleCase = (str: string) => `${str[0].toUpperCase()}${str.substring(1)}`;
+
+const guessAtInterfaceName = (str: string) =>
+  str.split(/[$_-]/u).map(titleCase).join("");
+
+const guessAtEventName = (name: string) => {
+  const [, eventName] = /^(.+)[$_-]event/u.exec(name) ?? [];
+
+  assert.ok(eventName, `unable to guess event name for "${name}"`);
+
+  return eventName;
+};
+const guessAtActionName = (name: string) => name.replace("$", ".");
+
+const getDefinitionName = (ref: string): string => {
+  assert.ok(
+    ref.startsWith("#/definitions/"),
+    `${ref} does not reference a valid definition`
+  );
+
+  const [, name] = /^#\/definitions\/(.+)$/u.exec(ref) ?? [];
+
+  assert.ok(name, `unable to find definition name ${ref}`);
+
+  return name;
+};
+
+type NameAndActions = [name: string, actions: string[]];
+type Property = [key: string, value: string];
+type ImportsAndProperties = [imports: string[], properties: Property[]];
+
+const buildEventProperties = ([
+  eventName,
+  actions,
+]: NameAndActions): ImportsAndProperties => {
+  const interfaceName = guessAtInterfaceName(eventName);
+  const importsAndProperties: ImportsAndProperties = [
+    [interfaceName],
+    [[guessAtEventName(eventName), interfaceName]],
+  ];
+
+  if (actions.length) {
+    actions.forEach((actionName) => {
+      const actionInterfaceName = guessAtInterfaceName(`${actionName}_event`);
+
+      importsAndProperties[0].push(actionInterfaceName);
+      importsAndProperties[1].push([
+        guessAtActionName(actionName),
+        actionInterfaceName,
+      ]);
+    });
+  }
+
+  return importsAndProperties;
+};
+
+const isJSONSchemaWithRef = (
+  object: JSONSchema7Definition
+): object is JSONSchemaWithRef =>
+  typeof object === "object" && object.$ref !== undefined;
+
+const listEvents = () => {
+  return schema.oneOf.map<NameAndActions>(({ $ref }) => {
+    const name = getDefinitionName($ref);
+    const definition = schema.definitions[name];
+
+    assert.ok(definition, `unable to find definition named ${name}`);
+
+    if (definition.oneOf?.every(isJSONSchemaWithRef)) {
+      return [name, definition.oneOf.map((def) => getDefinitionName(def.$ref))];
+    }
+
+    return [name, []];
+  });
+};
+
+const getImportsAndProperties = (): ImportsAndProperties => {
+  const importsAndProperties = listEvents().map(buildEventProperties);
+
+  return importsAndProperties.reduce<ImportsAndProperties>(
+    (allImportsAndProperties, [imports, properties]) => {
+      return [
+        allImportsAndProperties[0].concat(imports),
+        allImportsAndProperties[1].concat(properties),
+      ];
+    },
+    [[], []]
+  );
+};
+
+const outDir = "src/generated/";
+
+const generateTypeScriptFile = (name: string, contents: string[]) => {
+  fs.writeFileSync(
+    `${outDir}/${name}.ts`,
+    format(contents.join("\n"), { parser: "typescript" })
+  );
+};
+
+const asCode = (str: string): string => `\`${str}\``;
+const asLink = (event: string): string => {
+  const link = `https://developer.github.com/v3/activity/events/types/#${event.replace(
+    /[^a-z]/g,
+    ""
+  )}event`;
+
+  return `[${asCode(event)}](${link})`;
+};
+
+const updateReadme = (properties: string[]) => {
+  const headers = "| Event | Actions |";
+
+  const events = properties
+    .filter((property) => property !== "*" && property !== "error")
+    .reduce<Record<string, string[]>>((events, property) => {
+      console.log(property);
+      const [event, action] = property.split(".");
+
+      events[event] ||= [];
+
+      if (action) {
+        events[event].push(action);
+      }
+
+      return events;
+    }, {});
+
+  const rows = Object.entries(events).map(
+    ([event, actions]) =>
+      `| ${asLink(event)} | ${actions.map(asCode).join("<br>")} |`
+  );
+
+  const table = format([headers, "| --- | --- |", ...rows].join("\n"), {
+    parser: "markdown",
+  });
+
+  const readme = fs.readFileSync("README.md", "utf-8");
+
+  const TableStartString =
+    "<!-- autogenerated via scripts/generate-types.ts -->";
+  const TableEndString =
+    "<!-- /autogenerated via scripts/generate-types.ts -->";
+  const tableStartIndex = readme.indexOf(TableStartString);
+  const tableEndIndex = readme.indexOf(TableEndString);
+
+  assert.ok(tableStartIndex !== -1, "cannot find start of table");
+  assert.ok(tableEndIndex !== -1, "cannot find end of table");
+
+  fs.writeFileSync(
+    "README.md",
+    `${readme.slice(
+      0,
+      tableStartIndex + TableStartString.length
+    )}\n\n${table}\n${readme.slice(tableEndIndex)}`
+  );
+};
+
+const run = () => {
+  const [imports, properties] = getImportsAndProperties();
+
+  const lines: string[] = [
+    "// THIS FILE IS GENERATED - DO NOT EDIT DIRECTLY",
+    "// make edits in scripts/generate-types.ts",
+    "",
+    "import {",
+    ...imports.map((str) => `  ${str},`),
+    '} from "@octokit/webhooks-definitions/schema";',
+    "",
+    "export interface EmitterEventWebhookPayloadMap {",
+    ...properties.map(([key, value]) => `"${key}": ${value}`),
+    "}",
+  ];
+
+  generateTypeScriptFile("get-webhook-payload-type-from-event", lines);
+  generateTypeScriptFile("webhook-names", [
+    "// THIS FILE IS GENERATED - DO NOT EDIT DIRECTLY",
+    "// make edits in scripts/generate-types.ts",
+    "",
+    "export const emitterEventNames = [",
+    '"*",',
+    '"error",',
+    ...properties.map(([key]) => `"${key}",`),
+    "];",
+  ]);
+
+  updateReadme(properties.map(([key]) => key));
+};
+
+run();
diff --git a/scripts/update-known-events.js b/scripts/update-known-events.js
deleted file mode 100644
index 24ec3cf..0000000
--- a/scripts/update-known-events.js
+++ /dev/null
@@ -1,54 +0,0 @@
-const { readFileSync, writeFileSync } = require("fs");
-const Table = require("table-builder");
-const WEBOOOKS = require("@octokit/webhooks-definitions/index.json");
-const { generateFile } = require("./generate-file");
-
-const doNotEditThisFileDisclaimer = `
-// THIS FILE IS GENERATED - DO NOT EDIT DIRECTLY
-// make edits in scripts/update-known-events.js`;
-const newWebhookNames = WEBOOOKS.reduce(
-  (list, event) => {
-    list.push(
-      event.name,
-      ...event.actions.map((action) => `${event.name}.${action}`)
-    );
-    return list;
-  },
-  ["*", "error"]
-).sort();
-
-generateFile(
-  "src/generated/webhook-names.ts",
-  `
-  ${doNotEditThisFileDisclaimer}
-
-    export const webhookNames = ${JSON.stringify([...newWebhookNames], null, 2)}
-  `
-);
-
-// update README.md
-const data = WEBOOOKS.map((w) => {
-  const link = `https://developer.github.com/v3/activity/events/types/#${w.name.replace(
-    /[^a-z]/g,
-    ""
-  )}event`;
-  return {
-    name: `<a href="${link}"><code>${w.name}</code></a>`,
-    actions: w.actions.map((action) => `<code>${action}</code>`).join("<br>"),
-  };
-});
-const headers = { name: "Event", actions: "Actions" };
-const tableHtml = new Table().setHeaders(headers).setData(data).render();
-
-const readme = readFileSync("README.md").toString();
-const parts = readme.split(
-  /<!-- \/?autogenerated via scripts\/update-known-events.js -->/
-);
-
-const newReadme =
-  parts[0] +
-  "<!-- autogenerated via scripts/update-known-events.js -->" +
-  tableHtml +
-  "<!-- /autogenerated via scripts/update-known-events.js -->" +
-  parts[2];
-writeFileSync("README.md", newReadme);
diff --git a/src/event-handler/on.ts b/src/event-handler/on.ts
index cf7e0dd..4fdf591 100644
--- a/src/event-handler/on.ts
+++ b/src/event-handler/on.ts
@@ -1,10 +1,14 @@
-import { WebhookEvents } from "../generated/get-webhook-payload-type-from-event";
-import { webhookNames } from "../generated/webhook-names";
-import { State, WebhookEvent, WebhookEventHandlerError } from "../types";
+import { emitterEventNames } from "../generated/webhook-names";
+import {
+  EmitterAnyEvent,
+  EmitterEventName,
+  State,
+  WebhookEventHandlerError,
+} from "../types";
 
 function handleEventHandlers(
   state: State,
-  webhookName: WebhookEvents,
+  webhookName: EmitterEventName,
   handler: Function
 ) {
   if (!state.hooks[webhookName]) {
@@ -15,7 +19,7 @@ function handleEventHandlers(
 }
 export function receiverOn(
   state: State,
-  webhookNameOrNames: WebhookEvents | WebhookEvents[],
+  webhookNameOrNames: EmitterEventName | EmitterEventName[],
   handler: Function
 ) {
   if (Array.isArray(webhookNameOrNames)) {
@@ -25,7 +29,7 @@ export function receiverOn(
     return;
   }
 
-  if (webhookNames.indexOf(webhookNameOrNames) === -1) {
+  if (emitterEventNames.indexOf(webhookNameOrNames) === -1) {
     console.warn(
       `"${webhookNameOrNames}" is not a known webhook name (https://developer.github.com/v3/activity/events/types/)`
     );
@@ -45,7 +49,7 @@ export function receiverOn(
 
 export function receiverOnAny(
   state: State,
-  handler: (event: WebhookEvent<any>) => any
+  handler: (event: EmitterAnyEvent) => any
 ) {
   handleEventHandlers(state, "*", handler);
 }
diff --git a/src/event-handler/receive.ts b/src/event-handler/receive.ts
index b90ceb3..9218164 100644
--- a/src/event-handler/receive.ts
+++ b/src/event-handler/receive.ts
@@ -1,30 +1,36 @@
 // @ts-ignore to address #245
 import AggregateError from "aggregate-error";
-
-import { wrapErrorHandler } from "./wrap-error-handler";
+import { EmitterEventWebhookPayloadMap } from "../generated/get-webhook-payload-type-from-event";
 import {
-  WebhookEvent,
+  EmitterEventName,
+  EmitterWebhookEvent,
   State,
   WebhookError,
   WebhookEventHandlerError,
 } from "../types";
-import { WebhookEvents } from "../generated/get-webhook-payload-type-from-event";
+import { wrapErrorHandler } from "./wrap-error-handler";
+
+type EventAction = Extract<
+  EmitterEventWebhookPayloadMap[keyof EmitterEventWebhookPayloadMap],
+  { action: string }
+>["action"];
 
 function getHooks(
   state: State,
-  eventPayloadAction: string,
-  eventName: WebhookEvents
+  eventPayloadAction: EventAction | null,
+  eventName: EmitterEventName
 ): Function[] {
-  const hooks = [state.hooks[`${eventName}.${eventPayloadAction}`]];
+  const hooks = [state.hooks[eventName], state.hooks["*"]];
 
-  hooks.push(state.hooks[eventName]);
-  hooks.push(state.hooks["*"]);
+  if (eventPayloadAction) {
+    hooks.unshift(state.hooks[`${eventName}.${eventPayloadAction}`]);
+  }
 
   return ([] as Function[]).concat(...hooks.filter(Boolean));
 }
 
 // main handler function
-export function receiverHandle(state: State, event: WebhookEvent) {
+export function receiverHandle(state: State, event: EmitterWebhookEvent) {
   const errorHandlers = state.hooks.error || [];
 
   if (event instanceof Error) {
@@ -46,7 +52,11 @@ export function receiverHandle(state: State, event: WebhookEvent) {
   }
 
   // flatten arrays of event listeners and remove undefined values
-  const hooks = getHooks(state, event.payload.action, event.name);
+  const hooks = getHooks(
+    state,
+    "action" in event.payload ? event.payload.action : null,
+    event.name
+  );
 
   if (hooks.length === 0) {
     return Promise.resolve();
diff --git a/src/event-handler/remove-listener.ts b/src/event-handler/remove-listener.ts
index e096cfe..6a488b3 100644
--- a/src/event-handler/remove-listener.ts
+++ b/src/event-handler/remove-listener.ts
@@ -1,8 +1,8 @@
-import { State } from "../types";
+import { EmitterEventName, State } from "../types";
 
 export function removeListener(
   state: State,
-  webhookNameOrNames: string | string[],
+  webhookNameOrNames: EmitterEventName | EmitterEventName[],
   handler: Function
 ) {
   if (Array.isArray(webhookNameOrNames)) {
diff --git a/src/generated/event-payloads.ts b/src/generated/event-payloads.ts
index 65b52a0..485f4fc 100644
--- a/src/generated/event-payloads.ts
+++ b/src/generated/event-payloads.ts
@@ -1,7 +1,8 @@
 // THIS FILE IS GENERATED - DO NOT EDIT DIRECTLY
-// make edits in scripts/generate-types.js
+// this file is deprecated - new types come from @octokit/webhooks-definitions/schema
 
-export declare module EventPayloads {
+export /** @deprecated */ declare module EventPayloads {
+  /** @deprecated */
   type WebhookPayloadWorkflowRunWorkflowRunRepositoryOwner = {
     avatar_url: string;
     events_url: string;
@@ -22,6 +23,7 @@ export declare module EventPayloads {
     type: string;
     url: string;
   };
+  /** @deprecated */
   type WebhookPayloadWorkflowRunWorkflowRunRepository = {
     archive_url: string;
     assignees_url: string;
@@ -70,6 +72,7 @@ export declare module EventPayloads {
     trees_url: string;
     url: string;
   };
+  /** @deprecated */
   type WebhookPayloadWorkflowRunWorkflowRunHeadRepositoryOwner = {
     avatar_url: string;
     events_url: string;
@@ -90,6 +93,7 @@ export declare module EventPayloads {
     type: string;
     url: string;
   };
+  /** @deprecated */
   type WebhookPayloadWorkflowRunWorkflowRunHeadRepository = {
     archive_url: string;
     assignees_url: string;
@@ -138,14 +142,17 @@ export declare module EventPayloads {
     trees_url: string;
     url: string;
   };
+  /** @deprecated */
   type WebhookPayloadWorkflowRunWorkflowRunHeadCommitCommitter = {
     email: string;
     name: string;
   };
+  /** @deprecated */
   type WebhookPayloadWorkflowRunWorkflowRunHeadCommitAuthor = {
     email: string;
     name: string;
   };
+  /** @deprecated */
   type WebhookPayloadWorkflowRunWorkflowRunHeadCommit = {
     author: WebhookPayloadWorkflowRunWorkflowRunHeadCommitAuthor;
     committer: WebhookPayloadWorkflowRunWorkflowRunHeadCommitCommitter;
@@ -154,6 +161,7 @@ export declare module EventPayloads {
     timestamp: string;
     tree_id: string;
   };
+  /** @deprecated */
   type WebhookPayloadWorkflowRunWorkflowRun = {
     artifacts_url: string;
     cancel_url: string;
@@ -180,6 +188,7 @@ export declare module EventPayloads {
     workflow_id: number;
     workflow_url: string;
   };
+  /** @deprecated */
   type WebhookPayloadWorkflowRunWorkflow = {
     badge_url: string;
     created_at: string;
@@ -192,6 +201,7 @@ export declare module EventPayloads {
     updated_at: string;
     url: string;
   };
+  /** @deprecated */
   type WebhookPayloadWorkflowRunOrganization = {
     avatar_url: string;
     description: string;
@@ -206,6 +216,7 @@ export declare module EventPayloads {
     repos_url: string;
     url: string;
   };
+  /** @deprecated */
   type WebhookPayloadWorkflowRun = {
     action: "action" | "completed" | "requested";
     organization: WebhookPayloadWorkflowRunOrganization;
@@ -214,6 +225,7 @@ export declare module EventPayloads {
     workflow?: WebhookPayloadWorkflowRunWorkflow;
     workflow_run?: WebhookPayloadWorkflowRunWorkflowRun;
   };
+  /** @deprecated */
   type WebhookPayloadWorkflowDispatchOrganization = {
     login: string;
     id: number;
@@ -228,7 +240,9 @@ export declare module EventPayloads {
     avatar_url: string;
     description: string;
   };
+  /** @deprecated */
   type WebhookPayloadWorkflowDispatchInputs = {};
+  /** @deprecated */
   type WebhookPayloadWorkflowDispatch = {
     inputs: WebhookPayloadWorkflowDispatchInputs;
     ref: string;
@@ -237,14 +251,18 @@ export declare module EventPayloads {
     sender: PayloadSender;
     workflow: string;
   };
+  /** @deprecated */
   type WebhookPayloadWatchInstallation = { id: number; node_id: string };
+  /** @deprecated */
   type WebhookPayloadWatch = {
     action: "started";
     repository: PayloadRepository;
     sender: PayloadSender;
     installation?: WebhookPayloadWatchInstallation;
   };
+  /** @deprecated */
   type WebhookPayloadTeamAddInstallation = { id: number; node_id: string };
+  /** @deprecated */
   type WebhookPayloadTeamAddOrganization = {
     login: string;
     id: number;
@@ -259,6 +277,7 @@ export declare module EventPayloads {
     avatar_url: string;
     description: string;
   };
+  /** @deprecated */
   type WebhookPayloadTeamAddTeam = {
     name: string;
     id: number;
@@ -272,6 +291,7 @@ export declare module EventPayloads {
     repositories_url: string;
     permission: string;
   };
+  /** @deprecated */
   type WebhookPayloadTeamAdd = {
     team: WebhookPayloadTeamAddTeam;
     repository: PayloadRepository;
@@ -279,7 +299,9 @@ export declare module EventPayloads {
     sender: PayloadSender;
     installation?: WebhookPayloadTeamAddInstallation;
   };
+  /** @deprecated */
   type WebhookPayloadTeamChanges = {};
+  /** @deprecated */
   type WebhookPayloadTeamOrganization = {
     login: string;
     id: number;
@@ -294,11 +316,13 @@ export declare module EventPayloads {
     avatar_url: string;
     description: string;
   };
+  /** @deprecated */
   type PayloadRepositoryPermissions = {
     pull: boolean;
     push: boolean;
     admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadTeamTeam = {
     name: string;
     id: number;
@@ -312,6 +336,7 @@ export declare module EventPayloads {
     repositories_url: string;
     permission: string;
   };
+  /** @deprecated */
   type WebhookPayloadTeam = {
     action:
       | "added_to_repository"
@@ -325,13 +350,17 @@ export declare module EventPayloads {
     sender: PayloadSender;
     changes?: WebhookPayloadTeamChanges;
   };
+  /** @deprecated */
   type WebhookPayloadStatusInstallation = { id: number; node_id: string };
+  /** @deprecated */
   type WebhookPayloadStatusBranchesItemCommit = { sha: string; url: string };
+  /** @deprecated */
   type WebhookPayloadStatusBranchesItem = {
     name: string;
     commit: WebhookPayloadStatusBranchesItemCommit;
     protected: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadStatusCommitCommitter = {
     login: string;
     id: number;
@@ -352,6 +381,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadStatusCommitAuthor = {
     login: string;
     id: number;
@@ -372,23 +402,28 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadStatusCommitCommitVerification = {
     verified: boolean;
     reason: string;
     signature: string;
     payload: string;
   };
+  /** @deprecated */
   type WebhookPayloadStatusCommitCommitTree = { sha: string; url: string };
+  /** @deprecated */
   type WebhookPayloadStatusCommitCommitCommitter = {
     name: string;
     email: string;
     date: string;
   };
+  /** @deprecated */
   type WebhookPayloadStatusCommitCommitAuthor = {
     name: string;
     email: string;
     date: string;
   };
+  /** @deprecated */
   type WebhookPayloadStatusCommitCommit = {
     author: WebhookPayloadStatusCommitCommitAuthor;
     committer: WebhookPayloadStatusCommitCommitCommitter;
@@ -398,6 +433,7 @@ export declare module EventPayloads {
     comment_count: number;
     verification: WebhookPayloadStatusCommitCommitVerification;
   };
+  /** @deprecated */
   type WebhookPayloadStatusCommit = {
     sha: string;
     node_id: string;
@@ -409,6 +445,7 @@ export declare module EventPayloads {
     committer: WebhookPayloadStatusCommitCommitter;
     parents: Array<any>;
   };
+  /** @deprecated */
   type WebhookPayloadStatus = {
     id: number;
     sha: string;
@@ -425,12 +462,14 @@ export declare module EventPayloads {
     sender: PayloadSender;
     installation?: WebhookPayloadStatusInstallation;
   };
+  /** @deprecated */
   type WebhookPayloadStar = {
     action: "created" | "deleted";
     starred_at: string | null;
     repository: PayloadRepository;
     sender: PayloadSender;
   };
+  /** @deprecated */
   type WebhookPayloadSponsorshipChangesTierFrom = {
     node_id: string;
     created_at: string;
@@ -439,12 +478,15 @@ export declare module EventPayloads {
     monthly_price_in_dollars: number;
     name: string;
   };
+  /** @deprecated */
   type WebhookPayloadSponsorshipChangesTier = {
     from: WebhookPayloadSponsorshipChangesTierFrom;
   };
+  /** @deprecated */
   type WebhookPayloadSponsorshipChanges = {
     tier: WebhookPayloadSponsorshipChangesTier;
   };
+  /** @deprecated */
   type WebhookPayloadSponsorshipSponsorshipTier = {
     node_id: string;
     created_at: string;
@@ -453,6 +495,7 @@ export declare module EventPayloads {
     monthly_price_in_dollars: number;
     name: string;
   };
+  /** @deprecated */
   type WebhookPayloadSponsorshipSponsorshipSponsor = {
     login: string;
     id: number;
@@ -473,6 +516,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadSponsorshipSponsorshipSponsorable = {
     login: string;
     id: number;
@@ -493,6 +537,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadSponsorshipSponsorship = {
     node_id: string;
     created_at: string;
@@ -501,6 +546,7 @@ export declare module EventPayloads {
     privacy_level: string;
     tier: WebhookPayloadSponsorshipSponsorshipTier;
   };
+  /** @deprecated */
   type WebhookPayloadSponsorship = {
     action:
       | "cancelled"
@@ -514,26 +560,32 @@ export declare module EventPayloads {
     changes?: WebhookPayloadSponsorshipChanges;
     effective_date?: string;
   };
+  /** @deprecated */
   type WebhookPayloadSecurityAdvisorySecurityAdvisoryVulnerabilitiesItemFirstPatchedVersion = {
     identifier: string;
   };
+  /** @deprecated */
   type WebhookPayloadSecurityAdvisorySecurityAdvisoryVulnerabilitiesItemPackage = {
     ecosystem: string;
     name: string;
   };
+  /** @deprecated */
   type WebhookPayloadSecurityAdvisorySecurityAdvisoryVulnerabilitiesItem = {
     package: WebhookPayloadSecurityAdvisorySecurityAdvisoryVulnerabilitiesItemPackage;
     severity: string;
     vulnerable_version_range: string;
     first_patched_version: WebhookPayloadSecurityAdvisorySecurityAdvisoryVulnerabilitiesItemFirstPatchedVersion;
   };
+  /** @deprecated */
   type WebhookPayloadSecurityAdvisorySecurityAdvisoryReferencesItem = {
     url: string;
   };
+  /** @deprecated */
   type WebhookPayloadSecurityAdvisorySecurityAdvisoryIdentifiersItem = {
     value: string;
     type: string;
   };
+  /** @deprecated */
   type WebhookPayloadSecurityAdvisorySecurityAdvisory = {
     ghsa_id: string;
     summary: string;
@@ -546,10 +598,12 @@ export declare module EventPayloads {
     withdrawn_at: null;
     vulnerabilities: Array<WebhookPayloadSecurityAdvisorySecurityAdvisoryVulnerabilitiesItem>;
   };
+  /** @deprecated */
   type WebhookPayloadSecurityAdvisory = {
     action: "performed" | "published" | "updated";
     security_advisory: WebhookPayloadSecurityAdvisorySecurityAdvisory;
   };
+  /** @deprecated */
   type WebhookPayloadSecretScanningAlertOrganization = {
     login: string;
     id: number;
@@ -564,6 +618,7 @@ export declare module EventPayloads {
     avatar_url: string;
     description: string;
   };
+  /** @deprecated */
   type WebhookPayloadSecretScanningAlertAlert = {
     number: number;
     secret_type: string;
@@ -571,6 +626,7 @@ export declare module EventPayloads {
     resolved_by: null;
     resolved_at: null;
   };
+  /** @deprecated */
   type WebhookPayloadSecretScanningAlert = {
     action: "created" | "reopened" | "resolved";
     alert: WebhookPayloadSecretScanningAlertAlert;
@@ -578,6 +634,7 @@ export declare module EventPayloads {
     organization: WebhookPayloadSecretScanningAlertOrganization;
     sender: PayloadSender;
   };
+  /** @deprecated */
   type WebhookPayloadRepositoryVulnerabilityAlertAlertDismisser = {
     login: string;
     id: number;
@@ -598,6 +655,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadRepositoryVulnerabilityAlertOrganization = {
     login: string;
     id: number;
@@ -612,6 +670,7 @@ export declare module EventPayloads {
     avatar_url: string;
     description: string;
   };
+  /** @deprecated */
   type WebhookPayloadRepositoryVulnerabilityAlertAlert = {
     id: number;
     affected_range: string;
@@ -625,6 +684,7 @@ export declare module EventPayloads {
     dismiss_reason?: string;
     dismissed_at?: string;
   };
+  /** @deprecated */
   type WebhookPayloadRepositoryVulnerabilityAlert = {
     action: "create" | "dismiss" | "resolve";
     alert: WebhookPayloadRepositoryVulnerabilityAlertAlert;
@@ -632,6 +692,7 @@ export declare module EventPayloads {
     sender?: PayloadSender;
     organization?: WebhookPayloadRepositoryVulnerabilityAlertOrganization;
   };
+  /** @deprecated */
   type WebhookPayloadRepositoryImportOrganization = {
     login: string;
     id: number;
@@ -646,13 +707,16 @@ export declare module EventPayloads {
     avatar_url: string;
     description: string;
   };
+  /** @deprecated */
   type WebhookPayloadRepositoryImport = {
     status: string;
     repository: PayloadRepository;
     organization: WebhookPayloadRepositoryImportOrganization;
     sender: PayloadSender;
   };
+  /** @deprecated */
   type WebhookPayloadRepositoryInstallation = { id: number; node_id: string };
+  /** @deprecated */
   type WebhookPayloadRepositoryOrganization = {
     login: string;
     id: number;
@@ -667,6 +731,7 @@ export declare module EventPayloads {
     avatar_url: string;
     description: string;
   };
+  /** @deprecated */
   type WebhookPayloadRepository = {
     action:
       | "archived"
@@ -683,10 +748,12 @@ export declare module EventPayloads {
     organization?: WebhookPayloadRepositoryOrganization;
     installation?: WebhookPayloadRepositoryInstallation;
   };
+  /** @deprecated */
   type WebhookPayloadRepositoryDispatchInstallation = {
     id: number;
     node_id: string;
   };
+  /** @deprecated */
   type WebhookPayloadRepositoryDispatchOrganization = {
     login: string;
     id: number;
@@ -701,7 +768,9 @@ export declare module EventPayloads {
     avatar_url: string;
     description: string;
   };
+  /** @deprecated */
   type WebhookPayloadRepositoryDispatchClientPayload = {};
+  /** @deprecated */
   type WebhookPayloadRepositoryDispatch = {
     action: "on-demand-test";
     branch: string;
@@ -711,7 +780,9 @@ export declare module EventPayloads {
     sender: PayloadSender;
     installation: WebhookPayloadRepositoryDispatchInstallation;
   };
+  /** @deprecated */
   type WebhookPayloadReleaseInstallation = { id: number; node_id: string };
+  /** @deprecated */
   type WebhookPayloadReleaseReleaseAuthor = {
     login: string;
     id: number;
@@ -732,6 +803,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadReleaseRelease = {
     url: string;
     assets_url: string;
@@ -752,6 +824,7 @@ export declare module EventPayloads {
     zipball_url: string;
     body: null;
   };
+  /** @deprecated */
   type WebhookPayloadRelease = {
     action:
       | "created"
@@ -766,6 +839,7 @@ export declare module EventPayloads {
     sender: PayloadSender;
     installation?: WebhookPayloadReleaseInstallation;
   };
+  /** @deprecated */
   type WebhookPayloadPushOrganization = {
     login: string;
     id: number;
@@ -797,8 +871,11 @@ export declare module EventPayloads {
     updated_at: string;
     type: string;
   };
+  /** @deprecated */
   type WebhookPayloadPushInstallation = { id: number; node_id: string };
+  /** @deprecated */
   type WebhookPayloadPushPusher = { name: string; email: string };
+  /** @deprecated */
   type WebhookPayloadPush = {
     ref: string;
     before: string;
@@ -816,6 +893,7 @@ export declare module EventPayloads {
     installation?: WebhookPayloadPushInstallation;
     organization?: WebhookPayloadPushOrganization;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentOrganization = {
     login: string;
     id: number;
@@ -847,10 +925,12 @@ export declare module EventPayloads {
     updated_at: string;
     type: string;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentInstallation = {
     id: number;
     node_id: string;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentPullRequestLabelsItem = {
     id: number;
     node_id: string;
@@ -859,6 +939,7 @@ export declare module EventPayloads {
     color: string;
     default: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentPullRequestRequestedReviewersItem = {
     login: string;
     id: number;
@@ -879,6 +960,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentPullRequestAssigneesItem = {
     login: string;
     id: number;
@@ -899,30 +981,39 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentPullRequestLinksStatuses = {
     href: string;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentPullRequestLinksCommits = {
     href: string;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentPullRequestLinksReviewComment = {
     href: string;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentPullRequestLinksReviewComments = {
     href: string;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentPullRequestLinksComments = {
     href: string;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentPullRequestLinksIssue = {
     href: string;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentPullRequestLinksHtml = {
     href: string;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentPullRequestLinksSelf = {
     href: string;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentPullRequestLinks = {
     self: WebhookPayloadPullRequestReviewCommentPullRequestLinksSelf;
     html: WebhookPayloadPullRequestReviewCommentPullRequestLinksHtml;
@@ -933,6 +1024,7 @@ export declare module EventPayloads {
     commits: WebhookPayloadPullRequestReviewCommentPullRequestLinksCommits;
     statuses: WebhookPayloadPullRequestReviewCommentPullRequestLinksStatuses;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentPullRequestBaseRepoOwner = {
     login: string;
     id: number;
@@ -953,6 +1045,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentPullRequestBaseRepo = {
     id: number;
     node_id: string;
@@ -1032,6 +1125,7 @@ export declare module EventPayloads {
     allow_rebase_merge?: boolean;
     delete_branch_on_merge?: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentPullRequestBaseUser = {
     login: string;
     id: number;
@@ -1052,6 +1146,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentPullRequestBase = {
     label: string;
     ref: string;
@@ -1059,6 +1154,7 @@ export declare module EventPayloads {
     user: WebhookPayloadPullRequestReviewCommentPullRequestBaseUser;
     repo: WebhookPayloadPullRequestReviewCommentPullRequestBaseRepo;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentPullRequestHeadRepoOwner = {
     login: string;
     id: number;
@@ -1079,6 +1175,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentPullRequestHeadRepo = {
     id: number;
     node_id: string;
@@ -1158,6 +1255,7 @@ export declare module EventPayloads {
     allow_rebase_merge?: boolean;
     delete_branch_on_merge?: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentPullRequestHeadUser = {
     login: string;
     id: number;
@@ -1178,6 +1276,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentPullRequestHead = {
     label: string;
     ref: string;
@@ -1185,6 +1284,7 @@ export declare module EventPayloads {
     user: WebhookPayloadPullRequestReviewCommentPullRequestHeadUser;
     repo: WebhookPayloadPullRequestReviewCommentPullRequestHeadRepo;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentPullRequestUser = {
     login: string;
     id: number;
@@ -1205,6 +1305,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentPullRequest = {
     url: string;
     id: number;
@@ -1240,20 +1341,25 @@ export declare module EventPayloads {
     _links: WebhookPayloadPullRequestReviewCommentPullRequestLinks;
     author_association: string;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentCommentLinksPullRequest = {
     href: string;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentCommentLinksHtml = {
     href: string;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentCommentLinksSelf = {
     href: string;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentCommentLinks = {
     self: WebhookPayloadPullRequestReviewCommentCommentLinksSelf;
     html: WebhookPayloadPullRequestReviewCommentCommentLinksHtml;
     pull_request: WebhookPayloadPullRequestReviewCommentCommentLinksPullRequest;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentCommentUser = {
     login: string;
     id: number;
@@ -1274,6 +1380,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewCommentComment = {
     url: string;
     pull_request_review_id: number;
@@ -1294,6 +1401,7 @@ export declare module EventPayloads {
     author_association: string;
     _links: WebhookPayloadPullRequestReviewCommentCommentLinks;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewComment = {
     action: "created" | "deleted" | "edited";
     comment: WebhookPayloadPullRequestReviewCommentComment;
@@ -1303,6 +1411,7 @@ export declare module EventPayloads {
     installation?: WebhookPayloadPullRequestReviewCommentInstallation;
     organization?: WebhookPayloadPullRequestReviewCommentOrganization;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewOrganization = {
     login: string;
     id: number;
@@ -1334,10 +1443,12 @@ export declare module EventPayloads {
     updated_at: string;
     type: string;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewInstallation = {
     id: number;
     node_id: string;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewPullRequestLabelsItem = {
     id: number;
     node_id: string;
@@ -1346,6 +1457,7 @@ export declare module EventPayloads {
     color: string;
     default: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewPullRequestRequestedReviewersItem = {
     login: string;
     id: number;
@@ -1366,6 +1478,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewPullRequestAssigneesItem = {
     login: string;
     id: number;
@@ -1386,24 +1499,33 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewPullRequestLinksStatuses = {
     href: string;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewPullRequestLinksCommits = {
     href: string;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewPullRequestLinksReviewComment = {
     href: string;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewPullRequestLinksReviewComments = {
     href: string;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewPullRequestLinksComments = {
     href: string;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewPullRequestLinksIssue = { href: string };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewPullRequestLinksHtml = { href: string };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewPullRequestLinksSelf = { href: string };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewPullRequestLinks = {
     self: WebhookPayloadPullRequestReviewPullRequestLinksSelf;
     html: WebhookPayloadPullRequestReviewPullRequestLinksHtml;
@@ -1414,6 +1536,7 @@ export declare module EventPayloads {
     commits: WebhookPayloadPullRequestReviewPullRequestLinksCommits;
     statuses: WebhookPayloadPullRequestReviewPullRequestLinksStatuses;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewPullRequestBaseRepoOwner = {
     login: string;
     id: number;
@@ -1434,6 +1557,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewPullRequestBaseRepo = {
     id: number;
     node_id: string;
@@ -1513,6 +1637,7 @@ export declare module EventPayloads {
     allow_rebase_merge?: boolean;
     delete_branch_on_merge?: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewPullRequestBaseUser = {
     login: string;
     id: number;
@@ -1533,6 +1658,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewPullRequestBase = {
     label: string;
     ref: string;
@@ -1540,6 +1666,7 @@ export declare module EventPayloads {
     user: WebhookPayloadPullRequestReviewPullRequestBaseUser;
     repo: WebhookPayloadPullRequestReviewPullRequestBaseRepo;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewPullRequestHeadRepoOwner = {
     login: string;
     id: number;
@@ -1560,6 +1687,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewPullRequestHeadRepo = {
     id: number;
     node_id: string;
@@ -1639,6 +1767,7 @@ export declare module EventPayloads {
     allow_rebase_merge?: boolean;
     delete_branch_on_merge?: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewPullRequestHeadUser = {
     login: string;
     id: number;
@@ -1659,6 +1788,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewPullRequestHead = {
     label: string;
     ref: string;
@@ -1666,6 +1796,7 @@ export declare module EventPayloads {
     user: WebhookPayloadPullRequestReviewPullRequestHeadUser;
     repo: WebhookPayloadPullRequestReviewPullRequestHeadRepo;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewPullRequestUser = {
     login: string;
     id: number;
@@ -1686,6 +1817,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewPullRequest = {
     url: string;
     id: number;
@@ -1721,12 +1853,16 @@ export declare module EventPayloads {
     _links: WebhookPayloadPullRequestReviewPullRequestLinks;
     author_association: string;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewReviewLinksPullRequest = { href: string };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewReviewLinksHtml = { href: string };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewReviewLinks = {
     html: WebhookPayloadPullRequestReviewReviewLinksHtml;
     pull_request: WebhookPayloadPullRequestReviewReviewLinksPullRequest;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewReviewUser = {
     login: string;
     id: number;
@@ -1747,6 +1883,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReviewReview = {
     id: number;
     node_id: string;
@@ -1760,6 +1897,7 @@ export declare module EventPayloads {
     author_association: string;
     _links: WebhookPayloadPullRequestReviewReviewLinks;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestReview = {
     action: "dismissed" | "edited" | "submitted";
     review: WebhookPayloadPullRequestReviewReview;
@@ -1769,6 +1907,7 @@ export declare module EventPayloads {
     installation?: WebhookPayloadPullRequestReviewInstallation;
     organization?: WebhookPayloadPullRequestReviewOrganization;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestLabel = {
     id: number;
     node_id: string;
@@ -1777,6 +1916,7 @@ export declare module EventPayloads {
     color: string;
     default: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestPullRequestMilestoneCreator = {
     login: string;
     id: number;
@@ -1835,6 +1975,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestOrganization = {
     login: string;
     id: number;
@@ -1866,7 +2007,9 @@ export declare module EventPayloads {
     updated_at: string;
     type: string;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestInstallation = { id: number; node_id: string };
+  /** @deprecated */
   type WebhookPayloadPullRequestAssignee = {
     login: string;
     id: number;
@@ -1887,6 +2030,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestPullRequestLabelsItem = {
     id: number;
     node_id: string;
@@ -1895,6 +2039,7 @@ export declare module EventPayloads {
     color: string;
     default: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestPullRequestRequestedReviewersItem = {
     login: string;
     id: number;
@@ -1915,6 +2060,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestPullRequestAssigneesItem = {
     login: string;
     id: number;
@@ -1935,18 +2081,27 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestPullRequestLinksStatuses = { href: string };
+  /** @deprecated */
   type WebhookPayloadPullRequestPullRequestLinksCommits = { href: string };
+  /** @deprecated */
   type WebhookPayloadPullRequestPullRequestLinksReviewComment = {
     href: string;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestPullRequestLinksReviewComments = {
     href: string;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestPullRequestLinksComments = { href: string };
+  /** @deprecated */
   type WebhookPayloadPullRequestPullRequestLinksIssue = { href: string };
+  /** @deprecated */
   type WebhookPayloadPullRequestPullRequestLinksHtml = { href: string };
+  /** @deprecated */
   type WebhookPayloadPullRequestPullRequestLinksSelf = { href: string };
+  /** @deprecated */
   type WebhookPayloadPullRequestPullRequestLinks = {
     self: WebhookPayloadPullRequestPullRequestLinksSelf;
     html: WebhookPayloadPullRequestPullRequestLinksHtml;
@@ -1957,6 +2112,7 @@ export declare module EventPayloads {
     commits: WebhookPayloadPullRequestPullRequestLinksCommits;
     statuses: WebhookPayloadPullRequestPullRequestLinksStatuses;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestPullRequestBaseRepoOwner = {
     login: string;
     id: number;
@@ -1977,6 +2133,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestPullRequestBaseRepo = {
     id: number;
     node_id: string;
@@ -2056,6 +2213,7 @@ export declare module EventPayloads {
     allow_rebase_merge?: boolean;
     delete_branch_on_merge?: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestPullRequestBaseUser = {
     login: string;
     id: number;
@@ -2076,6 +2234,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestPullRequestBase = {
     label: string;
     ref: string;
@@ -2083,6 +2242,7 @@ export declare module EventPayloads {
     user: WebhookPayloadPullRequestPullRequestBaseUser;
     repo: WebhookPayloadPullRequestPullRequestBaseRepo;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestPullRequestHeadRepoOwner = {
     login: string;
     id: number;
@@ -2103,6 +2263,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestPullRequestHeadRepo = {
     id: number;
     node_id: string;
@@ -2182,6 +2343,7 @@ export declare module EventPayloads {
     allow_rebase_merge?: boolean;
     delete_branch_on_merge?: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestPullRequestHeadUser = {
     login: string;
     id: number;
@@ -2202,6 +2364,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestPullRequestHead = {
     label: string;
     ref: string;
@@ -2209,6 +2372,7 @@ export declare module EventPayloads {
     user: WebhookPayloadPullRequestPullRequestHeadUser;
     repo: WebhookPayloadPullRequestPullRequestHeadRepo;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestPullRequestUser = {
     login: string;
     id: number;
@@ -2229,6 +2393,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequestPullRequest = {
     url: string;
     id: number;
@@ -2277,6 +2442,7 @@ export declare module EventPayloads {
     deletions: number;
     changed_files: number;
   };
+  /** @deprecated */
   type WebhookPayloadPullRequest = {
     action:
       | "assigned"
@@ -2303,13 +2469,17 @@ export declare module EventPayloads {
     organization?: WebhookPayloadPullRequestOrganization;
     label?: WebhookPayloadPullRequestLabel;
   };
+  /** @deprecated */
   type WebhookPayloadPublicInstallation = { id: number; node_id: string };
+  /** @deprecated */
   type WebhookPayloadPublic = {
     repository: PayloadRepository;
     sender: PayloadSender;
     installation?: WebhookPayloadPublicInstallation;
   };
+  /** @deprecated */
   type WebhookPayloadProjectInstallation = { id: number; node_id: string };
+  /** @deprecated */
   type WebhookPayloadProjectProjectCreator = {
     login: string;
     id: number;
@@ -2330,6 +2500,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadProjectProject = {
     owner_url: string;
     url: string;
@@ -2345,6 +2516,7 @@ export declare module EventPayloads {
     created_at: string;
     updated_at: string;
   };
+  /** @deprecated */
   type WebhookPayloadProject = {
     action: "closed" | "created" | "deleted" | "edited" | "reopened";
     project: WebhookPayloadProjectProject;
@@ -2352,10 +2524,12 @@ export declare module EventPayloads {
     sender: PayloadSender;
     installation?: WebhookPayloadProjectInstallation;
   };
+  /** @deprecated */
   type WebhookPayloadProjectColumnInstallation = {
     id: number;
     node_id: string;
   };
+  /** @deprecated */
   type WebhookPayloadProjectColumnProjectColumn = {
     url: string;
     project_url: string;
@@ -2366,6 +2540,7 @@ export declare module EventPayloads {
     created_at: string;
     updated_at: string;
   };
+  /** @deprecated */
   type WebhookPayloadProjectColumn = {
     action: "created" | "deleted" | "edited" | "moved";
     project_column: WebhookPayloadProjectColumnProjectColumn;
@@ -2373,6 +2548,7 @@ export declare module EventPayloads {
     sender: PayloadSender;
     installation?: WebhookPayloadProjectColumnInstallation;
   };
+  /** @deprecated */
   type WebhookPayloadProjectCardOrganization = {
     login: string;
     id: number;
@@ -2404,7 +2580,9 @@ export declare module EventPayloads {
     updated_at: string;
     type: string;
   };
+  /** @deprecated */
   type WebhookPayloadProjectCardInstallation = { id: number; node_id: string };
+  /** @deprecated */
   type WebhookPayloadProjectCardProjectCardCreator = {
     login: string;
     id: number;
@@ -2425,6 +2603,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadProjectCardProjectCard = {
     url: string;
     project_url: string;
@@ -2438,6 +2617,7 @@ export declare module EventPayloads {
     created_at: string;
     updated_at: string;
   };
+  /** @deprecated */
   type WebhookPayloadProjectCard = {
     action: "converted" | "created" | "deleted" | "edited" | "moved";
     project_card: WebhookPayloadProjectCardProjectCard;
@@ -2446,6 +2626,7 @@ export declare module EventPayloads {
     installation?: WebhookPayloadProjectCardInstallation;
     organization?: WebhookPayloadProjectCardOrganization;
   };
+  /** @deprecated */
   type WebhookPayloadPingOrganization = {
     login: string;
     id: number;
@@ -2460,17 +2641,20 @@ export declare module EventPayloads {
     avatar_url: string;
     description: string;
   };
+  /** @deprecated */
   type WebhookPayloadPingHookLastResponse = {
     code: null;
     status: string;
     message: null;
   };
+  /** @deprecated */
   type WebhookPayloadPingHookConfig = {
     content_type: string;
     url: string;
     insecure_ssl: string;
     secret?: string;
   };
+  /** @deprecated */
   type WebhookPayloadPingHook = {
     type: string;
     id: number;
@@ -2485,6 +2669,7 @@ export declare module EventPayloads {
     ping_url: string;
     last_response?: WebhookPayloadPingHookLastResponse;
   };
+  /** @deprecated */
   type WebhookPayloadPing = {
     zen: string;
     hook_id: number;
@@ -2493,7 +2678,9 @@ export declare module EventPayloads {
     sender: PayloadSender;
     organization?: WebhookPayloadPingOrganization;
   };
+  /** @deprecated */
   type WebhookPayloadPageBuildInstallation = { id: number; node_id: string };
+  /** @deprecated */
   type WebhookPayloadPageBuildBuildPusher = {
     login: string;
     id: number;
@@ -2514,7 +2701,9 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPageBuildBuildError = { message: null };
+  /** @deprecated */
   type WebhookPayloadPageBuildBuild = {
     url: string;
     status: string;
@@ -2525,6 +2714,7 @@ export declare module EventPayloads {
     created_at: string;
     updated_at: string;
   };
+  /** @deprecated */
   type WebhookPayloadPageBuild = {
     id: number;
     build: WebhookPayloadPageBuildBuild;
@@ -2532,6 +2722,7 @@ export declare module EventPayloads {
     sender: PayloadSender;
     installation?: WebhookPayloadPageBuildInstallation;
   };
+  /** @deprecated */
   type WebhookPayloadPackagePackageRegistry = {
     about_url: string;
     name: string;
@@ -2539,6 +2730,7 @@ export declare module EventPayloads {
     url: string;
     vendor: string;
   };
+  /** @deprecated */
   type WebhookPayloadPackagePackagePackageVersionAuthor = {
     login: string;
     id: number;
@@ -2559,6 +2751,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPackagePackagePackageVersionPackageFilesItem = {
     download_url: string;
     id: number;
@@ -2572,6 +2765,7 @@ export declare module EventPayloads {
     created_at: string;
     updated_at: string;
   };
+  /** @deprecated */
   type WebhookPayloadPackagePackagePackageVersionReleaseAuthor = {
     login: string;
     id: number;
@@ -2592,6 +2786,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPackagePackagePackageVersionRelease = {
     url: string;
     html_url: string;
@@ -2605,6 +2800,7 @@ export declare module EventPayloads {
     created_at: string;
     published_at: string;
   };
+  /** @deprecated */
   type WebhookPayloadPackagePackagePackageVersion = {
     id: number;
     version: string;
@@ -2626,6 +2822,7 @@ export declare module EventPayloads {
     author: WebhookPayloadPackagePackagePackageVersionAuthor;
     installation_command: string;
   };
+  /** @deprecated */
   type WebhookPayloadPackagePackageOwner = {
     login: string;
     id: number;
@@ -2646,6 +2843,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadPackagePackage = {
     id: number;
     name: string;
@@ -2657,13 +2855,16 @@ export declare module EventPayloads {
     package_version: WebhookPayloadPackagePackagePackageVersion;
     registry: WebhookPayloadPackagePackageRegistry;
   };
+  /** @deprecated */
   type WebhookPayloadPackage = {
     action: "published" | "updated";
     package: WebhookPayloadPackagePackage;
     repository: PayloadRepository;
     sender: PayloadSender;
   };
+  /** @deprecated */
   type WebhookPayloadOrgBlockInstallation = { id: number; node_id: string };
+  /** @deprecated */
   type WebhookPayloadOrgBlockOrganization = {
     login: string;
     id: number;
@@ -2678,6 +2879,7 @@ export declare module EventPayloads {
     avatar_url: string;
     description: string;
   };
+  /** @deprecated */
   type WebhookPayloadOrgBlockBlockedUser = {
     login: string;
     id: number;
@@ -2698,6 +2900,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadOrgBlock = {
     action: "blocked" | "unblocked";
     blocked_user: WebhookPayloadOrgBlockBlockedUser;
@@ -2705,7 +2908,9 @@ export declare module EventPayloads {
     sender: PayloadSender;
     installation?: WebhookPayloadOrgBlockInstallation;
   };
+  /** @deprecated */
   type WebhookPayloadOrganizationInstallation = { id: number; node_id: string };
+  /** @deprecated */
   type WebhookPayloadOrganizationOrganization = {
     login: string;
     id: number;
@@ -2720,6 +2925,7 @@ export declare module EventPayloads {
     avatar_url: string;
     description: string;
   };
+  /** @deprecated */
   type WebhookPayloadOrganizationMembershipUser = {
     login: string;
     id: number;
@@ -2740,6 +2946,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadOrganizationMembership = {
     url: string;
     state: string;
@@ -2747,6 +2954,7 @@ export declare module EventPayloads {
     organization_url: string;
     user: WebhookPayloadOrganizationMembershipUser;
   };
+  /** @deprecated */
   type WebhookPayloadOrganization = {
     action:
       | "deleted"
@@ -2759,7 +2967,9 @@ export declare module EventPayloads {
     sender: PayloadSender;
     installation?: WebhookPayloadOrganizationInstallation;
   };
+  /** @deprecated */
   type WebhookPayloadMilestoneInstallation = { id: number; node_id: string };
+  /** @deprecated */
   type WebhookPayloadMilestoneMilestoneCreator = {
     login: string;
     id: number;
@@ -2780,6 +2990,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadMilestoneMilestone = {
     url: string;
     html_url: string;
@@ -2798,6 +3009,7 @@ export declare module EventPayloads {
     due_on: string;
     closed_at: null | string;
   };
+  /** @deprecated */
   type WebhookPayloadMilestone = {
     action: "closed" | "created" | "deleted" | "edited" | "opened";
     milestone: WebhookPayloadMilestoneMilestone;
@@ -2805,11 +3017,13 @@ export declare module EventPayloads {
     sender: PayloadSender;
     installation?: WebhookPayloadMilestoneInstallation;
   };
+  /** @deprecated */
   type WebhookPayloadMetaHookConfig = {
     content_type: string;
     insecure_ssl: string;
     url: string;
   };
+  /** @deprecated */
   type WebhookPayloadMetaHook = {
     type: string;
     id: number;
@@ -2820,6 +3034,7 @@ export declare module EventPayloads {
     updated_at: string;
     created_at: string;
   };
+  /** @deprecated */
   type WebhookPayloadMeta = {
     action: "deleted";
     hook_id: number;
@@ -2827,7 +3042,9 @@ export declare module EventPayloads {
     repository: PayloadRepository;
     sender: PayloadSender;
   };
+  /** @deprecated */
   type WebhookPayloadMembershipInstallation = { id: number; node_id: string };
+  /** @deprecated */
   type WebhookPayloadMembershipOrganization = {
     login: string;
     id: number;
@@ -2842,6 +3059,7 @@ export declare module EventPayloads {
     avatar_url: string;
     description: string;
   };
+  /** @deprecated */
   type WebhookPayloadMembershipTeam = {
     name: string;
     id: number;
@@ -2855,6 +3073,7 @@ export declare module EventPayloads {
     repositories_url: string;
     permission: string;
   };
+  /** @deprecated */
   type WebhookPayloadMembershipMember = {
     login: string;
     id: number;
@@ -2875,6 +3094,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadMembership = {
     action: "added" | "removed";
     scope: string;
@@ -2884,11 +3104,15 @@ export declare module EventPayloads {
     organization: WebhookPayloadMembershipOrganization;
     installation?: WebhookPayloadMembershipInstallation;
   };
+  /** @deprecated */
   type WebhookPayloadMemberChangesPermission = { from: string };
+  /** @deprecated */
   type WebhookPayloadMemberChanges = {
     permission: WebhookPayloadMemberChangesPermission;
   };
+  /** @deprecated */
   type WebhookPayloadMemberInstallation = { id: number; node_id: string };
+  /** @deprecated */
   type WebhookPayloadMemberMember = {
     login: string;
     id: number;
@@ -2909,6 +3133,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadMember = {
     action: "added" | "edited" | "removed";
     member: WebhookPayloadMemberMember;
@@ -2917,6 +3142,7 @@ export declare module EventPayloads {
     installation?: WebhookPayloadMemberInstallation;
     changes?: WebhookPayloadMemberChanges;
   };
+  /** @deprecated */
   type WebhookPayloadMarketplacePurchasePreviousMarketplacePurchasePlan = {
     id: number;
     name: string;
@@ -2928,12 +3154,14 @@ export declare module EventPayloads {
     unit_name: string;
     bullets: Array<string>;
   };
+  /** @deprecated */
   type WebhookPayloadMarketplacePurchasePreviousMarketplacePurchaseAccount = {
     type: string;
     id: number;
     login: string;
     organization_billing_email: string;
   };
+  /** @deprecated */
   type WebhookPayloadMarketplacePurchasePreviousMarketplacePurchase = {
     account: WebhookPayloadMarketplacePurchasePreviousMarketplacePurchaseAccount;
     billing_cycle: string;
@@ -2942,6 +3170,7 @@ export declare module EventPayloads {
     unit_count: number;
     plan: WebhookPayloadMarketplacePurchasePreviousMarketplacePurchasePlan;
   };
+  /** @deprecated */
   type WebhookPayloadMarketplacePurchaseMarketplacePurchasePlan = {
     id: number;
     name: string;
@@ -2953,6 +3182,7 @@ export declare module EventPayloads {
     unit_name: string | null;
     bullets: Array<string>;
   };
+  /** @deprecated */
   type WebhookPayloadMarketplacePurchaseMarketplacePurchaseAccount = {
     type: string;
     id: number;
@@ -2960,6 +3190,7 @@ export declare module EventPayloads {
     login: string;
     organization_billing_email: string;
   };
+  /** @deprecated */
   type WebhookPayloadMarketplacePurchaseMarketplacePurchase = {
     account: WebhookPayloadMarketplacePurchaseMarketplacePurchaseAccount;
     billing_cycle: string;
@@ -2969,6 +3200,7 @@ export declare module EventPayloads {
     next_billing_date: string;
     plan: WebhookPayloadMarketplacePurchaseMarketplacePurchasePlan;
   };
+  /** @deprecated */
   type WebhookPayloadMarketplacePurchaseSender = {
     login: string;
     id: number;
@@ -2989,6 +3221,7 @@ export declare module EventPayloads {
     site_admin: boolean;
     email: string;
   };
+  /** @deprecated */
   type WebhookPayloadMarketplacePurchase = {
     action:
       | "cancelled"
@@ -3001,9 +3234,13 @@ export declare module EventPayloads {
     marketplace_purchase: WebhookPayloadMarketplacePurchaseMarketplacePurchase;
     previous_marketplace_purchase?: WebhookPayloadMarketplacePurchasePreviousMarketplacePurchase;
   };
+  /** @deprecated */
   type WebhookPayloadLabelChangesColor = { from: string };
+  /** @deprecated */
   type WebhookPayloadLabelChanges = { color: WebhookPayloadLabelChangesColor };
+  /** @deprecated */
   type WebhookPayloadLabelInstallation = { id: number; node_id: string };
+  /** @deprecated */
   type WebhookPayloadLabelLabel = {
     id: number;
     node_id: string;
@@ -3012,6 +3249,7 @@ export declare module EventPayloads {
     color: string;
     default: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadLabel = {
     action: "created" | "deleted" | "edited";
     label: WebhookPayloadLabelLabel;
@@ -3020,6 +3258,7 @@ export declare module EventPayloads {
     installation?: WebhookPayloadLabelInstallation;
     changes?: WebhookPayloadLabelChanges;
   };
+  /** @deprecated */
   type WebhookPayloadIssuesLabel = {
     id: number;
     node_id: string;
@@ -3028,12 +3267,14 @@ export declare module EventPayloads {
     color: string;
     default: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadIssuesIssuePullRequest = {
     url: string;
     html_url: string;
     diff_url: string;
     patch_url: string;
   };
+  /** @deprecated */
   type WebhookPayloadIssuesOrganization = {
     login: string;
     id: number;
@@ -3065,7 +3306,9 @@ export declare module EventPayloads {
     updated_at: string;
     type: string;
   };
+  /** @deprecated */
   type WebhookPayloadIssuesInstallation = { id: number; node_id: string };
+  /** @deprecated */
   type WebhookPayloadIssuesAssignee = {
     login: string;
     id: number;
@@ -3086,7 +3329,9 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadIssuesChanges = {};
+  /** @deprecated */
   type WebhookPayloadIssuesIssueMilestoneCreator = {
     login: string;
     id: number;
@@ -3107,6 +3352,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadIssuesIssueMilestone = {
     url: string;
     html_url: string;
@@ -3125,6 +3371,7 @@ export declare module EventPayloads {
     due_on: string;
     closed_at: string;
   } | null;
+  /** @deprecated */
   type WebhookPayloadIssuesIssueAssigneesItem = {
     login: string;
     id: number;
@@ -3145,6 +3392,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadIssuesIssueAssignee = {
     login: string;
     id: number;
@@ -3165,6 +3413,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   } | null;
+  /** @deprecated */
   type WebhookPayloadIssuesIssueLabelsItem = {
     id: number;
     node_id: string;
@@ -3173,6 +3422,7 @@ export declare module EventPayloads {
     color: string;
     default: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadIssuesIssueUser = {
     login: string;
     id: number;
@@ -3193,6 +3443,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadIssuesIssue = {
     url: string;
     repository_url: string;
@@ -3219,6 +3470,7 @@ export declare module EventPayloads {
     body: string;
     pull_request?: WebhookPayloadIssuesIssuePullRequest;
   };
+  /** @deprecated */
   type WebhookPayloadIssues = {
     action:
       | "assigned"
@@ -3246,11 +3498,15 @@ export declare module EventPayloads {
     organization?: WebhookPayloadIssuesOrganization;
     label?: WebhookPayloadIssuesLabel;
   };
+  /** @deprecated */
   type WebhookPayloadIssueCommentChangesBody = { from: string };
+  /** @deprecated */
   type WebhookPayloadIssueCommentChanges = {
     body: WebhookPayloadIssueCommentChangesBody;
   };
+  /** @deprecated */
   type WebhookPayloadIssueCommentInstallation = { id: number; node_id: string };
+  /** @deprecated */
   type WebhookPayloadIssueCommentOrganization = {
     login: string;
     id: number;
@@ -3282,6 +3538,7 @@ export declare module EventPayloads {
     updated_at: string;
     type: string;
   };
+  /** @deprecated */
   type WebhookPayloadIssueCommentCommentUser = {
     login: string;
     id: number;
@@ -3302,6 +3559,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadIssueCommentComment = {
     url: string;
     html_url: string;
@@ -3314,6 +3572,7 @@ export declare module EventPayloads {
     author_association: string;
     body: string;
   };
+  /** @deprecated */
   type WebhookPayloadIssueCommentIssueMilestoneCreator = {
     login: string;
     id: number;
@@ -3334,6 +3593,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadIssueCommentIssueMilestone = {
     url: string;
     html_url: string;
@@ -3352,6 +3612,7 @@ export declare module EventPayloads {
     due_on: string;
     closed_at: string;
   };
+  /** @deprecated */
   type WebhookPayloadIssueCommentIssueAssigneesItem = {
     login: string;
     id: number;
@@ -3372,6 +3633,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadIssueCommentIssueAssignee = {
     login: string;
     id: number;
@@ -3392,6 +3654,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadIssueCommentIssueLabelsItem = {
     id: number;
     node_id: string;
@@ -3400,6 +3663,7 @@ export declare module EventPayloads {
     color: string;
     default: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadIssueCommentIssueUser = {
     login: string;
     id: number;
@@ -3420,6 +3684,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadIssueCommentIssue = {
     url: string;
     repository_url: string;
@@ -3445,6 +3710,7 @@ export declare module EventPayloads {
     author_association: string;
     body: string;
   };
+  /** @deprecated */
   type WebhookPayloadIssueComment = {
     action: "created" | "deleted" | "edited";
     issue: WebhookPayloadIssueCommentIssue;
@@ -3455,12 +3721,14 @@ export declare module EventPayloads {
     installation?: WebhookPayloadIssueCommentInstallation;
     changes?: WebhookPayloadIssueCommentChanges;
   };
+  /** @deprecated */
   type WebhookPayloadInstallationRepositoriesRepositoriesRemovedItem = {
     id: number;
     name: string;
     full_name: string;
     private: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadInstallationRepositoriesRepositoriesAddedItem = {
     id: number;
     node_id: string;
@@ -3468,6 +3736,7 @@ export declare module EventPayloads {
     full_name: string;
     private: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadInstallationRepositoriesInstallationPermissions = {
     administration?: string;
     statuses?: string;
@@ -3482,6 +3751,7 @@ export declare module EventPayloads {
     metadata: string;
     vulnerability_alerts?: string;
   };
+  /** @deprecated */
   type WebhookPayloadInstallationRepositoriesInstallationAccount = {
     login: string;
     id: number;
@@ -3502,6 +3772,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadInstallationRepositoriesInstallation = {
     id: number;
     account: WebhookPayloadInstallationRepositoriesInstallationAccount;
@@ -3518,6 +3789,7 @@ export declare module EventPayloads {
     updated_at: number;
     single_file_name: null | string;
   };
+  /** @deprecated */
   type WebhookPayloadInstallationRepositories = {
     action: "added" | "removed";
     installation: WebhookPayloadInstallationRepositoriesInstallation;
@@ -3526,6 +3798,7 @@ export declare module EventPayloads {
     repositories_removed: Array<WebhookPayloadInstallationRepositoriesRepositoriesRemovedItem>;
     sender: PayloadSender;
   };
+  /** @deprecated */
   type WebhookPayloadInstallationRepositoriesItem = {
     id: number;
     node_id: string;
@@ -3533,6 +3806,7 @@ export declare module EventPayloads {
     full_name: string;
     private: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadInstallationInstallationPermissions = {
     metadata: string;
     contents: string;
@@ -3547,6 +3821,7 @@ export declare module EventPayloads {
     statuses?: string;
     vulnerability_alerts?: string;
   };
+  /** @deprecated */
   type WebhookPayloadInstallationInstallationAccount = {
     login: string;
     id: number;
@@ -3567,6 +3842,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadInstallationInstallation = {
     id: number;
     account: WebhookPayloadInstallationInstallationAccount;
@@ -3583,6 +3859,7 @@ export declare module EventPayloads {
     updated_at: number;
     single_file_name: string | null;
   };
+  /** @deprecated */
   type WebhookPayloadInstallation = {
     action:
       | "created"
@@ -3594,7 +3871,9 @@ export declare module EventPayloads {
     repositories: Array<WebhookPayloadInstallationRepositoriesItem>;
     sender: PayloadSender;
   };
+  /** @deprecated */
   type WebhookPayloadGollumInstallation = { id: number; node_id: string };
+  /** @deprecated */
   type WebhookPayloadGollumPagesItem = {
     page_name: string;
     title: string;
@@ -3603,17 +3882,21 @@ export declare module EventPayloads {
     sha: string;
     html_url: string;
   };
+  /** @deprecated */
   type WebhookPayloadGollum = {
     pages: Array<WebhookPayloadGollumPagesItem>;
     repository: PayloadRepository;
     sender: PayloadSender;
     installation?: WebhookPayloadGollumInstallation;
   };
+  /** @deprecated */
   type WebhookPayloadGithubAppAuthorization = {
     action: "revoked";
     sender: PayloadSender;
   };
+  /** @deprecated */
   type WebhookPayloadForkInstallation = { id: number; node_id: string };
+  /** @deprecated */
   type WebhookPayloadForkForkeeOwner = {
     login: string;
     id: number;
@@ -3634,6 +3917,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadForkForkee = {
     id: number;
     node_id: string;
@@ -3710,16 +3994,19 @@ export declare module EventPayloads {
     default_branch: string;
     public: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadFork = {
     forkee: WebhookPayloadForkForkee;
     repository: PayloadRepository;
     sender: PayloadSender;
     installation?: WebhookPayloadForkInstallation;
   };
+  /** @deprecated */
   type WebhookPayloadDeploymentStatusInstallation = {
     id: number;
     node_id: string;
   };
+  /** @deprecated */
   type WebhookPayloadDeploymentStatusDeploymentCreator = {
     login: string;
     id: number;
@@ -3740,7 +4027,9 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadDeploymentStatusDeploymentPayload = {};
+  /** @deprecated */
   type WebhookPayloadDeploymentStatusDeployment = {
     url: string;
     id: number;
@@ -3758,6 +4047,7 @@ export declare module EventPayloads {
     statuses_url: string;
     repository_url: string;
   };
+  /** @deprecated */
   type WebhookPayloadDeploymentStatusDeploymentStatusCreator = {
     login: string;
     id: number;
@@ -3778,6 +4068,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadDeploymentStatusDeploymentStatus = {
     url: string;
     id: number;
@@ -3792,6 +4083,7 @@ export declare module EventPayloads {
     deployment_url: string;
     repository_url: string;
   };
+  /** @deprecated */
   type WebhookPayloadDeploymentStatus = {
     action: "created";
     deployment_status: WebhookPayloadDeploymentStatusDeploymentStatus;
@@ -3800,7 +4092,9 @@ export declare module EventPayloads {
     sender: PayloadSender;
     installation?: WebhookPayloadDeploymentStatusInstallation;
   };
+  /** @deprecated */
   type WebhookPayloadDeploymentInstallation = { id: number; node_id: string };
+  /** @deprecated */
   type WebhookPayloadDeploymentDeploymentCreator = {
     login: string;
     id: number;
@@ -3821,7 +4115,9 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadDeploymentDeploymentPayload = {};
+  /** @deprecated */
   type WebhookPayloadDeploymentDeployment = {
     url: string;
     id: number;
@@ -3839,6 +4135,7 @@ export declare module EventPayloads {
     statuses_url: string;
     repository_url: string;
   };
+  /** @deprecated */
   type WebhookPayloadDeployment = {
     action: "created";
     deployment: WebhookPayloadDeploymentDeployment;
@@ -3846,6 +4143,7 @@ export declare module EventPayloads {
     sender: PayloadSender;
     installation?: WebhookPayloadDeploymentInstallation;
   };
+  /** @deprecated */
   type WebhookPayloadDeployKeyKey = {
     id: number;
     key: string;
@@ -3855,12 +4153,14 @@ export declare module EventPayloads {
     created_at: string;
     read_only: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadDeployKey = {
     action: "created" | "deleted";
     key: WebhookPayloadDeployKeyKey;
     repository: PayloadRepository;
     sender: PayloadSender;
   };
+  /** @deprecated */
   type WebhookPayloadDeleteOrganization = {
     login: string;
     id: number;
@@ -3892,7 +4192,9 @@ export declare module EventPayloads {
     updated_at: string;
     type: string;
   };
+  /** @deprecated */
   type WebhookPayloadDeleteInstallation = { id: number; node_id: string };
+  /** @deprecated */
   type WebhookPayloadDelete = {
     ref: string;
     ref_type: string;
@@ -3902,6 +4204,7 @@ export declare module EventPayloads {
     installation?: WebhookPayloadDeleteInstallation;
     organization?: WebhookPayloadDeleteOrganization;
   };
+  /** @deprecated */
   type WebhookPayloadCreateOrganization = {
     login: string;
     id: number;
@@ -3933,7 +4236,9 @@ export declare module EventPayloads {
     updated_at: string;
     type: string;
   };
+  /** @deprecated */
   type WebhookPayloadCreateInstallation = { id: number; node_id: string };
+  /** @deprecated */
   type WebhookPayloadCreate = {
     ref: string;
     ref_type: string;
@@ -3945,15 +4250,18 @@ export declare module EventPayloads {
     installation?: WebhookPayloadCreateInstallation;
     organization?: WebhookPayloadCreateOrganization;
   };
+  /** @deprecated */
   type WebhookPayloadContentReferenceInstallation = {
     id: number;
     node_id: string;
   };
+  /** @deprecated */
   type WebhookPayloadContentReferenceContentReference = {
     id: number;
     node_id: string;
     reference: string;
   };
+  /** @deprecated */
   type WebhookPayloadContentReference = {
     action: "created";
     content_reference: WebhookPayloadContentReferenceContentReference;
@@ -3961,10 +4269,12 @@ export declare module EventPayloads {
     sender: PayloadSender;
     installation: WebhookPayloadContentReferenceInstallation;
   };
+  /** @deprecated */
   type WebhookPayloadCommitCommentInstallation = {
     id: number;
     node_id: string;
   };
+  /** @deprecated */
   type WebhookPayloadCommitCommentOrganization = {
     login: string;
     id: number;
@@ -3996,6 +4306,7 @@ export declare module EventPayloads {
     updated_at: string;
     type: string;
   };
+  /** @deprecated */
   type WebhookPayloadCommitCommentCommentUser = {
     login: string;
     id: number;
@@ -4016,6 +4327,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadCommitCommentComment = {
     url: string;
     html_url: string;
@@ -4031,6 +4343,7 @@ export declare module EventPayloads {
     author_association: string;
     body: string;
   };
+  /** @deprecated */
   type WebhookPayloadCommitComment = {
     action: "created";
     comment: WebhookPayloadCommitCommentComment;
@@ -4039,10 +4352,12 @@ export declare module EventPayloads {
     organization?: WebhookPayloadCommitCommentOrganization;
     installation?: WebhookPayloadCommitCommentInstallation;
   };
+  /** @deprecated */
   type WebhookPayloadCodeScanningAlertInstallation = {
     id: number;
     node_id: string;
   };
+  /** @deprecated */
   type WebhookPayloadCodeScanningAlertOrganization = {
     login: string;
     id: number;
@@ -4057,21 +4372,25 @@ export declare module EventPayloads {
     avatar_url: string;
     description: string;
   };
+  /** @deprecated */
   type WebhookPayloadCodeScanningAlertAlertTool = {
     name: string;
     version: null;
   };
+  /** @deprecated */
   type WebhookPayloadCodeScanningAlertAlertRule = {
     id: string;
     severity: string;
     description: string;
   };
+  /** @deprecated */
   type WebhookPayloadCodeScanningAlertAlertInstancesItem = {
     ref: string;
     analysis_key: string;
     environment: string;
     state: string;
   };
+  /** @deprecated */
   type WebhookPayloadCodeScanningAlertAlert = {
     number: number;
     created_at: string;
@@ -4085,6 +4404,7 @@ export declare module EventPayloads {
     rule: WebhookPayloadCodeScanningAlertAlertRule;
     tool: WebhookPayloadCodeScanningAlertAlertTool;
   };
+  /** @deprecated */
   type WebhookPayloadCodeScanningAlert = {
     action:
       | "appeared_in_branch"
@@ -4100,7 +4420,9 @@ export declare module EventPayloads {
     organization: WebhookPayloadCodeScanningAlertOrganization;
     installation?: WebhookPayloadCodeScanningAlertInstallation;
   };
+  /** @deprecated */
   type WebhookPayloadCheckSuiteInstallation = { id: number; node_id: string };
+  /** @deprecated */
   type WebhookPayloadCheckSuiteOrganization = {
     login: string;
     id: number;
@@ -4132,14 +4454,17 @@ export declare module EventPayloads {
     updated_at: string;
     type: string;
   };
+  /** @deprecated */
   type WebhookPayloadCheckSuiteCheckSuiteHeadCommitCommitter = {
     name: string;
     email: string;
   };
+  /** @deprecated */
   type WebhookPayloadCheckSuiteCheckSuiteHeadCommitAuthor = {
     name: string;
     email: string;
   };
+  /** @deprecated */
   type WebhookPayloadCheckSuiteCheckSuiteHeadCommit = {
     id: string;
     tree_id: string;
@@ -4148,6 +4473,7 @@ export declare module EventPayloads {
     author: WebhookPayloadCheckSuiteCheckSuiteHeadCommitAuthor;
     committer: WebhookPayloadCheckSuiteCheckSuiteHeadCommitCommitter;
   };
+  /** @deprecated */
   type WebhookPayloadCheckSuiteCheckSuiteAppPermissions = {
     administration: string;
     checks: string;
@@ -4169,6 +4495,7 @@ export declare module EventPayloads {
     team_discussions: string;
     vulnerability_alerts: string;
   };
+  /** @deprecated */
   type WebhookPayloadCheckSuiteCheckSuiteAppOwner = {
     login: string;
     id: number;
@@ -4189,6 +4516,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadCheckSuiteCheckSuiteApp = {
     id: number;
     node_id: string;
@@ -4202,26 +4530,31 @@ export declare module EventPayloads {
     permissions: WebhookPayloadCheckSuiteCheckSuiteAppPermissions;
     events: Array<any>;
   };
+  /** @deprecated */
   type WebhookPayloadCheckSuiteCheckSuitePullRequestsItemBaseRepo = {
     id: number;
     url: string;
     name: string;
   };
+  /** @deprecated */
   type WebhookPayloadCheckSuiteCheckSuitePullRequestsItemBase = {
     ref: string;
     sha: string;
     repo: WebhookPayloadCheckSuiteCheckSuitePullRequestsItemBaseRepo;
   };
+  /** @deprecated */
   type WebhookPayloadCheckSuiteCheckSuitePullRequestsItemHeadRepo = {
     id: number;
     url: string;
     name: string;
   };
+  /** @deprecated */
   type WebhookPayloadCheckSuiteCheckSuitePullRequestsItemHead = {
     ref: string;
     sha: string;
     repo: WebhookPayloadCheckSuiteCheckSuitePullRequestsItemHeadRepo;
   };
+  /** @deprecated */
   type WebhookPayloadCheckSuiteCheckSuitePullRequestsItem = {
     url: string;
     id: number;
@@ -4229,6 +4562,7 @@ export declare module EventPayloads {
     head: WebhookPayloadCheckSuiteCheckSuitePullRequestsItemHead;
     base: WebhookPayloadCheckSuiteCheckSuitePullRequestsItemBase;
   };
+  /** @deprecated */
   type WebhookPayloadCheckSuiteCheckSuite = {
     id: number;
     node_id: string;
@@ -4247,6 +4581,7 @@ export declare module EventPayloads {
     check_runs_url: string;
     head_commit: WebhookPayloadCheckSuiteCheckSuiteHeadCommit;
   };
+  /** @deprecated */
   type WebhookPayloadCheckSuite = {
     action: "completed" | "requested" | "rerequested";
     check_suite: WebhookPayloadCheckSuiteCheckSuite;
@@ -4255,6 +4590,7 @@ export declare module EventPayloads {
     organization?: WebhookPayloadCheckSuiteOrganization;
     installation?: WebhookPayloadCheckSuiteInstallation;
   };
+  /** @deprecated */
   type WebhookPayloadCheckRunInstallation = { id: number; node_id: string };
   type PayloadRepositoryLicense = null | {
     key: string;
@@ -4263,7 +4599,9 @@ export declare module EventPayloads {
     url: string;
     node_id: string;
   };
+  /** @deprecated */
   type WebhookPayloadCheckRunRequestedAction = { identifier: string };
+  /** @deprecated */
   type WebhookPayloadCheckRunOrganization = {
     login: string;
     id: number;
@@ -4295,6 +4633,7 @@ export declare module EventPayloads {
     updated_at?: string;
     type?: string;
   };
+  /** @deprecated */
   type PayloadSender = {
     login: string;
     id: number;
@@ -4316,6 +4655,7 @@ export declare module EventPayloads {
     site_admin: boolean;
     email?: string;
   };
+  /** @deprecated */
   type PayloadRepositoryOwner = {
     login: string;
     id: number;
@@ -4338,6 +4678,7 @@ export declare module EventPayloads {
     name?: string;
     email?: string;
   };
+  /** @deprecated */
   type PayloadRepository = {
     id: number;
     node_id: string;
@@ -4416,26 +4757,31 @@ export declare module EventPayloads {
     master_branch?: string;
     permissions?: PayloadRepositoryPermissions;
   };
+  /** @deprecated */
   type WebhookPayloadCheckRunCheckRunPullRequestsItemBaseRepo = {
     id: number;
     url: string;
     name: string;
   };
+  /** @deprecated */
   type WebhookPayloadCheckRunCheckRunPullRequestsItemBase = {
     ref: string;
     sha: string;
     repo: WebhookPayloadCheckRunCheckRunPullRequestsItemBaseRepo;
   };
+  /** @deprecated */
   type WebhookPayloadCheckRunCheckRunPullRequestsItemHeadRepo = {
     id: number;
     url: string;
     name: string;
   };
+  /** @deprecated */
   type WebhookPayloadCheckRunCheckRunPullRequestsItemHead = {
     ref: string;
     sha: string;
     repo: WebhookPayloadCheckRunCheckRunPullRequestsItemHeadRepo;
   };
+  /** @deprecated */
   type WebhookPayloadCheckRunCheckRunPullRequestsItem = {
     url: string;
     id: number;
@@ -4443,6 +4789,7 @@ export declare module EventPayloads {
     head: WebhookPayloadCheckRunCheckRunPullRequestsItemHead;
     base: WebhookPayloadCheckRunCheckRunPullRequestsItemBase;
   };
+  /** @deprecated */
   type WebhookPayloadCheckRunCheckRunAppPermissions = {
     administration?: string;
     checks: string;
@@ -4464,6 +4811,7 @@ export declare module EventPayloads {
     team_discussions?: string;
     vulnerability_alerts?: string;
   };
+  /** @deprecated */
   type WebhookPayloadCheckRunCheckRunAppOwner = {
     login: string;
     id: number;
@@ -4484,6 +4832,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadCheckRunCheckRunApp = {
     id: number;
     node_id: string;
@@ -4498,6 +4847,7 @@ export declare module EventPayloads {
     events?: Array<string>;
     slug?: string;
   };
+  /** @deprecated */
   type WebhookPayloadCheckRunCheckRunCheckSuiteAppPermissions = {
     administration?: string;
     checks: string;
@@ -4519,6 +4869,7 @@ export declare module EventPayloads {
     team_discussions?: string;
     vulnerability_alerts?: string;
   };
+  /** @deprecated */
   type WebhookPayloadCheckRunCheckRunCheckSuiteAppOwner = {
     login: string;
     id: number;
@@ -4539,6 +4890,7 @@ export declare module EventPayloads {
     type: string;
     site_admin: boolean;
   };
+  /** @deprecated */
   type WebhookPayloadCheckRunCheckRunCheckSuiteApp = {
     id: number;
     node_id: string;
@@ -4553,26 +4905,31 @@ export declare module EventPayloads {
     events?: Array<string>;
     slug?: string;
   };
+  /** @deprecated */
   type WebhookPayloadCheckRunCheckRunCheckSuitePullRequestsItemBaseRepo = {
     id: number;
     url: string;
     name: string;
   };
+  /** @deprecated */
   type WebhookPayloadCheckRunCheckRunCheckSuitePullRequestsItemBase = {
     ref: string;
     sha: string;
     repo: WebhookPayloadCheckRunCheckRunCheckSuitePullRequestsItemBaseRepo;
   };
+  /** @deprecated */
   type WebhookPayloadCheckRunCheckRunCheckSuitePullRequestsItemHeadRepo = {
     id: number;
     url: string;
     name: string;
   };
+  /** @deprecated */
   type WebhookPayloadCheckRunCheckRunCheckSuitePullRequestsItemHead = {
     ref: string;
     sha: string;
     repo: WebhookPayloadCheckRunCheckRunCheckSuitePullRequestsItemHeadRepo;
   };
+  /** @deprecated */
   type WebhookPayloadCheckRunCheckRunCheckSuitePullRequestsItem = {
     url: string;
     id: number;
@@ -4580,6 +4937,7 @@ export declare module EventPayloads {
     head: WebhookPayloadCheckRunCheckRunCheckSuitePullRequestsItemHead;
     base: WebhookPayloadCheckRunCheckRunCheckSuitePullRequestsItemBase;
   };
+  /** @deprecated */
   type WebhookPayloadCheckRunCheckRunCheckSuite = {
     id: number;
     node_id?: string;
@@ -4595,6 +4953,7 @@ export declare module EventPayloads {
     created_at: string;
     updated_at: string;
   };
+  /** @deprecated */
   type WebhookPayloadCheckRunCheckRunOutput = {
     title: null | string;
     summary: null | string;
@@ -4602,6 +4961,7 @@ export declare module EventPayloads {
     annotations_count: number;
     annotations_url: string;
   };
+  /** @deprecated */
   type WebhookPayloadCheckRunCheckRun = {
     id: number;
     node_id?: string;
@@ -4620,6 +4980,7 @@ export declare module EventPayloads {
     app: WebhookPayloadCheckRunCheckRunApp;
     pull_requests: Array<WebhookPayloadCheckRunCheckRunPullRequestsItem>;
   };
+  /** @deprecated */
   type WebhookPayloadCheckRun = {
     action: "completed" | "created" | "requested_action" | "rerequested";
     check_run: WebhookPayloadCheckRunCheckRun;
diff --git a/src/generated/get-webhook-payload-type-from-event.ts b/src/generated/get-webhook-payload-type-from-event.ts
index 3d230b1..57227dd 100644
--- a/src/generated/get-webhook-payload-type-from-event.ts
+++ b/src/generated/get-webhook-payload-type-from-event.ts
@@ -1,215 +1,412 @@
 // THIS FILE IS GENERATED - DO NOT EDIT DIRECTLY
-// make edits in scripts/generate-types.js
+// make edits in scripts/generate-types.ts
 
-import { EventPayloads } from "./event-payloads";
-import { WebhookEvent, WebhookEventHandlerError } from "../types";
+import {
+  CheckRunEvent,
+  CheckRunCompletedEvent,
+  CheckRunCreatedEvent,
+  CheckRunRequestedActionEvent,
+  CheckRunRerequestedEvent,
+  CheckSuiteEvent,
+  CheckSuiteCompletedEvent,
+  CheckSuiteRequestedEvent,
+  CheckSuiteRerequestedEvent,
+  CodeScanningAlertEvent,
+  CodeScanningAlertAppearedInBranchEvent,
+  CodeScanningAlertClosedByUserEvent,
+  CodeScanningAlertCreatedEvent,
+  CodeScanningAlertFixedEvent,
+  CodeScanningAlertReopenedEvent,
+  CodeScanningAlertReopenedByUserEvent,
+  CommitCommentEvent,
+  CommitCommentCreatedEvent,
+  ContentReferenceEvent,
+  ContentReferenceCreatedEvent,
+  CreateEvent,
+  DeleteEvent,
+  DeployKeyEvent,
+  DeployKeyCreatedEvent,
+  DeployKeyDeletedEvent,
+  DeploymentEvent,
+  DeploymentCreatedEvent,
+  DeploymentStatusEvent,
+  DeploymentStatusCreatedEvent,
+  ForkEvent,
+  GithubAppAuthorizationEvent,
+  GithubAppAuthorizationRevokedEvent,
+  GollumEvent,
+  InstallationEvent,
+  InstallationCreatedEvent,
+  InstallationDeletedEvent,
+  InstallationNewPermissionsAcceptedEvent,
+  InstallationSuspendEvent,
+  InstallationUnsuspendEvent,
+  InstallationRepositoriesEvent,
+  InstallationRepositoriesAddedEvent,
+  InstallationRepositoriesRemovedEvent,
+  IssueCommentEvent,
+  IssueCommentCreatedEvent,
+  IssueCommentDeletedEvent,
+  IssueCommentEditedEvent,
+  IssuesEvent,
+  IssuesAssignedEvent,
+  IssuesClosedEvent,
+  IssuesDeletedEvent,
+  IssuesDemilestonedEvent,
+  IssuesEditedEvent,
+  IssuesLabeledEvent,
+  IssuesLockedEvent,
+  IssuesMilestonedEvent,
+  IssuesOpenedEvent,
+  IssuesPinnedEvent,
+  IssuesReopenedEvent,
+  IssuesTransferredEvent,
+  IssuesUnassignedEvent,
+  IssuesUnlabeledEvent,
+  IssuesUnlockedEvent,
+  IssuesUnpinnedEvent,
+  LabelEvent,
+  LabelCreatedEvent,
+  LabelDeletedEvent,
+  LabelEditedEvent,
+  MarketplacePurchaseEvent,
+  MarketplacePurchaseCancelledEvent,
+  MarketplacePurchaseChangedEvent,
+  MarketplacePurchasePendingChangeEvent,
+  MarketplacePurchasePendingChangeCancelledEvent,
+  MarketplacePurchasePurchasedEvent,
+  MemberEvent,
+  MemberAddedEvent,
+  MemberEditedEvent,
+  MemberRemovedEvent,
+  MembershipEvent,
+  MembershipAddedEvent,
+  MembershipRemovedEvent,
+  MetaEvent,
+  MetaDeletedEvent,
+  MilestoneEvent,
+  MilestoneClosedEvent,
+  MilestoneCreatedEvent,
+  MilestoneDeletedEvent,
+  MilestoneEditedEvent,
+  MilestoneOpenedEvent,
+  OrgBlockEvent,
+  OrgBlockBlockedEvent,
+  OrgBlockUnblockedEvent,
+  OrganizationEvent,
+  OrganizationDeletedEvent,
+  OrganizationMemberAddedEvent,
+  OrganizationMemberInvitedEvent,
+  OrganizationMemberRemovedEvent,
+  OrganizationRenamedEvent,
+  PackageEvent,
+  PackagePublishedEvent,
+  PackageUpdatedEvent,
+  PageBuildEvent,
+  PingEvent,
+  ProjectEvent,
+  ProjectClosedEvent,
+  ProjectCreatedEvent,
+  ProjectDeletedEvent,
+  ProjectEditedEvent,
+  ProjectReopenedEvent,
+  ProjectCardEvent,
+  ProjectCardConvertedEvent,
+  ProjectCardCreatedEvent,
+  ProjectCardDeletedEvent,
+  ProjectCardEditedEvent,
+  ProjectCardMovedEvent,
+  ProjectColumnEvent,
+  ProjectColumnCreatedEvent,
+  ProjectColumnDeletedEvent,
+  ProjectColumnEditedEvent,
+  ProjectColumnMovedEvent,
+  PublicEvent,
+  PullRequestEvent,
+  PullRequestAssignedEvent,
+  PullRequestClosedEvent,
+  PullRequestConvertedToDraftEvent,
+  PullRequestEditedEvent,
+  PullRequestLabeledEvent,
+  PullRequestLockedEvent,
+  PullRequestOpenedEvent,
+  PullRequestReadyForReviewEvent,
+  PullRequestReopenedEvent,
+  PullRequestReviewRequestRemovedEvent,
+  PullRequestReviewRequestedEvent,
+  PullRequestSynchronizeEvent,
+  PullRequestUnassignedEvent,
+  PullRequestUnlabeledEvent,
+  PullRequestUnlockedEvent,
+  PullRequestReviewEvent,
+  PullRequestReviewDismissedEvent,
+  PullRequestReviewEditedEvent,
+  PullRequestReviewSubmittedEvent,
+  PullRequestReviewCommentEvent,
+  PullRequestReviewCommentCreatedEvent,
+  PullRequestReviewCommentDeletedEvent,
+  PullRequestReviewCommentEditedEvent,
+  PushEvent,
+  ReleaseEvent,
+  ReleaseCreatedEvent,
+  ReleaseDeletedEvent,
+  ReleaseEditedEvent,
+  ReleasePrereleasedEvent,
+  ReleasePublishedEvent,
+  ReleaseReleasedEvent,
+  ReleaseUnpublishedEvent,
+  RepositoryEvent,
+  RepositoryArchivedEvent,
+  RepositoryCreatedEvent,
+  RepositoryDeletedEvent,
+  RepositoryEditedEvent,
+  RepositoryPrivatizedEvent,
+  RepositoryPublicizedEvent,
+  RepositoryRenamedEvent,
+  RepositoryTransferredEvent,
+  RepositoryUnarchivedEvent,
+  RepositoryDispatchEvent,
+  RepositoryDispatchOnDemandTestEvent,
+  RepositoryImportEvent,
+  RepositoryVulnerabilityAlertEvent,
+  RepositoryVulnerabilityAlertCreateEvent,
+  RepositoryVulnerabilityAlertDismissEvent,
+  RepositoryVulnerabilityAlertResolveEvent,
+  SecretScanningAlertEvent,
+  SecretScanningAlertCreatedEvent,
+  SecretScanningAlertReopenedEvent,
+  SecretScanningAlertResolvedEvent,
+  SecurityAdvisoryEvent,
+  SecurityAdvisoryPerformedEvent,
+  SecurityAdvisoryPublishedEvent,
+  SecurityAdvisoryUpdatedEvent,
+  SponsorshipEvent,
+  SponsorshipCancelledEvent,
+  SponsorshipCreatedEvent,
+  SponsorshipEditedEvent,
+  SponsorshipPendingCancellationEvent,
+  SponsorshipPendingTierChangeEvent,
+  SponsorshipTierChangedEvent,
+  StarEvent,
+  StarCreatedEvent,
+  StarDeletedEvent,
+  StatusEvent,
+  TeamEvent,
+  TeamAddedToRepositoryEvent,
+  TeamCreatedEvent,
+  TeamDeletedEvent,
+  TeamEditedEvent,
+  TeamRemovedFromRepositoryEvent,
+  TeamAddEvent,
+  WatchEvent,
+  WatchStartedEvent,
+  WorkflowDispatchEvent,
+  WorkflowRunEvent,
+  WorkflowRunCompletedEvent,
+  WorkflowRunRequestedEvent,
+} from "@octokit/webhooks-definitions/schema";
 
-export interface EventTypesPayload {
-  error: WebhookEventHandlerError;
-  "*": WebhookEvent<any>;
-  check_run: WebhookEvent<EventPayloads.WebhookPayloadCheckRun>;
-  "check_run.completed": WebhookEvent<EventPayloads.WebhookPayloadCheckRun>;
-  "check_run.created": WebhookEvent<EventPayloads.WebhookPayloadCheckRun>;
-  "check_run.requested_action": WebhookEvent<EventPayloads.WebhookPayloadCheckRun>;
-  "check_run.rerequested": WebhookEvent<EventPayloads.WebhookPayloadCheckRun>;
-  check_suite: WebhookEvent<EventPayloads.WebhookPayloadCheckSuite>;
-  "check_suite.completed": WebhookEvent<EventPayloads.WebhookPayloadCheckSuite>;
-  "check_suite.requested": WebhookEvent<EventPayloads.WebhookPayloadCheckSuite>;
-  "check_suite.rerequested": WebhookEvent<EventPayloads.WebhookPayloadCheckSuite>;
-  code_scanning_alert: WebhookEvent<EventPayloads.WebhookPayloadCodeScanningAlert>;
-  "code_scanning_alert.appeared_in_branch": WebhookEvent<EventPayloads.WebhookPayloadCodeScanningAlert>;
-  "code_scanning_alert.closed_by_user": WebhookEvent<EventPayloads.WebhookPayloadCodeScanningAlert>;
-  "code_scanning_alert.created": WebhookEvent<EventPayloads.WebhookPayloadCodeScanningAlert>;
-  "code_scanning_alert.fixed": WebhookEvent<EventPayloads.WebhookPayloadCodeScanningAlert>;
-  "code_scanning_alert.reopened": WebhookEvent<EventPayloads.WebhookPayloadCodeScanningAlert>;
-  "code_scanning_alert.reopened_by_user": WebhookEvent<EventPayloads.WebhookPayloadCodeScanningAlert>;
-  commit_comment: WebhookEvent<EventPayloads.WebhookPayloadCommitComment>;
-  "commit_comment.created": WebhookEvent<EventPayloads.WebhookPayloadCommitComment>;
-  content_reference: WebhookEvent<EventPayloads.WebhookPayloadContentReference>;
-  "content_reference.created": WebhookEvent<EventPayloads.WebhookPayloadContentReference>;
-  create: WebhookEvent<EventPayloads.WebhookPayloadCreate>;
-  delete: WebhookEvent<EventPayloads.WebhookPayloadDelete>;
-  deploy_key: WebhookEvent<EventPayloads.WebhookPayloadDeployKey>;
-  "deploy_key.created": WebhookEvent<EventPayloads.WebhookPayloadDeployKey>;
-  "deploy_key.deleted": WebhookEvent<EventPayloads.WebhookPayloadDeployKey>;
-  deployment: WebhookEvent<EventPayloads.WebhookPayloadDeployment>;
-  "deployment.created": WebhookEvent<EventPayloads.WebhookPayloadDeployment>;
-  deployment_status: WebhookEvent<EventPayloads.WebhookPayloadDeploymentStatus>;
-  "deployment_status.created": WebhookEvent<EventPayloads.WebhookPayloadDeploymentStatus>;
-  fork: WebhookEvent<EventPayloads.WebhookPayloadFork>;
-  github_app_authorization: WebhookEvent<EventPayloads.WebhookPayloadGithubAppAuthorization>;
-  "github_app_authorization.revoked": WebhookEvent<EventPayloads.WebhookPayloadGithubAppAuthorization>;
-  gollum: WebhookEvent<EventPayloads.WebhookPayloadGollum>;
-  installation: WebhookEvent<EventPayloads.WebhookPayloadInstallation>;
-  "installation.created": WebhookEvent<EventPayloads.WebhookPayloadInstallation>;
-  "installation.deleted": WebhookEvent<EventPayloads.WebhookPayloadInstallation>;
-  "installation.new_permissions_accepted": WebhookEvent<EventPayloads.WebhookPayloadInstallation>;
-  "installation.suspend": WebhookEvent<EventPayloads.WebhookPayloadInstallation>;
-  "installation.unsuspend": WebhookEvent<EventPayloads.WebhookPayloadInstallation>;
-  installation_repositories: WebhookEvent<EventPayloads.WebhookPayloadInstallationRepositories>;
-  "installation_repositories.added": WebhookEvent<EventPayloads.WebhookPayloadInstallationRepositories>;
-  "installation_repositories.removed": WebhookEvent<EventPayloads.WebhookPayloadInstallationRepositories>;
-  issue_comment: WebhookEvent<EventPayloads.WebhookPayloadIssueComment>;
-  "issue_comment.created": WebhookEvent<EventPayloads.WebhookPayloadIssueComment>;
-  "issue_comment.deleted": WebhookEvent<EventPayloads.WebhookPayloadIssueComment>;
-  "issue_comment.edited": WebhookEvent<EventPayloads.WebhookPayloadIssueComment>;
-  issues: WebhookEvent<EventPayloads.WebhookPayloadIssues>;
-  "issues.assigned": WebhookEvent<EventPayloads.WebhookPayloadIssues>;
-  "issues.closed": WebhookEvent<EventPayloads.WebhookPayloadIssues>;
-  "issues.deleted": WebhookEvent<EventPayloads.WebhookPayloadIssues>;
-  "issues.demilestoned": WebhookEvent<EventPayloads.WebhookPayloadIssues>;
-  "issues.edited": WebhookEvent<EventPayloads.WebhookPayloadIssues>;
-  "issues.labeled": WebhookEvent<EventPayloads.WebhookPayloadIssues>;
-  "issues.locked": WebhookEvent<EventPayloads.WebhookPayloadIssues>;
-  "issues.milestoned": WebhookEvent<EventPayloads.WebhookPayloadIssues>;
-  "issues.opened": WebhookEvent<EventPayloads.WebhookPayloadIssues>;
-  "issues.pinned": WebhookEvent<EventPayloads.WebhookPayloadIssues>;
-  "issues.reopened": WebhookEvent<EventPayloads.WebhookPayloadIssues>;
-  "issues.transferred": WebhookEvent<EventPayloads.WebhookPayloadIssues>;
-  "issues.unassigned": WebhookEvent<EventPayloads.WebhookPayloadIssues>;
-  "issues.unlabeled": WebhookEvent<EventPayloads.WebhookPayloadIssues>;
-  "issues.unlocked": WebhookEvent<EventPayloads.WebhookPayloadIssues>;
-  "issues.unpinned": WebhookEvent<EventPayloads.WebhookPayloadIssues>;
-  label: WebhookEvent<EventPayloads.WebhookPayloadLabel>;
-  "label.created": WebhookEvent<EventPayloads.WebhookPayloadLabel>;
-  "label.deleted": WebhookEvent<EventPayloads.WebhookPayloadLabel>;
-  "label.edited": WebhookEvent<EventPayloads.WebhookPayloadLabel>;
-  marketplace_purchase: WebhookEvent<EventPayloads.WebhookPayloadMarketplacePurchase>;
-  "marketplace_purchase.cancelled": WebhookEvent<EventPayloads.WebhookPayloadMarketplacePurchase>;
-  "marketplace_purchase.changed": WebhookEvent<EventPayloads.WebhookPayloadMarketplacePurchase>;
-  "marketplace_purchase.pending_change": WebhookEvent<EventPayloads.WebhookPayloadMarketplacePurchase>;
-  "marketplace_purchase.pending_change_cancelled": WebhookEvent<EventPayloads.WebhookPayloadMarketplacePurchase>;
-  "marketplace_purchase.purchased": WebhookEvent<EventPayloads.WebhookPayloadMarketplacePurchase>;
-  member: WebhookEvent<EventPayloads.WebhookPayloadMember>;
-  "member.added": WebhookEvent<EventPayloads.WebhookPayloadMember>;
-  "member.edited": WebhookEvent<EventPayloads.WebhookPayloadMember>;
-  "member.removed": WebhookEvent<EventPayloads.WebhookPayloadMember>;
-  membership: WebhookEvent<EventPayloads.WebhookPayloadMembership>;
-  "membership.added": WebhookEvent<EventPayloads.WebhookPayloadMembership>;
-  "membership.removed": WebhookEvent<EventPayloads.WebhookPayloadMembership>;
-  meta: WebhookEvent<EventPayloads.WebhookPayloadMeta>;
-  "meta.deleted": WebhookEvent<EventPayloads.WebhookPayloadMeta>;
-  milestone: WebhookEvent<EventPayloads.WebhookPayloadMilestone>;
-  "milestone.closed": WebhookEvent<EventPayloads.WebhookPayloadMilestone>;
-  "milestone.created": WebhookEvent<EventPayloads.WebhookPayloadMilestone>;
-  "milestone.deleted": WebhookEvent<EventPayloads.WebhookPayloadMilestone>;
-  "milestone.edited": WebhookEvent<EventPayloads.WebhookPayloadMilestone>;
-  "milestone.opened": WebhookEvent<EventPayloads.WebhookPayloadMilestone>;
-  organization: WebhookEvent<EventPayloads.WebhookPayloadOrganization>;
-  "organization.deleted": WebhookEvent<EventPayloads.WebhookPayloadOrganization>;
-  "organization.member_added": WebhookEvent<EventPayloads.WebhookPayloadOrganization>;
-  "organization.member_invited": WebhookEvent<EventPayloads.WebhookPayloadOrganization>;
-  "organization.member_removed": WebhookEvent<EventPayloads.WebhookPayloadOrganization>;
-  "organization.renamed": WebhookEvent<EventPayloads.WebhookPayloadOrganization>;
-  org_block: WebhookEvent<EventPayloads.WebhookPayloadOrgBlock>;
-  "org_block.blocked": WebhookEvent<EventPayloads.WebhookPayloadOrgBlock>;
-  "org_block.unblocked": WebhookEvent<EventPayloads.WebhookPayloadOrgBlock>;
-  package: WebhookEvent<EventPayloads.WebhookPayloadPackage>;
-  "package.published": WebhookEvent<EventPayloads.WebhookPayloadPackage>;
-  "package.updated": WebhookEvent<EventPayloads.WebhookPayloadPackage>;
-  page_build: WebhookEvent<EventPayloads.WebhookPayloadPageBuild>;
-  ping: WebhookEvent<EventPayloads.WebhookPayloadPing>;
-  project_card: WebhookEvent<EventPayloads.WebhookPayloadProjectCard>;
-  "project_card.converted": WebhookEvent<EventPayloads.WebhookPayloadProjectCard>;
-  "project_card.created": WebhookEvent<EventPayloads.WebhookPayloadProjectCard>;
-  "project_card.deleted": WebhookEvent<EventPayloads.WebhookPayloadProjectCard>;
-  "project_card.edited": WebhookEvent<EventPayloads.WebhookPayloadProjectCard>;
-  "project_card.moved": WebhookEvent<EventPayloads.WebhookPayloadProjectCard>;
-  project_column: WebhookEvent<EventPayloads.WebhookPayloadProjectColumn>;
-  "project_column.created": WebhookEvent<EventPayloads.WebhookPayloadProjectColumn>;
-  "project_column.deleted": WebhookEvent<EventPayloads.WebhookPayloadProjectColumn>;
-  "project_column.edited": WebhookEvent<EventPayloads.WebhookPayloadProjectColumn>;
-  "project_column.moved": WebhookEvent<EventPayloads.WebhookPayloadProjectColumn>;
-  project: WebhookEvent<EventPayloads.WebhookPayloadProject>;
-  "project.closed": WebhookEvent<EventPayloads.WebhookPayloadProject>;
-  "project.created": WebhookEvent<EventPayloads.WebhookPayloadProject>;
-  "project.deleted": WebhookEvent<EventPayloads.WebhookPayloadProject>;
-  "project.edited": WebhookEvent<EventPayloads.WebhookPayloadProject>;
-  "project.reopened": WebhookEvent<EventPayloads.WebhookPayloadProject>;
-  public: WebhookEvent<EventPayloads.WebhookPayloadPublic>;
-  pull_request: WebhookEvent<EventPayloads.WebhookPayloadPullRequest>;
-  "pull_request.assigned": WebhookEvent<EventPayloads.WebhookPayloadPullRequest>;
-  "pull_request.closed": WebhookEvent<EventPayloads.WebhookPayloadPullRequest>;
-  "pull_request.edited": WebhookEvent<EventPayloads.WebhookPayloadPullRequest>;
-  "pull_request.labeled": WebhookEvent<EventPayloads.WebhookPayloadPullRequest>;
-  "pull_request.locked": WebhookEvent<EventPayloads.WebhookPayloadPullRequest>;
-  "pull_request.merged": WebhookEvent<EventPayloads.WebhookPayloadPullRequest>;
-  "pull_request.opened": WebhookEvent<EventPayloads.WebhookPayloadPullRequest>;
-  "pull_request.ready_for_review": WebhookEvent<EventPayloads.WebhookPayloadPullRequest>;
-  "pull_request.reopened": WebhookEvent<EventPayloads.WebhookPayloadPullRequest>;
-  "pull_request.review_request_removed": WebhookEvent<EventPayloads.WebhookPayloadPullRequest>;
-  "pull_request.review_requested": WebhookEvent<EventPayloads.WebhookPayloadPullRequest>;
-  "pull_request.synchronize": WebhookEvent<EventPayloads.WebhookPayloadPullRequest>;
-  "pull_request.unassigned": WebhookEvent<EventPayloads.WebhookPayloadPullRequest>;
-  "pull_request.unlabeled": WebhookEvent<EventPayloads.WebhookPayloadPullRequest>;
-  "pull_request.unlocked": WebhookEvent<EventPayloads.WebhookPayloadPullRequest>;
-  pull_request_review: WebhookEvent<EventPayloads.WebhookPayloadPullRequestReview>;
-  "pull_request_review.dismissed": WebhookEvent<EventPayloads.WebhookPayloadPullRequestReview>;
-  "pull_request_review.edited": WebhookEvent<EventPayloads.WebhookPayloadPullRequestReview>;
-  "pull_request_review.submitted": WebhookEvent<EventPayloads.WebhookPayloadPullRequestReview>;
-  pull_request_review_comment: WebhookEvent<EventPayloads.WebhookPayloadPullRequestReviewComment>;
-  "pull_request_review_comment.created": WebhookEvent<EventPayloads.WebhookPayloadPullRequestReviewComment>;
-  "pull_request_review_comment.deleted": WebhookEvent<EventPayloads.WebhookPayloadPullRequestReviewComment>;
-  "pull_request_review_comment.edited": WebhookEvent<EventPayloads.WebhookPayloadPullRequestReviewComment>;
-  push: WebhookEvent<EventPayloads.WebhookPayloadPush>;
-  release: WebhookEvent<EventPayloads.WebhookPayloadRelease>;
-  "release.created": WebhookEvent<EventPayloads.WebhookPayloadRelease>;
-  "release.deleted": WebhookEvent<EventPayloads.WebhookPayloadRelease>;
-  "release.edited": WebhookEvent<EventPayloads.WebhookPayloadRelease>;
-  "release.prereleased": WebhookEvent<EventPayloads.WebhookPayloadRelease>;
-  "release.published": WebhookEvent<EventPayloads.WebhookPayloadRelease>;
-  "release.released": WebhookEvent<EventPayloads.WebhookPayloadRelease>;
-  "release.unpublished": WebhookEvent<EventPayloads.WebhookPayloadRelease>;
-  repository_dispatch: WebhookEvent<EventPayloads.WebhookPayloadRepositoryDispatch>;
-  "repository_dispatch.on-demand-test": WebhookEvent<EventPayloads.WebhookPayloadRepositoryDispatch>;
-  repository: WebhookEvent<EventPayloads.WebhookPayloadRepository>;
-  "repository.archived": WebhookEvent<EventPayloads.WebhookPayloadRepository>;
-  "repository.created": WebhookEvent<EventPayloads.WebhookPayloadRepository>;
-  "repository.deleted": WebhookEvent<EventPayloads.WebhookPayloadRepository>;
-  "repository.edited": WebhookEvent<EventPayloads.WebhookPayloadRepository>;
-  "repository.privatized": WebhookEvent<EventPayloads.WebhookPayloadRepository>;
-  "repository.publicized": WebhookEvent<EventPayloads.WebhookPayloadRepository>;
-  "repository.renamed": WebhookEvent<EventPayloads.WebhookPayloadRepository>;
-  "repository.transferred": WebhookEvent<EventPayloads.WebhookPayloadRepository>;
-  "repository.unarchived": WebhookEvent<EventPayloads.WebhookPayloadRepository>;
-  repository_import: WebhookEvent<EventPayloads.WebhookPayloadRepositoryImport>;
-  repository_vulnerability_alert: WebhookEvent<EventPayloads.WebhookPayloadRepositoryVulnerabilityAlert>;
-  "repository_vulnerability_alert.create": WebhookEvent<EventPayloads.WebhookPayloadRepositoryVulnerabilityAlert>;
-  "repository_vulnerability_alert.dismiss": WebhookEvent<EventPayloads.WebhookPayloadRepositoryVulnerabilityAlert>;
-  "repository_vulnerability_alert.resolve": WebhookEvent<EventPayloads.WebhookPayloadRepositoryVulnerabilityAlert>;
-  secret_scanning_alert: WebhookEvent<EventPayloads.WebhookPayloadSecretScanningAlert>;
-  "secret_scanning_alert.created": WebhookEvent<EventPayloads.WebhookPayloadSecretScanningAlert>;
-  "secret_scanning_alert.reopened": WebhookEvent<EventPayloads.WebhookPayloadSecretScanningAlert>;
-  "secret_scanning_alert.resolved": WebhookEvent<EventPayloads.WebhookPayloadSecretScanningAlert>;
-  security_advisory: WebhookEvent<EventPayloads.WebhookPayloadSecurityAdvisory>;
-  "security_advisory.performed": WebhookEvent<EventPayloads.WebhookPayloadSecurityAdvisory>;
-  "security_advisory.published": WebhookEvent<EventPayloads.WebhookPayloadSecurityAdvisory>;
-  "security_advisory.updated": WebhookEvent<EventPayloads.WebhookPayloadSecurityAdvisory>;
-  sponsorship: WebhookEvent<EventPayloads.WebhookPayloadSponsorship>;
-  "sponsorship.cancelled": WebhookEvent<EventPayloads.WebhookPayloadSponsorship>;
-  "sponsorship.created": WebhookEvent<EventPayloads.WebhookPayloadSponsorship>;
-  "sponsorship.edited": WebhookEvent<EventPayloads.WebhookPayloadSponsorship>;
-  "sponsorship.pending_cancellation": WebhookEvent<EventPayloads.WebhookPayloadSponsorship>;
-  "sponsorship.pending_tier_change": WebhookEvent<EventPayloads.WebhookPayloadSponsorship>;
-  "sponsorship.tier_changed": WebhookEvent<EventPayloads.WebhookPayloadSponsorship>;
-  star: WebhookEvent<EventPayloads.WebhookPayloadStar>;
-  "star.created": WebhookEvent<EventPayloads.WebhookPayloadStar>;
-  "star.deleted": WebhookEvent<EventPayloads.WebhookPayloadStar>;
-  status: WebhookEvent<EventPayloads.WebhookPayloadStatus>;
-  team: WebhookEvent<EventPayloads.WebhookPayloadTeam>;
-  "team.added_to_repository": WebhookEvent<EventPayloads.WebhookPayloadTeam>;
-  "team.created": WebhookEvent<EventPayloads.WebhookPayloadTeam>;
-  "team.deleted": WebhookEvent<EventPayloads.WebhookPayloadTeam>;
-  "team.edited": WebhookEvent<EventPayloads.WebhookPayloadTeam>;
-  "team.removed_from_repository": WebhookEvent<EventPayloads.WebhookPayloadTeam>;
-  team_add: WebhookEvent<EventPayloads.WebhookPayloadTeamAdd>;
-  watch: WebhookEvent<EventPayloads.WebhookPayloadWatch>;
-  "watch.started": WebhookEvent<EventPayloads.WebhookPayloadWatch>;
-  workflow_dispatch: WebhookEvent<EventPayloads.WebhookPayloadWorkflowDispatch>;
-  workflow_run: WebhookEvent<EventPayloads.WebhookPayloadWorkflowRun>;
-  "workflow_run.action": WebhookEvent<EventPayloads.WebhookPayloadWorkflowRun>;
-  "workflow_run.completed": WebhookEvent<EventPayloads.WebhookPayloadWorkflowRun>;
-  "workflow_run.requested": WebhookEvent<EventPayloads.WebhookPayloadWorkflowRun>;
+export interface EmitterEventWebhookPayloadMap {
+  check_run: CheckRunEvent;
+  "check_run.completed": CheckRunCompletedEvent;
+  "check_run.created": CheckRunCreatedEvent;
+  "check_run.requested_action": CheckRunRequestedActionEvent;
+  "check_run.rerequested": CheckRunRerequestedEvent;
+  check_suite: CheckSuiteEvent;
+  "check_suite.completed": CheckSuiteCompletedEvent;
+  "check_suite.requested": CheckSuiteRequestedEvent;
+  "check_suite.rerequested": CheckSuiteRerequestedEvent;
+  code_scanning_alert: CodeScanningAlertEvent;
+  "code_scanning_alert.appeared_in_branch": CodeScanningAlertAppearedInBranchEvent;
+  "code_scanning_alert.closed_by_user": CodeScanningAlertClosedByUserEvent;
+  "code_scanning_alert.created": CodeScanningAlertCreatedEvent;
+  "code_scanning_alert.fixed": CodeScanningAlertFixedEvent;
+  "code_scanning_alert.reopened": CodeScanningAlertReopenedEvent;
+  "code_scanning_alert.reopened_by_user": CodeScanningAlertReopenedByUserEvent;
+  commit_comment: CommitCommentEvent;
+  "commit_comment.created": CommitCommentCreatedEvent;
+  content_reference: ContentReferenceEvent;
+  "content_reference.created": ContentReferenceCreatedEvent;
+  create: CreateEvent;
+  delete: DeleteEvent;
+  deploy_key: DeployKeyEvent;
+  "deploy_key.created": DeployKeyCreatedEvent;
+  "deploy_key.deleted": DeployKeyDeletedEvent;
+  deployment: DeploymentEvent;
+  "deployment.created": DeploymentCreatedEvent;
+  deployment_status: DeploymentStatusEvent;
+  "deployment_status.created": DeploymentStatusCreatedEvent;
+  fork: ForkEvent;
+  github_app_authorization: GithubAppAuthorizationEvent;
+  "github_app_authorization.revoked": GithubAppAuthorizationRevokedEvent;
+  gollum: GollumEvent;
+  installation: InstallationEvent;
+  "installation.created": InstallationCreatedEvent;
+  "installation.deleted": InstallationDeletedEvent;
+  "installation.new_permissions_accepted": InstallationNewPermissionsAcceptedEvent;
+  "installation.suspend": InstallationSuspendEvent;
+  "installation.unsuspend": InstallationUnsuspendEvent;
+  installation_repositories: InstallationRepositoriesEvent;
+  "installation_repositories.added": InstallationRepositoriesAddedEvent;
+  "installation_repositories.removed": InstallationRepositoriesRemovedEvent;
+  issue_comment: IssueCommentEvent;
+  "issue_comment.created": IssueCommentCreatedEvent;
+  "issue_comment.deleted": IssueCommentDeletedEvent;
+  "issue_comment.edited": IssueCommentEditedEvent;
+  issues: IssuesEvent;
+  "issues.assigned": IssuesAssignedEvent;
+  "issues.closed": IssuesClosedEvent;
+  "issues.deleted": IssuesDeletedEvent;
+  "issues.demilestoned": IssuesDemilestonedEvent;
+  "issues.edited": IssuesEditedEvent;
+  "issues.labeled": IssuesLabeledEvent;
+  "issues.locked": IssuesLockedEvent;
+  "issues.milestoned": IssuesMilestonedEvent;
+  "issues.opened": IssuesOpenedEvent;
+  "issues.pinned": IssuesPinnedEvent;
+  "issues.reopened": IssuesReopenedEvent;
+  "issues.transferred": IssuesTransferredEvent;
+  "issues.unassigned": IssuesUnassignedEvent;
+  "issues.unlabeled": IssuesUnlabeledEvent;
+  "issues.unlocked": IssuesUnlockedEvent;
+  "issues.unpinned": IssuesUnpinnedEvent;
+  label: LabelEvent;
+  "label.created": LabelCreatedEvent;
+  "label.deleted": LabelDeletedEvent;
+  "label.edited": LabelEditedEvent;
+  marketplace_purchase: MarketplacePurchaseEvent;
+  "marketplace_purchase.cancelled": MarketplacePurchaseCancelledEvent;
+  "marketplace_purchase.changed": MarketplacePurchaseChangedEvent;
+  "marketplace_purchase.pending_change": MarketplacePurchasePendingChangeEvent;
+  "marketplace_purchase.pending_change_cancelled": MarketplacePurchasePendingChangeCancelledEvent;
+  "marketplace_purchase.purchased": MarketplacePurchasePurchasedEvent;
+  member: MemberEvent;
+  "member.added": MemberAddedEvent;
+  "member.edited": MemberEditedEvent;
+  "member.removed": MemberRemovedEvent;
+  membership: MembershipEvent;
+  "membership.added": MembershipAddedEvent;
+  "membership.removed": MembershipRemovedEvent;
+  meta: MetaEvent;
+  "meta.deleted": MetaDeletedEvent;
+  milestone: MilestoneEvent;
+  "milestone.closed": MilestoneClosedEvent;
+  "milestone.created": MilestoneCreatedEvent;
+  "milestone.deleted": MilestoneDeletedEvent;
+  "milestone.edited": MilestoneEditedEvent;
+  "milestone.opened": MilestoneOpenedEvent;
+  org_block: OrgBlockEvent;
+  "org_block.blocked": OrgBlockBlockedEvent;
+  "org_block.unblocked": OrgBlockUnblockedEvent;
+  organization: OrganizationEvent;
+  "organization.deleted": OrganizationDeletedEvent;
+  "organization.member_added": OrganizationMemberAddedEvent;
+  "organization.member_invited": OrganizationMemberInvitedEvent;
+  "organization.member_removed": OrganizationMemberRemovedEvent;
+  "organization.renamed": OrganizationRenamedEvent;
+  package: PackageEvent;
+  "package.published": PackagePublishedEvent;
+  "package.updated": PackageUpdatedEvent;
+  page_build: PageBuildEvent;
+  ping: PingEvent;
+  project: ProjectEvent;
+  "project.closed": ProjectClosedEvent;
+  "project.created": ProjectCreatedEvent;
+  "project.deleted": ProjectDeletedEvent;
+  "project.edited": ProjectEditedEvent;
+  "project.reopened": ProjectReopenedEvent;
+  project_card: ProjectCardEvent;
+  "project_card.converted": ProjectCardConvertedEvent;
+  "project_card.created": ProjectCardCreatedEvent;
+  "project_card.deleted": ProjectCardDeletedEvent;
+  "project_card.edited": ProjectCardEditedEvent;
+  "project_card.moved": ProjectCardMovedEvent;
+  project_column: ProjectColumnEvent;
+  "project_column.created": ProjectColumnCreatedEvent;
+  "project_column.deleted": ProjectColumnDeletedEvent;
+  "project_column.edited": ProjectColumnEditedEvent;
+  "project_column.moved": ProjectColumnMovedEvent;
+  public: PublicEvent;
+  pull_request: PullRequestEvent;
+  "pull_request.assigned": PullRequestAssignedEvent;
+  "pull_request.closed": PullRequestClosedEvent;
+  "pull_request.converted_to_draft": PullRequestConvertedToDraftEvent;
+  "pull_request.edited": PullRequestEditedEvent;
+  "pull_request.labeled": PullRequestLabeledEvent;
+  "pull_request.locked": PullRequestLockedEvent;
+  "pull_request.opened": PullRequestOpenedEvent;
+  "pull_request.ready_for_review": PullRequestReadyForReviewEvent;
+  "pull_request.reopened": PullRequestReopenedEvent;
+  "pull_request.review_request_removed": PullRequestReviewRequestRemovedEvent;
+  "pull_request.review_requested": PullRequestReviewRequestedEvent;
+  "pull_request.synchronize": PullRequestSynchronizeEvent;
+  "pull_request.unassigned": PullRequestUnassignedEvent;
+  "pull_request.unlabeled": PullRequestUnlabeledEvent;
+  "pull_request.unlocked": PullRequestUnlockedEvent;
+  pull_request_review: PullRequestReviewEvent;
+  "pull_request_review.dismissed": PullRequestReviewDismissedEvent;
+  "pull_request_review.edited": PullRequestReviewEditedEvent;
+  "pull_request_review.submitted": PullRequestReviewSubmittedEvent;
+  pull_request_review_comment: PullRequestReviewCommentEvent;
+  "pull_request_review_comment.created": PullRequestReviewCommentCreatedEvent;
+  "pull_request_review_comment.deleted": PullRequestReviewCommentDeletedEvent;
+  "pull_request_review_comment.edited": PullRequestReviewCommentEditedEvent;
+  push: PushEvent;
+  release: ReleaseEvent;
+  "release.created": ReleaseCreatedEvent;
+  "release.deleted": ReleaseDeletedEvent;
+  "release.edited": ReleaseEditedEvent;
+  "release.prereleased": ReleasePrereleasedEvent;
+  "release.published": ReleasePublishedEvent;
+  "release.released": ReleaseReleasedEvent;
+  "release.unpublished": ReleaseUnpublishedEvent;
+  repository: RepositoryEvent;
+  "repository.archived": RepositoryArchivedEvent;
+  "repository.created": RepositoryCreatedEvent;
+  "repository.deleted": RepositoryDeletedEvent;
+  "repository.edited": RepositoryEditedEvent;
+  "repository.privatized": RepositoryPrivatizedEvent;
+  "repository.publicized": RepositoryPublicizedEvent;
+  "repository.renamed": RepositoryRenamedEvent;
+  "repository.transferred": RepositoryTransferredEvent;
+  "repository.unarchived": RepositoryUnarchivedEvent;
+  repository_dispatch: RepositoryDispatchEvent;
+  "repository_dispatch.on-demand-test": RepositoryDispatchOnDemandTestEvent;
+  repository_import: RepositoryImportEvent;
+  repository_vulnerability_alert: RepositoryVulnerabilityAlertEvent;
+  "repository_vulnerability_alert.create": RepositoryVulnerabilityAlertCreateEvent;
+  "repository_vulnerability_alert.dismiss": RepositoryVulnerabilityAlertDismissEvent;
+  "repository_vulnerability_alert.resolve": RepositoryVulnerabilityAlertResolveEvent;
+  secret_scanning_alert: SecretScanningAlertEvent;
+  "secret_scanning_alert.created": SecretScanningAlertCreatedEvent;
+  "secret_scanning_alert.reopened": SecretScanningAlertReopenedEvent;
+  "secret_scanning_alert.resolved": SecretScanningAlertResolvedEvent;
+  security_advisory: SecurityAdvisoryEvent;
+  "security_advisory.performed": SecurityAdvisoryPerformedEvent;
+  "security_advisory.published": SecurityAdvisoryPublishedEvent;
+  "security_advisory.updated": SecurityAdvisoryUpdatedEvent;
+  sponsorship: SponsorshipEvent;
+  "sponsorship.cancelled": SponsorshipCancelledEvent;
+  "sponsorship.created": SponsorshipCreatedEvent;
+  "sponsorship.edited": SponsorshipEditedEvent;
+  "sponsorship.pending_cancellation": SponsorshipPendingCancellationEvent;
+  "sponsorship.pending_tier_change": SponsorshipPendingTierChangeEvent;
+  "sponsorship.tier_changed": SponsorshipTierChangedEvent;
+  star: StarEvent;
+  "star.created": StarCreatedEvent;
+  "star.deleted": StarDeletedEvent;
+  status: StatusEvent;
+  team: TeamEvent;
+  "team.added_to_repository": TeamAddedToRepositoryEvent;
+  "team.created": TeamCreatedEvent;
+  "team.deleted": TeamDeletedEvent;
+  "team.edited": TeamEditedEvent;
+  "team.removed_from_repository": TeamRemovedFromRepositoryEvent;
+  team_add: TeamAddEvent;
+  watch: WatchEvent;
+  "watch.started": WatchStartedEvent;
+  workflow_dispatch: WorkflowDispatchEvent;
+  workflow_run: WorkflowRunEvent;
+  "workflow_run.completed": WorkflowRunCompletedEvent;
+  "workflow_run.requested": WorkflowRunRequestedEvent;
 }
-
-export type WebhookEvents = keyof EventTypesPayload;
diff --git a/src/generated/webhook-names.ts b/src/generated/webhook-names.ts
index 75f6388..6c7e894 100644
--- a/src/generated/webhook-names.ts
+++ b/src/generated/webhook-names.ts
@@ -1,8 +1,9 @@
 // THIS FILE IS GENERATED - DO NOT EDIT DIRECTLY
-// make edits in scripts/update-known-events.js
+// make edits in scripts/generate-types.ts
 
-export const webhookNames = [
+export const emitterEventNames = [
   "*",
+  "error",
   "check_run",
   "check_run.completed",
   "check_run.created",
@@ -32,7 +33,6 @@ export const webhookNames = [
   "deployment.created",
   "deployment_status",
   "deployment_status.created",
-  "error",
   "fork",
   "github_app_authorization",
   "github_app_authorization.revoked",
@@ -127,10 +127,10 @@ export const webhookNames = [
   "pull_request",
   "pull_request.assigned",
   "pull_request.closed",
+  "pull_request.converted_to_draft",
   "pull_request.edited",
   "pull_request.labeled",
   "pull_request.locked",
-  "pull_request.merged",
   "pull_request.opened",
   "pull_request.ready_for_review",
   "pull_request.reopened",
@@ -204,7 +204,6 @@ export const webhookNames = [
   "watch.started",
   "workflow_dispatch",
   "workflow_run",
-  "workflow_run.action",
   "workflow_run.completed",
   "workflow_run.requested",
 ];
diff --git a/src/index.ts b/src/index.ts
index a323d7c..945fe02 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -1,31 +1,36 @@
+import { IncomingMessage, ServerResponse } from "http";
 import { createEventHandler } from "./event-handler/index";
 import { createMiddleware } from "./middleware/index";
 import { middleware } from "./middleware/middleware";
+import {
+  verifyAndReceive,
+  WebhookEventName,
+} from "./middleware/verify-and-receive";
 import { sign } from "./sign/index";
-import { verify } from "./verify/index";
-import { verifyAndReceive } from "./middleware/verify-and-receive";
 import {
+  EmitterAnyEvent,
+  EmitterEventName,
+  EmitterWebhookEvent,
+  EmitterWebhookEventMap,
+  HandlerFunction,
   Options,
   State,
-  WebhookEvent,
   WebhookError,
   WebhookEventHandlerError,
-  HandlerFunction,
 } from "./types";
-import { IncomingMessage, ServerResponse } from "http";
-import { WebhookEvents } from "./generated/get-webhook-payload-type-from-event";
+import { verify } from "./verify/index";
 
 // U holds the return value of `transform` function in Options
-class Webhooks<T extends WebhookEvent = WebhookEvent, U = {}> {
+class Webhooks<T extends EmitterWebhookEvent = EmitterWebhookEvent, U = {}> {
   public sign: (payload: string | object) => string;
   public verify: (eventPayload: string | object, signature: string) => boolean;
-  public on: <E extends WebhookEvents>(
+  public on: <E extends EmitterEventName>(
     event: E | E[],
     callback: HandlerFunction<E, U>
   ) => void;
-  public onAny: (callback: (event: WebhookEvent<any>) => any) => void;
+  public onAny: (callback: (event: EmitterAnyEvent) => any) => void;
   public onError: (callback: (event: WebhookEventHandlerError) => any) => void;
-  public removeListener: <E extends WebhookEvents>(
+  public removeListener: <E extends EmitterEventName>(
     event: E | E[],
     callback: HandlerFunction<E, U>
   ) => void;
@@ -40,7 +45,7 @@ class Webhooks<T extends WebhookEvent = WebhookEvent, U = {}> {
     next?: (err?: any) => void
   ) => void | Promise<void>;
   public verifyAndReceive: (
-    options: WebhookEvent & { signature: string }
+    options: EmitterWebhookEventMap[WebhookEventName] & { signature: string }
   ) => Promise<void>;
 
   constructor(options?: Options<T>) {
@@ -71,16 +76,18 @@ const createWebhooksApi = Webhooks.prototype.constructor;
 
 export { EventPayloads } from "./generated/event-payloads";
 export {
-  EventTypesPayload,
-  WebhookEvents,
-} from "./generated/get-webhook-payload-type-from-event";
+  EmitterEventMap,
+  EmitterEventName,
+  EmitterEventMap as EventTypesPayload,
+  EmitterEventName as WebhookEvents,
+} from "./types";
 
 export {
   createEventHandler,
   createMiddleware,
   createWebhooksApi,
   Webhooks,
-  WebhookEvent,
+  EmitterWebhookEvent,
   WebhookError,
   sign,
   verify,
diff --git a/src/middleware/get-payload.ts b/src/middleware/get-payload.ts
index bfb8b88..503376d 100644
--- a/src/middleware/get-payload.ts
+++ b/src/middleware/get-payload.ts
@@ -1,18 +1,15 @@
+import { WebhookEvent } from "@octokit/webhooks-definitions/schema";
 // @ts-ignore to address #245
 import AggregateError from "aggregate-error";
-
 import { IncomingMessage } from "http";
-import { EventTypesPayload } from "../generated/get-webhook-payload-type-from-event";
 
 declare module "http" {
   interface IncomingMessage {
-    body?: EventTypesPayload;
+    body?: WebhookEvent;
   }
 }
 
-export function getPayload(
-  request: IncomingMessage
-): Promise<EventTypesPayload> {
+export function getPayload(request: IncomingMessage): Promise<WebhookEvent> {
   // If request.body already exists we can stop here
   // See https://github.com/octokit/webhooks.js/pull/23
 
diff --git a/src/middleware/middleware.ts b/src/middleware/middleware.ts
index 8da5936..b5b8f11 100644
--- a/src/middleware/middleware.ts
+++ b/src/middleware/middleware.ts
@@ -1,3 +1,4 @@
+import { EventPayloadMap } from "@octokit/webhooks-definitions/schema";
 import { isntWebhook } from "./isnt-webhook";
 import { getMissingHeaders } from "./get-missing-headers";
 import { getPayload } from "./get-payload";
@@ -5,7 +6,8 @@ import { verifyAndReceive } from "./verify-and-receive";
 import { debug } from "debug";
 import { IncomingMessage, ServerResponse } from "http";
 import { State, WebhookEventHandlerError } from "../types";
-import { WebhookEvents } from "../generated/get-webhook-payload-type-from-event";
+
+export type WebhookEventName = keyof EventPayloadMap;
 
 const debugWebhooks = debug("webhooks:receiver");
 
@@ -43,7 +45,7 @@ export function middleware(
     });
   }
 
-  const eventName = request.headers["x-github-event"] as WebhookEvents;
+  const eventName = request.headers["x-github-event"] as WebhookEventName;
   const signatureSHA1 = request.headers["x-hub-signature"] as string;
   const signatureSHA256 = request.headers["x-hub-signature-256"] as string;
   const id = request.headers["x-github-delivery"] as string;
@@ -60,11 +62,11 @@ export function middleware(
   }, 9000).unref();
 
   return getPayload(request)
-    .then((payload: any) => {
+    .then((payload) => {
       return verifyAndReceive(state, {
         id: id,
-        name: eventName,
-        payload,
+        name: eventName as any,
+        payload: payload as any,
         signature: signatureSHA256 || signatureSHA1,
       });
     })
diff --git a/src/middleware/verify-and-receive.ts b/src/middleware/verify-and-receive.ts
index 613b223..f795577 100644
--- a/src/middleware/verify-and-receive.ts
+++ b/src/middleware/verify-and-receive.ts
@@ -1,9 +1,12 @@
+import { EventPayloadMap } from "@octokit/webhooks-definitions/schema";
 import { verify } from "../verify/index";
-import { State, WebhookEvent } from "../types";
+import { State, EmitterWebhookEventMap } from "../types";
+
+export type WebhookEventName = keyof EventPayloadMap;
 
 export function verifyAndReceive(
   state: State,
-  event: WebhookEvent & { signature: string }
+  event: EmitterWebhookEventMap[WebhookEventName] & { signature: string }
 ): any {
   // verify will validate that the secret is not undefined
   const matchesSignature = verify(
diff --git a/src/types.ts b/src/types.ts
index 4e0266f..a5a2e7f 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -1,27 +1,58 @@
 import type { RequestError } from "@octokit/request-error";
-import {
-  WebhookEvents,
-  EventTypesPayload,
-} from "./generated/get-webhook-payload-type-from-event";
+import type { Schema } from "@octokit/webhooks-definitions/schema";
+import type { EmitterEventWebhookPayloadMap } from "./generated/get-webhook-payload-type-from-event";
 
-export interface WebhookEvent<T = any> {
+type EmitterEventPayloadMap = { "*": Schema } & EmitterEventWebhookPayloadMap;
+
+export type EmitterWebhookEventMap = {
+  [K in keyof EmitterEventPayloadMap]: BaseWebhookEvent<K>;
+};
+
+export type EmitterWebhookEventName = keyof EmitterWebhookEventMap;
+export type EmitterWebhookEvent = EmitterWebhookEventMap[EmitterWebhookEventName];
+
+/**
+ * A map of all possible emitter events to their event type.
+ * AKA "if the emitter emits x, the handler will be passed y"
+ */
+export type EmitterEventMap = EmitterWebhookEventMap & {
+  error: WebhookEventHandlerError;
+};
+export type EmitterEventName = keyof EmitterEventMap;
+export type EmitterEvent = EmitterEventMap[EmitterEventName];
+
+export type EmitterAnyEvent = EmitterWebhookEventMap["*"];
+
+interface BaseWebhookEvent<
+  TName extends keyof EmitterEventPayloadMap = keyof EmitterEventPayloadMap
+> {
   id: string;
-  name: WebhookEvents;
-  payload: T;
+  name: TName;
+  payload: EmitterEventPayloadMap[TName];
 }
 
-export interface Options<T extends WebhookEvent> {
+export interface Options<T extends EmitterWebhookEvent> {
   path?: string;
   secret?: string;
   transform?: TransformMethod<T>;
 }
 
-type TransformMethod<T extends WebhookEvent, V = T> = (
-  event: WebhookEvent
+type TransformMethod<T extends EmitterWebhookEvent, V = T> = (
+  event: EmitterWebhookEvent
 ) => V | PromiseLike<V>;
 
-export type HandlerFunction<E extends WebhookEvents, U> = (
-  event: EventTypesPayload[E] & U
+type EnsureArray<T> = T extends any[] ? T : [T];
+// type MaybeArray<T> = T | T[];
+
+export type HandlerFunction<
+  TName extends EmitterEventName | EmitterEventName[],
+  TTransformed
+> = (
+  event: EmitterEventMap[Extract<
+    EmitterEventName,
+    EnsureArray<TName>[number]
+  >] &
+    TTransformed
 ) => any;
 
 type Hooks = {
@@ -41,11 +72,12 @@ export type WebhookError = Error &
     /**
      * @deprecated `error.event` is deprecated. Use the `.event` property on the aggregated error instance
      */
-    event: WebhookEvent;
+    event: EmitterWebhookEvent;
   };
 
+// todo: rename to "EmitterErrorEvent"
 export interface WebhookEventHandlerError extends AggregateError<WebhookError> {
-  event: WebhookEvent;
+  event: EmitterWebhookEvent;
 
   /**
    * @deprecated `error.errors` is deprecated. Use `Array.from(error)`. See https://npm.im/aggregate-error
diff --git a/tsconfig.json b/tsconfig.json
index 7184fa1..cc4223d 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,4 +1,10 @@
 {
   "extends": "@octokit/tsconfig",
-  "include": ["src/**/*"]
+  "include": ["src/**/*"],
+  "ts-node": {
+    "compilerOptions": {
+      "module": "CommonJS",
+      "esModuleInterop": true
+    }
+  }
 }


Test patch:
diff --git a/test/fixtures/index.ts b/test/fixtures/index.ts
new file mode 100644
index 0000000..3246c27
--- /dev/null
+++ b/test/fixtures/index.ts
@@ -0,0 +1,16 @@
+import {
+  InstallationCreatedEvent,
+  InstallationDeletedEvent,
+  PushEvent,
+} from "@octokit/webhooks-definitions/schema";
+import pushEvent from "./push-payload.json";
+import installationCreatedEvent from "./installation-created-payload.json";
+import installationDeletedEvent from "./installation-deleted-payload.json";
+
+// we have to typecast all the json imports as they're not imported with const,
+// meaning TypeScript complains about enum values not being assignable to strings
+// @see https://github.com/microsoft/TypeScript/issues/32063
+
+export const pushEventPayload = pushEvent as PushEvent;
+export const installationCreatedPayload = installationCreatedEvent as InstallationCreatedEvent;
+export const installationDeletedPayload = installationDeletedEvent as InstallationDeletedEvent;
diff --git a/test/fixtures/push-payload.json b/test/fixtures/push-payload.json
index 10a08e8..2f9b5eb 100644
--- a/test/fixtures/push-payload.json
+++ b/test/fixtures/push-payload.json
@@ -53,13 +53,32 @@
   },
   "repository": {
     "id": 35129377,
+    "node_id": "MDEwOlJlcG9zaXRvcnkxODY4NTMwMDI=",
     "name": "public-repo",
     "full_name": "baxterthehacker/public-repo",
+    "private": false,
     "owner": {
       "name": "baxterthehacker",
-      "email": "baxterthehacker@users.noreply.github.com"
+      "email": "baxterthehacker@users.noreply.github.com",
+      "login": "baxterthehacker",
+      "id": 21031067,
+      "node_id": "MDQ6VXNlcjIxMDMxMDY3",
+      "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4",
+      "gravatar_id": "",
+      "url": "https://api.github.com/users/baxterthehacker",
+      "html_url": "https://github.com/baxterthehacker",
+      "followers_url": "https://api.github.com/users/baxterthehacker/followers",
+      "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
+      "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
+      "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
+      "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
+      "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
+      "repos_url": "https://api.github.com/users/baxterthehacker/repos",
+      "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
+      "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
+      "type": "User",
+      "site_admin": false
     },
-    "private": false,
     "html_url": "https://github.com/baxterthehacker/public-repo",
     "description": "",
     "fork": false,
@@ -99,6 +118,7 @@
     "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}",
     "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}",
     "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}",
+    "deployments_url": "https://api.github.com/repos/Codertocat/Hello-World/deployments",
     "created_at": 1430869212,
     "updated_at": "2015-05-05T23:40:12Z",
     "pushed_at": 1430869217,
@@ -112,12 +132,16 @@
     "watchers_count": 0,
     "language": null,
     "has_issues": true,
+    "has_projects": true,
     "has_downloads": true,
     "has_wiki": true,
     "has_pages": true,
     "forks_count": 0,
     "mirror_url": null,
+    "archived": false,
+    "disabled": false,
     "open_issues_count": 0,
+    "license": null,
     "forks": 0,
     "open_issues": 0,
     "watchers": 0,
@@ -132,6 +156,7 @@
   "sender": {
     "login": "baxterthehacker",
     "id": 6752317,
+    "node_id": "MDQ6VXNlcjIxMDMxMDY3",
     "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
     "gravatar_id": "",
     "url": "https://api.github.com/users/baxterthehacker",
diff --git a/test/integration/event-handler-test.ts b/test/integration/event-handler-test.ts
index 43084af..681f33d 100644
--- a/test/integration/event-handler-test.ts
+++ b/test/integration/event-handler-test.ts
@@ -1,7 +1,6 @@
 import { createEventHandler } from "../../src/event-handler";
-import pushEventPayload from "../fixtures/push-payload.json";
-import installationCreatedPayload from "../fixtures/installation-created-payload.json";
-import { WebhookEvent, WebhookEventHandlerError } from "../../src/types";
+import { EmitterWebhookEvent, WebhookEventHandlerError } from "../../src/types";
+import { installationCreatedPayload, pushEventPayload } from "../fixtures";
 
 test("events", (done) => {
   const eventHandler = createEventHandler({});
@@ -27,7 +26,7 @@ test("events", (done) => {
   function hook6() {
     hooksCalled.push("installation.created");
   }
-  function hook7(event: WebhookEvent) {
+  function hook7(event: EmitterWebhookEvent) {
     hooksCalled.push(`* (${event.name})`);
   }
 
@@ -41,6 +40,8 @@ test("events", (done) => {
 
   eventHandler.removeListener("push", hook3);
   eventHandler.removeListener(["push"], hook4);
+  // @ts-expect-error TS2345:
+  //  Argument of type '"unknown"' is not assignable to parameter of type ...
   eventHandler.removeListener("unknown", () => {});
 
   eventHandler
@@ -110,7 +111,7 @@ test("options.transform", (done) => {
     },
   });
 
-  eventHandler.on("push", (event: WebhookEvent) => {
+  eventHandler.on("push", (event: EmitterWebhookEvent) => {
     expect(event).toBe("funky");
 
     done();
@@ -130,7 +131,7 @@ test("async options.transform", (done) => {
     },
   });
 
-  eventHandler.on("push", (event: WebhookEvent) => {
+  eventHandler.on("push", (event: EmitterWebhookEvent) => {
     expect(event).toBe("funky");
     done();
   });
diff --git a/test/integration/server-test.ts b/test/integration/server-test.ts
index 0a9ca1e..2562bfc 100644
--- a/test/integration/server-test.ts
+++ b/test/integration/server-test.ts
@@ -4,11 +4,11 @@ import axios, { AxiosError, AxiosResponse } from "axios";
 import getPort from "get-port";
 import { promisify } from "util";
 import { Webhooks } from "../../src";
-import pushEventPayload from "../fixtures/push-payload.json";
+import { pushEventPayload } from "../fixtures";
 
-const signatureSha1 = "sha1=f4d795e69b5d03c139cc6ea991ad3e5762d13e2f";
+const signatureSha1 = "sha1=c171163ec36d7639f1aa9aa8cd0dc26102bfa3fc";
 const signatureSha256 =
-  "sha256=2b49327af77d51c4c23700118b11d15c81d90c3bd57dafbbe32eb50085ce67e0";
+  "sha256=7962cbf5a0aea311ea57976a0f379c40cbf917701c71ef906a4e7f05794ead44";
 
 describe("server-test", () => {
   let availablePort: number;
diff --git a/test/typescript-validate.ts b/test/typescript-validate.ts
index c829295..36c3f33 100644
--- a/test/typescript-validate.ts
+++ b/test/typescript-validate.ts
@@ -6,27 +6,70 @@ import {
   sign,
   verify,
   EventPayloads,
-  WebhookEvent,
+  EmitterWebhookEvent,
   WebhookError,
   WebhookEvents,
 } from "../src/index";
 import { createServer } from "http";
+import { HandlerFunction, EmitterWebhookEventName } from "../src/types";
 
 // ************************************************************
 // THIS CODE IS NOT EXECUTED. IT IS FOR TYPECHECKING ONLY
 // ************************************************************
 
-const myWebhook: WebhookEvent<{ foo: string }> = {
-  id: "123",
-  name: "check_run",
-  payload: {
-    foo: "bar",
-  },
+const fn = (webhookEvent: EmitterWebhookEvent) => {
+  if (webhookEvent.name === "*") {
+    if (
+      "action" in webhookEvent.payload &&
+      webhookEvent.payload.action === "completed"
+    ) {
+      console.log(webhookEvent.payload.sender);
+    }
+  }
+  if (webhookEvent.name === "check_run.completed") {
+    console.log(webhookEvent.payload.action);
+  }
+
+  if (webhookEvent.name === "*") {
+    // @ts-expect-error TS2339:
+    //  Property 'action' does not exist on type 'Schema'.
+    //    Property 'action' does not exist on type 'CreateEvent'.
+    console.log(webhookEvent.payload.action);
+  }
 };
 
+declare const on: <E extends EmitterWebhookEventName>(
+  name: E | E[],
+  callback: HandlerFunction<E, unknown>
+) => void;
+
+on(["check_run.completed", "code_scanning_alert.fixed"], (event) => {
+  if (event.payload.action === "fixed") {
+    console.log("an alert was fixed!");
+  }
+
+  if (event.payload.action === "completed") {
+    console.log("a run was completed!");
+  }
+});
+
+on("code_scanning_alert.fixed", (event) => {
+  if (event.payload.action === "fixed") {
+    console.log("an alert was fixed!");
+  }
+
+  // @ts-expect-error TS2367:
+  //  This condition will always return 'false' since the types '"fixed"' and '"completed"' have no overlap.
+  if (event.payload.action === "completed") {
+    console.log("a run was completed!");
+  }
+
+  fn(event);
+});
+
 const myEventName: WebhookEvents = "check_run.completed";
 
-const myEvenTPayload: EventPayloads.WebhookPayloadCheckRunCheckRunOutput = {
+const myEventPayload: EventPayloads.WebhookPayloadCheckRunCheckRunOutput = {
   annotations_count: 0,
   annotations_url: "",
   summary: "",
@@ -34,6 +77,8 @@ const myEvenTPayload: EventPayloads.WebhookPayloadCheckRunCheckRunOutput = {
   title: "",
 };
 
+console.log(myEventName, myEventPayload);
+
 export default async function () {
   // Check empty constructor
   new Webhooks();
@@ -44,7 +89,7 @@ export default async function () {
   });
 
   // Check all supported options
-  const webhooks = new Webhooks<WebhookEvent, { foo: string }>({
+  const webhooks = new Webhooks<EmitterWebhookEvent, { foo: string }>({
     secret: "bleh",
     path: "/webhooks",
     transform: (event) => {
@@ -74,13 +119,13 @@ export default async function () {
 
   // This is deprecated usage
   webhooks.on("*", ({ id, name, payload }) => {
-    console.log(name, "event received");
+    console.log(name, "event received", id);
     const sig = webhooks.sign(payload);
     webhooks.verify(payload, sig);
   });
 
   webhooks.onAny(({ id, name, payload }) => {
-    console.log(name, "event received");
+    console.log(name, "event received", id);
     const sig = webhooks.sign(payload);
     webhooks.verify(payload, sig);
   });
@@ -134,6 +179,13 @@ export default async function () {
     console.log(event.foo);
   });
 
+  // @ts-expect-error TS2345:
+  //  Argument of type '"does_not_exist"' is not assignable to parameter of type ...
+  webhooks.on("does_not_exist", (what) => {
+    // this works because we pass a transform that adds foo to all events
+    console.log(what.foo);
+  });
+
   // This is deprecated usage
   webhooks.on("error", (error) => {
     console.log(error.event.name);