diff --git a/index.d.ts b/index.d.ts index 2014dc82..26e6c85a 100644 --- a/index.d.ts +++ b/index.d.ts @@ -14796,7 +14796,7 @@ declare namespace Octokit { collaborators: number; company: string; created_at: string; - default_repository_settings: string; + default_repository_permission: string; description: string; disk_usage: number; email: string; @@ -15212,7 +15212,7 @@ declare namespace Octokit { collaborators?: number; company: string; created_at: string; - default_repository_settings?: string; + default_repository_permission?: string; description: string; disk_usage?: number; email: string; @@ -27657,9 +27657,9 @@ declare namespace Octokit { */ per_page?: number; /** - * The integer ID of the last Organization that you've seen. + * The integer ID of the last organization that you've seen. */ - since?: string; + since?: number; }; export type OrgsListBlockedUsersParams = { org: string; @@ -31269,9 +31269,9 @@ declare namespace Octokit { */ per_page?: number; /** - * The integer ID of the last Repository that you've seen. + * The integer ID of the last repository that you've seen. */ - since?: string; + since?: number; }; export type ReposListPullRequestsAssociatedWithCommitParams = { commit_sha: string; @@ -34473,9 +34473,7 @@ declare class Octokit { endpoint: Octokit.Endpoint; }; /** - * Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. - * - * By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the `repository_ids` when creating the token. When you omit `repository_ids`, the response does not contain the `repositories` key. + * Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the `repository_ids` when creating the token. When you omit `repository_ids`, the response does not contain the `repositories` key. * * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. * diff --git a/scripts/update-endpoints/generated/endpoints.json b/scripts/update-endpoints/generated/endpoints.json index 0471e458..d227928c 100644 --- a/scripts/update-endpoints/generated/endpoints.json +++ b/scripts/update-endpoints/generated/endpoints.json @@ -218,7 +218,7 @@ "url": "/app/installations/{installation_id}/access_tokens", "isDeprecated": false, "isLegacy": false, - "description": "Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token.\n\nBy default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the `repository_ids` when creating the token. When you omit `repository_ids`, the response does not contain the `repositories` key.\n\nYou must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.\n\nThis example grants the token \"Read and write\" permission to `issues` and \"Read\" permission to `contents`, and restricts the token's access to the repository with an `id` of 1296269.", + "description": "Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the `repository_ids` when creating the token. When you omit `repository_ids`, the response does not contain the `repositories` key.\n\nYou must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.\n\nThis example grants the token \"Read and write\" permission to `issues` and \"Read\" permission to `contents`, and restricts the token's access to the repository with an `id` of 1296269.", "documentationUrl": "https://developer.github.com/v3/apps/#create-a-new-installation-token", "previews": [{ "name": "machine-man" }], "headers": [ @@ -4648,9 +4648,9 @@ "parameters": [ { "name": "since", - "description": "The integer ID of the last Organization that you've seen.", + "description": "The integer ID of the last organization that you've seen.", "in": "QUERY", - "type": "string", + "type": "integer", "required": false, "enum": null, "allowNull": false, @@ -4732,7 +4732,7 @@ "description": "response", "examples": [ { - "data": "{\"login\":\"github\",\"id\":1,\"node_id\":\"MDEyOk9yZ2FuaXphdGlvbjE=\",\"url\":\"https://api.github.com/orgs/github\",\"repos_url\":\"https://api.github.com/orgs/github/repos\",\"events_url\":\"https://api.github.com/orgs/github/events\",\"hooks_url\":\"https://api.github.com/orgs/github/hooks\",\"issues_url\":\"https://api.github.com/orgs/github/issues\",\"members_url\":\"https://api.github.com/orgs/github/members{/member}\",\"public_members_url\":\"https://api.github.com/orgs/github/public_members{/member}\",\"avatar_url\":\"https://github.com/images/error/octocat_happy.gif\",\"description\":\"A great organization\",\"name\":\"github\",\"company\":\"GitHub\",\"blog\":\"https://github.com/blog\",\"location\":\"San Francisco\",\"email\":\"octocat@github.com\",\"is_verified\":true,\"has_organization_projects\":true,\"has_repository_projects\":true,\"public_repos\":2,\"public_gists\":1,\"followers\":20,\"following\":0,\"html_url\":\"https://github.com/octocat\",\"created_at\":\"2008-01-14T04:33:35Z\",\"type\":\"Organization\",\"total_private_repos\":100,\"owned_private_repos\":100,\"private_gists\":81,\"disk_usage\":10000,\"collaborators\":8,\"billing_email\":\"support@github.com\",\"plan\":{\"name\":\"Medium\",\"space\":400,\"private_repos\":20},\"default_repository_settings\":\"read\",\"members_can_create_repositories\":true,\"two_factor_requirement_enabled\":true,\"members_allowed_repository_creation_type\":\"all\",\"members_can_create_public_repositories\":false,\"members_can_create_private_repositories\":false,\"members_can_create_internal_repositories\":false}" + "data": "{\"login\":\"github\",\"id\":1,\"node_id\":\"MDEyOk9yZ2FuaXphdGlvbjE=\",\"url\":\"https://api.github.com/orgs/github\",\"repos_url\":\"https://api.github.com/orgs/github/repos\",\"events_url\":\"https://api.github.com/orgs/github/events\",\"hooks_url\":\"https://api.github.com/orgs/github/hooks\",\"issues_url\":\"https://api.github.com/orgs/github/issues\",\"members_url\":\"https://api.github.com/orgs/github/members{/member}\",\"public_members_url\":\"https://api.github.com/orgs/github/public_members{/member}\",\"avatar_url\":\"https://github.com/images/error/octocat_happy.gif\",\"description\":\"A great organization\",\"name\":\"github\",\"company\":\"GitHub\",\"blog\":\"https://github.com/blog\",\"location\":\"San Francisco\",\"email\":\"octocat@github.com\",\"is_verified\":true,\"has_organization_projects\":true,\"has_repository_projects\":true,\"public_repos\":2,\"public_gists\":1,\"followers\":20,\"following\":0,\"html_url\":\"https://github.com/octocat\",\"created_at\":\"2008-01-14T04:33:35Z\",\"type\":\"Organization\",\"total_private_repos\":100,\"owned_private_repos\":100,\"private_gists\":81,\"disk_usage\":10000,\"collaborators\":8,\"billing_email\":\"support@github.com\",\"plan\":{\"name\":\"Medium\",\"space\":400,\"private_repos\":20},\"default_repository_permission\":\"read\",\"members_can_create_repositories\":true,\"two_factor_requirement_enabled\":true,\"members_allowed_repository_creation_type\":\"all\",\"members_can_create_public_repositories\":false,\"members_can_create_private_repositories\":false,\"members_can_create_internal_repositories\":false}" }, { "data": "{\"login\":\"github\",\"id\":1,\"node_id\":\"MDEyOk9yZ2FuaXphdGlvbjE=\",\"url\":\"https://api.github.com/orgs/github\",\"repos_url\":\"https://api.github.com/orgs/github/repos\",\"events_url\":\"https://api.github.com/orgs/github/events\",\"hooks_url\":\"https://api.github.com/orgs/github/hooks\",\"issues_url\":\"https://api.github.com/orgs/github/issues\",\"members_url\":\"https://api.github.com/orgs/github/members{/member}\",\"public_members_url\":\"https://api.github.com/orgs/github/public_members{/member}\",\"avatar_url\":\"https://github.com/images/error/octocat_happy.gif\",\"description\":\"A great organization\",\"name\":\"github\",\"company\":\"GitHub\",\"blog\":\"https://github.com/blog\",\"location\":\"San Francisco\",\"email\":\"octocat@github.com\",\"is_verified\":true,\"has_organization_projects\":true,\"has_repository_projects\":true,\"public_repos\":2,\"public_gists\":1,\"followers\":20,\"following\":0,\"html_url\":\"https://github.com/octocat\",\"created_at\":\"2008-01-14T04:33:35Z\",\"type\":\"Organization\",\"plan\":{\"name\":\"team\",\"space\":976562499,\"private_repos\":999999,\"filled_seats\":4,\"seats\":5}}" @@ -4957,7 +4957,7 @@ "description": "response", "examples": [ { - "data": "{\"login\":\"github\",\"id\":1,\"node_id\":\"MDEyOk9yZ2FuaXphdGlvbjE=\",\"url\":\"https://api.github.com/orgs/github\",\"repos_url\":\"https://api.github.com/orgs/github/repos\",\"events_url\":\"https://api.github.com/orgs/github/events\",\"hooks_url\":\"https://api.github.com/orgs/github/hooks\",\"issues_url\":\"https://api.github.com/orgs/github/issues\",\"members_url\":\"https://api.github.com/orgs/github/members{/member}\",\"public_members_url\":\"https://api.github.com/orgs/github/public_members{/member}\",\"avatar_url\":\"https://github.com/images/error/octocat_happy.gif\",\"description\":\"A great organization\",\"name\":\"github\",\"company\":\"GitHub\",\"blog\":\"https://github.com/blog\",\"location\":\"San Francisco\",\"email\":\"octocat@github.com\",\"is_verified\":true,\"has_organization_projects\":true,\"has_repository_projects\":true,\"public_repos\":2,\"public_gists\":1,\"followers\":20,\"following\":0,\"html_url\":\"https://github.com/octocat\",\"created_at\":\"2008-01-14T04:33:35Z\",\"type\":\"Organization\",\"total_private_repos\":100,\"owned_private_repos\":100,\"private_gists\":81,\"disk_usage\":10000,\"collaborators\":8,\"billing_email\":\"support@github.com\",\"plan\":{\"name\":\"Medium\",\"space\":400,\"private_repos\":20},\"default_repository_settings\":\"read\",\"members_can_create_repositories\":true,\"two_factor_requirement_enabled\":true,\"members_allowed_repository_creation_type\":\"all\",\"members_can_create_public_repositories\":false,\"members_can_create_private_repositories\":false,\"members_can_create_internal_repositories\":false}" + "data": "{\"login\":\"github\",\"id\":1,\"node_id\":\"MDEyOk9yZ2FuaXphdGlvbjE=\",\"url\":\"https://api.github.com/orgs/github\",\"repos_url\":\"https://api.github.com/orgs/github/repos\",\"events_url\":\"https://api.github.com/orgs/github/events\",\"hooks_url\":\"https://api.github.com/orgs/github/hooks\",\"issues_url\":\"https://api.github.com/orgs/github/issues\",\"members_url\":\"https://api.github.com/orgs/github/members{/member}\",\"public_members_url\":\"https://api.github.com/orgs/github/public_members{/member}\",\"avatar_url\":\"https://github.com/images/error/octocat_happy.gif\",\"description\":\"A great organization\",\"name\":\"github\",\"company\":\"GitHub\",\"blog\":\"https://github.com/blog\",\"location\":\"San Francisco\",\"email\":\"octocat@github.com\",\"is_verified\":true,\"has_organization_projects\":true,\"has_repository_projects\":true,\"public_repos\":2,\"public_gists\":1,\"followers\":20,\"following\":0,\"html_url\":\"https://github.com/octocat\",\"created_at\":\"2008-01-14T04:33:35Z\",\"type\":\"Organization\",\"total_private_repos\":100,\"owned_private_repos\":100,\"private_gists\":81,\"disk_usage\":10000,\"collaborators\":8,\"billing_email\":\"support@github.com\",\"plan\":{\"name\":\"Medium\",\"space\":400,\"private_repos\":20},\"default_repository_permission\":\"read\",\"members_can_create_repositories\":true,\"two_factor_requirement_enabled\":true,\"members_allowed_repository_creation_type\":\"all\",\"members_can_create_public_repositories\":false,\"members_can_create_private_repositories\":false,\"members_can_create_internal_repositories\":false}" } ] } @@ -35853,6 +35853,140 @@ ], "renamed": null }, + { + "name": "Upload a release asset", + "scope": "repos", + "id": "uploadReleaseAsset", + "method": "POST", + "url": "{origin}/repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}", + "isDeprecated": false, + "isLegacy": false, + "description": "This endpoint makes use of [a Hypermedia relation](https://developer.github.com/v3/#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in the response of the [Create a release endpoint](https://developer.github.com/v3/repos/releases/#create-a-release) to upload a release asset.\n\nYou need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint.\n\nMost libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example:\n\n`application/zip`\n\nGitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, you'll still need to pass your authentication to be able to upload an asset.\n\n**Notes:**\n\n* GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The \"[List assets for a release](https://developer.github.com/v3/repos/releases/#list-assets-for-a-release)\" endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://github.com/contact).\n* If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset.\n\nThis may leave an empty asset with a state of `starter`. It can be safely deleted.", + "documentationUrl": "https://developer.github.com/v3/repos/releases/#upload-a-release-asset", + "previews": [], + "headers": [ + { "name": "content-length", "value": null }, + { "name": "content-type", "value": null } + ], + "parameters": [ + { + "name": "owner", + "description": "owner parameter", + "in": "PATH", + "type": "string", + "required": true, + "enum": null, + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "repo", + "description": "repo parameter", + "in": "PATH", + "type": "string", + "required": true, + "enum": null, + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "release_id", + "description": "release_id parameter", + "in": "PATH", + "type": "integer", + "required": true, + "enum": null, + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "name", + "description": "name parameter", + "in": "QUERY", + "type": "string", + "required": false, + "enum": null, + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "label", + "description": "label parameter", + "in": "QUERY", + "type": "string", + "required": false, + "enum": null, + "allowNull": false, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "data", + "description": "The raw file data", + "in": "BODY", + "type": "string", + "required": true, + "enum": null, + "allowNull": false, + "mapToData": true, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "origin", + "description": "The URL origin (protocol + host name + port) is included in `upload_url` returned in the response of the \"Create a release\" endpoint", + "in": "PATH", + "type": "string", + "required": null, + "enum": null, + "allowNull": null, + "mapToData": null, + "validation": null, + "alias": null, + "deprecated": null + }, + { + "name": "file", + "description": null, + "in": null, + "type": null, + "required": null, + "enum": null, + "allowNull": null, + "mapToData": null, + "validation": null, + "alias": "data", + "deprecated": true + } + ], + "responses": [ + { + "code": 201, + "description": "Response for successful upload", + "examples": [ + { + "data": "{\"url\":\"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\"browser_download_url\":\"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\"id\":1,\"node_id\":\"MDEyOlJlbGVhc2VBc3NldDE=\",\"name\":\"example.zip\",\"label\":\"short description\",\"state\":\"uploaded\",\"content_type\":\"application/zip\",\"size\":1024,\"download_count\":42,\"created_at\":\"2013-02-27T19:35:32Z\",\"updated_at\":\"2013-02-27T19:35:32Z\",\"uploader\":{\"login\":\"octocat\",\"id\":1,\"node_id\":\"MDQ6VXNlcjE=\",\"avatar_url\":\"https://github.com/images/error/octocat_happy.gif\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/octocat\",\"html_url\":\"https://github.com/octocat\",\"followers_url\":\"https://api.github.com/users/octocat/followers\",\"following_url\":\"https://api.github.com/users/octocat/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/octocat/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/octocat/subscriptions\",\"organizations_url\":\"https://api.github.com/users/octocat/orgs\",\"repos_url\":\"https://api.github.com/users/octocat/repos\",\"events_url\":\"https://api.github.com/users/octocat/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/octocat/received_events\",\"type\":\"User\",\"site_admin\":false}}" + } + ] + } + ], + "renamed": null + }, { "name": "List Stargazers", "scope": "activity", @@ -37502,9 +37636,9 @@ "parameters": [ { "name": "since", - "description": "The integer ID of the last Repository that you've seen.", + "description": "The integer ID of the last repository that you've seen.", "in": "QUERY", - "type": "string", + "type": "integer", "required": false, "enum": null, "allowNull": false,