@octokit/oauth-methods
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -12,3 +12,3 @@ 'use strict'; | ||
const VERSION = "1.2.1"; | ||
const VERSION = "1.2.2"; | ||
@@ -310,3 +310,3 @@ function _defineProperty(obj, key, value) { | ||
clientSecret, | ||
token: options.token | ||
token: response.data.token | ||
}; | ||
@@ -313,0 +313,0 @@ return _objectSpread2(_objectSpread2({}, response), {}, { |
@@ -18,5 +18,5 @@ import { request as defaultRequest } from "@octokit/request"; | ||
clientSecret, | ||
token: options.token, | ||
token: response.data.token, | ||
}; | ||
return { ...response, authentication }; | ||
} |
@@ -1,1 +0,1 @@ | ||
export const VERSION = "1.2.1"; | ||
export const VERSION = "1.2.2"; |
import { RequestInterface, Endpoints } from "@octokit/types"; | ||
import { GitHubAppAuthentication } from "./types"; | ||
declare type CommonOptions = { | ||
clientType: "github-app"; | ||
clientId: string; | ||
clientSecret: string; | ||
token: string; | ||
permissions?: Endpoint["parameters"]["permissions"]; | ||
request?: RequestInterface; | ||
}; | ||
declare type TargetOption = { | ||
target: string; | ||
} | { | ||
}; | ||
declare type TargetIdOption = { | ||
target_id: number; | ||
@@ -10,14 +19,8 @@ }; | ||
repositories?: string[]; | ||
} | { | ||
}; | ||
declare type RepositoryIdsOption = { | ||
repository_ids?: number[]; | ||
}; | ||
declare type Endpoint = Endpoints["POST /applications/{client_id}/token/scoped"]; | ||
export declare type ScopeTokenOptions = { | ||
clientType: "github-app"; | ||
clientId: string; | ||
clientSecret: string; | ||
token: string; | ||
permissions?: Endpoint["parameters"]["permissions"]; | ||
request?: RequestInterface; | ||
} & TargetOption & RepositoriesOption; | ||
export declare type ScopeTokenOptions = (CommonOptions & TargetOption & RepositoriesOption) | (CommonOptions & TargetIdOption & RepositoriesOption) | (CommonOptions & TargetOption & RepositoryIdsOption) | (CommonOptions & TargetIdOption & RepositoryIdsOption); | ||
export declare type ScopeTokenResponse = Endpoint["response"] & { | ||
@@ -24,0 +27,0 @@ authentication: GitHubAppAuthentication; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "1.2.1"; | ||
export declare const VERSION = "1.2.2"; |
{ | ||
"name": "@octokit/oauth-methods", | ||
"description": "Set of stateless request methods to create, check, reset, refresh, and delete user access tokens for OAuth and GitHub Apps", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "files": [ |
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
100330
906