@octokit/app
Advanced tools
Comparing version 10.1.2 to 10.2.0
@@ -190,5 +190,7 @@ 'use strict'; | ||
const VERSION = "10.1.2"; | ||
const VERSION = "10.2.0"; | ||
function webhooks(appOctokit, options) { | ||
function webhooks(appOctokit, options // Explict return type for better debugability and performance, | ||
// see https://github.com/octokit/app.js/pull/201 | ||
) { | ||
return new webhooks$1.Webhooks({ | ||
@@ -195,0 +197,0 @@ secret: options.secret, |
@@ -1,1 +0,1 @@ | ||
export const VERSION = "10.1.2"; | ||
export const VERSION = "10.2.0"; |
import { createAppAuth } from "@octokit/auth-app"; | ||
import { createUnauthenticatedAuth } from "@octokit/auth-unauthenticated"; | ||
import { Webhooks } from "@octokit/webhooks"; | ||
export function webhooks(appOctokit, options) { | ||
export function webhooks(appOctokit, options | ||
// Explict return type for better debugability and performance, | ||
// see https://github.com/octokit/app.js/pull/201 | ||
) { | ||
return new Webhooks({ | ||
@@ -6,0 +9,0 @@ secret: options.secret, |
@@ -12,2 +12,3 @@ import { Octokit } from "@octokit/core"; | ||
clientSecret: string; | ||
allowSignup?: boolean; | ||
}; | ||
@@ -14,0 +15,0 @@ Octokit?: typeof Octokit; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "10.1.2"; | ||
export declare const VERSION = "10.2.0"; |
{ | ||
"name": "@octokit/app", | ||
"description": "GitHub Apps toolset for Node.js", | ||
"version": "10.1.2", | ||
"version": "10.2.0", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "files": [ |
@@ -240,14 +240,2 @@ # app.js | ||
</tr> | ||
<tr> | ||
<th> | ||
<code>oauth.defaultScopes</code> | ||
</th> | ||
<th> | ||
<code>Array of strings</code> | ||
</th> | ||
<td> | ||
Sets the default <code>scopes</code> value for <code>app.oauth.getAuthorizationUrl(options)</code>. See [available scopes](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/#available-scopes) | ||
</td></tr> | ||
</tbody> | ||
@@ -307,12 +295,12 @@ </table> | ||
| Route | Route Description | | ||
| -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `POST /api/github/webhooks` | Endpoint to receive GitHub Webhook Event requests | | ||
| `GET /api/github/oauth/login` | Redirects to GitHub's authorization endpoint. Accepts optional `?state` and `?scopes` query parameters. `?scopes` is a comma-separated list of [supported OAuth scope names](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/#available-scopes) | | ||
| `GET /api/github/oauth/callback` | The client's redirect endpoint. This is where the `token` event gets triggered | | ||
| `POST /api/github/oauth/token` | Exchange an authorization code for an OAuth Access token. If successful, the `token` event gets triggered. | | ||
| `GET /api/github/oauth/token` | Check if token is valid. Must authenticate using token in `Authorization` header. Uses GitHub's [`POST /applications/{client_id}/token`](https://developer.github.com/v3/apps/oauth_applications/#check-a-token) endpoint | | ||
| `PATCH /api/github/oauth/token` | Resets a token (invalidates current one, returns new token). Must authenticate using token in `Authorization` header. Uses GitHub's [`PATCH /applications/{client_id}/token`](https://developer.github.com/v3/apps/oauth_applications/#reset-a-token) endpoint. | | ||
| `DELETE /api/github/oauth/token` | Invalidates current token, basically the equivalent of a logout. Must authenticate using token in `Authorization` header. | | ||
| `DELETE /api/github/oauth/grant` | Revokes the user's grant, basically the equivalent of an uninstall. must authenticate using token in `Authorization` header. | | ||
| Route | Route Description | | ||
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `POST /api/github/webhooks` | Endpoint to receive GitHub Webhook Event requests | | ||
| `GET /api/github/oauth/login` | Redirects to GitHub's authorization endpoint. Accepts optional `?state` query parameter. | | ||
| `GET /api/github/oauth/callback` | The client's redirect endpoint. This is where the `token` event gets triggered | | ||
| `POST /api/github/oauth/token` | Exchange an authorization code for an OAuth Access token. If successful, the `token` event gets triggered. | | ||
| `GET /api/github/oauth/token` | Check if token is valid. Must authenticate using token in `Authorization` header. Uses GitHub's [`POST /applications/{client_id}/token`](https://developer.github.com/v3/apps/oauth_applications/#check-a-token) endpoint | | ||
| `PATCH /api/github/oauth/token` | Resets a token (invalidates current one, returns new token). Must authenticate using token in `Authorization` header. Uses GitHub's [`PATCH /applications/{client_id}/token`](https://developer.github.com/v3/apps/oauth_applications/#reset-a-token) endpoint. | | ||
| `DELETE /api/github/oauth/token` | Invalidates current token, basically the equivalent of a logout. Must authenticate using token in `Authorization` header. | | ||
| `DELETE /api/github/oauth/grant` | Revokes the user's grant, basically the equivalent of an uninstall. must authenticate using token in `Authorization` header. | | ||
@@ -319,0 +307,0 @@ ### `getNodeMiddleware(app, options)` |
Sorry, the diff of this file is not supported yet
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
1024
65734
403