@octokit-next/types-rest-api-ghes-3.1-compatible
TypeScript icon, indicating that this package has built-in type declarations

2.5.2 • Public • Published

@octokit-next/types-rest-api-ghes-3.1-compatible

Types for GHES 3.1 (compatible) REST API requests and responses

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

learn more

The goal for this package is to enable developers to build code that will work in both environments: github.com and GHES 3.1. Only endpoints and properties that exist in both have types by default.

The version can be overwritten on a per-request basis as needed.

Usage

const octokit = new Octokit({
  version: "ghes-3.1-compatible",
});
const response = await octokit.request("GET /");

The routes suggested for octokit.request(route) are only the ones that exist for version: "github.com" and have no overrides for version: "ghes-3.1". The same is true for response.headers.

To override the version specified in the constructor it can be set using the request.version option

const ghesOnlyResponse = await octokit.request("GET /admins/users", {
  request: {
    version: "ghes-3.1",
  },
});

Readme

Keywords

none

Package Sidebar

Install

npm i @octokit-next/types-rest-api-ghes-3.1-compatible

Weekly Downloads

0

Version

2.5.2

License

MIT

Unpacked Size

2.91 kB

Total Files

4

Last publish

Collaborators

  • octokit-next-bot
  • gr2m