2.8.0 • Published 1 month ago

@octokit-next/types-rest-api v2.8.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

@octokit-next/types-rest-api

Types for github.com REST API requests and responses

🚫⚠️ This package is part of an experimental Octokit SDK for testing purpose only - DO NOT USE

learn more

Usage

Importing the package will add all of GitHub's REST API endpoints to the Octokit.ApiVersions["github.com"] interface

import "@octokit-next/types-rest-api";

The package also exports an Operation generic which turns a REST API endpoint defined in a transpiled OpenAPI spec to an Endpoint object with parameters, request, and response keys.

import { paths } from "@octokit-next/types-openapi";
import { Operation } from "@octokit-next/types-rest-api";

type MyEndpoint = Operation<paths, "GET", "/">;

The Operation call signature is

Operation<paths, method, path[, requiredPreview]>
  • paths is the paths object from a transpiled OpenAPI spec using openapi-typescript, such as any of the @octokit-next/types-openapi* packages
  • method is the HTTP method, such as get, post, patch, etc. (lowercase)
  • path is the path to the endpoint, such as /repos/:owner/:repo
  • requiredPreview is a string of the name of the preview if one is required in order to use that endpoint
2.8.0

1 month ago

2.7.1

10 months ago

2.7.0

1 year ago

2.6.1

1 year ago

2.3.0

2 years ago

2.5.0

2 years ago

2.4.1

2 years ago

2.4.0

2 years ago

2.3.1

2 years ago

2.5.2

2 years ago

2.6.0

2 years ago

2.5.1

2 years ago

1.15.6

2 years ago

2.2.0

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.15.4

2 years ago

1.15.3

2 years ago

1.15.2

2 years ago

1.15.1

2 years ago

1.15.5

2 years ago

1.15.0

3 years ago

1.14.0

3 years ago

1.13.2

3 years ago

1.13.1

3 years ago

1.13.0

3 years ago

1.12.0

3 years ago

1.11.0

3 years ago

1.10.0

3 years ago

1.9.1

3 years ago

1.9.0

3 years ago

1.8.0

3 years ago