initial commit of actions
This commit is contained in:
commit
949ece5785
44660 changed files with 12034344 additions and 0 deletions
7
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/LICENSE
generated
vendored
Normal file
7
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
MIT License Copyright (c) 2019 Octokit contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
76
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/README.md
generated
vendored
Normal file
76
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
# plugin-rest-endpoint-methods.js
|
||||
|
||||
> Octokit plugin adding one method for all of api.github.com REST API endpoints
|
||||
|
||||
[](https://www.npmjs.com/package/@octokit/plugin-rest-endpoint-methods)
|
||||
[](https://github.com/octokit/plugin-rest-endpoint-methods.js/actions?workflow=Test)
|
||||
|
||||
## Usage
|
||||
|
||||
<table>
|
||||
<tbody valign=top align=left>
|
||||
<tr><th>
|
||||
Browsers
|
||||
</th><td width=100%>
|
||||
|
||||
Load `@octokit/plugin-rest-endpoint-methods` and [`@octokit/core`](https://github.com/octokit/core.js) (or core-compatible module) directly from [cdn.skypack.dev](https://cdn.skypack.dev)
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import { Octokit } from "https://cdn.skypack.dev/@octokit/core";
|
||||
import { restEndpointMethods } from "https://cdn.skypack.dev/@octokit/plugin-rest-endpoint-methods";
|
||||
</script>
|
||||
```
|
||||
|
||||
</td></tr>
|
||||
<tr><th>
|
||||
Node
|
||||
</th><td>
|
||||
|
||||
Install with `npm install @octokit/core @octokit/plugin-rest-endpoint-methods`. Optionally replace `@octokit/core` with a compatible module
|
||||
|
||||
```js
|
||||
const { Octokit } = require("@octokit/core");
|
||||
const {
|
||||
restEndpointMethods,
|
||||
} = require("@octokit/plugin-rest-endpoint-methods");
|
||||
```
|
||||
|
||||
</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
```js
|
||||
const MyOctokit = Octokit.plugin(restEndpointMethods);
|
||||
const octokit = new MyOctokit({ auth: "secret123" });
|
||||
|
||||
// https://developer.github.com/v3/users/#get-the-authenticated-user
|
||||
octokit.rest.users.getAuthenticated();
|
||||
```
|
||||
|
||||
There is one method for each REST API endpoint documented at [https://developer.github.com/v3](https://developer.github.com/v3). All endpoint methods are documented in the [docs/](docs/) folder, e.g. [docs/users/getAuthenticated.md](docs/users/getAuthenticated.md)
|
||||
|
||||
## TypeScript
|
||||
|
||||
Parameter and response types for all endpoint methods exported as `{ RestEndpointMethodTypes }`.
|
||||
|
||||
Example
|
||||
|
||||
```ts
|
||||
import { RestEndpointMethodTypes } from "@octokit/plugin-rest-endpoint-methods";
|
||||
|
||||
type UpdateLabelParameters =
|
||||
RestEndpointMethodTypes["issues"]["updateLabel"]["parameters"];
|
||||
type UpdateLabelResponse =
|
||||
RestEndpointMethodTypes["issues"]["updateLabel"]["response"];
|
||||
```
|
||||
|
||||
In order to get types beyond parameters and responses, check out [`@octokit/openapi-types`](https://github.com/octokit/openapi-types.ts/#readme), which is a direct transpilation from GitHub's official OpenAPI specification.
|
||||
|
||||
## Contributing
|
||||
|
||||
See [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE)
|
||||
1107
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js
generated
vendored
Normal file
1107
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js.map
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
60
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js
generated
vendored
Normal file
60
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js
generated
vendored
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
export function endpointsToMethods(octokit, endpointsMap) {
|
||||
const newMethods = {};
|
||||
for (const [scope, endpoints] of Object.entries(endpointsMap)) {
|
||||
for (const [methodName, endpoint] of Object.entries(endpoints)) {
|
||||
const [route, defaults, decorations] = endpoint;
|
||||
const [method, url] = route.split(/ /);
|
||||
const endpointDefaults = Object.assign({ method, url }, defaults);
|
||||
if (!newMethods[scope]) {
|
||||
newMethods[scope] = {};
|
||||
}
|
||||
const scopeMethods = newMethods[scope];
|
||||
if (decorations) {
|
||||
scopeMethods[methodName] = decorate(octokit, scope, methodName, endpointDefaults, decorations);
|
||||
continue;
|
||||
}
|
||||
scopeMethods[methodName] = octokit.request.defaults(endpointDefaults);
|
||||
}
|
||||
}
|
||||
return newMethods;
|
||||
}
|
||||
function decorate(octokit, scope, methodName, defaults, decorations) {
|
||||
const requestWithDefaults = octokit.request.defaults(defaults);
|
||||
/* istanbul ignore next */
|
||||
function withDecorations(...args) {
|
||||
// @ts-ignore https://github.com/microsoft/TypeScript/issues/25488
|
||||
let options = requestWithDefaults.endpoint.merge(...args);
|
||||
// There are currently no other decorations than `.mapToData`
|
||||
if (decorations.mapToData) {
|
||||
options = Object.assign({}, options, {
|
||||
data: options[decorations.mapToData],
|
||||
[decorations.mapToData]: undefined,
|
||||
});
|
||||
return requestWithDefaults(options);
|
||||
}
|
||||
if (decorations.renamed) {
|
||||
const [newScope, newMethodName] = decorations.renamed;
|
||||
octokit.log.warn(`octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`);
|
||||
}
|
||||
if (decorations.deprecated) {
|
||||
octokit.log.warn(decorations.deprecated);
|
||||
}
|
||||
if (decorations.renamedParameters) {
|
||||
// @ts-ignore https://github.com/microsoft/TypeScript/issues/25488
|
||||
const options = requestWithDefaults.endpoint.merge(...args);
|
||||
for (const [name, alias] of Object.entries(decorations.renamedParameters)) {
|
||||
if (name in options) {
|
||||
octokit.log.warn(`"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead`);
|
||||
if (!(alias in options)) {
|
||||
options[alias] = options[name];
|
||||
}
|
||||
delete options[name];
|
||||
}
|
||||
}
|
||||
return requestWithDefaults(options);
|
||||
}
|
||||
// @ts-ignore https://github.com/microsoft/TypeScript/issues/25488
|
||||
return requestWithDefaults(...args);
|
||||
}
|
||||
return Object.assign(withDecorations, requestWithDefaults);
|
||||
}
|
||||
1664
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js
generated
vendored
Normal file
1664
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/method-types.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/method-types.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/parameters-and-response-types.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/parameters-and-response-types.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
18
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js
generated
vendored
Normal file
18
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import ENDPOINTS from "./generated/endpoints";
|
||||
import { VERSION } from "./version";
|
||||
import { endpointsToMethods } from "./endpoints-to-methods";
|
||||
export function restEndpointMethods(octokit) {
|
||||
const api = endpointsToMethods(octokit, ENDPOINTS);
|
||||
return {
|
||||
rest: api,
|
||||
};
|
||||
}
|
||||
restEndpointMethods.VERSION = VERSION;
|
||||
export function legacyRestEndpointMethods(octokit) {
|
||||
const api = endpointsToMethods(octokit, ENDPOINTS);
|
||||
return {
|
||||
...api,
|
||||
rest: api,
|
||||
};
|
||||
}
|
||||
legacyRestEndpointMethods.VERSION = VERSION;
|
||||
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/types.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/types.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export const VERSION = "5.16.2";
|
||||
4
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/endpoints-to-methods.d.ts
generated
vendored
Normal file
4
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/endpoints-to-methods.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import { Octokit } from "@octokit/core";
|
||||
import { EndpointsDefaultsAndDecorations } from "./types";
|
||||
import { RestEndpointMethods } from "./generated/method-types";
|
||||
export declare function endpointsToMethods(octokit: Octokit, endpointsMap: EndpointsDefaultsAndDecorations): RestEndpointMethods;
|
||||
3
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/endpoints.d.ts
generated
vendored
Normal file
3
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/endpoints.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import { EndpointsDefaultsAndDecorations } from "../types";
|
||||
declare const Endpoints: EndpointsDefaultsAndDecorations;
|
||||
export default Endpoints;
|
||||
9945
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/method-types.d.ts
generated
vendored
Normal file
9945
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/method-types.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
3211
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts
generated
vendored
Normal file
3211
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
11
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/index.d.ts
generated
vendored
Normal file
11
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { Octokit } from "@octokit/core";
|
||||
export { RestEndpointMethodTypes } from "./generated/parameters-and-response-types";
|
||||
import { Api } from "./types";
|
||||
export declare function restEndpointMethods(octokit: Octokit): Api;
|
||||
export declare namespace restEndpointMethods {
|
||||
var VERSION: string;
|
||||
}
|
||||
export declare function legacyRestEndpointMethods(octokit: Octokit): Api["rest"] & Api;
|
||||
export declare namespace legacyRestEndpointMethods {
|
||||
var VERSION: string;
|
||||
}
|
||||
18
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/types.d.ts
generated
vendored
Normal file
18
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/types.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { Route, RequestParameters } from "@octokit/types";
|
||||
import { RestEndpointMethods } from "./generated/method-types";
|
||||
export declare type Api = {
|
||||
rest: RestEndpointMethods;
|
||||
};
|
||||
export declare type EndpointDecorations = {
|
||||
mapToData?: string;
|
||||
deprecated?: string;
|
||||
renamed?: [string, string];
|
||||
renamedParameters?: {
|
||||
[name: string]: string;
|
||||
};
|
||||
};
|
||||
export declare type EndpointsDefaultsAndDecorations = {
|
||||
[scope: string]: {
|
||||
[methodName: string]: [Route, RequestParameters?, EndpointDecorations?];
|
||||
};
|
||||
};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/version.d.ts
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/version.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export declare const VERSION = "5.16.2";
|
||||
1745
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-web/index.js
generated
vendored
Normal file
1745
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-web/index.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-web/index.js.map
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/dist-web/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
7
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types/LICENSE
generated
vendored
Normal file
7
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
Copyright 2020 Gregor Martynus
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
17
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types/README.md
generated
vendored
Normal file
17
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# @octokit/openapi-types
|
||||
|
||||
> Generated TypeScript definitions based on GitHub's OpenAPI spec
|
||||
|
||||
This package is continously updated based on [GitHub's OpenAPI specification](https://github.com/github/rest-api-description/)
|
||||
|
||||
## Usage
|
||||
|
||||
```ts
|
||||
import { components } from "@octokit/openapi-types";
|
||||
|
||||
type Repository = components["schemas"]["full-repository"];
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE)
|
||||
20
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types/package.json
generated
vendored
Normal file
20
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"name": "@octokit/openapi-types",
|
||||
"description": "Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/octokit/openapi-types.ts.git",
|
||||
"directory": "packages/openapi-types"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"version": "12.11.0",
|
||||
"main": "",
|
||||
"types": "types.d.ts",
|
||||
"author": "Gregor Martynus (https://twitter.com/gr2m)",
|
||||
"license": "MIT",
|
||||
"octokit": {
|
||||
"openapi-version": "6.8.0"
|
||||
}
|
||||
}
|
||||
47095
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types/types.d.ts
generated
vendored
Normal file
47095
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types/types.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
7
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/LICENSE
generated
vendored
Normal file
7
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
MIT License Copyright (c) 2019 Octokit contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
65
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/README.md
generated
vendored
Normal file
65
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
# types.ts
|
||||
|
||||
> Shared TypeScript definitions for Octokit projects
|
||||
|
||||
[](https://www.npmjs.com/package/@octokit/types)
|
||||
[](https://github.com/octokit/types.ts/actions?workflow=Test)
|
||||
|
||||
<!-- toc -->
|
||||
|
||||
- [Usage](#usage)
|
||||
- [Examples](#examples)
|
||||
- [Get parameter and response data types for a REST API endpoint](#get-parameter-and-response-data-types-for-a-rest-api-endpoint)
|
||||
- [Get response types from endpoint methods](#get-response-types-from-endpoint-methods)
|
||||
- [Contributing](#contributing)
|
||||
- [License](#license)
|
||||
|
||||
<!-- tocstop -->
|
||||
|
||||
## Usage
|
||||
|
||||
See all exported types at https://octokit.github.io/types.ts
|
||||
|
||||
## Examples
|
||||
|
||||
### Get parameter and response data types for a REST API endpoint
|
||||
|
||||
```ts
|
||||
import { Endpoints } from "@octokit/types";
|
||||
|
||||
type listUserReposParameters =
|
||||
Endpoints["GET /repos/{owner}/{repo}"]["parameters"];
|
||||
type listUserReposResponse = Endpoints["GET /repos/{owner}/{repo}"]["response"];
|
||||
|
||||
async function listRepos(
|
||||
options: listUserReposParameters
|
||||
): listUserReposResponse["data"] {
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
### Get response types from endpoint methods
|
||||
|
||||
```ts
|
||||
import {
|
||||
GetResponseTypeFromEndpointMethod,
|
||||
GetResponseDataTypeFromEndpointMethod,
|
||||
} from "@octokit/types";
|
||||
import { Octokit } from "@octokit/rest";
|
||||
|
||||
const octokit = new Octokit();
|
||||
type CreateLabelResponseType = GetResponseTypeFromEndpointMethod<
|
||||
typeof octokit.issues.createLabel
|
||||
>;
|
||||
type CreateLabelResponseDataType = GetResponseDataTypeFromEndpointMethod<
|
||||
typeof octokit.issues.createLabel
|
||||
>;
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
See [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE)
|
||||
8
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-node/index.js
generated
vendored
Normal file
8
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-node/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
const VERSION = "6.41.0";
|
||||
|
||||
exports.VERSION = VERSION;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-node/index.js.map
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-node/index.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":["VERSION"],"mappings":";;;;MAAaA,OAAO,GAAG;;;;"}
|
||||
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/AuthInterface.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/AuthInterface.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/EndpointDefaults.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/EndpointDefaults.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/EndpointInterface.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/EndpointInterface.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/EndpointOptions.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/EndpointOptions.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/Fetch.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/Fetch.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/OctokitResponse.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/OctokitResponse.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/RequestError.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/RequestError.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/RequestHeaders.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/RequestHeaders.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/RequestInterface.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/RequestInterface.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/RequestMethod.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/RequestMethod.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/RequestOptions.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/RequestOptions.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/RequestParameters.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/RequestParameters.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/ResponseHeaders.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/ResponseHeaders.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/Route.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/Route.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/Signal.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/Signal.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/StrategyInterface.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/StrategyInterface.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/Url.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/Url.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/VERSION.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/VERSION.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export const VERSION = "6.41.0";
|
||||
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
21
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/index.js
generated
vendored
Normal file
21
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-src/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
export * from "./AuthInterface";
|
||||
export * from "./EndpointDefaults";
|
||||
export * from "./EndpointInterface";
|
||||
export * from "./EndpointOptions";
|
||||
export * from "./Fetch";
|
||||
export * from "./OctokitResponse";
|
||||
export * from "./RequestError";
|
||||
export * from "./RequestHeaders";
|
||||
export * from "./RequestInterface";
|
||||
export * from "./RequestMethod";
|
||||
export * from "./RequestOptions";
|
||||
export * from "./RequestParameters";
|
||||
export * from "./RequestRequestOptions";
|
||||
export * from "./ResponseHeaders";
|
||||
export * from "./Route";
|
||||
export * from "./Signal";
|
||||
export * from "./StrategyInterface";
|
||||
export * from "./Url";
|
||||
export * from "./VERSION";
|
||||
export * from "./GetResponseTypeFromEndpointMethod";
|
||||
export * from "./generated/Endpoints";
|
||||
31
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/AuthInterface.d.ts
generated
vendored
Normal file
31
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/AuthInterface.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import { EndpointOptions } from "./EndpointOptions";
|
||||
import { OctokitResponse } from "./OctokitResponse";
|
||||
import { RequestInterface } from "./RequestInterface";
|
||||
import { RequestParameters } from "./RequestParameters";
|
||||
import { Route } from "./Route";
|
||||
/**
|
||||
* Interface to implement complex authentication strategies for Octokit.
|
||||
* An object Implementing the AuthInterface can directly be passed as the
|
||||
* `auth` option in the Octokit constructor.
|
||||
*
|
||||
* For the official implementations of the most common authentication
|
||||
* strategies, see https://github.com/octokit/auth.js
|
||||
*/
|
||||
export interface AuthInterface<AuthOptions extends any[], Authentication extends any> {
|
||||
(...args: AuthOptions): Promise<Authentication>;
|
||||
hook: {
|
||||
/**
|
||||
* Sends a request using the passed `request` instance
|
||||
*
|
||||
* @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<T = any>(request: RequestInterface, options: EndpointOptions): Promise<OctokitResponse<T>>;
|
||||
/**
|
||||
* Sends a request using the passed `request` instance
|
||||
*
|
||||
* @param {string} route Request method + URL. Example: `'GET /orgs/{org}'`
|
||||
* @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<T = any>(request: RequestInterface, route: Route, parameters?: RequestParameters): Promise<OctokitResponse<T>>;
|
||||
};
|
||||
}
|
||||
21
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts
generated
vendored
Normal file
21
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import { RequestHeaders } from "./RequestHeaders";
|
||||
import { RequestMethod } from "./RequestMethod";
|
||||
import { RequestParameters } from "./RequestParameters";
|
||||
import { Url } from "./Url";
|
||||
/**
|
||||
* The `.endpoint()` method is guaranteed to set all keys defined by RequestParameters
|
||||
* as well as the method property.
|
||||
*/
|
||||
export declare type EndpointDefaults = RequestParameters & {
|
||||
baseUrl: Url;
|
||||
method: RequestMethod;
|
||||
url?: Url;
|
||||
headers: RequestHeaders & {
|
||||
accept: string;
|
||||
"user-agent": string;
|
||||
};
|
||||
mediaType: {
|
||||
format: string;
|
||||
previews: string[];
|
||||
};
|
||||
};
|
||||
65
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts
generated
vendored
Normal file
65
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
import { EndpointDefaults } from "./EndpointDefaults";
|
||||
import { RequestOptions } from "./RequestOptions";
|
||||
import { RequestParameters } from "./RequestParameters";
|
||||
import { Route } from "./Route";
|
||||
import { Endpoints } from "./generated/Endpoints";
|
||||
export interface EndpointInterface<D extends object = object> {
|
||||
/**
|
||||
* Transforms a GitHub REST API endpoint into generic request options
|
||||
*
|
||||
* @param {object} endpoint Must set `url` unless it's set defaults. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<O extends RequestParameters = RequestParameters>(options: O & {
|
||||
method?: string;
|
||||
} & ("url" extends keyof D ? {
|
||||
url?: string;
|
||||
} : {
|
||||
url: string;
|
||||
})): RequestOptions & Pick<D & O, keyof RequestOptions>;
|
||||
/**
|
||||
* Transforms a GitHub REST API endpoint into generic request options
|
||||
*
|
||||
* @param {string} route Request method + URL. Example: `'GET /orgs/{org}'`
|
||||
* @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<R extends Route, P extends RequestParameters = R extends keyof Endpoints ? Endpoints[R]["parameters"] & RequestParameters : RequestParameters>(route: keyof Endpoints | R, parameters?: P): (R extends keyof Endpoints ? Endpoints[R]["request"] : RequestOptions) & Pick<P, keyof RequestOptions>;
|
||||
/**
|
||||
* Object with current default route and parameters
|
||||
*/
|
||||
DEFAULTS: D & EndpointDefaults;
|
||||
/**
|
||||
* Returns a new `endpoint` interface with new defaults
|
||||
*/
|
||||
defaults: <O extends RequestParameters = RequestParameters>(newDefaults: O) => EndpointInterface<D & O>;
|
||||
merge: {
|
||||
/**
|
||||
* Merges current endpoint defaults with passed route and parameters,
|
||||
* without transforming them into request options.
|
||||
*
|
||||
* @param {string} route Request method + URL. Example: `'GET /orgs/{org}'`
|
||||
* @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*
|
||||
*/
|
||||
<R extends Route, P extends RequestParameters = R extends keyof Endpoints ? Endpoints[R]["parameters"] & RequestParameters : RequestParameters>(route: keyof Endpoints | R, parameters?: P): D & (R extends keyof Endpoints ? Endpoints[R]["request"] & Endpoints[R]["parameters"] : EndpointDefaults) & P;
|
||||
/**
|
||||
* Merges current endpoint defaults with passed route and parameters,
|
||||
* without transforming them into request options.
|
||||
*
|
||||
* @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<P extends RequestParameters = RequestParameters>(options: P): EndpointDefaults & D & P;
|
||||
/**
|
||||
* Returns current default options.
|
||||
*
|
||||
* @deprecated use endpoint.DEFAULTS instead
|
||||
*/
|
||||
(): D & EndpointDefaults;
|
||||
};
|
||||
/**
|
||||
* Stateless method to turn endpoint options into request options.
|
||||
* Calling `endpoint(options)` is the same as calling `endpoint.parse(endpoint.merge(options))`.
|
||||
*
|
||||
* @param {object} options `method`, `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
parse: <O extends EndpointDefaults = EndpointDefaults>(options: O) => RequestOptions & Pick<O, keyof RequestOptions>;
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
import { RequestMethod } from "./RequestMethod";
|
||||
import { Url } from "./Url";
|
||||
import { RequestParameters } from "./RequestParameters";
|
||||
export declare type EndpointOptions = RequestParameters & {
|
||||
method: RequestMethod;
|
||||
url: Url;
|
||||
};
|
||||
4
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/Fetch.d.ts
generated
vendored
Normal file
4
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/Fetch.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
/**
|
||||
* Browser's fetch method (or compatible such as fetch-mock)
|
||||
*/
|
||||
export declare type Fetch = any;
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
declare type Unwrap<T> = T extends Promise<infer U> ? U : T;
|
||||
declare type AnyFunction = (...args: any[]) => any;
|
||||
export declare type GetResponseTypeFromEndpointMethod<T extends AnyFunction> = Unwrap<ReturnType<T>>;
|
||||
export declare type GetResponseDataTypeFromEndpointMethod<T extends AnyFunction> = Unwrap<ReturnType<T>>["data"];
|
||||
export {};
|
||||
17
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts
generated
vendored
Normal file
17
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import { ResponseHeaders } from "./ResponseHeaders";
|
||||
import { Url } from "./Url";
|
||||
export declare type OctokitResponse<T, S extends number = number> = {
|
||||
headers: ResponseHeaders;
|
||||
/**
|
||||
* http response code
|
||||
*/
|
||||
status: S;
|
||||
/**
|
||||
* URL of response after all redirects
|
||||
*/
|
||||
url: Url;
|
||||
/**
|
||||
* Response data as documented in the REST API reference documentation at https://docs.github.com/rest/reference
|
||||
*/
|
||||
data: T;
|
||||
};
|
||||
11
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/RequestError.d.ts
generated
vendored
Normal file
11
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/RequestError.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
export declare type RequestError = {
|
||||
name: string;
|
||||
status: number;
|
||||
documentation_url: string;
|
||||
errors?: Array<{
|
||||
resource: string;
|
||||
code: string;
|
||||
field: string;
|
||||
message?: string;
|
||||
}>;
|
||||
};
|
||||
15
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts
generated
vendored
Normal file
15
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
export declare type RequestHeaders = {
|
||||
/**
|
||||
* Avoid setting `headers.accept`, use `mediaType.{format|previews}` option instead.
|
||||
*/
|
||||
accept?: string;
|
||||
/**
|
||||
* Use `authorization` to send authenticated request, remember `token ` / `bearer ` prefixes. Example: `token 1234567890abcdef1234567890abcdef12345678`
|
||||
*/
|
||||
authorization?: string;
|
||||
/**
|
||||
* `user-agent` is set do a default and can be overwritten as needed.
|
||||
*/
|
||||
"user-agent"?: string;
|
||||
[header: string]: string | number | undefined;
|
||||
};
|
||||
34
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/RequestInterface.d.ts
generated
vendored
Normal file
34
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/RequestInterface.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
import { EndpointInterface } from "./EndpointInterface";
|
||||
import { OctokitResponse } from "./OctokitResponse";
|
||||
import { RequestParameters } from "./RequestParameters";
|
||||
import { Route } from "./Route";
|
||||
import { Endpoints } from "./generated/Endpoints";
|
||||
export interface RequestInterface<D extends object = object> {
|
||||
/**
|
||||
* Sends a request based on endpoint options
|
||||
*
|
||||
* @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<T = any, O extends RequestParameters = RequestParameters>(options: O & {
|
||||
method?: string;
|
||||
} & ("url" extends keyof D ? {
|
||||
url?: string;
|
||||
} : {
|
||||
url: string;
|
||||
})): Promise<OctokitResponse<T>>;
|
||||
/**
|
||||
* Sends a request based on endpoint options
|
||||
*
|
||||
* @param {string} route Request method + URL. Example: `'GET /orgs/{org}'`
|
||||
* @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<R extends Route>(route: keyof Endpoints | R, options?: R extends keyof Endpoints ? Endpoints[R]["parameters"] & RequestParameters : RequestParameters): R extends keyof Endpoints ? Promise<Endpoints[R]["response"]> : Promise<OctokitResponse<any>>;
|
||||
/**
|
||||
* Returns a new `request` with updated route and parameters
|
||||
*/
|
||||
defaults: <O extends RequestParameters = RequestParameters>(newDefaults: O) => RequestInterface<D & O>;
|
||||
/**
|
||||
* Octokit endpoint API, see {@link https://github.com/octokit/endpoint.js|@octokit/endpoint}
|
||||
*/
|
||||
endpoint: EndpointInterface<D>;
|
||||
}
|
||||
4
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/RequestMethod.d.ts
generated
vendored
Normal file
4
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/RequestMethod.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
/**
|
||||
* HTTP Verb supported by GitHub's REST API
|
||||
*/
|
||||
export declare type RequestMethod = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT";
|
||||
14
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/RequestOptions.d.ts
generated
vendored
Normal file
14
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/RequestOptions.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { RequestHeaders } from "./RequestHeaders";
|
||||
import { RequestMethod } from "./RequestMethod";
|
||||
import { RequestRequestOptions } from "./RequestRequestOptions";
|
||||
import { Url } from "./Url";
|
||||
/**
|
||||
* Generic request options as they are returned by the `endpoint()` method
|
||||
*/
|
||||
export declare type RequestOptions = {
|
||||
method: RequestMethod;
|
||||
url: Url;
|
||||
headers: RequestHeaders;
|
||||
body?: any;
|
||||
request?: RequestRequestOptions;
|
||||
};
|
||||
45
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/RequestParameters.d.ts
generated
vendored
Normal file
45
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/RequestParameters.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
import { RequestRequestOptions } from "./RequestRequestOptions";
|
||||
import { RequestHeaders } from "./RequestHeaders";
|
||||
import { Url } from "./Url";
|
||||
/**
|
||||
* Parameters that can be passed into `request(route, parameters)` or `endpoint(route, parameters)` methods
|
||||
*/
|
||||
export declare type RequestParameters = {
|
||||
/**
|
||||
* Base URL to be used when a relative URL is passed, such as `/orgs/{org}`.
|
||||
* If `baseUrl` is `https://enterprise.acme-inc.com/api/v3`, then the request
|
||||
* will be sent to `https://enterprise.acme-inc.com/api/v3/orgs/{org}`.
|
||||
*/
|
||||
baseUrl?: Url;
|
||||
/**
|
||||
* HTTP headers. Use lowercase keys.
|
||||
*/
|
||||
headers?: RequestHeaders;
|
||||
/**
|
||||
* Media type options, see {@link https://developer.github.com/v3/media/|GitHub Developer Guide}
|
||||
*/
|
||||
mediaType?: {
|
||||
/**
|
||||
* `json` by default. Can be `raw`, `text`, `html`, `full`, `diff`, `patch`, `sha`, `base64`. Depending on endpoint
|
||||
*/
|
||||
format?: string;
|
||||
/**
|
||||
* Custom media type names of {@link https://developer.github.com/v3/media/|API Previews} without the `-preview` suffix.
|
||||
* Example for single preview: `['squirrel-girl']`.
|
||||
* Example for multiple previews: `['squirrel-girl', 'mister-fantastic']`.
|
||||
*/
|
||||
previews?: string[];
|
||||
};
|
||||
/**
|
||||
* Pass custom meta information for the request. The `request` object will be returned as is.
|
||||
*/
|
||||
request?: RequestRequestOptions;
|
||||
/**
|
||||
* Any additional parameter will be passed as follows
|
||||
* 1. URL parameter if `':parameter'` or `{parameter}` is part of `url`
|
||||
* 2. Query parameter if `method` is `'GET'` or `'HEAD'`
|
||||
* 3. Request body if `parameter` is `'data'`
|
||||
* 4. JSON in the request body in the form of `body[parameter]` unless `parameter` key is `'data'`
|
||||
*/
|
||||
[parameter: string]: unknown;
|
||||
};
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
import { Fetch } from "./Fetch";
|
||||
import { Signal } from "./Signal";
|
||||
/**
|
||||
* Octokit-specific request options which are ignored for the actual request, but can be used by Octokit or plugins to manipulate how the request is sent or how a response is handled
|
||||
*/
|
||||
export declare type RequestRequestOptions = {
|
||||
/**
|
||||
* Node only. Useful for custom proxy, certificate, or dns lookup.
|
||||
*
|
||||
* @see https://nodejs.org/api/http.html#http_class_http_agent
|
||||
*/
|
||||
agent?: unknown;
|
||||
/**
|
||||
* Custom replacement for built-in fetch method. Useful for testing or request hooks.
|
||||
*/
|
||||
fetch?: Fetch;
|
||||
/**
|
||||
* Use an `AbortController` instance to cancel a request. In node you can only cancel streamed requests.
|
||||
*/
|
||||
signal?: Signal;
|
||||
/**
|
||||
* Node only. Request/response timeout in ms, it resets on redirect. 0 to disable (OS limit applies). `options.request.signal` is recommended instead.
|
||||
*/
|
||||
timeout?: number;
|
||||
[option: string]: any;
|
||||
};
|
||||
20
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts
generated
vendored
Normal file
20
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
export declare type ResponseHeaders = {
|
||||
"cache-control"?: string;
|
||||
"content-length"?: number;
|
||||
"content-type"?: string;
|
||||
date?: string;
|
||||
etag?: string;
|
||||
"last-modified"?: string;
|
||||
link?: string;
|
||||
location?: string;
|
||||
server?: string;
|
||||
status?: string;
|
||||
vary?: string;
|
||||
"x-github-mediatype"?: string;
|
||||
"x-github-request-id"?: string;
|
||||
"x-oauth-scopes"?: string;
|
||||
"x-ratelimit-limit"?: string;
|
||||
"x-ratelimit-remaining"?: string;
|
||||
"x-ratelimit-reset"?: string;
|
||||
[header: string]: string | number | undefined;
|
||||
};
|
||||
4
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/Route.d.ts
generated
vendored
Normal file
4
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/Route.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
/**
|
||||
* String consisting of an optional HTTP method and relative path or absolute URL. Examples: `'/orgs/{org}'`, `'PUT /orgs/{org}'`, `GET https://example.com/foo/bar`
|
||||
*/
|
||||
export declare type Route = string;
|
||||
6
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/Signal.d.ts
generated
vendored
Normal file
6
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/Signal.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
/**
|
||||
* Abort signal
|
||||
*
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
|
||||
*/
|
||||
export declare type Signal = any;
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
import { AuthInterface } from "./AuthInterface";
|
||||
export interface StrategyInterface<StrategyOptions extends any[], AuthOptions extends any[], Authentication extends object> {
|
||||
(...args: StrategyOptions): AuthInterface<AuthOptions, Authentication>;
|
||||
}
|
||||
4
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/Url.d.ts
generated
vendored
Normal file
4
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/Url.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
/**
|
||||
* Relative or absolute URL. Examples: `'/orgs/{org}'`, `https://example.com/foo/bar`
|
||||
*/
|
||||
export declare type Url = string;
|
||||
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/VERSION.d.ts
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/VERSION.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export declare const VERSION = "6.41.0";
|
||||
3571
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts
generated
vendored
Normal file
3571
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
21
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/index.d.ts
generated
vendored
Normal file
21
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
export * from "./AuthInterface";
|
||||
export * from "./EndpointDefaults";
|
||||
export * from "./EndpointInterface";
|
||||
export * from "./EndpointOptions";
|
||||
export * from "./Fetch";
|
||||
export * from "./OctokitResponse";
|
||||
export * from "./RequestError";
|
||||
export * from "./RequestHeaders";
|
||||
export * from "./RequestInterface";
|
||||
export * from "./RequestMethod";
|
||||
export * from "./RequestOptions";
|
||||
export * from "./RequestParameters";
|
||||
export * from "./RequestRequestOptions";
|
||||
export * from "./ResponseHeaders";
|
||||
export * from "./Route";
|
||||
export * from "./Signal";
|
||||
export * from "./StrategyInterface";
|
||||
export * from "./Url";
|
||||
export * from "./VERSION";
|
||||
export * from "./GetResponseTypeFromEndpointMethod";
|
||||
export * from "./generated/Endpoints";
|
||||
4
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-web/index.js
generated
vendored
Normal file
4
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-web/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
const VERSION = "6.41.0";
|
||||
|
||||
export { VERSION };
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-web/index.js.map
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-web/index.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
|
||||
54
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/package.json
generated
vendored
Normal file
54
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
"name": "@octokit/types",
|
||||
"description": "Shared TypeScript definitions for Octokit projects",
|
||||
"version": "6.41.0",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"dist-*/",
|
||||
"bin/"
|
||||
],
|
||||
"source": "dist-src/index.js",
|
||||
"types": "dist-types/index.d.ts",
|
||||
"octokit": {
|
||||
"openapi-version": "6.8.0"
|
||||
},
|
||||
"main": "dist-node/index.js",
|
||||
"module": "dist-web/index.js",
|
||||
"pika": true,
|
||||
"sideEffects": false,
|
||||
"keywords": [
|
||||
"github",
|
||||
"api",
|
||||
"sdk",
|
||||
"toolkit",
|
||||
"typescript"
|
||||
],
|
||||
"repository": "github:octokit/types.ts",
|
||||
"dependencies": {
|
||||
"@octokit/openapi-types": "^12.11.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@pika/pack": "^0.3.7",
|
||||
"@pika/plugin-build-node": "^0.9.0",
|
||||
"@pika/plugin-build-web": "^0.9.0",
|
||||
"@pika/plugin-ts-standard-pkg": "^0.9.0",
|
||||
"@types/node": ">= 8",
|
||||
"github-openapi-graphql-query": "^2.0.0",
|
||||
"handlebars": "^4.7.6",
|
||||
"json-schema-to-typescript": "^11.0.0",
|
||||
"lodash.set": "^4.3.2",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"pascal-case": "^3.1.1",
|
||||
"pika-plugin-merge-properties": "^1.0.6",
|
||||
"prettier": "^2.0.0",
|
||||
"semantic-release": "^19.0.3",
|
||||
"semantic-release-plugin-update-version-in-files": "^1.0.0",
|
||||
"sort-keys": "^4.2.0",
|
||||
"string-to-jsdoc-comment": "^1.0.0",
|
||||
"typedoc": "^0.23.0",
|
||||
"typescript": "^4.0.2"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
||||
59
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/package.json
generated
vendored
Normal file
59
github/codeql-action-v2/node_modules/@octokit/plugin-rest-endpoint-methods/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
"name": "@octokit/plugin-rest-endpoint-methods",
|
||||
"description": "Octokit plugin adding one method for all of api.github.com REST API endpoints",
|
||||
"version": "5.16.2",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"dist-*/",
|
||||
"bin/"
|
||||
],
|
||||
"pika": true,
|
||||
"sideEffects": false,
|
||||
"keywords": [
|
||||
"github",
|
||||
"api",
|
||||
"sdk",
|
||||
"toolkit"
|
||||
],
|
||||
"repository": "github:octokit/plugin-rest-endpoint-methods.js",
|
||||
"dependencies": {
|
||||
"@octokit/types": "^6.39.0",
|
||||
"deprecation": "^2.3.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@octokit/core": ">=3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gimenete/type-writer": "^0.1.5",
|
||||
"@octokit/core": "^3.0.0",
|
||||
"@pika/pack": "^0.5.0",
|
||||
"@pika/plugin-build-node": "^0.9.0",
|
||||
"@pika/plugin-build-web": "^0.9.0",
|
||||
"@pika/plugin-ts-standard-pkg": "^0.9.0",
|
||||
"@types/fetch-mock": "^7.3.1",
|
||||
"@types/jest": "^27.0.0",
|
||||
"@types/node": "^16.0.0",
|
||||
"fetch-mock": "^9.0.0",
|
||||
"fs-extra": "^10.0.0",
|
||||
"github-openapi-graphql-query": "^2.0.0",
|
||||
"jest": "^27.0.0",
|
||||
"lodash.camelcase": "^4.3.0",
|
||||
"lodash.set": "^4.3.2",
|
||||
"lodash.upperfirst": "^4.3.1",
|
||||
"mustache": "^4.0.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "2.7.1",
|
||||
"semantic-release-plugin-update-version-in-files": "^1.0.0",
|
||||
"sort-keys": "^4.2.0",
|
||||
"string-to-jsdoc-comment": "^1.0.0",
|
||||
"ts-jest": "^27.0.0-next.12",
|
||||
"typescript": "^4.0.2"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"source": "dist-src/index.js",
|
||||
"types": "dist-types/index.d.ts",
|
||||
"main": "dist-node/index.js",
|
||||
"module": "dist-web/index.js"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue