@octokit/plugin-paginate-rest
Advanced tools
Comparing version 11.3.4 to 11.3.5
@@ -1,4 +0,4 @@ | ||
const VERSION = "11.3.4"; | ||
const VERSION = "11.3.5"; | ||
export { | ||
VERSION | ||
}; |
import type { Octokit } from "@octokit/core"; | ||
import type { RequestInterface, RequestParameters, Route } from "./types.js"; | ||
export declare function iterator(octokit: Octokit, route: Route | RequestInterface, parameters?: RequestParameters): { | ||
[Symbol.asyncIterator]: () => { | ||
next(): Promise<{ | ||
done: boolean; | ||
value?: undefined; | ||
} | { | ||
value: import("@octokit/types/dist-types/OctokitResponse.js").OctokitResponse<any, number>; | ||
done?: undefined; | ||
} | { | ||
value: { | ||
status: number; | ||
headers: {}; | ||
data: never[]; | ||
}; | ||
done?: undefined; | ||
}>; | ||
}; | ||
}; | ||
export declare function iterator(octokit: Octokit, route: Route | RequestInterface, parameters?: RequestParameters): AsyncIterable<any>; |
@@ -10,3 +10,3 @@ import type { Octokit } from "@octokit/core"; | ||
[_ in keyof T]: infer U; | ||
} ? U : never, keyof T>; | ||
} ? U : never, Exclude<keyof T, "repository_selection" | "total_count" | "incomplete_results">>; | ||
type KeysMatching<T, V> = { | ||
@@ -21,3 +21,3 @@ [K in keyof T]: T[K] extends V ? K : never; | ||
} ? T["data"][KnownKeysMatching<T["data"], any[]>] : never; | ||
type NormalizeResponse<T> = T & { | ||
type NormalizeResponse<T> = Omit<T, "data"> & { | ||
data: GetResultsType<T>; | ||
@@ -102,3 +102,3 @@ }; | ||
*/ | ||
<T>(options: OctokitTypes.EndpointOptions): AsyncIterableIterator<OctokitTypes.OctokitResponse<PaginationResults<T>>>; | ||
<T>(options: OctokitTypes.EndpointOptions): AsyncIterable<OctokitTypes.OctokitResponse<PaginationResults<T>>>; | ||
/** | ||
@@ -111,3 +111,3 @@ * Get an async iterator to paginate a request using a known endpoint route string and optional parameters | ||
*/ | ||
<R extends keyof PaginatingEndpoints>(route: R, parameters?: PaginatingEndpoints[R]["parameters"]): AsyncIterableIterator<OctokitTypes.OctokitResponse<DataType<PaginatingEndpoints[R]["response"]>>>; | ||
<R extends keyof PaginatingEndpoints>(route: R, parameters?: PaginatingEndpoints[R]["parameters"]): AsyncIterable<OctokitTypes.OctokitResponse<DataType<PaginatingEndpoints[R]["response"]>>>; | ||
/** | ||
@@ -120,3 +120,3 @@ * Get an async iterator to paginate a request using an unknown endpoint route string and optional parameters | ||
*/ | ||
<T, R extends OctokitTypes.Route = OctokitTypes.Route>(route: R, parameters?: R extends keyof PaginatingEndpoints ? PaginatingEndpoints[R]["parameters"] : OctokitTypes.RequestParameters): AsyncIterableIterator<OctokitTypes.OctokitResponse<PaginationResults<T>>>; | ||
<T, R extends OctokitTypes.Route = OctokitTypes.Route>(route: R, parameters?: R extends keyof PaginatingEndpoints ? PaginatingEndpoints[R]["parameters"] : OctokitTypes.RequestParameters): AsyncIterable<OctokitTypes.OctokitResponse<PaginationResults<T>>>; | ||
/** | ||
@@ -129,3 +129,3 @@ * Get an async iterator to paginate a request using a request method and optional parameters | ||
*/ | ||
<R extends OctokitTypes.RequestInterface>(request: R, parameters?: Parameters<R>[0]): AsyncIterableIterator<NormalizeResponse<OctokitTypes.GetResponseTypeFromEndpointMethod<R>>>; | ||
<R extends OctokitTypes.RequestInterface>(request: R, parameters?: Parameters<R>[0]): AsyncIterable<NormalizeResponse<OctokitTypes.GetResponseTypeFromEndpointMethod<R>>>; | ||
}; | ||
@@ -216,3 +216,3 @@ } | ||
*/ | ||
<T>(octokit: Octokit, options: OctokitTypes.EndpointOptions): AsyncIterableIterator<OctokitTypes.OctokitResponse<PaginationResults<T>>>; | ||
<T>(octokit: Octokit, options: OctokitTypes.EndpointOptions): AsyncIterable<OctokitTypes.OctokitResponse<PaginationResults<T>>>; | ||
/** | ||
@@ -227,3 +227,3 @@ * Get an async iterator to paginate a request using a known endpoint route string and optional parameters | ||
*/ | ||
<R extends keyof PaginatingEndpoints>(octokit: Octokit, route: R, parameters?: PaginatingEndpoints[R]["parameters"]): AsyncIterableIterator<OctokitTypes.OctokitResponse<DataType<PaginatingEndpoints[R]["response"]>>>; | ||
<R extends keyof PaginatingEndpoints>(octokit: Octokit, route: R, parameters?: PaginatingEndpoints[R]["parameters"]): AsyncIterable<OctokitTypes.OctokitResponse<DataType<PaginatingEndpoints[R]["response"]>>>; | ||
/** | ||
@@ -238,3 +238,3 @@ * Get an async iterator to paginate a request using an unknown endpoint route string and optional parameters | ||
*/ | ||
<T, R extends OctokitTypes.Route = OctokitTypes.Route>(octokit: Octokit, route: R, parameters?: R extends keyof PaginatingEndpoints ? PaginatingEndpoints[R]["parameters"] : OctokitTypes.RequestParameters): AsyncIterableIterator<OctokitTypes.OctokitResponse<PaginationResults<T>>>; | ||
<T, R extends OctokitTypes.Route = OctokitTypes.Route>(octokit: Octokit, route: R, parameters?: R extends keyof PaginatingEndpoints ? PaginatingEndpoints[R]["parameters"] : OctokitTypes.RequestParameters): AsyncIterable<OctokitTypes.OctokitResponse<PaginationResults<T>>>; | ||
/** | ||
@@ -249,4 +249,4 @@ * Get an async iterator to paginate a request using a request method and optional parameters | ||
*/ | ||
<R extends OctokitTypes.RequestInterface>(octokit: Octokit, request: R, parameters?: Parameters<R>[0]): AsyncIterableIterator<NormalizeResponse<OctokitTypes.GetResponseTypeFromEndpointMethod<R>>>; | ||
<R extends OctokitTypes.RequestInterface>(octokit: Octokit, request: R, parameters?: Parameters<R>[0]): AsyncIterable<NormalizeResponse<OctokitTypes.GetResponseTypeFromEndpointMethod<R>>>; | ||
}; | ||
} |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "11.3.4"; | ||
export declare const VERSION = "11.3.5"; |
@@ -8,3 +8,3 @@ { | ||
"type": "module", | ||
"version": "11.3.4", | ||
"version": "11.3.5", | ||
"description": "Octokit plugin to paginate REST API endpoint responses", | ||
@@ -11,0 +11,0 @@ "repository": "github:octokit/plugin-paginate-rest.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
167119
2810