@octokit/plugin-paginate-rest
Advanced tools
Comparing version 2.12.0 to 2.13.0
@@ -5,3 +5,3 @@ 'use strict'; | ||
const VERSION = "2.12.0"; | ||
const VERSION = "2.13.0"; | ||
@@ -117,2 +117,12 @@ /** | ||
const paginatingEndpoints = ["GET /app/installations", "GET /applications/grants", "GET /authorizations", "GET /enterprises/{enterprise}/actions/permissions/organizations", "GET /enterprises/{enterprise}/actions/runner-groups", "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations", "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners", "GET /enterprises/{enterprise}/actions/runners", "GET /enterprises/{enterprise}/actions/runners/downloads", "GET /events", "GET /gists", "GET /gists/public", "GET /gists/starred", "GET /gists/{gist_id}/comments", "GET /gists/{gist_id}/commits", "GET /gists/{gist_id}/forks", "GET /installation/repositories", "GET /issues", "GET /marketplace_listing/plans", "GET /marketplace_listing/plans/{plan_id}/accounts", "GET /marketplace_listing/stubbed/plans", "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", "GET /networks/{owner}/{repo}/events", "GET /notifications", "GET /organizations", "GET /orgs/{org}/actions/permissions/repositories", "GET /orgs/{org}/actions/runner-groups", "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "GET /orgs/{org}/actions/runners", "GET /orgs/{org}/actions/runners/downloads", "GET /orgs/{org}/actions/secrets", "GET /orgs/{org}/actions/secrets/{secret_name}/repositories", "GET /orgs/{org}/blocks", "GET /orgs/{org}/credential-authorizations", "GET /orgs/{org}/events", "GET /orgs/{org}/failed_invitations", "GET /orgs/{org}/hooks", "GET /orgs/{org}/installations", "GET /orgs/{org}/invitations", "GET /orgs/{org}/invitations/{invitation_id}/teams", "GET /orgs/{org}/issues", "GET /orgs/{org}/members", "GET /orgs/{org}/migrations", "GET /orgs/{org}/migrations/{migration_id}/repositories", "GET /orgs/{org}/outside_collaborators", "GET /orgs/{org}/projects", "GET /orgs/{org}/public_members", "GET /orgs/{org}/repos", "GET /orgs/{org}/team-sync/groups", "GET /orgs/{org}/teams", "GET /orgs/{org}/teams/{team_slug}/discussions", "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "GET /orgs/{org}/teams/{team_slug}/invitations", "GET /orgs/{org}/teams/{team_slug}/members", "GET /orgs/{org}/teams/{team_slug}/projects", "GET /orgs/{org}/teams/{team_slug}/repos", "GET /orgs/{org}/teams/{team_slug}/team-sync/group-mappings", "GET /orgs/{org}/teams/{team_slug}/teams", "GET /projects/columns/{column_id}/cards", "GET /projects/{project_id}/collaborators", "GET /projects/{project_id}/columns", "GET /repos/{owner}/{repo}/actions/artifacts", "GET /repos/{owner}/{repo}/actions/runners", "GET /repos/{owner}/{repo}/actions/runners/downloads", "GET /repos/{owner}/{repo}/actions/runs", "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", "GET /repos/{owner}/{repo}/actions/secrets", "GET /repos/{owner}/{repo}/actions/workflows", "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", "GET /repos/{owner}/{repo}/assignees", "GET /repos/{owner}/{repo}/branches", "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", "GET /repos/{owner}/{repo}/code-scanning/alerts", "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", "GET /repos/{owner}/{repo}/code-scanning/analyses", "GET /repos/{owner}/{repo}/collaborators", "GET /repos/{owner}/{repo}/comments", "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", "GET /repos/{owner}/{repo}/commits", "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments", "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", "GET /repos/{owner}/{repo}/commits/{ref}/check-runs", "GET /repos/{owner}/{repo}/commits/{ref}/check-suites", "GET /repos/{owner}/{repo}/commits/{ref}/statuses", "GET /repos/{owner}/{repo}/contributors", "GET /repos/{owner}/{repo}/deployments", "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "GET /repos/{owner}/{repo}/events", "GET /repos/{owner}/{repo}/forks", "GET /repos/{owner}/{repo}/git/matching-refs/{ref}", "GET /repos/{owner}/{repo}/hooks", "GET /repos/{owner}/{repo}/invitations", "GET /repos/{owner}/{repo}/issues", "GET /repos/{owner}/{repo}/issues/comments", "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "GET /repos/{owner}/{repo}/issues/events", "GET /repos/{owner}/{repo}/issues/{issue_number}/comments", "GET /repos/{owner}/{repo}/issues/{issue_number}/events", "GET /repos/{owner}/{repo}/issues/{issue_number}/labels", "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", "GET /repos/{owner}/{repo}/keys", "GET /repos/{owner}/{repo}/labels", "GET /repos/{owner}/{repo}/milestones", "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels", "GET /repos/{owner}/{repo}/notifications", "GET /repos/{owner}/{repo}/pages/builds", "GET /repos/{owner}/{repo}/projects", "GET /repos/{owner}/{repo}/pulls", "GET /repos/{owner}/{repo}/pulls/comments", "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments", "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits", "GET /repos/{owner}/{repo}/pulls/{pull_number}/files", "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews", "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", "GET /repos/{owner}/{repo}/releases", "GET /repos/{owner}/{repo}/releases/{release_id}/assets", "GET /repos/{owner}/{repo}/secret-scanning/alerts", "GET /repos/{owner}/{repo}/stargazers", "GET /repos/{owner}/{repo}/subscribers", "GET /repos/{owner}/{repo}/tags", "GET /repos/{owner}/{repo}/teams", "GET /repositories", "GET /repositories/{repository_id}/environments/{environment_name}/secrets", "GET /scim/v2/enterprises/{enterprise}/Groups", "GET /scim/v2/enterprises/{enterprise}/Users", "GET /scim/v2/organizations/{org}/Users", "GET /search/code", "GET /search/commits", "GET /search/issues", "GET /search/labels", "GET /search/repositories", "GET /search/topics", "GET /search/users", "GET /teams/{team_id}/discussions", "GET /teams/{team_id}/discussions/{discussion_number}/comments", "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "GET /teams/{team_id}/discussions/{discussion_number}/reactions", "GET /teams/{team_id}/invitations", "GET /teams/{team_id}/members", "GET /teams/{team_id}/projects", "GET /teams/{team_id}/repos", "GET /teams/{team_id}/team-sync/group-mappings", "GET /teams/{team_id}/teams", "GET /user/blocks", "GET /user/emails", "GET /user/followers", "GET /user/following", "GET /user/gpg_keys", "GET /user/installations", "GET /user/installations/{installation_id}/repositories", "GET /user/issues", "GET /user/keys", "GET /user/marketplace_purchases", "GET /user/marketplace_purchases/stubbed", "GET /user/memberships/orgs", "GET /user/migrations", "GET /user/migrations/{migration_id}/repositories", "GET /user/orgs", "GET /user/public_emails", "GET /user/repos", "GET /user/repository_invitations", "GET /user/starred", "GET /user/subscriptions", "GET /user/teams", "GET /users", "GET /users/{username}/events", "GET /users/{username}/events/orgs/{org}", "GET /users/{username}/events/public", "GET /users/{username}/followers", "GET /users/{username}/following", "GET /users/{username}/gists", "GET /users/{username}/gpg_keys", "GET /users/{username}/keys", "GET /users/{username}/orgs", "GET /users/{username}/projects", "GET /users/{username}/received_events", "GET /users/{username}/received_events/public", "GET /users/{username}/repos", "GET /users/{username}/starred", "GET /users/{username}/subscriptions"]; | ||
function isPaginatingEndpoint(arg) { | ||
if (typeof arg === "string") { | ||
return paginatingEndpoints.includes(arg); | ||
} else { | ||
return false; | ||
} | ||
} | ||
/** | ||
@@ -133,3 +143,5 @@ * @param octokit Octokit instance | ||
exports.composePaginateRest = composePaginateRest; | ||
exports.isPaginatingEndpoint = isPaginatingEndpoint; | ||
exports.paginateRest = paginateRest; | ||
exports.paginatingEndpoints = paginatingEndpoints; | ||
//# sourceMappingURL=index.js.map |
@@ -1,1 +0,191 @@ | ||
export {}; | ||
export const paginatingEndpoints = [ | ||
"GET /app/installations", | ||
"GET /applications/grants", | ||
"GET /authorizations", | ||
"GET /enterprises/{enterprise}/actions/permissions/organizations", | ||
"GET /enterprises/{enterprise}/actions/runner-groups", | ||
"GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations", | ||
"GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners", | ||
"GET /enterprises/{enterprise}/actions/runners", | ||
"GET /enterprises/{enterprise}/actions/runners/downloads", | ||
"GET /events", | ||
"GET /gists", | ||
"GET /gists/public", | ||
"GET /gists/starred", | ||
"GET /gists/{gist_id}/comments", | ||
"GET /gists/{gist_id}/commits", | ||
"GET /gists/{gist_id}/forks", | ||
"GET /installation/repositories", | ||
"GET /issues", | ||
"GET /marketplace_listing/plans", | ||
"GET /marketplace_listing/plans/{plan_id}/accounts", | ||
"GET /marketplace_listing/stubbed/plans", | ||
"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", | ||
"GET /networks/{owner}/{repo}/events", | ||
"GET /notifications", | ||
"GET /organizations", | ||
"GET /orgs/{org}/actions/permissions/repositories", | ||
"GET /orgs/{org}/actions/runner-groups", | ||
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", | ||
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners", | ||
"GET /orgs/{org}/actions/runners", | ||
"GET /orgs/{org}/actions/runners/downloads", | ||
"GET /orgs/{org}/actions/secrets", | ||
"GET /orgs/{org}/actions/secrets/{secret_name}/repositories", | ||
"GET /orgs/{org}/blocks", | ||
"GET /orgs/{org}/credential-authorizations", | ||
"GET /orgs/{org}/events", | ||
"GET /orgs/{org}/failed_invitations", | ||
"GET /orgs/{org}/hooks", | ||
"GET /orgs/{org}/installations", | ||
"GET /orgs/{org}/invitations", | ||
"GET /orgs/{org}/invitations/{invitation_id}/teams", | ||
"GET /orgs/{org}/issues", | ||
"GET /orgs/{org}/members", | ||
"GET /orgs/{org}/migrations", | ||
"GET /orgs/{org}/migrations/{migration_id}/repositories", | ||
"GET /orgs/{org}/outside_collaborators", | ||
"GET /orgs/{org}/projects", | ||
"GET /orgs/{org}/public_members", | ||
"GET /orgs/{org}/repos", | ||
"GET /orgs/{org}/team-sync/groups", | ||
"GET /orgs/{org}/teams", | ||
"GET /orgs/{org}/teams/{team_slug}/discussions", | ||
"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", | ||
"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", | ||
"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", | ||
"GET /orgs/{org}/teams/{team_slug}/invitations", | ||
"GET /orgs/{org}/teams/{team_slug}/members", | ||
"GET /orgs/{org}/teams/{team_slug}/projects", | ||
"GET /orgs/{org}/teams/{team_slug}/repos", | ||
"GET /orgs/{org}/teams/{team_slug}/team-sync/group-mappings", | ||
"GET /orgs/{org}/teams/{team_slug}/teams", | ||
"GET /projects/columns/{column_id}/cards", | ||
"GET /projects/{project_id}/collaborators", | ||
"GET /projects/{project_id}/columns", | ||
"GET /repos/{owner}/{repo}/actions/artifacts", | ||
"GET /repos/{owner}/{repo}/actions/runners", | ||
"GET /repos/{owner}/{repo}/actions/runners/downloads", | ||
"GET /repos/{owner}/{repo}/actions/runs", | ||
"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", | ||
"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", | ||
"GET /repos/{owner}/{repo}/actions/secrets", | ||
"GET /repos/{owner}/{repo}/actions/workflows", | ||
"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", | ||
"GET /repos/{owner}/{repo}/assignees", | ||
"GET /repos/{owner}/{repo}/branches", | ||
"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", | ||
"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", | ||
"GET /repos/{owner}/{repo}/code-scanning/alerts", | ||
"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", | ||
"GET /repos/{owner}/{repo}/code-scanning/analyses", | ||
"GET /repos/{owner}/{repo}/collaborators", | ||
"GET /repos/{owner}/{repo}/comments", | ||
"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", | ||
"GET /repos/{owner}/{repo}/commits", | ||
"GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", | ||
"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments", | ||
"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", | ||
"GET /repos/{owner}/{repo}/commits/{ref}/check-runs", | ||
"GET /repos/{owner}/{repo}/commits/{ref}/check-suites", | ||
"GET /repos/{owner}/{repo}/commits/{ref}/statuses", | ||
"GET /repos/{owner}/{repo}/contributors", | ||
"GET /repos/{owner}/{repo}/deployments", | ||
"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", | ||
"GET /repos/{owner}/{repo}/events", | ||
"GET /repos/{owner}/{repo}/forks", | ||
"GET /repos/{owner}/{repo}/git/matching-refs/{ref}", | ||
"GET /repos/{owner}/{repo}/hooks", | ||
"GET /repos/{owner}/{repo}/invitations", | ||
"GET /repos/{owner}/{repo}/issues", | ||
"GET /repos/{owner}/{repo}/issues/comments", | ||
"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", | ||
"GET /repos/{owner}/{repo}/issues/events", | ||
"GET /repos/{owner}/{repo}/issues/{issue_number}/comments", | ||
"GET /repos/{owner}/{repo}/issues/{issue_number}/events", | ||
"GET /repos/{owner}/{repo}/issues/{issue_number}/labels", | ||
"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", | ||
"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", | ||
"GET /repos/{owner}/{repo}/keys", | ||
"GET /repos/{owner}/{repo}/labels", | ||
"GET /repos/{owner}/{repo}/milestones", | ||
"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels", | ||
"GET /repos/{owner}/{repo}/notifications", | ||
"GET /repos/{owner}/{repo}/pages/builds", | ||
"GET /repos/{owner}/{repo}/projects", | ||
"GET /repos/{owner}/{repo}/pulls", | ||
"GET /repos/{owner}/{repo}/pulls/comments", | ||
"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", | ||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments", | ||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits", | ||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/files", | ||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", | ||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews", | ||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", | ||
"GET /repos/{owner}/{repo}/releases", | ||
"GET /repos/{owner}/{repo}/releases/{release_id}/assets", | ||
"GET /repos/{owner}/{repo}/secret-scanning/alerts", | ||
"GET /repos/{owner}/{repo}/stargazers", | ||
"GET /repos/{owner}/{repo}/subscribers", | ||
"GET /repos/{owner}/{repo}/tags", | ||
"GET /repos/{owner}/{repo}/teams", | ||
"GET /repositories", | ||
"GET /repositories/{repository_id}/environments/{environment_name}/secrets", | ||
"GET /scim/v2/enterprises/{enterprise}/Groups", | ||
"GET /scim/v2/enterprises/{enterprise}/Users", | ||
"GET /scim/v2/organizations/{org}/Users", | ||
"GET /search/code", | ||
"GET /search/commits", | ||
"GET /search/issues", | ||
"GET /search/labels", | ||
"GET /search/repositories", | ||
"GET /search/topics", | ||
"GET /search/users", | ||
"GET /teams/{team_id}/discussions", | ||
"GET /teams/{team_id}/discussions/{discussion_number}/comments", | ||
"GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", | ||
"GET /teams/{team_id}/discussions/{discussion_number}/reactions", | ||
"GET /teams/{team_id}/invitations", | ||
"GET /teams/{team_id}/members", | ||
"GET /teams/{team_id}/projects", | ||
"GET /teams/{team_id}/repos", | ||
"GET /teams/{team_id}/team-sync/group-mappings", | ||
"GET /teams/{team_id}/teams", | ||
"GET /user/blocks", | ||
"GET /user/emails", | ||
"GET /user/followers", | ||
"GET /user/following", | ||
"GET /user/gpg_keys", | ||
"GET /user/installations", | ||
"GET /user/installations/{installation_id}/repositories", | ||
"GET /user/issues", | ||
"GET /user/keys", | ||
"GET /user/marketplace_purchases", | ||
"GET /user/marketplace_purchases/stubbed", | ||
"GET /user/memberships/orgs", | ||
"GET /user/migrations", | ||
"GET /user/migrations/{migration_id}/repositories", | ||
"GET /user/orgs", | ||
"GET /user/public_emails", | ||
"GET /user/repos", | ||
"GET /user/repository_invitations", | ||
"GET /user/starred", | ||
"GET /user/subscriptions", | ||
"GET /user/teams", | ||
"GET /users", | ||
"GET /users/{username}/events", | ||
"GET /users/{username}/events/orgs/{org}", | ||
"GET /users/{username}/events/public", | ||
"GET /users/{username}/followers", | ||
"GET /users/{username}/following", | ||
"GET /users/{username}/gists", | ||
"GET /users/{username}/gpg_keys", | ||
"GET /users/{username}/keys", | ||
"GET /users/{username}/orgs", | ||
"GET /users/{username}/projects", | ||
"GET /users/{username}/received_events", | ||
"GET /users/{username}/received_events/public", | ||
"GET /users/{username}/repos", | ||
"GET /users/{username}/starred", | ||
"GET /users/{username}/subscriptions", | ||
]; |
@@ -5,2 +5,3 @@ import { VERSION } from "./version"; | ||
export { composePaginateRest } from "./compose-paginate"; | ||
export { isPaginatingEndpoint, paginatingEndpoints, } from "./paginating-endpoints"; | ||
/** | ||
@@ -7,0 +8,0 @@ * @param octokit Octokit instance |
@@ -1,1 +0,1 @@ | ||
export const VERSION = "2.12.0"; | ||
export const VERSION = "2.13.0"; |
@@ -6,2 +6,3 @@ import { Octokit } from "@octokit/core"; | ||
export { composePaginateRest } from "./compose-paginate"; | ||
export { isPaginatingEndpoint, paginatingEndpoints, } from "./paginating-endpoints"; | ||
/** | ||
@@ -8,0 +9,0 @@ * @param octokit Octokit instance |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "2.12.0"; | ||
export declare const VERSION = "2.13.0"; |
@@ -1,2 +0,2 @@ | ||
const VERSION = "2.12.0"; | ||
const VERSION = "2.13.0"; | ||
@@ -97,2 +97,203 @@ /** | ||
const paginatingEndpoints = [ | ||
"GET /app/installations", | ||
"GET /applications/grants", | ||
"GET /authorizations", | ||
"GET /enterprises/{enterprise}/actions/permissions/organizations", | ||
"GET /enterprises/{enterprise}/actions/runner-groups", | ||
"GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations", | ||
"GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners", | ||
"GET /enterprises/{enterprise}/actions/runners", | ||
"GET /enterprises/{enterprise}/actions/runners/downloads", | ||
"GET /events", | ||
"GET /gists", | ||
"GET /gists/public", | ||
"GET /gists/starred", | ||
"GET /gists/{gist_id}/comments", | ||
"GET /gists/{gist_id}/commits", | ||
"GET /gists/{gist_id}/forks", | ||
"GET /installation/repositories", | ||
"GET /issues", | ||
"GET /marketplace_listing/plans", | ||
"GET /marketplace_listing/plans/{plan_id}/accounts", | ||
"GET /marketplace_listing/stubbed/plans", | ||
"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", | ||
"GET /networks/{owner}/{repo}/events", | ||
"GET /notifications", | ||
"GET /organizations", | ||
"GET /orgs/{org}/actions/permissions/repositories", | ||
"GET /orgs/{org}/actions/runner-groups", | ||
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", | ||
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners", | ||
"GET /orgs/{org}/actions/runners", | ||
"GET /orgs/{org}/actions/runners/downloads", | ||
"GET /orgs/{org}/actions/secrets", | ||
"GET /orgs/{org}/actions/secrets/{secret_name}/repositories", | ||
"GET /orgs/{org}/blocks", | ||
"GET /orgs/{org}/credential-authorizations", | ||
"GET /orgs/{org}/events", | ||
"GET /orgs/{org}/failed_invitations", | ||
"GET /orgs/{org}/hooks", | ||
"GET /orgs/{org}/installations", | ||
"GET /orgs/{org}/invitations", | ||
"GET /orgs/{org}/invitations/{invitation_id}/teams", | ||
"GET /orgs/{org}/issues", | ||
"GET /orgs/{org}/members", | ||
"GET /orgs/{org}/migrations", | ||
"GET /orgs/{org}/migrations/{migration_id}/repositories", | ||
"GET /orgs/{org}/outside_collaborators", | ||
"GET /orgs/{org}/projects", | ||
"GET /orgs/{org}/public_members", | ||
"GET /orgs/{org}/repos", | ||
"GET /orgs/{org}/team-sync/groups", | ||
"GET /orgs/{org}/teams", | ||
"GET /orgs/{org}/teams/{team_slug}/discussions", | ||
"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", | ||
"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", | ||
"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", | ||
"GET /orgs/{org}/teams/{team_slug}/invitations", | ||
"GET /orgs/{org}/teams/{team_slug}/members", | ||
"GET /orgs/{org}/teams/{team_slug}/projects", | ||
"GET /orgs/{org}/teams/{team_slug}/repos", | ||
"GET /orgs/{org}/teams/{team_slug}/team-sync/group-mappings", | ||
"GET /orgs/{org}/teams/{team_slug}/teams", | ||
"GET /projects/columns/{column_id}/cards", | ||
"GET /projects/{project_id}/collaborators", | ||
"GET /projects/{project_id}/columns", | ||
"GET /repos/{owner}/{repo}/actions/artifacts", | ||
"GET /repos/{owner}/{repo}/actions/runners", | ||
"GET /repos/{owner}/{repo}/actions/runners/downloads", | ||
"GET /repos/{owner}/{repo}/actions/runs", | ||
"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", | ||
"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", | ||
"GET /repos/{owner}/{repo}/actions/secrets", | ||
"GET /repos/{owner}/{repo}/actions/workflows", | ||
"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", | ||
"GET /repos/{owner}/{repo}/assignees", | ||
"GET /repos/{owner}/{repo}/branches", | ||
"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", | ||
"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", | ||
"GET /repos/{owner}/{repo}/code-scanning/alerts", | ||
"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", | ||
"GET /repos/{owner}/{repo}/code-scanning/analyses", | ||
"GET /repos/{owner}/{repo}/collaborators", | ||
"GET /repos/{owner}/{repo}/comments", | ||
"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", | ||
"GET /repos/{owner}/{repo}/commits", | ||
"GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", | ||
"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments", | ||
"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", | ||
"GET /repos/{owner}/{repo}/commits/{ref}/check-runs", | ||
"GET /repos/{owner}/{repo}/commits/{ref}/check-suites", | ||
"GET /repos/{owner}/{repo}/commits/{ref}/statuses", | ||
"GET /repos/{owner}/{repo}/contributors", | ||
"GET /repos/{owner}/{repo}/deployments", | ||
"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", | ||
"GET /repos/{owner}/{repo}/events", | ||
"GET /repos/{owner}/{repo}/forks", | ||
"GET /repos/{owner}/{repo}/git/matching-refs/{ref}", | ||
"GET /repos/{owner}/{repo}/hooks", | ||
"GET /repos/{owner}/{repo}/invitations", | ||
"GET /repos/{owner}/{repo}/issues", | ||
"GET /repos/{owner}/{repo}/issues/comments", | ||
"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", | ||
"GET /repos/{owner}/{repo}/issues/events", | ||
"GET /repos/{owner}/{repo}/issues/{issue_number}/comments", | ||
"GET /repos/{owner}/{repo}/issues/{issue_number}/events", | ||
"GET /repos/{owner}/{repo}/issues/{issue_number}/labels", | ||
"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", | ||
"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", | ||
"GET /repos/{owner}/{repo}/keys", | ||
"GET /repos/{owner}/{repo}/labels", | ||
"GET /repos/{owner}/{repo}/milestones", | ||
"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels", | ||
"GET /repos/{owner}/{repo}/notifications", | ||
"GET /repos/{owner}/{repo}/pages/builds", | ||
"GET /repos/{owner}/{repo}/projects", | ||
"GET /repos/{owner}/{repo}/pulls", | ||
"GET /repos/{owner}/{repo}/pulls/comments", | ||
"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", | ||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments", | ||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits", | ||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/files", | ||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", | ||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews", | ||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", | ||
"GET /repos/{owner}/{repo}/releases", | ||
"GET /repos/{owner}/{repo}/releases/{release_id}/assets", | ||
"GET /repos/{owner}/{repo}/secret-scanning/alerts", | ||
"GET /repos/{owner}/{repo}/stargazers", | ||
"GET /repos/{owner}/{repo}/subscribers", | ||
"GET /repos/{owner}/{repo}/tags", | ||
"GET /repos/{owner}/{repo}/teams", | ||
"GET /repositories", | ||
"GET /repositories/{repository_id}/environments/{environment_name}/secrets", | ||
"GET /scim/v2/enterprises/{enterprise}/Groups", | ||
"GET /scim/v2/enterprises/{enterprise}/Users", | ||
"GET /scim/v2/organizations/{org}/Users", | ||
"GET /search/code", | ||
"GET /search/commits", | ||
"GET /search/issues", | ||
"GET /search/labels", | ||
"GET /search/repositories", | ||
"GET /search/topics", | ||
"GET /search/users", | ||
"GET /teams/{team_id}/discussions", | ||
"GET /teams/{team_id}/discussions/{discussion_number}/comments", | ||
"GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", | ||
"GET /teams/{team_id}/discussions/{discussion_number}/reactions", | ||
"GET /teams/{team_id}/invitations", | ||
"GET /teams/{team_id}/members", | ||
"GET /teams/{team_id}/projects", | ||
"GET /teams/{team_id}/repos", | ||
"GET /teams/{team_id}/team-sync/group-mappings", | ||
"GET /teams/{team_id}/teams", | ||
"GET /user/blocks", | ||
"GET /user/emails", | ||
"GET /user/followers", | ||
"GET /user/following", | ||
"GET /user/gpg_keys", | ||
"GET /user/installations", | ||
"GET /user/installations/{installation_id}/repositories", | ||
"GET /user/issues", | ||
"GET /user/keys", | ||
"GET /user/marketplace_purchases", | ||
"GET /user/marketplace_purchases/stubbed", | ||
"GET /user/memberships/orgs", | ||
"GET /user/migrations", | ||
"GET /user/migrations/{migration_id}/repositories", | ||
"GET /user/orgs", | ||
"GET /user/public_emails", | ||
"GET /user/repos", | ||
"GET /user/repository_invitations", | ||
"GET /user/starred", | ||
"GET /user/subscriptions", | ||
"GET /user/teams", | ||
"GET /users", | ||
"GET /users/{username}/events", | ||
"GET /users/{username}/events/orgs/{org}", | ||
"GET /users/{username}/events/public", | ||
"GET /users/{username}/followers", | ||
"GET /users/{username}/following", | ||
"GET /users/{username}/gists", | ||
"GET /users/{username}/gpg_keys", | ||
"GET /users/{username}/keys", | ||
"GET /users/{username}/orgs", | ||
"GET /users/{username}/projects", | ||
"GET /users/{username}/received_events", | ||
"GET /users/{username}/received_events/public", | ||
"GET /users/{username}/repos", | ||
"GET /users/{username}/starred", | ||
"GET /users/{username}/subscriptions", | ||
]; | ||
function isPaginatingEndpoint(arg) { | ||
if (typeof arg === "string") { | ||
return paginatingEndpoints.includes(arg); | ||
} | ||
else { | ||
return false; | ||
} | ||
} | ||
/** | ||
@@ -111,3 +312,3 @@ * @param octokit Octokit instance | ||
export { composePaginateRest, paginateRest }; | ||
export { composePaginateRest, isPaginatingEndpoint, paginateRest, paginatingEndpoints }; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@octokit/plugin-paginate-rest", | ||
"description": "Octokit plugin to paginate REST API endpoint responses", | ||
"version": "2.12.0", | ||
"version": "2.13.0", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "files": [ |
@@ -186,2 +186,78 @@ # plugin-paginate-rest.js | ||
## Types | ||
The plugin also exposes some types and runtime type guards for TypeScript projects. | ||
<table> | ||
<tbody valign=top align=left> | ||
<tr><th> | ||
<tr><th> | ||
Types | ||
</th><td> | ||
```typescript | ||
import { | ||
PaginateInterface, | ||
PaginatingEndpoints, | ||
} from "@octokit/plugin-paginate-rest"; | ||
``` | ||
</td></tr> | ||
<tr><th> | ||
Guards | ||
</th><td> | ||
```typescript | ||
import { isPaginatingEndpoint } from "@octokit/plugin-paginate-rest"; | ||
``` | ||
</td></tr> | ||
</tbody> | ||
</table> | ||
### PaginateInterface | ||
An `interface` that declares all the overloads of the `.paginate` method. | ||
### PaginatingEndpoints | ||
An `interface` which describes all API endpoints supported by the plugin. Some overloads of `.paginate()` method and `composePaginateRest()` function depend on `PaginatingEndpoints`, using the `keyof PaginatingEndpoints` as a type for one of its arguments. | ||
```typescript | ||
import { Octokit } from "@octokit/core"; | ||
import { | ||
PaginatingEndpoints, | ||
composePaginateRest, | ||
} from "@octokit/plugin-paginate-rest"; | ||
type DataType<T> = "data" extends keyof T ? T["data"] : unknown; | ||
async function myPaginatePlugin<E extends keyof PaginatingEndpoints>( | ||
octokit: Octokit, | ||
endpoint: E, | ||
parameters?: PaginatingEndpoints[E]["parameters"] | ||
): Promise<DataType<PaginatingEndpoints[E]["response"]>> { | ||
return await composePaginateRest(octokit, endpoint, parameters); | ||
} | ||
``` | ||
### isPaginatingEndpoint | ||
A type guard, `isPaginatingEndpoint(arg)` returns `true` if `arg` is one of the keys in `PaginatingEndpoints` (is `keyof PaginatingEndpoints`). | ||
```typescript | ||
import { Octokit } from "@octokit/core"; | ||
import { | ||
isPaginatingEndpoint, | ||
composePaginateRest, | ||
} from "@octokit/plugin-paginate-rest"; | ||
async function myPlugin(octokit: Octokit, arg: unknown) { | ||
if (isPaginatingEndpoint(arg)) { | ||
return await composePaginateRest(octokit, arg); | ||
} | ||
// ... | ||
} | ||
``` | ||
## Contributing | ||
@@ -188,0 +264,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
183650
25
2478
269