@octokit/types 9.3.0-beta.1 → 9.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-node/index.js +1 -1
- package/dist-src/VERSION.js +1 -1
- package/dist-types/EndpointDefaults.d.ts +1 -1
- package/dist-types/RequestParameters.d.ts +1 -1
- package/dist-types/VERSION.d.ts +1 -1
- package/dist-types/generated/Endpoints.d.ts +16 -3
- package/dist-web/index.js +1 -1
- package/package.json +3 -3
package/dist-node/index.js
CHANGED
package/dist-src/VERSION.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "9.3.
|
|
1
|
+
export const VERSION = "9.3.1";
|
|
@@ -24,7 +24,7 @@ export type RequestParameters = {
|
|
|
24
24
|
*/
|
|
25
25
|
format?: string;
|
|
26
26
|
/**
|
|
27
|
-
* Custom media type names of {@link https://
|
|
27
|
+
* Custom media type names of {@link https://developer.github.com/v3/media/|API Previews} without the `-preview` suffix.
|
|
28
28
|
* Example for single preview: `['squirrel-girl']`.
|
|
29
29
|
* Example for multiple previews: `['squirrel-girl', 'mister-fantastic']`.
|
|
30
30
|
*/
|
package/dist-types/VERSION.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "9.3.
|
|
1
|
+
export declare const VERSION = "9.3.1";
|
|
@@ -4,7 +4,7 @@ import { RequestHeaders } from "../RequestHeaders";
|
|
|
4
4
|
import { RequestRequestOptions } from "../RequestRequestOptions";
|
|
5
5
|
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
6
6
|
type ExtractParameters<T> = "parameters" extends keyof T ? UnionToIntersection<{
|
|
7
|
-
[K in keyof T["parameters"]]
|
|
7
|
+
[K in keyof T["parameters"]]-?: T["parameters"][K];
|
|
8
8
|
}[keyof T["parameters"]]> : {};
|
|
9
9
|
type ExtractRequestBody<T> = "requestBody" extends keyof T ? "content" extends keyof T["requestBody"] ? "application/json" extends keyof T["requestBody"]["content"] ? T["requestBody"]["content"]["application/json"] : {
|
|
10
10
|
data: {
|
|
@@ -16,8 +16,13 @@ type ExtractRequestBody<T> = "requestBody" extends keyof T ? "content" extends k
|
|
|
16
16
|
}[keyof T["requestBody"]];
|
|
17
17
|
} : {};
|
|
18
18
|
type ToOctokitParameters<T> = ExtractParameters<T> & ExtractRequestBody<Required<T>>;
|
|
19
|
-
type
|
|
20
|
-
|
|
19
|
+
type RequiredPreview<T> = T extends string ? {
|
|
20
|
+
mediaType: {
|
|
21
|
+
previews: [T, ...string[]];
|
|
22
|
+
};
|
|
23
|
+
} : {};
|
|
24
|
+
type Operation<Url extends keyof paths, Method extends keyof paths[Url], preview = unknown> = {
|
|
25
|
+
parameters: ToOctokitParameters<paths[Url][Method]> & RequiredPreview<preview>;
|
|
21
26
|
request: {
|
|
22
27
|
method: Method extends keyof MethodsMap ? MethodsMap[Method] : never;
|
|
23
28
|
url: Url;
|
|
@@ -2778,6 +2783,10 @@ export interface Endpoints {
|
|
|
2778
2783
|
* @see https://docs.github.com/rest/reference/actions#create-a-required-workflow
|
|
2779
2784
|
*/
|
|
2780
2785
|
"POST /orgs/{org}/actions/required_workflows": Operation<"/orgs/{org}/actions/required_workflows", "post">;
|
|
2786
|
+
/**
|
|
2787
|
+
* @see https://docs.github.com/rest/actions/self-hosted-runners#create-configuration-for-a-just-in-time-runner-for-an-organization
|
|
2788
|
+
*/
|
|
2789
|
+
"POST /orgs/{org}/actions/runners/generate-jitconfig": Operation<"/orgs/{org}/actions/runners/generate-jitconfig", "post">;
|
|
2781
2790
|
/**
|
|
2782
2791
|
* @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-an-organization
|
|
2783
2792
|
*/
|
|
@@ -2886,6 +2895,10 @@ export interface Endpoints {
|
|
|
2886
2895
|
* @see https://docs.github.com/rest/reference/actions#re-run-job-for-workflow-run
|
|
2887
2896
|
*/
|
|
2888
2897
|
"POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun", "post">;
|
|
2898
|
+
/**
|
|
2899
|
+
* @see https://docs.github.com/rest/actions/self-hosted-runners#create-configuration-for-a-just-in-time-runner-for-a-repository
|
|
2900
|
+
*/
|
|
2901
|
+
"POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig": Operation<"/repos/{owner}/{repo}/actions/runners/generate-jitconfig", "post">;
|
|
2889
2902
|
/**
|
|
2890
2903
|
* @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-a-repository
|
|
2891
2904
|
*/
|
package/dist-web/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octokit/types",
|
|
3
3
|
"description": "Shared TypeScript definitions for Octokit projects",
|
|
4
|
-
"version": "9.3.
|
|
4
|
+
"version": "9.3.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist-*/**",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"source": "dist-src/index.js",
|
|
11
11
|
"types": "dist-types/index.d.ts",
|
|
12
12
|
"octokit": {
|
|
13
|
-
"openapi-version": "
|
|
13
|
+
"openapi-version": "12.0.0"
|
|
14
14
|
},
|
|
15
15
|
"main": "dist-node/index.js",
|
|
16
16
|
"module": "dist-web/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
],
|
|
26
26
|
"repository": "github:octokit/types.ts",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@octokit/openapi-types": "^
|
|
28
|
+
"@octokit/openapi-types": "^18.0.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@pika/pack": "^0.3.7",
|