@octokit-next/types-rest-api v3.0.0
@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
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]>pathsis the paths object from a transpiled OpenAPI spec usingopenapi-typescript, such as any of the@octokit-next/types-openapi*packagesmethodis the HTTP method, such asget,post,patch, etc. (lowercase)pathis the path to the endpoint, such as/repos/:owner/:reporequiredPreviewis a string of the name of the preview if one is required in order to use that endpoint
6 months ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago