-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathtypes.ts
41 lines (38 loc) · 1.07 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import type * as OctokitTypes from "@octokit/types";
export type AnyResponse = OctokitTypes.OctokitResponse<any>;
export type StrategyInterface = OctokitTypes.StrategyInterface<
[Token],
[],
Authentication
>;
export type EndpointDefaults = OctokitTypes.EndpointDefaults;
export type EndpointOptions = OctokitTypes.EndpointOptions;
export type RequestParameters = OctokitTypes.RequestParameters;
export type RequestInterface = OctokitTypes.RequestInterface;
export type Route = OctokitTypes.Route;
export type Token = string;
export type OAuthTokenAuthentication = {
type: "token";
tokenType: "oauth";
token: Token;
};
export type InstallationTokenAuthentication = {
type: "token";
tokenType: "installation";
token: Token;
};
export type AppAuthentication = {
type: "token";
tokenType: "app";
token: Token;
};
export type UserToServerAuthentication = {
type: "token";
tokenType: "user-to-server";
token: Token;
};
export type Authentication =
| OAuthTokenAuthentication
| InstallationTokenAuthentication
| AppAuthentication
| UserToServerAuthentication;