diff --git a/cache/openapi-schema.json b/cache/openapi-schema.json index 7e3f7e8d0..f757a0072 100644 --- a/cache/openapi-schema.json +++ b/cache/openapi-schema.json @@ -1,7 +1,7 @@ { "openapi": "3.0.3", "info": { - "version": "2.10.0", + "version": "2.11.0", "title": "GitHub's official OpenAPI spec + Octokit extension", "description": "OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs", "license": { "name": "MIT", "url": "https://spdx.org/licenses/MIT" }, @@ -8892,6 +8892,253 @@ "x-octokit": {} } }, + "/orgs/{org}/packages/{package_type}/{package_name}": { + "get": { + "summary": "Get a package for an organization", + "description": "Gets a specific package in an organization.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` scope.\nIf `package_type` is not `container`, your token must also include the `repo` scope.", + "tags": ["packages"], + "operationId": "packages/get-package-for-organization", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/reference/packages#get-a-package-for-an-organization" + }, + "parameters": [ + { "$ref": "#/components/parameters/package_type" }, + { "$ref": "#/components/parameters/package_name" }, + { "$ref": "#/components/parameters/org" } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/package" }, + "examples": { + "default": { "$ref": "#/components/examples/package-org" } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "packages", + "subcategory": null + }, + "x-octokit": {} + }, + "delete": { + "summary": "Delete a package for an organization", + "description": "Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 25 downloads. In this scenario, contact GitHub support for further assistance.\n\nTo use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` scope. In addition:\n- If `package_type` is not `container`, your token must also include the `repo` scope.\n- If `package_type` is `container`, you must also have admin permissions to the container you want to delete.", + "tags": ["packages"], + "operationId": "packages/delete-package-for-org", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/reference/packages#delete-a-package-for-an-organization" + }, + "parameters": [ + { "$ref": "#/components/parameters/package_type" }, + { "$ref": "#/components/parameters/package_name" }, + { "$ref": "#/components/parameters/org" } + ], + "responses": { + "204": { "description": "Empty response" }, + "401": { "$ref": "#/components/responses/requires_authentication" }, + "403": { "$ref": "#/components/responses/forbidden" }, + "404": { "$ref": "#/components/responses/not_found" } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "packages", + "subcategory": null + }, + "x-octokit": {} + } + }, + "/orgs/{org}/packages/{package_type}/{package_name}/restore": { + "post": { + "summary": "Restore a package for an organization", + "description": "Restores an entire package in an organization.\n\nYou can restore a deleted package under the following conditions:\n - The package was deleted within the last 30 days.\n - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.\n\nTo use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scope. In addition:\n- If `package_type` is not `container`, your token must also include the `repo` scope.\n- If `package_type` is `container`, you must also have admin permissions to the container that you want to restore.", + "tags": ["packages"], + "operationId": "packages/restore-package-for-org", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/reference/packages#restore-a-package-for-an-organization" + }, + "parameters": [ + { "$ref": "#/components/parameters/package_type" }, + { "$ref": "#/components/parameters/package_name" }, + { "$ref": "#/components/parameters/org" } + ], + "responses": { + "204": { "description": "Empty response" }, + "401": { "$ref": "#/components/responses/requires_authentication" }, + "403": { "$ref": "#/components/responses/forbidden" }, + "404": { "$ref": "#/components/responses/not_found" } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "packages", + "subcategory": null + }, + "x-octokit": {} + } + }, + "/orgs/{org}/packages/{package_type}/{package_name}/versions": { + "get": { + "summary": "Get all package versions for a package owned by an organization", + "description": "Returns all package versions for a package owned by an organization.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` scope.\nIf `package_type` is not `container`, your token must also include the `repo` scope.", + "tags": ["packages"], + "operationId": "packages/get-all-package-versions-for-a-package-owned-by-an-org", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user" + }, + "parameters": [ + { "$ref": "#/components/parameters/package_type" }, + { "$ref": "#/components/parameters/package_name" }, + { "$ref": "#/components/parameters/org" } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/package-version" } + }, + "examples": { + "default": { + "$ref": "#/components/examples/package-versions-for-org" + } + } + } + } + }, + "401": { "$ref": "#/components/responses/requires_authentication" }, + "403": { "$ref": "#/components/responses/forbidden" }, + "404": { "$ref": "#/components/responses/not_found" } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "packages", + "subcategory": null + }, + "x-octokit": {} + } + }, + "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": { + "get": { + "summary": "Get a package version for an organization", + "description": "Gets a specific package version in an organization.\n\nYou must authenticate using an access token with the `packages:read` scope.\nIf `package_type` is not `container`, your token must also include the `repo` scope.", + "tags": ["packages"], + "operationId": "packages/get-package-version-for-organization", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/reference/packages#get-a-package-version-for-an-organization" + }, + "parameters": [ + { "$ref": "#/components/parameters/package_type" }, + { "$ref": "#/components/parameters/package_name" }, + { "$ref": "#/components/parameters/org" }, + { "$ref": "#/components/parameters/package_version_id" } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/package-version" }, + "examples": { + "default": { + "$ref": "#/components/examples/package-version-org" + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "packages", + "subcategory": null + }, + "x-octokit": {} + }, + "delete": { + "summary": "Delete package version for an organization", + "description": "Deletes a specific package version in an organization. If the package is public and the package version has more than 25 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.\n\nTo use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` scope. In addition:\n- If `package_type` is not `container`, your token must also include the `repo` scope.\n- If `package_type` is `container`, you must also have admin permissions to the container you want to delete.", + "tags": ["packages"], + "operationId": "packages/delete-package-version-for-org", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/reference/packages#delete-a-package-version-for-an-organization" + }, + "parameters": [ + { "$ref": "#/components/parameters/package_type" }, + { "$ref": "#/components/parameters/package_name" }, + { "$ref": "#/components/parameters/org" }, + { "$ref": "#/components/parameters/package_version_id" } + ], + "responses": { + "204": { "description": "Empty response" }, + "401": { "$ref": "#/components/responses/requires_authentication" }, + "403": { "$ref": "#/components/responses/forbidden" }, + "404": { "$ref": "#/components/responses/not_found" } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "packages", + "subcategory": null + }, + "x-octokit": {} + } + }, + "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + "post": { + "summary": "Restore package version for an organization", + "description": "Restores a specific package version in an organization.\n\nYou can restore a deleted package under the following conditions:\n - The package was deleted within the last 30 days.\n - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.\n\nTo use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scope. In addition:\n- If `package_type` is not `container`, your token must also include the `repo` scope.\n- If `package_type` is `container`, you must also have admin permissions to the container that you want to restore.", + "tags": ["packages"], + "operationId": "packages/restore-package-version-for-org", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/reference/packages#restore-a-package-version-for-an-organization" + }, + "parameters": [ + { "$ref": "#/components/parameters/package_type" }, + { "$ref": "#/components/parameters/package_name" }, + { "$ref": "#/components/parameters/org" }, + { "$ref": "#/components/parameters/package_version_id" } + ], + "responses": { + "204": { "description": "Empty response" }, + "401": { "$ref": "#/components/responses/requires_authentication" }, + "403": { "$ref": "#/components/responses/forbidden" }, + "404": { "$ref": "#/components/responses/not_found" } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "packages", + "subcategory": null + }, + "x-octokit": {} + } + }, "/orgs/{org}/projects": { "get": { "summary": "List organization projects", @@ -35497,6 +35744,246 @@ "x-octokit": {} } }, + "/user/packages/{package_type}/{package_name}": { + "get": { + "summary": "Get a package for the authenticated user", + "description": "Gets a specific package for a package owned by the authenticated user.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` scope.\nIf `package_type` is not `container`, your token must also include the `repo` scope.", + "tags": ["packages"], + "operationId": "packages/get-package-for-authenticated-user", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/reference/packages#get-a-package-for-the-authenticated-user" + }, + "parameters": [ + { "$ref": "#/components/parameters/package_type" }, + { "$ref": "#/components/parameters/package_name" } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/package" }, + "examples": { + "default": { "$ref": "#/components/examples/package-user" } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "packages", + "subcategory": null + }, + "x-octokit": {} + }, + "delete": { + "summary": "Delete a package for the authenticated user", + "description": "Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 25 downloads. In this scenario, contact GitHub support for further assistance.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scope.\nIf `package_type` is not `container`, your token must also include the `repo` scope.", + "tags": ["packages"], + "operationId": "packages/delete-package-for-authenticated-user", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/reference/packages#delete-a-package-for-the-authenticated-user" + }, + "parameters": [ + { "$ref": "#/components/parameters/package_type" }, + { "$ref": "#/components/parameters/package_name" } + ], + "responses": { + "204": { "description": "Empty response" }, + "401": { "$ref": "#/components/responses/requires_authentication" }, + "403": { "$ref": "#/components/responses/forbidden" }, + "404": { "$ref": "#/components/responses/not_found" } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "packages", + "subcategory": null + }, + "x-octokit": {} + } + }, + "/user/packages/{package_type}/{package_name}/restore": { + "post": { + "summary": "Restore a package for the authenticated user", + "description": "Restores a package owned by the authenticated user.\n\nYou can restore a deleted package under the following conditions:\n - The package was deleted within the last 30 days.\n - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scope. If `package_type` is not `container`, your token must also include the `repo` scope.", + "tags": ["packages"], + "operationId": "packages/restore-package-for-authenticated-user", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/reference/packages#restore-a-package-for-the-authenticated-user" + }, + "parameters": [ + { "$ref": "#/components/parameters/package_type" }, + { "$ref": "#/components/parameters/package_name" } + ], + "responses": { + "204": { "description": "Empty response" }, + "401": { "$ref": "#/components/responses/requires_authentication" }, + "403": { "$ref": "#/components/responses/forbidden" }, + "404": { "$ref": "#/components/responses/not_found" } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "packages", + "subcategory": null + }, + "x-octokit": {} + } + }, + "/user/packages/{package_type}/{package_name}/versions": { + "get": { + "summary": "Get all package versions for a package owned by the authenticated user", + "description": "Returns all package versions for a package owned by the authenticated user.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` scope.\nIf `package_type` is not `container`, your token must also include the `repo` scope.", + "tags": ["packages"], + "operationId": "packages/get-all-package-versions-for-a-package-owned-by-the-authenticated-user", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user" + }, + "parameters": [ + { "$ref": "#/components/parameters/package_type" }, + { "$ref": "#/components/parameters/package_name" } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/package-version" } + }, + "examples": { + "default": { + "$ref": "#/components/examples/package-versions-for-authenticated-user" + } + } + } + } + }, + "401": { "$ref": "#/components/responses/requires_authentication" }, + "403": { "$ref": "#/components/responses/forbidden" }, + "404": { "$ref": "#/components/responses/not_found" } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "packages", + "subcategory": null + }, + "x-octokit": {} + } + }, + "/user/packages/{package_type}/{package_name}/versions/{package_version_id}": { + "get": { + "summary": "Get a package version for the authenticated user", + "description": "Gets a specific package version for a package owned by the authenticated user.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` scope.\nIf `package_type` is not `container`, your token must also include the `repo` scope.", + "tags": ["packages"], + "operationId": "packages/get-package-version-for-authenticated-user", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/reference/packages#get-a-package-version-for-the-authenticated-user" + }, + "parameters": [ + { "$ref": "#/components/parameters/package_type" }, + { "$ref": "#/components/parameters/package_name" }, + { "$ref": "#/components/parameters/package_version_id" } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/package-version" }, + "examples": { + "default": { + "$ref": "#/components/examples/package-version-authenticated-user" + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "packages", + "subcategory": null + }, + "x-octokit": {} + }, + "delete": { + "summary": "Delete a package version for the authenticated user", + "description": "Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 25 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.\n\nTo use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` scope.\nIf `package_type` is not `container`, your token must also include the `repo` scope.", + "tags": ["packages"], + "operationId": "packages/delete-package-version-for-authenticated-user", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/reference/packages#delete-a-package-version-for-the-authenticated-user" + }, + "parameters": [ + { "$ref": "#/components/parameters/package_type" }, + { "$ref": "#/components/parameters/package_name" }, + { "$ref": "#/components/parameters/package_version_id" } + ], + "responses": { + "204": { "description": "Empty response" }, + "401": { "$ref": "#/components/responses/requires_authentication" }, + "403": { "$ref": "#/components/responses/forbidden" }, + "404": { "$ref": "#/components/responses/not_found" } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "packages", + "subcategory": null + }, + "x-octokit": {} + } + }, + "/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + "post": { + "summary": "Restore a package version for the authenticated user", + "description": "Restores a package version owned by the authenticated user.\n\nYou can restore a deleted package version under the following conditions:\n - The package was deleted within the last 30 days.\n - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scope. If `package_type` is not `container`, your token must also include the `repo` scope.", + "tags": ["packages"], + "operationId": "packages/restore-package-version-for-authenticated-user", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/reference/packages#restore-a-package-version-for-the-authenticated-user" + }, + "parameters": [ + { "$ref": "#/components/parameters/package_type" }, + { "$ref": "#/components/parameters/package_name" }, + { "$ref": "#/components/parameters/package_version_id" } + ], + "responses": { + "204": { "description": "Empty response" }, + "401": { "$ref": "#/components/responses/requires_authentication" }, + "403": { "$ref": "#/components/responses/forbidden" }, + "404": { "$ref": "#/components/responses/not_found" } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "packages", + "subcategory": null + }, + "x-octokit": {} + } + }, "/user/projects": { "post": { "summary": "Create a user project", @@ -36815,6 +37302,131 @@ "x-octokit": {} } }, + "/users/{username}/packages/{package_type}/{package_name}": { + "get": { + "summary": "Get a package for a user", + "description": "Gets a specific package metadata for a public package owned by a user.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` scope.\nIf `package_type` is not `container`, your token must also include the `repo` scope.", + "tags": ["packages"], + "operationId": "packages/get-package-for-user", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/reference/packages#get-a-package-for-a-user" + }, + "parameters": [ + { "$ref": "#/components/parameters/package_type" }, + { "$ref": "#/components/parameters/package_name" }, + { "$ref": "#/components/parameters/username" } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/package" }, + "examples": { + "default": { "$ref": "#/components/examples/package-user" } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "packages", + "subcategory": null + }, + "x-octokit": {} + } + }, + "/users/{username}/packages/{package_type}/{package_name}/versions": { + "get": { + "summary": "Get all package versions for a package owned by a user", + "description": "Returns all package versions for a public package owned by a specified user.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` scope.\nIf `package_type` is not `container`, your token must also include the `repo` scope.", + "tags": ["packages"], + "operationId": "packages/get-all-package-versions-for-package-owned-by-user", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-a-user" + }, + "parameters": [ + { "$ref": "#/components/parameters/package_type" }, + { "$ref": "#/components/parameters/package_name" }, + { "$ref": "#/components/parameters/username" } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/package-version" } + }, + "examples": { + "default": { + "$ref": "#/components/examples/package-versions-for-user" + } + } + } + } + }, + "401": { "$ref": "#/components/responses/requires_authentication" }, + "403": { "$ref": "#/components/responses/forbidden" }, + "404": { "$ref": "#/components/responses/not_found" } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "packages", + "subcategory": null + }, + "x-octokit": {} + } + }, + "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": { + "get": { + "summary": "Get a package version for a user", + "description": "Gets a specific package version for a public package owned by a specified user.\n\nAt this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope.\nIf `package_type` is not `container`, your token must also include the `repo` scope.", + "tags": ["packages"], + "operationId": "packages/get-package-version-for-user", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/reference/packages#get-a-package-version-for-a-user" + }, + "parameters": [ + { "$ref": "#/components/parameters/package_type" }, + { "$ref": "#/components/parameters/package_name" }, + { "$ref": "#/components/parameters/package_version_id" }, + { "$ref": "#/components/parameters/username" } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/package-version" }, + "examples": { + "default": { + "$ref": "#/components/examples/package-version-user" + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "packages", + "subcategory": null + }, + "x-octokit": {} + } + }, "/users/{username}/projects": { "get": { "summary": "List user projects", @@ -41273,6 +41885,152 @@ "updated_at" ] }, + "package": { + "title": "Package", + "description": "A software package", + "type": "object", + "properties": { + "id": { + "description": "Unique identifier of the package.", + "type": "integer", + "example": 1 + }, + "name": { + "description": "The name of the package.", + "type": "string", + "example": "super-linter" + }, + "package_type": { + "type": "string", + "example": "docker", + "enum": ["npm", "maven", "rubygems", "docker", "nuget", "container"] + }, + "url": { + "type": "string", + "example": "https://api.github.com/orgs/github/packages/container/super-linter" + }, + "html_url": { + "type": "string", + "example": "https://github.com/orgs/github/packages/container/package/super-linter" + }, + "version_count": { + "description": "The number of versions of the package.", + "type": "integer", + "example": 1 + }, + "visibility": { + "type": "string", + "example": "private", + "enum": ["private", "public"] + }, + "owner": { + "nullable": true, + "allOf": [{ "$ref": "#/components/schemas/simple-user" }] + }, + "repository": { + "nullable": true, + "allOf": [{ "$ref": "#/components/schemas/minimal-repository" }] + }, + "created_at": { "type": "string", "format": "date-time" }, + "updated_at": { "type": "string", "format": "date-time" } + }, + "required": [ + "id", + "name", + "package_type", + "visibility", + "url", + "html_url", + "version_count", + "created_at", + "updated_at" + ] + }, + "package-version": { + "title": "Package Version", + "description": "A version of a software package", + "type": "object", + "properties": { + "id": { + "description": "Unique identifier of the package version.", + "type": "integer", + "example": 1 + }, + "name": { + "description": "The name of the package version.", + "type": "string", + "example": "latest" + }, + "url": { + "type": "string", + "example": "https://api.github.com/orgs/github/packages/container/super-linter/versions/786068" + }, + "package_html_url": { + "type": "string", + "example": "https://github.com/orgs/github/packages/container/package/super-linter" + }, + "html_url": { + "type": "string", + "example": "https://github.com/orgs/github/packages/container/super-linter/786068" + }, + "license": { "type": "string", "example": "MIT" }, + "description": { "type": "string" }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2011-04-10T20:09:31Z" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2014-03-03T18:58:10Z" + }, + "deleted_at": { + "type": "string", + "format": "date-time", + "example": "2014-03-03T18:58:10Z" + }, + "metadata": { + "type": "object", + "title": "Package Version Metadata", + "properties": { + "package_type": { + "type": "string", + "example": "docker", + "enum": [ + "npm", + "maven", + "rubygems", + "docker", + "nuget", + "container" + ] + }, + "container": { + "type": "object", + "title": "Container Metadata", + "properties": { "tags": { "type": "array" } }, + "required": ["tags"] + }, + "docker": { + "type": "object", + "title": "Docker Metadata", + "properties": { "tag": { "type": "array" } }, + "required": ["tags"] + } + }, + "required": ["package_type"] + } + }, + "required": [ + "id", + "name", + "url", + "package_html_url", + "created_at", + "updated_at" + ] + }, "project": { "title": "Project", "description": "Projects are a way to organize columns and cards of work.", @@ -53577,6 +54335,78 @@ } ] }, + "package-org": { + "value": { + "id": 197, + "name": "hello_docker", + "package_type": "container", + "owner": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "version_count": 1, + "visibility": "private", + "url": "https://api.github.com/orgs/github/packages/container/hello_docker", + "created_at": "2020-05-19T22:19:11Z", + "updated_at": "2020-05-19T22:19:11Z", + "html_url": "https://github.com/orgs/github/packages/container/package/hello_docker" + } + }, + "package-versions-for-org": { + "value": [ + { + "id": 245301, + "name": "1.0.4", + "url": "https://api.github.com/orgs/octo-org/packages/npm/hello-world-npm/versions/245301", + "package_html_url": "https://github.com/octo-org/hello-world-npm/packages/43752", + "created_at": "2019-11-05T22:49:04Z", + "updated_at": "2019-11-05T22:49:04Z", + "html_url": "https://github.com/octo-org/hello-world-npm/packages/43752?version=1.0.4", + "metadata": { "package_type": "npm" } + }, + { + "id": 209672, + "name": "1.0.3", + "url": "https://api.github.com/orgs/octo-org/packages/npm/hello-world-npm/versions/209672", + "package_html_url": "https://github.com/octo-org/hello-world-npm/packages/43752", + "created_at": "2019-10-29T15:42:11Z", + "updated_at": "2019-10-29T15:42:12Z", + "html_url": "https://github.com/octo-org/hello-world-npm/packages/43752?version=1.0.3", + "metadata": { "package_type": "npm" } + } + ] + }, + "package-version-org": { + "value": { + "id": 836, + "name": "sha256:b3d3e366b55f9a54599220198b3db5da8f53592acbbb7dc7e4e9878762fc5344", + "url": "https://api.github.com/orgs/github/packages/container/hello_docker/versions/836", + "package_html_url": "https://github.com/orgs/github/packages/container/package/hello_docker", + "created_at": "2020-05-19T22:19:11Z", + "updated_at": "2020-05-19T22:19:11Z", + "html_url": "https://github.com/orgs/github/packages/container/hello_docker/836", + "metadata": { + "package_type": "container", + "container": { "tags": ["latest"] } + } + } + }, "project-items": { "value": [ { @@ -67323,6 +68153,151 @@ "updated_at": "2015-07-06T15:33:38-07:00" } }, + "package-user": { + "value": { + "id": 40201, + "name": "octo-name", + "package_type": "rubygems", + "owner": { + "login": "octocat", + "id": 209477, + "node_id": "MDQ6VXNlcjIwOTQ3Nw==", + "avatar_url": "https://avatars.githubusercontent.com/u/209477?v=4", + "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": true + }, + "version_count": 3, + "visibility": "public", + "url": "https://api.github.com/users/octocat/packages/rubygems/octo-name", + "created_at": "2019-10-20T14:17:14Z", + "updated_at": "2019-10-20T14:17:14Z", + "repository": { + "id": 216219492, + "node_id": "MDEwOlJlcG9zaXRvcnkyMTYyMTk0OTI=", + "name": "octo-name-repo", + "full_name": "octocat/octo-name-repo", + "private": false, + "owner": { + "login": "octocat", + "id": 209477, + "node_id": "MDQ6VXNlcjIwOTQ3Nw==", + "avatar_url": "https://avatars.githubusercontent.com/u/209477?v=4", + "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": true + }, + "html_url": "https://github.com/octocat/octo-name-repo", + "description": "Project for octocats", + "fork": false, + "url": "https://api.github.com/repos/octocat/octo-name-repo", + "forks_url": "https://api.github.com/repos/octocat/octo-name-repo/forks", + "keys_url": "https://api.github.com/repos/octocat/octo-name-repo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/octocat/octo-name-repo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/octocat/octo-name-repo/teams", + "hooks_url": "https://api.github.com/repos/octocat/octo-name-repo/hooks", + "issue_events_url": "https://api.github.com/repos/octocat/octo-name-repo/issues/events{/number}", + "events_url": "https://api.github.com/repos/octocat/octo-name-repo/events", + "assignees_url": "https://api.github.com/repos/octocat/octo-name-repo/assignees{/user}", + "branches_url": "https://api.github.com/repos/octocat/octo-name-repo/branches{/branch}", + "tags_url": "https://api.github.com/repos/octocat/octo-name-repo/tags", + "blobs_url": "https://api.github.com/repos/octocat/octo-name-repo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/octocat/octo-name-repo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/octocat/octo-name-repo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/octocat/octo-name-repo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/octocat/octo-name-repo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/octocat/octo-name-repo/languages", + "stargazers_url": "https://api.github.com/repos/octocat/octo-name-repo/stargazers", + "contributors_url": "https://api.github.com/repos/octocat/octo-name-repo/contributors", + "subscribers_url": "https://api.github.com/repos/octocat/octo-name-repo/subscribers", + "subscription_url": "https://api.github.com/repos/octocat/octo-name-repo/subscription", + "commits_url": "https://api.github.com/repos/octocat/octo-name-repo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/octocat/octo-name-repo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/octocat/octo-name-repo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/octocat/octo-name-repo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/octocat/octo-name-repo/contents/{+path}", + "compare_url": "https://api.github.com/repos/octocat/octo-name-repo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/octocat/octo-name-repo/merges", + "archive_url": "https://api.github.com/repos/octocat/octo-name-repo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/octocat/octo-name-repo/downloads", + "issues_url": "https://api.github.com/repos/octocat/octo-name-repo/issues{/number}", + "pulls_url": "https://api.github.com/repos/octocat/octo-name-repo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/octocat/octo-name-repo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/octocat/octo-name-repo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/octocat/octo-name-repo/labels{/name}", + "releases_url": "https://api.github.com/repos/octocat/octo-name-repo/releases{/id}", + "deployments_url": "https://api.github.com/repos/octocat/octo-name-repo/deployments" + }, + "html_url": "https://github.com/octocat/octo-name-repo/packages/40201" + } + }, + "package-versions-for-authenticated-user": { + "value": [ + { + "id": 45763, + "name": "sha256:08a44bab0bddaddd8837a8b381aebc2e4b933768b981685a9e088360af0d3dd9", + "url": "https://api.github.com/users/octocat/packages/container/hello_docker/versions/45763", + "package_html_url": "https://github.com/users/octocat/packages/container/package/hello_docker", + "created_at": "2020-09-11T21:56:40Z", + "updated_at": "2021-02-05T21:32:32Z", + "html_url": "https://github.com/users/octocat/packages/container/hello_docker/45763", + "metadata": { + "package_type": "container", + "container": { "tags": ["latest"] } + } + }, + { + "id": 881, + "name": "sha256:b3d3e366b55f9a54599220198b3db5da8f53592acbbb7dc7e4e9878762fc5344", + "url": "https://api.github.com/users/octocat/packages/container/hello_docker/versions/881", + "package_html_url": "https://github.com/users/octocat/packages/container/package/hello_docker", + "created_at": "2020-05-21T22:22:20Z", + "updated_at": "2021-02-05T21:32:32Z", + "html_url": "https://github.com/users/octocat/packages/container/hello_docker/881", + "metadata": { + "package_type": "container", + "container": { "tags": [] } + } + } + ] + }, + "package-version-authenticated-user": { + "value": { + "id": 214, + "name": "sha256:3561f0cff06caccddb99c93bd26e712fcc56a811de0f8ea7a17bb865f30b176a", + "url": "https://api.github.com/users/octocat/packages/container/hello_docker/versions/214", + "package_html_url": "https://github.com/users/octocat/packages/container/package/hello_docker", + "created_at": "2020-05-15T03:46:45Z", + "updated_at": "2020-05-15T03:46:45Z", + "html_url": "https://github.com/users/octocat/packages/container/hello_docker/214", + "metadata": { + "package_type": "container", + "container": { "tags": ["1.13.6"] } + } + } + }, "project": { "value": { "owner_url": "https://api.github.com/users/octocat", @@ -67736,6 +68711,59 @@ } }, "key-simple-items": { "value": [{ "id": 1, "key": "ssh-rsa AAA..." }] }, + "package-versions-for-user": { + "value": [ + { + "id": 3497268, + "name": "0.3.0", + "url": "https://api.github.com/users/octocat/packages/rubygems/octo-name/versions/3497268", + "package_html_url": "https://github.com/octocat/octo-name-repo/packages/40201", + "license": "MIT", + "created_at": "2020-08-31T15:22:11Z", + "updated_at": "2020-08-31T15:22:12Z", + "description": "Project for octocats", + "html_url": "https://github.com/octocat/octo-name-repo/packages/40201?version=0.3.0", + "metadata": { "package_type": "rubygems" } + }, + { + "id": 387039, + "name": "0.2.0", + "url": "https://api.github.com/users/octocat/packages/rubygems/octo-name/versions/387039", + "package_html_url": "https://github.com/octocat/octo-name-repo/packages/40201", + "license": "MIT", + "created_at": "2019-12-01T20:49:29Z", + "updated_at": "2019-12-01T20:49:30Z", + "description": "Project for octocats", + "html_url": "https://github.com/octocat/octo-name-repo/packages/40201?version=0.2.0", + "metadata": { "package_type": "rubygems" } + }, + { + "id": 169770, + "name": "0.1.0", + "url": "https://api.github.com/users/octocat/packages/rubygems/octo-name/versions/169770", + "package_html_url": "https://github.com/octocat/octo-name-repo/packages/40201", + "license": "MIT", + "created_at": "2019-10-20T14:17:14Z", + "updated_at": "2019-10-20T14:17:15Z", + "html_url": "https://github.com/octocat/octo-name-repo/packages/40201?version=0.1.0", + "metadata": { "package_type": "rubygems" } + } + ] + }, + "package-version-user": { + "value": { + "id": 387039, + "name": "0.2.0", + "url": "https://api.github.com/users/octocat/packages/rubygems/octo-name/versions/387039", + "package_html_url": "https://github.com/octocat/octo-name-repo/packages/40201", + "license": "MIT", + "created_at": "2019-12-01T20:49:29Z", + "updated_at": "2019-12-01T20:49:30Z", + "description": "Octo-name client for Ruby", + "html_url": "https://github.com/octocat/octo-name-repo/packages/40201?version=0.2.0", + "metadata": { "package_type": "rubygems" } + } + }, "project-items-3": { "value": [ { @@ -68257,6 +69285,30 @@ "required": true, "schema": { "type": "string" } }, + "package_type": { + "name": "package_type", + "description": "The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`.", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": ["npm", "maven", "rubygems", "docker", "nuget", "container"] + } + }, + "package_name": { + "name": "package_name", + "description": "The name of the package.", + "in": "path", + "required": true, + "schema": { "type": "string" } + }, + "package_version_id": { + "name": "package_version_id", + "description": "Unique identifier of the package version.", + "in": "path", + "required": true, + "schema": { "type": "integer" } + }, "team_slug": { "name": "team_slug", "description": "team_slug parameter", diff --git a/package.json b/package.json index 941805754..bd3c99347 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ ] }, "octokit": { - "openapi-version": "2.10.0" + "openapi-version": "2.11.0" }, "@pika/pack": { "pipeline": [ diff --git a/src/generated/types.ts b/src/generated/types.ts index d4c2a69f9..529b20563 100644 --- a/src/generated/types.ts +++ b/src/generated/types.ts @@ -1273,6 +1273,77 @@ export interface paths { /** Removing a user from this list will remove them from all the organization's repositories. */ delete: operations["orgs/remove-outside-collaborator"]; }; + "/orgs/{org}/packages/{package_type}/{package_name}": { + /** + * Gets a specific package in an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-for-organization"]; + /** + * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 25 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` scope. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + delete: operations["packages/delete-package-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/restore": { + /** + * Restores an entire package in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scope. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + post: operations["packages/restore-package-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions": { + /** + * Returns all package versions for a package owned by an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-all-package-versions-for-a-package-owned-by-an-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version in an organization. + * + * You must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-version-for-organization"]; + /** + * Deletes a specific package version in an organization. If the package is public and the package version has more than 25 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` scope. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + delete: operations["packages/delete-package-version-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a specific package version in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scope. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + post: operations["packages/restore-package-version-for-org"]; + }; "/orgs/{org}/projects": { /** Lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ get: operations["projects/list-for-org"]; @@ -4631,6 +4702,71 @@ export interface paths { */ get: operations["orgs/list-for-authenticated-user"]; }; + "/user/packages/{package_type}/{package_name}": { + /** + * Gets a specific package for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-for-authenticated-user"]; + /** + * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 25 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + delete: operations["packages/delete-package-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/restore": { + /** + * Restores a package owned by the authenticated user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scope. If `package_type` is not `container`, your token must also include the `repo` scope. + */ + post: operations["packages/restore-package-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions": { + /** + * Returns all package versions for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-all-package-versions-for-a-package-owned-by-the-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-version-for-authenticated-user"]; + /** + * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 25 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + delete: operations["packages/delete-package-version-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a package version owned by the authenticated user. + * + * You can restore a deleted package version under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scope. If `package_type` is not `container`, your token must also include the `repo` scope. + */ + post: operations["packages/restore-package-version-for-authenticated-user"]; + }; "/user/projects": { post: operations["projects/create-for-authenticated-user"]; }; @@ -4770,6 +4906,33 @@ export interface paths { */ get: operations["orgs/list-for-user"]; }; + "/users/{username}/packages/{package_type}/{package_name}": { + /** + * Gets a specific package metadata for a public package owned by a user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions": { + /** + * Returns all package versions for a public package owned by a specified user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version for a public package owned by a specified user. + * + * At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-version-for-user"]; + }; "/users/{username}/projects": { get: operations["projects/list-for-user"]; }; @@ -6278,6 +6441,59 @@ export interface components { archive_url?: string; exclude?: { [key: string]: any }[]; }; + /** A software package */ + package: { + /** Unique identifier of the package. */ + id: number; + /** The name of the package. */ + name: string; + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + url: string; + html_url: string; + /** The number of versions of the package. */ + version_count: number; + visibility: "private" | "public"; + owner?: components["schemas"]["simple-user"] | null; + repository?: components["schemas"]["minimal-repository"] | null; + created_at: string; + updated_at: string; + }; + /** A version of a software package */ + "package-version": { + /** Unique identifier of the package version. */ + id: number; + /** The name of the package version. */ + name: string; + url: string; + package_html_url: string; + html_url?: string; + license?: string; + description?: string; + created_at: string; + updated_at: string; + deleted_at?: string; + metadata?: { + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + container?: { + tags: any[]; + }; + docker?: { + tag?: any[]; + }; + }; + }; /** Projects are a way to organize columns and cards of work. */ project: { owner_url: string; @@ -9738,6 +9954,18 @@ export interface components { migration_id: number; /** repo_name parameter */ repo_name: string; + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** The name of the package. */ + package_name: string; + /** Unique identifier of the package version. */ + package_version_id: number; /** team_slug parameter */ team_slug: string; "discussion-number": number; @@ -14810,6 +15038,198 @@ export interface operations { }; }; }; + /** + * Gets a specific package in an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-for-organization": { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + package_type: components["parameters"]["package_type"]; + /** The name of the package. */ + package_name: components["parameters"]["package_name"]; + org: components["parameters"]["org"]; + }; + }; + responses: { + /** response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 25 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` scope. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + "packages/delete-package-for-org": { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + package_type: components["parameters"]["package_type"]; + /** The name of the package. */ + package_name: components["parameters"]["package_name"]; + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Empty response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores an entire package in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scope. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + "packages/restore-package-for-org": { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + package_type: components["parameters"]["package_type"]; + /** The name of the package. */ + package_name: components["parameters"]["package_name"]; + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Empty response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Returns all package versions for a package owned by an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-all-package-versions-for-a-package-owned-by-an-org": { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + package_type: components["parameters"]["package_type"]; + /** The name of the package. */ + package_name: components["parameters"]["package_name"]; + org: components["parameters"]["org"]; + }; + }; + responses: { + /** response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version in an organization. + * + * You must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-version-for-organization": { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + package_type: components["parameters"]["package_type"]; + /** The name of the package. */ + package_name: components["parameters"]["package_name"]; + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package_version_id"]; + }; + }; + responses: { + /** response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version in an organization. If the package is public and the package version has more than 25 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` scope. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + "packages/delete-package-version-for-org": { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + package_type: components["parameters"]["package_type"]; + /** The name of the package. */ + package_name: components["parameters"]["package_name"]; + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package_version_id"]; + }; + }; + responses: { + /** Empty response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a specific package version in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scope. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + "packages/restore-package-version-for-org": { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + package_type: components["parameters"]["package_type"]; + /** The name of the package. */ + package_name: components["parameters"]["package_name"]; + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package_version_id"]; + }; + }; + responses: { + /** Empty response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; /** Lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ "projects/list-for-org": { parameters: { @@ -29033,6 +29453,185 @@ export interface operations { 403: components["responses"]["forbidden"]; }; }; + /** + * Gets a specific package for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + package_type: components["parameters"]["package_type"]; + /** The name of the package. */ + package_name: components["parameters"]["package_name"]; + }; + }; + responses: { + /** response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 25 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/delete-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + package_type: components["parameters"]["package_type"]; + /** The name of the package. */ + package_name: components["parameters"]["package_name"]; + }; + }; + responses: { + /** Empty response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a package owned by the authenticated user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scope. If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/restore-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + package_type: components["parameters"]["package_type"]; + /** The name of the package. */ + package_name: components["parameters"]["package_name"]; + }; + }; + responses: { + /** Empty response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Returns all package versions for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-all-package-versions-for-a-package-owned-by-the-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + package_type: components["parameters"]["package_type"]; + /** The name of the package. */ + package_name: components["parameters"]["package_name"]; + }; + }; + responses: { + /** response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + package_type: components["parameters"]["package_type"]; + /** The name of the package. */ + package_name: components["parameters"]["package_name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package_version_id"]; + }; + }; + responses: { + /** response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 25 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/delete-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + package_type: components["parameters"]["package_type"]; + /** The name of the package. */ + package_name: components["parameters"]["package_name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package_version_id"]; + }; + }; + responses: { + /** Empty response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a package version owned by the authenticated user. + * + * You can restore a deleted package version under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scope. If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/restore-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + package_type: components["parameters"]["package_type"]; + /** The name of the package. */ + package_name: components["parameters"]["package_name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package_version_id"]; + }; + }; + responses: { + /** Empty response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; "projects/create-for-authenticated-user": { parameters: {}; responses: { @@ -29723,6 +30322,86 @@ export interface operations { }; }; }; + /** + * Gets a specific package metadata for a public package owned by a user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-for-user": { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + package_type: components["parameters"]["package_type"]; + /** The name of the package. */ + package_name: components["parameters"]["package_name"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Returns all package versions for a public package owned by a specified user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-all-package-versions-for-package-owned-by-user": { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + package_type: components["parameters"]["package_type"]; + /** The name of the package. */ + package_name: components["parameters"]["package_name"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version for a public package owned by a specified user. + * + * At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-version-for-user": { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + package_type: components["parameters"]["package_type"]; + /** The name of the package. */ + package_name: components["parameters"]["package_name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package_version_id"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; "projects/list-for-user": { parameters: { path: {