@octokit/webhooks-definitions
Advanced tools
Comparing version 3.34.3 to 3.35.0
{ | ||
"name": "@octokit/webhooks-definitions", | ||
"version": "3.34.3", | ||
"version": "3.35.0", | ||
"description": "machine-readable, always up-to-date GitHub Webhooks specifications", | ||
@@ -13,2 +13,3 @@ "keywords": [], | ||
"index.json", | ||
"schema.d.ts", | ||
"schema.json" | ||
@@ -18,3 +19,5 @@ ], | ||
"build": "ts-node -T bin/octokit-webhooks.ts check --cached", | ||
"build:all": "npm run -s build:webhooks && npm run -s build:schema && npm run -s build:types", | ||
"build:schema": "ts-node -T bin/octokit-schema.ts", | ||
"build:types": "ts-node -T bin/octokit-types.ts", | ||
"build:webhooks": "ts-node -T bin/octokit-webhooks.ts update", | ||
@@ -38,2 +41,3 @@ "lint": "prettier --check '{bin,lib}/*.ts' '*.{ts,md}' '{payload-examples,payload-schemas}/**/*.json' 'payload-schemas/*.ts' *.md package.json index.json", | ||
"@types/json-schema": "^7.0.6", | ||
"@types/lodash": "^4.14.167", | ||
"@types/node": "^14.14.20", | ||
@@ -46,2 +50,3 @@ "@types/prettier": "^2.1.6", | ||
"json-diff": "^0.5.3", | ||
"json-schema-to-typescript": "^10.1.2", | ||
"prettier": "^2.0.5", | ||
@@ -48,0 +53,0 @@ "semantic-release": "^17.0.0", |
@@ -257,2 +257,16 @@ # Octokit Webhooks | ||
## Importing types | ||
This package ships with types for the webhook events generated from the respective json schemas, which you can use like so: | ||
```typescript | ||
import { IssuesOpenedEvent } from "@octokit/webhooks-definitions/schema"; | ||
const handleIssuesOpenedEvent = (event: IssuesOpenedEvent) => { | ||
console.log( | ||
`${event.sender.login} opened "${event.issue.title}" on ${event.repository.full_name}` | ||
); | ||
}; | ||
``` | ||
## How it works | ||
@@ -259,0 +273,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3963229
7
81125
289
20