@octokit/types 8.1.1 → 9.0.0

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const VERSION = "8.1.1";
5
+ const VERSION = "9.0.0";
6
6
 
7
7
  exports.VERSION = VERSION;
8
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- export const VERSION = "8.1.1";
1
+ export const VERSION = "9.0.0";
@@ -6,7 +6,7 @@ import { Url } from "./Url";
6
6
  * The `.endpoint()` method is guaranteed to set all keys defined by RequestParameters
7
7
  * as well as the method property.
8
8
  */
9
- export declare type EndpointDefaults = RequestParameters & {
9
+ export type EndpointDefaults = RequestParameters & {
10
10
  baseUrl: Url;
11
11
  method: RequestMethod;
12
12
  url?: Url;
@@ -1,7 +1,7 @@
1
1
  import { RequestMethod } from "./RequestMethod";
2
2
  import { Url } from "./Url";
3
3
  import { RequestParameters } from "./RequestParameters";
4
- export declare type EndpointOptions = RequestParameters & {
4
+ export type EndpointOptions = RequestParameters & {
5
5
  method: RequestMethod;
6
6
  url: Url;
7
7
  };
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Browser's fetch method (or compatible such as fetch-mock)
3
3
  */
4
- export declare type Fetch = any;
4
+ export type Fetch = any;
@@ -1,5 +1,5 @@
1
- declare type Unwrap<T> = T extends Promise<infer U> ? U : T;
2
- declare type AnyFunction = (...args: any[]) => any;
3
- export declare type GetResponseTypeFromEndpointMethod<T extends AnyFunction> = Unwrap<ReturnType<T>>;
4
- export declare type GetResponseDataTypeFromEndpointMethod<T extends AnyFunction> = Unwrap<ReturnType<T>>["data"];
1
+ type Unwrap<T> = T extends Promise<infer U> ? U : T;
2
+ type AnyFunction = (...args: any[]) => any;
3
+ export type GetResponseTypeFromEndpointMethod<T extends AnyFunction> = Unwrap<ReturnType<T>>;
4
+ export type GetResponseDataTypeFromEndpointMethod<T extends AnyFunction> = Unwrap<ReturnType<T>>["data"];
5
5
  export {};
@@ -1,6 +1,6 @@
1
1
  import { ResponseHeaders } from "./ResponseHeaders";
2
2
  import { Url } from "./Url";
3
- export declare type OctokitResponse<T, S extends number = number> = {
3
+ export type OctokitResponse<T, S extends number = number> = {
4
4
  headers: ResponseHeaders;
5
5
  /**
6
6
  * http response code
@@ -1,4 +1,4 @@
1
- export declare type RequestError = {
1
+ export type RequestError = {
2
2
  name: string;
3
3
  status: number;
4
4
  documentation_url: string;
@@ -1,4 +1,4 @@
1
- export declare type RequestHeaders = {
1
+ export type RequestHeaders = {
2
2
  /**
3
3
  * Avoid setting `headers.accept`, use `mediaType.{format|previews}` option instead.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * HTTP Verb supported by GitHub's REST API
3
3
  */
4
- export declare type RequestMethod = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT";
4
+ export type RequestMethod = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT";
@@ -5,7 +5,7 @@ import { Url } from "./Url";
5
5
  /**
6
6
  * Generic request options as they are returned by the `endpoint()` method
7
7
  */
8
- export declare type RequestOptions = {
8
+ export type RequestOptions = {
9
9
  method: RequestMethod;
10
10
  url: Url;
11
11
  headers: RequestHeaders;
@@ -4,7 +4,7 @@ import { Url } from "./Url";
4
4
  /**
5
5
  * Parameters that can be passed into `request(route, parameters)` or `endpoint(route, parameters)` methods
6
6
  */
7
- export declare type RequestParameters = {
7
+ export type RequestParameters = {
8
8
  /**
9
9
  * Base URL to be used when a relative URL is passed, such as `/orgs/{org}`.
10
10
  * If `baseUrl` is `https://enterprise.acme-inc.com/api/v3`, then the request
@@ -3,7 +3,7 @@ import { Signal } from "./Signal";
3
3
  /**
4
4
  * 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
5
5
  */
6
- export declare type RequestRequestOptions = {
6
+ export type RequestRequestOptions = {
7
7
  /**
8
8
  * Node only. Useful for custom proxy, certificate, or dns lookup.
9
9
  *
@@ -1,4 +1,4 @@
1
- export declare type ResponseHeaders = {
1
+ export type ResponseHeaders = {
2
2
  "cache-control"?: string;
3
3
  "content-length"?: number;
4
4
  "content-type"?: string;
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * 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`
3
3
  */
4
- export declare type Route = string;
4
+ export type Route = string;
@@ -3,4 +3,4 @@
3
3
  *
4
4
  * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
5
5
  */
6
- export declare type Signal = any;
6
+ export type Signal = any;
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Relative or absolute URL. Examples: `'/orgs/{org}'`, `https://example.com/foo/bar`
3
3
  */
4
- export declare type Url = string;
4
+ export type Url = string;
@@ -1 +1 @@
1
- export declare const VERSION = "8.1.1";
1
+ export declare const VERSION = "9.0.0";