From b43975399bdd435221397671d62b6fce4592cd13 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 21:20:33 +0000 Subject: [PATCH 001/152] Bump Submodule/github/rest-api-description from `4adfd3e` to `b29a2c5` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `4adfd3e` to `b29a2c5`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/4adfd3e5dd6abe3d8e334ba494079071d78c7fd4...b29a2c59ea46a74c2ec81e8e2800c6d5a677b187) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index 4adfd3e5dd6..b29a2c59ea4 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit 4adfd3e5dd6abe3d8e334ba494079071d78c7fd4 +Subproject commit b29a2c59ea46a74c2ec81e8e2800c6d5a677b187 From 04830bb542fbc011774ee32fdc64ca491695ab70 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 10 Jun 2024 21:35:22 +0000 Subject: [PATCH 002/152] Commit via running ake Sources/apps --- Sources/apps/Client.swift | 20 ++++++------- Sources/apps/Types.swift | 60 +++++++++++++++++++-------------------- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/Sources/apps/Client.swift b/Sources/apps/Client.swift index de332360634..104dcdb68f4 100644 --- a/Sources/apps/Client.swift +++ b/Sources/apps/Client.swift @@ -1388,7 +1388,7 @@ public struct Client: APIProtocol { } /// Delete an app authorization /// - /// OAuth and GitHub application owners can revoke a grant for their application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. + /// OAuth and GitHub application owners can revoke a grant for their application and a specific user. You must provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. /// Deleting an application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). /// /// - Remark: HTTP `DELETE /applications/{client_id}/grant`. @@ -1464,7 +1464,7 @@ public struct Client: APIProtocol { } /// Check a token /// - /// OAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) to use this endpoint, where the username is the application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. + /// OAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. Invalid tokens will return `404 NOT FOUND`. /// /// - Remark: HTTP `POST /applications/{client_id}/token`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/post(apps/check-token)`. @@ -1581,7 +1581,7 @@ public struct Client: APIProtocol { } /// Reset a token /// - /// OAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. + /// OAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. Invalid tokens will return `404 NOT FOUND`. /// /// - Remark: HTTP `PATCH /applications/{client_id}/token`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/patch(apps/reset-token)`. @@ -1676,7 +1676,7 @@ public struct Client: APIProtocol { } /// Delete an app token /// - /// OAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. + /// OAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. /// /// - Remark: HTTP `DELETE /applications/{client_id}/token`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/delete(apps/delete-token)`. @@ -1757,10 +1757,6 @@ public struct Client: APIProtocol { /// /// Invalid tokens will return `404 NOT FOUND`. /// - /// You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) - /// when accessing this endpoint, using the `client_id` and `client_secret` of the GitHub App - /// as the username and password. - /// /// - Remark: HTTP `POST /applications/{client_id}/token/scoped`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/scoped/post(apps/scope-token)`. public func apps_sol_scope_hyphen_token(_ input: Operations.apps_sol_scope_hyphen_token.Input) async throws -> Operations.apps_sol_scope_hyphen_token.Output { @@ -3375,7 +3371,9 @@ public struct Client: APIProtocol { } /// Add a repository to an app installation /// - /// Add a single repository to an installation. The authenticated user must have admin access to the repository. + /// Add a single repository to an installation. The authenticated user must have admin access to the repository. + /// + /// This endpoint only works for PATs (classic) with the `repo` scope. /// /// - Remark: HTTP `PUT /user/installations/{installation_id}/repositories/{repository_id}`. /// - Remark: Generated from `#/paths//user/installations/{installation_id}/repositories/{repository_id}/put(apps/add-repo-to-installation-for-authenticated-user)`. @@ -3466,7 +3464,9 @@ public struct Client: APIProtocol { } /// Remove a repository from an app installation /// - /// Remove a single repository from an installation. The authenticated user must have admin access to the repository. The installation must have the `repository_selection` of `selected`. + /// Remove a single repository from an installation. The authenticated user must have admin access to the repository. The installation must have the `repository_selection` of `selected`. + /// + /// This endpoint only works for PATs (classic) with the `repo` scope. /// /// - Remark: HTTP `DELETE /user/installations/{installation_id}/repositories/{repository_id}`. /// - Remark: Generated from `#/paths//user/installations/{installation_id}/repositories/{repository_id}/delete(apps/remove-repo-from-installation-for-authenticated-user)`. diff --git a/Sources/apps/Types.swift b/Sources/apps/Types.swift index 3cf04b1188e..7e4fffed9b5 100644 --- a/Sources/apps/Types.swift +++ b/Sources/apps/Types.swift @@ -141,7 +141,7 @@ public protocol APIProtocol: Sendable { func apps_sol_unsuspend_hyphen_installation(_ input: Operations.apps_sol_unsuspend_hyphen_installation.Input) async throws -> Operations.apps_sol_unsuspend_hyphen_installation.Output /// Delete an app authorization /// - /// OAuth and GitHub application owners can revoke a grant for their application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. + /// OAuth and GitHub application owners can revoke a grant for their application and a specific user. You must provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. /// Deleting an application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). /// /// - Remark: HTTP `DELETE /applications/{client_id}/grant`. @@ -149,21 +149,21 @@ public protocol APIProtocol: Sendable { func apps_sol_delete_hyphen_authorization(_ input: Operations.apps_sol_delete_hyphen_authorization.Input) async throws -> Operations.apps_sol_delete_hyphen_authorization.Output /// Check a token /// - /// OAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) to use this endpoint, where the username is the application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. + /// OAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. Invalid tokens will return `404 NOT FOUND`. /// /// - Remark: HTTP `POST /applications/{client_id}/token`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/post(apps/check-token)`. func apps_sol_check_hyphen_token(_ input: Operations.apps_sol_check_hyphen_token.Input) async throws -> Operations.apps_sol_check_hyphen_token.Output /// Reset a token /// - /// OAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. + /// OAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. Invalid tokens will return `404 NOT FOUND`. /// /// - Remark: HTTP `PATCH /applications/{client_id}/token`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/patch(apps/reset-token)`. func apps_sol_reset_hyphen_token(_ input: Operations.apps_sol_reset_hyphen_token.Input) async throws -> Operations.apps_sol_reset_hyphen_token.Output /// Delete an app token /// - /// OAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. + /// OAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. /// /// - Remark: HTTP `DELETE /applications/{client_id}/token`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/delete(apps/delete-token)`. @@ -176,10 +176,6 @@ public protocol APIProtocol: Sendable { /// /// Invalid tokens will return `404 NOT FOUND`. /// - /// You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) - /// when accessing this endpoint, using the `client_id` and `client_secret` of the GitHub App - /// as the username and password. - /// /// - Remark: HTTP `POST /applications/{client_id}/token/scoped`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/scoped/post(apps/scope-token)`. func apps_sol_scope_hyphen_token(_ input: Operations.apps_sol_scope_hyphen_token.Input) async throws -> Operations.apps_sol_scope_hyphen_token.Output @@ -302,14 +298,18 @@ public protocol APIProtocol: Sendable { func apps_sol_list_hyphen_installation_hyphen_repos_hyphen_for_hyphen_authenticated_hyphen_user(_ input: Operations.apps_sol_list_hyphen_installation_hyphen_repos_hyphen_for_hyphen_authenticated_hyphen_user.Input) async throws -> Operations.apps_sol_list_hyphen_installation_hyphen_repos_hyphen_for_hyphen_authenticated_hyphen_user.Output /// Add a repository to an app installation /// - /// Add a single repository to an installation. The authenticated user must have admin access to the repository. + /// Add a single repository to an installation. The authenticated user must have admin access to the repository. + /// + /// This endpoint only works for PATs (classic) with the `repo` scope. /// /// - Remark: HTTP `PUT /user/installations/{installation_id}/repositories/{repository_id}`. /// - Remark: Generated from `#/paths//user/installations/{installation_id}/repositories/{repository_id}/put(apps/add-repo-to-installation-for-authenticated-user)`. func apps_sol_add_hyphen_repo_hyphen_to_hyphen_installation_hyphen_for_hyphen_authenticated_hyphen_user(_ input: Operations.apps_sol_add_hyphen_repo_hyphen_to_hyphen_installation_hyphen_for_hyphen_authenticated_hyphen_user.Input) async throws -> Operations.apps_sol_add_hyphen_repo_hyphen_to_hyphen_installation_hyphen_for_hyphen_authenticated_hyphen_user.Output /// Remove a repository from an app installation /// - /// Remove a single repository from an installation. The authenticated user must have admin access to the repository. The installation must have the `repository_selection` of `selected`. + /// Remove a single repository from an installation. The authenticated user must have admin access to the repository. The installation must have the `repository_selection` of `selected`. + /// + /// This endpoint only works for PATs (classic) with the `repo` scope. /// /// - Remark: HTTP `DELETE /user/installations/{installation_id}/repositories/{repository_id}`. /// - Remark: Generated from `#/paths//user/installations/{installation_id}/repositories/{repository_id}/delete(apps/remove-repo-from-installation-for-authenticated-user)`. @@ -573,7 +573,7 @@ extension APIProtocol { } /// Delete an app authorization /// - /// OAuth and GitHub application owners can revoke a grant for their application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. + /// OAuth and GitHub application owners can revoke a grant for their application and a specific user. You must provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. /// Deleting an application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). /// /// - Remark: HTTP `DELETE /applications/{client_id}/grant`. @@ -591,7 +591,7 @@ extension APIProtocol { } /// Check a token /// - /// OAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) to use this endpoint, where the username is the application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. + /// OAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. Invalid tokens will return `404 NOT FOUND`. /// /// - Remark: HTTP `POST /applications/{client_id}/token`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/post(apps/check-token)`. @@ -608,7 +608,7 @@ extension APIProtocol { } /// Reset a token /// - /// OAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. + /// OAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. Invalid tokens will return `404 NOT FOUND`. /// /// - Remark: HTTP `PATCH /applications/{client_id}/token`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/patch(apps/reset-token)`. @@ -625,7 +625,7 @@ extension APIProtocol { } /// Delete an app token /// - /// OAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. + /// OAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. /// /// - Remark: HTTP `DELETE /applications/{client_id}/token`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/delete(apps/delete-token)`. @@ -648,10 +648,6 @@ extension APIProtocol { /// /// Invalid tokens will return `404 NOT FOUND`. /// - /// You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) - /// when accessing this endpoint, using the `client_id` and `client_secret` of the GitHub App - /// as the username and password. - /// /// - Remark: HTTP `POST /applications/{client_id}/token/scoped`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/scoped/post(apps/scope-token)`. public func apps_sol_scope_hyphen_token( @@ -888,7 +884,9 @@ extension APIProtocol { } /// Add a repository to an app installation /// - /// Add a single repository to an installation. The authenticated user must have admin access to the repository. + /// Add a single repository to an installation. The authenticated user must have admin access to the repository. + /// + /// This endpoint only works for PATs (classic) with the `repo` scope. /// /// - Remark: HTTP `PUT /user/installations/{installation_id}/repositories/{repository_id}`. /// - Remark: Generated from `#/paths//user/installations/{installation_id}/repositories/{repository_id}/put(apps/add-repo-to-installation-for-authenticated-user)`. @@ -903,7 +901,9 @@ extension APIProtocol { } /// Remove a repository from an app installation /// - /// Remove a single repository from an installation. The authenticated user must have admin access to the repository. The installation must have the `repository_selection` of `selected`. + /// Remove a single repository from an installation. The authenticated user must have admin access to the repository. The installation must have the `repository_selection` of `selected`. + /// + /// This endpoint only works for PATs (classic) with the `repo` scope. /// /// - Remark: HTTP `DELETE /user/installations/{installation_id}/repositories/{repository_id}`. /// - Remark: Generated from `#/paths//user/installations/{installation_id}/repositories/{repository_id}/delete(apps/remove-repo-from-installation-for-authenticated-user)`. @@ -7426,7 +7426,7 @@ public enum Operations { } /// Delete an app authorization /// - /// OAuth and GitHub application owners can revoke a grant for their application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. + /// OAuth and GitHub application owners can revoke a grant for their application and a specific user. You must provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. /// Deleting an application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). /// /// - Remark: HTTP `DELETE /applications/{client_id}/grant`. @@ -7584,7 +7584,7 @@ public enum Operations { } /// Check a token /// - /// OAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) to use this endpoint, where the username is the application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. + /// OAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. Invalid tokens will return `404 NOT FOUND`. /// /// - Remark: HTTP `POST /applications/{client_id}/token`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/post(apps/check-token)`. @@ -7788,7 +7788,7 @@ public enum Operations { } /// Reset a token /// - /// OAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. + /// OAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. Invalid tokens will return `404 NOT FOUND`. /// /// - Remark: HTTP `PATCH /applications/{client_id}/token`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/patch(apps/reset-token)`. @@ -7969,7 +7969,7 @@ public enum Operations { } /// Delete an app token /// - /// OAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. + /// OAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. /// /// - Remark: HTTP `DELETE /applications/{client_id}/token`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/delete(apps/delete-token)`. @@ -8132,10 +8132,6 @@ public enum Operations { /// /// Invalid tokens will return `404 NOT FOUND`. /// - /// You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) - /// when accessing this endpoint, using the `client_id` and `client_secret` of the GitHub App - /// as the username and password. - /// /// - Remark: HTTP `POST /applications/{client_id}/token/scoped`. /// - Remark: Generated from `#/paths//applications/{client_id}/token/scoped/post(apps/scope-token)`. public enum apps_sol_scope_hyphen_token { @@ -11050,7 +11046,9 @@ public enum Operations { } /// Add a repository to an app installation /// - /// Add a single repository to an installation. The authenticated user must have admin access to the repository. + /// Add a single repository to an installation. The authenticated user must have admin access to the repository. + /// + /// This endpoint only works for PATs (classic) with the `repo` scope. /// /// - Remark: HTTP `PUT /user/installations/{installation_id}/repositories/{repository_id}`. /// - Remark: Generated from `#/paths//user/installations/{installation_id}/repositories/{repository_id}/put(apps/add-repo-to-installation-for-authenticated-user)`. @@ -11236,7 +11234,9 @@ public enum Operations { } /// Remove a repository from an app installation /// - /// Remove a single repository from an installation. The authenticated user must have admin access to the repository. The installation must have the `repository_selection` of `selected`. + /// Remove a single repository from an installation. The authenticated user must have admin access to the repository. The installation must have the `repository_selection` of `selected`. + /// + /// This endpoint only works for PATs (classic) with the `repo` scope. /// /// - Remark: HTTP `DELETE /user/installations/{installation_id}/repositories/{repository_id}`. /// - Remark: Generated from `#/paths//user/installations/{installation_id}/repositories/{repository_id}/delete(apps/remove-repo-from-installation-for-authenticated-user)`. From 8aeba0db66d6fe54512be5efed83da3b06e3f852 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 21:36:00 +0000 Subject: [PATCH 003/152] Bump Submodule/github/rest-api-description from `b29a2c5` to `62b23af` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `b29a2c5` to `62b23af`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/b29a2c59ea46a74c2ec81e8e2800c6d5a677b187...62b23af16ec379af0466b516ccf1f0dd8373f91b) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index b29a2c59ea4..62b23af16ec 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit b29a2c59ea46a74c2ec81e8e2800c6d5a677b187 +Subproject commit 62b23af16ec379af0466b516ccf1f0dd8373f91b From e6a098354a37c09093006192ca040653df08ee2b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 17 Jun 2024 21:57:19 +0000 Subject: [PATCH 004/152] Commit via running ake Sources/orgs --- Sources/orgs/Client.swift | 6 +- Sources/orgs/Types.swift | 509 +++++++++++++++++++++++++++++--------- 2 files changed, 398 insertions(+), 117 deletions(-) diff --git a/Sources/orgs/Client.swift b/Sources/orgs/Client.swift index ace3c8c9a66..80449eaa97a 100644 --- a/Sources/orgs/Client.swift +++ b/Sources/orgs/Client.swift @@ -2887,7 +2887,7 @@ public struct Client: APIProtocol { /// /// **Rate limits** /// - /// To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. + /// To prevent abuse, organization owners are limited to creating 50 organization invitations for an organization within a 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. /// /// - Remark: HTTP `PUT /orgs/{org}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/put(orgs/set-membership-for-user)`. @@ -4134,7 +4134,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - [Components.Schemas.team].self, + [Components.Schemas.team_hyphen_role_hyphen_assignment].self, from: responseBody, transforming: { value in .json(value) @@ -4229,7 +4229,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - [Components.Schemas.simple_hyphen_user].self, + [Components.Schemas.user_hyphen_role_hyphen_assignment].self, from: responseBody, transforming: { value in .json(value) diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index 81ae2addf46..67d7ea777a3 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -338,7 +338,7 @@ public protocol APIProtocol: Sendable { /// /// **Rate limits** /// - /// To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. + /// To prevent abuse, organization owners are limited to creating 50 organization invitations for an organization within a 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. /// /// - Remark: HTTP `PUT /orgs/{org}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/put(orgs/set-membership-for-user)`. @@ -1383,7 +1383,7 @@ extension APIProtocol { /// /// **Rate limits** /// - /// To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. + /// To prevent abuse, organization owners are limited to creating 50 organization invitations for an organization within a 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. /// /// - Remark: HTTP `PUT /orgs/{org}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/put(orgs/set-membership-for-user)`. @@ -6108,6 +6108,390 @@ public enum Components { case updated_at } } + /// The Relationship a Team has with a role. + /// + /// - Remark: Generated from `#/components/schemas/team-role-assignment`. + public struct team_hyphen_role_hyphen_assignment: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team-role-assignment/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/team-role-assignment/node_id`. + public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/team-role-assignment/name`. + public var name: Swift.String + /// - Remark: Generated from `#/components/schemas/team-role-assignment/slug`. + public var slug: Swift.String + /// - Remark: Generated from `#/components/schemas/team-role-assignment/description`. + public var description: Swift.String? + /// - Remark: Generated from `#/components/schemas/team-role-assignment/privacy`. + public var privacy: Swift.String? + /// - Remark: Generated from `#/components/schemas/team-role-assignment/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/team-role-assignment/permission`. + public var permission: Swift.String + /// - Remark: Generated from `#/components/schemas/team-role-assignment/permissions`. + public struct permissionsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team-role-assignment/permissions/pull`. + public var pull: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team-role-assignment/permissions/triage`. + public var triage: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team-role-assignment/permissions/push`. + public var push: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team-role-assignment/permissions/maintain`. + public var maintain: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team-role-assignment/permissions/admin`. + public var admin: Swift.Bool + /// Creates a new `permissionsPayload`. + /// + /// - Parameters: + /// - pull: + /// - triage: + /// - push: + /// - maintain: + /// - admin: + public init( + pull: Swift.Bool, + triage: Swift.Bool, + push: Swift.Bool, + maintain: Swift.Bool, + admin: Swift.Bool + ) { + self.pull = pull + self.triage = triage + self.push = push + self.maintain = maintain + self.admin = admin + } + public enum CodingKeys: String, CodingKey { + case pull + case triage + case push + case maintain + case admin + } + } + /// - Remark: Generated from `#/components/schemas/team-role-assignment/permissions`. + public var permissions: Components.Schemas.team_hyphen_role_hyphen_assignment.permissionsPayload? + /// - Remark: Generated from `#/components/schemas/team-role-assignment/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/team-role-assignment/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team-role-assignment/members_url`. + public var members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team-role-assignment/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team-role-assignment/parent`. + public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? + /// Creates a new `team_hyphen_role_hyphen_assignment`. + /// + /// - Parameters: + /// - id: + /// - node_id: + /// - name: + /// - slug: + /// - description: + /// - privacy: + /// - notification_setting: + /// - permission: + /// - permissions: + /// - url: + /// - html_url: + /// - members_url: + /// - repositories_url: + /// - parent: + public init( + id: Swift.Int, + node_id: Swift.String, + name: Swift.String, + slug: Swift.String, + description: Swift.String? = nil, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + permission: Swift.String, + permissions: Components.Schemas.team_hyphen_role_hyphen_assignment.permissionsPayload? = nil, + url: Swift.String, + html_url: Swift.String, + members_url: Swift.String, + repositories_url: Swift.String, + parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil + ) { + self.id = id + self.node_id = node_id + self.name = name + self.slug = slug + self.description = description + self.privacy = privacy + self.notification_setting = notification_setting + self.permission = permission + self.permissions = permissions + self.url = url + self.html_url = html_url + self.members_url = members_url + self.repositories_url = repositories_url + self.parent = parent + } + public enum CodingKeys: String, CodingKey { + case id + case node_id + case name + case slug + case description + case privacy + case notification_setting + case permission + case permissions + case url + case html_url + case members_url + case repositories_url + case parent + } + } + /// Groups of organization members that gives permissions on specified repositories. + /// + /// - Remark: Generated from `#/components/schemas/team-simple`. + public struct team_hyphen_simple: Codable, Hashable, Sendable { + /// Unique identifier of the team + /// + /// - Remark: Generated from `#/components/schemas/team-simple/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/team-simple/node_id`. + public var node_id: Swift.String + /// URL for the team + /// + /// - Remark: Generated from `#/components/schemas/team-simple/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/team-simple/members_url`. + public var members_url: Swift.String + /// Name of the team + /// + /// - Remark: Generated from `#/components/schemas/team-simple/name`. + public var name: Swift.String + /// Description of the team + /// + /// - Remark: Generated from `#/components/schemas/team-simple/description`. + public var description: Swift.String? + /// Permission that the team will have for its repositories + /// + /// - Remark: Generated from `#/components/schemas/team-simple/permission`. + public var permission: Swift.String + /// The level of privacy this team should have + /// + /// - Remark: Generated from `#/components/schemas/team-simple/privacy`. + public var privacy: Swift.String? + /// The notification setting the team has set + /// + /// - Remark: Generated from `#/components/schemas/team-simple/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/team-simple/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team-simple/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team-simple/slug`. + public var slug: Swift.String + /// Distinguished Name (DN) that team maps to within LDAP environment + /// + /// - Remark: Generated from `#/components/schemas/team-simple/ldap_dn`. + public var ldap_dn: Swift.String? + /// Creates a new `team_hyphen_simple`. + /// + /// - Parameters: + /// - id: Unique identifier of the team + /// - node_id: + /// - url: URL for the team + /// - members_url: + /// - name: Name of the team + /// - description: Description of the team + /// - permission: Permission that the team will have for its repositories + /// - privacy: The level of privacy this team should have + /// - notification_setting: The notification setting the team has set + /// - html_url: + /// - repositories_url: + /// - slug: + /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment + public init( + id: Swift.Int, + node_id: Swift.String, + url: Swift.String, + members_url: Swift.String, + name: Swift.String, + description: Swift.String? = nil, + permission: Swift.String, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + html_url: Swift.String, + repositories_url: Swift.String, + slug: Swift.String, + ldap_dn: Swift.String? = nil + ) { + self.id = id + self.node_id = node_id + self.url = url + self.members_url = members_url + self.name = name + self.description = description + self.permission = permission + self.privacy = privacy + self.notification_setting = notification_setting + self.html_url = html_url + self.repositories_url = repositories_url + self.slug = slug + self.ldap_dn = ldap_dn + } + public enum CodingKeys: String, CodingKey { + case id + case node_id + case url + case members_url + case name + case description + case permission + case privacy + case notification_setting + case html_url + case repositories_url + case slug + case ldap_dn + } + } + /// The Relationship a User has with a role. + /// + /// - Remark: Generated from `#/components/schemas/user-role-assignment`. + public struct user_hyphen_role_hyphen_assignment: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/user-role-assignment/name`. + public var name: Swift.String? + /// - Remark: Generated from `#/components/schemas/user-role-assignment/email`. + public var email: Swift.String? + /// - Remark: Generated from `#/components/schemas/user-role-assignment/login`. + public var login: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/user-role-assignment/node_id`. + public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/avatar_url`. + public var avatar_url: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/gravatar_id`. + public var gravatar_id: Swift.String? + /// - Remark: Generated from `#/components/schemas/user-role-assignment/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/followers_url`. + public var followers_url: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/following_url`. + public var following_url: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/gists_url`. + public var gists_url: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/starred_url`. + public var starred_url: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/subscriptions_url`. + public var subscriptions_url: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/organizations_url`. + public var organizations_url: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/repos_url`. + public var repos_url: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/events_url`. + public var events_url: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/received_events_url`. + public var received_events_url: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/type`. + public var _type: Swift.String + /// - Remark: Generated from `#/components/schemas/user-role-assignment/site_admin`. + public var site_admin: Swift.Bool + /// - Remark: Generated from `#/components/schemas/user-role-assignment/starred_at`. + public var starred_at: Swift.String? + /// Creates a new `user_hyphen_role_hyphen_assignment`. + /// + /// - Parameters: + /// - name: + /// - email: + /// - login: + /// - id: + /// - node_id: + /// - avatar_url: + /// - gravatar_id: + /// - url: + /// - html_url: + /// - followers_url: + /// - following_url: + /// - gists_url: + /// - starred_url: + /// - subscriptions_url: + /// - organizations_url: + /// - repos_url: + /// - events_url: + /// - received_events_url: + /// - _type: + /// - site_admin: + /// - starred_at: + public init( + name: Swift.String? = nil, + email: Swift.String? = nil, + login: Swift.String, + id: Swift.Int, + node_id: Swift.String, + avatar_url: Swift.String, + gravatar_id: Swift.String? = nil, + url: Swift.String, + html_url: Swift.String, + followers_url: Swift.String, + following_url: Swift.String, + gists_url: Swift.String, + starred_url: Swift.String, + subscriptions_url: Swift.String, + organizations_url: Swift.String, + repos_url: Swift.String, + events_url: Swift.String, + received_events_url: Swift.String, + _type: Swift.String, + site_admin: Swift.Bool, + starred_at: Swift.String? = nil + ) { + self.name = name + self.email = email + self.login = login + self.id = id + self.node_id = node_id + self.avatar_url = avatar_url + self.gravatar_id = gravatar_id + self.url = url + self.html_url = html_url + self.followers_url = followers_url + self.following_url = following_url + self.gists_url = gists_url + self.starred_url = starred_url + self.subscriptions_url = subscriptions_url + self.organizations_url = organizations_url + self.repos_url = repos_url + self.events_url = events_url + self.received_events_url = received_events_url + self._type = _type + self.site_admin = site_admin + self.starred_at = starred_at + } + public enum CodingKeys: String, CodingKey { + case name + case email + case login + case id + case node_id + case avatar_url + case gravatar_id + case url + case html_url + case followers_url + case following_url + case gists_url + case starred_url + case subscriptions_url + case organizations_url + case repos_url + case events_url + case received_events_url + case _type = "type" + case site_admin + case starred_at + } + } /// Minimal representation of an organization programmatic access grant request for enumerations /// /// - Remark: Generated from `#/components/schemas/organization-programmatic-access-grant-request`. @@ -6482,6 +6866,8 @@ public enum Components { @frozen public enum value_typePayload: String, Codable, Hashable, Sendable { case string = "string" case single_select = "single_select" + case multi_select = "multi_select" + case true_false = "true_false" } /// The type of the value for the property /// @@ -6694,113 +7080,6 @@ public enum Components { case properties } } - /// Groups of organization members that gives permissions on specified repositories. - /// - /// - Remark: Generated from `#/components/schemas/team-simple`. - public struct team_hyphen_simple: Codable, Hashable, Sendable { - /// Unique identifier of the team - /// - /// - Remark: Generated from `#/components/schemas/team-simple/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/team-simple/node_id`. - public var node_id: Swift.String - /// URL for the team - /// - /// - Remark: Generated from `#/components/schemas/team-simple/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/team-simple/members_url`. - public var members_url: Swift.String - /// Name of the team - /// - /// - Remark: Generated from `#/components/schemas/team-simple/name`. - public var name: Swift.String - /// Description of the team - /// - /// - Remark: Generated from `#/components/schemas/team-simple/description`. - public var description: Swift.String? - /// Permission that the team will have for its repositories - /// - /// - Remark: Generated from `#/components/schemas/team-simple/permission`. - public var permission: Swift.String - /// The level of privacy this team should have - /// - /// - Remark: Generated from `#/components/schemas/team-simple/privacy`. - public var privacy: Swift.String? - /// The notification setting the team has set - /// - /// - Remark: Generated from `#/components/schemas/team-simple/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/team-simple/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team-simple/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team-simple/slug`. - public var slug: Swift.String - /// Distinguished Name (DN) that team maps to within LDAP environment - /// - /// - Remark: Generated from `#/components/schemas/team-simple/ldap_dn`. - public var ldap_dn: Swift.String? - /// Creates a new `team_hyphen_simple`. - /// - /// - Parameters: - /// - id: Unique identifier of the team - /// - node_id: - /// - url: URL for the team - /// - members_url: - /// - name: Name of the team - /// - description: Description of the team - /// - permission: Permission that the team will have for its repositories - /// - privacy: The level of privacy this team should have - /// - notification_setting: The notification setting the team has set - /// - html_url: - /// - repositories_url: - /// - slug: - /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment - public init( - id: Swift.Int, - node_id: Swift.String, - url: Swift.String, - members_url: Swift.String, - name: Swift.String, - description: Swift.String? = nil, - permission: Swift.String, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, - html_url: Swift.String, - repositories_url: Swift.String, - slug: Swift.String, - ldap_dn: Swift.String? = nil - ) { - self.id = id - self.node_id = node_id - self.url = url - self.members_url = members_url - self.name = name - self.description = description - self.permission = permission - self.privacy = privacy - self.notification_setting = notification_setting - self.html_url = html_url - self.repositories_url = repositories_url - self.slug = slug - self.ldap_dn = ldap_dn - } - public enum CodingKeys: String, CodingKey { - case id - case node_id - case url - case members_url - case name - case description - case permission - case privacy - case notification_setting - case html_url - case repositories_url - case slug - case ldap_dn - } - } } /// Types generated from the `#/components/parameters` section of the OpenAPI document. public enum Parameters { @@ -12956,7 +13235,7 @@ public enum Operations { /// /// **Rate limits** /// - /// To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. + /// To prevent abuse, organization owners are limited to creating 50 organization invitations for an organization within a 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. /// /// - Remark: HTTP `PUT /orgs/{org}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/put(orgs/set-membership-for-user)`. @@ -15250,12 +15529,12 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/teams/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/teams/GET/responses/200/content/application\/json`. - case json([Components.Schemas.team]) + case json([Components.Schemas.team_hyphen_role_hyphen_assignment]) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: [Components.Schemas.team] { + public var json: [Components.Schemas.team_hyphen_role_hyphen_assignment] { get throws { switch self { case let .json(body): @@ -15495,12 +15774,12 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/users/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/users/GET/responses/200/content/application\/json`. - case json([Components.Schemas.simple_hyphen_user]) + case json([Components.Schemas.user_hyphen_role_hyphen_assignment]) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: [Components.Schemas.simple_hyphen_user] { + public var json: [Components.Schemas.user_hyphen_role_hyphen_assignment] { get throws { switch self { case let .json(body): @@ -19053,6 +19332,8 @@ public enum Operations { @frozen public enum value_typePayload: String, Codable, Hashable, Sendable { case string = "string" case single_select = "single_select" + case multi_select = "multi_select" + case true_false = "true_false" } /// The type of the value for the property /// From 5d592da5005986e76efb1c5236311ced58340302 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 17 Jun 2024 21:59:24 +0000 Subject: [PATCH 005/152] Commit via running ake Sources/repos --- Sources/repos/Client.swift | 2 ++ Sources/repos/Types.swift | 39 ++++++++++++++++++++++++++++---------- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/Sources/repos/Client.swift b/Sources/repos/Client.swift index 4fd5a8a824a..74be912e3db 100644 --- a/Sources/repos/Client.swift +++ b/Sources/repos/Client.swift @@ -8093,6 +8093,8 @@ public struct Client: APIProtocol { return .forbidden(.init(body: body)) case 302: return .found(.init()) + case 304: + return .notModified(.init()) default: return .undocumented( statusCode: response.status.code, diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index f9a4d08a5f8..79064437729 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -21600,10 +21600,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/page`. public typealias page = Swift.Int - /// Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - /// - /// - Remark: Generated from `#/components/parameters/since`. - public typealias since = Foundation.Date /// The unique identifier of the comment. /// /// - Remark: Generated from `#/components/parameters/comment-id`. @@ -36294,11 +36290,11 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/commits/GET/query/committer`. public var committer: Swift.String? - /// Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + /// Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Due to limitations of Git, timestamps must be between 1970-01-01 and 2099-12-31 (inclusive) or unexpected results may be returned. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/commits/GET/query/since`. - public var since: Components.Parameters.since? - /// Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + public var since: Foundation.Date? + /// Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Due to limitations of Git, timestamps must be between 1970-01-01 and 2099-12-31 (inclusive) or unexpected results may be returned. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/commits/GET/query/until`. public var until: Foundation.Date? @@ -36317,8 +36313,8 @@ public enum Operations { /// - path: Only commits containing this file path will be returned. /// - author: GitHub username or email address to use to filter by commit author. /// - committer: GitHub username or email address to use to filter by commit committer. - /// - since: Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - /// - until: Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + /// - since: Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Due to limitations of Git, timestamps must be between 1970-01-01 and 2099-12-31 (inclusive) or unexpected results may be returned. + /// - until: Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Due to limitations of Git, timestamps must be between 1970-01-01 and 2099-12-31 (inclusive) or unexpected results may be returned. /// - per_page: The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." /// - page: The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." public init( @@ -36326,7 +36322,7 @@ public enum Operations { path: Swift.String? = nil, author: Swift.String? = nil, committer: Swift.String? = nil, - since: Components.Parameters.since? = nil, + since: Foundation.Date? = nil, until: Foundation.Date? = nil, per_page: Components.Parameters.per_hyphen_page? = nil, page: Components.Parameters.page? = nil @@ -38962,6 +38958,29 @@ public enum Operations { } } } + /// Not modified + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/contents/{path}/get(repos/get-content)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + case notModified(Components.Responses.not_modified) + /// The associated value of the enum case if `self` is `.notModified`. + /// + /// - Throws: An error if `self` is not `.notModified`. + /// - SeeAlso: `.notModified`. + public var notModified: Components.Responses.not_modified { + get throws { + switch self { + case let .notModified(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notModified", + response: self + ) + } + } + } /// Undocumented response. /// /// A response with a code that is not documented in the OpenAPI document. From ca982af0abd8119b48feec06b279438e5ecd1bad Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 17 Jun 2024 22:01:28 +0000 Subject: [PATCH 006/152] Commit via running ake Sources/copilot --- Sources/copilot/Client.swift | 33 ++-- Sources/copilot/Types.swift | 313 +++++++++++++++++++++++++++++------ 2 files changed, 275 insertions(+), 71 deletions(-) diff --git a/Sources/copilot/Client.swift b/Sources/copilot/Client.swift index 11537e99660..455631abe52 100644 --- a/Sources/copilot/Client.swift +++ b/Sources/copilot/Client.swift @@ -235,12 +235,12 @@ public struct Client: APIProtocol { /// **Note**: This endpoint is in beta and is subject to change. /// /// Gets information about an organization's Copilot subscription, including seat breakdown - /// and code matching policies. To configure these settings, go to your organization's settings on GitHub.com. + /// and feature policies. To configure these settings, go to your organization's settings on GitHub.com. /// For more information, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)". /// - /// Only organization owners can configure and view details about the organization's Copilot Business subscription. + /// Only organization owners can view details about the organization's Copilot Business or Copilot Enterprise subscription. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. /// /// - Remark: HTTP `GET /orgs/{org}/copilot/billing`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/get(copilot/get-copilot-organization-details)`. @@ -396,11 +396,10 @@ public struct Client: APIProtocol { /// /// **Note**: This endpoint is in beta and is subject to change. /// - /// Lists all Copilot seat assignments for an organization that are currently being billed (either active or pending cancellation at the start of the next billing cycle). + /// Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription. + /// Only organization owners can view assigned seats. /// - /// Only organization owners can configure and view details about the organization's Copilot Business or Enterprise subscription. - /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. /// /// - Remark: HTTP `GET /orgs/{org}/copilot/billing/seats`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/seats/get(copilot/list-copilot-seats)`. @@ -579,13 +578,13 @@ public struct Client: APIProtocol { /// Purchases a GitHub Copilot seat for all users within each specified team. /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". /// - /// Only organization owners can configure GitHub Copilot in their organization. + /// Only organization owners can add Copilot seats for their organization members. /// /// In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. /// For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)". /// For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `POST /orgs/{org}/copilot/billing/selected_teams`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_teams/post(copilot/add-copilot-seats-for-teams)`. @@ -757,9 +756,9 @@ public struct Client: APIProtocol { /// /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)". /// - /// Only organization owners can configure GitHub Copilot in their organization. + /// Only organization owners can cancel Copilot seats for their organization members. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `DELETE /orgs/{org}/copilot/billing/selected_teams`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_teams/delete(copilot/cancel-copilot-seat-assignment-for-teams)`. @@ -927,13 +926,13 @@ public struct Client: APIProtocol { /// Purchases a GitHub Copilot seat for each user specified. /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". /// - /// Only organization owners can configure GitHub Copilot in their organization. + /// Only organization owners can add Copilot seats for their organization members. /// /// In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. /// For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)". /// For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `POST /orgs/{org}/copilot/billing/selected_users`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_users/post(copilot/add-copilot-seats-for-users)`. @@ -1105,9 +1104,9 @@ public struct Client: APIProtocol { /// /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)". /// - /// Only organization owners can configure GitHub Copilot in their organization. + /// Only organization owners can cancel Copilot seats for their organization members. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `DELETE /orgs/{org}/copilot/billing/selected_users`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_users/delete(copilot/cancel-copilot-seat-assignment-for-users)`. @@ -1466,9 +1465,9 @@ public struct Client: APIProtocol { /// /// Gets the GitHub Copilot seat assignment details for a member of an organization who currently has access to GitHub Copilot. /// - /// Organization owners can view GitHub Copilot seat assignment details for members in their organization. + /// Only organization owners can view Copilot seat assignment details for members of their organization. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. /// /// - Remark: HTTP `GET /orgs/{org}/members/{username}/copilot`. /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/copilot/get(copilot/get-copilot-seat-details-for-user)`. diff --git a/Sources/copilot/Types.swift b/Sources/copilot/Types.swift index d8c6b23c057..74f586c6f5f 100644 --- a/Sources/copilot/Types.swift +++ b/Sources/copilot/Types.swift @@ -35,12 +35,12 @@ public protocol APIProtocol: Sendable { /// **Note**: This endpoint is in beta and is subject to change. /// /// Gets information about an organization's Copilot subscription, including seat breakdown - /// and code matching policies. To configure these settings, go to your organization's settings on GitHub.com. + /// and feature policies. To configure these settings, go to your organization's settings on GitHub.com. /// For more information, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)". /// - /// Only organization owners can configure and view details about the organization's Copilot Business subscription. + /// Only organization owners can view details about the organization's Copilot Business or Copilot Enterprise subscription. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. /// /// - Remark: HTTP `GET /orgs/{org}/copilot/billing`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/get(copilot/get-copilot-organization-details)`. @@ -49,11 +49,10 @@ public protocol APIProtocol: Sendable { /// /// **Note**: This endpoint is in beta and is subject to change. /// - /// Lists all Copilot seat assignments for an organization that are currently being billed (either active or pending cancellation at the start of the next billing cycle). + /// Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription. + /// Only organization owners can view assigned seats. /// - /// Only organization owners can configure and view details about the organization's Copilot Business or Enterprise subscription. - /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. /// /// - Remark: HTTP `GET /orgs/{org}/copilot/billing/seats`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/seats/get(copilot/list-copilot-seats)`. @@ -65,13 +64,13 @@ public protocol APIProtocol: Sendable { /// Purchases a GitHub Copilot seat for all users within each specified team. /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". /// - /// Only organization owners can configure GitHub Copilot in their organization. + /// Only organization owners can add Copilot seats for their organization members. /// /// In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. /// For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)". /// For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `POST /orgs/{org}/copilot/billing/selected_teams`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_teams/post(copilot/add-copilot-seats-for-teams)`. @@ -87,9 +86,9 @@ public protocol APIProtocol: Sendable { /// /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)". /// - /// Only organization owners can configure GitHub Copilot in their organization. + /// Only organization owners can cancel Copilot seats for their organization members. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `DELETE /orgs/{org}/copilot/billing/selected_teams`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_teams/delete(copilot/cancel-copilot-seat-assignment-for-teams)`. @@ -101,13 +100,13 @@ public protocol APIProtocol: Sendable { /// Purchases a GitHub Copilot seat for each user specified. /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". /// - /// Only organization owners can configure GitHub Copilot in their organization. + /// Only organization owners can add Copilot seats for their organization members. /// /// In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. /// For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)". /// For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `POST /orgs/{org}/copilot/billing/selected_users`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_users/post(copilot/add-copilot-seats-for-users)`. @@ -123,9 +122,9 @@ public protocol APIProtocol: Sendable { /// /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)". /// - /// Only organization owners can configure GitHub Copilot in their organization. + /// Only organization owners can cancel Copilot seats for their organization members. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `DELETE /orgs/{org}/copilot/billing/selected_users`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_users/delete(copilot/cancel-copilot-seat-assignment-for-users)`. @@ -155,9 +154,9 @@ public protocol APIProtocol: Sendable { /// /// Gets the GitHub Copilot seat assignment details for a member of an organization who currently has access to GitHub Copilot. /// - /// Organization owners can view GitHub Copilot seat assignment details for members in their organization. + /// Only organization owners can view Copilot seat assignment details for members of their organization. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. /// /// - Remark: HTTP `GET /orgs/{org}/members/{username}/copilot`. /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/copilot/get(copilot/get-copilot-seat-details-for-user)`. @@ -200,12 +199,12 @@ extension APIProtocol { /// **Note**: This endpoint is in beta and is subject to change. /// /// Gets information about an organization's Copilot subscription, including seat breakdown - /// and code matching policies. To configure these settings, go to your organization's settings on GitHub.com. + /// and feature policies. To configure these settings, go to your organization's settings on GitHub.com. /// For more information, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)". /// - /// Only organization owners can configure and view details about the organization's Copilot Business subscription. + /// Only organization owners can view details about the organization's Copilot Business or Copilot Enterprise subscription. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. /// /// - Remark: HTTP `GET /orgs/{org}/copilot/billing`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/get(copilot/get-copilot-organization-details)`. @@ -222,11 +221,10 @@ extension APIProtocol { /// /// **Note**: This endpoint is in beta and is subject to change. /// - /// Lists all Copilot seat assignments for an organization that are currently being billed (either active or pending cancellation at the start of the next billing cycle). - /// - /// Only organization owners can configure and view details about the organization's Copilot Business or Enterprise subscription. + /// Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription. + /// Only organization owners can view assigned seats. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. /// /// - Remark: HTTP `GET /orgs/{org}/copilot/billing/seats`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/seats/get(copilot/list-copilot-seats)`. @@ -248,13 +246,13 @@ extension APIProtocol { /// Purchases a GitHub Copilot seat for all users within each specified team. /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". /// - /// Only organization owners can configure GitHub Copilot in their organization. + /// Only organization owners can add Copilot seats for their organization members. /// /// In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. /// For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)". /// For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `POST /orgs/{org}/copilot/billing/selected_teams`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_teams/post(copilot/add-copilot-seats-for-teams)`. @@ -280,9 +278,9 @@ extension APIProtocol { /// /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)". /// - /// Only organization owners can configure GitHub Copilot in their organization. + /// Only organization owners can cancel Copilot seats for their organization members. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `DELETE /orgs/{org}/copilot/billing/selected_teams`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_teams/delete(copilot/cancel-copilot-seat-assignment-for-teams)`. @@ -304,13 +302,13 @@ extension APIProtocol { /// Purchases a GitHub Copilot seat for each user specified. /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". /// - /// Only organization owners can configure GitHub Copilot in their organization. + /// Only organization owners can add Copilot seats for their organization members. /// /// In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. /// For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)". /// For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `POST /orgs/{org}/copilot/billing/selected_users`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_users/post(copilot/add-copilot-seats-for-users)`. @@ -336,9 +334,9 @@ extension APIProtocol { /// /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)". /// - /// Only organization owners can configure GitHub Copilot in their organization. + /// Only organization owners can cancel Copilot seats for their organization members. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `DELETE /orgs/{org}/copilot/billing/selected_users`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_users/delete(copilot/cancel-copilot-seat-assignment-for-users)`. @@ -388,9 +386,9 @@ extension APIProtocol { /// /// Gets the GitHub Copilot seat assignment details for a member of an organization who currently has access to GitHub Copilot. /// - /// Organization owners can view GitHub Copilot seat assignment details for members in their organization. + /// Only organization owners can view Copilot seat assignment details for members of their organization. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. /// /// - Remark: HTTP `GET /orgs/{org}/members/{username}/copilot`. /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/copilot/get(copilot/get-copilot-seat-details-for-user)`. @@ -893,6 +891,91 @@ public enum Components { ]) } } + /// A GitHub organization. + /// + /// - Remark: Generated from `#/components/schemas/organization-simple`. + public struct organization_hyphen_simple: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/organization-simple/login`. + public var login: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/organization-simple/node_id`. + public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/repos_url`. + public var repos_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/events_url`. + public var events_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/hooks_url`. + public var hooks_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/issues_url`. + public var issues_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/members_url`. + public var members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/public_members_url`. + public var public_members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/avatar_url`. + public var avatar_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/description`. + public var description: Swift.String? + /// Creates a new `organization_hyphen_simple`. + /// + /// - Parameters: + /// - login: + /// - id: + /// - node_id: + /// - url: + /// - repos_url: + /// - events_url: + /// - hooks_url: + /// - issues_url: + /// - members_url: + /// - public_members_url: + /// - avatar_url: + /// - description: + public init( + login: Swift.String, + id: Swift.Int, + node_id: Swift.String, + url: Swift.String, + repos_url: Swift.String, + events_url: Swift.String, + hooks_url: Swift.String, + issues_url: Swift.String, + members_url: Swift.String, + public_members_url: Swift.String, + avatar_url: Swift.String, + description: Swift.String? = nil + ) { + self.login = login + self.id = id + self.node_id = node_id + self.url = url + self.repos_url = repos_url + self.events_url = events_url + self.hooks_url = hooks_url + self.issues_url = issues_url + self.members_url = members_url + self.public_members_url = public_members_url + self.avatar_url = avatar_url + self.description = description + } + public enum CodingKeys: String, CodingKey { + case login + case id + case node_id + case url + case repos_url + case events_url + case hooks_url + case issues_url + case members_url + case public_members_url + case avatar_url + case description + } + } /// The breakdown of Copilot Business seats for the organization. /// /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown`. @@ -1614,6 +1697,79 @@ public enum Components { case plan } } + /// Group of enterprise owners and/or members + /// + /// - Remark: Generated from `#/components/schemas/enterprise-team`. + public struct enterprise_hyphen_team: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/enterprise-team/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/enterprise-team/name`. + public var name: Swift.String + /// - Remark: Generated from `#/components/schemas/enterprise-team/slug`. + public var slug: Swift.String + /// - Remark: Generated from `#/components/schemas/enterprise-team/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/enterprise-team/sync_to_organizations`. + public var sync_to_organizations: Swift.String + /// - Remark: Generated from `#/components/schemas/enterprise-team/group_id`. + public var group_id: Swift.Int? + /// - Remark: Generated from `#/components/schemas/enterprise-team/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/enterprise-team/members_url`. + public var members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/enterprise-team/created_at`. + public var created_at: Foundation.Date + /// - Remark: Generated from `#/components/schemas/enterprise-team/updated_at`. + public var updated_at: Foundation.Date + /// Creates a new `enterprise_hyphen_team`. + /// + /// - Parameters: + /// - id: + /// - name: + /// - slug: + /// - url: + /// - sync_to_organizations: + /// - group_id: + /// - html_url: + /// - members_url: + /// - created_at: + /// - updated_at: + public init( + id: Swift.Int, + name: Swift.String, + slug: Swift.String, + url: Swift.String, + sync_to_organizations: Swift.String, + group_id: Swift.Int? = nil, + html_url: Swift.String, + members_url: Swift.String, + created_at: Foundation.Date, + updated_at: Foundation.Date + ) { + self.id = id + self.name = name + self.slug = slug + self.url = url + self.sync_to_organizations = sync_to_organizations + self.group_id = group_id + self.html_url = html_url + self.members_url = members_url + self.created_at = created_at + self.updated_at = updated_at + } + public enum CodingKeys: String, CodingKey { + case id + case name + case slug + case url + case sync_to_organizations + case group_id + case html_url + case members_url + case created_at + case updated_at + } + } /// Information about a Copilot Business seat assignment for a user, team, or organization. /// /// - Remark: Generated from `#/components/schemas/copilot-seat-details`. @@ -1669,12 +1825,45 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assignee`. public var assignee: Components.Schemas.copilot_hyphen_seat_hyphen_details.assigneePayload - /// The team that granted access to GitHub Copilot to the assignee. This will be null if the user was assigned a seat individually. + /// The organization to which this seat belongs. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/organization`. + @frozen public enum organizationPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/organization/case1`. + case organization_hyphen_simple(Components.Schemas.organization_hyphen_simple) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self = .organization_hyphen_simple(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + throw Swift.DecodingError.failedToDecodeOneOfSchema( + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + switch self { + case let .organization_hyphen_simple(value): + try value.encode(to: encoder) + } + } + } + /// The organization to which this seat belongs. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/organization`. + public var organization: Components.Schemas.copilot_hyphen_seat_hyphen_details.organizationPayload? + /// The team through which the assignee is granted access to GitHub Copilot, if applicable. /// /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assigning_team`. @frozen public enum assigning_teamPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assigning_team/case1`. case team(Components.Schemas.team) + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assigning_team/case2`. + case enterprise_hyphen_team(Components.Schemas.enterprise_hyphen_team) public init(from decoder: any Decoder) throws { var errors: [any Error] = [] do { @@ -1683,6 +1872,12 @@ public enum Components { } catch { errors.append(error) } + do { + self = .enterprise_hyphen_team(try .init(from: decoder)) + return + } catch { + errors.append(error) + } throw Swift.DecodingError.failedToDecodeOneOfSchema( type: Self.self, codingPath: decoder.codingPath, @@ -1693,10 +1888,12 @@ public enum Components { switch self { case let .team(value): try value.encode(to: encoder) + case let .enterprise_hyphen_team(value): + try value.encode(to: encoder) } } } - /// The team that granted access to GitHub Copilot to the assignee. This will be null if the user was assigned a seat individually. + /// The team through which the assignee is granted access to GitHub Copilot, if applicable. /// /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assigning_team`. public var assigning_team: Components.Schemas.copilot_hyphen_seat_hyphen_details.assigning_teamPayload? @@ -1724,7 +1921,8 @@ public enum Components { /// /// - Parameters: /// - assignee: The assignee that has been granted access to GitHub Copilot. - /// - assigning_team: The team that granted access to GitHub Copilot to the assignee. This will be null if the user was assigned a seat individually. + /// - organization: The organization to which this seat belongs. + /// - assigning_team: The team through which the assignee is granted access to GitHub Copilot, if applicable. /// - pending_cancellation_date: The pending cancellation date for the seat, in `YYYY-MM-DD` format. This will be null unless the assignee's Copilot access has been canceled during the current billing cycle. If the seat has been cancelled, this corresponds to the start of the organization's next billing cycle. /// - last_activity_at: Timestamp of user's last GitHub Copilot activity, in ISO 8601 format. /// - last_activity_editor: Last editor that was used by the user for a GitHub Copilot completion. @@ -1732,6 +1930,7 @@ public enum Components { /// - updated_at: Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format. public init( assignee: Components.Schemas.copilot_hyphen_seat_hyphen_details.assigneePayload, + organization: Components.Schemas.copilot_hyphen_seat_hyphen_details.organizationPayload? = nil, assigning_team: Components.Schemas.copilot_hyphen_seat_hyphen_details.assigning_teamPayload? = nil, pending_cancellation_date: Swift.String? = nil, last_activity_at: Foundation.Date? = nil, @@ -1740,6 +1939,7 @@ public enum Components { updated_at: Foundation.Date? = nil ) { self.assignee = assignee + self.organization = organization self.assigning_team = assigning_team self.pending_cancellation_date = pending_cancellation_date self.last_activity_at = last_activity_at @@ -1749,6 +1949,7 @@ public enum Components { } public enum CodingKeys: String, CodingKey { case assignee + case organization case assigning_team case pending_cancellation_date case last_activity_at @@ -1762,6 +1963,10 @@ public enum Components { Components.Schemas.copilot_hyphen_seat_hyphen_details.assigneePayload.self, forKey: .assignee ) + organization = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_seat_hyphen_details.organizationPayload.self, + forKey: .organization + ) assigning_team = try container.decodeIfPresent( Components.Schemas.copilot_hyphen_seat_hyphen_details.assigning_teamPayload.self, forKey: .assigning_team @@ -1788,6 +1993,7 @@ public enum Components { ) try decoder.ensureNoAdditionalProperties(knownKeys: [ "assignee", + "organization", "assigning_team", "pending_cancellation_date", "last_activity_at", @@ -2225,12 +2431,12 @@ public enum Operations { /// **Note**: This endpoint is in beta and is subject to change. /// /// Gets information about an organization's Copilot subscription, including seat breakdown - /// and code matching policies. To configure these settings, go to your organization's settings on GitHub.com. + /// and feature policies. To configure these settings, go to your organization's settings on GitHub.com. /// For more information, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)". /// - /// Only organization owners can configure and view details about the organization's Copilot Business subscription. + /// Only organization owners can view details about the organization's Copilot Business or Copilot Enterprise subscription. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. /// /// - Remark: HTTP `GET /orgs/{org}/copilot/billing`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/get(copilot/get-copilot-organization-details)`. @@ -2483,11 +2689,10 @@ public enum Operations { /// /// **Note**: This endpoint is in beta and is subject to change. /// - /// Lists all Copilot seat assignments for an organization that are currently being billed (either active or pending cancellation at the start of the next billing cycle). - /// - /// Only organization owners can configure and view details about the organization's Copilot Business or Enterprise subscription. + /// Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription. + /// Only organization owners can view assigned seats. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. /// /// - Remark: HTTP `GET /orgs/{org}/copilot/billing/seats`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/seats/get(copilot/list-copilot-seats)`. @@ -2787,13 +2992,13 @@ public enum Operations { /// Purchases a GitHub Copilot seat for all users within each specified team. /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". /// - /// Only organization owners can configure GitHub Copilot in their organization. + /// Only organization owners can add Copilot seats for their organization members. /// /// In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. /// For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)". /// For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `POST /orgs/{org}/copilot/billing/selected_teams`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_teams/post(copilot/add-copilot-seats-for-teams)`. @@ -3096,9 +3301,9 @@ public enum Operations { /// /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)". /// - /// Only organization owners can configure GitHub Copilot in their organization. + /// Only organization owners can cancel Copilot seats for their organization members. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `DELETE /orgs/{org}/copilot/billing/selected_teams`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_teams/delete(copilot/cancel-copilot-seat-assignment-for-teams)`. @@ -3397,13 +3602,13 @@ public enum Operations { /// Purchases a GitHub Copilot seat for each user specified. /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". /// - /// Only organization owners can configure GitHub Copilot in their organization. + /// Only organization owners can add Copilot seats for their organization members. /// /// In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. /// For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)". /// For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `POST /orgs/{org}/copilot/billing/selected_users`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_users/post(copilot/add-copilot-seats-for-users)`. @@ -3706,9 +3911,9 @@ public enum Operations { /// /// For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)". /// - /// Only organization owners can configure GitHub Copilot in their organization. + /// Only organization owners can cancel Copilot seats for their organization members. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `DELETE /orgs/{org}/copilot/billing/selected_users`. /// - Remark: Generated from `#/paths//orgs/{org}/copilot/billing/selected_users/delete(copilot/cancel-copilot-seat-assignment-for-users)`. @@ -4283,9 +4488,9 @@ public enum Operations { /// /// Gets the GitHub Copilot seat assignment details for a member of an organization who currently has access to GitHub Copilot. /// - /// Organization owners can view GitHub Copilot seat assignment details for members in their organization. + /// Only organization owners can view Copilot seat assignment details for members of their organization. /// - /// OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. /// /// - Remark: HTTP `GET /orgs/{org}/members/{username}/copilot`. /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/copilot/get(copilot/get-copilot-seat-details-for-user)`. From 9db4e01e31b7313726f16ecdb74692013a58b077 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 21:12:13 +0000 Subject: [PATCH 007/152] Bump Submodule/github/rest-api-description from `62b23af` to `d2303fd` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `62b23af` to `d2303fd`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/62b23af16ec379af0466b516ccf1f0dd8373f91b...d2303fdde41a01ecb82983c478eba68dd73f8dcf) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index 62b23af16ec..d2303fdde41 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit 62b23af16ec379af0466b516ccf1f0dd8373f91b +Subproject commit d2303fdde41a01ecb82983c478eba68dd73f8dcf From 7e0a0a74e3978bb19f58c27bf025f051cac8665a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 24 Jun 2024 21:27:33 +0000 Subject: [PATCH 008/152] Commit via running ake Sources/actions --- Sources/actions/Types.swift | 490 ++++++++++++++++++------------------ 1 file changed, 245 insertions(+), 245 deletions(-) diff --git a/Sources/actions/Types.swift b/Sources/actions/Types.swift index be94db61de4..5e81f4a0d05 100644 --- a/Sources/actions/Types.swift +++ b/Sources/actions/Types.swift @@ -4956,6 +4956,251 @@ public enum Components { case html_url } } + /// Groups of organization members that gives permissions on specified repositories. + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. + public struct nullable_hyphen_team_hyphen_simple: Codable, Hashable, Sendable { + /// Unique identifier of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/node_id`. + public var node_id: Swift.String + /// URL for the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/members_url`. + public var members_url: Swift.String + /// Name of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/name`. + public var name: Swift.String + /// Description of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/description`. + public var description: Swift.String? + /// Permission that the team will have for its repositories + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/permission`. + public var permission: Swift.String + /// The level of privacy this team should have + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/privacy`. + public var privacy: Swift.String? + /// The notification setting the team has set + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/slug`. + public var slug: Swift.String + /// Distinguished Name (DN) that team maps to within LDAP environment + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/ldap_dn`. + public var ldap_dn: Swift.String? + /// Creates a new `nullable_hyphen_team_hyphen_simple`. + /// + /// - Parameters: + /// - id: Unique identifier of the team + /// - node_id: + /// - url: URL for the team + /// - members_url: + /// - name: Name of the team + /// - description: Description of the team + /// - permission: Permission that the team will have for its repositories + /// - privacy: The level of privacy this team should have + /// - notification_setting: The notification setting the team has set + /// - html_url: + /// - repositories_url: + /// - slug: + /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment + public init( + id: Swift.Int, + node_id: Swift.String, + url: Swift.String, + members_url: Swift.String, + name: Swift.String, + description: Swift.String? = nil, + permission: Swift.String, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + html_url: Swift.String, + repositories_url: Swift.String, + slug: Swift.String, + ldap_dn: Swift.String? = nil + ) { + self.id = id + self.node_id = node_id + self.url = url + self.members_url = members_url + self.name = name + self.description = description + self.permission = permission + self.privacy = privacy + self.notification_setting = notification_setting + self.html_url = html_url + self.repositories_url = repositories_url + self.slug = slug + self.ldap_dn = ldap_dn + } + public enum CodingKeys: String, CodingKey { + case id + case node_id + case url + case members_url + case name + case description + case permission + case privacy + case notification_setting + case html_url + case repositories_url + case slug + case ldap_dn + } + } + /// Groups of organization members that gives permissions on specified repositories. + /// + /// - Remark: Generated from `#/components/schemas/team`. + public struct team: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/team/node_id`. + public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/team/name`. + public var name: Swift.String + /// - Remark: Generated from `#/components/schemas/team/slug`. + public var slug: Swift.String + /// - Remark: Generated from `#/components/schemas/team/description`. + public var description: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/privacy`. + public var privacy: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/permission`. + public var permission: Swift.String + /// - Remark: Generated from `#/components/schemas/team/permissions`. + public struct permissionsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team/permissions/pull`. + public var pull: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/triage`. + public var triage: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/push`. + public var push: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/maintain`. + public var maintain: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/admin`. + public var admin: Swift.Bool + /// Creates a new `permissionsPayload`. + /// + /// - Parameters: + /// - pull: + /// - triage: + /// - push: + /// - maintain: + /// - admin: + public init( + pull: Swift.Bool, + triage: Swift.Bool, + push: Swift.Bool, + maintain: Swift.Bool, + admin: Swift.Bool + ) { + self.pull = pull + self.triage = triage + self.push = push + self.maintain = maintain + self.admin = admin + } + public enum CodingKeys: String, CodingKey { + case pull + case triage + case push + case maintain + case admin + } + } + /// - Remark: Generated from `#/components/schemas/team/permissions`. + public var permissions: Components.Schemas.team.permissionsPayload? + /// - Remark: Generated from `#/components/schemas/team/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/members_url`. + public var members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/parent`. + public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? + /// Creates a new `team`. + /// + /// - Parameters: + /// - id: + /// - node_id: + /// - name: + /// - slug: + /// - description: + /// - privacy: + /// - notification_setting: + /// - permission: + /// - permissions: + /// - url: + /// - html_url: + /// - members_url: + /// - repositories_url: + /// - parent: + public init( + id: Swift.Int, + node_id: Swift.String, + name: Swift.String, + slug: Swift.String, + description: Swift.String? = nil, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + permission: Swift.String, + permissions: Components.Schemas.team.permissionsPayload? = nil, + url: Swift.String, + html_url: Swift.String, + members_url: Swift.String, + repositories_url: Swift.String, + parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil + ) { + self.id = id + self.node_id = node_id + self.name = name + self.slug = slug + self.description = description + self.privacy = privacy + self.notification_setting = notification_setting + self.permission = permission + self.permissions = permissions + self.url = url + self.html_url = html_url + self.members_url = members_url + self.repositories_url = repositories_url + self.parent = parent + } + public enum CodingKeys: String, CodingKey { + case id + case node_id + case name + case slug + case description + case privacy + case notification_setting + case permission + case permissions + case url + case html_url + case members_url + case repositories_url + case parent + } + } /// GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. /// /// - Remark: Generated from `#/components/schemas/nullable-integration`. @@ -6551,251 +6796,6 @@ public enum Components { case selected_repositories_url } } - /// Groups of organization members that gives permissions on specified repositories. - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. - public struct nullable_hyphen_team_hyphen_simple: Codable, Hashable, Sendable { - /// Unique identifier of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/node_id`. - public var node_id: Swift.String - /// URL for the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/members_url`. - public var members_url: Swift.String - /// Name of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/name`. - public var name: Swift.String - /// Description of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/description`. - public var description: Swift.String? - /// Permission that the team will have for its repositories - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/permission`. - public var permission: Swift.String - /// The level of privacy this team should have - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/privacy`. - public var privacy: Swift.String? - /// The notification setting the team has set - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/slug`. - public var slug: Swift.String - /// Distinguished Name (DN) that team maps to within LDAP environment - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/ldap_dn`. - public var ldap_dn: Swift.String? - /// Creates a new `nullable_hyphen_team_hyphen_simple`. - /// - /// - Parameters: - /// - id: Unique identifier of the team - /// - node_id: - /// - url: URL for the team - /// - members_url: - /// - name: Name of the team - /// - description: Description of the team - /// - permission: Permission that the team will have for its repositories - /// - privacy: The level of privacy this team should have - /// - notification_setting: The notification setting the team has set - /// - html_url: - /// - repositories_url: - /// - slug: - /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment - public init( - id: Swift.Int, - node_id: Swift.String, - url: Swift.String, - members_url: Swift.String, - name: Swift.String, - description: Swift.String? = nil, - permission: Swift.String, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, - html_url: Swift.String, - repositories_url: Swift.String, - slug: Swift.String, - ldap_dn: Swift.String? = nil - ) { - self.id = id - self.node_id = node_id - self.url = url - self.members_url = members_url - self.name = name - self.description = description - self.permission = permission - self.privacy = privacy - self.notification_setting = notification_setting - self.html_url = html_url - self.repositories_url = repositories_url - self.slug = slug - self.ldap_dn = ldap_dn - } - public enum CodingKeys: String, CodingKey { - case id - case node_id - case url - case members_url - case name - case description - case permission - case privacy - case notification_setting - case html_url - case repositories_url - case slug - case ldap_dn - } - } - /// Groups of organization members that gives permissions on specified repositories. - /// - /// - Remark: Generated from `#/components/schemas/team`. - public struct team: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/team/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/team/node_id`. - public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/team/name`. - public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/team/slug`. - public var slug: Swift.String - /// - Remark: Generated from `#/components/schemas/team/description`. - public var description: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/privacy`. - public var privacy: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/permission`. - public var permission: Swift.String - /// - Remark: Generated from `#/components/schemas/team/permissions`. - public struct permissionsPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/team/permissions/pull`. - public var pull: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/triage`. - public var triage: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/push`. - public var push: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/maintain`. - public var maintain: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/admin`. - public var admin: Swift.Bool - /// Creates a new `permissionsPayload`. - /// - /// - Parameters: - /// - pull: - /// - triage: - /// - push: - /// - maintain: - /// - admin: - public init( - pull: Swift.Bool, - triage: Swift.Bool, - push: Swift.Bool, - maintain: Swift.Bool, - admin: Swift.Bool - ) { - self.pull = pull - self.triage = triage - self.push = push - self.maintain = maintain - self.admin = admin - } - public enum CodingKeys: String, CodingKey { - case pull - case triage - case push - case maintain - case admin - } - } - /// - Remark: Generated from `#/components/schemas/team/permissions`. - public var permissions: Components.Schemas.team.permissionsPayload? - /// - Remark: Generated from `#/components/schemas/team/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/members_url`. - public var members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/parent`. - public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? - /// Creates a new `team`. - /// - /// - Parameters: - /// - id: - /// - node_id: - /// - name: - /// - slug: - /// - description: - /// - privacy: - /// - notification_setting: - /// - permission: - /// - permissions: - /// - url: - /// - html_url: - /// - members_url: - /// - repositories_url: - /// - parent: - public init( - id: Swift.Int, - node_id: Swift.String, - name: Swift.String, - slug: Swift.String, - description: Swift.String? = nil, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, - permission: Swift.String, - permissions: Components.Schemas.team.permissionsPayload? = nil, - url: Swift.String, - html_url: Swift.String, - members_url: Swift.String, - repositories_url: Swift.String, - parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil - ) { - self.id = id - self.node_id = node_id - self.name = name - self.slug = slug - self.description = description - self.privacy = privacy - self.notification_setting = notification_setting - self.permission = permission - self.permissions = permissions - self.url = url - self.html_url = html_url - self.members_url = members_url - self.repositories_url = repositories_url - self.parent = parent - } - public enum CodingKeys: String, CodingKey { - case id - case node_id - case name - case slug - case description - case privacy - case notification_setting - case permission - case permissions - case url - case html_url - case members_url - case repositories_url - case parent - } - } /// An artifact /// /// - Remark: Generated from `#/components/schemas/artifact`. From e3201523281e89d14b71f1dfbe253fbefea80fbf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 24 Jun 2024 21:32:08 +0000 Subject: [PATCH 009/152] Commit via running ake Sources/issues --- Sources/issues/Types.swift | 490 ++++++++++++++++++------------------- 1 file changed, 245 insertions(+), 245 deletions(-) diff --git a/Sources/issues/Types.swift b/Sources/issues/Types.swift index 2db3458272a..4a32a2a76db 100644 --- a/Sources/issues/Types.swift +++ b/Sources/issues/Types.swift @@ -2732,6 +2732,251 @@ public enum Components { case anonymous_access_enabled } } + /// Groups of organization members that gives permissions on specified repositories. + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. + public struct nullable_hyphen_team_hyphen_simple: Codable, Hashable, Sendable { + /// Unique identifier of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/node_id`. + public var node_id: Swift.String + /// URL for the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/members_url`. + public var members_url: Swift.String + /// Name of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/name`. + public var name: Swift.String + /// Description of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/description`. + public var description: Swift.String? + /// Permission that the team will have for its repositories + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/permission`. + public var permission: Swift.String + /// The level of privacy this team should have + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/privacy`. + public var privacy: Swift.String? + /// The notification setting the team has set + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/slug`. + public var slug: Swift.String + /// Distinguished Name (DN) that team maps to within LDAP environment + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/ldap_dn`. + public var ldap_dn: Swift.String? + /// Creates a new `nullable_hyphen_team_hyphen_simple`. + /// + /// - Parameters: + /// - id: Unique identifier of the team + /// - node_id: + /// - url: URL for the team + /// - members_url: + /// - name: Name of the team + /// - description: Description of the team + /// - permission: Permission that the team will have for its repositories + /// - privacy: The level of privacy this team should have + /// - notification_setting: The notification setting the team has set + /// - html_url: + /// - repositories_url: + /// - slug: + /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment + public init( + id: Swift.Int, + node_id: Swift.String, + url: Swift.String, + members_url: Swift.String, + name: Swift.String, + description: Swift.String? = nil, + permission: Swift.String, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + html_url: Swift.String, + repositories_url: Swift.String, + slug: Swift.String, + ldap_dn: Swift.String? = nil + ) { + self.id = id + self.node_id = node_id + self.url = url + self.members_url = members_url + self.name = name + self.description = description + self.permission = permission + self.privacy = privacy + self.notification_setting = notification_setting + self.html_url = html_url + self.repositories_url = repositories_url + self.slug = slug + self.ldap_dn = ldap_dn + } + public enum CodingKeys: String, CodingKey { + case id + case node_id + case url + case members_url + case name + case description + case permission + case privacy + case notification_setting + case html_url + case repositories_url + case slug + case ldap_dn + } + } + /// Groups of organization members that gives permissions on specified repositories. + /// + /// - Remark: Generated from `#/components/schemas/team`. + public struct team: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/team/node_id`. + public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/team/name`. + public var name: Swift.String + /// - Remark: Generated from `#/components/schemas/team/slug`. + public var slug: Swift.String + /// - Remark: Generated from `#/components/schemas/team/description`. + public var description: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/privacy`. + public var privacy: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/permission`. + public var permission: Swift.String + /// - Remark: Generated from `#/components/schemas/team/permissions`. + public struct permissionsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team/permissions/pull`. + public var pull: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/triage`. + public var triage: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/push`. + public var push: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/maintain`. + public var maintain: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/admin`. + public var admin: Swift.Bool + /// Creates a new `permissionsPayload`. + /// + /// - Parameters: + /// - pull: + /// - triage: + /// - push: + /// - maintain: + /// - admin: + public init( + pull: Swift.Bool, + triage: Swift.Bool, + push: Swift.Bool, + maintain: Swift.Bool, + admin: Swift.Bool + ) { + self.pull = pull + self.triage = triage + self.push = push + self.maintain = maintain + self.admin = admin + } + public enum CodingKeys: String, CodingKey { + case pull + case triage + case push + case maintain + case admin + } + } + /// - Remark: Generated from `#/components/schemas/team/permissions`. + public var permissions: Components.Schemas.team.permissionsPayload? + /// - Remark: Generated from `#/components/schemas/team/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/members_url`. + public var members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/parent`. + public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? + /// Creates a new `team`. + /// + /// - Parameters: + /// - id: + /// - node_id: + /// - name: + /// - slug: + /// - description: + /// - privacy: + /// - notification_setting: + /// - permission: + /// - permissions: + /// - url: + /// - html_url: + /// - members_url: + /// - repositories_url: + /// - parent: + public init( + id: Swift.Int, + node_id: Swift.String, + name: Swift.String, + slug: Swift.String, + description: Swift.String? = nil, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + permission: Swift.String, + permissions: Components.Schemas.team.permissionsPayload? = nil, + url: Swift.String, + html_url: Swift.String, + members_url: Swift.String, + repositories_url: Swift.String, + parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil + ) { + self.id = id + self.node_id = node_id + self.name = name + self.slug = slug + self.description = description + self.privacy = privacy + self.notification_setting = notification_setting + self.permission = permission + self.permissions = permissions + self.url = url + self.html_url = html_url + self.members_url = members_url + self.repositories_url = repositories_url + self.parent = parent + } + public enum CodingKeys: String, CodingKey { + case id + case node_id + case name + case slug + case description + case privacy + case notification_setting + case permission + case permissions + case url + case html_url + case members_url + case repositories_url + case parent + } + } /// A collection of related issues and pull requests. /// /// - Remark: Generated from `#/components/schemas/nullable-milestone`. @@ -3642,251 +3887,6 @@ public enum Components { case reactions } } - /// Groups of organization members that gives permissions on specified repositories. - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. - public struct nullable_hyphen_team_hyphen_simple: Codable, Hashable, Sendable { - /// Unique identifier of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/node_id`. - public var node_id: Swift.String - /// URL for the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/members_url`. - public var members_url: Swift.String - /// Name of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/name`. - public var name: Swift.String - /// Description of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/description`. - public var description: Swift.String? - /// Permission that the team will have for its repositories - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/permission`. - public var permission: Swift.String - /// The level of privacy this team should have - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/privacy`. - public var privacy: Swift.String? - /// The notification setting the team has set - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/slug`. - public var slug: Swift.String - /// Distinguished Name (DN) that team maps to within LDAP environment - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/ldap_dn`. - public var ldap_dn: Swift.String? - /// Creates a new `nullable_hyphen_team_hyphen_simple`. - /// - /// - Parameters: - /// - id: Unique identifier of the team - /// - node_id: - /// - url: URL for the team - /// - members_url: - /// - name: Name of the team - /// - description: Description of the team - /// - permission: Permission that the team will have for its repositories - /// - privacy: The level of privacy this team should have - /// - notification_setting: The notification setting the team has set - /// - html_url: - /// - repositories_url: - /// - slug: - /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment - public init( - id: Swift.Int, - node_id: Swift.String, - url: Swift.String, - members_url: Swift.String, - name: Swift.String, - description: Swift.String? = nil, - permission: Swift.String, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, - html_url: Swift.String, - repositories_url: Swift.String, - slug: Swift.String, - ldap_dn: Swift.String? = nil - ) { - self.id = id - self.node_id = node_id - self.url = url - self.members_url = members_url - self.name = name - self.description = description - self.permission = permission - self.privacy = privacy - self.notification_setting = notification_setting - self.html_url = html_url - self.repositories_url = repositories_url - self.slug = slug - self.ldap_dn = ldap_dn - } - public enum CodingKeys: String, CodingKey { - case id - case node_id - case url - case members_url - case name - case description - case permission - case privacy - case notification_setting - case html_url - case repositories_url - case slug - case ldap_dn - } - } - /// Groups of organization members that gives permissions on specified repositories. - /// - /// - Remark: Generated from `#/components/schemas/team`. - public struct team: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/team/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/team/node_id`. - public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/team/name`. - public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/team/slug`. - public var slug: Swift.String - /// - Remark: Generated from `#/components/schemas/team/description`. - public var description: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/privacy`. - public var privacy: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/permission`. - public var permission: Swift.String - /// - Remark: Generated from `#/components/schemas/team/permissions`. - public struct permissionsPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/team/permissions/pull`. - public var pull: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/triage`. - public var triage: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/push`. - public var push: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/maintain`. - public var maintain: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/admin`. - public var admin: Swift.Bool - /// Creates a new `permissionsPayload`. - /// - /// - Parameters: - /// - pull: - /// - triage: - /// - push: - /// - maintain: - /// - admin: - public init( - pull: Swift.Bool, - triage: Swift.Bool, - push: Swift.Bool, - maintain: Swift.Bool, - admin: Swift.Bool - ) { - self.pull = pull - self.triage = triage - self.push = push - self.maintain = maintain - self.admin = admin - } - public enum CodingKeys: String, CodingKey { - case pull - case triage - case push - case maintain - case admin - } - } - /// - Remark: Generated from `#/components/schemas/team/permissions`. - public var permissions: Components.Schemas.team.permissionsPayload? - /// - Remark: Generated from `#/components/schemas/team/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/members_url`. - public var members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/parent`. - public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? - /// Creates a new `team`. - /// - /// - Parameters: - /// - id: - /// - node_id: - /// - name: - /// - slug: - /// - description: - /// - privacy: - /// - notification_setting: - /// - permission: - /// - permissions: - /// - url: - /// - html_url: - /// - members_url: - /// - repositories_url: - /// - parent: - public init( - id: Swift.Int, - node_id: Swift.String, - name: Swift.String, - slug: Swift.String, - description: Swift.String? = nil, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, - permission: Swift.String, - permissions: Components.Schemas.team.permissionsPayload? = nil, - url: Swift.String, - html_url: Swift.String, - members_url: Swift.String, - repositories_url: Swift.String, - parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil - ) { - self.id = id - self.node_id = node_id - self.name = name - self.slug = slug - self.description = description - self.privacy = privacy - self.notification_setting = notification_setting - self.permission = permission - self.permissions = permissions - self.url = url - self.html_url = html_url - self.members_url = members_url - self.repositories_url = repositories_url - self.parent = parent - } - public enum CodingKeys: String, CodingKey { - case id - case node_id - case name - case slug - case description - case privacy - case notification_setting - case permission - case permissions - case url - case html_url - case members_url - case repositories_url - case parent - } - } /// Commit Comment /// /// - Remark: Generated from `#/components/schemas/commit-comment`. From 83553e1c30f37177132a7687dfff0ef4a3d59b02 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 24 Jun 2024 21:34:37 +0000 Subject: [PATCH 010/152] Commit via running ake Sources/orgs --- Sources/orgs/Client.swift | 90 ++ Sources/orgs/Types.swift | 2892 +++++++++++++++++++++---------------- 2 files changed, 1701 insertions(+), 1281 deletions(-) diff --git a/Sources/orgs/Client.swift b/Sources/orgs/Client.swift index 80449eaa97a..1acbf63012e 100644 --- a/Sources/orgs/Client.swift +++ b/Sources/orgs/Client.swift @@ -481,6 +481,96 @@ public struct Client: APIProtocol { } ) } + /// List attestations + /// + /// List a collection of artifact attestations with a given subject digest that are associated with repositories owned by an organization. + /// + /// The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required. + /// + /// **Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// + /// - Remark: HTTP `GET /orgs/{org}/attestations/{subject_digest}`. + /// - Remark: Generated from `#/paths//orgs/{org}/attestations/{subject_digest}/get(orgs/list-attestations)`. + public func orgs_sol_list_hyphen_attestations(_ input: Operations.orgs_sol_list_hyphen_attestations.Input) async throws -> Operations.orgs_sol_list_hyphen_attestations.Output { + try await client.send( + input: input, + forOperation: Operations.orgs_sol_list_hyphen_attestations.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/attestations/{}", + parameters: [ + input.path.org, + input.path.subject_digest + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "per_page", + value: input.query.per_page + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "before", + value: input.query.before + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "after", + value: input.query.after + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.orgs_sol_list_hyphen_attestations.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Operations.orgs_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } /// List users blocked by an organization /// /// List the users blocked by an organization. diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index 67d7ea777a3..d01c23874f7 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -83,6 +83,17 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `DELETE /orgs/{org}`. /// - Remark: Generated from `#/paths//orgs/{org}/delete(orgs/delete)`. func orgs_sol_delete(_ input: Operations.orgs_sol_delete.Input) async throws -> Operations.orgs_sol_delete.Output + /// List attestations + /// + /// List a collection of artifact attestations with a given subject digest that are associated with repositories owned by an organization. + /// + /// The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required. + /// + /// **Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// + /// - Remark: HTTP `GET /orgs/{org}/attestations/{subject_digest}`. + /// - Remark: Generated from `#/paths//orgs/{org}/attestations/{subject_digest}/get(orgs/list-attestations)`. + func orgs_sol_list_hyphen_attestations(_ input: Operations.orgs_sol_list_hyphen_attestations.Input) async throws -> Operations.orgs_sol_list_hyphen_attestations.Output /// List users blocked by an organization /// /// List the users blocked by an organization. @@ -916,6 +927,27 @@ extension APIProtocol { headers: headers )) } + /// List attestations + /// + /// List a collection of artifact attestations with a given subject digest that are associated with repositories owned by an organization. + /// + /// The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required. + /// + /// **Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// + /// - Remark: HTTP `GET /orgs/{org}/attestations/{subject_digest}`. + /// - Remark: Generated from `#/paths//orgs/{org}/attestations/{subject_digest}/get(orgs/list-attestations)`. + public func orgs_sol_list_hyphen_attestations( + path: Operations.orgs_sol_list_hyphen_attestations.Input.Path, + query: Operations.orgs_sol_list_hyphen_attestations.Input.Query = .init(), + headers: Operations.orgs_sol_list_hyphen_attestations.Input.Headers = .init() + ) async throws -> Operations.orgs_sol_list_hyphen_attestations.Output { + try await orgs_sol_list_hyphen_attestations(Operations.orgs_sol_list_hyphen_attestations.Input( + path: path, + query: query, + headers: headers + )) + } /// List users blocked by an organization /// /// List the users blocked by an organization. @@ -4227,746 +4259,249 @@ public enum Components { case html_url } } - /// - Remark: Generated from `#/components/schemas/security-and-analysis`. - public struct security_hyphen_and_hyphen_analysis: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security`. - public struct advanced_securityPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { - case enabled = "enabled" - case disabled = "disabled" - } - /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security/status`. - public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload.statusPayload? - /// Creates a new `advanced_securityPayload`. - /// - /// - Parameters: - /// - status: - public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload.statusPayload? = nil) { - self.status = status - } - public enum CodingKeys: String, CodingKey { - case status - } - } - /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security`. - public var advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? - /// Enable or disable Dependabot security updates for the repository. + /// Groups of organization members that gives permissions on specified repositories. + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. + public struct nullable_hyphen_team_hyphen_simple: Codable, Hashable, Sendable { + /// Unique identifier of the team /// - /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates`. - public struct dependabot_security_updatesPayload: Codable, Hashable, Sendable { - /// The enablement status of Dependabot security updates for the repository. - /// - /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { - case enabled = "enabled" - case disabled = "disabled" - } - /// The enablement status of Dependabot security updates for the repository. - /// - /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates/status`. - public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload.statusPayload? - /// Creates a new `dependabot_security_updatesPayload`. - /// - /// - Parameters: - /// - status: The enablement status of Dependabot security updates for the repository. - public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload.statusPayload? = nil) { - self.status = status - } - public enum CodingKeys: String, CodingKey { - case status - } - } - /// Enable or disable Dependabot security updates for the repository. + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/node_id`. + public var node_id: Swift.String + /// URL for the team /// - /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates`. - public var dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? - /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning`. - public struct secret_scanningPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { - case enabled = "enabled" - case disabled = "disabled" - } - /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning/status`. - public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload.statusPayload? - /// Creates a new `secret_scanningPayload`. - /// - /// - Parameters: - /// - status: - public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload.statusPayload? = nil) { - self.status = status - } - public enum CodingKeys: String, CodingKey { - case status - } - } - /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning`. - public var secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? - /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. - public struct secret_scanning_push_protectionPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { - case enabled = "enabled" - case disabled = "disabled" - } - /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection/status`. - public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload.statusPayload? - /// Creates a new `secret_scanning_push_protectionPayload`. - /// - /// - Parameters: - /// - status: - public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload.statusPayload? = nil) { - self.status = status - } - public enum CodingKeys: String, CodingKey { - case status - } - } - /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. - public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? - /// Creates a new `security_hyphen_and_hyphen_analysis`. + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/members_url`. + public var members_url: Swift.String + /// Name of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/name`. + public var name: Swift.String + /// Description of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/description`. + public var description: Swift.String? + /// Permission that the team will have for its repositories + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/permission`. + public var permission: Swift.String + /// The level of privacy this team should have + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/privacy`. + public var privacy: Swift.String? + /// The notification setting the team has set + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/slug`. + public var slug: Swift.String + /// Distinguished Name (DN) that team maps to within LDAP environment + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/ldap_dn`. + public var ldap_dn: Swift.String? + /// Creates a new `nullable_hyphen_team_hyphen_simple`. /// /// - Parameters: - /// - advanced_security: - /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. - /// - secret_scanning: - /// - secret_scanning_push_protection: + /// - id: Unique identifier of the team + /// - node_id: + /// - url: URL for the team + /// - members_url: + /// - name: Name of the team + /// - description: Description of the team + /// - permission: Permission that the team will have for its repositories + /// - privacy: The level of privacy this team should have + /// - notification_setting: The notification setting the team has set + /// - html_url: + /// - repositories_url: + /// - slug: + /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment public init( - advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, - dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, - secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, - secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil + id: Swift.Int, + node_id: Swift.String, + url: Swift.String, + members_url: Swift.String, + name: Swift.String, + description: Swift.String? = nil, + permission: Swift.String, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + html_url: Swift.String, + repositories_url: Swift.String, + slug: Swift.String, + ldap_dn: Swift.String? = nil ) { - self.advanced_security = advanced_security - self.dependabot_security_updates = dependabot_security_updates - self.secret_scanning = secret_scanning - self.secret_scanning_push_protection = secret_scanning_push_protection + self.id = id + self.node_id = node_id + self.url = url + self.members_url = members_url + self.name = name + self.description = description + self.permission = permission + self.privacy = privacy + self.notification_setting = notification_setting + self.html_url = html_url + self.repositories_url = repositories_url + self.slug = slug + self.ldap_dn = ldap_dn } public enum CodingKeys: String, CodingKey { - case advanced_security - case dependabot_security_updates - case secret_scanning - case secret_scanning_push_protection + case id + case node_id + case url + case members_url + case name + case description + case permission + case privacy + case notification_setting + case html_url + case repositories_url + case slug + case ldap_dn } } - /// Minimal Repository + /// Groups of organization members that gives permissions on specified repositories. /// - /// - Remark: Generated from `#/components/schemas/minimal-repository`. - public struct minimal_hyphen_repository: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/minimal-repository/id`. + /// - Remark: Generated from `#/components/schemas/team`. + public struct team: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team/id`. public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/minimal-repository/node_id`. + /// - Remark: Generated from `#/components/schemas/team/node_id`. public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/name`. + /// - Remark: Generated from `#/components/schemas/team/name`. public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/full_name`. - public var full_name: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/owner`. - public var owner: Components.Schemas.simple_hyphen_user - /// - Remark: Generated from `#/components/schemas/minimal-repository/private`. - public var _private: Swift.Bool - /// - Remark: Generated from `#/components/schemas/minimal-repository/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/description`. + /// - Remark: Generated from `#/components/schemas/team/slug`. + public var slug: Swift.String + /// - Remark: Generated from `#/components/schemas/team/description`. public var description: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/fork`. - public var fork: Swift.Bool - /// - Remark: Generated from `#/components/schemas/minimal-repository/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/archive_url`. - public var archive_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/assignees_url`. - public var assignees_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/blobs_url`. - public var blobs_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/branches_url`. - public var branches_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/collaborators_url`. - public var collaborators_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/comments_url`. - public var comments_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/commits_url`. - public var commits_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/compare_url`. - public var compare_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/contents_url`. - public var contents_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/contributors_url`. - public var contributors_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/deployments_url`. - public var deployments_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/downloads_url`. - public var downloads_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/events_url`. - public var events_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/forks_url`. - public var forks_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/git_commits_url`. - public var git_commits_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/git_refs_url`. - public var git_refs_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/git_tags_url`. - public var git_tags_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/git_url`. - public var git_url: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/issue_comment_url`. - public var issue_comment_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/issue_events_url`. - public var issue_events_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/issues_url`. - public var issues_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/keys_url`. - public var keys_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/labels_url`. - public var labels_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/languages_url`. - public var languages_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/merges_url`. - public var merges_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/milestones_url`. - public var milestones_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/notifications_url`. - public var notifications_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/pulls_url`. - public var pulls_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/releases_url`. - public var releases_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/ssh_url`. - public var ssh_url: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/stargazers_url`. - public var stargazers_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/statuses_url`. - public var statuses_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/subscribers_url`. - public var subscribers_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/subscription_url`. - public var subscription_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/tags_url`. - public var tags_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/teams_url`. - public var teams_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/trees_url`. - public var trees_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/clone_url`. - public var clone_url: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/mirror_url`. - public var mirror_url: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/hooks_url`. - public var hooks_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/svn_url`. - public var svn_url: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/homepage`. - public var homepage: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/language`. - public var language: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/forks_count`. - public var forks_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/minimal-repository/stargazers_count`. - public var stargazers_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/minimal-repository/watchers_count`. - public var watchers_count: Swift.Int? - /// The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. - /// - /// - Remark: Generated from `#/components/schemas/minimal-repository/size`. - public var size: Swift.Int? - /// - Remark: Generated from `#/components/schemas/minimal-repository/default_branch`. - public var default_branch: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/open_issues_count`. - public var open_issues_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/minimal-repository/is_template`. - public var is_template: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/topics`. - public var topics: [Swift.String]? - /// - Remark: Generated from `#/components/schemas/minimal-repository/has_issues`. - public var has_issues: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/has_projects`. - public var has_projects: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/has_wiki`. - public var has_wiki: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/has_pages`. - public var has_pages: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/has_downloads`. - public var has_downloads: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/has_discussions`. - public var has_discussions: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/archived`. - public var archived: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/disabled`. - public var disabled: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/visibility`. - public var visibility: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/pushed_at`. - public var pushed_at: Foundation.Date? - /// - Remark: Generated from `#/components/schemas/minimal-repository/created_at`. - public var created_at: Foundation.Date? - /// - Remark: Generated from `#/components/schemas/minimal-repository/updated_at`. - public var updated_at: Foundation.Date? - /// - Remark: Generated from `#/components/schemas/minimal-repository/permissions`. + /// - Remark: Generated from `#/components/schemas/team/privacy`. + public var privacy: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/permission`. + public var permission: Swift.String + /// - Remark: Generated from `#/components/schemas/team/permissions`. public struct permissionsPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/minimal-repository/permissions/admin`. - public var admin: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/permissions/maintain`. - public var maintain: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/permissions/push`. - public var push: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/permissions/triage`. - public var triage: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/permissions/pull`. - public var pull: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/team/permissions/pull`. + public var pull: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/triage`. + public var triage: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/push`. + public var push: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/maintain`. + public var maintain: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/admin`. + public var admin: Swift.Bool /// Creates a new `permissionsPayload`. /// /// - Parameters: - /// - admin: - /// - maintain: - /// - push: - /// - triage: /// - pull: + /// - triage: + /// - push: + /// - maintain: + /// - admin: public init( - admin: Swift.Bool? = nil, - maintain: Swift.Bool? = nil, - push: Swift.Bool? = nil, - triage: Swift.Bool? = nil, - pull: Swift.Bool? = nil + pull: Swift.Bool, + triage: Swift.Bool, + push: Swift.Bool, + maintain: Swift.Bool, + admin: Swift.Bool ) { - self.admin = admin - self.maintain = maintain - self.push = push - self.triage = triage self.pull = pull + self.triage = triage + self.push = push + self.maintain = maintain + self.admin = admin } public enum CodingKeys: String, CodingKey { - case admin - case maintain - case push - case triage case pull + case triage + case push + case maintain + case admin } } - /// - Remark: Generated from `#/components/schemas/minimal-repository/permissions`. - public var permissions: Components.Schemas.minimal_hyphen_repository.permissionsPayload? - /// - Remark: Generated from `#/components/schemas/minimal-repository/role_name`. - public var role_name: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/temp_clone_token`. - public var temp_clone_token: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/delete_branch_on_merge`. - public var delete_branch_on_merge: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/subscribers_count`. - public var subscribers_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/minimal-repository/network_count`. - public var network_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/minimal-repository/code_of_conduct`. - public var code_of_conduct: Components.Schemas.code_hyphen_of_hyphen_conduct? - /// - Remark: Generated from `#/components/schemas/minimal-repository/license`. - public struct licensePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/minimal-repository/license/key`. - public var key: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/license/name`. - public var name: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/license/spdx_id`. - public var spdx_id: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/license/url`. - public var url: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/license/node_id`. - public var node_id: Swift.String? - /// Creates a new `licensePayload`. - /// - /// - Parameters: - /// - key: - /// - name: - /// - spdx_id: - /// - url: - /// - node_id: - public init( - key: Swift.String? = nil, - name: Swift.String? = nil, - spdx_id: Swift.String? = nil, - url: Swift.String? = nil, - node_id: Swift.String? = nil - ) { - self.key = key - self.name = name - self.spdx_id = spdx_id - self.url = url - self.node_id = node_id - } - public enum CodingKeys: String, CodingKey { - case key - case name - case spdx_id - case url - case node_id - } - } - /// - Remark: Generated from `#/components/schemas/minimal-repository/license`. - public var license: Components.Schemas.minimal_hyphen_repository.licensePayload? - /// - Remark: Generated from `#/components/schemas/minimal-repository/forks`. - public var forks: Swift.Int? - /// - Remark: Generated from `#/components/schemas/minimal-repository/open_issues`. - public var open_issues: Swift.Int? - /// - Remark: Generated from `#/components/schemas/minimal-repository/watchers`. - public var watchers: Swift.Int? - /// - Remark: Generated from `#/components/schemas/minimal-repository/allow_forking`. - public var allow_forking: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/web_commit_signoff_required`. - public var web_commit_signoff_required: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/minimal-repository/security_and_analysis`. - public var security_and_analysis: Components.Schemas.security_hyphen_and_hyphen_analysis? - /// Creates a new `minimal_hyphen_repository`. - /// + /// - Remark: Generated from `#/components/schemas/team/permissions`. + public var permissions: Components.Schemas.team.permissionsPayload? + /// - Remark: Generated from `#/components/schemas/team/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/members_url`. + public var members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/parent`. + public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? + /// Creates a new `team`. + /// /// - Parameters: /// - id: /// - node_id: /// - name: - /// - full_name: - /// - owner: - /// - _private: - /// - html_url: + /// - slug: /// - description: - /// - fork: - /// - url: - /// - archive_url: - /// - assignees_url: - /// - blobs_url: - /// - branches_url: - /// - collaborators_url: - /// - comments_url: - /// - commits_url: - /// - compare_url: - /// - contents_url: - /// - contributors_url: - /// - deployments_url: - /// - downloads_url: - /// - events_url: - /// - forks_url: - /// - git_commits_url: - /// - git_refs_url: - /// - git_tags_url: - /// - git_url: - /// - issue_comment_url: - /// - issue_events_url: - /// - issues_url: - /// - keys_url: - /// - labels_url: - /// - languages_url: - /// - merges_url: - /// - milestones_url: - /// - notifications_url: - /// - pulls_url: - /// - releases_url: - /// - ssh_url: - /// - stargazers_url: - /// - statuses_url: - /// - subscribers_url: - /// - subscription_url: - /// - tags_url: - /// - teams_url: - /// - trees_url: - /// - clone_url: - /// - mirror_url: - /// - hooks_url: - /// - svn_url: - /// - homepage: - /// - language: - /// - forks_count: - /// - stargazers_count: - /// - watchers_count: - /// - size: The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. - /// - default_branch: - /// - open_issues_count: - /// - is_template: - /// - topics: - /// - has_issues: - /// - has_projects: - /// - has_wiki: - /// - has_pages: - /// - has_downloads: - /// - has_discussions: - /// - archived: - /// - disabled: - /// - visibility: - /// - pushed_at: - /// - created_at: - /// - updated_at: + /// - privacy: + /// - notification_setting: + /// - permission: /// - permissions: - /// - role_name: - /// - temp_clone_token: - /// - delete_branch_on_merge: - /// - subscribers_count: - /// - network_count: - /// - code_of_conduct: - /// - license: - /// - forks: - /// - open_issues: - /// - watchers: - /// - allow_forking: - /// - web_commit_signoff_required: - /// - security_and_analysis: + /// - url: + /// - html_url: + /// - members_url: + /// - repositories_url: + /// - parent: public init( id: Swift.Int, node_id: Swift.String, name: Swift.String, - full_name: Swift.String, - owner: Components.Schemas.simple_hyphen_user, - _private: Swift.Bool, - html_url: Swift.String, + slug: Swift.String, description: Swift.String? = nil, - fork: Swift.Bool, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + permission: Swift.String, + permissions: Components.Schemas.team.permissionsPayload? = nil, url: Swift.String, - archive_url: Swift.String, - assignees_url: Swift.String, - blobs_url: Swift.String, - branches_url: Swift.String, - collaborators_url: Swift.String, - comments_url: Swift.String, - commits_url: Swift.String, - compare_url: Swift.String, - contents_url: Swift.String, - contributors_url: Swift.String, - deployments_url: Swift.String, - downloads_url: Swift.String, - events_url: Swift.String, - forks_url: Swift.String, - git_commits_url: Swift.String, - git_refs_url: Swift.String, - git_tags_url: Swift.String, - git_url: Swift.String? = nil, - issue_comment_url: Swift.String, - issue_events_url: Swift.String, - issues_url: Swift.String, - keys_url: Swift.String, - labels_url: Swift.String, - languages_url: Swift.String, - merges_url: Swift.String, - milestones_url: Swift.String, - notifications_url: Swift.String, - pulls_url: Swift.String, - releases_url: Swift.String, - ssh_url: Swift.String? = nil, - stargazers_url: Swift.String, - statuses_url: Swift.String, - subscribers_url: Swift.String, - subscription_url: Swift.String, - tags_url: Swift.String, - teams_url: Swift.String, - trees_url: Swift.String, - clone_url: Swift.String? = nil, - mirror_url: Swift.String? = nil, - hooks_url: Swift.String, - svn_url: Swift.String? = nil, - homepage: Swift.String? = nil, - language: Swift.String? = nil, - forks_count: Swift.Int? = nil, - stargazers_count: Swift.Int? = nil, - watchers_count: Swift.Int? = nil, - size: Swift.Int? = nil, - default_branch: Swift.String? = nil, - open_issues_count: Swift.Int? = nil, - is_template: Swift.Bool? = nil, - topics: [Swift.String]? = nil, - has_issues: Swift.Bool? = nil, - has_projects: Swift.Bool? = nil, - has_wiki: Swift.Bool? = nil, - has_pages: Swift.Bool? = nil, - has_downloads: Swift.Bool? = nil, - has_discussions: Swift.Bool? = nil, - archived: Swift.Bool? = nil, - disabled: Swift.Bool? = nil, - visibility: Swift.String? = nil, - pushed_at: Foundation.Date? = nil, - created_at: Foundation.Date? = nil, - updated_at: Foundation.Date? = nil, - permissions: Components.Schemas.minimal_hyphen_repository.permissionsPayload? = nil, - role_name: Swift.String? = nil, - temp_clone_token: Swift.String? = nil, - delete_branch_on_merge: Swift.Bool? = nil, - subscribers_count: Swift.Int? = nil, - network_count: Swift.Int? = nil, - code_of_conduct: Components.Schemas.code_hyphen_of_hyphen_conduct? = nil, - license: Components.Schemas.minimal_hyphen_repository.licensePayload? = nil, - forks: Swift.Int? = nil, - open_issues: Swift.Int? = nil, - watchers: Swift.Int? = nil, - allow_forking: Swift.Bool? = nil, - web_commit_signoff_required: Swift.Bool? = nil, - security_and_analysis: Components.Schemas.security_hyphen_and_hyphen_analysis? = nil + html_url: Swift.String, + members_url: Swift.String, + repositories_url: Swift.String, + parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil ) { self.id = id self.node_id = node_id self.name = name - self.full_name = full_name - self.owner = owner - self._private = _private - self.html_url = html_url + self.slug = slug self.description = description - self.fork = fork + self.privacy = privacy + self.notification_setting = notification_setting + self.permission = permission + self.permissions = permissions self.url = url - self.archive_url = archive_url - self.assignees_url = assignees_url - self.blobs_url = blobs_url - self.branches_url = branches_url - self.collaborators_url = collaborators_url - self.comments_url = comments_url - self.commits_url = commits_url - self.compare_url = compare_url - self.contents_url = contents_url - self.contributors_url = contributors_url - self.deployments_url = deployments_url - self.downloads_url = downloads_url - self.events_url = events_url - self.forks_url = forks_url - self.git_commits_url = git_commits_url - self.git_refs_url = git_refs_url - self.git_tags_url = git_tags_url - self.git_url = git_url - self.issue_comment_url = issue_comment_url - self.issue_events_url = issue_events_url - self.issues_url = issues_url - self.keys_url = keys_url - self.labels_url = labels_url - self.languages_url = languages_url - self.merges_url = merges_url - self.milestones_url = milestones_url - self.notifications_url = notifications_url - self.pulls_url = pulls_url - self.releases_url = releases_url - self.ssh_url = ssh_url - self.stargazers_url = stargazers_url - self.statuses_url = statuses_url - self.subscribers_url = subscribers_url - self.subscription_url = subscription_url - self.tags_url = tags_url - self.teams_url = teams_url - self.trees_url = trees_url - self.clone_url = clone_url - self.mirror_url = mirror_url - self.hooks_url = hooks_url - self.svn_url = svn_url - self.homepage = homepage - self.language = language - self.forks_count = forks_count - self.stargazers_count = stargazers_count - self.watchers_count = watchers_count - self.size = size - self.default_branch = default_branch - self.open_issues_count = open_issues_count - self.is_template = is_template - self.topics = topics - self.has_issues = has_issues - self.has_projects = has_projects - self.has_wiki = has_wiki - self.has_pages = has_pages - self.has_downloads = has_downloads - self.has_discussions = has_discussions - self.archived = archived - self.disabled = disabled - self.visibility = visibility - self.pushed_at = pushed_at - self.created_at = created_at - self.updated_at = updated_at - self.permissions = permissions - self.role_name = role_name - self.temp_clone_token = temp_clone_token - self.delete_branch_on_merge = delete_branch_on_merge - self.subscribers_count = subscribers_count - self.network_count = network_count - self.code_of_conduct = code_of_conduct - self.license = license - self.forks = forks - self.open_issues = open_issues - self.watchers = watchers - self.allow_forking = allow_forking - self.web_commit_signoff_required = web_commit_signoff_required - self.security_and_analysis = security_and_analysis + self.html_url = html_url + self.members_url = members_url + self.repositories_url = repositories_url + self.parent = parent } public enum CodingKeys: String, CodingKey { case id case node_id case name - case full_name - case owner - case _private = "private" - case html_url + case slug case description - case fork - case url - case archive_url - case assignees_url - case blobs_url - case branches_url - case collaborators_url - case comments_url - case commits_url - case compare_url - case contents_url - case contributors_url - case deployments_url - case downloads_url - case events_url - case forks_url - case git_commits_url - case git_refs_url - case git_tags_url - case git_url - case issue_comment_url - case issue_events_url - case issues_url - case keys_url - case labels_url - case languages_url - case merges_url - case milestones_url - case notifications_url - case pulls_url - case releases_url - case ssh_url - case stargazers_url - case statuses_url - case subscribers_url - case subscription_url - case tags_url - case teams_url - case trees_url - case clone_url - case mirror_url - case hooks_url - case svn_url - case homepage - case language - case forks_count - case stargazers_count - case watchers_count - case size - case default_branch - case open_issues_count - case is_template - case topics - case has_issues - case has_projects - case has_wiki - case has_pages - case has_downloads - case has_discussions - case archived - case disabled - case visibility - case pushed_at - case created_at - case updated_at + case privacy + case notification_setting + case permission case permissions - case role_name - case temp_clone_token - case delete_branch_on_merge - case subscribers_count - case network_count - case code_of_conduct - case license - case forks - case open_issues - case watchers - case allow_forking - case web_commit_signoff_required - case security_and_analysis + case url + case html_url + case members_url + case repositories_url + case parent } } /// A GitHub organization. @@ -5054,678 +4589,1175 @@ public enum Components { case description } } - /// Organization Full - /// - /// - Remark: Generated from `#/components/schemas/organization-full`. - public struct organization_hyphen_full: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/organization-full/login`. - public var login: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization-full/node_id`. - public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/repos_url`. - public var repos_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/events_url`. - public var events_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/hooks_url`. - public var hooks_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/issues_url`. - public var issues_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/members_url`. - public var members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/public_members_url`. - public var public_members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/avatar_url`. - public var avatar_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/description`. - public var description: Swift.String? - /// - Remark: Generated from `#/components/schemas/organization-full/name`. - public var name: Swift.String? - /// - Remark: Generated from `#/components/schemas/organization-full/company`. - public var company: Swift.String? - /// - Remark: Generated from `#/components/schemas/organization-full/blog`. - public var blog: Swift.String? - /// - Remark: Generated from `#/components/schemas/organization-full/location`. - public var location: Swift.String? - /// - Remark: Generated from `#/components/schemas/organization-full/email`. - public var email: Swift.String? - /// - Remark: Generated from `#/components/schemas/organization-full/twitter_username`. - public var twitter_username: Swift.String? - /// - Remark: Generated from `#/components/schemas/organization-full/is_verified`. - public var is_verified: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/organization-full/has_organization_projects`. - public var has_organization_projects: Swift.Bool - /// - Remark: Generated from `#/components/schemas/organization-full/has_repository_projects`. - public var has_repository_projects: Swift.Bool - /// - Remark: Generated from `#/components/schemas/organization-full/public_repos`. - public var public_repos: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization-full/public_gists`. - public var public_gists: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization-full/followers`. - public var followers: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization-full/following`. - public var following: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization-full/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/type`. - public var _type: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/total_private_repos`. - public var total_private_repos: Swift.Int? - /// - Remark: Generated from `#/components/schemas/organization-full/owned_private_repos`. - public var owned_private_repos: Swift.Int? - /// - Remark: Generated from `#/components/schemas/organization-full/private_gists`. - public var private_gists: Swift.Int? - /// - Remark: Generated from `#/components/schemas/organization-full/disk_usage`. - public var disk_usage: Swift.Int? - /// - Remark: Generated from `#/components/schemas/organization-full/collaborators`. - public var collaborators: Swift.Int? - /// - Remark: Generated from `#/components/schemas/organization-full/billing_email`. - public var billing_email: Swift.String? - /// - Remark: Generated from `#/components/schemas/organization-full/plan`. - public struct planPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/organization-full/plan/name`. - public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/plan/space`. - public var space: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization-full/plan/private_repos`. - public var private_repos: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization-full/plan/filled_seats`. - public var filled_seats: Swift.Int? - /// - Remark: Generated from `#/components/schemas/organization-full/plan/seats`. - public var seats: Swift.Int? - /// Creates a new `planPayload`. + /// - Remark: Generated from `#/components/schemas/security-and-analysis`. + public struct security_hyphen_and_hyphen_analysis: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security`. + public struct advanced_securityPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload.statusPayload? + /// Creates a new `advanced_securityPayload`. /// /// - Parameters: - /// - name: - /// - space: - /// - private_repos: - /// - filled_seats: - /// - seats: - public init( - name: Swift.String, - space: Swift.Int, - private_repos: Swift.Int, - filled_seats: Swift.Int? = nil, - seats: Swift.Int? = nil - ) { - self.name = name - self.space = space - self.private_repos = private_repos - self.filled_seats = filled_seats - self.seats = seats + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload.statusPayload? = nil) { + self.status = status } public enum CodingKeys: String, CodingKey { - case name - case space - case private_repos - case filled_seats - case seats + case status } } - /// - Remark: Generated from `#/components/schemas/organization-full/plan`. - public var plan: Components.Schemas.organization_hyphen_full.planPayload? - /// - Remark: Generated from `#/components/schemas/organization-full/default_repository_permission`. - public var default_repository_permission: Swift.String? - /// - Remark: Generated from `#/components/schemas/organization-full/members_can_create_repositories`. - public var members_can_create_repositories: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/organization-full/two_factor_requirement_enabled`. - public var two_factor_requirement_enabled: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/organization-full/members_allowed_repository_creation_type`. - public var members_allowed_repository_creation_type: Swift.String? - /// - Remark: Generated from `#/components/schemas/organization-full/members_can_create_public_repositories`. - public var members_can_create_public_repositories: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/organization-full/members_can_create_private_repositories`. - public var members_can_create_private_repositories: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/organization-full/members_can_create_internal_repositories`. - public var members_can_create_internal_repositories: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/organization-full/members_can_create_pages`. - public var members_can_create_pages: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/organization-full/members_can_create_public_pages`. - public var members_can_create_public_pages: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/organization-full/members_can_create_private_pages`. - public var members_can_create_private_pages: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/organization-full/members_can_fork_private_repositories`. - public var members_can_fork_private_repositories: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/organization-full/web_commit_signoff_required`. - public var web_commit_signoff_required: Swift.Bool? - /// Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization. - /// - /// This field is only visible to organization owners or members of a team with the security manager role. - /// - /// - Remark: Generated from `#/components/schemas/organization-full/advanced_security_enabled_for_new_repositories`. - public var advanced_security_enabled_for_new_repositories: Swift.Bool? - /// Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred to - /// this organization. - /// - /// This field is only visible to organization owners or members of a team with the security manager role. - /// - /// - Remark: Generated from `#/components/schemas/organization-full/dependabot_alerts_enabled_for_new_repositories`. - public var dependabot_alerts_enabled_for_new_repositories: Swift.Bool? - /// Whether dependabot security updates are automatically enabled for new repositories and repositories transferred - /// to this organization. - /// - /// This field is only visible to organization owners or members of a team with the security manager role. - /// - /// - Remark: Generated from `#/components/schemas/organization-full/dependabot_security_updates_enabled_for_new_repositories`. - public var dependabot_security_updates_enabled_for_new_repositories: Swift.Bool? - /// Whether dependency graph is automatically enabled for new repositories and repositories transferred to this - /// organization. - /// - /// This field is only visible to organization owners or members of a team with the security manager role. - /// - /// - Remark: Generated from `#/components/schemas/organization-full/dependency_graph_enabled_for_new_repositories`. - public var dependency_graph_enabled_for_new_repositories: Swift.Bool? - /// Whether secret scanning is automatically enabled for new repositories and repositories transferred to this - /// organization. - /// - /// This field is only visible to organization owners or members of a team with the security manager role. - /// - /// - Remark: Generated from `#/components/schemas/organization-full/secret_scanning_enabled_for_new_repositories`. - public var secret_scanning_enabled_for_new_repositories: Swift.Bool? - /// Whether secret scanning push protection is automatically enabled for new repositories and repositories - /// transferred to this organization. - /// - /// This field is only visible to organization owners or members of a team with the security manager role. - /// - /// - Remark: Generated from `#/components/schemas/organization-full/secret_scanning_push_protection_enabled_for_new_repositories`. - public var secret_scanning_push_protection_enabled_for_new_repositories: Swift.Bool? - /// Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. + /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security`. + public var advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? + /// Enable or disable Dependabot security updates for the repository. /// - /// - Remark: Generated from `#/components/schemas/organization-full/secret_scanning_push_protection_custom_link_enabled`. - public var secret_scanning_push_protection_custom_link_enabled: Swift.Bool? - /// An optional URL string to display to contributors who are blocked from pushing a secret. + /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates`. + public struct dependabot_security_updatesPayload: Codable, Hashable, Sendable { + /// The enablement status of Dependabot security updates for the repository. + /// + /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// The enablement status of Dependabot security updates for the repository. + /// + /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload.statusPayload? + /// Creates a new `dependabot_security_updatesPayload`. + /// + /// - Parameters: + /// - status: The enablement status of Dependabot security updates for the repository. + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// Enable or disable Dependabot security updates for the repository. /// - /// - Remark: Generated from `#/components/schemas/organization-full/secret_scanning_push_protection_custom_link`. - public var secret_scanning_push_protection_custom_link: Swift.String? - /// - Remark: Generated from `#/components/schemas/organization-full/created_at`. - public var created_at: Foundation.Date - /// - Remark: Generated from `#/components/schemas/organization-full/updated_at`. - public var updated_at: Foundation.Date - /// - Remark: Generated from `#/components/schemas/organization-full/archived_at`. - public var archived_at: Foundation.Date? - /// Creates a new `organization_hyphen_full`. + /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates`. + public var dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning`. + public struct secret_scanningPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload.statusPayload? + /// Creates a new `secret_scanningPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning`. + public var secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. + public struct secret_scanning_push_protectionPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload.statusPayload? + /// Creates a new `secret_scanning_push_protectionPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. + public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: - /// - login: - /// - id: - /// - node_id: - /// - url: - /// - repos_url: - /// - events_url: - /// - hooks_url: - /// - issues_url: - /// - members_url: - /// - public_members_url: - /// - avatar_url: - /// - description: - /// - name: - /// - company: - /// - blog: - /// - location: - /// - email: - /// - twitter_username: - /// - is_verified: - /// - has_organization_projects: - /// - has_repository_projects: - /// - public_repos: - /// - public_gists: - /// - followers: - /// - following: - /// - html_url: - /// - _type: - /// - total_private_repos: - /// - owned_private_repos: - /// - private_gists: - /// - disk_usage: - /// - collaborators: - /// - billing_email: - /// - plan: - /// - default_repository_permission: - /// - members_can_create_repositories: - /// - two_factor_requirement_enabled: - /// - members_allowed_repository_creation_type: - /// - members_can_create_public_repositories: - /// - members_can_create_private_repositories: - /// - members_can_create_internal_repositories: - /// - members_can_create_pages: - /// - members_can_create_public_pages: - /// - members_can_create_private_pages: - /// - members_can_fork_private_repositories: - /// - web_commit_signoff_required: - /// - advanced_security_enabled_for_new_repositories: Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization. - /// - dependabot_alerts_enabled_for_new_repositories: Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred to - /// - dependabot_security_updates_enabled_for_new_repositories: Whether dependabot security updates are automatically enabled for new repositories and repositories transferred - /// - dependency_graph_enabled_for_new_repositories: Whether dependency graph is automatically enabled for new repositories and repositories transferred to this - /// - secret_scanning_enabled_for_new_repositories: Whether secret scanning is automatically enabled for new repositories and repositories transferred to this - /// - secret_scanning_push_protection_enabled_for_new_repositories: Whether secret scanning push protection is automatically enabled for new repositories and repositories - /// - secret_scanning_push_protection_custom_link_enabled: Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. - /// - secret_scanning_push_protection_custom_link: An optional URL string to display to contributors who are blocked from pushing a secret. - /// - created_at: - /// - updated_at: - /// - archived_at: + /// - advanced_security: + /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. + /// - secret_scanning: + /// - secret_scanning_push_protection: public init( - login: Swift.String, - id: Swift.Int, - node_id: Swift.String, - url: Swift.String, - repos_url: Swift.String, - events_url: Swift.String, - hooks_url: Swift.String, - issues_url: Swift.String, - members_url: Swift.String, - public_members_url: Swift.String, - avatar_url: Swift.String, - description: Swift.String? = nil, - name: Swift.String? = nil, - company: Swift.String? = nil, - blog: Swift.String? = nil, - location: Swift.String? = nil, - email: Swift.String? = nil, - twitter_username: Swift.String? = nil, - is_verified: Swift.Bool? = nil, - has_organization_projects: Swift.Bool, - has_repository_projects: Swift.Bool, - public_repos: Swift.Int, - public_gists: Swift.Int, - followers: Swift.Int, - following: Swift.Int, - html_url: Swift.String, - _type: Swift.String, - total_private_repos: Swift.Int? = nil, - owned_private_repos: Swift.Int? = nil, - private_gists: Swift.Int? = nil, - disk_usage: Swift.Int? = nil, - collaborators: Swift.Int? = nil, - billing_email: Swift.String? = nil, - plan: Components.Schemas.organization_hyphen_full.planPayload? = nil, - default_repository_permission: Swift.String? = nil, - members_can_create_repositories: Swift.Bool? = nil, - two_factor_requirement_enabled: Swift.Bool? = nil, - members_allowed_repository_creation_type: Swift.String? = nil, - members_can_create_public_repositories: Swift.Bool? = nil, - members_can_create_private_repositories: Swift.Bool? = nil, - members_can_create_internal_repositories: Swift.Bool? = nil, - members_can_create_pages: Swift.Bool? = nil, - members_can_create_public_pages: Swift.Bool? = nil, - members_can_create_private_pages: Swift.Bool? = nil, - members_can_fork_private_repositories: Swift.Bool? = nil, - web_commit_signoff_required: Swift.Bool? = nil, - advanced_security_enabled_for_new_repositories: Swift.Bool? = nil, - dependabot_alerts_enabled_for_new_repositories: Swift.Bool? = nil, - dependabot_security_updates_enabled_for_new_repositories: Swift.Bool? = nil, - dependency_graph_enabled_for_new_repositories: Swift.Bool? = nil, - secret_scanning_enabled_for_new_repositories: Swift.Bool? = nil, - secret_scanning_push_protection_enabled_for_new_repositories: Swift.Bool? = nil, - secret_scanning_push_protection_custom_link_enabled: Swift.Bool? = nil, - secret_scanning_push_protection_custom_link: Swift.String? = nil, - created_at: Foundation.Date, - updated_at: Foundation.Date, - archived_at: Foundation.Date? = nil + advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, + dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, + secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, + secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil ) { - self.login = login - self.id = id - self.node_id = node_id - self.url = url - self.repos_url = repos_url - self.events_url = events_url - self.hooks_url = hooks_url - self.issues_url = issues_url - self.members_url = members_url - self.public_members_url = public_members_url - self.avatar_url = avatar_url - self.description = description - self.name = name - self.company = company - self.blog = blog - self.location = location - self.email = email - self.twitter_username = twitter_username - self.is_verified = is_verified - self.has_organization_projects = has_organization_projects - self.has_repository_projects = has_repository_projects - self.public_repos = public_repos - self.public_gists = public_gists - self.followers = followers - self.following = following - self.html_url = html_url - self._type = _type - self.total_private_repos = total_private_repos - self.owned_private_repos = owned_private_repos - self.private_gists = private_gists - self.disk_usage = disk_usage - self.collaborators = collaborators - self.billing_email = billing_email - self.plan = plan - self.default_repository_permission = default_repository_permission - self.members_can_create_repositories = members_can_create_repositories - self.two_factor_requirement_enabled = two_factor_requirement_enabled - self.members_allowed_repository_creation_type = members_allowed_repository_creation_type - self.members_can_create_public_repositories = members_can_create_public_repositories - self.members_can_create_private_repositories = members_can_create_private_repositories - self.members_can_create_internal_repositories = members_can_create_internal_repositories - self.members_can_create_pages = members_can_create_pages - self.members_can_create_public_pages = members_can_create_public_pages - self.members_can_create_private_pages = members_can_create_private_pages - self.members_can_fork_private_repositories = members_can_fork_private_repositories - self.web_commit_signoff_required = web_commit_signoff_required - self.advanced_security_enabled_for_new_repositories = advanced_security_enabled_for_new_repositories - self.dependabot_alerts_enabled_for_new_repositories = dependabot_alerts_enabled_for_new_repositories - self.dependabot_security_updates_enabled_for_new_repositories = dependabot_security_updates_enabled_for_new_repositories - self.dependency_graph_enabled_for_new_repositories = dependency_graph_enabled_for_new_repositories - self.secret_scanning_enabled_for_new_repositories = secret_scanning_enabled_for_new_repositories - self.secret_scanning_push_protection_enabled_for_new_repositories = secret_scanning_push_protection_enabled_for_new_repositories - self.secret_scanning_push_protection_custom_link_enabled = secret_scanning_push_protection_custom_link_enabled - self.secret_scanning_push_protection_custom_link = secret_scanning_push_protection_custom_link - self.created_at = created_at - self.updated_at = updated_at - self.archived_at = archived_at + self.advanced_security = advanced_security + self.dependabot_security_updates = dependabot_security_updates + self.secret_scanning = secret_scanning + self.secret_scanning_push_protection = secret_scanning_push_protection } public enum CodingKeys: String, CodingKey { - case login - case id - case node_id - case url - case repos_url - case events_url - case hooks_url - case issues_url - case members_url - case public_members_url - case avatar_url - case description - case name - case company - case blog - case location - case email - case twitter_username - case is_verified - case has_organization_projects - case has_repository_projects - case public_repos - case public_gists - case followers - case following - case html_url - case _type = "type" - case total_private_repos - case owned_private_repos - case private_gists - case disk_usage - case collaborators - case billing_email - case plan - case default_repository_permission - case members_can_create_repositories - case two_factor_requirement_enabled - case members_allowed_repository_creation_type - case members_can_create_public_repositories - case members_can_create_private_repositories - case members_can_create_internal_repositories - case members_can_create_pages - case members_can_create_public_pages - case members_can_create_private_pages - case members_can_fork_private_repositories - case web_commit_signoff_required - case advanced_security_enabled_for_new_repositories - case dependabot_alerts_enabled_for_new_repositories - case dependabot_security_updates_enabled_for_new_repositories - case dependency_graph_enabled_for_new_repositories - case secret_scanning_enabled_for_new_repositories - case secret_scanning_push_protection_enabled_for_new_repositories - case secret_scanning_push_protection_custom_link_enabled - case secret_scanning_push_protection_custom_link - case created_at - case updated_at - case archived_at + case advanced_security + case dependabot_security_updates + case secret_scanning + case secret_scanning_push_protection } } - /// Groups of organization members that gives permissions on specified repositories. + /// Minimal Repository /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. - public struct nullable_hyphen_team_hyphen_simple: Codable, Hashable, Sendable { - /// Unique identifier of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/id`. + /// - Remark: Generated from `#/components/schemas/minimal-repository`. + public struct minimal_hyphen_repository: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/minimal-repository/id`. public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/node_id`. + /// - Remark: Generated from `#/components/schemas/minimal-repository/node_id`. public var node_id: Swift.String - /// URL for the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/members_url`. - public var members_url: Swift.String - /// Name of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/name`. + /// - Remark: Generated from `#/components/schemas/minimal-repository/name`. public var name: Swift.String - /// Description of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/description`. - public var description: Swift.String? - /// Permission that the team will have for its repositories - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/permission`. - public var permission: Swift.String - /// The level of privacy this team should have - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/privacy`. - public var privacy: Swift.String? - /// The notification setting the team has set - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/html_url`. + /// - Remark: Generated from `#/components/schemas/minimal-repository/full_name`. + public var full_name: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/owner`. + public var owner: Components.Schemas.simple_hyphen_user + /// - Remark: Generated from `#/components/schemas/minimal-repository/private`. + public var _private: Swift.Bool + /// - Remark: Generated from `#/components/schemas/minimal-repository/html_url`. public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/slug`. - public var slug: Swift.String - /// Distinguished Name (DN) that team maps to within LDAP environment + /// - Remark: Generated from `#/components/schemas/minimal-repository/description`. + public var description: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/fork`. + public var fork: Swift.Bool + /// - Remark: Generated from `#/components/schemas/minimal-repository/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/archive_url`. + public var archive_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/assignees_url`. + public var assignees_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/blobs_url`. + public var blobs_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/branches_url`. + public var branches_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/collaborators_url`. + public var collaborators_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/comments_url`. + public var comments_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/commits_url`. + public var commits_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/compare_url`. + public var compare_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/contents_url`. + public var contents_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/contributors_url`. + public var contributors_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/deployments_url`. + public var deployments_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/downloads_url`. + public var downloads_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/events_url`. + public var events_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/forks_url`. + public var forks_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/git_commits_url`. + public var git_commits_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/git_refs_url`. + public var git_refs_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/git_tags_url`. + public var git_tags_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/git_url`. + public var git_url: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/issue_comment_url`. + public var issue_comment_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/issue_events_url`. + public var issue_events_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/issues_url`. + public var issues_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/keys_url`. + public var keys_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/labels_url`. + public var labels_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/languages_url`. + public var languages_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/merges_url`. + public var merges_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/milestones_url`. + public var milestones_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/notifications_url`. + public var notifications_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/pulls_url`. + public var pulls_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/releases_url`. + public var releases_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/ssh_url`. + public var ssh_url: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/stargazers_url`. + public var stargazers_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/statuses_url`. + public var statuses_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/subscribers_url`. + public var subscribers_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/subscription_url`. + public var subscription_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/tags_url`. + public var tags_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/teams_url`. + public var teams_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/trees_url`. + public var trees_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/clone_url`. + public var clone_url: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/mirror_url`. + public var mirror_url: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/hooks_url`. + public var hooks_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/svn_url`. + public var svn_url: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/homepage`. + public var homepage: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/language`. + public var language: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/forks_count`. + public var forks_count: Swift.Int? + /// - Remark: Generated from `#/components/schemas/minimal-repository/stargazers_count`. + public var stargazers_count: Swift.Int? + /// - Remark: Generated from `#/components/schemas/minimal-repository/watchers_count`. + public var watchers_count: Swift.Int? + /// The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/ldap_dn`. - public var ldap_dn: Swift.String? - /// Creates a new `nullable_hyphen_team_hyphen_simple`. + /// - Remark: Generated from `#/components/schemas/minimal-repository/size`. + public var size: Swift.Int? + /// - Remark: Generated from `#/components/schemas/minimal-repository/default_branch`. + public var default_branch: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/open_issues_count`. + public var open_issues_count: Swift.Int? + /// - Remark: Generated from `#/components/schemas/minimal-repository/is_template`. + public var is_template: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/topics`. + public var topics: [Swift.String]? + /// - Remark: Generated from `#/components/schemas/minimal-repository/has_issues`. + public var has_issues: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/has_projects`. + public var has_projects: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/has_wiki`. + public var has_wiki: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/has_pages`. + public var has_pages: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/has_downloads`. + public var has_downloads: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/has_discussions`. + public var has_discussions: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/archived`. + public var archived: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/disabled`. + public var disabled: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/visibility`. + public var visibility: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/pushed_at`. + public var pushed_at: Foundation.Date? + /// - Remark: Generated from `#/components/schemas/minimal-repository/created_at`. + public var created_at: Foundation.Date? + /// - Remark: Generated from `#/components/schemas/minimal-repository/updated_at`. + public var updated_at: Foundation.Date? + /// - Remark: Generated from `#/components/schemas/minimal-repository/permissions`. + public struct permissionsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/minimal-repository/permissions/admin`. + public var admin: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/permissions/maintain`. + public var maintain: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/permissions/push`. + public var push: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/permissions/triage`. + public var triage: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/permissions/pull`. + public var pull: Swift.Bool? + /// Creates a new `permissionsPayload`. + /// + /// - Parameters: + /// - admin: + /// - maintain: + /// - push: + /// - triage: + /// - pull: + public init( + admin: Swift.Bool? = nil, + maintain: Swift.Bool? = nil, + push: Swift.Bool? = nil, + triage: Swift.Bool? = nil, + pull: Swift.Bool? = nil + ) { + self.admin = admin + self.maintain = maintain + self.push = push + self.triage = triage + self.pull = pull + } + public enum CodingKeys: String, CodingKey { + case admin + case maintain + case push + case triage + case pull + } + } + /// - Remark: Generated from `#/components/schemas/minimal-repository/permissions`. + public var permissions: Components.Schemas.minimal_hyphen_repository.permissionsPayload? + /// - Remark: Generated from `#/components/schemas/minimal-repository/role_name`. + public var role_name: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/temp_clone_token`. + public var temp_clone_token: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/delete_branch_on_merge`. + public var delete_branch_on_merge: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/subscribers_count`. + public var subscribers_count: Swift.Int? + /// - Remark: Generated from `#/components/schemas/minimal-repository/network_count`. + public var network_count: Swift.Int? + /// - Remark: Generated from `#/components/schemas/minimal-repository/code_of_conduct`. + public var code_of_conduct: Components.Schemas.code_hyphen_of_hyphen_conduct? + /// - Remark: Generated from `#/components/schemas/minimal-repository/license`. + public struct licensePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/minimal-repository/license/key`. + public var key: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/license/name`. + public var name: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/license/spdx_id`. + public var spdx_id: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/license/url`. + public var url: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/license/node_id`. + public var node_id: Swift.String? + /// Creates a new `licensePayload`. + /// + /// - Parameters: + /// - key: + /// - name: + /// - spdx_id: + /// - url: + /// - node_id: + public init( + key: Swift.String? = nil, + name: Swift.String? = nil, + spdx_id: Swift.String? = nil, + url: Swift.String? = nil, + node_id: Swift.String? = nil + ) { + self.key = key + self.name = name + self.spdx_id = spdx_id + self.url = url + self.node_id = node_id + } + public enum CodingKeys: String, CodingKey { + case key + case name + case spdx_id + case url + case node_id + } + } + /// - Remark: Generated from `#/components/schemas/minimal-repository/license`. + public var license: Components.Schemas.minimal_hyphen_repository.licensePayload? + /// - Remark: Generated from `#/components/schemas/minimal-repository/forks`. + public var forks: Swift.Int? + /// - Remark: Generated from `#/components/schemas/minimal-repository/open_issues`. + public var open_issues: Swift.Int? + /// - Remark: Generated from `#/components/schemas/minimal-repository/watchers`. + public var watchers: Swift.Int? + /// - Remark: Generated from `#/components/schemas/minimal-repository/allow_forking`. + public var allow_forking: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/web_commit_signoff_required`. + public var web_commit_signoff_required: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/minimal-repository/security_and_analysis`. + public var security_and_analysis: Components.Schemas.security_hyphen_and_hyphen_analysis? + /// Creates a new `minimal_hyphen_repository`. /// /// - Parameters: - /// - id: Unique identifier of the team + /// - id: /// - node_id: - /// - url: URL for the team - /// - members_url: - /// - name: Name of the team - /// - description: Description of the team - /// - permission: Permission that the team will have for its repositories - /// - privacy: The level of privacy this team should have - /// - notification_setting: The notification setting the team has set + /// - name: + /// - full_name: + /// - owner: + /// - _private: /// - html_url: - /// - repositories_url: - /// - slug: - /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment + /// - description: + /// - fork: + /// - url: + /// - archive_url: + /// - assignees_url: + /// - blobs_url: + /// - branches_url: + /// - collaborators_url: + /// - comments_url: + /// - commits_url: + /// - compare_url: + /// - contents_url: + /// - contributors_url: + /// - deployments_url: + /// - downloads_url: + /// - events_url: + /// - forks_url: + /// - git_commits_url: + /// - git_refs_url: + /// - git_tags_url: + /// - git_url: + /// - issue_comment_url: + /// - issue_events_url: + /// - issues_url: + /// - keys_url: + /// - labels_url: + /// - languages_url: + /// - merges_url: + /// - milestones_url: + /// - notifications_url: + /// - pulls_url: + /// - releases_url: + /// - ssh_url: + /// - stargazers_url: + /// - statuses_url: + /// - subscribers_url: + /// - subscription_url: + /// - tags_url: + /// - teams_url: + /// - trees_url: + /// - clone_url: + /// - mirror_url: + /// - hooks_url: + /// - svn_url: + /// - homepage: + /// - language: + /// - forks_count: + /// - stargazers_count: + /// - watchers_count: + /// - size: The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. + /// - default_branch: + /// - open_issues_count: + /// - is_template: + /// - topics: + /// - has_issues: + /// - has_projects: + /// - has_wiki: + /// - has_pages: + /// - has_downloads: + /// - has_discussions: + /// - archived: + /// - disabled: + /// - visibility: + /// - pushed_at: + /// - created_at: + /// - updated_at: + /// - permissions: + /// - role_name: + /// - temp_clone_token: + /// - delete_branch_on_merge: + /// - subscribers_count: + /// - network_count: + /// - code_of_conduct: + /// - license: + /// - forks: + /// - open_issues: + /// - watchers: + /// - allow_forking: + /// - web_commit_signoff_required: + /// - security_and_analysis: public init( id: Swift.Int, node_id: Swift.String, - url: Swift.String, - members_url: Swift.String, name: Swift.String, - description: Swift.String? = nil, - permission: Swift.String, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, + full_name: Swift.String, + owner: Components.Schemas.simple_hyphen_user, + _private: Swift.Bool, html_url: Swift.String, - repositories_url: Swift.String, - slug: Swift.String, - ldap_dn: Swift.String? = nil + description: Swift.String? = nil, + fork: Swift.Bool, + url: Swift.String, + archive_url: Swift.String, + assignees_url: Swift.String, + blobs_url: Swift.String, + branches_url: Swift.String, + collaborators_url: Swift.String, + comments_url: Swift.String, + commits_url: Swift.String, + compare_url: Swift.String, + contents_url: Swift.String, + contributors_url: Swift.String, + deployments_url: Swift.String, + downloads_url: Swift.String, + events_url: Swift.String, + forks_url: Swift.String, + git_commits_url: Swift.String, + git_refs_url: Swift.String, + git_tags_url: Swift.String, + git_url: Swift.String? = nil, + issue_comment_url: Swift.String, + issue_events_url: Swift.String, + issues_url: Swift.String, + keys_url: Swift.String, + labels_url: Swift.String, + languages_url: Swift.String, + merges_url: Swift.String, + milestones_url: Swift.String, + notifications_url: Swift.String, + pulls_url: Swift.String, + releases_url: Swift.String, + ssh_url: Swift.String? = nil, + stargazers_url: Swift.String, + statuses_url: Swift.String, + subscribers_url: Swift.String, + subscription_url: Swift.String, + tags_url: Swift.String, + teams_url: Swift.String, + trees_url: Swift.String, + clone_url: Swift.String? = nil, + mirror_url: Swift.String? = nil, + hooks_url: Swift.String, + svn_url: Swift.String? = nil, + homepage: Swift.String? = nil, + language: Swift.String? = nil, + forks_count: Swift.Int? = nil, + stargazers_count: Swift.Int? = nil, + watchers_count: Swift.Int? = nil, + size: Swift.Int? = nil, + default_branch: Swift.String? = nil, + open_issues_count: Swift.Int? = nil, + is_template: Swift.Bool? = nil, + topics: [Swift.String]? = nil, + has_issues: Swift.Bool? = nil, + has_projects: Swift.Bool? = nil, + has_wiki: Swift.Bool? = nil, + has_pages: Swift.Bool? = nil, + has_downloads: Swift.Bool? = nil, + has_discussions: Swift.Bool? = nil, + archived: Swift.Bool? = nil, + disabled: Swift.Bool? = nil, + visibility: Swift.String? = nil, + pushed_at: Foundation.Date? = nil, + created_at: Foundation.Date? = nil, + updated_at: Foundation.Date? = nil, + permissions: Components.Schemas.minimal_hyphen_repository.permissionsPayload? = nil, + role_name: Swift.String? = nil, + temp_clone_token: Swift.String? = nil, + delete_branch_on_merge: Swift.Bool? = nil, + subscribers_count: Swift.Int? = nil, + network_count: Swift.Int? = nil, + code_of_conduct: Components.Schemas.code_hyphen_of_hyphen_conduct? = nil, + license: Components.Schemas.minimal_hyphen_repository.licensePayload? = nil, + forks: Swift.Int? = nil, + open_issues: Swift.Int? = nil, + watchers: Swift.Int? = nil, + allow_forking: Swift.Bool? = nil, + web_commit_signoff_required: Swift.Bool? = nil, + security_and_analysis: Components.Schemas.security_hyphen_and_hyphen_analysis? = nil ) { self.id = id self.node_id = node_id - self.url = url - self.members_url = members_url self.name = name - self.description = description - self.permission = permission - self.privacy = privacy - self.notification_setting = notification_setting + self.full_name = full_name + self.owner = owner + self._private = _private self.html_url = html_url - self.repositories_url = repositories_url - self.slug = slug - self.ldap_dn = ldap_dn + self.description = description + self.fork = fork + self.url = url + self.archive_url = archive_url + self.assignees_url = assignees_url + self.blobs_url = blobs_url + self.branches_url = branches_url + self.collaborators_url = collaborators_url + self.comments_url = comments_url + self.commits_url = commits_url + self.compare_url = compare_url + self.contents_url = contents_url + self.contributors_url = contributors_url + self.deployments_url = deployments_url + self.downloads_url = downloads_url + self.events_url = events_url + self.forks_url = forks_url + self.git_commits_url = git_commits_url + self.git_refs_url = git_refs_url + self.git_tags_url = git_tags_url + self.git_url = git_url + self.issue_comment_url = issue_comment_url + self.issue_events_url = issue_events_url + self.issues_url = issues_url + self.keys_url = keys_url + self.labels_url = labels_url + self.languages_url = languages_url + self.merges_url = merges_url + self.milestones_url = milestones_url + self.notifications_url = notifications_url + self.pulls_url = pulls_url + self.releases_url = releases_url + self.ssh_url = ssh_url + self.stargazers_url = stargazers_url + self.statuses_url = statuses_url + self.subscribers_url = subscribers_url + self.subscription_url = subscription_url + self.tags_url = tags_url + self.teams_url = teams_url + self.trees_url = trees_url + self.clone_url = clone_url + self.mirror_url = mirror_url + self.hooks_url = hooks_url + self.svn_url = svn_url + self.homepage = homepage + self.language = language + self.forks_count = forks_count + self.stargazers_count = stargazers_count + self.watchers_count = watchers_count + self.size = size + self.default_branch = default_branch + self.open_issues_count = open_issues_count + self.is_template = is_template + self.topics = topics + self.has_issues = has_issues + self.has_projects = has_projects + self.has_wiki = has_wiki + self.has_pages = has_pages + self.has_downloads = has_downloads + self.has_discussions = has_discussions + self.archived = archived + self.disabled = disabled + self.visibility = visibility + self.pushed_at = pushed_at + self.created_at = created_at + self.updated_at = updated_at + self.permissions = permissions + self.role_name = role_name + self.temp_clone_token = temp_clone_token + self.delete_branch_on_merge = delete_branch_on_merge + self.subscribers_count = subscribers_count + self.network_count = network_count + self.code_of_conduct = code_of_conduct + self.license = license + self.forks = forks + self.open_issues = open_issues + self.watchers = watchers + self.allow_forking = allow_forking + self.web_commit_signoff_required = web_commit_signoff_required + self.security_and_analysis = security_and_analysis } public enum CodingKeys: String, CodingKey { case id case node_id - case url - case members_url case name - case description - case permission - case privacy - case notification_setting + case full_name + case owner + case _private = "private" case html_url - case repositories_url - case slug - case ldap_dn + case description + case fork + case url + case archive_url + case assignees_url + case blobs_url + case branches_url + case collaborators_url + case comments_url + case commits_url + case compare_url + case contents_url + case contributors_url + case deployments_url + case downloads_url + case events_url + case forks_url + case git_commits_url + case git_refs_url + case git_tags_url + case git_url + case issue_comment_url + case issue_events_url + case issues_url + case keys_url + case labels_url + case languages_url + case merges_url + case milestones_url + case notifications_url + case pulls_url + case releases_url + case ssh_url + case stargazers_url + case statuses_url + case subscribers_url + case subscription_url + case tags_url + case teams_url + case trees_url + case clone_url + case mirror_url + case hooks_url + case svn_url + case homepage + case language + case forks_count + case stargazers_count + case watchers_count + case size + case default_branch + case open_issues_count + case is_template + case topics + case has_issues + case has_projects + case has_wiki + case has_pages + case has_downloads + case has_discussions + case archived + case disabled + case visibility + case pushed_at + case created_at + case updated_at + case permissions + case role_name + case temp_clone_token + case delete_branch_on_merge + case subscribers_count + case network_count + case code_of_conduct + case license + case forks + case open_issues + case watchers + case allow_forking + case web_commit_signoff_required + case security_and_analysis } } - /// Groups of organization members that gives permissions on specified repositories. + /// Organization Full /// - /// - Remark: Generated from `#/components/schemas/team`. - public struct team: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/team/id`. + /// - Remark: Generated from `#/components/schemas/organization-full`. + public struct organization_hyphen_full: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/organization-full/login`. + public var login: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-full/id`. public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/team/node_id`. + /// - Remark: Generated from `#/components/schemas/organization-full/node_id`. public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/team/name`. - public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/team/slug`. - public var slug: Swift.String - /// - Remark: Generated from `#/components/schemas/team/description`. + /// - Remark: Generated from `#/components/schemas/organization-full/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-full/repos_url`. + public var repos_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-full/events_url`. + public var events_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-full/hooks_url`. + public var hooks_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-full/issues_url`. + public var issues_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-full/members_url`. + public var members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-full/public_members_url`. + public var public_members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-full/avatar_url`. + public var avatar_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-full/description`. public var description: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/privacy`. - public var privacy: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/permission`. - public var permission: Swift.String - /// - Remark: Generated from `#/components/schemas/team/permissions`. - public struct permissionsPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/team/permissions/pull`. - public var pull: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/triage`. - public var triage: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/push`. - public var push: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/maintain`. - public var maintain: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/admin`. - public var admin: Swift.Bool - /// Creates a new `permissionsPayload`. + /// - Remark: Generated from `#/components/schemas/organization-full/name`. + public var name: Swift.String? + /// - Remark: Generated from `#/components/schemas/organization-full/company`. + public var company: Swift.String? + /// - Remark: Generated from `#/components/schemas/organization-full/blog`. + public var blog: Swift.String? + /// - Remark: Generated from `#/components/schemas/organization-full/location`. + public var location: Swift.String? + /// - Remark: Generated from `#/components/schemas/organization-full/email`. + public var email: Swift.String? + /// - Remark: Generated from `#/components/schemas/organization-full/twitter_username`. + public var twitter_username: Swift.String? + /// - Remark: Generated from `#/components/schemas/organization-full/is_verified`. + public var is_verified: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/organization-full/has_organization_projects`. + public var has_organization_projects: Swift.Bool + /// - Remark: Generated from `#/components/schemas/organization-full/has_repository_projects`. + public var has_repository_projects: Swift.Bool + /// - Remark: Generated from `#/components/schemas/organization-full/public_repos`. + public var public_repos: Swift.Int + /// - Remark: Generated from `#/components/schemas/organization-full/public_gists`. + public var public_gists: Swift.Int + /// - Remark: Generated from `#/components/schemas/organization-full/followers`. + public var followers: Swift.Int + /// - Remark: Generated from `#/components/schemas/organization-full/following`. + public var following: Swift.Int + /// - Remark: Generated from `#/components/schemas/organization-full/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-full/type`. + public var _type: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-full/total_private_repos`. + public var total_private_repos: Swift.Int? + /// - Remark: Generated from `#/components/schemas/organization-full/owned_private_repos`. + public var owned_private_repos: Swift.Int? + /// - Remark: Generated from `#/components/schemas/organization-full/private_gists`. + public var private_gists: Swift.Int? + /// - Remark: Generated from `#/components/schemas/organization-full/disk_usage`. + public var disk_usage: Swift.Int? + /// - Remark: Generated from `#/components/schemas/organization-full/collaborators`. + public var collaborators: Swift.Int? + /// - Remark: Generated from `#/components/schemas/organization-full/billing_email`. + public var billing_email: Swift.String? + /// - Remark: Generated from `#/components/schemas/organization-full/plan`. + public struct planPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/organization-full/plan/name`. + public var name: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-full/plan/space`. + public var space: Swift.Int + /// - Remark: Generated from `#/components/schemas/organization-full/plan/private_repos`. + public var private_repos: Swift.Int + /// - Remark: Generated from `#/components/schemas/organization-full/plan/filled_seats`. + public var filled_seats: Swift.Int? + /// - Remark: Generated from `#/components/schemas/organization-full/plan/seats`. + public var seats: Swift.Int? + /// Creates a new `planPayload`. /// /// - Parameters: - /// - pull: - /// - triage: - /// - push: - /// - maintain: - /// - admin: + /// - name: + /// - space: + /// - private_repos: + /// - filled_seats: + /// - seats: public init( - pull: Swift.Bool, - triage: Swift.Bool, - push: Swift.Bool, - maintain: Swift.Bool, - admin: Swift.Bool + name: Swift.String, + space: Swift.Int, + private_repos: Swift.Int, + filled_seats: Swift.Int? = nil, + seats: Swift.Int? = nil ) { - self.pull = pull - self.triage = triage - self.push = push - self.maintain = maintain - self.admin = admin + self.name = name + self.space = space + self.private_repos = private_repos + self.filled_seats = filled_seats + self.seats = seats } public enum CodingKeys: String, CodingKey { - case pull - case triage - case push - case maintain - case admin + case name + case space + case private_repos + case filled_seats + case seats } } - /// - Remark: Generated from `#/components/schemas/team/permissions`. - public var permissions: Components.Schemas.team.permissionsPayload? - /// - Remark: Generated from `#/components/schemas/team/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/members_url`. - public var members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/parent`. - public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? - /// Creates a new `team`. + /// - Remark: Generated from `#/components/schemas/organization-full/plan`. + public var plan: Components.Schemas.organization_hyphen_full.planPayload? + /// - Remark: Generated from `#/components/schemas/organization-full/default_repository_permission`. + public var default_repository_permission: Swift.String? + /// - Remark: Generated from `#/components/schemas/organization-full/members_can_create_repositories`. + public var members_can_create_repositories: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/organization-full/two_factor_requirement_enabled`. + public var two_factor_requirement_enabled: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/organization-full/members_allowed_repository_creation_type`. + public var members_allowed_repository_creation_type: Swift.String? + /// - Remark: Generated from `#/components/schemas/organization-full/members_can_create_public_repositories`. + public var members_can_create_public_repositories: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/organization-full/members_can_create_private_repositories`. + public var members_can_create_private_repositories: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/organization-full/members_can_create_internal_repositories`. + public var members_can_create_internal_repositories: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/organization-full/members_can_create_pages`. + public var members_can_create_pages: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/organization-full/members_can_create_public_pages`. + public var members_can_create_public_pages: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/organization-full/members_can_create_private_pages`. + public var members_can_create_private_pages: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/organization-full/members_can_fork_private_repositories`. + public var members_can_fork_private_repositories: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/organization-full/web_commit_signoff_required`. + public var web_commit_signoff_required: Swift.Bool? + /// Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization. + /// + /// This field is only visible to organization owners or members of a team with the security manager role. + /// + /// - Remark: Generated from `#/components/schemas/organization-full/advanced_security_enabled_for_new_repositories`. + public var advanced_security_enabled_for_new_repositories: Swift.Bool? + /// Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred to + /// this organization. + /// + /// This field is only visible to organization owners or members of a team with the security manager role. + /// + /// - Remark: Generated from `#/components/schemas/organization-full/dependabot_alerts_enabled_for_new_repositories`. + public var dependabot_alerts_enabled_for_new_repositories: Swift.Bool? + /// Whether dependabot security updates are automatically enabled for new repositories and repositories transferred + /// to this organization. + /// + /// This field is only visible to organization owners or members of a team with the security manager role. + /// + /// - Remark: Generated from `#/components/schemas/organization-full/dependabot_security_updates_enabled_for_new_repositories`. + public var dependabot_security_updates_enabled_for_new_repositories: Swift.Bool? + /// Whether dependency graph is automatically enabled for new repositories and repositories transferred to this + /// organization. + /// + /// This field is only visible to organization owners or members of a team with the security manager role. + /// + /// - Remark: Generated from `#/components/schemas/organization-full/dependency_graph_enabled_for_new_repositories`. + public var dependency_graph_enabled_for_new_repositories: Swift.Bool? + /// Whether secret scanning is automatically enabled for new repositories and repositories transferred to this + /// organization. + /// + /// This field is only visible to organization owners or members of a team with the security manager role. + /// + /// - Remark: Generated from `#/components/schemas/organization-full/secret_scanning_enabled_for_new_repositories`. + public var secret_scanning_enabled_for_new_repositories: Swift.Bool? + /// Whether secret scanning push protection is automatically enabled for new repositories and repositories + /// transferred to this organization. + /// + /// This field is only visible to organization owners or members of a team with the security manager role. + /// + /// - Remark: Generated from `#/components/schemas/organization-full/secret_scanning_push_protection_enabled_for_new_repositories`. + public var secret_scanning_push_protection_enabled_for_new_repositories: Swift.Bool? + /// Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. + /// + /// - Remark: Generated from `#/components/schemas/organization-full/secret_scanning_push_protection_custom_link_enabled`. + public var secret_scanning_push_protection_custom_link_enabled: Swift.Bool? + /// An optional URL string to display to contributors who are blocked from pushing a secret. + /// + /// - Remark: Generated from `#/components/schemas/organization-full/secret_scanning_push_protection_custom_link`. + public var secret_scanning_push_protection_custom_link: Swift.String? + /// - Remark: Generated from `#/components/schemas/organization-full/created_at`. + public var created_at: Foundation.Date + /// - Remark: Generated from `#/components/schemas/organization-full/updated_at`. + public var updated_at: Foundation.Date + /// - Remark: Generated from `#/components/schemas/organization-full/archived_at`. + public var archived_at: Foundation.Date? + /// Creates a new `organization_hyphen_full`. /// /// - Parameters: + /// - login: /// - id: /// - node_id: - /// - name: - /// - slug: - /// - description: - /// - privacy: - /// - notification_setting: - /// - permission: - /// - permissions: /// - url: - /// - html_url: + /// - repos_url: + /// - events_url: + /// - hooks_url: + /// - issues_url: /// - members_url: - /// - repositories_url: - /// - parent: + /// - public_members_url: + /// - avatar_url: + /// - description: + /// - name: + /// - company: + /// - blog: + /// - location: + /// - email: + /// - twitter_username: + /// - is_verified: + /// - has_organization_projects: + /// - has_repository_projects: + /// - public_repos: + /// - public_gists: + /// - followers: + /// - following: + /// - html_url: + /// - _type: + /// - total_private_repos: + /// - owned_private_repos: + /// - private_gists: + /// - disk_usage: + /// - collaborators: + /// - billing_email: + /// - plan: + /// - default_repository_permission: + /// - members_can_create_repositories: + /// - two_factor_requirement_enabled: + /// - members_allowed_repository_creation_type: + /// - members_can_create_public_repositories: + /// - members_can_create_private_repositories: + /// - members_can_create_internal_repositories: + /// - members_can_create_pages: + /// - members_can_create_public_pages: + /// - members_can_create_private_pages: + /// - members_can_fork_private_repositories: + /// - web_commit_signoff_required: + /// - advanced_security_enabled_for_new_repositories: Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization. + /// - dependabot_alerts_enabled_for_new_repositories: Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred to + /// - dependabot_security_updates_enabled_for_new_repositories: Whether dependabot security updates are automatically enabled for new repositories and repositories transferred + /// - dependency_graph_enabled_for_new_repositories: Whether dependency graph is automatically enabled for new repositories and repositories transferred to this + /// - secret_scanning_enabled_for_new_repositories: Whether secret scanning is automatically enabled for new repositories and repositories transferred to this + /// - secret_scanning_push_protection_enabled_for_new_repositories: Whether secret scanning push protection is automatically enabled for new repositories and repositories + /// - secret_scanning_push_protection_custom_link_enabled: Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. + /// - secret_scanning_push_protection_custom_link: An optional URL string to display to contributors who are blocked from pushing a secret. + /// - created_at: + /// - updated_at: + /// - archived_at: public init( + login: Swift.String, id: Swift.Int, node_id: Swift.String, - name: Swift.String, - slug: Swift.String, - description: Swift.String? = nil, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, - permission: Swift.String, - permissions: Components.Schemas.team.permissionsPayload? = nil, url: Swift.String, - html_url: Swift.String, + repos_url: Swift.String, + events_url: Swift.String, + hooks_url: Swift.String, + issues_url: Swift.String, members_url: Swift.String, - repositories_url: Swift.String, - parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil + public_members_url: Swift.String, + avatar_url: Swift.String, + description: Swift.String? = nil, + name: Swift.String? = nil, + company: Swift.String? = nil, + blog: Swift.String? = nil, + location: Swift.String? = nil, + email: Swift.String? = nil, + twitter_username: Swift.String? = nil, + is_verified: Swift.Bool? = nil, + has_organization_projects: Swift.Bool, + has_repository_projects: Swift.Bool, + public_repos: Swift.Int, + public_gists: Swift.Int, + followers: Swift.Int, + following: Swift.Int, + html_url: Swift.String, + _type: Swift.String, + total_private_repos: Swift.Int? = nil, + owned_private_repos: Swift.Int? = nil, + private_gists: Swift.Int? = nil, + disk_usage: Swift.Int? = nil, + collaborators: Swift.Int? = nil, + billing_email: Swift.String? = nil, + plan: Components.Schemas.organization_hyphen_full.planPayload? = nil, + default_repository_permission: Swift.String? = nil, + members_can_create_repositories: Swift.Bool? = nil, + two_factor_requirement_enabled: Swift.Bool? = nil, + members_allowed_repository_creation_type: Swift.String? = nil, + members_can_create_public_repositories: Swift.Bool? = nil, + members_can_create_private_repositories: Swift.Bool? = nil, + members_can_create_internal_repositories: Swift.Bool? = nil, + members_can_create_pages: Swift.Bool? = nil, + members_can_create_public_pages: Swift.Bool? = nil, + members_can_create_private_pages: Swift.Bool? = nil, + members_can_fork_private_repositories: Swift.Bool? = nil, + web_commit_signoff_required: Swift.Bool? = nil, + advanced_security_enabled_for_new_repositories: Swift.Bool? = nil, + dependabot_alerts_enabled_for_new_repositories: Swift.Bool? = nil, + dependabot_security_updates_enabled_for_new_repositories: Swift.Bool? = nil, + dependency_graph_enabled_for_new_repositories: Swift.Bool? = nil, + secret_scanning_enabled_for_new_repositories: Swift.Bool? = nil, + secret_scanning_push_protection_enabled_for_new_repositories: Swift.Bool? = nil, + secret_scanning_push_protection_custom_link_enabled: Swift.Bool? = nil, + secret_scanning_push_protection_custom_link: Swift.String? = nil, + created_at: Foundation.Date, + updated_at: Foundation.Date, + archived_at: Foundation.Date? = nil ) { + self.login = login self.id = id self.node_id = node_id - self.name = name - self.slug = slug - self.description = description - self.privacy = privacy - self.notification_setting = notification_setting - self.permission = permission - self.permissions = permissions self.url = url + self.repos_url = repos_url + self.events_url = events_url + self.hooks_url = hooks_url + self.issues_url = issues_url + self.members_url = members_url + self.public_members_url = public_members_url + self.avatar_url = avatar_url + self.description = description + self.name = name + self.company = company + self.blog = blog + self.location = location + self.email = email + self.twitter_username = twitter_username + self.is_verified = is_verified + self.has_organization_projects = has_organization_projects + self.has_repository_projects = has_repository_projects + self.public_repos = public_repos + self.public_gists = public_gists + self.followers = followers + self.following = following self.html_url = html_url - self.members_url = members_url - self.repositories_url = repositories_url - self.parent = parent + self._type = _type + self.total_private_repos = total_private_repos + self.owned_private_repos = owned_private_repos + self.private_gists = private_gists + self.disk_usage = disk_usage + self.collaborators = collaborators + self.billing_email = billing_email + self.plan = plan + self.default_repository_permission = default_repository_permission + self.members_can_create_repositories = members_can_create_repositories + self.two_factor_requirement_enabled = two_factor_requirement_enabled + self.members_allowed_repository_creation_type = members_allowed_repository_creation_type + self.members_can_create_public_repositories = members_can_create_public_repositories + self.members_can_create_private_repositories = members_can_create_private_repositories + self.members_can_create_internal_repositories = members_can_create_internal_repositories + self.members_can_create_pages = members_can_create_pages + self.members_can_create_public_pages = members_can_create_public_pages + self.members_can_create_private_pages = members_can_create_private_pages + self.members_can_fork_private_repositories = members_can_fork_private_repositories + self.web_commit_signoff_required = web_commit_signoff_required + self.advanced_security_enabled_for_new_repositories = advanced_security_enabled_for_new_repositories + self.dependabot_alerts_enabled_for_new_repositories = dependabot_alerts_enabled_for_new_repositories + self.dependabot_security_updates_enabled_for_new_repositories = dependabot_security_updates_enabled_for_new_repositories + self.dependency_graph_enabled_for_new_repositories = dependency_graph_enabled_for_new_repositories + self.secret_scanning_enabled_for_new_repositories = secret_scanning_enabled_for_new_repositories + self.secret_scanning_push_protection_enabled_for_new_repositories = secret_scanning_push_protection_enabled_for_new_repositories + self.secret_scanning_push_protection_custom_link_enabled = secret_scanning_push_protection_custom_link_enabled + self.secret_scanning_push_protection_custom_link = secret_scanning_push_protection_custom_link + self.created_at = created_at + self.updated_at = updated_at + self.archived_at = archived_at } public enum CodingKeys: String, CodingKey { + case login case id case node_id - case name - case slug - case description - case privacy - case notification_setting - case permission - case permissions case url - case html_url + case repos_url + case events_url + case hooks_url + case issues_url case members_url - case repositories_url - case parent + case public_members_url + case avatar_url + case description + case name + case company + case blog + case location + case email + case twitter_username + case is_verified + case has_organization_projects + case has_repository_projects + case public_repos + case public_gists + case followers + case following + case html_url + case _type = "type" + case total_private_repos + case owned_private_repos + case private_gists + case disk_usage + case collaborators + case billing_email + case plan + case default_repository_permission + case members_can_create_repositories + case two_factor_requirement_enabled + case members_allowed_repository_creation_type + case members_can_create_public_repositories + case members_can_create_private_repositories + case members_can_create_internal_repositories + case members_can_create_pages + case members_can_create_public_pages + case members_can_create_private_pages + case members_can_fork_private_repositories + case web_commit_signoff_required + case advanced_security_enabled_for_new_repositories + case dependabot_alerts_enabled_for_new_repositories + case dependabot_security_updates_enabled_for_new_repositories + case dependency_graph_enabled_for_new_repositories + case secret_scanning_enabled_for_new_repositories + case secret_scanning_push_protection_enabled_for_new_repositories + case secret_scanning_push_protection_custom_link_enabled + case secret_scanning_push_protection_custom_link + case created_at + case updated_at + case archived_at } } /// Organization Invitation @@ -7083,6 +7115,14 @@ public enum Components { } /// Types generated from the `#/components/parameters` section of the OpenAPI document. public enum Parameters { + /// A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// + /// - Remark: Generated from `#/components/parameters/pagination-before`. + public typealias pagination_hyphen_before = Swift.String + /// A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// + /// - Remark: Generated from `#/components/parameters/pagination-after`. + public typealias pagination_hyphen_after = Swift.String /// The direction to sort the results by. /// /// - Remark: Generated from `#/components/parameters/direction`. @@ -8525,6 +8565,296 @@ public enum Operations { } } } + /// List attestations + /// + /// List a collection of artifact attestations with a given subject digest that are associated with repositories owned by an organization. + /// + /// The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required. + /// + /// **Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// + /// - Remark: HTTP `GET /orgs/{org}/attestations/{subject_digest}`. + /// - Remark: Generated from `#/paths//orgs/{org}/attestations/{subject_digest}/get(orgs/list-attestations)`. + public enum orgs_sol_list_hyphen_attestations { + public static let id: Swift.String = "orgs/list-attestations" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/path/org`. + public var org: Components.Parameters.org + /// The parameter should be set to the attestation's subject's SHA256 digest, in the form `sha256:HEX_DIGEST`. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/path/subject_digest`. + public var subject_digest: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - subject_digest: The parameter should be set to the attestation's subject's SHA256 digest, in the form `sha256:HEX_DIGEST`. + public init( + org: Components.Parameters.org, + subject_digest: Swift.String + ) { + self.org = org + self.subject_digest = subject_digest + } + } + public var path: Operations.orgs_sol_list_hyphen_attestations.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/query`. + public struct Query: Sendable, Hashable { + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/query/per_page`. + public var per_page: Components.Parameters.per_hyphen_page? + /// A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/query/before`. + public var before: Components.Parameters.pagination_hyphen_before? + /// A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/query/after`. + public var after: Components.Parameters.pagination_hyphen_after? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - per_page: The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// - before: A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// - after: A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + public init( + per_page: Components.Parameters.per_hyphen_page? = nil, + before: Components.Parameters.pagination_hyphen_before? = nil, + after: Components.Parameters.pagination_hyphen_after? = nil + ) { + self.per_page = per_page + self.before = before + self.after = after + } + } + public var query: Operations.orgs_sol_list_hyphen_attestations.Input.Query + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.orgs_sol_list_hyphen_attestations.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.orgs_sol_list_hyphen_attestations.Input.Path, + query: Operations.orgs_sol_list_hyphen_attestations.Input.Query = .init(), + headers: Operations.orgs_sol_list_hyphen_attestations.Input.Headers = .init() + ) { + self.path = path + self.query = query + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/responses/200/content/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload`. + public struct attestationsPayloadPayload: Codable, Hashable, Sendable { + /// The attestation's Sigstore Bundle. + /// Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle`. + public struct bundlePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle/mediaType`. + public var mediaType: Swift.String? + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle/verificationMaterial`. + public struct verificationMaterialPayload: Codable, Hashable, Sendable { + /// A container of undocumented properties. + public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer + /// Creates a new `verificationMaterialPayload`. + /// + /// - Parameters: + /// - additionalProperties: A container of undocumented properties. + public init(additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init()) { + self.additionalProperties = additionalProperties + } + public init(from decoder: any Decoder) throws { + additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: []) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeAdditionalProperties(additionalProperties) + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle/verificationMaterial`. + public var verificationMaterial: Operations.orgs_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload.bundlePayload.verificationMaterialPayload? + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle/dsseEnvelope`. + public struct dsseEnvelopePayload: Codable, Hashable, Sendable { + /// A container of undocumented properties. + public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer + /// Creates a new `dsseEnvelopePayload`. + /// + /// - Parameters: + /// - additionalProperties: A container of undocumented properties. + public init(additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init()) { + self.additionalProperties = additionalProperties + } + public init(from decoder: any Decoder) throws { + additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: []) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeAdditionalProperties(additionalProperties) + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle/dsseEnvelope`. + public var dsseEnvelope: Operations.orgs_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload.bundlePayload.dsseEnvelopePayload? + /// Creates a new `bundlePayload`. + /// + /// - Parameters: + /// - mediaType: + /// - verificationMaterial: + /// - dsseEnvelope: + public init( + mediaType: Swift.String? = nil, + verificationMaterial: Operations.orgs_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload.bundlePayload.verificationMaterialPayload? = nil, + dsseEnvelope: Operations.orgs_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload.bundlePayload.dsseEnvelopePayload? = nil + ) { + self.mediaType = mediaType + self.verificationMaterial = verificationMaterial + self.dsseEnvelope = dsseEnvelope + } + public enum CodingKeys: String, CodingKey { + case mediaType + case verificationMaterial + case dsseEnvelope + } + } + /// The attestation's Sigstore Bundle. + /// Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle`. + public var bundle: Operations.orgs_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload.bundlePayload? + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/repository_id`. + public var repository_id: Swift.Int? + /// Creates a new `attestationsPayloadPayload`. + /// + /// - Parameters: + /// - bundle: The attestation's Sigstore Bundle. + /// - repository_id: + public init( + bundle: Operations.orgs_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload.bundlePayload? = nil, + repository_id: Swift.Int? = nil + ) { + self.bundle = bundle + self.repository_id = repository_id + } + public enum CodingKeys: String, CodingKey { + case bundle + case repository_id + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/responses/200/content/json/attestations`. + public typealias attestationsPayload = [Operations.orgs_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload] + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/responses/200/content/json/attestations`. + public var attestations: Operations.orgs_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayload? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - attestations: + public init(attestations: Operations.orgs_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayload? = nil) { + self.attestations = attestations + } + public enum CodingKeys: String, CodingKey { + case attestations + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/responses/200/content/application\/json`. + case json(Operations.orgs_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Operations.orgs_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.orgs_sol_list_hyphen_attestations.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.orgs_sol_list_hyphen_attestations.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/attestations/{subject_digest}/get(orgs/list-attestations)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.orgs_sol_list_hyphen_attestations.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.orgs_sol_list_hyphen_attestations.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } /// List users blocked by an organization /// /// List the users blocked by an organization. From 29fdc74e04bb73bcc0077d3cce0e83fd62521cd9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 24 Jun 2024 21:35:41 +0000 Subject: [PATCH 011/152] Commit via running ake Sources/pulls --- Sources/pulls/Types.swift | 412 +++++++++++++++++++------------------- 1 file changed, 206 insertions(+), 206 deletions(-) diff --git a/Sources/pulls/Types.swift b/Sources/pulls/Types.swift index dd8454dbb2d..0da3033a1f3 100644 --- a/Sources/pulls/Types.swift +++ b/Sources/pulls/Types.swift @@ -2315,212 +2315,6 @@ public enum Components { case anonymous_access_enabled } } - /// A collection of related issues and pull requests. - /// - /// - Remark: Generated from `#/components/schemas/nullable-milestone`. - public struct nullable_hyphen_milestone: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/nullable-milestone/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-milestone/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-milestone/labels_url`. - public var labels_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-milestone/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/nullable-milestone/node_id`. - public var node_id: Swift.String - /// The number of the milestone. - /// - /// - Remark: Generated from `#/components/schemas/nullable-milestone/number`. - public var number: Swift.Int - /// The state of the milestone. - /// - /// - Remark: Generated from `#/components/schemas/nullable-milestone/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { - case open = "open" - case closed = "closed" - } - /// The state of the milestone. - /// - /// - Remark: Generated from `#/components/schemas/nullable-milestone/state`. - public var state: Components.Schemas.nullable_hyphen_milestone.statePayload - /// The title of the milestone. - /// - /// - Remark: Generated from `#/components/schemas/nullable-milestone/title`. - public var title: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-milestone/description`. - public var description: Swift.String? - /// - Remark: Generated from `#/components/schemas/nullable-milestone/creator`. - public var creator: Components.Schemas.nullable_hyphen_simple_hyphen_user? - /// - Remark: Generated from `#/components/schemas/nullable-milestone/open_issues`. - public var open_issues: Swift.Int - /// - Remark: Generated from `#/components/schemas/nullable-milestone/closed_issues`. - public var closed_issues: Swift.Int - /// - Remark: Generated from `#/components/schemas/nullable-milestone/created_at`. - public var created_at: Foundation.Date - /// - Remark: Generated from `#/components/schemas/nullable-milestone/updated_at`. - public var updated_at: Foundation.Date - /// - Remark: Generated from `#/components/schemas/nullable-milestone/closed_at`. - public var closed_at: Foundation.Date? - /// - Remark: Generated from `#/components/schemas/nullable-milestone/due_on`. - public var due_on: Foundation.Date? - /// Creates a new `nullable_hyphen_milestone`. - /// - /// - Parameters: - /// - url: - /// - html_url: - /// - labels_url: - /// - id: - /// - node_id: - /// - number: The number of the milestone. - /// - state: The state of the milestone. - /// - title: The title of the milestone. - /// - description: - /// - creator: - /// - open_issues: - /// - closed_issues: - /// - created_at: - /// - updated_at: - /// - closed_at: - /// - due_on: - public init( - url: Swift.String, - html_url: Swift.String, - labels_url: Swift.String, - id: Swift.Int, - node_id: Swift.String, - number: Swift.Int, - state: Components.Schemas.nullable_hyphen_milestone.statePayload, - title: Swift.String, - description: Swift.String? = nil, - creator: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, - open_issues: Swift.Int, - closed_issues: Swift.Int, - created_at: Foundation.Date, - updated_at: Foundation.Date, - closed_at: Foundation.Date? = nil, - due_on: Foundation.Date? = nil - ) { - self.url = url - self.html_url = html_url - self.labels_url = labels_url - self.id = id - self.node_id = node_id - self.number = number - self.state = state - self.title = title - self.description = description - self.creator = creator - self.open_issues = open_issues - self.closed_issues = closed_issues - self.created_at = created_at - self.updated_at = updated_at - self.closed_at = closed_at - self.due_on = due_on - } - public enum CodingKeys: String, CodingKey { - case url - case html_url - case labels_url - case id - case node_id - case number - case state - case title - case description - case creator - case open_issues - case closed_issues - case created_at - case updated_at - case closed_at - case due_on - } - } - /// How the author is associated with the repository. - /// - /// - Remark: Generated from `#/components/schemas/author-association`. - @frozen public enum author_hyphen_association: String, Codable, Hashable, Sendable { - case COLLABORATOR = "COLLABORATOR" - case CONTRIBUTOR = "CONTRIBUTOR" - case FIRST_TIMER = "FIRST_TIMER" - case FIRST_TIME_CONTRIBUTOR = "FIRST_TIME_CONTRIBUTOR" - case MANNEQUIN = "MANNEQUIN" - case MEMBER = "MEMBER" - case NONE = "NONE" - case OWNER = "OWNER" - } - /// - Remark: Generated from `#/components/schemas/reaction-rollup`. - public struct reaction_hyphen_rollup: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/reaction-rollup/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/reaction-rollup/total_count`. - public var total_count: Swift.Int - /// - Remark: Generated from `#/components/schemas/reaction-rollup/+1`. - public var _plus_1: Swift.Int - /// - Remark: Generated from `#/components/schemas/reaction-rollup/-1`. - public var _hyphen_1: Swift.Int - /// - Remark: Generated from `#/components/schemas/reaction-rollup/laugh`. - public var laugh: Swift.Int - /// - Remark: Generated from `#/components/schemas/reaction-rollup/confused`. - public var confused: Swift.Int - /// - Remark: Generated from `#/components/schemas/reaction-rollup/heart`. - public var heart: Swift.Int - /// - Remark: Generated from `#/components/schemas/reaction-rollup/hooray`. - public var hooray: Swift.Int - /// - Remark: Generated from `#/components/schemas/reaction-rollup/eyes`. - public var eyes: Swift.Int - /// - Remark: Generated from `#/components/schemas/reaction-rollup/rocket`. - public var rocket: Swift.Int - /// Creates a new `reaction_hyphen_rollup`. - /// - /// - Parameters: - /// - url: - /// - total_count: - /// - _plus_1: - /// - _hyphen_1: - /// - laugh: - /// - confused: - /// - heart: - /// - hooray: - /// - eyes: - /// - rocket: - public init( - url: Swift.String, - total_count: Swift.Int, - _plus_1: Swift.Int, - _hyphen_1: Swift.Int, - laugh: Swift.Int, - confused: Swift.Int, - heart: Swift.Int, - hooray: Swift.Int, - eyes: Swift.Int, - rocket: Swift.Int - ) { - self.url = url - self.total_count = total_count - self._plus_1 = _plus_1 - self._hyphen_1 = _hyphen_1 - self.laugh = laugh - self.confused = confused - self.heart = heart - self.hooray = hooray - self.eyes = eyes - self.rocket = rocket - } - public enum CodingKeys: String, CodingKey { - case url - case total_count - case _plus_1 = "+1" - case _hyphen_1 = "-1" - case laugh - case confused - case heart - case hooray - case eyes - case rocket - } - } /// Groups of organization members that gives permissions on specified repositories. /// /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. @@ -2766,6 +2560,212 @@ public enum Components { case parent } } + /// A collection of related issues and pull requests. + /// + /// - Remark: Generated from `#/components/schemas/nullable-milestone`. + public struct nullable_hyphen_milestone: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/nullable-milestone/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-milestone/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-milestone/labels_url`. + public var labels_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-milestone/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/nullable-milestone/node_id`. + public var node_id: Swift.String + /// The number of the milestone. + /// + /// - Remark: Generated from `#/components/schemas/nullable-milestone/number`. + public var number: Swift.Int + /// The state of the milestone. + /// + /// - Remark: Generated from `#/components/schemas/nullable-milestone/state`. + @frozen public enum statePayload: String, Codable, Hashable, Sendable { + case open = "open" + case closed = "closed" + } + /// The state of the milestone. + /// + /// - Remark: Generated from `#/components/schemas/nullable-milestone/state`. + public var state: Components.Schemas.nullable_hyphen_milestone.statePayload + /// The title of the milestone. + /// + /// - Remark: Generated from `#/components/schemas/nullable-milestone/title`. + public var title: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-milestone/description`. + public var description: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-milestone/creator`. + public var creator: Components.Schemas.nullable_hyphen_simple_hyphen_user? + /// - Remark: Generated from `#/components/schemas/nullable-milestone/open_issues`. + public var open_issues: Swift.Int + /// - Remark: Generated from `#/components/schemas/nullable-milestone/closed_issues`. + public var closed_issues: Swift.Int + /// - Remark: Generated from `#/components/schemas/nullable-milestone/created_at`. + public var created_at: Foundation.Date + /// - Remark: Generated from `#/components/schemas/nullable-milestone/updated_at`. + public var updated_at: Foundation.Date + /// - Remark: Generated from `#/components/schemas/nullable-milestone/closed_at`. + public var closed_at: Foundation.Date? + /// - Remark: Generated from `#/components/schemas/nullable-milestone/due_on`. + public var due_on: Foundation.Date? + /// Creates a new `nullable_hyphen_milestone`. + /// + /// - Parameters: + /// - url: + /// - html_url: + /// - labels_url: + /// - id: + /// - node_id: + /// - number: The number of the milestone. + /// - state: The state of the milestone. + /// - title: The title of the milestone. + /// - description: + /// - creator: + /// - open_issues: + /// - closed_issues: + /// - created_at: + /// - updated_at: + /// - closed_at: + /// - due_on: + public init( + url: Swift.String, + html_url: Swift.String, + labels_url: Swift.String, + id: Swift.Int, + node_id: Swift.String, + number: Swift.Int, + state: Components.Schemas.nullable_hyphen_milestone.statePayload, + title: Swift.String, + description: Swift.String? = nil, + creator: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, + open_issues: Swift.Int, + closed_issues: Swift.Int, + created_at: Foundation.Date, + updated_at: Foundation.Date, + closed_at: Foundation.Date? = nil, + due_on: Foundation.Date? = nil + ) { + self.url = url + self.html_url = html_url + self.labels_url = labels_url + self.id = id + self.node_id = node_id + self.number = number + self.state = state + self.title = title + self.description = description + self.creator = creator + self.open_issues = open_issues + self.closed_issues = closed_issues + self.created_at = created_at + self.updated_at = updated_at + self.closed_at = closed_at + self.due_on = due_on + } + public enum CodingKeys: String, CodingKey { + case url + case html_url + case labels_url + case id + case node_id + case number + case state + case title + case description + case creator + case open_issues + case closed_issues + case created_at + case updated_at + case closed_at + case due_on + } + } + /// How the author is associated with the repository. + /// + /// - Remark: Generated from `#/components/schemas/author-association`. + @frozen public enum author_hyphen_association: String, Codable, Hashable, Sendable { + case COLLABORATOR = "COLLABORATOR" + case CONTRIBUTOR = "CONTRIBUTOR" + case FIRST_TIMER = "FIRST_TIMER" + case FIRST_TIME_CONTRIBUTOR = "FIRST_TIME_CONTRIBUTOR" + case MANNEQUIN = "MANNEQUIN" + case MEMBER = "MEMBER" + case NONE = "NONE" + case OWNER = "OWNER" + } + /// - Remark: Generated from `#/components/schemas/reaction-rollup`. + public struct reaction_hyphen_rollup: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/reaction-rollup/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/reaction-rollup/total_count`. + public var total_count: Swift.Int + /// - Remark: Generated from `#/components/schemas/reaction-rollup/+1`. + public var _plus_1: Swift.Int + /// - Remark: Generated from `#/components/schemas/reaction-rollup/-1`. + public var _hyphen_1: Swift.Int + /// - Remark: Generated from `#/components/schemas/reaction-rollup/laugh`. + public var laugh: Swift.Int + /// - Remark: Generated from `#/components/schemas/reaction-rollup/confused`. + public var confused: Swift.Int + /// - Remark: Generated from `#/components/schemas/reaction-rollup/heart`. + public var heart: Swift.Int + /// - Remark: Generated from `#/components/schemas/reaction-rollup/hooray`. + public var hooray: Swift.Int + /// - Remark: Generated from `#/components/schemas/reaction-rollup/eyes`. + public var eyes: Swift.Int + /// - Remark: Generated from `#/components/schemas/reaction-rollup/rocket`. + public var rocket: Swift.Int + /// Creates a new `reaction_hyphen_rollup`. + /// + /// - Parameters: + /// - url: + /// - total_count: + /// - _plus_1: + /// - _hyphen_1: + /// - laugh: + /// - confused: + /// - heart: + /// - hooray: + /// - eyes: + /// - rocket: + public init( + url: Swift.String, + total_count: Swift.Int, + _plus_1: Swift.Int, + _hyphen_1: Swift.Int, + laugh: Swift.Int, + confused: Swift.Int, + heart: Swift.Int, + hooray: Swift.Int, + eyes: Swift.Int, + rocket: Swift.Int + ) { + self.url = url + self.total_count = total_count + self._plus_1 = _plus_1 + self._hyphen_1 = _hyphen_1 + self.laugh = laugh + self.confused = confused + self.heart = heart + self.hooray = hooray + self.eyes = eyes + self.rocket = rocket + } + public enum CodingKeys: String, CodingKey { + case url + case total_count + case _plus_1 = "+1" + case _hyphen_1 = "-1" + case laugh + case confused + case heart + case hooray + case eyes + case rocket + } + } /// Groups of organization members that gives permissions on specified repositories. /// /// - Remark: Generated from `#/components/schemas/team-simple`. From ebd6402c12a7fb1e8b3c01ab682eb2bed57116a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 24 Jun 2024 21:36:45 +0000 Subject: [PATCH 012/152] Commit via running ake Sources/repos --- Sources/repos/Client.swift | 213 +++ Sources/repos/Types.swift | 2802 ++++++++++++++++++++++-------------- 2 files changed, 1946 insertions(+), 1069 deletions(-) diff --git a/Sources/repos/Client.swift b/Sources/repos/Client.swift index 74be912e3db..bb0b59efa4e 100644 --- a/Sources/repos/Client.swift +++ b/Sources/repos/Client.swift @@ -1659,6 +1659,219 @@ public struct Client: APIProtocol { } ) } + /// Create an attestation + /// + /// Store an artifact attestation and associate it with a repository. + /// + /// The authenticated user must have write permission to the repository and, if using a fine-grained access token the `attestations:write` permission is required. + /// + /// Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For amore information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// + /// - Remark: HTTP `POST /repos/{owner}/{repo}/attestations`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/post(repos/create-attestation)`. + public func repos_sol_create_hyphen_attestation(_ input: Operations.repos_sol_create_hyphen_attestation.Input) async throws -> Operations.repos_sol_create_hyphen_attestation.Output { + try await client.send( + input: input, + forOperation: Operations.repos_sol_create_hyphen_attestation.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/repos/{}/{}/attestations", + parameters: [ + input.path.owner, + input.path.repo + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .post + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 201: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.repos_sol_create_hyphen_attestation.Output.Created.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Operations.repos_sol_create_hyphen_attestation.Output.Created.Body.jsonPayload.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .created(.init(body: body)) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.forbidden.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) + case 422: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.validation_failed.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.validation_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unprocessableContent(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// List attestations + /// + /// List a collection of artifact attestations with a given subject digest that are associated with a repository. + /// + /// The authenticated user making the request must have read access to the repository. In addition, when using a fine-grained access token the `attestations:read` permission is required. + /// + /// **Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/attestations/{subject_digest}`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/{subject_digest}/get(repos/list-attestations)`. + public func repos_sol_list_hyphen_attestations(_ input: Operations.repos_sol_list_hyphen_attestations.Input) async throws -> Operations.repos_sol_list_hyphen_attestations.Output { + try await client.send( + input: input, + forOperation: Operations.repos_sol_list_hyphen_attestations.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/repos/{}/{}/attestations/{}", + parameters: [ + input.path.owner, + input.path.repo, + input.path.subject_digest + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "per_page", + value: input.query.per_page + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "before", + value: input.query.before + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "after", + value: input.query.after + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.repos_sol_list_hyphen_attestations.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Operations.repos_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } /// Get all autolinks of a repository /// /// Gets all autolinks that are configured for a repository. diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index 79064437729..7a346ea909a 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -118,6 +118,28 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `GET /repos/{owner}/{repo}/activity`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/activity/get(repos/list-activities)`. func repos_sol_list_hyphen_activities(_ input: Operations.repos_sol_list_hyphen_activities.Input) async throws -> Operations.repos_sol_list_hyphen_activities.Output + /// Create an attestation + /// + /// Store an artifact attestation and associate it with a repository. + /// + /// The authenticated user must have write permission to the repository and, if using a fine-grained access token the `attestations:write` permission is required. + /// + /// Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For amore information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// + /// - Remark: HTTP `POST /repos/{owner}/{repo}/attestations`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/post(repos/create-attestation)`. + func repos_sol_create_hyphen_attestation(_ input: Operations.repos_sol_create_hyphen_attestation.Input) async throws -> Operations.repos_sol_create_hyphen_attestation.Output + /// List attestations + /// + /// List a collection of artifact attestations with a given subject digest that are associated with a repository. + /// + /// The authenticated user making the request must have read access to the repository. In addition, when using a fine-grained access token the `attestations:read` permission is required. + /// + /// **Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/attestations/{subject_digest}`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/{subject_digest}/get(repos/list-attestations)`. + func repos_sol_list_hyphen_attestations(_ input: Operations.repos_sol_list_hyphen_attestations.Input) async throws -> Operations.repos_sol_list_hyphen_attestations.Output /// Get all autolinks of a repository /// /// Gets all autolinks that are configured for a repository. @@ -2261,6 +2283,48 @@ extension APIProtocol { headers: headers )) } + /// Create an attestation + /// + /// Store an artifact attestation and associate it with a repository. + /// + /// The authenticated user must have write permission to the repository and, if using a fine-grained access token the `attestations:write` permission is required. + /// + /// Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For amore information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// + /// - Remark: HTTP `POST /repos/{owner}/{repo}/attestations`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/post(repos/create-attestation)`. + public func repos_sol_create_hyphen_attestation( + path: Operations.repos_sol_create_hyphen_attestation.Input.Path, + headers: Operations.repos_sol_create_hyphen_attestation.Input.Headers = .init(), + body: Operations.repos_sol_create_hyphen_attestation.Input.Body + ) async throws -> Operations.repos_sol_create_hyphen_attestation.Output { + try await repos_sol_create_hyphen_attestation(Operations.repos_sol_create_hyphen_attestation.Input( + path: path, + headers: headers, + body: body + )) + } + /// List attestations + /// + /// List a collection of artifact attestations with a given subject digest that are associated with a repository. + /// + /// The authenticated user making the request must have read access to the repository. In addition, when using a fine-grained access token the `attestations:read` permission is required. + /// + /// **Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/attestations/{subject_digest}`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/{subject_digest}/get(repos/list-attestations)`. + public func repos_sol_list_hyphen_attestations( + path: Operations.repos_sol_list_hyphen_attestations.Input.Path, + query: Operations.repos_sol_list_hyphen_attestations.Input.Query = .init(), + headers: Operations.repos_sol_list_hyphen_attestations.Input.Headers = .init() + ) async throws -> Operations.repos_sol_list_hyphen_attestations.Output { + try await repos_sol_list_hyphen_attestations(Operations.repos_sol_list_hyphen_attestations.Input( + path: path, + query: query, + headers: headers + )) + } /// Get all autolinks of a repository /// /// Gets all autolinks that are configured for a repository. @@ -7762,589 +7826,834 @@ public enum Components { case html_url } } - /// A collection of related issues and pull requests. + /// Groups of organization members that gives permissions on specified repositories. /// - /// - Remark: Generated from `#/components/schemas/nullable-milestone`. - public struct nullable_hyphen_milestone: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/nullable-milestone/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-milestone/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-milestone/labels_url`. - public var labels_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-milestone/id`. + /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. + public struct nullable_hyphen_team_hyphen_simple: Codable, Hashable, Sendable { + /// Unique identifier of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/id`. public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/nullable-milestone/node_id`. + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/node_id`. public var node_id: Swift.String - /// The number of the milestone. - /// - /// - Remark: Generated from `#/components/schemas/nullable-milestone/number`. - public var number: Swift.Int - /// The state of the milestone. + /// URL for the team /// - /// - Remark: Generated from `#/components/schemas/nullable-milestone/state`. - @frozen public enum statePayload: String, Codable, Hashable, Sendable { - case open = "open" - case closed = "closed" - } - /// The state of the milestone. + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/members_url`. + public var members_url: Swift.String + /// Name of the team /// - /// - Remark: Generated from `#/components/schemas/nullable-milestone/state`. - public var state: Components.Schemas.nullable_hyphen_milestone.statePayload - /// The title of the milestone. + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/name`. + public var name: Swift.String + /// Description of the team /// - /// - Remark: Generated from `#/components/schemas/nullable-milestone/title`. - public var title: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-milestone/description`. + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/description`. public var description: Swift.String? - /// - Remark: Generated from `#/components/schemas/nullable-milestone/creator`. - public var creator: Components.Schemas.nullable_hyphen_simple_hyphen_user? - /// - Remark: Generated from `#/components/schemas/nullable-milestone/open_issues`. - public var open_issues: Swift.Int - /// - Remark: Generated from `#/components/schemas/nullable-milestone/closed_issues`. - public var closed_issues: Swift.Int - /// - Remark: Generated from `#/components/schemas/nullable-milestone/created_at`. - public var created_at: Foundation.Date - /// - Remark: Generated from `#/components/schemas/nullable-milestone/updated_at`. - public var updated_at: Foundation.Date - /// - Remark: Generated from `#/components/schemas/nullable-milestone/closed_at`. - public var closed_at: Foundation.Date? - /// - Remark: Generated from `#/components/schemas/nullable-milestone/due_on`. - public var due_on: Foundation.Date? - /// Creates a new `nullable_hyphen_milestone`. + /// Permission that the team will have for its repositories + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/permission`. + public var permission: Swift.String + /// The level of privacy this team should have + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/privacy`. + public var privacy: Swift.String? + /// The notification setting the team has set + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/slug`. + public var slug: Swift.String + /// Distinguished Name (DN) that team maps to within LDAP environment + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/ldap_dn`. + public var ldap_dn: Swift.String? + /// Creates a new `nullable_hyphen_team_hyphen_simple`. /// /// - Parameters: - /// - url: - /// - html_url: - /// - labels_url: - /// - id: + /// - id: Unique identifier of the team /// - node_id: - /// - number: The number of the milestone. - /// - state: The state of the milestone. - /// - title: The title of the milestone. - /// - description: - /// - creator: - /// - open_issues: - /// - closed_issues: - /// - created_at: - /// - updated_at: - /// - closed_at: - /// - due_on: + /// - url: URL for the team + /// - members_url: + /// - name: Name of the team + /// - description: Description of the team + /// - permission: Permission that the team will have for its repositories + /// - privacy: The level of privacy this team should have + /// - notification_setting: The notification setting the team has set + /// - html_url: + /// - repositories_url: + /// - slug: + /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment public init( - url: Swift.String, - html_url: Swift.String, - labels_url: Swift.String, id: Swift.Int, node_id: Swift.String, - number: Swift.Int, - state: Components.Schemas.nullable_hyphen_milestone.statePayload, - title: Swift.String, + url: Swift.String, + members_url: Swift.String, + name: Swift.String, description: Swift.String? = nil, - creator: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, - open_issues: Swift.Int, - closed_issues: Swift.Int, - created_at: Foundation.Date, - updated_at: Foundation.Date, - closed_at: Foundation.Date? = nil, - due_on: Foundation.Date? = nil + permission: Swift.String, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + html_url: Swift.String, + repositories_url: Swift.String, + slug: Swift.String, + ldap_dn: Swift.String? = nil ) { - self.url = url - self.html_url = html_url - self.labels_url = labels_url self.id = id self.node_id = node_id - self.number = number - self.state = state - self.title = title + self.url = url + self.members_url = members_url + self.name = name self.description = description - self.creator = creator - self.open_issues = open_issues - self.closed_issues = closed_issues - self.created_at = created_at - self.updated_at = updated_at - self.closed_at = closed_at - self.due_on = due_on + self.permission = permission + self.privacy = privacy + self.notification_setting = notification_setting + self.html_url = html_url + self.repositories_url = repositories_url + self.slug = slug + self.ldap_dn = ldap_dn } public enum CodingKeys: String, CodingKey { - case url - case html_url - case labels_url case id case node_id - case number - case state - case title + case url + case members_url + case name case description - case creator - case open_issues - case closed_issues - case created_at - case updated_at - case closed_at - case due_on + case permission + case privacy + case notification_setting + case html_url + case repositories_url + case slug + case ldap_dn } } - /// GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + /// Groups of organization members that gives permissions on specified repositories. /// - /// - Remark: Generated from `#/components/schemas/nullable-integration`. - public struct nullable_hyphen_integration: Codable, Hashable, Sendable { - /// Unique identifier of the GitHub app - /// - /// - Remark: Generated from `#/components/schemas/nullable-integration/id`. + /// - Remark: Generated from `#/components/schemas/team`. + public struct team: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team/id`. public var id: Swift.Int - /// The slug name of the GitHub app - /// - /// - Remark: Generated from `#/components/schemas/nullable-integration/slug`. - public var slug: Swift.String? - /// - Remark: Generated from `#/components/schemas/nullable-integration/node_id`. + /// - Remark: Generated from `#/components/schemas/team/node_id`. public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-integration/owner`. - public var owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? - /// The name of the GitHub app - /// - /// - Remark: Generated from `#/components/schemas/nullable-integration/name`. + /// - Remark: Generated from `#/components/schemas/team/name`. public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-integration/description`. + /// - Remark: Generated from `#/components/schemas/team/slug`. + public var slug: Swift.String + /// - Remark: Generated from `#/components/schemas/team/description`. public var description: Swift.String? - /// - Remark: Generated from `#/components/schemas/nullable-integration/external_url`. - public var external_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-integration/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-integration/created_at`. - public var created_at: Foundation.Date - /// - Remark: Generated from `#/components/schemas/nullable-integration/updated_at`. - public var updated_at: Foundation.Date - /// The set of permissions for the GitHub app - /// - /// - Remark: Generated from `#/components/schemas/nullable-integration/permissions`. + /// - Remark: Generated from `#/components/schemas/team/privacy`. + public var privacy: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/permission`. + public var permission: Swift.String + /// - Remark: Generated from `#/components/schemas/team/permissions`. public struct permissionsPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/nullable-integration/permissions/issues`. - public var issues: Swift.String? - /// - Remark: Generated from `#/components/schemas/nullable-integration/permissions/checks`. - public var checks: Swift.String? - /// - Remark: Generated from `#/components/schemas/nullable-integration/permissions/metadata`. - public var metadata: Swift.String? - /// - Remark: Generated from `#/components/schemas/nullable-integration/permissions/contents`. - public var contents: Swift.String? - /// - Remark: Generated from `#/components/schemas/nullable-integration/permissions/deployments`. - public var deployments: Swift.String? - /// A container of undocumented properties. - public var additionalProperties: [String: Swift.String] + /// - Remark: Generated from `#/components/schemas/team/permissions/pull`. + public var pull: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/triage`. + public var triage: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/push`. + public var push: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/maintain`. + public var maintain: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/admin`. + public var admin: Swift.Bool /// Creates a new `permissionsPayload`. /// /// - Parameters: - /// - issues: - /// - checks: - /// - metadata: - /// - contents: - /// - deployments: - /// - additionalProperties: A container of undocumented properties. + /// - pull: + /// - triage: + /// - push: + /// - maintain: + /// - admin: public init( - issues: Swift.String? = nil, - checks: Swift.String? = nil, - metadata: Swift.String? = nil, - contents: Swift.String? = nil, - deployments: Swift.String? = nil, - additionalProperties: [String: Swift.String] = .init() + pull: Swift.Bool, + triage: Swift.Bool, + push: Swift.Bool, + maintain: Swift.Bool, + admin: Swift.Bool ) { - self.issues = issues - self.checks = checks - self.metadata = metadata - self.contents = contents - self.deployments = deployments - self.additionalProperties = additionalProperties + self.pull = pull + self.triage = triage + self.push = push + self.maintain = maintain + self.admin = admin } public enum CodingKeys: String, CodingKey { - case issues - case checks - case metadata - case contents - case deployments - } - public init(from decoder: any Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - issues = try container.decodeIfPresent( - Swift.String.self, - forKey: .issues - ) - checks = try container.decodeIfPresent( - Swift.String.self, - forKey: .checks - ) - metadata = try container.decodeIfPresent( - Swift.String.self, - forKey: .metadata - ) - contents = try container.decodeIfPresent( - Swift.String.self, - forKey: .contents - ) - deployments = try container.decodeIfPresent( - Swift.String.self, - forKey: .deployments - ) - additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: [ - "issues", - "checks", - "metadata", - "contents", - "deployments" - ]) - } - public func encode(to encoder: any Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent( - issues, - forKey: .issues - ) - try container.encodeIfPresent( - checks, - forKey: .checks - ) - try container.encodeIfPresent( - metadata, - forKey: .metadata - ) - try container.encodeIfPresent( - contents, - forKey: .contents - ) - try container.encodeIfPresent( - deployments, - forKey: .deployments - ) - try encoder.encodeAdditionalProperties(additionalProperties) + case pull + case triage + case push + case maintain + case admin } } - /// The set of permissions for the GitHub app - /// - /// - Remark: Generated from `#/components/schemas/nullable-integration/permissions`. - public var permissions: Components.Schemas.nullable_hyphen_integration.permissionsPayload - /// The list of events for the GitHub app - /// - /// - Remark: Generated from `#/components/schemas/nullable-integration/events`. - public var events: [Swift.String] - /// The number of installations associated with the GitHub app - /// - /// - Remark: Generated from `#/components/schemas/nullable-integration/installations_count`. - public var installations_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/nullable-integration/client_id`. - public var client_id: Swift.String? - /// - Remark: Generated from `#/components/schemas/nullable-integration/client_secret`. - public var client_secret: Swift.String? - /// - Remark: Generated from `#/components/schemas/nullable-integration/webhook_secret`. - public var webhook_secret: Swift.String? - /// - Remark: Generated from `#/components/schemas/nullable-integration/pem`. - public var pem: Swift.String? - /// Creates a new `nullable_hyphen_integration`. + /// - Remark: Generated from `#/components/schemas/team/permissions`. + public var permissions: Components.Schemas.team.permissionsPayload? + /// - Remark: Generated from `#/components/schemas/team/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/members_url`. + public var members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/parent`. + public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? + /// Creates a new `team`. /// /// - Parameters: - /// - id: Unique identifier of the GitHub app - /// - slug: The slug name of the GitHub app + /// - id: /// - node_id: - /// - owner: - /// - name: The name of the GitHub app + /// - name: + /// - slug: /// - description: - /// - external_url: + /// - privacy: + /// - notification_setting: + /// - permission: + /// - permissions: + /// - url: /// - html_url: - /// - created_at: - /// - updated_at: - /// - permissions: The set of permissions for the GitHub app - /// - events: The list of events for the GitHub app - /// - installations_count: The number of installations associated with the GitHub app - /// - client_id: - /// - client_secret: - /// - webhook_secret: - /// - pem: + /// - members_url: + /// - repositories_url: + /// - parent: public init( id: Swift.Int, - slug: Swift.String? = nil, node_id: Swift.String, - owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, name: Swift.String, + slug: Swift.String, description: Swift.String? = nil, - external_url: Swift.String, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + permission: Swift.String, + permissions: Components.Schemas.team.permissionsPayload? = nil, + url: Swift.String, html_url: Swift.String, - created_at: Foundation.Date, - updated_at: Foundation.Date, - permissions: Components.Schemas.nullable_hyphen_integration.permissionsPayload, - events: [Swift.String], - installations_count: Swift.Int? = nil, - client_id: Swift.String? = nil, - client_secret: Swift.String? = nil, - webhook_secret: Swift.String? = nil, - pem: Swift.String? = nil + members_url: Swift.String, + repositories_url: Swift.String, + parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil ) { self.id = id - self.slug = slug self.node_id = node_id - self.owner = owner self.name = name + self.slug = slug self.description = description - self.external_url = external_url - self.html_url = html_url - self.created_at = created_at - self.updated_at = updated_at + self.privacy = privacy + self.notification_setting = notification_setting + self.permission = permission self.permissions = permissions - self.events = events - self.installations_count = installations_count - self.client_id = client_id - self.client_secret = client_secret - self.webhook_secret = webhook_secret - self.pem = pem + self.url = url + self.html_url = html_url + self.members_url = members_url + self.repositories_url = repositories_url + self.parent = parent } public enum CodingKeys: String, CodingKey { case id - case slug case node_id - case owner case name + case slug case description - case external_url - case html_url - case created_at - case updated_at + case privacy + case notification_setting + case permission case permissions - case events - case installations_count - case client_id - case client_secret - case webhook_secret - case pem + case url + case html_url + case members_url + case repositories_url + case parent } } - /// How the author is associated with the repository. + /// A collection of related issues and pull requests. /// - /// - Remark: Generated from `#/components/schemas/author-association`. - @frozen public enum author_hyphen_association: String, Codable, Hashable, Sendable { - case COLLABORATOR = "COLLABORATOR" - case CONTRIBUTOR = "CONTRIBUTOR" - case FIRST_TIMER = "FIRST_TIMER" - case FIRST_TIME_CONTRIBUTOR = "FIRST_TIME_CONTRIBUTOR" - case MANNEQUIN = "MANNEQUIN" - case MEMBER = "MEMBER" - case NONE = "NONE" - case OWNER = "OWNER" - } - /// - Remark: Generated from `#/components/schemas/reaction-rollup`. - public struct reaction_hyphen_rollup: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/reaction-rollup/url`. + /// - Remark: Generated from `#/components/schemas/nullable-milestone`. + public struct nullable_hyphen_milestone: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/nullable-milestone/url`. public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/reaction-rollup/total_count`. - public var total_count: Swift.Int - /// - Remark: Generated from `#/components/schemas/reaction-rollup/+1`. - public var _plus_1: Swift.Int - /// - Remark: Generated from `#/components/schemas/reaction-rollup/-1`. - public var _hyphen_1: Swift.Int - /// - Remark: Generated from `#/components/schemas/reaction-rollup/laugh`. - public var laugh: Swift.Int - /// - Remark: Generated from `#/components/schemas/reaction-rollup/confused`. - public var confused: Swift.Int - /// - Remark: Generated from `#/components/schemas/reaction-rollup/heart`. - public var heart: Swift.Int - /// - Remark: Generated from `#/components/schemas/reaction-rollup/hooray`. - public var hooray: Swift.Int - /// - Remark: Generated from `#/components/schemas/reaction-rollup/eyes`. - public var eyes: Swift.Int - /// - Remark: Generated from `#/components/schemas/reaction-rollup/rocket`. - public var rocket: Swift.Int - /// Creates a new `reaction_hyphen_rollup`. + /// - Remark: Generated from `#/components/schemas/nullable-milestone/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-milestone/labels_url`. + public var labels_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-milestone/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/nullable-milestone/node_id`. + public var node_id: Swift.String + /// The number of the milestone. + /// + /// - Remark: Generated from `#/components/schemas/nullable-milestone/number`. + public var number: Swift.Int + /// The state of the milestone. + /// + /// - Remark: Generated from `#/components/schemas/nullable-milestone/state`. + @frozen public enum statePayload: String, Codable, Hashable, Sendable { + case open = "open" + case closed = "closed" + } + /// The state of the milestone. + /// + /// - Remark: Generated from `#/components/schemas/nullable-milestone/state`. + public var state: Components.Schemas.nullable_hyphen_milestone.statePayload + /// The title of the milestone. + /// + /// - Remark: Generated from `#/components/schemas/nullable-milestone/title`. + public var title: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-milestone/description`. + public var description: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-milestone/creator`. + public var creator: Components.Schemas.nullable_hyphen_simple_hyphen_user? + /// - Remark: Generated from `#/components/schemas/nullable-milestone/open_issues`. + public var open_issues: Swift.Int + /// - Remark: Generated from `#/components/schemas/nullable-milestone/closed_issues`. + public var closed_issues: Swift.Int + /// - Remark: Generated from `#/components/schemas/nullable-milestone/created_at`. + public var created_at: Foundation.Date + /// - Remark: Generated from `#/components/schemas/nullable-milestone/updated_at`. + public var updated_at: Foundation.Date + /// - Remark: Generated from `#/components/schemas/nullable-milestone/closed_at`. + public var closed_at: Foundation.Date? + /// - Remark: Generated from `#/components/schemas/nullable-milestone/due_on`. + public var due_on: Foundation.Date? + /// Creates a new `nullable_hyphen_milestone`. /// /// - Parameters: /// - url: - /// - total_count: - /// - _plus_1: - /// - _hyphen_1: - /// - laugh: - /// - confused: - /// - heart: - /// - hooray: - /// - eyes: - /// - rocket: + /// - html_url: + /// - labels_url: + /// - id: + /// - node_id: + /// - number: The number of the milestone. + /// - state: The state of the milestone. + /// - title: The title of the milestone. + /// - description: + /// - creator: + /// - open_issues: + /// - closed_issues: + /// - created_at: + /// - updated_at: + /// - closed_at: + /// - due_on: public init( url: Swift.String, - total_count: Swift.Int, - _plus_1: Swift.Int, - _hyphen_1: Swift.Int, - laugh: Swift.Int, - confused: Swift.Int, - heart: Swift.Int, - hooray: Swift.Int, - eyes: Swift.Int, - rocket: Swift.Int + html_url: Swift.String, + labels_url: Swift.String, + id: Swift.Int, + node_id: Swift.String, + number: Swift.Int, + state: Components.Schemas.nullable_hyphen_milestone.statePayload, + title: Swift.String, + description: Swift.String? = nil, + creator: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, + open_issues: Swift.Int, + closed_issues: Swift.Int, + created_at: Foundation.Date, + updated_at: Foundation.Date, + closed_at: Foundation.Date? = nil, + due_on: Foundation.Date? = nil ) { self.url = url - self.total_count = total_count - self._plus_1 = _plus_1 - self._hyphen_1 = _hyphen_1 - self.laugh = laugh - self.confused = confused - self.heart = heart - self.hooray = hooray - self.eyes = eyes - self.rocket = rocket + self.html_url = html_url + self.labels_url = labels_url + self.id = id + self.node_id = node_id + self.number = number + self.state = state + self.title = title + self.description = description + self.creator = creator + self.open_issues = open_issues + self.closed_issues = closed_issues + self.created_at = created_at + self.updated_at = updated_at + self.closed_at = closed_at + self.due_on = due_on } public enum CodingKeys: String, CodingKey { case url - case total_count - case _plus_1 = "+1" - case _hyphen_1 = "-1" - case laugh - case confused - case heart - case hooray - case eyes - case rocket + case html_url + case labels_url + case id + case node_id + case number + case state + case title + case description + case creator + case open_issues + case closed_issues + case created_at + case updated_at + case closed_at + case due_on } } - /// - Remark: Generated from `#/components/schemas/security-and-analysis`. - public struct security_hyphen_and_hyphen_analysis: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security`. - public struct advanced_securityPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { - case enabled = "enabled" - case disabled = "disabled" - } - /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security/status`. - public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload.statusPayload? - /// Creates a new `advanced_securityPayload`. + /// GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + /// + /// - Remark: Generated from `#/components/schemas/nullable-integration`. + public struct nullable_hyphen_integration: Codable, Hashable, Sendable { + /// Unique identifier of the GitHub app + /// + /// - Remark: Generated from `#/components/schemas/nullable-integration/id`. + public var id: Swift.Int + /// The slug name of the GitHub app + /// + /// - Remark: Generated from `#/components/schemas/nullable-integration/slug`. + public var slug: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-integration/node_id`. + public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-integration/owner`. + public var owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? + /// The name of the GitHub app + /// + /// - Remark: Generated from `#/components/schemas/nullable-integration/name`. + public var name: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-integration/description`. + public var description: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-integration/external_url`. + public var external_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-integration/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-integration/created_at`. + public var created_at: Foundation.Date + /// - Remark: Generated from `#/components/schemas/nullable-integration/updated_at`. + public var updated_at: Foundation.Date + /// The set of permissions for the GitHub app + /// + /// - Remark: Generated from `#/components/schemas/nullable-integration/permissions`. + public struct permissionsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/nullable-integration/permissions/issues`. + public var issues: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-integration/permissions/checks`. + public var checks: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-integration/permissions/metadata`. + public var metadata: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-integration/permissions/contents`. + public var contents: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-integration/permissions/deployments`. + public var deployments: Swift.String? + /// A container of undocumented properties. + public var additionalProperties: [String: Swift.String] + /// Creates a new `permissionsPayload`. /// /// - Parameters: - /// - status: - public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload.statusPayload? = nil) { - self.status = status + /// - issues: + /// - checks: + /// - metadata: + /// - contents: + /// - deployments: + /// - additionalProperties: A container of undocumented properties. + public init( + issues: Swift.String? = nil, + checks: Swift.String? = nil, + metadata: Swift.String? = nil, + contents: Swift.String? = nil, + deployments: Swift.String? = nil, + additionalProperties: [String: Swift.String] = .init() + ) { + self.issues = issues + self.checks = checks + self.metadata = metadata + self.contents = contents + self.deployments = deployments + self.additionalProperties = additionalProperties } public enum CodingKeys: String, CodingKey { - case status + case issues + case checks + case metadata + case contents + case deployments } - } - /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security`. - public var advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? - /// Enable or disable Dependabot security updates for the repository. - /// - /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates`. - public struct dependabot_security_updatesPayload: Codable, Hashable, Sendable { - /// The enablement status of Dependabot security updates for the repository. - /// - /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { - case enabled = "enabled" - case disabled = "disabled" - } - /// The enablement status of Dependabot security updates for the repository. - /// - /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates/status`. - public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload.statusPayload? - /// Creates a new `dependabot_security_updatesPayload`. - /// - /// - Parameters: - /// - status: The enablement status of Dependabot security updates for the repository. - public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload.statusPayload? = nil) { - self.status = status + public init(from decoder: any Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + issues = try container.decodeIfPresent( + Swift.String.self, + forKey: .issues + ) + checks = try container.decodeIfPresent( + Swift.String.self, + forKey: .checks + ) + metadata = try container.decodeIfPresent( + Swift.String.self, + forKey: .metadata + ) + contents = try container.decodeIfPresent( + Swift.String.self, + forKey: .contents + ) + deployments = try container.decodeIfPresent( + Swift.String.self, + forKey: .deployments + ) + additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: [ + "issues", + "checks", + "metadata", + "contents", + "deployments" + ]) } - public enum CodingKeys: String, CodingKey { - case status + public func encode(to encoder: any Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent( + issues, + forKey: .issues + ) + try container.encodeIfPresent( + checks, + forKey: .checks + ) + try container.encodeIfPresent( + metadata, + forKey: .metadata + ) + try container.encodeIfPresent( + contents, + forKey: .contents + ) + try container.encodeIfPresent( + deployments, + forKey: .deployments + ) + try encoder.encodeAdditionalProperties(additionalProperties) } } - /// Enable or disable Dependabot security updates for the repository. + /// The set of permissions for the GitHub app /// - /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates`. - public var dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? - /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning`. - public struct secret_scanningPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { - case enabled = "enabled" - case disabled = "disabled" - } - /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning/status`. - public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload.statusPayload? - /// Creates a new `secret_scanningPayload`. - /// - /// - Parameters: - /// - status: - public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload.statusPayload? = nil) { - self.status = status - } - public enum CodingKeys: String, CodingKey { - case status - } - } - /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning`. - public var secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? - /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. - public struct secret_scanning_push_protectionPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection/status`. - @frozen public enum statusPayload: String, Codable, Hashable, Sendable { - case enabled = "enabled" - case disabled = "disabled" - } - /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection/status`. - public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload.statusPayload? - /// Creates a new `secret_scanning_push_protectionPayload`. - /// - /// - Parameters: - /// - status: - public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload.statusPayload? = nil) { - self.status = status - } - public enum CodingKeys: String, CodingKey { - case status - } - } - /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. - public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? - /// Creates a new `security_hyphen_and_hyphen_analysis`. + /// - Remark: Generated from `#/components/schemas/nullable-integration/permissions`. + public var permissions: Components.Schemas.nullable_hyphen_integration.permissionsPayload + /// The list of events for the GitHub app + /// + /// - Remark: Generated from `#/components/schemas/nullable-integration/events`. + public var events: [Swift.String] + /// The number of installations associated with the GitHub app + /// + /// - Remark: Generated from `#/components/schemas/nullable-integration/installations_count`. + public var installations_count: Swift.Int? + /// - Remark: Generated from `#/components/schemas/nullable-integration/client_id`. + public var client_id: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-integration/client_secret`. + public var client_secret: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-integration/webhook_secret`. + public var webhook_secret: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-integration/pem`. + public var pem: Swift.String? + /// Creates a new `nullable_hyphen_integration`. /// /// - Parameters: - /// - advanced_security: - /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. - /// - secret_scanning: - /// - secret_scanning_push_protection: + /// - id: Unique identifier of the GitHub app + /// - slug: The slug name of the GitHub app + /// - node_id: + /// - owner: + /// - name: The name of the GitHub app + /// - description: + /// - external_url: + /// - html_url: + /// - created_at: + /// - updated_at: + /// - permissions: The set of permissions for the GitHub app + /// - events: The list of events for the GitHub app + /// - installations_count: The number of installations associated with the GitHub app + /// - client_id: + /// - client_secret: + /// - webhook_secret: + /// - pem: public init( - advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, - dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, - secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, - secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil + id: Swift.Int, + slug: Swift.String? = nil, + node_id: Swift.String, + owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, + name: Swift.String, + description: Swift.String? = nil, + external_url: Swift.String, + html_url: Swift.String, + created_at: Foundation.Date, + updated_at: Foundation.Date, + permissions: Components.Schemas.nullable_hyphen_integration.permissionsPayload, + events: [Swift.String], + installations_count: Swift.Int? = nil, + client_id: Swift.String? = nil, + client_secret: Swift.String? = nil, + webhook_secret: Swift.String? = nil, + pem: Swift.String? = nil ) { - self.advanced_security = advanced_security - self.dependabot_security_updates = dependabot_security_updates - self.secret_scanning = secret_scanning - self.secret_scanning_push_protection = secret_scanning_push_protection + self.id = id + self.slug = slug + self.node_id = node_id + self.owner = owner + self.name = name + self.description = description + self.external_url = external_url + self.html_url = html_url + self.created_at = created_at + self.updated_at = updated_at + self.permissions = permissions + self.events = events + self.installations_count = installations_count + self.client_id = client_id + self.client_secret = client_secret + self.webhook_secret = webhook_secret + self.pem = pem } public enum CodingKeys: String, CodingKey { - case advanced_security - case dependabot_security_updates - case secret_scanning - case secret_scanning_push_protection + case id + case slug + case node_id + case owner + case name + case description + case external_url + case html_url + case created_at + case updated_at + case permissions + case events + case installations_count + case client_id + case client_secret + case webhook_secret + case pem } } - /// Minimal Repository + /// How the author is associated with the repository. /// - /// - Remark: Generated from `#/components/schemas/minimal-repository`. - public struct minimal_hyphen_repository: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/minimal-repository/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/minimal-repository/node_id`. - public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/name`. - public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/full_name`. - public var full_name: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/owner`. - public var owner: Components.Schemas.simple_hyphen_user - /// - Remark: Generated from `#/components/schemas/minimal-repository/private`. - public var _private: Swift.Bool - /// - Remark: Generated from `#/components/schemas/minimal-repository/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/description`. - public var description: Swift.String? - /// - Remark: Generated from `#/components/schemas/minimal-repository/fork`. - public var fork: Swift.Bool - /// - Remark: Generated from `#/components/schemas/minimal-repository/url`. + /// - Remark: Generated from `#/components/schemas/author-association`. + @frozen public enum author_hyphen_association: String, Codable, Hashable, Sendable { + case COLLABORATOR = "COLLABORATOR" + case CONTRIBUTOR = "CONTRIBUTOR" + case FIRST_TIMER = "FIRST_TIMER" + case FIRST_TIME_CONTRIBUTOR = "FIRST_TIME_CONTRIBUTOR" + case MANNEQUIN = "MANNEQUIN" + case MEMBER = "MEMBER" + case NONE = "NONE" + case OWNER = "OWNER" + } + /// - Remark: Generated from `#/components/schemas/reaction-rollup`. + public struct reaction_hyphen_rollup: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/reaction-rollup/url`. public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/minimal-repository/archive_url`. + /// - Remark: Generated from `#/components/schemas/reaction-rollup/total_count`. + public var total_count: Swift.Int + /// - Remark: Generated from `#/components/schemas/reaction-rollup/+1`. + public var _plus_1: Swift.Int + /// - Remark: Generated from `#/components/schemas/reaction-rollup/-1`. + public var _hyphen_1: Swift.Int + /// - Remark: Generated from `#/components/schemas/reaction-rollup/laugh`. + public var laugh: Swift.Int + /// - Remark: Generated from `#/components/schemas/reaction-rollup/confused`. + public var confused: Swift.Int + /// - Remark: Generated from `#/components/schemas/reaction-rollup/heart`. + public var heart: Swift.Int + /// - Remark: Generated from `#/components/schemas/reaction-rollup/hooray`. + public var hooray: Swift.Int + /// - Remark: Generated from `#/components/schemas/reaction-rollup/eyes`. + public var eyes: Swift.Int + /// - Remark: Generated from `#/components/schemas/reaction-rollup/rocket`. + public var rocket: Swift.Int + /// Creates a new `reaction_hyphen_rollup`. + /// + /// - Parameters: + /// - url: + /// - total_count: + /// - _plus_1: + /// - _hyphen_1: + /// - laugh: + /// - confused: + /// - heart: + /// - hooray: + /// - eyes: + /// - rocket: + public init( + url: Swift.String, + total_count: Swift.Int, + _plus_1: Swift.Int, + _hyphen_1: Swift.Int, + laugh: Swift.Int, + confused: Swift.Int, + heart: Swift.Int, + hooray: Swift.Int, + eyes: Swift.Int, + rocket: Swift.Int + ) { + self.url = url + self.total_count = total_count + self._plus_1 = _plus_1 + self._hyphen_1 = _hyphen_1 + self.laugh = laugh + self.confused = confused + self.heart = heart + self.hooray = hooray + self.eyes = eyes + self.rocket = rocket + } + public enum CodingKeys: String, CodingKey { + case url + case total_count + case _plus_1 = "+1" + case _hyphen_1 = "-1" + case laugh + case confused + case heart + case hooray + case eyes + case rocket + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis`. + public struct security_hyphen_and_hyphen_analysis: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security`. + public struct advanced_securityPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload.statusPayload? + /// Creates a new `advanced_securityPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security`. + public var advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? + /// Enable or disable Dependabot security updates for the repository. + /// + /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates`. + public struct dependabot_security_updatesPayload: Codable, Hashable, Sendable { + /// The enablement status of Dependabot security updates for the repository. + /// + /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// The enablement status of Dependabot security updates for the repository. + /// + /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload.statusPayload? + /// Creates a new `dependabot_security_updatesPayload`. + /// + /// - Parameters: + /// - status: The enablement status of Dependabot security updates for the repository. + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// Enable or disable Dependabot security updates for the repository. + /// + /// - Remark: Generated from `#/components/schemas/security-and-analysis/dependabot_security_updates`. + public var dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning`. + public struct secret_scanningPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload.statusPayload? + /// Creates a new `secret_scanningPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning`. + public var secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. + public struct secret_scanning_push_protectionPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload.statusPayload? + /// Creates a new `secret_scanning_push_protectionPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. + public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// Creates a new `security_hyphen_and_hyphen_analysis`. + /// + /// - Parameters: + /// - advanced_security: + /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. + /// - secret_scanning: + /// - secret_scanning_push_protection: + public init( + advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, + dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, + secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, + secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil + ) { + self.advanced_security = advanced_security + self.dependabot_security_updates = dependabot_security_updates + self.secret_scanning = secret_scanning + self.secret_scanning_push_protection = secret_scanning_push_protection + } + public enum CodingKeys: String, CodingKey { + case advanced_security + case dependabot_security_updates + case secret_scanning + case secret_scanning_push_protection + } + } + /// Minimal Repository + /// + /// - Remark: Generated from `#/components/schemas/minimal-repository`. + public struct minimal_hyphen_repository: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/minimal-repository/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/minimal-repository/node_id`. + public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/name`. + public var name: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/full_name`. + public var full_name: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/owner`. + public var owner: Components.Schemas.simple_hyphen_user + /// - Remark: Generated from `#/components/schemas/minimal-repository/private`. + public var _private: Swift.Bool + /// - Remark: Generated from `#/components/schemas/minimal-repository/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/description`. + public var description: Swift.String? + /// - Remark: Generated from `#/components/schemas/minimal-repository/fork`. + public var fork: Swift.Bool + /// - Remark: Generated from `#/components/schemas/minimal-repository/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/minimal-repository/archive_url`. public var archive_url: Swift.String /// - Remark: Generated from `#/components/schemas/minimal-repository/assignees_url`. public var assignees_url: Swift.String @@ -8949,260 +9258,15 @@ public enum Components { try decoder.ensureNoAdditionalProperties(knownKeys: []) } } - /// Groups of organization members that gives permissions on specified repositories. + /// Custom property name and associated value /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. - public struct nullable_hyphen_team_hyphen_simple: Codable, Hashable, Sendable { - /// Unique identifier of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/node_id`. - public var node_id: Swift.String - /// URL for the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/members_url`. - public var members_url: Swift.String - /// Name of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/name`. - public var name: Swift.String - /// Description of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/description`. - public var description: Swift.String? - /// Permission that the team will have for its repositories - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/permission`. - public var permission: Swift.String - /// The level of privacy this team should have + /// - Remark: Generated from `#/components/schemas/custom-property-value`. + public struct custom_hyphen_property_hyphen_value: Codable, Hashable, Sendable { + /// The name of the property /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/privacy`. - public var privacy: Swift.String? - /// The notification setting the team has set - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/slug`. - public var slug: Swift.String - /// Distinguished Name (DN) that team maps to within LDAP environment - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/ldap_dn`. - public var ldap_dn: Swift.String? - /// Creates a new `nullable_hyphen_team_hyphen_simple`. - /// - /// - Parameters: - /// - id: Unique identifier of the team - /// - node_id: - /// - url: URL for the team - /// - members_url: - /// - name: Name of the team - /// - description: Description of the team - /// - permission: Permission that the team will have for its repositories - /// - privacy: The level of privacy this team should have - /// - notification_setting: The notification setting the team has set - /// - html_url: - /// - repositories_url: - /// - slug: - /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment - public init( - id: Swift.Int, - node_id: Swift.String, - url: Swift.String, - members_url: Swift.String, - name: Swift.String, - description: Swift.String? = nil, - permission: Swift.String, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, - html_url: Swift.String, - repositories_url: Swift.String, - slug: Swift.String, - ldap_dn: Swift.String? = nil - ) { - self.id = id - self.node_id = node_id - self.url = url - self.members_url = members_url - self.name = name - self.description = description - self.permission = permission - self.privacy = privacy - self.notification_setting = notification_setting - self.html_url = html_url - self.repositories_url = repositories_url - self.slug = slug - self.ldap_dn = ldap_dn - } - public enum CodingKeys: String, CodingKey { - case id - case node_id - case url - case members_url - case name - case description - case permission - case privacy - case notification_setting - case html_url - case repositories_url - case slug - case ldap_dn - } - } - /// Groups of organization members that gives permissions on specified repositories. - /// - /// - Remark: Generated from `#/components/schemas/team`. - public struct team: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/team/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/team/node_id`. - public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/team/name`. - public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/team/slug`. - public var slug: Swift.String - /// - Remark: Generated from `#/components/schemas/team/description`. - public var description: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/privacy`. - public var privacy: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/permission`. - public var permission: Swift.String - /// - Remark: Generated from `#/components/schemas/team/permissions`. - public struct permissionsPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/team/permissions/pull`. - public var pull: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/triage`. - public var triage: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/push`. - public var push: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/maintain`. - public var maintain: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/admin`. - public var admin: Swift.Bool - /// Creates a new `permissionsPayload`. - /// - /// - Parameters: - /// - pull: - /// - triage: - /// - push: - /// - maintain: - /// - admin: - public init( - pull: Swift.Bool, - triage: Swift.Bool, - push: Swift.Bool, - maintain: Swift.Bool, - admin: Swift.Bool - ) { - self.pull = pull - self.triage = triage - self.push = push - self.maintain = maintain - self.admin = admin - } - public enum CodingKeys: String, CodingKey { - case pull - case triage - case push - case maintain - case admin - } - } - /// - Remark: Generated from `#/components/schemas/team/permissions`. - public var permissions: Components.Schemas.team.permissionsPayload? - /// - Remark: Generated from `#/components/schemas/team/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/members_url`. - public var members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/parent`. - public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? - /// Creates a new `team`. - /// - /// - Parameters: - /// - id: - /// - node_id: - /// - name: - /// - slug: - /// - description: - /// - privacy: - /// - notification_setting: - /// - permission: - /// - permissions: - /// - url: - /// - html_url: - /// - members_url: - /// - repositories_url: - /// - parent: - public init( - id: Swift.Int, - node_id: Swift.String, - name: Swift.String, - slug: Swift.String, - description: Swift.String? = nil, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, - permission: Swift.String, - permissions: Components.Schemas.team.permissionsPayload? = nil, - url: Swift.String, - html_url: Swift.String, - members_url: Swift.String, - repositories_url: Swift.String, - parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil - ) { - self.id = id - self.node_id = node_id - self.name = name - self.slug = slug - self.description = description - self.privacy = privacy - self.notification_setting = notification_setting - self.permission = permission - self.permissions = permissions - self.url = url - self.html_url = html_url - self.members_url = members_url - self.repositories_url = repositories_url - self.parent = parent - } - public enum CodingKeys: String, CodingKey { - case id - case node_id - case name - case slug - case description - case privacy - case notification_setting - case permission - case permissions - case url - case html_url - case members_url - case repositories_url - case parent - } - } - /// Custom property name and associated value - /// - /// - Remark: Generated from `#/components/schemas/custom-property-value`. - public struct custom_hyphen_property_hyphen_value: Codable, Hashable, Sendable { - /// The name of the property - /// - /// - Remark: Generated from `#/components/schemas/custom-property-value/property_name`. - public var property_name: Swift.String - /// The value assigned to the property + /// - Remark: Generated from `#/components/schemas/custom-property-value/property_name`. + public var property_name: Swift.String + /// The value assigned to the property /// /// - Remark: Generated from `#/components/schemas/custom-property-value/value`. @frozen public enum valuePayload: Codable, Hashable, Sendable { @@ -25072,37 +25136,626 @@ public enum Operations { case web_commit_signoff_required } } - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/content/application\/json`. - case json(Operations.repos_sol_update.Input.Body.jsonPayload) + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/content/application\/json`. + case json(Operations.repos_sol_update.Input.Body.jsonPayload) + } + public var body: Operations.repos_sol_update.Input.Body? + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.repos_sol_update.Input.Path, + headers: Operations.repos_sol_update.Input.Headers = .init(), + body: Operations.repos_sol_update.Input.Body? = nil + ) { + self.path = path + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/responses/200/content/application\/json`. + case json(Components.Schemas.full_hyphen_repository) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.full_hyphen_repository { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.repos_sol_update.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.repos_sol_update.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/patch(repos/update)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.repos_sol_update.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.repos_sol_update.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Temporary Redirect + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/patch(repos/update)/responses/307`. + /// + /// HTTP response code: `307 temporaryRedirect`. + case temporaryRedirect(Components.Responses.temporary_redirect) + /// The associated value of the enum case if `self` is `.temporaryRedirect`. + /// + /// - Throws: An error if `self` is not `.temporaryRedirect`. + /// - SeeAlso: `.temporaryRedirect`. + public var temporaryRedirect: Components.Responses.temporary_redirect { + get throws { + switch self { + case let .temporaryRedirect(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "temporaryRedirect", + response: self + ) + } + } + } + /// Forbidden + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/patch(repos/update)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Components.Responses.forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Components.Responses.forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } + } + /// Validation failed, or the endpoint has been spammed. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/patch(repos/update)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + case unprocessableContent(Components.Responses.validation_failed) + /// The associated value of the enum case if `self` is `.unprocessableContent`. + /// + /// - Throws: An error if `self` is not `.unprocessableContent`. + /// - SeeAlso: `.unprocessableContent`. + public var unprocessableContent: Components.Responses.validation_failed { + get throws { + switch self { + case let .unprocessableContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unprocessableContent", + response: self + ) + } + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/patch(repos/update)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Components.Responses.not_found) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// Delete a repository + /// + /// Deleting a repository requires admin access. + /// + /// If an organization owner has configured the organization to prevent members from deleting organization-owned + /// repositories, you will get a `403 Forbidden` response. + /// + /// OAuth app tokens and personal access tokens (classic) need the `delete_repo` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /repos/{owner}/{repo}`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/delete(repos/delete)`. + public enum repos_sol_delete { + public static let id: Swift.String = "repos/delete" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/DELETE/path`. + public struct Path: Sendable, Hashable { + /// The account owner of the repository. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/DELETE/path/owner`. + public var owner: Components.Parameters.owner + /// The name of the repository without the `.git` extension. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/DELETE/path/repo`. + public var repo: Components.Parameters.repo + /// Creates a new `Path`. + /// + /// - Parameters: + /// - owner: The account owner of the repository. The name is not case sensitive. + /// - repo: The name of the repository without the `.git` extension. The name is not case sensitive. + public init( + owner: Components.Parameters.owner, + repo: Components.Parameters.repo + ) { + self.owner = owner + self.repo = repo + } + } + public var path: Operations.repos_sol_delete.Input.Path + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/DELETE/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.repos_sol_delete.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + public init( + path: Operations.repos_sol_delete.Input.Path, + headers: Operations.repos_sol_delete.Input.Headers = .init() + ) { + self.path = path + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} + } + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/delete(repos/delete)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Operations.repos_sol_delete.Output.NoContent) + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.repos_sol_delete.Output.NoContent { + get throws { + switch self { + case let .noContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "noContent", + response: self + ) + } + } + } + public struct Forbidden: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/DELETE/responses/403/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/DELETE/responses/403/content/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/DELETE/responses/403/content/json/message`. + public var message: Swift.String? + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/DELETE/responses/403/content/json/documentation_url`. + public var documentation_url: Swift.String? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - message: + /// - documentation_url: + public init( + message: Swift.String? = nil, + documentation_url: Swift.String? = nil + ) { + self.message = message + self.documentation_url = documentation_url + } + public enum CodingKeys: String, CodingKey { + case message + case documentation_url + } + } + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/DELETE/responses/403/content/application\/json`. + case json(Operations.repos_sol_delete.Output.Forbidden.Body.jsonPayload) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Operations.repos_sol_delete.Output.Forbidden.Body.jsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.repos_sol_delete.Output.Forbidden.Body + /// Creates a new `Forbidden`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.repos_sol_delete.Output.Forbidden.Body) { + self.body = body + } + } + /// If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response: + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/delete(repos/delete)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Operations.repos_sol_delete.Output.Forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Operations.repos_sol_delete.Output.Forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } + } + /// Temporary Redirect + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/delete(repos/delete)/responses/307`. + /// + /// HTTP response code: `307 temporaryRedirect`. + case temporaryRedirect(Components.Responses.temporary_redirect) + /// The associated value of the enum case if `self` is `.temporaryRedirect`. + /// + /// - Throws: An error if `self` is not `.temporaryRedirect`. + /// - SeeAlso: `.temporaryRedirect`. + public var temporaryRedirect: Components.Responses.temporary_redirect { + get throws { + switch self { + case let .temporaryRedirect(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "temporaryRedirect", + response: self + ) + } + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/delete(repos/delete)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Components.Responses.not_found) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// List repository activities + /// + /// Lists a detailed history of changes to a repository, such as pushes, merges, force pushes, and branch changes, and associates these changes with commits and users. + /// + /// For more information about viewing repository activity, + /// see "[Viewing activity and data for your repository](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository)." + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/activity`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/activity/get(repos/list-activities)`. + public enum repos_sol_list_hyphen_activities { + public static let id: Swift.String = "repos/list-activities" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/path`. + public struct Path: Sendable, Hashable { + /// The account owner of the repository. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/path/owner`. + public var owner: Components.Parameters.owner + /// The name of the repository without the `.git` extension. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/path/repo`. + public var repo: Components.Parameters.repo + /// Creates a new `Path`. + /// + /// - Parameters: + /// - owner: The account owner of the repository. The name is not case sensitive. + /// - repo: The name of the repository without the `.git` extension. The name is not case sensitive. + public init( + owner: Components.Parameters.owner, + repo: Components.Parameters.repo + ) { + self.owner = owner + self.repo = repo + } + } + public var path: Operations.repos_sol_list_hyphen_activities.Input.Path + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query`. + public struct Query: Sendable, Hashable { + /// - Remark: Generated from `#/components/parameters/direction`. + @frozen public enum direction: String, Codable, Hashable, Sendable { + case asc = "asc" + case desc = "desc" + } + /// The direction to sort the results by. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/direction`. + public var direction: Components.Parameters.direction? + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/per_page`. + public var per_page: Components.Parameters.per_hyphen_page? + /// A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/before`. + public var before: Components.Parameters.pagination_hyphen_before? + /// A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/after`. + public var after: Components.Parameters.pagination_hyphen_after? + /// The Git reference for the activities you want to list. + /// + /// The `ref` for a branch can be formatted either as `refs/heads/BRANCH_NAME` or `BRANCH_NAME`, where `BRANCH_NAME` is the name of your branch. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/ref`. + public var ref: Swift.String? + /// The GitHub username to use to filter by the actor who performed the activity. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/actor`. + public var actor: Swift.String? + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/time_period`. + @frozen public enum time_periodPayload: String, Codable, Hashable, Sendable { + case day = "day" + case week = "week" + case month = "month" + case quarter = "quarter" + case year = "year" + } + /// The time period to filter by. + /// + /// For example, `day` will filter for activity that occurred in the past 24 hours, and `week` will filter for activity that occurred in the past 7 days (168 hours). + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/time_period`. + public var time_period: Operations.repos_sol_list_hyphen_activities.Input.Query.time_periodPayload? + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/activity_type`. + @frozen public enum activity_typePayload: String, Codable, Hashable, Sendable { + case push = "push" + case force_push = "force_push" + case branch_creation = "branch_creation" + case branch_deletion = "branch_deletion" + case pr_merge = "pr_merge" + case merge_queue_merge = "merge_queue_merge" + } + /// The activity type to filter by. + /// + /// For example, you can choose to filter by "force_push", to see all force pushes to the repository. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/activity_type`. + public var activity_type: Operations.repos_sol_list_hyphen_activities.Input.Query.activity_typePayload? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - direction: The direction to sort the results by. + /// - per_page: The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// - before: A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// - after: A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// - ref: The Git reference for the activities you want to list. + /// - actor: The GitHub username to use to filter by the actor who performed the activity. + /// - time_period: The time period to filter by. + /// - activity_type: The activity type to filter by. + public init( + direction: Components.Parameters.direction? = nil, + per_page: Components.Parameters.per_hyphen_page? = nil, + before: Components.Parameters.pagination_hyphen_before? = nil, + after: Components.Parameters.pagination_hyphen_after? = nil, + ref: Swift.String? = nil, + actor: Swift.String? = nil, + time_period: Operations.repos_sol_list_hyphen_activities.Input.Query.time_periodPayload? = nil, + activity_type: Operations.repos_sol_list_hyphen_activities.Input.Query.activity_typePayload? = nil + ) { + self.direction = direction + self.per_page = per_page + self.before = before + self.after = after + self.ref = ref + self.actor = actor + self.time_period = time_period + self.activity_type = activity_type + } } - public var body: Operations.repos_sol_update.Input.Body? + public var query: Operations.repos_sol_list_hyphen_activities.Input.Query + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.repos_sol_list_hyphen_activities.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: + /// - query: /// - headers: - /// - body: public init( - path: Operations.repos_sol_update.Input.Path, - headers: Operations.repos_sol_update.Input.Headers = .init(), - body: Operations.repos_sol_update.Input.Body? = nil + path: Operations.repos_sol_list_hyphen_activities.Input.Path, + query: Operations.repos_sol_list_hyphen_activities.Input.Query = .init(), + headers: Operations.repos_sol_list_hyphen_activities.Input.Headers = .init() ) { self.path = path + self.query = query self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/responses/200/content`. + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/responses/200/headers`. + public struct Headers: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/responses/200/headers/Link`. + public var Link: Components.Headers.link? + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - Link: + public init(Link: Components.Headers.link? = nil) { + self.Link = Link + } + } + /// Received HTTP response headers + public var headers: Operations.repos_sol_list_hyphen_activities.Output.Ok.Headers + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/responses/200/content/application\/json`. - case json(Components.Schemas.full_hyphen_repository) + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/responses/200/content/application\/json`. + case json([Components.Schemas.activity]) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.full_hyphen_repository { + public var json: [Components.Schemas.activity] { get throws { switch self { case let .json(body): @@ -25112,26 +25765,31 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.repos_sol_update.Output.Ok.Body + public var body: Operations.repos_sol_list_hyphen_activities.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: + /// - headers: Received HTTP response headers /// - body: Received HTTP response body - public init(body: Operations.repos_sol_update.Output.Ok.Body) { + public init( + headers: Operations.repos_sol_list_hyphen_activities.Output.Ok.Headers = .init(), + body: Operations.repos_sol_list_hyphen_activities.Output.Ok.Body + ) { + self.headers = headers self.body = body } } /// Response /// - /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/patch(repos/update)/responses/200`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/activity/get(repos/list-activities)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.repos_sol_update.Output.Ok) + case ok(Operations.repos_sol_list_hyphen_activities.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.repos_sol_update.Output.Ok { + public var ok: Operations.repos_sol_list_hyphen_activities.Output.Ok { get throws { switch self { case let .ok(response): @@ -25144,63 +25802,17 @@ public enum Operations { } } } - /// Temporary Redirect - /// - /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/patch(repos/update)/responses/307`. - /// - /// HTTP response code: `307 temporaryRedirect`. - case temporaryRedirect(Components.Responses.temporary_redirect) - /// The associated value of the enum case if `self` is `.temporaryRedirect`. - /// - /// - Throws: An error if `self` is not `.temporaryRedirect`. - /// - SeeAlso: `.temporaryRedirect`. - public var temporaryRedirect: Components.Responses.temporary_redirect { - get throws { - switch self { - case let .temporaryRedirect(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "temporaryRedirect", - response: self - ) - } - } - } - /// Forbidden - /// - /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/patch(repos/update)/responses/403`. - /// - /// HTTP response code: `403 forbidden`. - case forbidden(Components.Responses.forbidden) - /// The associated value of the enum case if `self` is `.forbidden`. - /// - /// - Throws: An error if `self` is not `.forbidden`. - /// - SeeAlso: `.forbidden`. - public var forbidden: Components.Responses.forbidden { - get throws { - switch self { - case let .forbidden(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "forbidden", - response: self - ) - } - } - } /// Validation failed, or the endpoint has been spammed. /// - /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/patch(repos/update)/responses/422`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/activity/get(repos/list-activities)/responses/422`. /// /// HTTP response code: `422 unprocessableContent`. - case unprocessableContent(Components.Responses.validation_failed) + case unprocessableContent(Components.Responses.validation_failed_simple) /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. /// - SeeAlso: `.unprocessableContent`. - public var unprocessableContent: Components.Responses.validation_failed { + public var unprocessableContent: Components.Responses.validation_failed_simple { get throws { switch self { case let .unprocessableContent(response): @@ -25213,29 +25825,6 @@ public enum Operations { } } } - /// Resource not found - /// - /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/patch(repos/update)/responses/404`. - /// - /// HTTP response code: `404 notFound`. - case notFound(Components.Responses.not_found) - /// The associated value of the enum case if `self` is `.notFound`. - /// - /// - Throws: An error if `self` is not `.notFound`. - /// - SeeAlso: `.notFound`. - public var notFound: Components.Responses.not_found { - get throws { - switch self { - case let .notFound(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "notFound", - response: self - ) - } - } - } /// Undocumented response. /// /// A response with a code that is not documented in the OpenAPI document. @@ -25267,29 +25856,28 @@ public enum Operations { } } } - /// Delete a repository + /// Create an attestation /// - /// Deleting a repository requires admin access. + /// Store an artifact attestation and associate it with a repository. /// - /// If an organization owner has configured the organization to prevent members from deleting organization-owned - /// repositories, you will get a `403 Forbidden` response. + /// The authenticated user must have write permission to the repository and, if using a fine-grained access token the `attestations:write` permission is required. /// - /// OAuth app tokens and personal access tokens (classic) need the `delete_repo` scope to use this endpoint. + /// Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For amore information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). /// - /// - Remark: HTTP `DELETE /repos/{owner}/{repo}`. - /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/delete(repos/delete)`. - public enum repos_sol_delete { - public static let id: Swift.String = "repos/delete" + /// - Remark: HTTP `POST /repos/{owner}/{repo}/attestations`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/post(repos/create-attestation)`. + public enum repos_sol_create_hyphen_attestation { + public static let id: Swift.String = "repos/create-attestation" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/DELETE/path`. + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/path`. public struct Path: Sendable, Hashable { /// The account owner of the repository. The name is not case sensitive. /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/DELETE/path/owner`. + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/path/owner`. public var owner: Components.Parameters.owner /// The name of the repository without the `.git` extension. The name is not case sensitive. /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/DELETE/path/repo`. + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/path/repo`. public var repo: Components.Parameters.repo /// Creates a new `Path`. /// @@ -25304,93 +25892,155 @@ public enum Operations { self.repo = repo } } - public var path: Operations.repos_sol_delete.Input.Path - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/DELETE/header`. + public var path: Operations.repos_sol_create_hyphen_attestation.Input.Path + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.repos_sol_delete.Input.Headers + public var headers: Operations.repos_sol_create_hyphen_attestation.Input.Headers + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/requestBody/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// The attestation's Sigstore Bundle. + /// Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/requestBody/json/bundle`. + public struct bundlePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/requestBody/json/bundle/mediaType`. + public var mediaType: Swift.String? + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/requestBody/json/bundle/verificationMaterial`. + public struct verificationMaterialPayload: Codable, Hashable, Sendable { + /// A container of undocumented properties. + public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer + /// Creates a new `verificationMaterialPayload`. + /// + /// - Parameters: + /// - additionalProperties: A container of undocumented properties. + public init(additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init()) { + self.additionalProperties = additionalProperties + } + public init(from decoder: any Decoder) throws { + additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: []) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeAdditionalProperties(additionalProperties) + } + } + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/requestBody/json/bundle/verificationMaterial`. + public var verificationMaterial: Operations.repos_sol_create_hyphen_attestation.Input.Body.jsonPayload.bundlePayload.verificationMaterialPayload? + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/requestBody/json/bundle/dsseEnvelope`. + public struct dsseEnvelopePayload: Codable, Hashable, Sendable { + /// A container of undocumented properties. + public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer + /// Creates a new `dsseEnvelopePayload`. + /// + /// - Parameters: + /// - additionalProperties: A container of undocumented properties. + public init(additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init()) { + self.additionalProperties = additionalProperties + } + public init(from decoder: any Decoder) throws { + additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: []) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeAdditionalProperties(additionalProperties) + } + } + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/requestBody/json/bundle/dsseEnvelope`. + public var dsseEnvelope: Operations.repos_sol_create_hyphen_attestation.Input.Body.jsonPayload.bundlePayload.dsseEnvelopePayload? + /// Creates a new `bundlePayload`. + /// + /// - Parameters: + /// - mediaType: + /// - verificationMaterial: + /// - dsseEnvelope: + public init( + mediaType: Swift.String? = nil, + verificationMaterial: Operations.repos_sol_create_hyphen_attestation.Input.Body.jsonPayload.bundlePayload.verificationMaterialPayload? = nil, + dsseEnvelope: Operations.repos_sol_create_hyphen_attestation.Input.Body.jsonPayload.bundlePayload.dsseEnvelopePayload? = nil + ) { + self.mediaType = mediaType + self.verificationMaterial = verificationMaterial + self.dsseEnvelope = dsseEnvelope + } + public enum CodingKeys: String, CodingKey { + case mediaType + case verificationMaterial + case dsseEnvelope + } + } + /// The attestation's Sigstore Bundle. + /// Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/requestBody/json/bundle`. + public var bundle: Operations.repos_sol_create_hyphen_attestation.Input.Body.jsonPayload.bundlePayload + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - bundle: The attestation's Sigstore Bundle. + public init(bundle: Operations.repos_sol_create_hyphen_attestation.Input.Body.jsonPayload.bundlePayload) { + self.bundle = bundle + } + public enum CodingKeys: String, CodingKey { + case bundle + } + } + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/requestBody/content/application\/json`. + case json(Operations.repos_sol_create_hyphen_attestation.Input.Body.jsonPayload) + } + public var body: Operations.repos_sol_create_hyphen_attestation.Input.Body /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: + /// - body: public init( - path: Operations.repos_sol_delete.Input.Path, - headers: Operations.repos_sol_delete.Input.Headers = .init() - ) { - self.path = path - self.headers = headers - } - } - @frozen public enum Output: Sendable, Hashable { - public struct NoContent: Sendable, Hashable { - /// Creates a new `NoContent`. - public init() {} - } - /// Response - /// - /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/delete(repos/delete)/responses/204`. - /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.repos_sol_delete.Output.NoContent) - /// The associated value of the enum case if `self` is `.noContent`. - /// - /// - Throws: An error if `self` is not `.noContent`. - /// - SeeAlso: `.noContent`. - public var noContent: Operations.repos_sol_delete.Output.NoContent { - get throws { - switch self { - case let .noContent(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "noContent", - response: self - ) - } - } + path: Operations.repos_sol_create_hyphen_attestation.Input.Path, + headers: Operations.repos_sol_create_hyphen_attestation.Input.Headers = .init(), + body: Operations.repos_sol_create_hyphen_attestation.Input.Body + ) { + self.path = path + self.headers = headers + self.body = body } - public struct Forbidden: Sendable, Hashable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/DELETE/responses/403/content`. + } + @frozen public enum Output: Sendable, Hashable { + public struct Created: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/responses/201/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/DELETE/responses/403/content/json`. + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/responses/201/content/json`. public struct jsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/DELETE/responses/403/content/json/message`. - public var message: Swift.String? - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/DELETE/responses/403/content/json/documentation_url`. - public var documentation_url: Swift.String? + /// The ID of the attestation. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/responses/201/content/json/id`. + public var id: Swift.Int? /// Creates a new `jsonPayload`. /// /// - Parameters: - /// - message: - /// - documentation_url: - public init( - message: Swift.String? = nil, - documentation_url: Swift.String? = nil - ) { - self.message = message - self.documentation_url = documentation_url + /// - id: The ID of the attestation. + public init(id: Swift.Int? = nil) { + self.id = id } public enum CodingKeys: String, CodingKey { - case message - case documentation_url + case id } } - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/DELETE/responses/403/content/application\/json`. - case json(Operations.repos_sol_delete.Output.Forbidden.Body.jsonPayload) + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/POST/responses/201/content/application\/json`. + case json(Operations.repos_sol_create_hyphen_attestation.Output.Created.Body.jsonPayload) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Operations.repos_sol_delete.Output.Forbidden.Body.jsonPayload { + public var json: Operations.repos_sol_create_hyphen_attestation.Output.Created.Body.jsonPayload { get throws { switch self { case let .json(body): @@ -25400,79 +26050,79 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.repos_sol_delete.Output.Forbidden.Body - /// Creates a new `Forbidden`. + public var body: Operations.repos_sol_create_hyphen_attestation.Output.Created.Body + /// Creates a new `Created`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.repos_sol_delete.Output.Forbidden.Body) { + public init(body: Operations.repos_sol_create_hyphen_attestation.Output.Created.Body) { self.body = body } } - /// If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response: + /// response /// - /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/delete(repos/delete)/responses/403`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/post(repos/create-attestation)/responses/201`. /// - /// HTTP response code: `403 forbidden`. - case forbidden(Operations.repos_sol_delete.Output.Forbidden) - /// The associated value of the enum case if `self` is `.forbidden`. + /// HTTP response code: `201 created`. + case created(Operations.repos_sol_create_hyphen_attestation.Output.Created) + /// The associated value of the enum case if `self` is `.created`. /// - /// - Throws: An error if `self` is not `.forbidden`. - /// - SeeAlso: `.forbidden`. - public var forbidden: Operations.repos_sol_delete.Output.Forbidden { + /// - Throws: An error if `self` is not `.created`. + /// - SeeAlso: `.created`. + public var created: Operations.repos_sol_create_hyphen_attestation.Output.Created { get throws { switch self { - case let .forbidden(response): + case let .created(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "forbidden", + expectedStatus: "created", response: self ) } } } - /// Temporary Redirect + /// Forbidden /// - /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/delete(repos/delete)/responses/307`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/post(repos/create-attestation)/responses/403`. /// - /// HTTP response code: `307 temporaryRedirect`. - case temporaryRedirect(Components.Responses.temporary_redirect) - /// The associated value of the enum case if `self` is `.temporaryRedirect`. + /// HTTP response code: `403 forbidden`. + case forbidden(Components.Responses.forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. /// - /// - Throws: An error if `self` is not `.temporaryRedirect`. - /// - SeeAlso: `.temporaryRedirect`. - public var temporaryRedirect: Components.Responses.temporary_redirect { + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Components.Responses.forbidden { get throws { switch self { - case let .temporaryRedirect(response): + case let .forbidden(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "temporaryRedirect", + expectedStatus: "forbidden", response: self ) } } } - /// Resource not found + /// Validation failed, or the endpoint has been spammed. /// - /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/delete(repos/delete)/responses/404`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/post(repos/create-attestation)/responses/422`. /// - /// HTTP response code: `404 notFound`. - case notFound(Components.Responses.not_found) - /// The associated value of the enum case if `self` is `.notFound`. + /// HTTP response code: `422 unprocessableContent`. + case unprocessableContent(Components.Responses.validation_failed) + /// The associated value of the enum case if `self` is `.unprocessableContent`. /// - /// - Throws: An error if `self` is not `.notFound`. - /// - SeeAlso: `.notFound`. - public var notFound: Components.Responses.not_found { + /// - Throws: An error if `self` is not `.unprocessableContent`. + /// - SeeAlso: `.unprocessableContent`. + public var unprocessableContent: Components.Responses.validation_failed { get throws { switch self { - case let .notFound(response): + case let .unprocessableContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "notFound", + expectedStatus: "unprocessableContent", response: self ) } @@ -25509,148 +26159,93 @@ public enum Operations { } } } - /// List repository activities + /// List attestations /// - /// Lists a detailed history of changes to a repository, such as pushes, merges, force pushes, and branch changes, and associates these changes with commits and users. + /// List a collection of artifact attestations with a given subject digest that are associated with a repository. /// - /// For more information about viewing repository activity, - /// see "[Viewing activity and data for your repository](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository)." + /// The authenticated user making the request must have read access to the repository. In addition, when using a fine-grained access token the `attestations:read` permission is required. /// - /// - Remark: HTTP `GET /repos/{owner}/{repo}/activity`. - /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/activity/get(repos/list-activities)`. - public enum repos_sol_list_hyphen_activities { - public static let id: Swift.String = "repos/list-activities" + /// **Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/attestations/{subject_digest}`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/{subject_digest}/get(repos/list-attestations)`. + public enum repos_sol_list_hyphen_attestations { + public static let id: Swift.String = "repos/list-attestations" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/path`. + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/path`. public struct Path: Sendable, Hashable { /// The account owner of the repository. The name is not case sensitive. /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/path/owner`. + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/path/owner`. public var owner: Components.Parameters.owner /// The name of the repository without the `.git` extension. The name is not case sensitive. /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/path/repo`. + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/path/repo`. public var repo: Components.Parameters.repo + /// The parameter should be set to the attestation's subject's SHA256 digest, in the form `sha256:HEX_DIGEST`. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/path/subject_digest`. + public var subject_digest: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - owner: The account owner of the repository. The name is not case sensitive. /// - repo: The name of the repository without the `.git` extension. The name is not case sensitive. + /// - subject_digest: The parameter should be set to the attestation's subject's SHA256 digest, in the form `sha256:HEX_DIGEST`. public init( owner: Components.Parameters.owner, - repo: Components.Parameters.repo + repo: Components.Parameters.repo, + subject_digest: Swift.String ) { self.owner = owner self.repo = repo + self.subject_digest = subject_digest } } - public var path: Operations.repos_sol_list_hyphen_activities.Input.Path - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query`. + public var path: Operations.repos_sol_list_hyphen_attestations.Input.Path + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/query`. public struct Query: Sendable, Hashable { - /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum direction: String, Codable, Hashable, Sendable { - case asc = "asc" - case desc = "desc" - } - /// The direction to sort the results by. - /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/direction`. - public var direction: Components.Parameters.direction? /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/per_page`. + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/query/per_page`. public var per_page: Components.Parameters.per_hyphen_page? /// A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/before`. + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/query/before`. public var before: Components.Parameters.pagination_hyphen_before? /// A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/after`. + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/query/after`. public var after: Components.Parameters.pagination_hyphen_after? - /// The Git reference for the activities you want to list. - /// - /// The `ref` for a branch can be formatted either as `refs/heads/BRANCH_NAME` or `BRANCH_NAME`, where `BRANCH_NAME` is the name of your branch. - /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/ref`. - public var ref: Swift.String? - /// The GitHub username to use to filter by the actor who performed the activity. - /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/actor`. - public var actor: Swift.String? - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/time_period`. - @frozen public enum time_periodPayload: String, Codable, Hashable, Sendable { - case day = "day" - case week = "week" - case month = "month" - case quarter = "quarter" - case year = "year" - } - /// The time period to filter by. - /// - /// For example, `day` will filter for activity that occurred in the past 24 hours, and `week` will filter for activity that occurred in the past 7 days (168 hours). - /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/time_period`. - public var time_period: Operations.repos_sol_list_hyphen_activities.Input.Query.time_periodPayload? - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/activity_type`. - @frozen public enum activity_typePayload: String, Codable, Hashable, Sendable { - case push = "push" - case force_push = "force_push" - case branch_creation = "branch_creation" - case branch_deletion = "branch_deletion" - case pr_merge = "pr_merge" - case merge_queue_merge = "merge_queue_merge" - } - /// The activity type to filter by. - /// - /// For example, you can choose to filter by "force_push", to see all force pushes to the repository. - /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/query/activity_type`. - public var activity_type: Operations.repos_sol_list_hyphen_activities.Input.Query.activity_typePayload? /// Creates a new `Query`. /// /// - Parameters: - /// - direction: The direction to sort the results by. /// - per_page: The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." /// - before: A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." /// - after: A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." - /// - ref: The Git reference for the activities you want to list. - /// - actor: The GitHub username to use to filter by the actor who performed the activity. - /// - time_period: The time period to filter by. - /// - activity_type: The activity type to filter by. public init( - direction: Components.Parameters.direction? = nil, per_page: Components.Parameters.per_hyphen_page? = nil, before: Components.Parameters.pagination_hyphen_before? = nil, - after: Components.Parameters.pagination_hyphen_after? = nil, - ref: Swift.String? = nil, - actor: Swift.String? = nil, - time_period: Operations.repos_sol_list_hyphen_activities.Input.Query.time_periodPayload? = nil, - activity_type: Operations.repos_sol_list_hyphen_activities.Input.Query.activity_typePayload? = nil + after: Components.Parameters.pagination_hyphen_after? = nil ) { - self.direction = direction self.per_page = per_page self.before = before self.after = after - self.ref = ref - self.actor = actor - self.time_period = time_period - self.activity_type = activity_type } } - public var query: Operations.repos_sol_list_hyphen_activities.Input.Query - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/header`. + public var query: Operations.repos_sol_list_hyphen_attestations.Input.Query + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.repos_sol_list_hyphen_activities.Input.Headers + public var headers: Operations.repos_sol_list_hyphen_attestations.Input.Headers /// Creates a new `Input`. /// /// - Parameters: @@ -25658,9 +26253,9 @@ public enum Operations { /// - query: /// - headers: public init( - path: Operations.repos_sol_list_hyphen_activities.Input.Path, - query: Operations.repos_sol_list_hyphen_activities.Input.Query = .init(), - headers: Operations.repos_sol_list_hyphen_activities.Input.Headers = .init() + path: Operations.repos_sol_list_hyphen_attestations.Input.Path, + query: Operations.repos_sol_list_hyphen_attestations.Input.Query = .init(), + headers: Operations.repos_sol_list_hyphen_attestations.Input.Headers = .init() ) { self.path = path self.query = query @@ -25669,29 +26264,126 @@ public enum Operations { } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/responses/200/headers`. - public struct Headers: Sendable, Hashable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/responses/200/headers/Link`. - public var Link: Components.Headers.link? - /// Creates a new `Headers`. - /// - /// - Parameters: - /// - Link: - public init(Link: Components.Headers.link? = nil) { - self.Link = Link - } - } - /// Received HTTP response headers - public var headers: Operations.repos_sol_list_hyphen_activities.Output.Ok.Headers - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/activity/GET/responses/200/content/application\/json`. - case json([Components.Schemas.activity]) + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/responses/200/content/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload`. + public struct attestationsPayloadPayload: Codable, Hashable, Sendable { + /// The attestation's Sigstore Bundle. + /// Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle`. + public struct bundlePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle/mediaType`. + public var mediaType: Swift.String? + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle/verificationMaterial`. + public struct verificationMaterialPayload: Codable, Hashable, Sendable { + /// A container of undocumented properties. + public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer + /// Creates a new `verificationMaterialPayload`. + /// + /// - Parameters: + /// - additionalProperties: A container of undocumented properties. + public init(additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init()) { + self.additionalProperties = additionalProperties + } + public init(from decoder: any Decoder) throws { + additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: []) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeAdditionalProperties(additionalProperties) + } + } + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle/verificationMaterial`. + public var verificationMaterial: Operations.repos_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload.bundlePayload.verificationMaterialPayload? + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle/dsseEnvelope`. + public struct dsseEnvelopePayload: Codable, Hashable, Sendable { + /// A container of undocumented properties. + public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer + /// Creates a new `dsseEnvelopePayload`. + /// + /// - Parameters: + /// - additionalProperties: A container of undocumented properties. + public init(additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init()) { + self.additionalProperties = additionalProperties + } + public init(from decoder: any Decoder) throws { + additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: []) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeAdditionalProperties(additionalProperties) + } + } + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle/dsseEnvelope`. + public var dsseEnvelope: Operations.repos_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload.bundlePayload.dsseEnvelopePayload? + /// Creates a new `bundlePayload`. + /// + /// - Parameters: + /// - mediaType: + /// - verificationMaterial: + /// - dsseEnvelope: + public init( + mediaType: Swift.String? = nil, + verificationMaterial: Operations.repos_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload.bundlePayload.verificationMaterialPayload? = nil, + dsseEnvelope: Operations.repos_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload.bundlePayload.dsseEnvelopePayload? = nil + ) { + self.mediaType = mediaType + self.verificationMaterial = verificationMaterial + self.dsseEnvelope = dsseEnvelope + } + public enum CodingKeys: String, CodingKey { + case mediaType + case verificationMaterial + case dsseEnvelope + } + } + /// The attestation's Sigstore Bundle. + /// Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle`. + public var bundle: Operations.repos_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload.bundlePayload? + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/repository_id`. + public var repository_id: Swift.Int? + /// Creates a new `attestationsPayloadPayload`. + /// + /// - Parameters: + /// - bundle: The attestation's Sigstore Bundle. + /// - repository_id: + public init( + bundle: Operations.repos_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload.bundlePayload? = nil, + repository_id: Swift.Int? = nil + ) { + self.bundle = bundle + self.repository_id = repository_id + } + public enum CodingKeys: String, CodingKey { + case bundle + case repository_id + } + } + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/responses/200/content/json/attestations`. + public typealias attestationsPayload = [Operations.repos_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload] + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/responses/200/content/json/attestations`. + public var attestations: Operations.repos_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayload? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - attestations: + public init(attestations: Operations.repos_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayload? = nil) { + self.attestations = attestations + } + public enum CodingKeys: String, CodingKey { + case attestations + } + } + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/responses/200/content/application\/json`. + case json(Operations.repos_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: [Components.Schemas.activity] { + public var json: Operations.repos_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload { get throws { switch self { case let .json(body): @@ -25701,31 +26393,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.repos_sol_list_hyphen_activities.Output.Ok.Body + public var body: Operations.repos_sol_list_hyphen_attestations.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: - /// - headers: Received HTTP response headers /// - body: Received HTTP response body - public init( - headers: Operations.repos_sol_list_hyphen_activities.Output.Ok.Headers = .init(), - body: Operations.repos_sol_list_hyphen_activities.Output.Ok.Body - ) { - self.headers = headers + public init(body: Operations.repos_sol_list_hyphen_attestations.Output.Ok.Body) { self.body = body } } /// Response /// - /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/activity/get(repos/list-activities)/responses/200`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/attestations/{subject_digest}/get(repos/list-attestations)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.repos_sol_list_hyphen_activities.Output.Ok) + case ok(Operations.repos_sol_list_hyphen_attestations.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.repos_sol_list_hyphen_activities.Output.Ok { + public var ok: Operations.repos_sol_list_hyphen_attestations.Output.Ok { get throws { switch self { case let .ok(response): @@ -25738,29 +26425,6 @@ public enum Operations { } } } - /// Validation failed, or the endpoint has been spammed. - /// - /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/activity/get(repos/list-activities)/responses/422`. - /// - /// HTTP response code: `422 unprocessableContent`. - case unprocessableContent(Components.Responses.validation_failed_simple) - /// The associated value of the enum case if `self` is `.unprocessableContent`. - /// - /// - Throws: An error if `self` is not `.unprocessableContent`. - /// - SeeAlso: `.unprocessableContent`. - public var unprocessableContent: Components.Responses.validation_failed_simple { - get throws { - switch self { - case let .unprocessableContent(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "unprocessableContent", - response: self - ) - } - } - } /// Undocumented response. /// /// A response with a code that is not documented in the OpenAPI document. From 1ba216e74d19ec5b138aa8878a9427ecc6f17ebf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 24 Jun 2024 21:37:48 +0000 Subject: [PATCH 013/152] Commit via running ake Sources/teams --- Sources/teams/Types.swift | 490 +++++++++++++++++++------------------- 1 file changed, 245 insertions(+), 245 deletions(-) diff --git a/Sources/teams/Types.swift b/Sources/teams/Types.swift index a02be521678..24013631da4 100644 --- a/Sources/teams/Types.swift +++ b/Sources/teams/Types.swift @@ -2403,6 +2403,251 @@ public enum Components { case html_url } } + /// Groups of organization members that gives permissions on specified repositories. + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. + public struct nullable_hyphen_team_hyphen_simple: Codable, Hashable, Sendable { + /// Unique identifier of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/node_id`. + public var node_id: Swift.String + /// URL for the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/members_url`. + public var members_url: Swift.String + /// Name of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/name`. + public var name: Swift.String + /// Description of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/description`. + public var description: Swift.String? + /// Permission that the team will have for its repositories + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/permission`. + public var permission: Swift.String + /// The level of privacy this team should have + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/privacy`. + public var privacy: Swift.String? + /// The notification setting the team has set + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/slug`. + public var slug: Swift.String + /// Distinguished Name (DN) that team maps to within LDAP environment + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/ldap_dn`. + public var ldap_dn: Swift.String? + /// Creates a new `nullable_hyphen_team_hyphen_simple`. + /// + /// - Parameters: + /// - id: Unique identifier of the team + /// - node_id: + /// - url: URL for the team + /// - members_url: + /// - name: Name of the team + /// - description: Description of the team + /// - permission: Permission that the team will have for its repositories + /// - privacy: The level of privacy this team should have + /// - notification_setting: The notification setting the team has set + /// - html_url: + /// - repositories_url: + /// - slug: + /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment + public init( + id: Swift.Int, + node_id: Swift.String, + url: Swift.String, + members_url: Swift.String, + name: Swift.String, + description: Swift.String? = nil, + permission: Swift.String, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + html_url: Swift.String, + repositories_url: Swift.String, + slug: Swift.String, + ldap_dn: Swift.String? = nil + ) { + self.id = id + self.node_id = node_id + self.url = url + self.members_url = members_url + self.name = name + self.description = description + self.permission = permission + self.privacy = privacy + self.notification_setting = notification_setting + self.html_url = html_url + self.repositories_url = repositories_url + self.slug = slug + self.ldap_dn = ldap_dn + } + public enum CodingKeys: String, CodingKey { + case id + case node_id + case url + case members_url + case name + case description + case permission + case privacy + case notification_setting + case html_url + case repositories_url + case slug + case ldap_dn + } + } + /// Groups of organization members that gives permissions on specified repositories. + /// + /// - Remark: Generated from `#/components/schemas/team`. + public struct team: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/team/node_id`. + public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/team/name`. + public var name: Swift.String + /// - Remark: Generated from `#/components/schemas/team/slug`. + public var slug: Swift.String + /// - Remark: Generated from `#/components/schemas/team/description`. + public var description: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/privacy`. + public var privacy: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/permission`. + public var permission: Swift.String + /// - Remark: Generated from `#/components/schemas/team/permissions`. + public struct permissionsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team/permissions/pull`. + public var pull: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/triage`. + public var triage: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/push`. + public var push: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/maintain`. + public var maintain: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/admin`. + public var admin: Swift.Bool + /// Creates a new `permissionsPayload`. + /// + /// - Parameters: + /// - pull: + /// - triage: + /// - push: + /// - maintain: + /// - admin: + public init( + pull: Swift.Bool, + triage: Swift.Bool, + push: Swift.Bool, + maintain: Swift.Bool, + admin: Swift.Bool + ) { + self.pull = pull + self.triage = triage + self.push = push + self.maintain = maintain + self.admin = admin + } + public enum CodingKeys: String, CodingKey { + case pull + case triage + case push + case maintain + case admin + } + } + /// - Remark: Generated from `#/components/schemas/team/permissions`. + public var permissions: Components.Schemas.team.permissionsPayload? + /// - Remark: Generated from `#/components/schemas/team/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/members_url`. + public var members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/parent`. + public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? + /// Creates a new `team`. + /// + /// - Parameters: + /// - id: + /// - node_id: + /// - name: + /// - slug: + /// - description: + /// - privacy: + /// - notification_setting: + /// - permission: + /// - permissions: + /// - url: + /// - html_url: + /// - members_url: + /// - repositories_url: + /// - parent: + public init( + id: Swift.Int, + node_id: Swift.String, + name: Swift.String, + slug: Swift.String, + description: Swift.String? = nil, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + permission: Swift.String, + permissions: Components.Schemas.team.permissionsPayload? = nil, + url: Swift.String, + html_url: Swift.String, + members_url: Swift.String, + repositories_url: Swift.String, + parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil + ) { + self.id = id + self.node_id = node_id + self.name = name + self.slug = slug + self.description = description + self.privacy = privacy + self.notification_setting = notification_setting + self.permission = permission + self.permissions = permissions + self.url = url + self.html_url = html_url + self.members_url = members_url + self.repositories_url = repositories_url + self.parent = parent + } + public enum CodingKeys: String, CodingKey { + case id + case node_id + case name + case slug + case description + case privacy + case notification_setting + case permission + case permissions + case url + case html_url + case members_url + case repositories_url + case parent + } + } /// - Remark: Generated from `#/components/schemas/reaction-rollup`. public struct reaction_hyphen_rollup: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/reaction-rollup/url`. @@ -3216,251 +3461,6 @@ public enum Components { case security_and_analysis } } - /// Groups of organization members that gives permissions on specified repositories. - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. - public struct nullable_hyphen_team_hyphen_simple: Codable, Hashable, Sendable { - /// Unique identifier of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/node_id`. - public var node_id: Swift.String - /// URL for the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/members_url`. - public var members_url: Swift.String - /// Name of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/name`. - public var name: Swift.String - /// Description of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/description`. - public var description: Swift.String? - /// Permission that the team will have for its repositories - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/permission`. - public var permission: Swift.String - /// The level of privacy this team should have - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/privacy`. - public var privacy: Swift.String? - /// The notification setting the team has set - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/slug`. - public var slug: Swift.String - /// Distinguished Name (DN) that team maps to within LDAP environment - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/ldap_dn`. - public var ldap_dn: Swift.String? - /// Creates a new `nullable_hyphen_team_hyphen_simple`. - /// - /// - Parameters: - /// - id: Unique identifier of the team - /// - node_id: - /// - url: URL for the team - /// - members_url: - /// - name: Name of the team - /// - description: Description of the team - /// - permission: Permission that the team will have for its repositories - /// - privacy: The level of privacy this team should have - /// - notification_setting: The notification setting the team has set - /// - html_url: - /// - repositories_url: - /// - slug: - /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment - public init( - id: Swift.Int, - node_id: Swift.String, - url: Swift.String, - members_url: Swift.String, - name: Swift.String, - description: Swift.String? = nil, - permission: Swift.String, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, - html_url: Swift.String, - repositories_url: Swift.String, - slug: Swift.String, - ldap_dn: Swift.String? = nil - ) { - self.id = id - self.node_id = node_id - self.url = url - self.members_url = members_url - self.name = name - self.description = description - self.permission = permission - self.privacy = privacy - self.notification_setting = notification_setting - self.html_url = html_url - self.repositories_url = repositories_url - self.slug = slug - self.ldap_dn = ldap_dn - } - public enum CodingKeys: String, CodingKey { - case id - case node_id - case url - case members_url - case name - case description - case permission - case privacy - case notification_setting - case html_url - case repositories_url - case slug - case ldap_dn - } - } - /// Groups of organization members that gives permissions on specified repositories. - /// - /// - Remark: Generated from `#/components/schemas/team`. - public struct team: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/team/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/team/node_id`. - public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/team/name`. - public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/team/slug`. - public var slug: Swift.String - /// - Remark: Generated from `#/components/schemas/team/description`. - public var description: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/privacy`. - public var privacy: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/permission`. - public var permission: Swift.String - /// - Remark: Generated from `#/components/schemas/team/permissions`. - public struct permissionsPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/team/permissions/pull`. - public var pull: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/triage`. - public var triage: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/push`. - public var push: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/maintain`. - public var maintain: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/admin`. - public var admin: Swift.Bool - /// Creates a new `permissionsPayload`. - /// - /// - Parameters: - /// - pull: - /// - triage: - /// - push: - /// - maintain: - /// - admin: - public init( - pull: Swift.Bool, - triage: Swift.Bool, - push: Swift.Bool, - maintain: Swift.Bool, - admin: Swift.Bool - ) { - self.pull = pull - self.triage = triage - self.push = push - self.maintain = maintain - self.admin = admin - } - public enum CodingKeys: String, CodingKey { - case pull - case triage - case push - case maintain - case admin - } - } - /// - Remark: Generated from `#/components/schemas/team/permissions`. - public var permissions: Components.Schemas.team.permissionsPayload? - /// - Remark: Generated from `#/components/schemas/team/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/members_url`. - public var members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/parent`. - public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? - /// Creates a new `team`. - /// - /// - Parameters: - /// - id: - /// - node_id: - /// - name: - /// - slug: - /// - description: - /// - privacy: - /// - notification_setting: - /// - permission: - /// - permissions: - /// - url: - /// - html_url: - /// - members_url: - /// - repositories_url: - /// - parent: - public init( - id: Swift.Int, - node_id: Swift.String, - name: Swift.String, - slug: Swift.String, - description: Swift.String? = nil, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, - permission: Swift.String, - permissions: Components.Schemas.team.permissionsPayload? = nil, - url: Swift.String, - html_url: Swift.String, - members_url: Swift.String, - repositories_url: Swift.String, - parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil - ) { - self.id = id - self.node_id = node_id - self.name = name - self.slug = slug - self.description = description - self.privacy = privacy - self.notification_setting = notification_setting - self.permission = permission - self.permissions = permissions - self.url = url - self.html_url = html_url - self.members_url = members_url - self.repositories_url = repositories_url - self.parent = parent - } - public enum CodingKeys: String, CodingKey { - case id - case node_id - case name - case slug - case description - case privacy - case notification_setting - case permission - case permissions - case url - case html_url - case members_url - case repositories_url - case parent - } - } /// Organization Invitation /// /// - Remark: Generated from `#/components/schemas/organization-invitation`. From d0cf52c81f8fa793be83c125ca9db67e33d1cb63 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 24 Jun 2024 21:38:10 +0000 Subject: [PATCH 014/152] Commit via running ake Sources/users --- Sources/users/Client.swift | 136 ++++++++ Sources/users/Types.swift | 624 +++++++++++++++++++++++++++++++++++++ 2 files changed, 760 insertions(+) diff --git a/Sources/users/Client.swift b/Sources/users/Client.swift index acf0bec1ead..3694247dba4 100644 --- a/Sources/users/Client.swift +++ b/Sources/users/Client.swift @@ -4540,6 +4540,142 @@ public struct Client: APIProtocol { } ) } + /// List attestations + /// + /// List a collection of artifact attestations with a given subject digest that are associated with repositories owned by a user. + /// + /// The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required. + /// + /// **Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// + /// - Remark: HTTP `GET /users/{username}/attestations/{subject_digest}`. + /// - Remark: Generated from `#/paths//users/{username}/attestations/{subject_digest}/get(users/list-attestations)`. + public func users_sol_list_hyphen_attestations(_ input: Operations.users_sol_list_hyphen_attestations.Input) async throws -> Operations.users_sol_list_hyphen_attestations.Output { + try await client.send( + input: input, + forOperation: Operations.users_sol_list_hyphen_attestations.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/users/{}/attestations/{}", + parameters: [ + input.path.username, + input.path.subject_digest + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "per_page", + value: input.query.per_page + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "before", + value: input.query.before + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "after", + value: input.query.after + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.users_sol_list_hyphen_attestations.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Operations.users_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 201: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.users_sol_list_hyphen_attestations.Output.Created.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.empty_hyphen_object.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .created(.init(body: body)) + case 204: + return .noContent(.init()) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.not_found.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } /// List followers of a user /// /// Lists the people following the specified user. diff --git a/Sources/users/Types.swift b/Sources/users/Types.swift index cd172f78da8..8bb347d335a 100644 --- a/Sources/users/Types.swift +++ b/Sources/users/Types.swift @@ -285,6 +285,17 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `GET /users/{username}`. /// - Remark: Generated from `#/paths//users/{username}/get(users/get-by-username)`. func users_sol_get_hyphen_by_hyphen_username(_ input: Operations.users_sol_get_hyphen_by_hyphen_username.Input) async throws -> Operations.users_sol_get_hyphen_by_hyphen_username.Output + /// List attestations + /// + /// List a collection of artifact attestations with a given subject digest that are associated with repositories owned by a user. + /// + /// The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required. + /// + /// **Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// + /// - Remark: HTTP `GET /users/{username}/attestations/{subject_digest}`. + /// - Remark: Generated from `#/paths//users/{username}/attestations/{subject_digest}/get(users/list-attestations)`. + func users_sol_list_hyphen_attestations(_ input: Operations.users_sol_list_hyphen_attestations.Input) async throws -> Operations.users_sol_list_hyphen_attestations.Output /// List followers of a user /// /// Lists the people following the specified user. @@ -881,6 +892,27 @@ extension APIProtocol { headers: headers )) } + /// List attestations + /// + /// List a collection of artifact attestations with a given subject digest that are associated with repositories owned by a user. + /// + /// The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required. + /// + /// **Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// + /// - Remark: HTTP `GET /users/{username}/attestations/{subject_digest}`. + /// - Remark: Generated from `#/paths//users/{username}/attestations/{subject_digest}/get(users/list-attestations)`. + public func users_sol_list_hyphen_attestations( + path: Operations.users_sol_list_hyphen_attestations.Input.Path, + query: Operations.users_sol_list_hyphen_attestations.Input.Query = .init(), + headers: Operations.users_sol_list_hyphen_attestations.Input.Headers = .init() + ) async throws -> Operations.users_sol_list_hyphen_attestations.Output { + try await users_sol_list_hyphen_attestations(Operations.users_sol_list_hyphen_attestations.Input( + path: path, + query: query, + headers: headers + )) + } /// List followers of a user /// /// Lists the people following the specified user. @@ -1823,6 +1855,16 @@ public enum Components { ]) } } + /// An object without any properties. + /// + /// - Remark: Generated from `#/components/schemas/empty-object`. + public struct empty_hyphen_object: Codable, Hashable, Sendable { + /// Creates a new `empty_hyphen_object`. + public init() {} + public init(from decoder: any Decoder) throws { + try decoder.ensureNoAdditionalProperties(knownKeys: []) + } + } /// Private User /// /// - Remark: Generated from `#/components/schemas/private-user`. @@ -2533,6 +2575,260 @@ public enum Components { case created_at } } + /// Sigstore Bundle v0.1 + /// + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0`. + public struct sigstore_hyphen_bundle_hyphen_0: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/mediaType`. + public var mediaType: Swift.String? + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial`. + public struct verificationMaterialPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/x509CertificateChain`. + public struct x509CertificateChainPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/x509CertificateChain/certificatesPayload`. + public struct certificatesPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/x509CertificateChain/certificatesPayload/rawBytes`. + public var rawBytes: Swift.String? + /// Creates a new `certificatesPayloadPayload`. + /// + /// - Parameters: + /// - rawBytes: + public init(rawBytes: Swift.String? = nil) { + self.rawBytes = rawBytes + } + public enum CodingKeys: String, CodingKey { + case rawBytes + } + } + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/x509CertificateChain/certificates`. + public typealias certificatesPayload = [Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload.x509CertificateChainPayload.certificatesPayloadPayload] + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/x509CertificateChain/certificates`. + public var certificates: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload.x509CertificateChainPayload.certificatesPayload? + /// Creates a new `x509CertificateChainPayload`. + /// + /// - Parameters: + /// - certificates: + public init(certificates: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload.x509CertificateChainPayload.certificatesPayload? = nil) { + self.certificates = certificates + } + public enum CodingKeys: String, CodingKey { + case certificates + } + } + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/x509CertificateChain`. + public var x509CertificateChain: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload.x509CertificateChainPayload? + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload`. + public struct tlogEntriesPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload/logIndex`. + public var logIndex: Swift.String? + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload/logId`. + public struct logIdPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload/logId/keyId`. + public var keyId: Swift.String? + /// Creates a new `logIdPayload`. + /// + /// - Parameters: + /// - keyId: + public init(keyId: Swift.String? = nil) { + self.keyId = keyId + } + public enum CodingKeys: String, CodingKey { + case keyId + } + } + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload/logId`. + public var logId: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload.tlogEntriesPayloadPayload.logIdPayload? + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload/kindVersion`. + public struct kindVersionPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload/kindVersion/kind`. + public var kind: Swift.String? + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload/kindVersion/version`. + public var version: Swift.String? + /// Creates a new `kindVersionPayload`. + /// + /// - Parameters: + /// - kind: + /// - version: + public init( + kind: Swift.String? = nil, + version: Swift.String? = nil + ) { + self.kind = kind + self.version = version + } + public enum CodingKeys: String, CodingKey { + case kind + case version + } + } + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload/kindVersion`. + public var kindVersion: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload.tlogEntriesPayloadPayload.kindVersionPayload? + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload/integratedTime`. + public var integratedTime: Swift.String? + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload/inclusionPromise`. + public struct inclusionPromisePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload/inclusionPromise/signedEntryTimestamp`. + public var signedEntryTimestamp: Swift.String? + /// Creates a new `inclusionPromisePayload`. + /// + /// - Parameters: + /// - signedEntryTimestamp: + public init(signedEntryTimestamp: Swift.String? = nil) { + self.signedEntryTimestamp = signedEntryTimestamp + } + public enum CodingKeys: String, CodingKey { + case signedEntryTimestamp + } + } + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload/inclusionPromise`. + public var inclusionPromise: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload.tlogEntriesPayloadPayload.inclusionPromisePayload? + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload/inclusionProof`. + public var inclusionProof: Swift.String? + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntriesPayload/canonicalizedBody`. + public var canonicalizedBody: Swift.String? + /// Creates a new `tlogEntriesPayloadPayload`. + /// + /// - Parameters: + /// - logIndex: + /// - logId: + /// - kindVersion: + /// - integratedTime: + /// - inclusionPromise: + /// - inclusionProof: + /// - canonicalizedBody: + public init( + logIndex: Swift.String? = nil, + logId: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload.tlogEntriesPayloadPayload.logIdPayload? = nil, + kindVersion: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload.tlogEntriesPayloadPayload.kindVersionPayload? = nil, + integratedTime: Swift.String? = nil, + inclusionPromise: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload.tlogEntriesPayloadPayload.inclusionPromisePayload? = nil, + inclusionProof: Swift.String? = nil, + canonicalizedBody: Swift.String? = nil + ) { + self.logIndex = logIndex + self.logId = logId + self.kindVersion = kindVersion + self.integratedTime = integratedTime + self.inclusionPromise = inclusionPromise + self.inclusionProof = inclusionProof + self.canonicalizedBody = canonicalizedBody + } + public enum CodingKeys: String, CodingKey { + case logIndex + case logId + case kindVersion + case integratedTime + case inclusionPromise + case inclusionProof + case canonicalizedBody + } + } + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntries`. + public typealias tlogEntriesPayload = [Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload.tlogEntriesPayloadPayload] + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/tlogEntries`. + public var tlogEntries: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload.tlogEntriesPayload? + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial/timestampVerificationData`. + public var timestampVerificationData: Swift.String? + /// Creates a new `verificationMaterialPayload`. + /// + /// - Parameters: + /// - x509CertificateChain: + /// - tlogEntries: + /// - timestampVerificationData: + public init( + x509CertificateChain: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload.x509CertificateChainPayload? = nil, + tlogEntries: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload.tlogEntriesPayload? = nil, + timestampVerificationData: Swift.String? = nil + ) { + self.x509CertificateChain = x509CertificateChain + self.tlogEntries = tlogEntries + self.timestampVerificationData = timestampVerificationData + } + public enum CodingKeys: String, CodingKey { + case x509CertificateChain + case tlogEntries + case timestampVerificationData + } + } + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/verificationMaterial`. + public var verificationMaterial: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload? + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/dsseEnvelope`. + public struct dsseEnvelopePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/dsseEnvelope/payload`. + public var payload: Swift.String? + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/dsseEnvelope/payloadType`. + public var payloadType: Swift.String? + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/dsseEnvelope/signaturesPayload`. + public struct signaturesPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/dsseEnvelope/signaturesPayload/sig`. + public var sig: Swift.String? + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/dsseEnvelope/signaturesPayload/keyid`. + public var keyid: Swift.String? + /// Creates a new `signaturesPayloadPayload`. + /// + /// - Parameters: + /// - sig: + /// - keyid: + public init( + sig: Swift.String? = nil, + keyid: Swift.String? = nil + ) { + self.sig = sig + self.keyid = keyid + } + public enum CodingKeys: String, CodingKey { + case sig + case keyid + } + } + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/dsseEnvelope/signatures`. + public typealias signaturesPayload = [Components.Schemas.sigstore_hyphen_bundle_hyphen_0.dsseEnvelopePayload.signaturesPayloadPayload] + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/dsseEnvelope/signatures`. + public var signatures: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.dsseEnvelopePayload.signaturesPayload? + /// Creates a new `dsseEnvelopePayload`. + /// + /// - Parameters: + /// - payload: + /// - payloadType: + /// - signatures: + public init( + payload: Swift.String? = nil, + payloadType: Swift.String? = nil, + signatures: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.dsseEnvelopePayload.signaturesPayload? = nil + ) { + self.payload = payload + self.payloadType = payloadType + self.signatures = signatures + } + public enum CodingKeys: String, CodingKey { + case payload + case payloadType + case signatures + } + } + /// - Remark: Generated from `#/components/schemas/sigstore-bundle-0/dsseEnvelope`. + public var dsseEnvelope: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.dsseEnvelopePayload? + /// Creates a new `sigstore_hyphen_bundle_hyphen_0`. + /// + /// - Parameters: + /// - mediaType: + /// - verificationMaterial: + /// - dsseEnvelope: + public init( + mediaType: Swift.String? = nil, + verificationMaterial: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.verificationMaterialPayload? = nil, + dsseEnvelope: Components.Schemas.sigstore_hyphen_bundle_hyphen_0.dsseEnvelopePayload? = nil + ) { + self.mediaType = mediaType + self.verificationMaterial = verificationMaterial + self.dsseEnvelope = dsseEnvelope + } + public enum CodingKeys: String, CodingKey { + case mediaType + case verificationMaterial + case dsseEnvelope + } + } /// Hovercard /// /// - Remark: Generated from `#/components/schemas/hovercard`. @@ -2603,6 +2899,14 @@ public enum Components { } /// Types generated from the `#/components/parameters` section of the OpenAPI document. public enum Parameters { + /// A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// + /// - Remark: Generated from `#/components/parameters/pagination-before`. + public typealias pagination_hyphen_before = Swift.String + /// A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// + /// - Remark: Generated from `#/components/parameters/pagination-after`. + public typealias pagination_hyphen_after = Swift.String /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." /// /// - Remark: Generated from `#/components/parameters/per-page`. @@ -10607,6 +10911,326 @@ public enum Operations { } } } + /// List attestations + /// + /// List a collection of artifact attestations with a given subject digest that are associated with repositories owned by a user. + /// + /// The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required. + /// + /// **Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// + /// - Remark: HTTP `GET /users/{username}/attestations/{subject_digest}`. + /// - Remark: Generated from `#/paths//users/{username}/attestations/{subject_digest}/get(users/list-attestations)`. + public enum users_sol_list_hyphen_attestations { + public static let id: Swift.String = "users/list-attestations" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/path`. + public struct Path: Sendable, Hashable { + /// The handle for the GitHub user account. + /// + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/path/username`. + public var username: Components.Parameters.username + /// Subject Digest + /// + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/path/subject_digest`. + public var subject_digest: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - username: The handle for the GitHub user account. + /// - subject_digest: Subject Digest + public init( + username: Components.Parameters.username, + subject_digest: Swift.String + ) { + self.username = username + self.subject_digest = subject_digest + } + } + public var path: Operations.users_sol_list_hyphen_attestations.Input.Path + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/query`. + public struct Query: Sendable, Hashable { + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/query/per_page`. + public var per_page: Components.Parameters.per_hyphen_page? + /// A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/query/before`. + public var before: Components.Parameters.pagination_hyphen_before? + /// A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/query/after`. + public var after: Components.Parameters.pagination_hyphen_after? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - per_page: The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// - before: A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// - after: A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + public init( + per_page: Components.Parameters.per_hyphen_page? = nil, + before: Components.Parameters.pagination_hyphen_before? = nil, + after: Components.Parameters.pagination_hyphen_after? = nil + ) { + self.per_page = per_page + self.before = before + self.after = after + } + } + public var query: Operations.users_sol_list_hyphen_attestations.Input.Query + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.users_sol_list_hyphen_attestations.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.users_sol_list_hyphen_attestations.Input.Path, + query: Operations.users_sol_list_hyphen_attestations.Input.Query = .init(), + headers: Operations.users_sol_list_hyphen_attestations.Input.Headers = .init() + ) { + self.path = path + self.query = query + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/responses/200/content/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload`. + public struct attestationsPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/bundle`. + public var bundle: Components.Schemas.sigstore_hyphen_bundle_hyphen_0? + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/responses/200/content/json/attestationsPayload/repository_id`. + public var repository_id: Swift.Int? + /// Creates a new `attestationsPayloadPayload`. + /// + /// - Parameters: + /// - bundle: + /// - repository_id: + public init( + bundle: Components.Schemas.sigstore_hyphen_bundle_hyphen_0? = nil, + repository_id: Swift.Int? = nil + ) { + self.bundle = bundle + self.repository_id = repository_id + } + public enum CodingKeys: String, CodingKey { + case bundle + case repository_id + } + } + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/responses/200/content/json/attestations`. + public typealias attestationsPayload = [Operations.users_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayloadPayload] + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/responses/200/content/json/attestations`. + public var attestations: Operations.users_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayload? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - attestations: + public init(attestations: Operations.users_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload.attestationsPayload? = nil) { + self.attestations = attestations + } + public enum CodingKeys: String, CodingKey { + case attestations + } + } + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/responses/200/content/application\/json`. + case json(Operations.users_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Operations.users_sol_list_hyphen_attestations.Output.Ok.Body.jsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.users_sol_list_hyphen_attestations.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.users_sol_list_hyphen_attestations.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//users/{username}/attestations/{subject_digest}/get(users/list-attestations)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.users_sol_list_hyphen_attestations.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.users_sol_list_hyphen_attestations.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + public struct Created: Sendable, Hashable { + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/responses/201/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/responses/201/content/application\/json`. + case json(Components.Schemas.empty_hyphen_object) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.empty_hyphen_object { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.users_sol_list_hyphen_attestations.Output.Created.Body + /// Creates a new `Created`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.users_sol_list_hyphen_attestations.Output.Created.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//users/{username}/attestations/{subject_digest}/get(users/list-attestations)/responses/201`. + /// + /// HTTP response code: `201 created`. + case created(Operations.users_sol_list_hyphen_attestations.Output.Created) + /// The associated value of the enum case if `self` is `.created`. + /// + /// - Throws: An error if `self` is not `.created`. + /// - SeeAlso: `.created`. + public var created: Operations.users_sol_list_hyphen_attestations.Output.Created { + get throws { + switch self { + case let .created(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "created", + response: self + ) + } + } + } + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} + } + /// Response + /// + /// - Remark: Generated from `#/paths//users/{username}/attestations/{subject_digest}/get(users/list-attestations)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Operations.users_sol_list_hyphen_attestations.Output.NoContent) + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.users_sol_list_hyphen_attestations.Output.NoContent { + get throws { + switch self { + case let .noContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "noContent", + response: self + ) + } + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//users/{username}/attestations/{subject_digest}/get(users/list-attestations)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Components.Responses.not_found) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } /// List followers of a user /// /// Lists the people following the specified user. From 5996f74333724bbb55cb0139d436cf3a7037da75 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 24 Jun 2024 21:38:52 +0000 Subject: [PATCH 015/152] Commit via running ake Sources/copilot --- Sources/copilot/Client.swift | 184 +++ Sources/copilot/Types.swift | 3011 +++++++++++++++++++--------------- 2 files changed, 1864 insertions(+), 1331 deletions(-) diff --git a/Sources/copilot/Client.swift b/Sources/copilot/Client.swift index 455631abe52..31653a9d1f6 100644 --- a/Sources/copilot/Client.swift +++ b/Sources/copilot/Client.swift @@ -38,6 +38,190 @@ public struct Client: APIProtocol { private var converter: Converter { client.converter } + /// List all Copilot seat assignments for an enterprise + /// + /// **Note**: This endpoint is in beta and is subject to change. + /// + /// Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription. + /// + /// Users with access through multiple organizations or enterprise teams will only be counted toward `total_seats` once. + /// + /// For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the `seats` array. + /// + /// Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams. + /// + /// Personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /enterprises/{enterprise}/copilot/billing/seats`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/billing/seats/get(copilot/list-copilot-seats-for-enterprise)`. + public func copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise(_ input: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Input) async throws -> Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output { + try await client.send( + input: input, + forOperation: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/enterprises/{}/copilot/billing/seats", + parameters: [ + input.path.enterprise + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "page", + value: input.query.page + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "per_page", + value: input.query.per_page + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let headers: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output.Ok.Headers = .init(Link: try converter.getOptionalHeaderFieldAsURI( + in: response.headerFields, + name: "Link", + as: Components.Headers.link.self + )) + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output.Ok.Body.jsonPayload.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init( + headers: headers, + body: body + )) + case 500: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.internal_error.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .internalServerError(.init(body: body)) + case 401: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.requires_authentication.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unauthorized(.init(body: body)) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.forbidden.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.not_found.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } /// Get a summary of Copilot usage for enterprise members /// /// **Note**: This endpoint is in beta and is subject to change. diff --git a/Sources/copilot/Types.swift b/Sources/copilot/Types.swift index 74f586c6f5f..87eb665ed7c 100644 --- a/Sources/copilot/Types.swift +++ b/Sources/copilot/Types.swift @@ -11,6 +11,23 @@ import struct Foundation.Date #endif /// A type that performs HTTP operations defined by the OpenAPI document. public protocol APIProtocol: Sendable { + /// List all Copilot seat assignments for an enterprise + /// + /// **Note**: This endpoint is in beta and is subject to change. + /// + /// Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription. + /// + /// Users with access through multiple organizations or enterprise teams will only be counted toward `total_seats` once. + /// + /// For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the `seats` array. + /// + /// Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams. + /// + /// Personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /enterprises/{enterprise}/copilot/billing/seats`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/billing/seats/get(copilot/list-copilot-seats-for-enterprise)`. + func copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise(_ input: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Input) async throws -> Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output /// Get a summary of Copilot usage for enterprise members /// /// **Note**: This endpoint is in beta and is subject to change. @@ -165,6 +182,33 @@ public protocol APIProtocol: Sendable { /// Convenience overloads for operation inputs. extension APIProtocol { + /// List all Copilot seat assignments for an enterprise + /// + /// **Note**: This endpoint is in beta and is subject to change. + /// + /// Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription. + /// + /// Users with access through multiple organizations or enterprise teams will only be counted toward `total_seats` once. + /// + /// For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the `seats` array. + /// + /// Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams. + /// + /// Personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /enterprises/{enterprise}/copilot/billing/seats`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/billing/seats/get(copilot/list-copilot-seats-for-enterprise)`. + public func copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise( + path: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Input.Path, + query: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Input.Query = .init(), + headers: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Input.Headers = .init() + ) async throws -> Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output { + try await copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise(Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Input( + path: path, + query: query, + headers: headers + )) + } /// Get a summary of Copilot usage for enterprise members /// /// **Note**: This endpoint is in beta and is subject to change. @@ -593,365 +637,439 @@ public enum Components { case status } } - /// Summary of Copilot usage. + /// Groups of organization members that gives permissions on specified repositories. /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics`. - public struct copilot_hyphen_usage_hyphen_metrics: Codable, Hashable, Sendable { - /// The date for which the usage metrics are reported, in `YYYY-MM-DD` format. - /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/day`. - public var day: Swift.String - /// The total number of Copilot code completion suggestions shown to users. + /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. + public struct nullable_hyphen_team_hyphen_simple: Codable, Hashable, Sendable { + /// Unique identifier of the team /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_suggestions_count`. - public var total_suggestions_count: Swift.Int? - /// The total number of Copilot code completion suggestions accepted by users. + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/node_id`. + public var node_id: Swift.String + /// URL for the team /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_acceptances_count`. - public var total_acceptances_count: Swift.Int? - /// The total number of lines of code completions suggested by Copilot. + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/members_url`. + public var members_url: Swift.String + /// Name of the team /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_lines_suggested`. - public var total_lines_suggested: Swift.Int? - /// The total number of lines of code completions accepted by users. + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/name`. + public var name: Swift.String + /// Description of the team /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_lines_accepted`. - public var total_lines_accepted: Swift.Int? - /// The total number of users who were shown Copilot code completion suggestions during the day specified. + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/description`. + public var description: Swift.String? + /// Permission that the team will have for its repositories /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_active_users`. - public var total_active_users: Swift.Int? - /// The total instances of users who accepted code suggested by Copilot Chat in the IDE (panel and inline). + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/permission`. + public var permission: Swift.String + /// The level of privacy this team should have /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_chat_acceptances`. - public var total_chat_acceptances: Swift.Int? - /// The total number of chat turns (prompt and response pairs) sent between users and Copilot Chat in the IDE. + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/privacy`. + public var privacy: Swift.String? + /// The notification setting the team has set /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_chat_turns`. - public var total_chat_turns: Swift.Int? - /// The total number of users who interacted with Copilot Chat in the IDE during the day specified. + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/slug`. + public var slug: Swift.String + /// Distinguished Name (DN) that team maps to within LDAP environment /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_active_chat_users`. - public var total_active_chat_users: Swift.Int? - /// Breakdown of Copilot usage by editor for this language + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/ldap_dn`. + public var ldap_dn: Swift.String? + /// Creates a new `nullable_hyphen_team_hyphen_simple`. /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload`. - public struct breakdownPayloadPayload: Codable, Hashable, Sendable { - /// The language in which Copilot suggestions were shown to users in the specified editor. - /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload/language`. - public var language: Swift.String? - /// The editor in which Copilot suggestions were shown to users for the specified language. - /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload/editor`. - public var editor: Swift.String? - /// The number of Copilot suggestions shown to users in the editor specified during the day specified. - /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload/suggestions_count`. - public var suggestions_count: Swift.Int? - /// The number of Copilot suggestions accepted by users in the editor specified during the day specified. - /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload/acceptances_count`. - public var acceptances_count: Swift.Int? - /// The number of lines of code suggested by Copilot in the editor specified during the day specified. - /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload/lines_suggested`. - public var lines_suggested: Swift.Int? - /// The number of lines of code accepted by users in the editor specified during the day specified. - /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload/lines_accepted`. - public var lines_accepted: Swift.Int? - /// The number of users who were shown Copilot completion suggestions in the editor specified during the day specified. - /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload/active_users`. - public var active_users: Swift.Int? - /// A container of undocumented properties. - public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer - /// Creates a new `breakdownPayloadPayload`. + /// - Parameters: + /// - id: Unique identifier of the team + /// - node_id: + /// - url: URL for the team + /// - members_url: + /// - name: Name of the team + /// - description: Description of the team + /// - permission: Permission that the team will have for its repositories + /// - privacy: The level of privacy this team should have + /// - notification_setting: The notification setting the team has set + /// - html_url: + /// - repositories_url: + /// - slug: + /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment + public init( + id: Swift.Int, + node_id: Swift.String, + url: Swift.String, + members_url: Swift.String, + name: Swift.String, + description: Swift.String? = nil, + permission: Swift.String, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + html_url: Swift.String, + repositories_url: Swift.String, + slug: Swift.String, + ldap_dn: Swift.String? = nil + ) { + self.id = id + self.node_id = node_id + self.url = url + self.members_url = members_url + self.name = name + self.description = description + self.permission = permission + self.privacy = privacy + self.notification_setting = notification_setting + self.html_url = html_url + self.repositories_url = repositories_url + self.slug = slug + self.ldap_dn = ldap_dn + } + public enum CodingKeys: String, CodingKey { + case id + case node_id + case url + case members_url + case name + case description + case permission + case privacy + case notification_setting + case html_url + case repositories_url + case slug + case ldap_dn + } + } + /// Groups of organization members that gives permissions on specified repositories. + /// + /// - Remark: Generated from `#/components/schemas/team`. + public struct team: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/team/node_id`. + public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/team/name`. + public var name: Swift.String + /// - Remark: Generated from `#/components/schemas/team/slug`. + public var slug: Swift.String + /// - Remark: Generated from `#/components/schemas/team/description`. + public var description: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/privacy`. + public var privacy: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/permission`. + public var permission: Swift.String + /// - Remark: Generated from `#/components/schemas/team/permissions`. + public struct permissionsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team/permissions/pull`. + public var pull: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/triage`. + public var triage: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/push`. + public var push: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/maintain`. + public var maintain: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/admin`. + public var admin: Swift.Bool + /// Creates a new `permissionsPayload`. /// /// - Parameters: - /// - language: The language in which Copilot suggestions were shown to users in the specified editor. - /// - editor: The editor in which Copilot suggestions were shown to users for the specified language. - /// - suggestions_count: The number of Copilot suggestions shown to users in the editor specified during the day specified. - /// - acceptances_count: The number of Copilot suggestions accepted by users in the editor specified during the day specified. - /// - lines_suggested: The number of lines of code suggested by Copilot in the editor specified during the day specified. - /// - lines_accepted: The number of lines of code accepted by users in the editor specified during the day specified. - /// - active_users: The number of users who were shown Copilot completion suggestions in the editor specified during the day specified. - /// - additionalProperties: A container of undocumented properties. + /// - pull: + /// - triage: + /// - push: + /// - maintain: + /// - admin: public init( - language: Swift.String? = nil, - editor: Swift.String? = nil, - suggestions_count: Swift.Int? = nil, - acceptances_count: Swift.Int? = nil, - lines_suggested: Swift.Int? = nil, - lines_accepted: Swift.Int? = nil, - active_users: Swift.Int? = nil, - additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init() + pull: Swift.Bool, + triage: Swift.Bool, + push: Swift.Bool, + maintain: Swift.Bool, + admin: Swift.Bool ) { - self.language = language - self.editor = editor - self.suggestions_count = suggestions_count - self.acceptances_count = acceptances_count - self.lines_suggested = lines_suggested - self.lines_accepted = lines_accepted - self.active_users = active_users - self.additionalProperties = additionalProperties + self.pull = pull + self.triage = triage + self.push = push + self.maintain = maintain + self.admin = admin } public enum CodingKeys: String, CodingKey { - case language - case editor - case suggestions_count - case acceptances_count - case lines_suggested - case lines_accepted - case active_users - } - public init(from decoder: any Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - language = try container.decodeIfPresent( - Swift.String.self, - forKey: .language - ) - editor = try container.decodeIfPresent( - Swift.String.self, - forKey: .editor - ) - suggestions_count = try container.decodeIfPresent( - Swift.Int.self, - forKey: .suggestions_count - ) - acceptances_count = try container.decodeIfPresent( - Swift.Int.self, - forKey: .acceptances_count - ) - lines_suggested = try container.decodeIfPresent( - Swift.Int.self, - forKey: .lines_suggested - ) - lines_accepted = try container.decodeIfPresent( - Swift.Int.self, - forKey: .lines_accepted - ) - active_users = try container.decodeIfPresent( - Swift.Int.self, - forKey: .active_users - ) - additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: [ - "language", - "editor", - "suggestions_count", - "acceptances_count", - "lines_suggested", - "lines_accepted", - "active_users" - ]) - } - public func encode(to encoder: any Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent( - language, - forKey: .language - ) - try container.encodeIfPresent( - editor, - forKey: .editor - ) - try container.encodeIfPresent( - suggestions_count, - forKey: .suggestions_count - ) - try container.encodeIfPresent( - acceptances_count, - forKey: .acceptances_count - ) - try container.encodeIfPresent( - lines_suggested, - forKey: .lines_suggested - ) - try container.encodeIfPresent( - lines_accepted, - forKey: .lines_accepted - ) - try container.encodeIfPresent( - active_users, - forKey: .active_users - ) - try encoder.encodeAdditionalProperties(additionalProperties) + case pull + case triage + case push + case maintain + case admin } } - /// Breakdown of Copilot code completions usage by language and editor - /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdown`. - public typealias breakdownPayload = [Components.Schemas.copilot_hyphen_usage_hyphen_metrics.breakdownPayloadPayload] - /// Breakdown of Copilot code completions usage by language and editor - /// - /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdown`. - public var breakdown: Components.Schemas.copilot_hyphen_usage_hyphen_metrics.breakdownPayload? - /// Creates a new `copilot_hyphen_usage_hyphen_metrics`. - /// - /// - Parameters: - /// - day: The date for which the usage metrics are reported, in `YYYY-MM-DD` format. - /// - total_suggestions_count: The total number of Copilot code completion suggestions shown to users. - /// - total_acceptances_count: The total number of Copilot code completion suggestions accepted by users. - /// - total_lines_suggested: The total number of lines of code completions suggested by Copilot. - /// - total_lines_accepted: The total number of lines of code completions accepted by users. - /// - total_active_users: The total number of users who were shown Copilot code completion suggestions during the day specified. - /// - total_chat_acceptances: The total instances of users who accepted code suggested by Copilot Chat in the IDE (panel and inline). - /// - total_chat_turns: The total number of chat turns (prompt and response pairs) sent between users and Copilot Chat in the IDE. - /// - total_active_chat_users: The total number of users who interacted with Copilot Chat in the IDE during the day specified. - /// - breakdown: Breakdown of Copilot code completions usage by language and editor - public init( - day: Swift.String, - total_suggestions_count: Swift.Int? = nil, - total_acceptances_count: Swift.Int? = nil, - total_lines_suggested: Swift.Int? = nil, - total_lines_accepted: Swift.Int? = nil, - total_active_users: Swift.Int? = nil, - total_chat_acceptances: Swift.Int? = nil, - total_chat_turns: Swift.Int? = nil, - total_active_chat_users: Swift.Int? = nil, - breakdown: Components.Schemas.copilot_hyphen_usage_hyphen_metrics.breakdownPayload? = nil - ) { - self.day = day - self.total_suggestions_count = total_suggestions_count - self.total_acceptances_count = total_acceptances_count - self.total_lines_suggested = total_lines_suggested - self.total_lines_accepted = total_lines_accepted - self.total_active_users = total_active_users - self.total_chat_acceptances = total_chat_acceptances - self.total_chat_turns = total_chat_turns - self.total_active_chat_users = total_active_chat_users - self.breakdown = breakdown - } - public enum CodingKeys: String, CodingKey { - case day - case total_suggestions_count - case total_acceptances_count - case total_lines_suggested - case total_lines_accepted - case total_active_users - case total_chat_acceptances - case total_chat_turns - case total_active_chat_users - case breakdown - } - public init(from decoder: any Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - day = try container.decode( - Swift.String.self, - forKey: .day - ) - total_suggestions_count = try container.decodeIfPresent( - Swift.Int.self, - forKey: .total_suggestions_count - ) - total_acceptances_count = try container.decodeIfPresent( - Swift.Int.self, - forKey: .total_acceptances_count - ) - total_lines_suggested = try container.decodeIfPresent( - Swift.Int.self, - forKey: .total_lines_suggested - ) - total_lines_accepted = try container.decodeIfPresent( - Swift.Int.self, - forKey: .total_lines_accepted - ) - total_active_users = try container.decodeIfPresent( - Swift.Int.self, - forKey: .total_active_users - ) - total_chat_acceptances = try container.decodeIfPresent( - Swift.Int.self, - forKey: .total_chat_acceptances - ) - total_chat_turns = try container.decodeIfPresent( - Swift.Int.self, - forKey: .total_chat_turns - ) - total_active_chat_users = try container.decodeIfPresent( - Swift.Int.self, - forKey: .total_active_chat_users - ) - breakdown = try container.decodeIfPresent( - Components.Schemas.copilot_hyphen_usage_hyphen_metrics.breakdownPayload.self, - forKey: .breakdown - ) - try decoder.ensureNoAdditionalProperties(knownKeys: [ - "day", - "total_suggestions_count", - "total_acceptances_count", - "total_lines_suggested", - "total_lines_accepted", - "total_active_users", - "total_chat_acceptances", - "total_chat_turns", - "total_active_chat_users", - "breakdown" - ]) - } - } - /// A GitHub organization. - /// - /// - Remark: Generated from `#/components/schemas/organization-simple`. - public struct organization_hyphen_simple: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/organization-simple/login`. - public var login: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization-simple/node_id`. - public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/url`. + /// - Remark: Generated from `#/components/schemas/team/permissions`. + public var permissions: Components.Schemas.team.permissionsPayload? + /// - Remark: Generated from `#/components/schemas/team/url`. public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/repos_url`. - public var repos_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/events_url`. - public var events_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/hooks_url`. - public var hooks_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/issues_url`. - public var issues_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/members_url`. + /// - Remark: Generated from `#/components/schemas/team/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/members_url`. public var members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/public_members_url`. - public var public_members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/avatar_url`. - public var avatar_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/description`. - public var description: Swift.String? - /// Creates a new `organization_hyphen_simple`. + /// - Remark: Generated from `#/components/schemas/team/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/parent`. + public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? + /// Creates a new `team`. /// /// - Parameters: - /// - login: /// - id: /// - node_id: + /// - name: + /// - slug: + /// - description: + /// - privacy: + /// - notification_setting: + /// - permission: + /// - permissions: /// - url: - /// - repos_url: - /// - events_url: - /// - hooks_url: - /// - issues_url: + /// - html_url: /// - members_url: - /// - public_members_url: - /// - avatar_url: - /// - description: + /// - repositories_url: + /// - parent: public init( - login: Swift.String, id: Swift.Int, node_id: Swift.String, - url: Swift.String, - repos_url: Swift.String, - events_url: Swift.String, - hooks_url: Swift.String, + name: Swift.String, + slug: Swift.String, + description: Swift.String? = nil, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + permission: Swift.String, + permissions: Components.Schemas.team.permissionsPayload? = nil, + url: Swift.String, + html_url: Swift.String, + members_url: Swift.String, + repositories_url: Swift.String, + parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil + ) { + self.id = id + self.node_id = node_id + self.name = name + self.slug = slug + self.description = description + self.privacy = privacy + self.notification_setting = notification_setting + self.permission = permission + self.permissions = permissions + self.url = url + self.html_url = html_url + self.members_url = members_url + self.repositories_url = repositories_url + self.parent = parent + } + public enum CodingKeys: String, CodingKey { + case id + case node_id + case name + case slug + case description + case privacy + case notification_setting + case permission + case permissions + case url + case html_url + case members_url + case repositories_url + case parent + } + } + /// GitHub account for managing multiple users, teams, and repositories + /// + /// - Remark: Generated from `#/components/schemas/organization`. + public struct organization: Codable, Hashable, Sendable { + /// Unique login name of the organization + /// + /// - Remark: Generated from `#/components/schemas/organization/login`. + public var login: Swift.String + /// URL for the organization + /// + /// - Remark: Generated from `#/components/schemas/organization/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/organization/node_id`. + public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/organization/repos_url`. + public var repos_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization/events_url`. + public var events_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization/hooks_url`. + public var hooks_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization/issues_url`. + public var issues_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization/members_url`. + public var members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization/public_members_url`. + public var public_members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization/avatar_url`. + public var avatar_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization/description`. + public var description: Swift.String? + /// Display blog url for the organization + /// + /// - Remark: Generated from `#/components/schemas/organization/blog`. + public var blog: Swift.String? + /// - Remark: Generated from `#/components/schemas/organization/html_url`. + public var html_url: Swift.String + /// Display name for the organization + /// + /// - Remark: Generated from `#/components/schemas/organization/name`. + public var name: Swift.String? + /// Display company name for the organization + /// + /// - Remark: Generated from `#/components/schemas/organization/company`. + public var company: Swift.String? + /// Display location for the organization + /// + /// - Remark: Generated from `#/components/schemas/organization/location`. + public var location: Swift.String? + /// Display email for the organization + /// + /// - Remark: Generated from `#/components/schemas/organization/email`. + public var email: Swift.String? + /// Specifies if organization projects are enabled for this org + /// + /// - Remark: Generated from `#/components/schemas/organization/has_organization_projects`. + public var has_organization_projects: Swift.Bool + /// Specifies if repository projects are enabled for repositories that belong to this org + /// + /// - Remark: Generated from `#/components/schemas/organization/has_repository_projects`. + public var has_repository_projects: Swift.Bool + /// - Remark: Generated from `#/components/schemas/organization/is_verified`. + public var is_verified: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/organization/public_repos`. + public var public_repos: Swift.Int + /// - Remark: Generated from `#/components/schemas/organization/public_gists`. + public var public_gists: Swift.Int + /// - Remark: Generated from `#/components/schemas/organization/followers`. + public var followers: Swift.Int + /// - Remark: Generated from `#/components/schemas/organization/following`. + public var following: Swift.Int + /// - Remark: Generated from `#/components/schemas/organization/type`. + public var _type: Swift.String + /// - Remark: Generated from `#/components/schemas/organization/created_at`. + public var created_at: Foundation.Date + /// - Remark: Generated from `#/components/schemas/organization/updated_at`. + public var updated_at: Foundation.Date + /// - Remark: Generated from `#/components/schemas/organization/plan`. + public struct planPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/organization/plan/name`. + public var name: Swift.String? + /// - Remark: Generated from `#/components/schemas/organization/plan/space`. + public var space: Swift.Int? + /// - Remark: Generated from `#/components/schemas/organization/plan/private_repos`. + public var private_repos: Swift.Int? + /// - Remark: Generated from `#/components/schemas/organization/plan/filled_seats`. + public var filled_seats: Swift.Int? + /// - Remark: Generated from `#/components/schemas/organization/plan/seats`. + public var seats: Swift.Int? + /// Creates a new `planPayload`. + /// + /// - Parameters: + /// - name: + /// - space: + /// - private_repos: + /// - filled_seats: + /// - seats: + public init( + name: Swift.String? = nil, + space: Swift.Int? = nil, + private_repos: Swift.Int? = nil, + filled_seats: Swift.Int? = nil, + seats: Swift.Int? = nil + ) { + self.name = name + self.space = space + self.private_repos = private_repos + self.filled_seats = filled_seats + self.seats = seats + } + public enum CodingKeys: String, CodingKey { + case name + case space + case private_repos + case filled_seats + case seats + } + } + /// - Remark: Generated from `#/components/schemas/organization/plan`. + public var plan: Components.Schemas.organization.planPayload? + /// Creates a new `organization`. + /// + /// - Parameters: + /// - login: Unique login name of the organization + /// - url: URL for the organization + /// - id: + /// - node_id: + /// - repos_url: + /// - events_url: + /// - hooks_url: + /// - issues_url: + /// - members_url: + /// - public_members_url: + /// - avatar_url: + /// - description: + /// - blog: Display blog url for the organization + /// - html_url: + /// - name: Display name for the organization + /// - company: Display company name for the organization + /// - location: Display location for the organization + /// - email: Display email for the organization + /// - has_organization_projects: Specifies if organization projects are enabled for this org + /// - has_repository_projects: Specifies if repository projects are enabled for repositories that belong to this org + /// - is_verified: + /// - public_repos: + /// - public_gists: + /// - followers: + /// - following: + /// - _type: + /// - created_at: + /// - updated_at: + /// - plan: + public init( + login: Swift.String, + url: Swift.String, + id: Swift.Int, + node_id: Swift.String, + repos_url: Swift.String, + events_url: Swift.String, + hooks_url: Swift.String, issues_url: Swift.String, members_url: Swift.String, public_members_url: Swift.String, avatar_url: Swift.String, - description: Swift.String? = nil + description: Swift.String? = nil, + blog: Swift.String? = nil, + html_url: Swift.String, + name: Swift.String? = nil, + company: Swift.String? = nil, + location: Swift.String? = nil, + email: Swift.String? = nil, + has_organization_projects: Swift.Bool, + has_repository_projects: Swift.Bool, + is_verified: Swift.Bool? = nil, + public_repos: Swift.Int, + public_gists: Swift.Int, + followers: Swift.Int, + following: Swift.Int, + _type: Swift.String, + created_at: Foundation.Date, + updated_at: Foundation.Date, + plan: Components.Schemas.organization.planPayload? = nil ) { self.login = login + self.url = url self.id = id self.node_id = node_id - self.url = url self.repos_url = repos_url self.events_url = events_url self.hooks_url = hooks_url @@ -960,12 +1078,29 @@ public enum Components { self.public_members_url = public_members_url self.avatar_url = avatar_url self.description = description + self.blog = blog + self.html_url = html_url + self.name = name + self.company = company + self.location = location + self.email = email + self.has_organization_projects = has_organization_projects + self.has_repository_projects = has_repository_projects + self.is_verified = is_verified + self.public_repos = public_repos + self.public_gists = public_gists + self.followers = followers + self.following = following + self._type = _type + self.created_at = created_at + self.updated_at = updated_at + self.plan = plan } public enum CodingKeys: String, CodingKey { case login + case url case id case node_id - case url case repos_url case events_url case hooks_url @@ -974,1033 +1109,942 @@ public enum Components { case public_members_url case avatar_url case description - } - } - /// The breakdown of Copilot Business seats for the organization. - /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown`. - public struct copilot_hyphen_seat_hyphen_breakdown: Codable, Hashable, Sendable { - /// The total number of seats being billed for the organization as of the current billing cycle. - /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown/total`. - public var total: Swift.Int? - /// Seats added during the current billing cycle. - /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown/added_this_cycle`. - public var added_this_cycle: Swift.Int? - /// The number of seats that are pending cancellation at the end of the current billing cycle. - /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown/pending_cancellation`. - public var pending_cancellation: Swift.Int? - /// The number of seats that have been assigned to users that have not yet accepted an invitation to this organization. - /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown/pending_invitation`. - public var pending_invitation: Swift.Int? - /// The number of seats that have used Copilot during the current billing cycle. - /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown/active_this_cycle`. - public var active_this_cycle: Swift.Int? - /// The number of seats that have not used Copilot during the current billing cycle. - /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown/inactive_this_cycle`. - public var inactive_this_cycle: Swift.Int? - /// Creates a new `copilot_hyphen_seat_hyphen_breakdown`. + case blog + case html_url + case name + case company + case location + case email + case has_organization_projects + case has_repository_projects + case is_verified + case public_repos + case public_gists + case followers + case following + case _type = "type" + case created_at + case updated_at + case plan + } + } + /// A GitHub organization. + /// + /// - Remark: Generated from `#/components/schemas/organization-simple`. + public struct organization_hyphen_simple: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/organization-simple/login`. + public var login: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/organization-simple/node_id`. + public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/repos_url`. + public var repos_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/events_url`. + public var events_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/hooks_url`. + public var hooks_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/issues_url`. + public var issues_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/members_url`. + public var members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/public_members_url`. + public var public_members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/avatar_url`. + public var avatar_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/description`. + public var description: Swift.String? + /// Creates a new `organization_hyphen_simple`. /// /// - Parameters: - /// - total: The total number of seats being billed for the organization as of the current billing cycle. - /// - added_this_cycle: Seats added during the current billing cycle. - /// - pending_cancellation: The number of seats that are pending cancellation at the end of the current billing cycle. - /// - pending_invitation: The number of seats that have been assigned to users that have not yet accepted an invitation to this organization. - /// - active_this_cycle: The number of seats that have used Copilot during the current billing cycle. - /// - inactive_this_cycle: The number of seats that have not used Copilot during the current billing cycle. + /// - login: + /// - id: + /// - node_id: + /// - url: + /// - repos_url: + /// - events_url: + /// - hooks_url: + /// - issues_url: + /// - members_url: + /// - public_members_url: + /// - avatar_url: + /// - description: public init( - total: Swift.Int? = nil, - added_this_cycle: Swift.Int? = nil, - pending_cancellation: Swift.Int? = nil, - pending_invitation: Swift.Int? = nil, - active_this_cycle: Swift.Int? = nil, - inactive_this_cycle: Swift.Int? = nil + login: Swift.String, + id: Swift.Int, + node_id: Swift.String, + url: Swift.String, + repos_url: Swift.String, + events_url: Swift.String, + hooks_url: Swift.String, + issues_url: Swift.String, + members_url: Swift.String, + public_members_url: Swift.String, + avatar_url: Swift.String, + description: Swift.String? = nil ) { - self.total = total - self.added_this_cycle = added_this_cycle - self.pending_cancellation = pending_cancellation - self.pending_invitation = pending_invitation - self.active_this_cycle = active_this_cycle - self.inactive_this_cycle = inactive_this_cycle + self.login = login + self.id = id + self.node_id = node_id + self.url = url + self.repos_url = repos_url + self.events_url = events_url + self.hooks_url = hooks_url + self.issues_url = issues_url + self.members_url = members_url + self.public_members_url = public_members_url + self.avatar_url = avatar_url + self.description = description } public enum CodingKeys: String, CodingKey { - case total - case added_this_cycle - case pending_cancellation - case pending_invitation - case active_this_cycle - case inactive_this_cycle + case login + case id + case node_id + case url + case repos_url + case events_url + case hooks_url + case issues_url + case members_url + case public_members_url + case avatar_url + case description } } - /// Information about the seat breakdown and policies set for an organization with a Copilot Business subscription. + /// Group of enterprise owners and/or members /// - /// - Remark: Generated from `#/components/schemas/copilot-organization-details`. - public struct copilot_hyphen_organization_hyphen_details: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/copilot-organization-details/seat_breakdown`. - public var seat_breakdown: Components.Schemas.copilot_hyphen_seat_hyphen_breakdown - /// The organization policy for allowing or disallowing Copilot to make suggestions that match public code. - /// - /// - Remark: Generated from `#/components/schemas/copilot-organization-details/public_code_suggestions`. - @frozen public enum public_code_suggestionsPayload: String, Codable, Hashable, Sendable { - case allow = "allow" - case block = "block" - case unconfigured = "unconfigured" - case unknown = "unknown" - } - /// The organization policy for allowing or disallowing Copilot to make suggestions that match public code. - /// - /// - Remark: Generated from `#/components/schemas/copilot-organization-details/public_code_suggestions`. - public var public_code_suggestions: Components.Schemas.copilot_hyphen_organization_hyphen_details.public_code_suggestionsPayload - /// The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor. + /// - Remark: Generated from `#/components/schemas/enterprise-team`. + public struct enterprise_hyphen_team: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/enterprise-team/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/enterprise-team/name`. + public var name: Swift.String + /// - Remark: Generated from `#/components/schemas/enterprise-team/slug`. + public var slug: Swift.String + /// - Remark: Generated from `#/components/schemas/enterprise-team/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/enterprise-team/sync_to_organizations`. + public var sync_to_organizations: Swift.String + /// - Remark: Generated from `#/components/schemas/enterprise-team/group_id`. + public var group_id: Swift.Int? + /// - Remark: Generated from `#/components/schemas/enterprise-team/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/enterprise-team/members_url`. + public var members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/enterprise-team/created_at`. + public var created_at: Foundation.Date + /// - Remark: Generated from `#/components/schemas/enterprise-team/updated_at`. + public var updated_at: Foundation.Date + /// Creates a new `enterprise_hyphen_team`. /// - /// - Remark: Generated from `#/components/schemas/copilot-organization-details/ide_chat`. - @frozen public enum ide_chatPayload: String, Codable, Hashable, Sendable { - case enabled = "enabled" - case disabled = "disabled" - case unconfigured = "unconfigured" + /// - Parameters: + /// - id: + /// - name: + /// - slug: + /// - url: + /// - sync_to_organizations: + /// - group_id: + /// - html_url: + /// - members_url: + /// - created_at: + /// - updated_at: + public init( + id: Swift.Int, + name: Swift.String, + slug: Swift.String, + url: Swift.String, + sync_to_organizations: Swift.String, + group_id: Swift.Int? = nil, + html_url: Swift.String, + members_url: Swift.String, + created_at: Foundation.Date, + updated_at: Foundation.Date + ) { + self.id = id + self.name = name + self.slug = slug + self.url = url + self.sync_to_organizations = sync_to_organizations + self.group_id = group_id + self.html_url = html_url + self.members_url = members_url + self.created_at = created_at + self.updated_at = updated_at } - /// The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor. - /// - /// - Remark: Generated from `#/components/schemas/copilot-organization-details/ide_chat`. - public var ide_chat: Components.Schemas.copilot_hyphen_organization_hyphen_details.ide_chatPayload? - /// The organization policy for allowing or disallowing organization members to use Copilot features within github.com. - /// - /// - Remark: Generated from `#/components/schemas/copilot-organization-details/platform_chat`. - @frozen public enum platform_chatPayload: String, Codable, Hashable, Sendable { - case enabled = "enabled" - case disabled = "disabled" - case unconfigured = "unconfigured" + public enum CodingKeys: String, CodingKey { + case id + case name + case slug + case url + case sync_to_organizations + case group_id + case html_url + case members_url + case created_at + case updated_at } - /// The organization policy for allowing or disallowing organization members to use Copilot features within github.com. - /// - /// - Remark: Generated from `#/components/schemas/copilot-organization-details/platform_chat`. - public var platform_chat: Components.Schemas.copilot_hyphen_organization_hyphen_details.platform_chatPayload? - /// The organization policy for allowing or disallowing organization members to use Copilot within their CLI. + } + /// Information about a Copilot Business seat assignment for a user, team, or organization. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-details`. + public struct copilot_hyphen_seat_hyphen_details: Codable, Hashable, Sendable { + /// The assignee that has been granted access to GitHub Copilot. /// - /// - Remark: Generated from `#/components/schemas/copilot-organization-details/cli`. - @frozen public enum cliPayload: String, Codable, Hashable, Sendable { - case enabled = "enabled" - case disabled = "disabled" - case unconfigured = "unconfigured" + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assignee`. + @frozen public enum assigneePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assignee/case1`. + case simple_hyphen_user(Components.Schemas.simple_hyphen_user) + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assignee/case2`. + case team(Components.Schemas.team) + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assignee/case3`. + case organization(Components.Schemas.organization) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self = .simple_hyphen_user(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + do { + self = .team(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + do { + self = .organization(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + throw Swift.DecodingError.failedToDecodeOneOfSchema( + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + switch self { + case let .simple_hyphen_user(value): + try value.encode(to: encoder) + case let .team(value): + try value.encode(to: encoder) + case let .organization(value): + try value.encode(to: encoder) + } + } } - /// The organization policy for allowing or disallowing organization members to use Copilot within their CLI. + /// The assignee that has been granted access to GitHub Copilot. /// - /// - Remark: Generated from `#/components/schemas/copilot-organization-details/cli`. - public var cli: Components.Schemas.copilot_hyphen_organization_hyphen_details.cliPayload? - /// The mode of assigning new seats. + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assignee`. + public var assignee: Components.Schemas.copilot_hyphen_seat_hyphen_details.assigneePayload + /// The organization to which this seat belongs. /// - /// - Remark: Generated from `#/components/schemas/copilot-organization-details/seat_management_setting`. - @frozen public enum seat_management_settingPayload: String, Codable, Hashable, Sendable { - case assign_all = "assign_all" - case assign_selected = "assign_selected" - case disabled = "disabled" - case unconfigured = "unconfigured" + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/organization`. + @frozen public enum organizationPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/organization/case1`. + case organization_hyphen_simple(Components.Schemas.organization_hyphen_simple) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self = .organization_hyphen_simple(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + throw Swift.DecodingError.failedToDecodeOneOfSchema( + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + switch self { + case let .organization_hyphen_simple(value): + try value.encode(to: encoder) + } + } } - /// The mode of assigning new seats. + /// The organization to which this seat belongs. /// - /// - Remark: Generated from `#/components/schemas/copilot-organization-details/seat_management_setting`. - public var seat_management_setting: Components.Schemas.copilot_hyphen_organization_hyphen_details.seat_management_settingPayload - /// A container of undocumented properties. - public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer - /// Creates a new `copilot_hyphen_organization_hyphen_details`. + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/organization`. + public var organization: Components.Schemas.copilot_hyphen_seat_hyphen_details.organizationPayload? + /// The team through which the assignee is granted access to GitHub Copilot, if applicable. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assigning_team`. + @frozen public enum assigning_teamPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assigning_team/case1`. + case team(Components.Schemas.team) + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assigning_team/case2`. + case enterprise_hyphen_team(Components.Schemas.enterprise_hyphen_team) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self = .team(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + do { + self = .enterprise_hyphen_team(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + throw Swift.DecodingError.failedToDecodeOneOfSchema( + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + switch self { + case let .team(value): + try value.encode(to: encoder) + case let .enterprise_hyphen_team(value): + try value.encode(to: encoder) + } + } + } + /// The team through which the assignee is granted access to GitHub Copilot, if applicable. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assigning_team`. + public var assigning_team: Components.Schemas.copilot_hyphen_seat_hyphen_details.assigning_teamPayload? + /// The pending cancellation date for the seat, in `YYYY-MM-DD` format. This will be null unless the assignee's Copilot access has been canceled during the current billing cycle. If the seat has been cancelled, this corresponds to the start of the organization's next billing cycle. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/pending_cancellation_date`. + public var pending_cancellation_date: Swift.String? + /// Timestamp of user's last GitHub Copilot activity, in ISO 8601 format. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/last_activity_at`. + public var last_activity_at: Foundation.Date? + /// Last editor that was used by the user for a GitHub Copilot completion. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/last_activity_editor`. + public var last_activity_editor: Swift.String? + /// Timestamp of when the assignee was last granted access to GitHub Copilot, in ISO 8601 format. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/created_at`. + public var created_at: Foundation.Date + /// Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/updated_at`. + public var updated_at: Foundation.Date? + /// Creates a new `copilot_hyphen_seat_hyphen_details`. /// /// - Parameters: - /// - seat_breakdown: - /// - public_code_suggestions: The organization policy for allowing or disallowing Copilot to make suggestions that match public code. - /// - ide_chat: The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor. - /// - platform_chat: The organization policy for allowing or disallowing organization members to use Copilot features within github.com. - /// - cli: The organization policy for allowing or disallowing organization members to use Copilot within their CLI. - /// - seat_management_setting: The mode of assigning new seats. - /// - additionalProperties: A container of undocumented properties. + /// - assignee: The assignee that has been granted access to GitHub Copilot. + /// - organization: The organization to which this seat belongs. + /// - assigning_team: The team through which the assignee is granted access to GitHub Copilot, if applicable. + /// - pending_cancellation_date: The pending cancellation date for the seat, in `YYYY-MM-DD` format. This will be null unless the assignee's Copilot access has been canceled during the current billing cycle. If the seat has been cancelled, this corresponds to the start of the organization's next billing cycle. + /// - last_activity_at: Timestamp of user's last GitHub Copilot activity, in ISO 8601 format. + /// - last_activity_editor: Last editor that was used by the user for a GitHub Copilot completion. + /// - created_at: Timestamp of when the assignee was last granted access to GitHub Copilot, in ISO 8601 format. + /// - updated_at: Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format. public init( - seat_breakdown: Components.Schemas.copilot_hyphen_seat_hyphen_breakdown, - public_code_suggestions: Components.Schemas.copilot_hyphen_organization_hyphen_details.public_code_suggestionsPayload, - ide_chat: Components.Schemas.copilot_hyphen_organization_hyphen_details.ide_chatPayload? = nil, - platform_chat: Components.Schemas.copilot_hyphen_organization_hyphen_details.platform_chatPayload? = nil, - cli: Components.Schemas.copilot_hyphen_organization_hyphen_details.cliPayload? = nil, - seat_management_setting: Components.Schemas.copilot_hyphen_organization_hyphen_details.seat_management_settingPayload, - additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init() + assignee: Components.Schemas.copilot_hyphen_seat_hyphen_details.assigneePayload, + organization: Components.Schemas.copilot_hyphen_seat_hyphen_details.organizationPayload? = nil, + assigning_team: Components.Schemas.copilot_hyphen_seat_hyphen_details.assigning_teamPayload? = nil, + pending_cancellation_date: Swift.String? = nil, + last_activity_at: Foundation.Date? = nil, + last_activity_editor: Swift.String? = nil, + created_at: Foundation.Date, + updated_at: Foundation.Date? = nil ) { - self.seat_breakdown = seat_breakdown - self.public_code_suggestions = public_code_suggestions - self.ide_chat = ide_chat - self.platform_chat = platform_chat - self.cli = cli - self.seat_management_setting = seat_management_setting - self.additionalProperties = additionalProperties + self.assignee = assignee + self.organization = organization + self.assigning_team = assigning_team + self.pending_cancellation_date = pending_cancellation_date + self.last_activity_at = last_activity_at + self.last_activity_editor = last_activity_editor + self.created_at = created_at + self.updated_at = updated_at } public enum CodingKeys: String, CodingKey { - case seat_breakdown - case public_code_suggestions - case ide_chat - case platform_chat - case cli - case seat_management_setting + case assignee + case organization + case assigning_team + case pending_cancellation_date + case last_activity_at + case last_activity_editor + case created_at + case updated_at } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - seat_breakdown = try container.decode( - Components.Schemas.copilot_hyphen_seat_hyphen_breakdown.self, - forKey: .seat_breakdown + assignee = try container.decode( + Components.Schemas.copilot_hyphen_seat_hyphen_details.assigneePayload.self, + forKey: .assignee ) - public_code_suggestions = try container.decode( - Components.Schemas.copilot_hyphen_organization_hyphen_details.public_code_suggestionsPayload.self, - forKey: .public_code_suggestions + organization = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_seat_hyphen_details.organizationPayload.self, + forKey: .organization ) - ide_chat = try container.decodeIfPresent( - Components.Schemas.copilot_hyphen_organization_hyphen_details.ide_chatPayload.self, - forKey: .ide_chat + assigning_team = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_seat_hyphen_details.assigning_teamPayload.self, + forKey: .assigning_team ) - platform_chat = try container.decodeIfPresent( - Components.Schemas.copilot_hyphen_organization_hyphen_details.platform_chatPayload.self, - forKey: .platform_chat + pending_cancellation_date = try container.decodeIfPresent( + Swift.String.self, + forKey: .pending_cancellation_date ) - cli = try container.decodeIfPresent( - Components.Schemas.copilot_hyphen_organization_hyphen_details.cliPayload.self, - forKey: .cli + last_activity_at = try container.decodeIfPresent( + Foundation.Date.self, + forKey: .last_activity_at ) - seat_management_setting = try container.decode( - Components.Schemas.copilot_hyphen_organization_hyphen_details.seat_management_settingPayload.self, - forKey: .seat_management_setting + last_activity_editor = try container.decodeIfPresent( + Swift.String.self, + forKey: .last_activity_editor ) - additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: [ - "seat_breakdown", - "public_code_suggestions", - "ide_chat", - "platform_chat", - "cli", - "seat_management_setting" - ]) - } - public func encode(to encoder: any Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode( - seat_breakdown, - forKey: .seat_breakdown - ) - try container.encode( - public_code_suggestions, - forKey: .public_code_suggestions - ) - try container.encodeIfPresent( - ide_chat, - forKey: .ide_chat - ) - try container.encodeIfPresent( - platform_chat, - forKey: .platform_chat - ) - try container.encodeIfPresent( - cli, - forKey: .cli + created_at = try container.decode( + Foundation.Date.self, + forKey: .created_at ) - try container.encode( - seat_management_setting, - forKey: .seat_management_setting + updated_at = try container.decodeIfPresent( + Foundation.Date.self, + forKey: .updated_at ) - try encoder.encodeAdditionalProperties(additionalProperties) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "assignee", + "organization", + "assigning_team", + "pending_cancellation_date", + "last_activity_at", + "last_activity_editor", + "created_at", + "updated_at" + ]) } } - /// Groups of organization members that gives permissions on specified repositories. + /// Summary of Copilot usage. /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. - public struct nullable_hyphen_team_hyphen_simple: Codable, Hashable, Sendable { - /// Unique identifier of the team + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics`. + public struct copilot_hyphen_usage_hyphen_metrics: Codable, Hashable, Sendable { + /// The date for which the usage metrics are reported, in `YYYY-MM-DD` format. /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/node_id`. - public var node_id: Swift.String - /// URL for the team + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/day`. + public var day: Swift.String + /// The total number of Copilot code completion suggestions shown to users. /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/members_url`. - public var members_url: Swift.String - /// Name of the team + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_suggestions_count`. + public var total_suggestions_count: Swift.Int? + /// The total number of Copilot code completion suggestions accepted by users. /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/name`. - public var name: Swift.String - /// Description of the team + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_acceptances_count`. + public var total_acceptances_count: Swift.Int? + /// The total number of lines of code completions suggested by Copilot. /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/description`. - public var description: Swift.String? - /// Permission that the team will have for its repositories + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_lines_suggested`. + public var total_lines_suggested: Swift.Int? + /// The total number of lines of code completions accepted by users. /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/permission`. - public var permission: Swift.String - /// The level of privacy this team should have + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_lines_accepted`. + public var total_lines_accepted: Swift.Int? + /// The total number of users who were shown Copilot code completion suggestions during the day specified. /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/privacy`. - public var privacy: Swift.String? - /// The notification setting the team has set + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_active_users`. + public var total_active_users: Swift.Int? + /// The total instances of users who accepted code suggested by Copilot Chat in the IDE (panel and inline). /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/slug`. - public var slug: Swift.String - /// Distinguished Name (DN) that team maps to within LDAP environment + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_chat_acceptances`. + public var total_chat_acceptances: Swift.Int? + /// The total number of chat turns (prompt and response pairs) sent between users and Copilot Chat in the IDE. /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/ldap_dn`. - public var ldap_dn: Swift.String? - /// Creates a new `nullable_hyphen_team_hyphen_simple`. + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_chat_turns`. + public var total_chat_turns: Swift.Int? + /// The total number of users who interacted with Copilot Chat in the IDE during the day specified. /// - /// - Parameters: - /// - id: Unique identifier of the team - /// - node_id: - /// - url: URL for the team - /// - members_url: - /// - name: Name of the team - /// - description: Description of the team - /// - permission: Permission that the team will have for its repositories - /// - privacy: The level of privacy this team should have - /// - notification_setting: The notification setting the team has set - /// - html_url: - /// - repositories_url: - /// - slug: - /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment - public init( - id: Swift.Int, - node_id: Swift.String, - url: Swift.String, - members_url: Swift.String, - name: Swift.String, - description: Swift.String? = nil, - permission: Swift.String, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, - html_url: Swift.String, - repositories_url: Swift.String, - slug: Swift.String, - ldap_dn: Swift.String? = nil - ) { - self.id = id - self.node_id = node_id - self.url = url - self.members_url = members_url - self.name = name - self.description = description - self.permission = permission - self.privacy = privacy - self.notification_setting = notification_setting - self.html_url = html_url - self.repositories_url = repositories_url - self.slug = slug - self.ldap_dn = ldap_dn - } - public enum CodingKeys: String, CodingKey { - case id - case node_id - case url - case members_url - case name - case description - case permission - case privacy - case notification_setting - case html_url - case repositories_url - case slug - case ldap_dn - } - } - /// Groups of organization members that gives permissions on specified repositories. - /// - /// - Remark: Generated from `#/components/schemas/team`. - public struct team: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/team/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/team/node_id`. - public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/team/name`. - public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/team/slug`. - public var slug: Swift.String - /// - Remark: Generated from `#/components/schemas/team/description`. - public var description: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/privacy`. - public var privacy: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/permission`. - public var permission: Swift.String - /// - Remark: Generated from `#/components/schemas/team/permissions`. - public struct permissionsPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/team/permissions/pull`. - public var pull: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/triage`. - public var triage: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/push`. - public var push: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/maintain`. - public var maintain: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/admin`. - public var admin: Swift.Bool - /// Creates a new `permissionsPayload`. + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/total_active_chat_users`. + public var total_active_chat_users: Swift.Int? + /// Breakdown of Copilot usage by editor for this language + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload`. + public struct breakdownPayloadPayload: Codable, Hashable, Sendable { + /// The language in which Copilot suggestions were shown to users in the specified editor. + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload/language`. + public var language: Swift.String? + /// The editor in which Copilot suggestions were shown to users for the specified language. + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload/editor`. + public var editor: Swift.String? + /// The number of Copilot suggestions shown to users in the editor specified during the day specified. + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload/suggestions_count`. + public var suggestions_count: Swift.Int? + /// The number of Copilot suggestions accepted by users in the editor specified during the day specified. + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload/acceptances_count`. + public var acceptances_count: Swift.Int? + /// The number of lines of code suggested by Copilot in the editor specified during the day specified. + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload/lines_suggested`. + public var lines_suggested: Swift.Int? + /// The number of lines of code accepted by users in the editor specified during the day specified. + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload/lines_accepted`. + public var lines_accepted: Swift.Int? + /// The number of users who were shown Copilot completion suggestions in the editor specified during the day specified. + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdownPayload/active_users`. + public var active_users: Swift.Int? + /// A container of undocumented properties. + public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer + /// Creates a new `breakdownPayloadPayload`. /// /// - Parameters: - /// - pull: - /// - triage: - /// - push: - /// - maintain: - /// - admin: + /// - language: The language in which Copilot suggestions were shown to users in the specified editor. + /// - editor: The editor in which Copilot suggestions were shown to users for the specified language. + /// - suggestions_count: The number of Copilot suggestions shown to users in the editor specified during the day specified. + /// - acceptances_count: The number of Copilot suggestions accepted by users in the editor specified during the day specified. + /// - lines_suggested: The number of lines of code suggested by Copilot in the editor specified during the day specified. + /// - lines_accepted: The number of lines of code accepted by users in the editor specified during the day specified. + /// - active_users: The number of users who were shown Copilot completion suggestions in the editor specified during the day specified. + /// - additionalProperties: A container of undocumented properties. public init( - pull: Swift.Bool, - triage: Swift.Bool, - push: Swift.Bool, - maintain: Swift.Bool, - admin: Swift.Bool + language: Swift.String? = nil, + editor: Swift.String? = nil, + suggestions_count: Swift.Int? = nil, + acceptances_count: Swift.Int? = nil, + lines_suggested: Swift.Int? = nil, + lines_accepted: Swift.Int? = nil, + active_users: Swift.Int? = nil, + additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init() ) { - self.pull = pull - self.triage = triage - self.push = push - self.maintain = maintain - self.admin = admin + self.language = language + self.editor = editor + self.suggestions_count = suggestions_count + self.acceptances_count = acceptances_count + self.lines_suggested = lines_suggested + self.lines_accepted = lines_accepted + self.active_users = active_users + self.additionalProperties = additionalProperties } public enum CodingKeys: String, CodingKey { - case pull - case triage - case push - case maintain - case admin + case language + case editor + case suggestions_count + case acceptances_count + case lines_suggested + case lines_accepted + case active_users } - } - /// - Remark: Generated from `#/components/schemas/team/permissions`. - public var permissions: Components.Schemas.team.permissionsPayload? - /// - Remark: Generated from `#/components/schemas/team/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/members_url`. - public var members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/parent`. - public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? - /// Creates a new `team`. - /// - /// - Parameters: - /// - id: - /// - node_id: - /// - name: - /// - slug: - /// - description: - /// - privacy: - /// - notification_setting: - /// - permission: - /// - permissions: - /// - url: - /// - html_url: - /// - members_url: - /// - repositories_url: - /// - parent: - public init( - id: Swift.Int, - node_id: Swift.String, - name: Swift.String, - slug: Swift.String, - description: Swift.String? = nil, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, - permission: Swift.String, - permissions: Components.Schemas.team.permissionsPayload? = nil, - url: Swift.String, - html_url: Swift.String, - members_url: Swift.String, - repositories_url: Swift.String, - parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil - ) { - self.id = id - self.node_id = node_id - self.name = name - self.slug = slug - self.description = description - self.privacy = privacy - self.notification_setting = notification_setting - self.permission = permission - self.permissions = permissions - self.url = url - self.html_url = html_url - self.members_url = members_url - self.repositories_url = repositories_url - self.parent = parent - } - public enum CodingKeys: String, CodingKey { - case id - case node_id - case name - case slug - case description - case privacy - case notification_setting - case permission - case permissions - case url - case html_url - case members_url - case repositories_url - case parent - } - } - /// GitHub account for managing multiple users, teams, and repositories - /// - /// - Remark: Generated from `#/components/schemas/organization`. - public struct organization: Codable, Hashable, Sendable { - /// Unique login name of the organization - /// - /// - Remark: Generated from `#/components/schemas/organization/login`. - public var login: Swift.String - /// URL for the organization - /// - /// - Remark: Generated from `#/components/schemas/organization/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization/node_id`. - public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/repos_url`. - public var repos_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/events_url`. - public var events_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/hooks_url`. - public var hooks_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/issues_url`. - public var issues_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/members_url`. - public var members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/public_members_url`. - public var public_members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/avatar_url`. - public var avatar_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/description`. - public var description: Swift.String? - /// Display blog url for the organization - /// - /// - Remark: Generated from `#/components/schemas/organization/blog`. - public var blog: Swift.String? - /// - Remark: Generated from `#/components/schemas/organization/html_url`. - public var html_url: Swift.String - /// Display name for the organization - /// - /// - Remark: Generated from `#/components/schemas/organization/name`. - public var name: Swift.String? - /// Display company name for the organization - /// - /// - Remark: Generated from `#/components/schemas/organization/company`. - public var company: Swift.String? - /// Display location for the organization - /// - /// - Remark: Generated from `#/components/schemas/organization/location`. - public var location: Swift.String? - /// Display email for the organization - /// - /// - Remark: Generated from `#/components/schemas/organization/email`. - public var email: Swift.String? - /// Specifies if organization projects are enabled for this org - /// - /// - Remark: Generated from `#/components/schemas/organization/has_organization_projects`. - public var has_organization_projects: Swift.Bool - /// Specifies if repository projects are enabled for repositories that belong to this org - /// - /// - Remark: Generated from `#/components/schemas/organization/has_repository_projects`. - public var has_repository_projects: Swift.Bool - /// - Remark: Generated from `#/components/schemas/organization/is_verified`. - public var is_verified: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/organization/public_repos`. - public var public_repos: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization/public_gists`. - public var public_gists: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization/followers`. - public var followers: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization/following`. - public var following: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization/type`. - public var _type: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/created_at`. - public var created_at: Foundation.Date - /// - Remark: Generated from `#/components/schemas/organization/updated_at`. - public var updated_at: Foundation.Date - /// - Remark: Generated from `#/components/schemas/organization/plan`. - public struct planPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/organization/plan/name`. - public var name: Swift.String? - /// - Remark: Generated from `#/components/schemas/organization/plan/space`. - public var space: Swift.Int? - /// - Remark: Generated from `#/components/schemas/organization/plan/private_repos`. - public var private_repos: Swift.Int? - /// - Remark: Generated from `#/components/schemas/organization/plan/filled_seats`. - public var filled_seats: Swift.Int? - /// - Remark: Generated from `#/components/schemas/organization/plan/seats`. - public var seats: Swift.Int? - /// Creates a new `planPayload`. - /// - /// - Parameters: - /// - name: - /// - space: - /// - private_repos: - /// - filled_seats: - /// - seats: - public init( - name: Swift.String? = nil, - space: Swift.Int? = nil, - private_repos: Swift.Int? = nil, - filled_seats: Swift.Int? = nil, - seats: Swift.Int? = nil - ) { - self.name = name - self.space = space - self.private_repos = private_repos - self.filled_seats = filled_seats - self.seats = seats + public init(from decoder: any Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + language = try container.decodeIfPresent( + Swift.String.self, + forKey: .language + ) + editor = try container.decodeIfPresent( + Swift.String.self, + forKey: .editor + ) + suggestions_count = try container.decodeIfPresent( + Swift.Int.self, + forKey: .suggestions_count + ) + acceptances_count = try container.decodeIfPresent( + Swift.Int.self, + forKey: .acceptances_count + ) + lines_suggested = try container.decodeIfPresent( + Swift.Int.self, + forKey: .lines_suggested + ) + lines_accepted = try container.decodeIfPresent( + Swift.Int.self, + forKey: .lines_accepted + ) + active_users = try container.decodeIfPresent( + Swift.Int.self, + forKey: .active_users + ) + additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: [ + "language", + "editor", + "suggestions_count", + "acceptances_count", + "lines_suggested", + "lines_accepted", + "active_users" + ]) } - public enum CodingKeys: String, CodingKey { - case name - case space - case private_repos - case filled_seats - case seats + public func encode(to encoder: any Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent( + language, + forKey: .language + ) + try container.encodeIfPresent( + editor, + forKey: .editor + ) + try container.encodeIfPresent( + suggestions_count, + forKey: .suggestions_count + ) + try container.encodeIfPresent( + acceptances_count, + forKey: .acceptances_count + ) + try container.encodeIfPresent( + lines_suggested, + forKey: .lines_suggested + ) + try container.encodeIfPresent( + lines_accepted, + forKey: .lines_accepted + ) + try container.encodeIfPresent( + active_users, + forKey: .active_users + ) + try encoder.encodeAdditionalProperties(additionalProperties) } } - /// - Remark: Generated from `#/components/schemas/organization/plan`. - public var plan: Components.Schemas.organization.planPayload? - /// Creates a new `organization`. + /// Breakdown of Copilot code completions usage by language and editor + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdown`. + public typealias breakdownPayload = [Components.Schemas.copilot_hyphen_usage_hyphen_metrics.breakdownPayloadPayload] + /// Breakdown of Copilot code completions usage by language and editor + /// + /// - Remark: Generated from `#/components/schemas/copilot-usage-metrics/breakdown`. + public var breakdown: Components.Schemas.copilot_hyphen_usage_hyphen_metrics.breakdownPayload? + /// Creates a new `copilot_hyphen_usage_hyphen_metrics`. /// /// - Parameters: - /// - login: Unique login name of the organization - /// - url: URL for the organization - /// - id: - /// - node_id: - /// - repos_url: - /// - events_url: - /// - hooks_url: - /// - issues_url: - /// - members_url: - /// - public_members_url: - /// - avatar_url: - /// - description: - /// - blog: Display blog url for the organization - /// - html_url: - /// - name: Display name for the organization - /// - company: Display company name for the organization - /// - location: Display location for the organization - /// - email: Display email for the organization - /// - has_organization_projects: Specifies if organization projects are enabled for this org - /// - has_repository_projects: Specifies if repository projects are enabled for repositories that belong to this org - /// - is_verified: - /// - public_repos: - /// - public_gists: - /// - followers: - /// - following: - /// - _type: - /// - created_at: - /// - updated_at: - /// - plan: + /// - day: The date for which the usage metrics are reported, in `YYYY-MM-DD` format. + /// - total_suggestions_count: The total number of Copilot code completion suggestions shown to users. + /// - total_acceptances_count: The total number of Copilot code completion suggestions accepted by users. + /// - total_lines_suggested: The total number of lines of code completions suggested by Copilot. + /// - total_lines_accepted: The total number of lines of code completions accepted by users. + /// - total_active_users: The total number of users who were shown Copilot code completion suggestions during the day specified. + /// - total_chat_acceptances: The total instances of users who accepted code suggested by Copilot Chat in the IDE (panel and inline). + /// - total_chat_turns: The total number of chat turns (prompt and response pairs) sent between users and Copilot Chat in the IDE. + /// - total_active_chat_users: The total number of users who interacted with Copilot Chat in the IDE during the day specified. + /// - breakdown: Breakdown of Copilot code completions usage by language and editor public init( - login: Swift.String, - url: Swift.String, - id: Swift.Int, - node_id: Swift.String, - repos_url: Swift.String, - events_url: Swift.String, - hooks_url: Swift.String, - issues_url: Swift.String, - members_url: Swift.String, - public_members_url: Swift.String, - avatar_url: Swift.String, - description: Swift.String? = nil, - blog: Swift.String? = nil, - html_url: Swift.String, - name: Swift.String? = nil, - company: Swift.String? = nil, - location: Swift.String? = nil, - email: Swift.String? = nil, - has_organization_projects: Swift.Bool, - has_repository_projects: Swift.Bool, - is_verified: Swift.Bool? = nil, - public_repos: Swift.Int, - public_gists: Swift.Int, - followers: Swift.Int, - following: Swift.Int, - _type: Swift.String, - created_at: Foundation.Date, - updated_at: Foundation.Date, - plan: Components.Schemas.organization.planPayload? = nil + day: Swift.String, + total_suggestions_count: Swift.Int? = nil, + total_acceptances_count: Swift.Int? = nil, + total_lines_suggested: Swift.Int? = nil, + total_lines_accepted: Swift.Int? = nil, + total_active_users: Swift.Int? = nil, + total_chat_acceptances: Swift.Int? = nil, + total_chat_turns: Swift.Int? = nil, + total_active_chat_users: Swift.Int? = nil, + breakdown: Components.Schemas.copilot_hyphen_usage_hyphen_metrics.breakdownPayload? = nil ) { - self.login = login - self.url = url - self.id = id - self.node_id = node_id - self.repos_url = repos_url - self.events_url = events_url - self.hooks_url = hooks_url - self.issues_url = issues_url - self.members_url = members_url - self.public_members_url = public_members_url - self.avatar_url = avatar_url - self.description = description - self.blog = blog - self.html_url = html_url - self.name = name - self.company = company - self.location = location - self.email = email - self.has_organization_projects = has_organization_projects - self.has_repository_projects = has_repository_projects - self.is_verified = is_verified - self.public_repos = public_repos - self.public_gists = public_gists - self.followers = followers - self.following = following - self._type = _type - self.created_at = created_at - self.updated_at = updated_at - self.plan = plan + self.day = day + self.total_suggestions_count = total_suggestions_count + self.total_acceptances_count = total_acceptances_count + self.total_lines_suggested = total_lines_suggested + self.total_lines_accepted = total_lines_accepted + self.total_active_users = total_active_users + self.total_chat_acceptances = total_chat_acceptances + self.total_chat_turns = total_chat_turns + self.total_active_chat_users = total_active_chat_users + self.breakdown = breakdown } public enum CodingKeys: String, CodingKey { - case login - case url - case id - case node_id - case repos_url - case events_url - case hooks_url - case issues_url - case members_url - case public_members_url - case avatar_url - case description - case blog - case html_url - case name - case company - case location - case email - case has_organization_projects - case has_repository_projects - case is_verified - case public_repos - case public_gists - case followers - case following - case _type = "type" - case created_at - case updated_at - case plan + case day + case total_suggestions_count + case total_acceptances_count + case total_lines_suggested + case total_lines_accepted + case total_active_users + case total_chat_acceptances + case total_chat_turns + case total_active_chat_users + case breakdown + } + public init(from decoder: any Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + day = try container.decode( + Swift.String.self, + forKey: .day + ) + total_suggestions_count = try container.decodeIfPresent( + Swift.Int.self, + forKey: .total_suggestions_count + ) + total_acceptances_count = try container.decodeIfPresent( + Swift.Int.self, + forKey: .total_acceptances_count + ) + total_lines_suggested = try container.decodeIfPresent( + Swift.Int.self, + forKey: .total_lines_suggested + ) + total_lines_accepted = try container.decodeIfPresent( + Swift.Int.self, + forKey: .total_lines_accepted + ) + total_active_users = try container.decodeIfPresent( + Swift.Int.self, + forKey: .total_active_users + ) + total_chat_acceptances = try container.decodeIfPresent( + Swift.Int.self, + forKey: .total_chat_acceptances + ) + total_chat_turns = try container.decodeIfPresent( + Swift.Int.self, + forKey: .total_chat_turns + ) + total_active_chat_users = try container.decodeIfPresent( + Swift.Int.self, + forKey: .total_active_chat_users + ) + breakdown = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_usage_hyphen_metrics.breakdownPayload.self, + forKey: .breakdown + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "day", + "total_suggestions_count", + "total_acceptances_count", + "total_lines_suggested", + "total_lines_accepted", + "total_active_users", + "total_chat_acceptances", + "total_chat_turns", + "total_active_chat_users", + "breakdown" + ]) } } - /// Group of enterprise owners and/or members + /// The breakdown of Copilot Business seats for the organization. /// - /// - Remark: Generated from `#/components/schemas/enterprise-team`. - public struct enterprise_hyphen_team: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/enterprise-team/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/enterprise-team/name`. - public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/enterprise-team/slug`. - public var slug: Swift.String - /// - Remark: Generated from `#/components/schemas/enterprise-team/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/enterprise-team/sync_to_organizations`. - public var sync_to_organizations: Swift.String - /// - Remark: Generated from `#/components/schemas/enterprise-team/group_id`. - public var group_id: Swift.Int? - /// - Remark: Generated from `#/components/schemas/enterprise-team/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/enterprise-team/members_url`. - public var members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/enterprise-team/created_at`. - public var created_at: Foundation.Date - /// - Remark: Generated from `#/components/schemas/enterprise-team/updated_at`. - public var updated_at: Foundation.Date - /// Creates a new `enterprise_hyphen_team`. + /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown`. + public struct copilot_hyphen_seat_hyphen_breakdown: Codable, Hashable, Sendable { + /// The total number of seats being billed for the organization as of the current billing cycle. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown/total`. + public var total: Swift.Int? + /// Seats added during the current billing cycle. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown/added_this_cycle`. + public var added_this_cycle: Swift.Int? + /// The number of seats that are pending cancellation at the end of the current billing cycle. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown/pending_cancellation`. + public var pending_cancellation: Swift.Int? + /// The number of seats that have been assigned to users that have not yet accepted an invitation to this organization. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown/pending_invitation`. + public var pending_invitation: Swift.Int? + /// The number of seats that have used Copilot during the current billing cycle. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown/active_this_cycle`. + public var active_this_cycle: Swift.Int? + /// The number of seats that have not used Copilot during the current billing cycle. + /// + /// - Remark: Generated from `#/components/schemas/copilot-seat-breakdown/inactive_this_cycle`. + public var inactive_this_cycle: Swift.Int? + /// Creates a new `copilot_hyphen_seat_hyphen_breakdown`. /// /// - Parameters: - /// - id: - /// - name: - /// - slug: - /// - url: - /// - sync_to_organizations: - /// - group_id: - /// - html_url: - /// - members_url: - /// - created_at: - /// - updated_at: + /// - total: The total number of seats being billed for the organization as of the current billing cycle. + /// - added_this_cycle: Seats added during the current billing cycle. + /// - pending_cancellation: The number of seats that are pending cancellation at the end of the current billing cycle. + /// - pending_invitation: The number of seats that have been assigned to users that have not yet accepted an invitation to this organization. + /// - active_this_cycle: The number of seats that have used Copilot during the current billing cycle. + /// - inactive_this_cycle: The number of seats that have not used Copilot during the current billing cycle. public init( - id: Swift.Int, - name: Swift.String, - slug: Swift.String, - url: Swift.String, - sync_to_organizations: Swift.String, - group_id: Swift.Int? = nil, - html_url: Swift.String, - members_url: Swift.String, - created_at: Foundation.Date, - updated_at: Foundation.Date + total: Swift.Int? = nil, + added_this_cycle: Swift.Int? = nil, + pending_cancellation: Swift.Int? = nil, + pending_invitation: Swift.Int? = nil, + active_this_cycle: Swift.Int? = nil, + inactive_this_cycle: Swift.Int? = nil ) { - self.id = id - self.name = name - self.slug = slug - self.url = url - self.sync_to_organizations = sync_to_organizations - self.group_id = group_id - self.html_url = html_url - self.members_url = members_url - self.created_at = created_at - self.updated_at = updated_at + self.total = total + self.added_this_cycle = added_this_cycle + self.pending_cancellation = pending_cancellation + self.pending_invitation = pending_invitation + self.active_this_cycle = active_this_cycle + self.inactive_this_cycle = inactive_this_cycle } public enum CodingKeys: String, CodingKey { - case id - case name - case slug - case url - case sync_to_organizations - case group_id - case html_url - case members_url - case created_at - case updated_at + case total + case added_this_cycle + case pending_cancellation + case pending_invitation + case active_this_cycle + case inactive_this_cycle } } - /// Information about a Copilot Business seat assignment for a user, team, or organization. + /// Information about the seat breakdown and policies set for an organization with a Copilot Business subscription. /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-details`. - public struct copilot_hyphen_seat_hyphen_details: Codable, Hashable, Sendable { - /// The assignee that has been granted access to GitHub Copilot. + /// - Remark: Generated from `#/components/schemas/copilot-organization-details`. + public struct copilot_hyphen_organization_hyphen_details: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/copilot-organization-details/seat_breakdown`. + public var seat_breakdown: Components.Schemas.copilot_hyphen_seat_hyphen_breakdown + /// The organization policy for allowing or disallowing Copilot to make suggestions that match public code. /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assignee`. - @frozen public enum assigneePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assignee/case1`. - case simple_hyphen_user(Components.Schemas.simple_hyphen_user) - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assignee/case2`. - case team(Components.Schemas.team) - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assignee/case3`. - case organization(Components.Schemas.organization) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .simple_hyphen_user(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .team(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .organization(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) - } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .simple_hyphen_user(value): - try value.encode(to: encoder) - case let .team(value): - try value.encode(to: encoder) - case let .organization(value): - try value.encode(to: encoder) - } - } + /// - Remark: Generated from `#/components/schemas/copilot-organization-details/public_code_suggestions`. + @frozen public enum public_code_suggestionsPayload: String, Codable, Hashable, Sendable { + case allow = "allow" + case block = "block" + case unconfigured = "unconfigured" + case unknown = "unknown" } - /// The assignee that has been granted access to GitHub Copilot. + /// The organization policy for allowing or disallowing Copilot to make suggestions that match public code. /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assignee`. - public var assignee: Components.Schemas.copilot_hyphen_seat_hyphen_details.assigneePayload - /// The organization to which this seat belongs. + /// - Remark: Generated from `#/components/schemas/copilot-organization-details/public_code_suggestions`. + public var public_code_suggestions: Components.Schemas.copilot_hyphen_organization_hyphen_details.public_code_suggestionsPayload + /// The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor. /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/organization`. - @frozen public enum organizationPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/organization/case1`. - case organization_hyphen_simple(Components.Schemas.organization_hyphen_simple) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .organization_hyphen_simple(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) - } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .organization_hyphen_simple(value): - try value.encode(to: encoder) - } - } + /// - Remark: Generated from `#/components/schemas/copilot-organization-details/ide_chat`. + @frozen public enum ide_chatPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case unconfigured = "unconfigured" } - /// The organization to which this seat belongs. + /// The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor. /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/organization`. - public var organization: Components.Schemas.copilot_hyphen_seat_hyphen_details.organizationPayload? - /// The team through which the assignee is granted access to GitHub Copilot, if applicable. + /// - Remark: Generated from `#/components/schemas/copilot-organization-details/ide_chat`. + public var ide_chat: Components.Schemas.copilot_hyphen_organization_hyphen_details.ide_chatPayload? + /// The organization policy for allowing or disallowing organization members to use Copilot features within github.com. /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assigning_team`. - @frozen public enum assigning_teamPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assigning_team/case1`. - case team(Components.Schemas.team) - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assigning_team/case2`. - case enterprise_hyphen_team(Components.Schemas.enterprise_hyphen_team) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .team(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .enterprise_hyphen_team(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) - } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .team(value): - try value.encode(to: encoder) - case let .enterprise_hyphen_team(value): - try value.encode(to: encoder) - } - } + /// - Remark: Generated from `#/components/schemas/copilot-organization-details/platform_chat`. + @frozen public enum platform_chatPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case unconfigured = "unconfigured" } - /// The team through which the assignee is granted access to GitHub Copilot, if applicable. - /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assigning_team`. - public var assigning_team: Components.Schemas.copilot_hyphen_seat_hyphen_details.assigning_teamPayload? - /// The pending cancellation date for the seat, in `YYYY-MM-DD` format. This will be null unless the assignee's Copilot access has been canceled during the current billing cycle. If the seat has been cancelled, this corresponds to the start of the organization's next billing cycle. + /// The organization policy for allowing or disallowing organization members to use Copilot features within github.com. /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/pending_cancellation_date`. - public var pending_cancellation_date: Swift.String? - /// Timestamp of user's last GitHub Copilot activity, in ISO 8601 format. + /// - Remark: Generated from `#/components/schemas/copilot-organization-details/platform_chat`. + public var platform_chat: Components.Schemas.copilot_hyphen_organization_hyphen_details.platform_chatPayload? + /// The organization policy for allowing or disallowing organization members to use Copilot within their CLI. /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/last_activity_at`. - public var last_activity_at: Foundation.Date? - /// Last editor that was used by the user for a GitHub Copilot completion. + /// - Remark: Generated from `#/components/schemas/copilot-organization-details/cli`. + @frozen public enum cliPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case unconfigured = "unconfigured" + } + /// The organization policy for allowing or disallowing organization members to use Copilot within their CLI. /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/last_activity_editor`. - public var last_activity_editor: Swift.String? - /// Timestamp of when the assignee was last granted access to GitHub Copilot, in ISO 8601 format. + /// - Remark: Generated from `#/components/schemas/copilot-organization-details/cli`. + public var cli: Components.Schemas.copilot_hyphen_organization_hyphen_details.cliPayload? + /// The mode of assigning new seats. /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/created_at`. - public var created_at: Foundation.Date - /// Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format. + /// - Remark: Generated from `#/components/schemas/copilot-organization-details/seat_management_setting`. + @frozen public enum seat_management_settingPayload: String, Codable, Hashable, Sendable { + case assign_all = "assign_all" + case assign_selected = "assign_selected" + case disabled = "disabled" + case unconfigured = "unconfigured" + } + /// The mode of assigning new seats. /// - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/updated_at`. - public var updated_at: Foundation.Date? - /// Creates a new `copilot_hyphen_seat_hyphen_details`. + /// - Remark: Generated from `#/components/schemas/copilot-organization-details/seat_management_setting`. + public var seat_management_setting: Components.Schemas.copilot_hyphen_organization_hyphen_details.seat_management_settingPayload + /// A container of undocumented properties. + public var additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer + /// Creates a new `copilot_hyphen_organization_hyphen_details`. /// /// - Parameters: - /// - assignee: The assignee that has been granted access to GitHub Copilot. - /// - organization: The organization to which this seat belongs. - /// - assigning_team: The team through which the assignee is granted access to GitHub Copilot, if applicable. - /// - pending_cancellation_date: The pending cancellation date for the seat, in `YYYY-MM-DD` format. This will be null unless the assignee's Copilot access has been canceled during the current billing cycle. If the seat has been cancelled, this corresponds to the start of the organization's next billing cycle. - /// - last_activity_at: Timestamp of user's last GitHub Copilot activity, in ISO 8601 format. - /// - last_activity_editor: Last editor that was used by the user for a GitHub Copilot completion. - /// - created_at: Timestamp of when the assignee was last granted access to GitHub Copilot, in ISO 8601 format. - /// - updated_at: Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format. + /// - seat_breakdown: + /// - public_code_suggestions: The organization policy for allowing or disallowing Copilot to make suggestions that match public code. + /// - ide_chat: The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor. + /// - platform_chat: The organization policy for allowing or disallowing organization members to use Copilot features within github.com. + /// - cli: The organization policy for allowing or disallowing organization members to use Copilot within their CLI. + /// - seat_management_setting: The mode of assigning new seats. + /// - additionalProperties: A container of undocumented properties. public init( - assignee: Components.Schemas.copilot_hyphen_seat_hyphen_details.assigneePayload, - organization: Components.Schemas.copilot_hyphen_seat_hyphen_details.organizationPayload? = nil, - assigning_team: Components.Schemas.copilot_hyphen_seat_hyphen_details.assigning_teamPayload? = nil, - pending_cancellation_date: Swift.String? = nil, - last_activity_at: Foundation.Date? = nil, - last_activity_editor: Swift.String? = nil, - created_at: Foundation.Date, - updated_at: Foundation.Date? = nil + seat_breakdown: Components.Schemas.copilot_hyphen_seat_hyphen_breakdown, + public_code_suggestions: Components.Schemas.copilot_hyphen_organization_hyphen_details.public_code_suggestionsPayload, + ide_chat: Components.Schemas.copilot_hyphen_organization_hyphen_details.ide_chatPayload? = nil, + platform_chat: Components.Schemas.copilot_hyphen_organization_hyphen_details.platform_chatPayload? = nil, + cli: Components.Schemas.copilot_hyphen_organization_hyphen_details.cliPayload? = nil, + seat_management_setting: Components.Schemas.copilot_hyphen_organization_hyphen_details.seat_management_settingPayload, + additionalProperties: OpenAPIRuntime.OpenAPIObjectContainer = .init() ) { - self.assignee = assignee - self.organization = organization - self.assigning_team = assigning_team - self.pending_cancellation_date = pending_cancellation_date - self.last_activity_at = last_activity_at - self.last_activity_editor = last_activity_editor - self.created_at = created_at - self.updated_at = updated_at + self.seat_breakdown = seat_breakdown + self.public_code_suggestions = public_code_suggestions + self.ide_chat = ide_chat + self.platform_chat = platform_chat + self.cli = cli + self.seat_management_setting = seat_management_setting + self.additionalProperties = additionalProperties } public enum CodingKeys: String, CodingKey { - case assignee - case organization - case assigning_team - case pending_cancellation_date - case last_activity_at - case last_activity_editor - case created_at - case updated_at + case seat_breakdown + case public_code_suggestions + case ide_chat + case platform_chat + case cli + case seat_management_setting } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - assignee = try container.decode( - Components.Schemas.copilot_hyphen_seat_hyphen_details.assigneePayload.self, - forKey: .assignee + seat_breakdown = try container.decode( + Components.Schemas.copilot_hyphen_seat_hyphen_breakdown.self, + forKey: .seat_breakdown ) - organization = try container.decodeIfPresent( - Components.Schemas.copilot_hyphen_seat_hyphen_details.organizationPayload.self, - forKey: .organization + public_code_suggestions = try container.decode( + Components.Schemas.copilot_hyphen_organization_hyphen_details.public_code_suggestionsPayload.self, + forKey: .public_code_suggestions ) - assigning_team = try container.decodeIfPresent( - Components.Schemas.copilot_hyphen_seat_hyphen_details.assigning_teamPayload.self, - forKey: .assigning_team + ide_chat = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_organization_hyphen_details.ide_chatPayload.self, + forKey: .ide_chat ) - pending_cancellation_date = try container.decodeIfPresent( - Swift.String.self, - forKey: .pending_cancellation_date + platform_chat = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_organization_hyphen_details.platform_chatPayload.self, + forKey: .platform_chat ) - last_activity_at = try container.decodeIfPresent( - Foundation.Date.self, - forKey: .last_activity_at + cli = try container.decodeIfPresent( + Components.Schemas.copilot_hyphen_organization_hyphen_details.cliPayload.self, + forKey: .cli ) - last_activity_editor = try container.decodeIfPresent( - Swift.String.self, - forKey: .last_activity_editor + seat_management_setting = try container.decode( + Components.Schemas.copilot_hyphen_organization_hyphen_details.seat_management_settingPayload.self, + forKey: .seat_management_setting ) - created_at = try container.decode( - Foundation.Date.self, - forKey: .created_at + additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: [ + "seat_breakdown", + "public_code_suggestions", + "ide_chat", + "platform_chat", + "cli", + "seat_management_setting" + ]) + } + public func encode(to encoder: any Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode( + seat_breakdown, + forKey: .seat_breakdown ) - updated_at = try container.decodeIfPresent( - Foundation.Date.self, - forKey: .updated_at + try container.encode( + public_code_suggestions, + forKey: .public_code_suggestions ) - try decoder.ensureNoAdditionalProperties(knownKeys: [ - "assignee", - "organization", - "assigning_team", - "pending_cancellation_date", - "last_activity_at", - "last_activity_editor", - "created_at", - "updated_at" - ]) + try container.encodeIfPresent( + ide_chat, + forKey: .ide_chat + ) + try container.encodeIfPresent( + platform_chat, + forKey: .platform_chat + ) + try container.encodeIfPresent( + cli, + forKey: .cli + ) + try container.encode( + seat_management_setting, + forKey: .seat_management_setting + ) + try encoder.encodeAdditionalProperties(additionalProperties) } } } @@ -2045,110 +2089,415 @@ public enum Components { } } } - /// Received HTTP response body - public var body: Components.Responses.not_found.Body - /// Creates a new `not_found`. + /// Received HTTP response body + public var body: Components.Responses.not_found.Body + /// Creates a new `not_found`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.not_found.Body) { + self.body = body + } + } + public struct requires_authentication: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/requires_authentication/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/requires_authentication/content/application\/json`. + case json(Components.Schemas.basic_hyphen_error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.basic_hyphen_error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.requires_authentication.Body + /// Creates a new `requires_authentication`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.requires_authentication.Body) { + self.body = body + } + } + public struct forbidden: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/forbidden/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/forbidden/content/application\/json`. + case json(Components.Schemas.basic_hyphen_error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.basic_hyphen_error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.forbidden.Body + /// Creates a new `forbidden`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.forbidden.Body) { + self.body = body + } + } + public struct internal_error: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/internal_error/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/internal_error/content/application\/json`. + case json(Components.Schemas.basic_hyphen_error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.basic_hyphen_error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.internal_error.Body + /// Creates a new `internal_error`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.internal_error.Body) { + self.body = body + } + } + } + /// Types generated from the `#/components/headers` section of the OpenAPI document. + public enum Headers { + /// - Remark: Generated from `#/components/headers/link`. + public typealias link = Swift.String + } +} + +/// API operations, with input and output types, generated from `#/paths` in the OpenAPI document. +public enum Operations { + /// List all Copilot seat assignments for an enterprise + /// + /// **Note**: This endpoint is in beta and is subject to change. + /// + /// Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription. + /// + /// Users with access through multiple organizations or enterprise teams will only be counted toward `total_seats` once. + /// + /// For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the `seats` array. + /// + /// Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams. + /// + /// Personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /enterprises/{enterprise}/copilot/billing/seats`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/billing/seats/get(copilot/list-copilot-seats-for-enterprise)`. + public enum copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise { + public static let id: Swift.String = "copilot/list-copilot-seats-for-enterprise" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/path`. + public struct Path: Sendable, Hashable { + /// The slug version of the enterprise name. You can also substitute this value with the enterprise id. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/path/enterprise`. + public var enterprise: Components.Parameters.enterprise + /// Creates a new `Path`. + /// + /// - Parameters: + /// - enterprise: The slug version of the enterprise name. You can also substitute this value with the enterprise id. + public init(enterprise: Components.Parameters.enterprise) { + self.enterprise = enterprise + } + } + public var path: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Input.Path + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/query`. + public struct Query: Sendable, Hashable { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/query/page`. + public var page: Components.Parameters.page? + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/query/per_page`. + public var per_page: Swift.Int? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - page: The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// - per_page: The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + public init( + page: Components.Parameters.page? = nil, + per_page: Swift.Int? = nil + ) { + self.page = page + self.per_page = per_page + } + } + public var query: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Input.Query + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Input.Path, + query: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Input.Query = .init(), + headers: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Input.Headers = .init() + ) { + self.path = path + self.query = query + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/responses/200/headers`. + public struct Headers: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/responses/200/headers/Link`. + public var Link: Components.Headers.link? + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - Link: + public init(Link: Components.Headers.link? = nil) { + self.Link = Link + } + } + /// Received HTTP response headers + public var headers: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output.Ok.Headers + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/responses/200/content/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// The total number of Copilot seats the enterprise is being billed for. Users with access through multiple organizations or enterprise teams are only counted once. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/responses/200/content/json/total_seats`. + public var total_seats: Swift.Int? + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/responses/200/content/json/seats`. + public var seats: [Components.Schemas.copilot_hyphen_seat_hyphen_details]? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - total_seats: The total number of Copilot seats the enterprise is being billed for. Users with access through multiple organizations or enterprise teams are only counted once. + /// - seats: + public init( + total_seats: Swift.Int? = nil, + seats: [Components.Schemas.copilot_hyphen_seat_hyphen_details]? = nil + ) { + self.total_seats = total_seats + self.seats = seats + } + public enum CodingKeys: String, CodingKey { + case total_seats + case seats + } + } + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/copilot/billing/seats/GET/responses/200/content/application\/json`. + case json(Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output.Ok.Body.jsonPayload) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output.Ok.Body.jsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - headers: Received HTTP response headers + /// - body: Received HTTP response body + public init( + headers: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output.Ok.Headers = .init(), + body: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output.Ok.Body + ) { + self.headers = headers + self.body = body + } + } + /// Response /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Components.Responses.not_found.Body) { - self.body = body - } - } - public struct requires_authentication: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/requires_authentication/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/requires_authentication/content/application\/json`. - case json(Components.Schemas.basic_hyphen_error) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.basic_hyphen_error { - get throws { - switch self { - case let .json(body): - return body - } + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/billing/seats/get(copilot/list-copilot-seats-for-enterprise)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) } } } - /// Received HTTP response body - public var body: Components.Responses.requires_authentication.Body - /// Creates a new `requires_authentication`. + /// Internal Error /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Components.Responses.requires_authentication.Body) { - self.body = body + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/billing/seats/get(copilot/list-copilot-seats-for-enterprise)/responses/500`. + /// + /// HTTP response code: `500 internalServerError`. + case internalServerError(Components.Responses.internal_error) + /// The associated value of the enum case if `self` is `.internalServerError`. + /// + /// - Throws: An error if `self` is not `.internalServerError`. + /// - SeeAlso: `.internalServerError`. + public var internalServerError: Components.Responses.internal_error { + get throws { + switch self { + case let .internalServerError(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "internalServerError", + response: self + ) + } + } } - } - public struct forbidden: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/forbidden/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/forbidden/content/application\/json`. - case json(Components.Schemas.basic_hyphen_error) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.basic_hyphen_error { - get throws { - switch self { - case let .json(body): - return body - } + /// Requires authentication + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/billing/seats/get(copilot/list-copilot-seats-for-enterprise)/responses/401`. + /// + /// HTTP response code: `401 unauthorized`. + case unauthorized(Components.Responses.requires_authentication) + /// The associated value of the enum case if `self` is `.unauthorized`. + /// + /// - Throws: An error if `self` is not `.unauthorized`. + /// - SeeAlso: `.unauthorized`. + public var unauthorized: Components.Responses.requires_authentication { + get throws { + switch self { + case let .unauthorized(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unauthorized", + response: self + ) } } } - /// Received HTTP response body - public var body: Components.Responses.forbidden.Body - /// Creates a new `forbidden`. + /// Forbidden /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Components.Responses.forbidden.Body) { - self.body = body + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/billing/seats/get(copilot/list-copilot-seats-for-enterprise)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Components.Responses.forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Components.Responses.forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } } - } - public struct internal_error: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/internal_error/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/components/responses/internal_error/content/application\/json`. - case json(Components.Schemas.basic_hyphen_error) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.basic_hyphen_error { - get throws { - switch self { - case let .json(body): - return body - } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/billing/seats/get(copilot/list-copilot-seats-for-enterprise)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Components.Responses.not_found) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) } } } - /// Received HTTP response body - public var body: Components.Responses.internal_error.Body - /// Creates a new `internal_error`. + /// Undocumented response. /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Components.Responses.internal_error.Body) { - self.body = body + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] } } } - /// Types generated from the `#/components/headers` section of the OpenAPI document. - public enum Headers { - /// - Remark: Generated from `#/components/headers/link`. - public typealias link = Swift.String - } -} - -/// API operations, with input and output types, generated from `#/paths` in the OpenAPI document. -public enum Operations { /// Get a summary of Copilot usage for enterprise members /// /// **Note**: This endpoint is in beta and is subject to change. From 64f208c0a519c426e4663e642d899d45450b069e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 24 Jun 2024 21:39:13 +0000 Subject: [PATCH 016/152] Commit via running ake Sources/security-advisories --- Sources/security-advisories/Types.swift | 490 ++++++++++++------------ 1 file changed, 245 insertions(+), 245 deletions(-) diff --git a/Sources/security-advisories/Types.swift b/Sources/security-advisories/Types.swift index b184dae992f..4c15332217f 100644 --- a/Sources/security-advisories/Types.swift +++ b/Sources/security-advisories/Types.swift @@ -2166,6 +2166,251 @@ public enum Components { case anonymous_access_enabled } } + /// Groups of organization members that gives permissions on specified repositories. + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. + public struct nullable_hyphen_team_hyphen_simple: Codable, Hashable, Sendable { + /// Unique identifier of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/node_id`. + public var node_id: Swift.String + /// URL for the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/members_url`. + public var members_url: Swift.String + /// Name of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/name`. + public var name: Swift.String + /// Description of the team + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/description`. + public var description: Swift.String? + /// Permission that the team will have for its repositories + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/permission`. + public var permission: Swift.String + /// The level of privacy this team should have + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/privacy`. + public var privacy: Swift.String? + /// The notification setting the team has set + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/slug`. + public var slug: Swift.String + /// Distinguished Name (DN) that team maps to within LDAP environment + /// + /// - Remark: Generated from `#/components/schemas/nullable-team-simple/ldap_dn`. + public var ldap_dn: Swift.String? + /// Creates a new `nullable_hyphen_team_hyphen_simple`. + /// + /// - Parameters: + /// - id: Unique identifier of the team + /// - node_id: + /// - url: URL for the team + /// - members_url: + /// - name: Name of the team + /// - description: Description of the team + /// - permission: Permission that the team will have for its repositories + /// - privacy: The level of privacy this team should have + /// - notification_setting: The notification setting the team has set + /// - html_url: + /// - repositories_url: + /// - slug: + /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment + public init( + id: Swift.Int, + node_id: Swift.String, + url: Swift.String, + members_url: Swift.String, + name: Swift.String, + description: Swift.String? = nil, + permission: Swift.String, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + html_url: Swift.String, + repositories_url: Swift.String, + slug: Swift.String, + ldap_dn: Swift.String? = nil + ) { + self.id = id + self.node_id = node_id + self.url = url + self.members_url = members_url + self.name = name + self.description = description + self.permission = permission + self.privacy = privacy + self.notification_setting = notification_setting + self.html_url = html_url + self.repositories_url = repositories_url + self.slug = slug + self.ldap_dn = ldap_dn + } + public enum CodingKeys: String, CodingKey { + case id + case node_id + case url + case members_url + case name + case description + case permission + case privacy + case notification_setting + case html_url + case repositories_url + case slug + case ldap_dn + } + } + /// Groups of organization members that gives permissions on specified repositories. + /// + /// - Remark: Generated from `#/components/schemas/team`. + public struct team: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/team/node_id`. + public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/team/name`. + public var name: Swift.String + /// - Remark: Generated from `#/components/schemas/team/slug`. + public var slug: Swift.String + /// - Remark: Generated from `#/components/schemas/team/description`. + public var description: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/privacy`. + public var privacy: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/notification_setting`. + public var notification_setting: Swift.String? + /// - Remark: Generated from `#/components/schemas/team/permission`. + public var permission: Swift.String + /// - Remark: Generated from `#/components/schemas/team/permissions`. + public struct permissionsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/team/permissions/pull`. + public var pull: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/triage`. + public var triage: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/push`. + public var push: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/maintain`. + public var maintain: Swift.Bool + /// - Remark: Generated from `#/components/schemas/team/permissions/admin`. + public var admin: Swift.Bool + /// Creates a new `permissionsPayload`. + /// + /// - Parameters: + /// - pull: + /// - triage: + /// - push: + /// - maintain: + /// - admin: + public init( + pull: Swift.Bool, + triage: Swift.Bool, + push: Swift.Bool, + maintain: Swift.Bool, + admin: Swift.Bool + ) { + self.pull = pull + self.triage = triage + self.push = push + self.maintain = maintain + self.admin = admin + } + public enum CodingKeys: String, CodingKey { + case pull + case triage + case push + case maintain + case admin + } + } + /// - Remark: Generated from `#/components/schemas/team/permissions`. + public var permissions: Components.Schemas.team.permissionsPayload? + /// - Remark: Generated from `#/components/schemas/team/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/members_url`. + public var members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/repositories_url`. + public var repositories_url: Swift.String + /// - Remark: Generated from `#/components/schemas/team/parent`. + public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? + /// Creates a new `team`. + /// + /// - Parameters: + /// - id: + /// - node_id: + /// - name: + /// - slug: + /// - description: + /// - privacy: + /// - notification_setting: + /// - permission: + /// - permissions: + /// - url: + /// - html_url: + /// - members_url: + /// - repositories_url: + /// - parent: + public init( + id: Swift.Int, + node_id: Swift.String, + name: Swift.String, + slug: Swift.String, + description: Swift.String? = nil, + privacy: Swift.String? = nil, + notification_setting: Swift.String? = nil, + permission: Swift.String, + permissions: Components.Schemas.team.permissionsPayload? = nil, + url: Swift.String, + html_url: Swift.String, + members_url: Swift.String, + repositories_url: Swift.String, + parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil + ) { + self.id = id + self.node_id = node_id + self.name = name + self.slug = slug + self.description = description + self.privacy = privacy + self.notification_setting = notification_setting + self.permission = permission + self.permissions = permissions + self.url = url + self.html_url = html_url + self.members_url = members_url + self.repositories_url = repositories_url + self.parent = parent + } + public enum CodingKeys: String, CodingKey { + case id + case node_id + case name + case slug + case description + case privacy + case notification_setting + case permission + case permissions + case url + case html_url + case members_url + case repositories_url + case parent + } + } /// A GitHub repository. /// /// - Remark: Generated from `#/components/schemas/simple-repository`. @@ -2668,251 +2913,6 @@ public enum Components { case secret_scanning_push_protection } } - /// Groups of organization members that gives permissions on specified repositories. - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. - public struct nullable_hyphen_team_hyphen_simple: Codable, Hashable, Sendable { - /// Unique identifier of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/node_id`. - public var node_id: Swift.String - /// URL for the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/members_url`. - public var members_url: Swift.String - /// Name of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/name`. - public var name: Swift.String - /// Description of the team - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/description`. - public var description: Swift.String? - /// Permission that the team will have for its repositories - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/permission`. - public var permission: Swift.String - /// The level of privacy this team should have - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/privacy`. - public var privacy: Swift.String? - /// The notification setting the team has set - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/slug`. - public var slug: Swift.String - /// Distinguished Name (DN) that team maps to within LDAP environment - /// - /// - Remark: Generated from `#/components/schemas/nullable-team-simple/ldap_dn`. - public var ldap_dn: Swift.String? - /// Creates a new `nullable_hyphen_team_hyphen_simple`. - /// - /// - Parameters: - /// - id: Unique identifier of the team - /// - node_id: - /// - url: URL for the team - /// - members_url: - /// - name: Name of the team - /// - description: Description of the team - /// - permission: Permission that the team will have for its repositories - /// - privacy: The level of privacy this team should have - /// - notification_setting: The notification setting the team has set - /// - html_url: - /// - repositories_url: - /// - slug: - /// - ldap_dn: Distinguished Name (DN) that team maps to within LDAP environment - public init( - id: Swift.Int, - node_id: Swift.String, - url: Swift.String, - members_url: Swift.String, - name: Swift.String, - description: Swift.String? = nil, - permission: Swift.String, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, - html_url: Swift.String, - repositories_url: Swift.String, - slug: Swift.String, - ldap_dn: Swift.String? = nil - ) { - self.id = id - self.node_id = node_id - self.url = url - self.members_url = members_url - self.name = name - self.description = description - self.permission = permission - self.privacy = privacy - self.notification_setting = notification_setting - self.html_url = html_url - self.repositories_url = repositories_url - self.slug = slug - self.ldap_dn = ldap_dn - } - public enum CodingKeys: String, CodingKey { - case id - case node_id - case url - case members_url - case name - case description - case permission - case privacy - case notification_setting - case html_url - case repositories_url - case slug - case ldap_dn - } - } - /// Groups of organization members that gives permissions on specified repositories. - /// - /// - Remark: Generated from `#/components/schemas/team`. - public struct team: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/team/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/team/node_id`. - public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/team/name`. - public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/team/slug`. - public var slug: Swift.String - /// - Remark: Generated from `#/components/schemas/team/description`. - public var description: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/privacy`. - public var privacy: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/notification_setting`. - public var notification_setting: Swift.String? - /// - Remark: Generated from `#/components/schemas/team/permission`. - public var permission: Swift.String - /// - Remark: Generated from `#/components/schemas/team/permissions`. - public struct permissionsPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/team/permissions/pull`. - public var pull: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/triage`. - public var triage: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/push`. - public var push: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/maintain`. - public var maintain: Swift.Bool - /// - Remark: Generated from `#/components/schemas/team/permissions/admin`. - public var admin: Swift.Bool - /// Creates a new `permissionsPayload`. - /// - /// - Parameters: - /// - pull: - /// - triage: - /// - push: - /// - maintain: - /// - admin: - public init( - pull: Swift.Bool, - triage: Swift.Bool, - push: Swift.Bool, - maintain: Swift.Bool, - admin: Swift.Bool - ) { - self.pull = pull - self.triage = triage - self.push = push - self.maintain = maintain - self.admin = admin - } - public enum CodingKeys: String, CodingKey { - case pull - case triage - case push - case maintain - case admin - } - } - /// - Remark: Generated from `#/components/schemas/team/permissions`. - public var permissions: Components.Schemas.team.permissionsPayload? - /// - Remark: Generated from `#/components/schemas/team/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/html_url`. - public var html_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/members_url`. - public var members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/repositories_url`. - public var repositories_url: Swift.String - /// - Remark: Generated from `#/components/schemas/team/parent`. - public var parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? - /// Creates a new `team`. - /// - /// - Parameters: - /// - id: - /// - node_id: - /// - name: - /// - slug: - /// - description: - /// - privacy: - /// - notification_setting: - /// - permission: - /// - permissions: - /// - url: - /// - html_url: - /// - members_url: - /// - repositories_url: - /// - parent: - public init( - id: Swift.Int, - node_id: Swift.String, - name: Swift.String, - slug: Swift.String, - description: Swift.String? = nil, - privacy: Swift.String? = nil, - notification_setting: Swift.String? = nil, - permission: Swift.String, - permissions: Components.Schemas.team.permissionsPayload? = nil, - url: Swift.String, - html_url: Swift.String, - members_url: Swift.String, - repositories_url: Swift.String, - parent: Components.Schemas.nullable_hyphen_team_hyphen_simple? = nil - ) { - self.id = id - self.node_id = node_id - self.name = name - self.slug = slug - self.description = description - self.privacy = privacy - self.notification_setting = notification_setting - self.permission = permission - self.permissions = permissions - self.url = url - self.html_url = html_url - self.members_url = members_url - self.repositories_url = repositories_url - self.parent = parent - } - public enum CodingKeys: String, CodingKey { - case id - case node_id - case name - case slug - case description - case privacy - case notification_setting - case permission - case permissions - case url - case html_url - case members_url - case repositories_url - case parent - } - } /// A repository on GitHub. /// /// - Remark: Generated from `#/components/schemas/nullable-repository`. From 23e884c24d442d717d48d963765669b1d60fc0b4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 24 Jun 2024 21:40:59 +0000 Subject: [PATCH 017/152] Commit via running ake Sources/code-security --- Sources/code-security/Client.swift | 1019 ++++++++ Sources/code-security/Types.swift | 3659 +++++++++++++++++++++++++++- 2 files changed, 4673 insertions(+), 5 deletions(-) diff --git a/Sources/code-security/Client.swift b/Sources/code-security/Client.swift index 87202523ac7..03d06cab2f8 100644 --- a/Sources/code-security/Client.swift +++ b/Sources/code-security/Client.swift @@ -38,4 +38,1023 @@ public struct Client: APIProtocol { private var converter: Converter { client.converter } + /// Get code security configurations for an organization + /// + /// Lists all code security configurations available in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/get(code-security/get-configurations-for-org)`. + public func code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org(_ input: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Input) async throws -> Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Output { + try await client.send( + input: input, + forOperation: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/code-security/configurations", + parameters: [ + input.path.org + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "target_type", + value: input.query.target_type + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "per_page", + value: input.query.per_page + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "before", + value: input.query.before + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "after", + value: input.query.after + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + [Components.Schemas.code_hyphen_security_hyphen_configuration].self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.forbidden.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.not_found.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Create a code security configuration + /// + /// Creates a code security configuration in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `POST /orgs/{org}/code-security/configurations`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/post(code-security/create-configuration)`. + public func code_hyphen_security_sol_create_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_create_hyphen_configuration.Output { + try await client.send( + input: input, + forOperation: Operations.code_hyphen_security_sol_create_hyphen_configuration.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/code-security/configurations", + parameters: [ + input.path.org + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .post + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 201: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.code_hyphen_security_sol_create_hyphen_configuration.Output.Created.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.code_hyphen_security_hyphen_configuration.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .created(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Get default code security configurations + /// + /// Lists the default code security configurations for an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations/defaults`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/defaults/get(code-security/get-default-configurations)`. + public func code_hyphen_security_sol_get_hyphen_default_hyphen_configurations(_ input: Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Input) async throws -> Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Output { + try await client.send( + input: input, + forOperation: Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/code-security/configurations/defaults", + parameters: [ + input.path.org + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.code_hyphen_security_hyphen_default_hyphen_configurations.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 304: + return .notModified(.init()) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.forbidden.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.not_found.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Get a code security configuration + /// + /// Gets a code security configuration available in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations/{configuration_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/get(code-security/get-configuration)`. + public func code_hyphen_security_sol_get_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_get_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_get_hyphen_configuration.Output { + try await client.send( + input: input, + forOperation: Operations.code_hyphen_security_sol_get_hyphen_configuration.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/code-security/configurations/{}", + parameters: [ + input.path.org, + input.path.configuration_id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.code_hyphen_security_sol_get_hyphen_configuration.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.code_hyphen_security_hyphen_configuration.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 304: + return .notModified(.init()) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.forbidden.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.not_found.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Update a code security configuration + /// + /// Updates a code security configuration in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PATCH /orgs/{org}/code-security/configurations/{configuration_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/patch(code-security/update-configuration)`. + public func code_hyphen_security_sol_update_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_update_hyphen_configuration.Output { + try await client.send( + input: input, + forOperation: Operations.code_hyphen_security_sol_update_hyphen_configuration.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/code-security/configurations/{}", + parameters: [ + input.path.org, + input.path.configuration_id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .patch + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.code_hyphen_security_sol_update_hyphen_configuration.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.code_hyphen_security_hyphen_configuration.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 204: + return .noContent(.init()) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Delete a code security configuration + /// + /// Deletes the desired code security configuration from an organization. + /// Repositories attached to the configuration will retain their settings but will no longer be associated with + /// the configuration. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/code-security/configurations/{configuration_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/delete(code-security/delete-configuration)`. + public func code_hyphen_security_sol_delete_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_delete_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_delete_hyphen_configuration.Output { + try await client.send( + input: input, + forOperation: Operations.code_hyphen_security_sol_delete_hyphen_configuration.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/code-security/configurations/{}", + parameters: [ + input.path.org, + input.path.configuration_id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .delete + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 204: + return .noContent(.init()) + case 400: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.bad_request.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json", + "application/scim+json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + case "application/scim+json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.scim_hyphen_error.self, + from: responseBody, + transforming: { value in + .application_scim_plus_json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .badRequest(.init(body: body)) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.forbidden.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.not_found.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + case 409: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.conflict.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .conflict(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Attach a configuration to repositories + /// + /// Attach a code security configuration to a set of repositories. If the repositories specified are already attached to a configuration, they will be re-attached to the provided configuration. + /// + /// If insufficient GHAS licenses are available to attach the configuration to a repository, only free features will be enabled. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `POST /orgs/{org}/code-security/configurations/{configuration_id}/attach`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/attach/post(code-security/attach-configuration)`. + public func code_hyphen_security_sol_attach_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_attach_hyphen_configuration.Output { + try await client.send( + input: input, + forOperation: Operations.code_hyphen_security_sol_attach_hyphen_configuration.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/code-security/configurations/{}/attach", + parameters: [ + input.path.org, + input.path.configuration_id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .post + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 202: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.accepted.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + OpenAPIRuntime.OpenAPIObjectContainer.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .accepted(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Set a code security configuration as a default for an organization + /// + /// Sets a code security configuration as a default to be applied to new repositories in your organization. + /// + /// This configuration will be applied to the matching repository type (all, none, public, private and internal) by default when they are created. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PUT /orgs/{org}/code-security/configurations/{configuration_id}/defaults`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/defaults/put(code-security/set-configuration-as-default)`. + public func code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default(_ input: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input) async throws -> Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Output { + try await client.send( + input: input, + forOperation: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/code-security/configurations/{}/defaults", + parameters: [ + input.path.org, + input.path.configuration_id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .put + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Output.Ok.Body.jsonPayload.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.forbidden.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.not_found.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Get repositories associated with a code security configuration + /// + /// Lists the repositories associated with a code security configuration in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations/{configuration_id}/repositories`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/repositories/get(code-security/get-repositories-for-configuration)`. + public func code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Output { + try await client.send( + input: input, + forOperation: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/code-security/configurations/{}/repositories", + parameters: [ + input.path.org, + input.path.configuration_id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "per_page", + value: input.query.per_page + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "before", + value: input.query.before + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "after", + value: input.query.after + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "status", + value: input.query.status + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + [Components.Schemas.code_hyphen_security_hyphen_configuration_hyphen_repositories].self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.forbidden.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.not_found.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } } diff --git a/Sources/code-security/Types.swift b/Sources/code-security/Types.swift index 2a210decbff..5653045534b 100644 --- a/Sources/code-security/Types.swift +++ b/Sources/code-security/Types.swift @@ -10,10 +10,305 @@ import struct Foundation.Data import struct Foundation.Date #endif /// A type that performs HTTP operations defined by the OpenAPI document. -public protocol APIProtocol: Sendable {} +public protocol APIProtocol: Sendable { + /// Get code security configurations for an organization + /// + /// Lists all code security configurations available in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/get(code-security/get-configurations-for-org)`. + func code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org(_ input: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Input) async throws -> Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Output + /// Create a code security configuration + /// + /// Creates a code security configuration in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `POST /orgs/{org}/code-security/configurations`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/post(code-security/create-configuration)`. + func code_hyphen_security_sol_create_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_create_hyphen_configuration.Output + /// Get default code security configurations + /// + /// Lists the default code security configurations for an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations/defaults`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/defaults/get(code-security/get-default-configurations)`. + func code_hyphen_security_sol_get_hyphen_default_hyphen_configurations(_ input: Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Input) async throws -> Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Output + /// Get a code security configuration + /// + /// Gets a code security configuration available in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations/{configuration_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/get(code-security/get-configuration)`. + func code_hyphen_security_sol_get_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_get_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_get_hyphen_configuration.Output + /// Update a code security configuration + /// + /// Updates a code security configuration in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PATCH /orgs/{org}/code-security/configurations/{configuration_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/patch(code-security/update-configuration)`. + func code_hyphen_security_sol_update_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_update_hyphen_configuration.Output + /// Delete a code security configuration + /// + /// Deletes the desired code security configuration from an organization. + /// Repositories attached to the configuration will retain their settings but will no longer be associated with + /// the configuration. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/code-security/configurations/{configuration_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/delete(code-security/delete-configuration)`. + func code_hyphen_security_sol_delete_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_delete_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_delete_hyphen_configuration.Output + /// Attach a configuration to repositories + /// + /// Attach a code security configuration to a set of repositories. If the repositories specified are already attached to a configuration, they will be re-attached to the provided configuration. + /// + /// If insufficient GHAS licenses are available to attach the configuration to a repository, only free features will be enabled. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `POST /orgs/{org}/code-security/configurations/{configuration_id}/attach`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/attach/post(code-security/attach-configuration)`. + func code_hyphen_security_sol_attach_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_attach_hyphen_configuration.Output + /// Set a code security configuration as a default for an organization + /// + /// Sets a code security configuration as a default to be applied to new repositories in your organization. + /// + /// This configuration will be applied to the matching repository type (all, none, public, private and internal) by default when they are created. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PUT /orgs/{org}/code-security/configurations/{configuration_id}/defaults`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/defaults/put(code-security/set-configuration-as-default)`. + func code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default(_ input: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input) async throws -> Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Output + /// Get repositories associated with a code security configuration + /// + /// Lists the repositories associated with a code security configuration in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations/{configuration_id}/repositories`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/repositories/get(code-security/get-repositories-for-configuration)`. + func code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Output +} /// Convenience overloads for operation inputs. extension APIProtocol { + /// Get code security configurations for an organization + /// + /// Lists all code security configurations available in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/get(code-security/get-configurations-for-org)`. + public func code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org( + path: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Input.Path, + query: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Input.Query = .init(), + headers: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Input.Headers = .init() + ) async throws -> Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Output { + try await code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org(Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Input( + path: path, + query: query, + headers: headers + )) + } + /// Create a code security configuration + /// + /// Creates a code security configuration in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `POST /orgs/{org}/code-security/configurations`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/post(code-security/create-configuration)`. + public func code_hyphen_security_sol_create_hyphen_configuration( + path: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Path, + headers: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Headers = .init(), + body: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body + ) async throws -> Operations.code_hyphen_security_sol_create_hyphen_configuration.Output { + try await code_hyphen_security_sol_create_hyphen_configuration(Operations.code_hyphen_security_sol_create_hyphen_configuration.Input( + path: path, + headers: headers, + body: body + )) + } + /// Get default code security configurations + /// + /// Lists the default code security configurations for an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations/defaults`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/defaults/get(code-security/get-default-configurations)`. + public func code_hyphen_security_sol_get_hyphen_default_hyphen_configurations( + path: Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Input.Path, + headers: Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Input.Headers = .init() + ) async throws -> Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Output { + try await code_hyphen_security_sol_get_hyphen_default_hyphen_configurations(Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Input( + path: path, + headers: headers + )) + } + /// Get a code security configuration + /// + /// Gets a code security configuration available in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations/{configuration_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/get(code-security/get-configuration)`. + public func code_hyphen_security_sol_get_hyphen_configuration( + path: Operations.code_hyphen_security_sol_get_hyphen_configuration.Input.Path, + headers: Operations.code_hyphen_security_sol_get_hyphen_configuration.Input.Headers = .init() + ) async throws -> Operations.code_hyphen_security_sol_get_hyphen_configuration.Output { + try await code_hyphen_security_sol_get_hyphen_configuration(Operations.code_hyphen_security_sol_get_hyphen_configuration.Input( + path: path, + headers: headers + )) + } + /// Update a code security configuration + /// + /// Updates a code security configuration in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PATCH /orgs/{org}/code-security/configurations/{configuration_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/patch(code-security/update-configuration)`. + public func code_hyphen_security_sol_update_hyphen_configuration( + path: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Path, + headers: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Headers = .init(), + body: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body + ) async throws -> Operations.code_hyphen_security_sol_update_hyphen_configuration.Output { + try await code_hyphen_security_sol_update_hyphen_configuration(Operations.code_hyphen_security_sol_update_hyphen_configuration.Input( + path: path, + headers: headers, + body: body + )) + } + /// Delete a code security configuration + /// + /// Deletes the desired code security configuration from an organization. + /// Repositories attached to the configuration will retain their settings but will no longer be associated with + /// the configuration. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/code-security/configurations/{configuration_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/delete(code-security/delete-configuration)`. + public func code_hyphen_security_sol_delete_hyphen_configuration( + path: Operations.code_hyphen_security_sol_delete_hyphen_configuration.Input.Path, + headers: Operations.code_hyphen_security_sol_delete_hyphen_configuration.Input.Headers = .init() + ) async throws -> Operations.code_hyphen_security_sol_delete_hyphen_configuration.Output { + try await code_hyphen_security_sol_delete_hyphen_configuration(Operations.code_hyphen_security_sol_delete_hyphen_configuration.Input( + path: path, + headers: headers + )) + } + /// Attach a configuration to repositories + /// + /// Attach a code security configuration to a set of repositories. If the repositories specified are already attached to a configuration, they will be re-attached to the provided configuration. + /// + /// If insufficient GHAS licenses are available to attach the configuration to a repository, only free features will be enabled. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `POST /orgs/{org}/code-security/configurations/{configuration_id}/attach`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/attach/post(code-security/attach-configuration)`. + public func code_hyphen_security_sol_attach_hyphen_configuration( + path: Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input.Path, + headers: Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input.Headers = .init(), + body: Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input.Body + ) async throws -> Operations.code_hyphen_security_sol_attach_hyphen_configuration.Output { + try await code_hyphen_security_sol_attach_hyphen_configuration(Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input( + path: path, + headers: headers, + body: body + )) + } + /// Set a code security configuration as a default for an organization + /// + /// Sets a code security configuration as a default to be applied to new repositories in your organization. + /// + /// This configuration will be applied to the matching repository type (all, none, public, private and internal) by default when they are created. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PUT /orgs/{org}/code-security/configurations/{configuration_id}/defaults`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/defaults/put(code-security/set-configuration-as-default)`. + public func code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default( + path: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input.Path, + headers: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input.Headers = .init(), + body: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input.Body + ) async throws -> Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Output { + try await code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default(Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input( + path: path, + headers: headers, + body: body + )) + } + /// Get repositories associated with a code security configuration + /// + /// Lists the repositories associated with a code security configuration in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations/{configuration_id}/repositories`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/repositories/get(code-security/get-repositories-for-configuration)`. + public func code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration( + path: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Input.Path, + query: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Input.Query = .init(), + headers: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Input.Headers = .init() + ) async throws -> Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Output { + try await code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration(Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Input( + path: path, + query: query, + headers: headers + )) + } } /// Server URLs defined in the OpenAPI document. @@ -29,16 +324,3370 @@ public enum Servers { /// Types generated from the components section of the OpenAPI document. public enum Components { /// Types generated from the `#/components/schemas` section of the OpenAPI document. - public enum Schemas {} + public enum Schemas { + /// A GitHub user. + /// + /// - Remark: Generated from `#/components/schemas/simple-user`. + public struct simple_hyphen_user: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/simple-user/name`. + public var name: Swift.String? + /// - Remark: Generated from `#/components/schemas/simple-user/email`. + public var email: Swift.String? + /// - Remark: Generated from `#/components/schemas/simple-user/login`. + public var login: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. + public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. + public var avatar_url: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/gravatar_id`. + public var gravatar_id: Swift.String? + /// - Remark: Generated from `#/components/schemas/simple-user/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/html_url`. + public var html_url: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/followers_url`. + public var followers_url: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/following_url`. + public var following_url: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/gists_url`. + public var gists_url: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/starred_url`. + public var starred_url: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/subscriptions_url`. + public var subscriptions_url: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/organizations_url`. + public var organizations_url: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/repos_url`. + public var repos_url: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/events_url`. + public var events_url: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/received_events_url`. + public var received_events_url: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/type`. + public var _type: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-user/site_admin`. + public var site_admin: Swift.Bool + /// - Remark: Generated from `#/components/schemas/simple-user/starred_at`. + public var starred_at: Swift.String? + /// Creates a new `simple_hyphen_user`. + /// + /// - Parameters: + /// - name: + /// - email: + /// - login: + /// - id: + /// - node_id: + /// - avatar_url: + /// - gravatar_id: + /// - url: + /// - html_url: + /// - followers_url: + /// - following_url: + /// - gists_url: + /// - starred_url: + /// - subscriptions_url: + /// - organizations_url: + /// - repos_url: + /// - events_url: + /// - received_events_url: + /// - _type: + /// - site_admin: + /// - starred_at: + public init( + name: Swift.String? = nil, + email: Swift.String? = nil, + login: Swift.String, + id: Swift.Int, + node_id: Swift.String, + avatar_url: Swift.String, + gravatar_id: Swift.String? = nil, + url: Swift.String, + html_url: Swift.String, + followers_url: Swift.String, + following_url: Swift.String, + gists_url: Swift.String, + starred_url: Swift.String, + subscriptions_url: Swift.String, + organizations_url: Swift.String, + repos_url: Swift.String, + events_url: Swift.String, + received_events_url: Swift.String, + _type: Swift.String, + site_admin: Swift.Bool, + starred_at: Swift.String? = nil + ) { + self.name = name + self.email = email + self.login = login + self.id = id + self.node_id = node_id + self.avatar_url = avatar_url + self.gravatar_id = gravatar_id + self.url = url + self.html_url = html_url + self.followers_url = followers_url + self.following_url = following_url + self.gists_url = gists_url + self.starred_url = starred_url + self.subscriptions_url = subscriptions_url + self.organizations_url = organizations_url + self.repos_url = repos_url + self.events_url = events_url + self.received_events_url = received_events_url + self._type = _type + self.site_admin = site_admin + self.starred_at = starred_at + } + public enum CodingKeys: String, CodingKey { + case name + case email + case login + case id + case node_id + case avatar_url + case gravatar_id + case url + case html_url + case followers_url + case following_url + case gists_url + case starred_url + case subscriptions_url + case organizations_url + case repos_url + case events_url + case received_events_url + case _type = "type" + case site_admin + case starred_at + } + } + /// Basic Error + /// + /// - Remark: Generated from `#/components/schemas/basic-error`. + public struct basic_hyphen_error: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/basic-error/message`. + public var message: Swift.String? + /// - Remark: Generated from `#/components/schemas/basic-error/documentation_url`. + public var documentation_url: Swift.String? + /// - Remark: Generated from `#/components/schemas/basic-error/url`. + public var url: Swift.String? + /// - Remark: Generated from `#/components/schemas/basic-error/status`. + public var status: Swift.String? + /// Creates a new `basic_hyphen_error`. + /// + /// - Parameters: + /// - message: + /// - documentation_url: + /// - url: + /// - status: + public init( + message: Swift.String? = nil, + documentation_url: Swift.String? = nil, + url: Swift.String? = nil, + status: Swift.String? = nil + ) { + self.message = message + self.documentation_url = documentation_url + self.url = url + self.status = status + } + public enum CodingKeys: String, CodingKey { + case message + case documentation_url + case url + case status + } + } + /// Scim Error + /// + /// - Remark: Generated from `#/components/schemas/scim-error`. + public struct scim_hyphen_error: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/scim-error/message`. + public var message: Swift.String? + /// - Remark: Generated from `#/components/schemas/scim-error/documentation_url`. + public var documentation_url: Swift.String? + /// - Remark: Generated from `#/components/schemas/scim-error/detail`. + public var detail: Swift.String? + /// - Remark: Generated from `#/components/schemas/scim-error/status`. + public var status: Swift.Int? + /// - Remark: Generated from `#/components/schemas/scim-error/scimType`. + public var scimType: Swift.String? + /// - Remark: Generated from `#/components/schemas/scim-error/schemas`. + public var schemas: [Swift.String]? + /// Creates a new `scim_hyphen_error`. + /// + /// - Parameters: + /// - message: + /// - documentation_url: + /// - detail: + /// - status: + /// - scimType: + /// - schemas: + public init( + message: Swift.String? = nil, + documentation_url: Swift.String? = nil, + detail: Swift.String? = nil, + status: Swift.Int? = nil, + scimType: Swift.String? = nil, + schemas: [Swift.String]? = nil + ) { + self.message = message + self.documentation_url = documentation_url + self.detail = detail + self.status = status + self.scimType = scimType + self.schemas = schemas + } + public enum CodingKeys: String, CodingKey { + case message + case documentation_url + case detail + case status + case scimType + case schemas + } + } + /// A GitHub repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository`. + public struct simple_hyphen_repository: Codable, Hashable, Sendable { + /// A unique identifier of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/id`. + public var id: Swift.Int + /// The GraphQL identifier of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/node_id`. + public var node_id: Swift.String + /// The name of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/name`. + public var name: Swift.String + /// The full, globally unique, name of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/full_name`. + public var full_name: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-repository/owner`. + public var owner: Components.Schemas.simple_hyphen_user + /// Whether the repository is private. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/private`. + public var _private: Swift.Bool + /// The URL to view the repository on GitHub.com. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/html_url`. + public var html_url: Swift.String + /// The repository description. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/description`. + public var description: Swift.String? + /// Whether the repository is a fork. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/fork`. + public var fork: Swift.Bool + /// The URL to get more information about the repository from the GitHub API. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/url`. + public var url: Swift.String + /// A template for the API URL to download the repository as an archive. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/archive_url`. + public var archive_url: Swift.String + /// A template for the API URL to list the available assignees for issues in the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/assignees_url`. + public var assignees_url: Swift.String + /// A template for the API URL to create or retrieve a raw Git blob in the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/blobs_url`. + public var blobs_url: Swift.String + /// A template for the API URL to get information about branches in the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/branches_url`. + public var branches_url: Swift.String + /// A template for the API URL to get information about collaborators of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/collaborators_url`. + public var collaborators_url: Swift.String + /// A template for the API URL to get information about comments on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/comments_url`. + public var comments_url: Swift.String + /// A template for the API URL to get information about commits on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/commits_url`. + public var commits_url: Swift.String + /// A template for the API URL to compare two commits or refs. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/compare_url`. + public var compare_url: Swift.String + /// A template for the API URL to get the contents of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/contents_url`. + public var contents_url: Swift.String + /// A template for the API URL to list the contributors to the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/contributors_url`. + public var contributors_url: Swift.String + /// The API URL to list the deployments of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/deployments_url`. + public var deployments_url: Swift.String + /// The API URL to list the downloads on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/downloads_url`. + public var downloads_url: Swift.String + /// The API URL to list the events of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/events_url`. + public var events_url: Swift.String + /// The API URL to list the forks of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/forks_url`. + public var forks_url: Swift.String + /// A template for the API URL to get information about Git commits of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/git_commits_url`. + public var git_commits_url: Swift.String + /// A template for the API URL to get information about Git refs of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/git_refs_url`. + public var git_refs_url: Swift.String + /// A template for the API URL to get information about Git tags of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/git_tags_url`. + public var git_tags_url: Swift.String + /// A template for the API URL to get information about issue comments on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/issue_comment_url`. + public var issue_comment_url: Swift.String + /// A template for the API URL to get information about issue events on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/issue_events_url`. + public var issue_events_url: Swift.String + /// A template for the API URL to get information about issues on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/issues_url`. + public var issues_url: Swift.String + /// A template for the API URL to get information about deploy keys on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/keys_url`. + public var keys_url: Swift.String + /// A template for the API URL to get information about labels of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/labels_url`. + public var labels_url: Swift.String + /// The API URL to get information about the languages of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/languages_url`. + public var languages_url: Swift.String + /// The API URL to merge branches in the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/merges_url`. + public var merges_url: Swift.String + /// A template for the API URL to get information about milestones of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/milestones_url`. + public var milestones_url: Swift.String + /// A template for the API URL to get information about notifications on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/notifications_url`. + public var notifications_url: Swift.String + /// A template for the API URL to get information about pull requests on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/pulls_url`. + public var pulls_url: Swift.String + /// A template for the API URL to get information about releases on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/releases_url`. + public var releases_url: Swift.String + /// The API URL to list the stargazers on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/stargazers_url`. + public var stargazers_url: Swift.String + /// A template for the API URL to get information about statuses of a commit. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/statuses_url`. + public var statuses_url: Swift.String + /// The API URL to list the subscribers on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/subscribers_url`. + public var subscribers_url: Swift.String + /// The API URL to subscribe to notifications for this repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/subscription_url`. + public var subscription_url: Swift.String + /// The API URL to get information about tags on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/tags_url`. + public var tags_url: Swift.String + /// The API URL to list the teams on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/teams_url`. + public var teams_url: Swift.String + /// A template for the API URL to create or retrieve a raw Git tree of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/trees_url`. + public var trees_url: Swift.String + /// The API URL to list the hooks on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/hooks_url`. + public var hooks_url: Swift.String + /// Creates a new `simple_hyphen_repository`. + /// + /// - Parameters: + /// - id: A unique identifier of the repository. + /// - node_id: The GraphQL identifier of the repository. + /// - name: The name of the repository. + /// - full_name: The full, globally unique, name of the repository. + /// - owner: + /// - _private: Whether the repository is private. + /// - html_url: The URL to view the repository on GitHub.com. + /// - description: The repository description. + /// - fork: Whether the repository is a fork. + /// - url: The URL to get more information about the repository from the GitHub API. + /// - archive_url: A template for the API URL to download the repository as an archive. + /// - assignees_url: A template for the API URL to list the available assignees for issues in the repository. + /// - blobs_url: A template for the API URL to create or retrieve a raw Git blob in the repository. + /// - branches_url: A template for the API URL to get information about branches in the repository. + /// - collaborators_url: A template for the API URL to get information about collaborators of the repository. + /// - comments_url: A template for the API URL to get information about comments on the repository. + /// - commits_url: A template for the API URL to get information about commits on the repository. + /// - compare_url: A template for the API URL to compare two commits or refs. + /// - contents_url: A template for the API URL to get the contents of the repository. + /// - contributors_url: A template for the API URL to list the contributors to the repository. + /// - deployments_url: The API URL to list the deployments of the repository. + /// - downloads_url: The API URL to list the downloads on the repository. + /// - events_url: The API URL to list the events of the repository. + /// - forks_url: The API URL to list the forks of the repository. + /// - git_commits_url: A template for the API URL to get information about Git commits of the repository. + /// - git_refs_url: A template for the API URL to get information about Git refs of the repository. + /// - git_tags_url: A template for the API URL to get information about Git tags of the repository. + /// - issue_comment_url: A template for the API URL to get information about issue comments on the repository. + /// - issue_events_url: A template for the API URL to get information about issue events on the repository. + /// - issues_url: A template for the API URL to get information about issues on the repository. + /// - keys_url: A template for the API URL to get information about deploy keys on the repository. + /// - labels_url: A template for the API URL to get information about labels of the repository. + /// - languages_url: The API URL to get information about the languages of the repository. + /// - merges_url: The API URL to merge branches in the repository. + /// - milestones_url: A template for the API URL to get information about milestones of the repository. + /// - notifications_url: A template for the API URL to get information about notifications on the repository. + /// - pulls_url: A template for the API URL to get information about pull requests on the repository. + /// - releases_url: A template for the API URL to get information about releases on the repository. + /// - stargazers_url: The API URL to list the stargazers on the repository. + /// - statuses_url: A template for the API URL to get information about statuses of a commit. + /// - subscribers_url: The API URL to list the subscribers on the repository. + /// - subscription_url: The API URL to subscribe to notifications for this repository. + /// - tags_url: The API URL to get information about tags on the repository. + /// - teams_url: The API URL to list the teams on the repository. + /// - trees_url: A template for the API URL to create or retrieve a raw Git tree of the repository. + /// - hooks_url: The API URL to list the hooks on the repository. + public init( + id: Swift.Int, + node_id: Swift.String, + name: Swift.String, + full_name: Swift.String, + owner: Components.Schemas.simple_hyphen_user, + _private: Swift.Bool, + html_url: Swift.String, + description: Swift.String? = nil, + fork: Swift.Bool, + url: Swift.String, + archive_url: Swift.String, + assignees_url: Swift.String, + blobs_url: Swift.String, + branches_url: Swift.String, + collaborators_url: Swift.String, + comments_url: Swift.String, + commits_url: Swift.String, + compare_url: Swift.String, + contents_url: Swift.String, + contributors_url: Swift.String, + deployments_url: Swift.String, + downloads_url: Swift.String, + events_url: Swift.String, + forks_url: Swift.String, + git_commits_url: Swift.String, + git_refs_url: Swift.String, + git_tags_url: Swift.String, + issue_comment_url: Swift.String, + issue_events_url: Swift.String, + issues_url: Swift.String, + keys_url: Swift.String, + labels_url: Swift.String, + languages_url: Swift.String, + merges_url: Swift.String, + milestones_url: Swift.String, + notifications_url: Swift.String, + pulls_url: Swift.String, + releases_url: Swift.String, + stargazers_url: Swift.String, + statuses_url: Swift.String, + subscribers_url: Swift.String, + subscription_url: Swift.String, + tags_url: Swift.String, + teams_url: Swift.String, + trees_url: Swift.String, + hooks_url: Swift.String + ) { + self.id = id + self.node_id = node_id + self.name = name + self.full_name = full_name + self.owner = owner + self._private = _private + self.html_url = html_url + self.description = description + self.fork = fork + self.url = url + self.archive_url = archive_url + self.assignees_url = assignees_url + self.blobs_url = blobs_url + self.branches_url = branches_url + self.collaborators_url = collaborators_url + self.comments_url = comments_url + self.commits_url = commits_url + self.compare_url = compare_url + self.contents_url = contents_url + self.contributors_url = contributors_url + self.deployments_url = deployments_url + self.downloads_url = downloads_url + self.events_url = events_url + self.forks_url = forks_url + self.git_commits_url = git_commits_url + self.git_refs_url = git_refs_url + self.git_tags_url = git_tags_url + self.issue_comment_url = issue_comment_url + self.issue_events_url = issue_events_url + self.issues_url = issues_url + self.keys_url = keys_url + self.labels_url = labels_url + self.languages_url = languages_url + self.merges_url = merges_url + self.milestones_url = milestones_url + self.notifications_url = notifications_url + self.pulls_url = pulls_url + self.releases_url = releases_url + self.stargazers_url = stargazers_url + self.statuses_url = statuses_url + self.subscribers_url = subscribers_url + self.subscription_url = subscription_url + self.tags_url = tags_url + self.teams_url = teams_url + self.trees_url = trees_url + self.hooks_url = hooks_url + } + public enum CodingKeys: String, CodingKey { + case id + case node_id + case name + case full_name + case owner + case _private = "private" + case html_url + case description + case fork + case url + case archive_url + case assignees_url + case blobs_url + case branches_url + case collaborators_url + case comments_url + case commits_url + case compare_url + case contents_url + case contributors_url + case deployments_url + case downloads_url + case events_url + case forks_url + case git_commits_url + case git_refs_url + case git_tags_url + case issue_comment_url + case issue_events_url + case issues_url + case keys_url + case labels_url + case languages_url + case merges_url + case milestones_url + case notifications_url + case pulls_url + case releases_url + case stargazers_url + case statuses_url + case subscribers_url + case subscription_url + case tags_url + case teams_url + case trees_url + case hooks_url + } + } + /// A code security configuration + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration`. + public struct code_hyphen_security_hyphen_configuration: Codable, Hashable, Sendable { + /// The ID of the code security configuration + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/id`. + public var id: Swift.Int? + /// The name of the code security configuration. Must be unique within the organization. + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/name`. + public var name: Swift.String? + /// The type of the code security configuration. + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/target_type`. + @frozen public enum target_typePayload: String, Codable, Hashable, Sendable { + case global = "global" + case organization = "organization" + } + /// The type of the code security configuration. + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/target_type`. + public var target_type: Components.Schemas.code_hyphen_security_hyphen_configuration.target_typePayload? + /// A description of the code security configuration + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/description`. + public var description: Swift.String? + /// The enablement status of GitHub Advanced Security + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/advanced_security`. + @frozen public enum advanced_securityPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// The enablement status of GitHub Advanced Security + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/advanced_security`. + public var advanced_security: Components.Schemas.code_hyphen_security_hyphen_configuration.advanced_securityPayload? + /// The enablement status of Dependency Graph + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/dependency_graph`. + @frozen public enum dependency_graphPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of Dependency Graph + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/dependency_graph`. + public var dependency_graph: Components.Schemas.code_hyphen_security_hyphen_configuration.dependency_graphPayload? + /// The enablement status of Dependabot alerts + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/dependabot_alerts`. + @frozen public enum dependabot_alertsPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of Dependabot alerts + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/dependabot_alerts`. + public var dependabot_alerts: Components.Schemas.code_hyphen_security_hyphen_configuration.dependabot_alertsPayload? + /// The enablement status of Dependabot security updates + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/dependabot_security_updates`. + @frozen public enum dependabot_security_updatesPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of Dependabot security updates + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/dependabot_security_updates`. + public var dependabot_security_updates: Components.Schemas.code_hyphen_security_hyphen_configuration.dependabot_security_updatesPayload? + /// The enablement status of code scanning default setup + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/code_scanning_default_setup`. + @frozen public enum code_scanning_default_setupPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of code scanning default setup + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/code_scanning_default_setup`. + public var code_scanning_default_setup: Components.Schemas.code_hyphen_security_hyphen_configuration.code_scanning_default_setupPayload? + /// The enablement status of secret scanning + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning`. + @frozen public enum secret_scanningPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning`. + public var secret_scanning: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanningPayload? + /// The enablement status of secret scanning push protection + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_push_protection`. + @frozen public enum secret_scanning_push_protectionPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning push protection + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_push_protection`. + public var secret_scanning_push_protection: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_push_protectionPayload? + /// The enablement status of private vulnerability reporting + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/private_vulnerability_reporting`. + @frozen public enum private_vulnerability_reportingPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of private vulnerability reporting + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/private_vulnerability_reporting`. + public var private_vulnerability_reporting: Components.Schemas.code_hyphen_security_hyphen_configuration.private_vulnerability_reportingPayload? + /// The URL of the configuration + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/url`. + public var url: Swift.String? + /// The URL of the configuration + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/html_url`. + public var html_url: Swift.String? + /// - Remark: Generated from `#/components/schemas/code-security-configuration/created_at`. + public var created_at: Foundation.Date? + /// - Remark: Generated from `#/components/schemas/code-security-configuration/updated_at`. + public var updated_at: Foundation.Date? + /// Creates a new `code_hyphen_security_hyphen_configuration`. + /// + /// - Parameters: + /// - id: The ID of the code security configuration + /// - name: The name of the code security configuration. Must be unique within the organization. + /// - target_type: The type of the code security configuration. + /// - description: A description of the code security configuration + /// - advanced_security: The enablement status of GitHub Advanced Security + /// - dependency_graph: The enablement status of Dependency Graph + /// - dependabot_alerts: The enablement status of Dependabot alerts + /// - dependabot_security_updates: The enablement status of Dependabot security updates + /// - code_scanning_default_setup: The enablement status of code scanning default setup + /// - secret_scanning: The enablement status of secret scanning + /// - secret_scanning_push_protection: The enablement status of secret scanning push protection + /// - private_vulnerability_reporting: The enablement status of private vulnerability reporting + /// - url: The URL of the configuration + /// - html_url: The URL of the configuration + /// - created_at: + /// - updated_at: + public init( + id: Swift.Int? = nil, + name: Swift.String? = nil, + target_type: Components.Schemas.code_hyphen_security_hyphen_configuration.target_typePayload? = nil, + description: Swift.String? = nil, + advanced_security: Components.Schemas.code_hyphen_security_hyphen_configuration.advanced_securityPayload? = nil, + dependency_graph: Components.Schemas.code_hyphen_security_hyphen_configuration.dependency_graphPayload? = nil, + dependabot_alerts: Components.Schemas.code_hyphen_security_hyphen_configuration.dependabot_alertsPayload? = nil, + dependabot_security_updates: Components.Schemas.code_hyphen_security_hyphen_configuration.dependabot_security_updatesPayload? = nil, + code_scanning_default_setup: Components.Schemas.code_hyphen_security_hyphen_configuration.code_scanning_default_setupPayload? = nil, + secret_scanning: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanningPayload? = nil, + secret_scanning_push_protection: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_push_protectionPayload? = nil, + private_vulnerability_reporting: Components.Schemas.code_hyphen_security_hyphen_configuration.private_vulnerability_reportingPayload? = nil, + url: Swift.String? = nil, + html_url: Swift.String? = nil, + created_at: Foundation.Date? = nil, + updated_at: Foundation.Date? = nil + ) { + self.id = id + self.name = name + self.target_type = target_type + self.description = description + self.advanced_security = advanced_security + self.dependency_graph = dependency_graph + self.dependabot_alerts = dependabot_alerts + self.dependabot_security_updates = dependabot_security_updates + self.code_scanning_default_setup = code_scanning_default_setup + self.secret_scanning = secret_scanning + self.secret_scanning_push_protection = secret_scanning_push_protection + self.private_vulnerability_reporting = private_vulnerability_reporting + self.url = url + self.html_url = html_url + self.created_at = created_at + self.updated_at = updated_at + } + public enum CodingKeys: String, CodingKey { + case id + case name + case target_type + case description + case advanced_security + case dependency_graph + case dependabot_alerts + case dependabot_security_updates + case code_scanning_default_setup + case secret_scanning + case secret_scanning_push_protection + case private_vulnerability_reporting + case url + case html_url + case created_at + case updated_at + } + } + /// - Remark: Generated from `#/components/schemas/code_hyphen_security_hyphen_default_hyphen_configurations`. + public struct code_hyphen_security_hyphen_default_hyphen_configurationsPayload: Codable, Hashable, Sendable { + /// The visibility of newly created repositories for which the code security configuration will be applied to by default + /// + /// - Remark: Generated from `#/components/schemas/code_hyphen_security_hyphen_default_hyphen_configurations/default_for_new_repos`. + public var default_for_new_repos: OpenAPIRuntime.OpenAPIValueContainer? + /// - Remark: Generated from `#/components/schemas/code_hyphen_security_hyphen_default_hyphen_configurations/configuration`. + public var configuration: Components.Schemas.code_hyphen_security_hyphen_configuration? + /// Creates a new `code_hyphen_security_hyphen_default_hyphen_configurationsPayload`. + /// + /// - Parameters: + /// - default_for_new_repos: The visibility of newly created repositories for which the code security configuration will be applied to by default + /// - configuration: + public init( + default_for_new_repos: OpenAPIRuntime.OpenAPIValueContainer? = nil, + configuration: Components.Schemas.code_hyphen_security_hyphen_configuration? = nil + ) { + self.default_for_new_repos = default_for_new_repos + self.configuration = configuration + } + public enum CodingKeys: String, CodingKey { + case default_for_new_repos + case configuration + } + } + /// A list of default code security configurations + /// + /// - Remark: Generated from `#/components/schemas/code-security-default-configurations`. + public typealias code_hyphen_security_hyphen_default_hyphen_configurations = [Components.Schemas.code_hyphen_security_hyphen_default_hyphen_configurationsPayload] + /// Repositories associated with a code security configuration and attachment status + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration-repositories`. + public struct code_hyphen_security_hyphen_configuration_hyphen_repositories: Codable, Hashable, Sendable { + /// The attachment status of the code security configuration on the repository. + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration-repositories/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case attached = "attached" + case attaching = "attaching" + case detached = "detached" + case enforced = "enforced" + case failed = "failed" + case updating = "updating" + } + /// The attachment status of the code security configuration on the repository. + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration-repositories/status`. + public var status: Components.Schemas.code_hyphen_security_hyphen_configuration_hyphen_repositories.statusPayload? + /// - Remark: Generated from `#/components/schemas/code-security-configuration-repositories/repository`. + public var repository: Components.Schemas.simple_hyphen_repository? + /// Creates a new `code_hyphen_security_hyphen_configuration_hyphen_repositories`. + /// + /// - Parameters: + /// - status: The attachment status of the code security configuration on the repository. + /// - repository: + public init( + status: Components.Schemas.code_hyphen_security_hyphen_configuration_hyphen_repositories.statusPayload? = nil, + repository: Components.Schemas.simple_hyphen_repository? = nil + ) { + self.status = status + self.repository = repository + } + public enum CodingKeys: String, CodingKey { + case status + case repository + } + } + } /// Types generated from the `#/components/parameters` section of the OpenAPI document. - public enum Parameters {} + public enum Parameters { + /// A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// + /// - Remark: Generated from `#/components/parameters/pagination-before`. + public typealias pagination_hyphen_before = Swift.String + /// A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// + /// - Remark: Generated from `#/components/parameters/pagination-after`. + public typealias pagination_hyphen_after = Swift.String + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/components/parameters/org`. + public typealias org = Swift.String + /// The unique identifier of the code security configuration. + /// + /// - Remark: Generated from `#/components/parameters/configuration-id`. + public typealias configuration_hyphen_id = Swift.Int + } /// Types generated from the `#/components/requestBodies` section of the OpenAPI document. public enum RequestBodies {} /// Types generated from the `#/components/responses` section of the OpenAPI document. - public enum Responses {} + public enum Responses { + public struct not_found: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/not_found/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/not_found/content/application\/json`. + case json(Components.Schemas.basic_hyphen_error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.basic_hyphen_error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.not_found.Body + /// Creates a new `not_found`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.not_found.Body) { + self.body = body + } + } + public struct bad_request: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/bad_request/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/bad_request/content/application\/json`. + case json(Components.Schemas.basic_hyphen_error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.basic_hyphen_error { + get throws { + switch self { + case let .json(body): + return body + default: + try throwUnexpectedResponseBody( + expectedContent: "application/json", + body: self + ) + } + } + } + /// - Remark: Generated from `#/components/responses/bad_request/content/application\/scim+json`. + case application_scim_plus_json(Components.Schemas.scim_hyphen_error) + /// The associated value of the enum case if `self` is `.application_scim_plus_json`. + /// + /// - Throws: An error if `self` is not `.application_scim_plus_json`. + /// - SeeAlso: `.application_scim_plus_json`. + public var application_scim_plus_json: Components.Schemas.scim_hyphen_error { + get throws { + switch self { + case let .application_scim_plus_json(body): + return body + default: + try throwUnexpectedResponseBody( + expectedContent: "application/scim+json", + body: self + ) + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.bad_request.Body + /// Creates a new `bad_request`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.bad_request.Body) { + self.body = body + } + } + public struct accepted: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/accepted/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/accepted/content/application\/json`. + case json(OpenAPIRuntime.OpenAPIObjectContainer) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: OpenAPIRuntime.OpenAPIObjectContainer { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.accepted.Body + /// Creates a new `accepted`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.accepted.Body) { + self.body = body + } + } + public struct not_modified: Sendable, Hashable { + /// Creates a new `not_modified`. + public init() {} + } + public struct forbidden: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/forbidden/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/forbidden/content/application\/json`. + case json(Components.Schemas.basic_hyphen_error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.basic_hyphen_error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.forbidden.Body + /// Creates a new `forbidden`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.forbidden.Body) { + self.body = body + } + } + public struct conflict: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/conflict/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/conflict/content/application\/json`. + case json(Components.Schemas.basic_hyphen_error) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.basic_hyphen_error { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.conflict.Body + /// Creates a new `conflict`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.conflict.Body) { + self.body = body + } + } + public struct no_content: Sendable, Hashable { + /// Creates a new `no_content`. + public init() {} + } + } /// Types generated from the `#/components/headers` section of the OpenAPI document. public enum Headers {} } /// API operations, with input and output types, generated from `#/paths` in the OpenAPI document. -public enum Operations {} +public enum Operations { + /// Get code security configurations for an organization + /// + /// Lists all code security configurations available in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/get(code-security/get-configurations-for-org)`. + public enum code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org { + public static let id: Swift.String = "code-security/get-configurations-for-org" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/GET/path/org`. + public var org: Components.Parameters.org + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + public init(org: Components.Parameters.org) { + self.org = org + } + } + public var path: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/GET/query`. + public struct Query: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/GET/query/target_type`. + @frozen public enum target_typePayload: String, Codable, Hashable, Sendable { + case global = "global" + case all = "all" + } + /// The target type of the code security configuration + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/GET/query/target_type`. + public var target_type: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Input.Query.target_typePayload? + /// 'The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."' + /// + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/GET/query/per_page`. + public var per_page: Swift.Int? + /// A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/GET/query/before`. + public var before: Components.Parameters.pagination_hyphen_before? + /// A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/GET/query/after`. + public var after: Components.Parameters.pagination_hyphen_after? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - target_type: The target type of the code security configuration + /// - per_page: 'The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."' + /// - before: A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// - after: A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + public init( + target_type: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Input.Query.target_typePayload? = nil, + per_page: Swift.Int? = nil, + before: Components.Parameters.pagination_hyphen_before? = nil, + after: Components.Parameters.pagination_hyphen_after? = nil + ) { + self.target_type = target_type + self.per_page = per_page + self.before = before + self.after = after + } + } + public var query: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Input.Query + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Input.Path, + query: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Input.Query = .init(), + headers: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Input.Headers = .init() + ) { + self.path = path + self.query = query + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/GET/responses/200/content/application\/json`. + case json([Components.Schemas.code_hyphen_security_hyphen_configuration]) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: [Components.Schemas.code_hyphen_security_hyphen_configuration] { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/get(code-security/get-configurations-for-org)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Forbidden + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/get(code-security/get-configurations-for-org)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Components.Responses.forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Components.Responses.forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/get(code-security/get-configurations-for-org)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Components.Responses.not_found) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// Create a code security configuration + /// + /// Creates a code security configuration in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `POST /orgs/{org}/code-security/configurations`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/post(code-security/create-configuration)`. + public enum code_hyphen_security_sol_create_hyphen_configuration { + public static let id: Swift.String = "code-security/create-configuration" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/path/org`. + public var org: Components.Parameters.org + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + public init(org: Components.Parameters.org) { + self.org = org + } + } + public var path: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Headers + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// The name of the code security configuration. Must be unique within the organization. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/name`. + public var name: Swift.String + /// A description of the code security configuration + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/description`. + public var description: Swift.String + /// The enablement status of GitHub Advanced Security + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/advanced_security`. + @frozen public enum advanced_securityPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// The enablement status of GitHub Advanced Security + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/advanced_security`. + public var advanced_security: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.advanced_securityPayload? + /// The enablement status of Dependency Graph + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/dependency_graph`. + @frozen public enum dependency_graphPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of Dependency Graph + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/dependency_graph`. + public var dependency_graph: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependency_graphPayload? + /// The enablement status of Dependabot alerts + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/dependabot_alerts`. + @frozen public enum dependabot_alertsPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of Dependabot alerts + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/dependabot_alerts`. + public var dependabot_alerts: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependabot_alertsPayload? + /// The enablement status of Dependabot security updates + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/dependabot_security_updates`. + @frozen public enum dependabot_security_updatesPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of Dependabot security updates + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/dependabot_security_updates`. + public var dependabot_security_updates: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependabot_security_updatesPayload? + /// The enablement status of code scanning default setup + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/code_scanning_default_setup`. + @frozen public enum code_scanning_default_setupPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of code scanning default setup + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/code_scanning_default_setup`. + public var code_scanning_default_setup: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.code_scanning_default_setupPayload? + /// The enablement status of secret scanning + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning`. + @frozen public enum secret_scanningPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning`. + public var secret_scanning: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanningPayload? + /// The enablement status of secret scanning push protection + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_push_protection`. + @frozen public enum secret_scanning_push_protectionPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning push protection + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_push_protection`. + public var secret_scanning_push_protection: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload? + /// The enablement status of private vulnerability reporting + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/private_vulnerability_reporting`. + @frozen public enum private_vulnerability_reportingPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of private vulnerability reporting + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/private_vulnerability_reporting`. + public var private_vulnerability_reporting: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - name: The name of the code security configuration. Must be unique within the organization. + /// - description: A description of the code security configuration + /// - advanced_security: The enablement status of GitHub Advanced Security + /// - dependency_graph: The enablement status of Dependency Graph + /// - dependabot_alerts: The enablement status of Dependabot alerts + /// - dependabot_security_updates: The enablement status of Dependabot security updates + /// - code_scanning_default_setup: The enablement status of code scanning default setup + /// - secret_scanning: The enablement status of secret scanning + /// - secret_scanning_push_protection: The enablement status of secret scanning push protection + /// - private_vulnerability_reporting: The enablement status of private vulnerability reporting + public init( + name: Swift.String, + description: Swift.String, + advanced_security: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.advanced_securityPayload? = nil, + dependency_graph: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependency_graphPayload? = nil, + dependabot_alerts: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependabot_alertsPayload? = nil, + dependabot_security_updates: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependabot_security_updatesPayload? = nil, + code_scanning_default_setup: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.code_scanning_default_setupPayload? = nil, + secret_scanning: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanningPayload? = nil, + secret_scanning_push_protection: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload? = nil, + private_vulnerability_reporting: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload? = nil + ) { + self.name = name + self.description = description + self.advanced_security = advanced_security + self.dependency_graph = dependency_graph + self.dependabot_alerts = dependabot_alerts + self.dependabot_security_updates = dependabot_security_updates + self.code_scanning_default_setup = code_scanning_default_setup + self.secret_scanning = secret_scanning + self.secret_scanning_push_protection = secret_scanning_push_protection + self.private_vulnerability_reporting = private_vulnerability_reporting + } + public enum CodingKeys: String, CodingKey { + case name + case description + case advanced_security + case dependency_graph + case dependabot_alerts + case dependabot_security_updates + case code_scanning_default_setup + case secret_scanning + case secret_scanning_push_protection + case private_vulnerability_reporting + } + public init(from decoder: any Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode( + Swift.String.self, + forKey: .name + ) + description = try container.decode( + Swift.String.self, + forKey: .description + ) + advanced_security = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.advanced_securityPayload.self, + forKey: .advanced_security + ) + dependency_graph = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependency_graphPayload.self, + forKey: .dependency_graph + ) + dependabot_alerts = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependabot_alertsPayload.self, + forKey: .dependabot_alerts + ) + dependabot_security_updates = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependabot_security_updatesPayload.self, + forKey: .dependabot_security_updates + ) + code_scanning_default_setup = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.code_scanning_default_setupPayload.self, + forKey: .code_scanning_default_setup + ) + secret_scanning = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanningPayload.self, + forKey: .secret_scanning + ) + secret_scanning_push_protection = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload.self, + forKey: .secret_scanning_push_protection + ) + private_vulnerability_reporting = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload.self, + forKey: .private_vulnerability_reporting + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "name", + "description", + "advanced_security", + "dependency_graph", + "dependabot_alerts", + "dependabot_security_updates", + "code_scanning_default_setup", + "secret_scanning", + "secret_scanning_push_protection", + "private_vulnerability_reporting" + ]) + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/content/application\/json`. + case json(Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload) + } + public var body: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Path, + headers: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Headers = .init(), + body: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body + ) { + self.path = path + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Created: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/responses/201/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/responses/201/content/application\/json`. + case json(Components.Schemas.code_hyphen_security_hyphen_configuration) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.code_hyphen_security_hyphen_configuration { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.code_hyphen_security_sol_create_hyphen_configuration.Output.Created.Body + /// Creates a new `Created`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.code_hyphen_security_sol_create_hyphen_configuration.Output.Created.Body) { + self.body = body + } + } + /// Successfully created code security configuration + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/post(code-security/create-configuration)/responses/201`. + /// + /// HTTP response code: `201 created`. + case created(Operations.code_hyphen_security_sol_create_hyphen_configuration.Output.Created) + /// The associated value of the enum case if `self` is `.created`. + /// + /// - Throws: An error if `self` is not `.created`. + /// - SeeAlso: `.created`. + public var created: Operations.code_hyphen_security_sol_create_hyphen_configuration.Output.Created { + get throws { + switch self { + case let .created(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "created", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// Get default code security configurations + /// + /// Lists the default code security configurations for an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations/defaults`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/defaults/get(code-security/get-default-configurations)`. + public enum code_hyphen_security_sol_get_hyphen_default_hyphen_configurations { + public static let id: Swift.String = "code-security/get-default-configurations" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/defaults/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/defaults/GET/path/org`. + public var org: Components.Parameters.org + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + public init(org: Components.Parameters.org) { + self.org = org + } + } + public var path: Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/defaults/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + public init( + path: Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Input.Path, + headers: Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Input.Headers = .init() + ) { + self.path = path + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/defaults/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/defaults/GET/responses/200/content/application\/json`. + case json(Components.Schemas.code_hyphen_security_hyphen_default_hyphen_configurations) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.code_hyphen_security_hyphen_default_hyphen_configurations { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/defaults/get(code-security/get-default-configurations)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Not modified + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/defaults/get(code-security/get-default-configurations)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + case notModified(Components.Responses.not_modified) + /// The associated value of the enum case if `self` is `.notModified`. + /// + /// - Throws: An error if `self` is not `.notModified`. + /// - SeeAlso: `.notModified`. + public var notModified: Components.Responses.not_modified { + get throws { + switch self { + case let .notModified(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notModified", + response: self + ) + } + } + } + /// Forbidden + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/defaults/get(code-security/get-default-configurations)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Components.Responses.forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Components.Responses.forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/defaults/get(code-security/get-default-configurations)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Components.Responses.not_found) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// Get a code security configuration + /// + /// Gets a code security configuration available in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations/{configuration_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/get(code-security/get-configuration)`. + public enum code_hyphen_security_sol_get_hyphen_configuration { + public static let id: Swift.String = "code-security/get-configuration" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/GET/path/org`. + public var org: Components.Parameters.org + /// The unique identifier of the code security configuration. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/GET/path/configuration_id`. + public var configuration_id: Components.Parameters.configuration_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - configuration_id: The unique identifier of the code security configuration. + public init( + org: Components.Parameters.org, + configuration_id: Components.Parameters.configuration_hyphen_id + ) { + self.org = org + self.configuration_id = configuration_id + } + } + public var path: Operations.code_hyphen_security_sol_get_hyphen_configuration.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.code_hyphen_security_sol_get_hyphen_configuration.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + public init( + path: Operations.code_hyphen_security_sol_get_hyphen_configuration.Input.Path, + headers: Operations.code_hyphen_security_sol_get_hyphen_configuration.Input.Headers = .init() + ) { + self.path = path + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/GET/responses/200/content/application\/json`. + case json(Components.Schemas.code_hyphen_security_hyphen_configuration) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.code_hyphen_security_hyphen_configuration { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.code_hyphen_security_sol_get_hyphen_configuration.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.code_hyphen_security_sol_get_hyphen_configuration.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/get(code-security/get-configuration)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.code_hyphen_security_sol_get_hyphen_configuration.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.code_hyphen_security_sol_get_hyphen_configuration.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Not modified + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/get(code-security/get-configuration)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + case notModified(Components.Responses.not_modified) + /// The associated value of the enum case if `self` is `.notModified`. + /// + /// - Throws: An error if `self` is not `.notModified`. + /// - SeeAlso: `.notModified`. + public var notModified: Components.Responses.not_modified { + get throws { + switch self { + case let .notModified(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notModified", + response: self + ) + } + } + } + /// Forbidden + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/get(code-security/get-configuration)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Components.Responses.forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Components.Responses.forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/get(code-security/get-configuration)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Components.Responses.not_found) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// Update a code security configuration + /// + /// Updates a code security configuration in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PATCH /orgs/{org}/code-security/configurations/{configuration_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/patch(code-security/update-configuration)`. + public enum code_hyphen_security_sol_update_hyphen_configuration { + public static let id: Swift.String = "code-security/update-configuration" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/path/org`. + public var org: Components.Parameters.org + /// The unique identifier of the code security configuration. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/path/configuration_id`. + public var configuration_id: Components.Parameters.configuration_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - configuration_id: The unique identifier of the code security configuration. + public init( + org: Components.Parameters.org, + configuration_id: Components.Parameters.configuration_hyphen_id + ) { + self.org = org + self.configuration_id = configuration_id + } + } + public var path: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Headers + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// The name of the code security configuration. Must be unique within the organization. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/name`. + public var name: Swift.String? + /// A description of the code security configuration + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/description`. + public var description: Swift.String? + /// The enablement status of GitHub Advanced Security + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/advanced_security`. + @frozen public enum advanced_securityPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// The enablement status of GitHub Advanced Security + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/advanced_security`. + public var advanced_security: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.advanced_securityPayload? + /// The enablement status of Dependency Graph + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependency_graph`. + @frozen public enum dependency_graphPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of Dependency Graph + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependency_graph`. + public var dependency_graph: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependency_graphPayload? + /// The enablement status of Dependabot alerts + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependabot_alerts`. + @frozen public enum dependabot_alertsPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of Dependabot alerts + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependabot_alerts`. + public var dependabot_alerts: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependabot_alertsPayload? + /// The enablement status of Dependabot security updates + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependabot_security_updates`. + @frozen public enum dependabot_security_updatesPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of Dependabot security updates + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependabot_security_updates`. + public var dependabot_security_updates: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependabot_security_updatesPayload? + /// The enablement status of code scanning default setup + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/code_scanning_default_setup`. + @frozen public enum code_scanning_default_setupPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of code scanning default setup + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/code_scanning_default_setup`. + public var code_scanning_default_setup: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.code_scanning_default_setupPayload? + /// The enablement status of secret scanning + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning`. + @frozen public enum secret_scanningPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning`. + public var secret_scanning: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanningPayload? + /// The enablement status of secret scanning push protection + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_push_protection`. + @frozen public enum secret_scanning_push_protectionPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning push protection + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_push_protection`. + public var secret_scanning_push_protection: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload? + /// The enablement status of private vulnerability reporting + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/private_vulnerability_reporting`. + @frozen public enum private_vulnerability_reportingPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of private vulnerability reporting + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/private_vulnerability_reporting`. + public var private_vulnerability_reporting: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - name: The name of the code security configuration. Must be unique within the organization. + /// - description: A description of the code security configuration + /// - advanced_security: The enablement status of GitHub Advanced Security + /// - dependency_graph: The enablement status of Dependency Graph + /// - dependabot_alerts: The enablement status of Dependabot alerts + /// - dependabot_security_updates: The enablement status of Dependabot security updates + /// - code_scanning_default_setup: The enablement status of code scanning default setup + /// - secret_scanning: The enablement status of secret scanning + /// - secret_scanning_push_protection: The enablement status of secret scanning push protection + /// - private_vulnerability_reporting: The enablement status of private vulnerability reporting + public init( + name: Swift.String? = nil, + description: Swift.String? = nil, + advanced_security: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.advanced_securityPayload? = nil, + dependency_graph: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependency_graphPayload? = nil, + dependabot_alerts: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependabot_alertsPayload? = nil, + dependabot_security_updates: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependabot_security_updatesPayload? = nil, + code_scanning_default_setup: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.code_scanning_default_setupPayload? = nil, + secret_scanning: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanningPayload? = nil, + secret_scanning_push_protection: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload? = nil, + private_vulnerability_reporting: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload? = nil + ) { + self.name = name + self.description = description + self.advanced_security = advanced_security + self.dependency_graph = dependency_graph + self.dependabot_alerts = dependabot_alerts + self.dependabot_security_updates = dependabot_security_updates + self.code_scanning_default_setup = code_scanning_default_setup + self.secret_scanning = secret_scanning + self.secret_scanning_push_protection = secret_scanning_push_protection + self.private_vulnerability_reporting = private_vulnerability_reporting + } + public enum CodingKeys: String, CodingKey { + case name + case description + case advanced_security + case dependency_graph + case dependabot_alerts + case dependabot_security_updates + case code_scanning_default_setup + case secret_scanning + case secret_scanning_push_protection + case private_vulnerability_reporting + } + public init(from decoder: any Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decodeIfPresent( + Swift.String.self, + forKey: .name + ) + description = try container.decodeIfPresent( + Swift.String.self, + forKey: .description + ) + advanced_security = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.advanced_securityPayload.self, + forKey: .advanced_security + ) + dependency_graph = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependency_graphPayload.self, + forKey: .dependency_graph + ) + dependabot_alerts = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependabot_alertsPayload.self, + forKey: .dependabot_alerts + ) + dependabot_security_updates = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependabot_security_updatesPayload.self, + forKey: .dependabot_security_updates + ) + code_scanning_default_setup = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.code_scanning_default_setupPayload.self, + forKey: .code_scanning_default_setup + ) + secret_scanning = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanningPayload.self, + forKey: .secret_scanning + ) + secret_scanning_push_protection = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload.self, + forKey: .secret_scanning_push_protection + ) + private_vulnerability_reporting = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload.self, + forKey: .private_vulnerability_reporting + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "name", + "description", + "advanced_security", + "dependency_graph", + "dependabot_alerts", + "dependabot_security_updates", + "code_scanning_default_setup", + "secret_scanning", + "secret_scanning_push_protection", + "private_vulnerability_reporting" + ]) + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/content/application\/json`. + case json(Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload) + } + public var body: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Path, + headers: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Headers = .init(), + body: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body + ) { + self.path = path + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/responses/200/content/application\/json`. + case json(Components.Schemas.code_hyphen_security_hyphen_configuration) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.code_hyphen_security_hyphen_configuration { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.code_hyphen_security_sol_update_hyphen_configuration.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.code_hyphen_security_sol_update_hyphen_configuration.Output.Ok.Body) { + self.body = body + } + } + /// Response when a configuration is updated + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/patch(code-security/update-configuration)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.code_hyphen_security_sol_update_hyphen_configuration.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.code_hyphen_security_sol_update_hyphen_configuration.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} + } + /// Response when no new updates are made + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/patch(code-security/update-configuration)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Operations.code_hyphen_security_sol_update_hyphen_configuration.Output.NoContent) + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.code_hyphen_security_sol_update_hyphen_configuration.Output.NoContent { + get throws { + switch self { + case let .noContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "noContent", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// Delete a code security configuration + /// + /// Deletes the desired code security configuration from an organization. + /// Repositories attached to the configuration will retain their settings but will no longer be associated with + /// the configuration. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/code-security/configurations/{configuration_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/delete(code-security/delete-configuration)`. + public enum code_hyphen_security_sol_delete_hyphen_configuration { + public static let id: Swift.String = "code-security/delete-configuration" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/DELETE/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/DELETE/path/org`. + public var org: Components.Parameters.org + /// The unique identifier of the code security configuration. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/DELETE/path/configuration_id`. + public var configuration_id: Components.Parameters.configuration_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - configuration_id: The unique identifier of the code security configuration. + public init( + org: Components.Parameters.org, + configuration_id: Components.Parameters.configuration_hyphen_id + ) { + self.org = org + self.configuration_id = configuration_id + } + } + public var path: Operations.code_hyphen_security_sol_delete_hyphen_configuration.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/DELETE/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.code_hyphen_security_sol_delete_hyphen_configuration.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + public init( + path: Operations.code_hyphen_security_sol_delete_hyphen_configuration.Input.Path, + headers: Operations.code_hyphen_security_sol_delete_hyphen_configuration.Input.Headers = .init() + ) { + self.path = path + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + /// A header with no content is returned. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/delete(code-security/delete-configuration)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Components.Responses.no_content) + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Components.Responses.no_content { + get throws { + switch self { + case let .noContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "noContent", + response: self + ) + } + } + } + /// Bad Request + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/delete(code-security/delete-configuration)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + case badRequest(Components.Responses.bad_request) + /// The associated value of the enum case if `self` is `.badRequest`. + /// + /// - Throws: An error if `self` is not `.badRequest`. + /// - SeeAlso: `.badRequest`. + public var badRequest: Components.Responses.bad_request { + get throws { + switch self { + case let .badRequest(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "badRequest", + response: self + ) + } + } + } + /// Forbidden + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/delete(code-security/delete-configuration)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Components.Responses.forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Components.Responses.forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/delete(code-security/delete-configuration)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Components.Responses.not_found) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + /// Conflict + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/delete(code-security/delete-configuration)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + case conflict(Components.Responses.conflict) + /// The associated value of the enum case if `self` is `.conflict`. + /// + /// - Throws: An error if `self` is not `.conflict`. + /// - SeeAlso: `.conflict`. + public var conflict: Components.Responses.conflict { + get throws { + switch self { + case let .conflict(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "conflict", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case application_scim_plus_json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + case "application/scim+json": + self = .application_scim_plus_json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + case .application_scim_plus_json: + return "application/scim+json" + } + } + public static var allCases: [Self] { + [ + .json, + .application_scim_plus_json + ] + } + } + } + /// Attach a configuration to repositories + /// + /// Attach a code security configuration to a set of repositories. If the repositories specified are already attached to a configuration, they will be re-attached to the provided configuration. + /// + /// If insufficient GHAS licenses are available to attach the configuration to a repository, only free features will be enabled. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `POST /orgs/{org}/code-security/configurations/{configuration_id}/attach`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/attach/post(code-security/attach-configuration)`. + public enum code_hyphen_security_sol_attach_hyphen_configuration { + public static let id: Swift.String = "code-security/attach-configuration" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/attach/POST/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/attach/POST/path/org`. + public var org: Components.Parameters.org + /// The unique identifier of the code security configuration. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/attach/POST/path/configuration_id`. + public var configuration_id: Components.Parameters.configuration_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - configuration_id: The unique identifier of the code security configuration. + public init( + org: Components.Parameters.org, + configuration_id: Components.Parameters.configuration_hyphen_id + ) { + self.org = org + self.configuration_id = configuration_id + } + } + public var path: Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/attach/POST/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input.Headers + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/attach/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/attach/POST/requestBody/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// The type of repositories to attach the configuration to. `selected` means the configuration will be attached to only the repositories specified by `selected_repository_ids` + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/attach/POST/requestBody/json/scope`. + @frozen public enum scopePayload: String, Codable, Hashable, Sendable { + case all = "all" + case _public = "public" + case private_or_internal = "private_or_internal" + case selected = "selected" + } + /// The type of repositories to attach the configuration to. `selected` means the configuration will be attached to only the repositories specified by `selected_repository_ids` + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/attach/POST/requestBody/json/scope`. + public var scope: Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input.Body.jsonPayload.scopePayload + /// An array of repository IDs to attach the configuration to. You can only provide a list of repository ids when the `scope` is set to `selected`. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/attach/POST/requestBody/json/selected_repository_ids`. + public var selected_repository_ids: [Swift.Int]? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - scope: The type of repositories to attach the configuration to. `selected` means the configuration will be attached to only the repositories specified by `selected_repository_ids` + /// - selected_repository_ids: An array of repository IDs to attach the configuration to. You can only provide a list of repository ids when the `scope` is set to `selected`. + public init( + scope: Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input.Body.jsonPayload.scopePayload, + selected_repository_ids: [Swift.Int]? = nil + ) { + self.scope = scope + self.selected_repository_ids = selected_repository_ids + } + public enum CodingKeys: String, CodingKey { + case scope + case selected_repository_ids + } + public init(from decoder: any Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + scope = try container.decode( + Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input.Body.jsonPayload.scopePayload.self, + forKey: .scope + ) + selected_repository_ids = try container.decodeIfPresent( + [Swift.Int].self, + forKey: .selected_repository_ids + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "scope", + "selected_repository_ids" + ]) + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/attach/POST/requestBody/content/application\/json`. + case json(Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input.Body.jsonPayload) + } + public var body: Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input.Path, + headers: Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input.Headers = .init(), + body: Operations.code_hyphen_security_sol_attach_hyphen_configuration.Input.Body + ) { + self.path = path + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + /// Accepted + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/attach/post(code-security/attach-configuration)/responses/202`. + /// + /// HTTP response code: `202 accepted`. + case accepted(Components.Responses.accepted) + /// The associated value of the enum case if `self` is `.accepted`. + /// + /// - Throws: An error if `self` is not `.accepted`. + /// - SeeAlso: `.accepted`. + public var accepted: Components.Responses.accepted { + get throws { + switch self { + case let .accepted(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "accepted", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// Set a code security configuration as a default for an organization + /// + /// Sets a code security configuration as a default to be applied to new repositories in your organization. + /// + /// This configuration will be applied to the matching repository type (all, none, public, private and internal) by default when they are created. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `PUT /orgs/{org}/code-security/configurations/{configuration_id}/defaults`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/defaults/put(code-security/set-configuration-as-default)`. + public enum code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default { + public static let id: Swift.String = "code-security/set-configuration-as-default" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/path/org`. + public var org: Components.Parameters.org + /// The unique identifier of the code security configuration. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/path/configuration_id`. + public var configuration_id: Components.Parameters.configuration_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - configuration_id: The unique identifier of the code security configuration. + public init( + org: Components.Parameters.org, + configuration_id: Components.Parameters.configuration_hyphen_id + ) { + self.org = org + self.configuration_id = configuration_id + } + } + public var path: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input.Headers + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/requestBody/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// Specify which types of repository this security configuration should be applied to by default. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/requestBody/json/default_for_new_repos`. + @frozen public enum default_for_new_reposPayload: String, Codable, Hashable, Sendable { + case all = "all" + case none = "none" + case private_and_internal = "private_and_internal" + case _public = "public" + } + /// Specify which types of repository this security configuration should be applied to by default. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/requestBody/json/default_for_new_repos`. + public var default_for_new_repos: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input.Body.jsonPayload.default_for_new_reposPayload? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - default_for_new_repos: Specify which types of repository this security configuration should be applied to by default. + public init(default_for_new_repos: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input.Body.jsonPayload.default_for_new_reposPayload? = nil) { + self.default_for_new_repos = default_for_new_repos + } + public enum CodingKeys: String, CodingKey { + case default_for_new_repos + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/requestBody/content/application\/json`. + case json(Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input.Body.jsonPayload) + } + public var body: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input.Path, + headers: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input.Headers = .init(), + body: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Input.Body + ) { + self.path = path + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/responses/200/content/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// Specifies which types of repository this security configuration is applied to by default. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/responses/200/content/json/default_for_new_repos`. + @frozen public enum default_for_new_reposPayload: String, Codable, Hashable, Sendable { + case all = "all" + case none = "none" + case private_and_internal = "private_and_internal" + case _public = "public" + } + /// Specifies which types of repository this security configuration is applied to by default. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/responses/200/content/json/default_for_new_repos`. + public var default_for_new_repos: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Output.Ok.Body.jsonPayload.default_for_new_reposPayload? + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/responses/200/content/json/configuration`. + public var configuration: Components.Schemas.code_hyphen_security_hyphen_configuration? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - default_for_new_repos: Specifies which types of repository this security configuration is applied to by default. + /// - configuration: + public init( + default_for_new_repos: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Output.Ok.Body.jsonPayload.default_for_new_reposPayload? = nil, + configuration: Components.Schemas.code_hyphen_security_hyphen_configuration? = nil + ) { + self.default_for_new_repos = default_for_new_repos + self.configuration = configuration + } + public enum CodingKeys: String, CodingKey { + case default_for_new_repos + case configuration + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/defaults/PUT/responses/200/content/application\/json`. + case json(Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Output.Ok.Body.jsonPayload) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Output.Ok.Body.jsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Output.Ok.Body) { + self.body = body + } + } + /// Default successfully changed. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/defaults/put(code-security/set-configuration-as-default)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.code_hyphen_security_sol_set_hyphen_configuration_hyphen_as_hyphen_default.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Forbidden + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/defaults/put(code-security/set-configuration-as-default)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Components.Responses.forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Components.Responses.forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/defaults/put(code-security/set-configuration-as-default)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Components.Responses.not_found) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// Get repositories associated with a code security configuration + /// + /// Lists the repositories associated with a code security configuration in an organization. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations/{configuration_id}/repositories`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/repositories/get(code-security/get-repositories-for-configuration)`. + public enum code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration { + public static let id: Swift.String = "code-security/get-repositories-for-configuration" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/repositories/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/repositories/GET/path/org`. + public var org: Components.Parameters.org + /// The unique identifier of the code security configuration. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/repositories/GET/path/configuration_id`. + public var configuration_id: Components.Parameters.configuration_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - configuration_id: The unique identifier of the code security configuration. + public init( + org: Components.Parameters.org, + configuration_id: Components.Parameters.configuration_hyphen_id + ) { + self.org = org + self.configuration_id = configuration_id + } + } + public var path: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/repositories/GET/query`. + public struct Query: Sendable, Hashable { + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/repositories/GET/query/per_page`. + public var per_page: Swift.Int? + /// A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/repositories/GET/query/before`. + public var before: Components.Parameters.pagination_hyphen_before? + /// A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/repositories/GET/query/after`. + public var after: Components.Parameters.pagination_hyphen_after? + /// A comma-separated list of statuses. If specified, only repositories with these attachment statuses will be returned. + /// + /// Can be: `all`, `attached`, `attaching`, `detached`, `enforced`, `failed`, `updating` + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/repositories/GET/query/status`. + public var status: Swift.String? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - per_page: The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// - before: A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// - after: A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// - status: A comma-separated list of statuses. If specified, only repositories with these attachment statuses will be returned. + public init( + per_page: Swift.Int? = nil, + before: Components.Parameters.pagination_hyphen_before? = nil, + after: Components.Parameters.pagination_hyphen_after? = nil, + status: Swift.String? = nil + ) { + self.per_page = per_page + self.before = before + self.after = after + self.status = status + } + } + public var query: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Input.Query + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/repositories/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Input.Path, + query: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Input.Query = .init(), + headers: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Input.Headers = .init() + ) { + self.path = path + self.query = query + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/repositories/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/repositories/GET/responses/200/content/application\/json`. + case json([Components.Schemas.code_hyphen_security_hyphen_configuration_hyphen_repositories]) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: [Components.Schemas.code_hyphen_security_hyphen_configuration_hyphen_repositories] { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/repositories/get(code-security/get-repositories-for-configuration)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Forbidden + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/repositories/get(code-security/get-repositories-for-configuration)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Components.Responses.forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Components.Responses.forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/repositories/get(code-security/get-repositories-for-configuration)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Components.Responses.not_found) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } +} From e43ff5e21622e783c24cbe970dc49a8e2f4847db Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 21:48:14 +0000 Subject: [PATCH 018/152] Bump Submodule/github/rest-api-description from `d2303fd` to `5af586d` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `d2303fd` to `5af586d`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/d2303fdde41a01ecb82983c478eba68dd73f8dcf...5af586d1351db51ce7f285a897f508e7be0169d9) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index d2303fdde41..5af586d1351 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit d2303fdde41a01ecb82983c478eba68dd73f8dcf +Subproject commit 5af586d1351db51ce7f285a897f508e7be0169d9 From fb0435e39bfd8786d5710bad0492cc11932a2a20 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 1 Jul 2024 22:02:16 +0000 Subject: [PATCH 019/152] Commit via running ake Sources/actions --- Sources/actions/Types.swift | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Sources/actions/Types.swift b/Sources/actions/Types.swift index 5e81f4a0d05..4d3a759df6e 100644 --- a/Sources/actions/Types.swift +++ b/Sources/actions/Types.swift @@ -3740,7 +3740,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -3803,7 +3803,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -3947,7 +3947,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -4010,7 +4010,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -7490,7 +7490,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/pull-request-minimal`. public struct pull_hyphen_request_hyphen_minimal: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/pull-request-minimal/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/pull-request-minimal/number`. public var number: Swift.Int /// - Remark: Generated from `#/components/schemas/pull-request-minimal/url`. @@ -7504,7 +7504,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head/repo`. public struct repoPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head/repo/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head/repo/url`. public var url: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head/repo/name`. @@ -7516,7 +7516,7 @@ public enum Components { /// - url: /// - name: public init( - id: Swift.Int, + id: Swift.Int64, url: Swift.String, name: Swift.String ) { @@ -7564,7 +7564,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base/repo`. public struct repoPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base/repo/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base/repo/url`. public var url: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base/repo/name`. @@ -7576,7 +7576,7 @@ public enum Components { /// - url: /// - name: public init( - id: Swift.Int, + id: Swift.Int64, url: Swift.String, name: Swift.String ) { @@ -7624,7 +7624,7 @@ public enum Components { /// - head: /// - base: public init( - id: Swift.Int, + id: Swift.Int64, number: Swift.Int, url: Swift.String, head: Components.Schemas.pull_hyphen_request_hyphen_minimal.headPayload, @@ -8235,7 +8235,7 @@ public enum Components { /// The id of the environment. /// /// - Remark: Generated from `#/components/schemas/pending-deployment/environment/id`. - public var id: Swift.Int? + public var id: Swift.Int64? /// - Remark: Generated from `#/components/schemas/pending-deployment/environment/node_id`. public var node_id: Swift.String? /// The name of the environment. @@ -8255,7 +8255,7 @@ public enum Components { /// - url: /// - html_url: public init( - id: Swift.Int? = nil, + id: Swift.Int64? = nil, node_id: Swift.String? = nil, name: Swift.String? = nil, url: Swift.String? = nil, @@ -8403,7 +8403,7 @@ public enum Components { /// Unique identifier of the deployment /// /// - Remark: Generated from `#/components/schemas/deployment/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/deployment/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/deployment/sha`. @@ -8522,7 +8522,7 @@ public enum Components { /// - performed_via_github_app: public init( url: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, sha: Swift.String, ref: Swift.String, From 33e26bfafd878b9bf508b7611ed9b980841a1835 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 1 Jul 2024 22:02:37 +0000 Subject: [PATCH 020/152] Commit via running ake Sources/activity --- Sources/activity/Types.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/activity/Types.swift b/Sources/activity/Types.swift index 687bb8f2231..3e5255f0d1e 100644 --- a/Sources/activity/Types.swift +++ b/Sources/activity/Types.swift @@ -822,7 +822,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -885,7 +885,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -998,7 +998,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -1061,7 +1061,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, From 945b3e62531ca061ad3063b5e2d35ba9097eb9da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 1 Jul 2024 22:02:58 +0000 Subject: [PATCH 021/152] Commit via running ake Sources/apps --- Sources/apps/Types.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Sources/apps/Types.swift b/Sources/apps/Types.swift index 7e4fffed9b5..c9a3dab8d19 100644 --- a/Sources/apps/Types.swift +++ b/Sources/apps/Types.swift @@ -990,7 +990,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -1053,7 +1053,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1197,7 +1197,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -1260,7 +1260,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -4183,7 +4183,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/authorization`. public struct authorization: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/authorization/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/authorization/url`. public var url: Swift.String /// A list of scopes that this authorization is in. @@ -4262,7 +4262,7 @@ public enum Components { /// - installation: /// - expires_at: public init( - id: Swift.Int, + id: Swift.Int64, url: Swift.String, scopes: [Swift.String]? = nil, token: Swift.String, From 85971087165e8978e9a29769184f5a9c752f3e6f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 1 Jul 2024 22:03:40 +0000 Subject: [PATCH 022/152] Commit via running ake Sources/checks --- Sources/checks/Types.swift | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Sources/checks/Types.swift b/Sources/checks/Types.swift index 7562aa0772a..2956d736c03 100644 --- a/Sources/checks/Types.swift +++ b/Sources/checks/Types.swift @@ -412,7 +412,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -475,7 +475,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -588,7 +588,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -651,7 +651,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1743,7 +1743,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/pull-request-minimal`. public struct pull_hyphen_request_hyphen_minimal: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/pull-request-minimal/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/pull-request-minimal/number`. public var number: Swift.Int /// - Remark: Generated from `#/components/schemas/pull-request-minimal/url`. @@ -1757,7 +1757,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head/repo`. public struct repoPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head/repo/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head/repo/url`. public var url: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head/repo/name`. @@ -1769,7 +1769,7 @@ public enum Components { /// - url: /// - name: public init( - id: Swift.Int, + id: Swift.Int64, url: Swift.String, name: Swift.String ) { @@ -1817,7 +1817,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base/repo`. public struct repoPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base/repo/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base/repo/url`. public var url: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base/repo/name`. @@ -1829,7 +1829,7 @@ public enum Components { /// - url: /// - name: public init( - id: Swift.Int, + id: Swift.Int64, url: Swift.String, name: Swift.String ) { @@ -1877,7 +1877,7 @@ public enum Components { /// - head: /// - base: public init( - id: Swift.Int, + id: Swift.Int64, number: Swift.Int, url: Swift.String, head: Components.Schemas.pull_hyphen_request_hyphen_minimal.headPayload, From 39678013ca3fe168d1840ad0df3e977a936bfded Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 1 Jul 2024 22:04:01 +0000 Subject: [PATCH 023/152] Commit via running ake Sources/code-scanning --- Sources/code-scanning/Types.swift | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Sources/code-scanning/Types.swift b/Sources/code-scanning/Types.swift index f0bcdcdb404..00afa6db1fc 100644 --- a/Sources/code-scanning/Types.swift +++ b/Sources/code-scanning/Types.swift @@ -768,7 +768,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -831,7 +831,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -944,7 +944,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -1007,7 +1007,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1583,7 +1583,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/code-scanning-alert-dismissed-reason`. @frozen public enum code_hyphen_scanning_hyphen_alert_hyphen_dismissed_hyphen_reason: String, Codable, Hashable, Sendable { - case _empty = "" case false_space_positive = "false positive" case won_apos_t_space_fix = "won't fix" case used_space_in_space_tests = "used in tests" From 25caa48452e738a173b647604d4f6b3e95c7cd05 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 1 Jul 2024 22:05:05 +0000 Subject: [PATCH 024/152] Commit via running ake Sources/dependabot --- Sources/dependabot/Types.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/dependabot/Types.swift b/Sources/dependabot/Types.swift index 11d0376e2e6..498d649e404 100644 --- a/Sources/dependabot/Types.swift +++ b/Sources/dependabot/Types.swift @@ -562,7 +562,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -625,7 +625,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -769,7 +769,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -832,7 +832,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, From d991cc13b87445b6022132c890c59ee0b637e798 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 1 Jul 2024 22:05:26 +0000 Subject: [PATCH 025/152] Commit via running ake Sources/dependency-graph --- Sources/dependency-graph/Types.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Sources/dependency-graph/Types.swift b/Sources/dependency-graph/Types.swift index 2c08b9d356b..8cb6940a2cb 100644 --- a/Sources/dependency-graph/Types.swift +++ b/Sources/dependency-graph/Types.swift @@ -370,6 +370,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/dependency-graph-spdx-sbom/sbom/packagesPayload/supplier`. public var supplier: Swift.String? + /// The copyright holders of the package, and any dates present with those notices, if available. + /// + /// - Remark: Generated from `#/components/schemas/dependency-graph-spdx-sbom/sbom/packagesPayload/copyrightText`. + public var copyrightText: Swift.String? /// - Remark: Generated from `#/components/schemas/dependency-graph-spdx-sbom/sbom/packagesPayload/externalRefsPayload`. public struct externalRefsPayloadPayload: Codable, Hashable, Sendable { /// The category of reference to an external resource this reference refers to. @@ -420,6 +424,7 @@ public enum Components { /// - licenseConcluded: The license of the package as determined while creating the SPDX document. /// - licenseDeclared: The license of the package as declared by its author, or NOASSERTION if this information /// - supplier: The distribution source of this package, or NOASSERTION if this was not determined. + /// - copyrightText: The copyright holders of the package, and any dates present with those notices, if available. /// - externalRefs: public init( SPDXID: Swift.String? = nil, @@ -430,6 +435,7 @@ public enum Components { licenseConcluded: Swift.String? = nil, licenseDeclared: Swift.String? = nil, supplier: Swift.String? = nil, + copyrightText: Swift.String? = nil, externalRefs: Components.Schemas.dependency_hyphen_graph_hyphen_spdx_hyphen_sbom.sbomPayload.packagesPayloadPayload.externalRefsPayload? = nil ) { self.SPDXID = SPDXID @@ -440,6 +446,7 @@ public enum Components { self.licenseConcluded = licenseConcluded self.licenseDeclared = licenseDeclared self.supplier = supplier + self.copyrightText = copyrightText self.externalRefs = externalRefs } public enum CodingKeys: String, CodingKey { @@ -451,6 +458,7 @@ public enum Components { case licenseConcluded case licenseDeclared case supplier + case copyrightText case externalRefs } } From 43f0e36f258742d5854910940f1ea3ff466d8c80 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 1 Jul 2024 22:05:47 +0000 Subject: [PATCH 026/152] Commit via running ake Sources/gists --- Sources/gists/Types.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/gists/Types.swift b/Sources/gists/Types.swift index fac5344e483..5a83c7f3781 100644 --- a/Sources/gists/Types.swift +++ b/Sources/gists/Types.swift @@ -582,7 +582,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -645,7 +645,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -758,7 +758,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -821,7 +821,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, From ff87ab6ff2c1992290d565a9c0556774ae53484f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 1 Jul 2024 22:06:51 +0000 Subject: [PATCH 027/152] Commit via running ake Sources/issues --- Sources/issues/Types.swift | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Sources/issues/Types.swift b/Sources/issues/Types.swift index 4a32a2a76db..9053cf95d88 100644 --- a/Sources/issues/Types.swift +++ b/Sources/issues/Types.swift @@ -1236,7 +1236,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -1299,7 +1299,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1412,7 +1412,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -1475,7 +1475,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -6971,11 +6971,11 @@ public enum Components { /// The ID of the pull request review to which the comment belongs. /// /// - Remark: Generated from `#/components/schemas/pull-request-review-comment/pull_request_review_id`. - public var pull_request_review_id: Swift.Int? + public var pull_request_review_id: Swift.Int64? /// The ID of the pull request review comment. /// /// - Remark: Generated from `#/components/schemas/pull-request-review-comment/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// The node ID of the pull request review comment. /// /// - Remark: Generated from `#/components/schemas/pull-request-review-comment/node_id`. @@ -7193,8 +7193,8 @@ public enum Components { /// - body_text: public init( url: Swift.String, - pull_request_review_id: Swift.Int? = nil, - id: Swift.Int, + pull_request_review_id: Swift.Int64? = nil, + id: Swift.Int64, node_id: Swift.String, diff_hunk: Swift.String, path: Swift.String, From a9339dd796d8297f2a43d151b69f1830f0264e2b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 1 Jul 2024 22:08:35 +0000 Subject: [PATCH 028/152] Commit via running ake Sources/migrations --- Sources/migrations/Types.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/migrations/Types.swift b/Sources/migrations/Types.swift index 6be9ce93c19..1c59a69b657 100644 --- a/Sources/migrations/Types.swift +++ b/Sources/migrations/Types.swift @@ -772,7 +772,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -835,7 +835,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -948,7 +948,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -1011,7 +1011,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, From c36a0a3a5972954ca2c81bf959aad54b2b0d7613 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 1 Jul 2024 22:09:18 +0000 Subject: [PATCH 029/152] Commit via running ake Sources/orgs --- Sources/orgs/Types.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index d01c23874f7..0798809915a 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -2264,7 +2264,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -2327,7 +2327,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -2471,7 +2471,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -2534,7 +2534,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -6080,7 +6080,7 @@ public enum Components { /// The unique identifier of the role. /// /// - Remark: Generated from `#/components/schemas/organization-role/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// The name of the role. /// /// - Remark: Generated from `#/components/schemas/organization-role/name`. @@ -6114,7 +6114,7 @@ public enum Components { /// - created_at: The date and time the role was created. /// - updated_at: The date and time the role was last updated. public init( - id: Swift.Int, + id: Swift.Int64, name: Swift.String, description: Swift.String? = nil, permissions: [Swift.String], From 77b27265eb64121acacdd0b0d3a7bfb0010f846f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 1 Jul 2024 22:09:39 +0000 Subject: [PATCH 030/152] Commit via running ake Sources/packages --- Sources/packages/Types.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/packages/Types.swift b/Sources/packages/Types.swift index 9eaab52dc69..af59e0c73a7 100644 --- a/Sources/packages/Types.swift +++ b/Sources/packages/Types.swift @@ -836,7 +836,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -899,7 +899,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1012,7 +1012,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -1075,7 +1075,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, From 64bf75399aae32180c7e821b2c273e8d71e9cffb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 1 Jul 2024 22:09:59 +0000 Subject: [PATCH 031/152] Commit via running ake Sources/projects --- Sources/projects/Types.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/projects/Types.swift b/Sources/projects/Types.swift index dde96de8f76..6f3d4018056 100644 --- a/Sources/projects/Types.swift +++ b/Sources/projects/Types.swift @@ -624,7 +624,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -687,7 +687,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -831,7 +831,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -894,7 +894,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, From 18767797a335d23c1b02158d46243b83b4142a1b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 1 Jul 2024 22:10:21 +0000 Subject: [PATCH 032/152] Commit via running ake Sources/pulls --- Sources/pulls/Types.swift | 40 +++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/Sources/pulls/Types.swift b/Sources/pulls/Types.swift index 0da3033a1f3..657603697ca 100644 --- a/Sources/pulls/Types.swift +++ b/Sources/pulls/Types.swift @@ -1066,7 +1066,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -1129,7 +1129,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1273,7 +1273,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -1336,7 +1336,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -3318,7 +3318,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/pull-request-simple/url`. public var url: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request-simple/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/pull-request-simple/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request-simple/html_url`. @@ -3626,7 +3626,7 @@ public enum Components { /// - draft: Indicates whether or not the pull request is a draft. public init( url: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, html_url: Swift.String, diff_url: Swift.String, @@ -3749,11 +3749,11 @@ public enum Components { /// The ID of the pull request review to which the comment belongs. /// /// - Remark: Generated from `#/components/schemas/pull-request-review-comment/pull_request_review_id`. - public var pull_request_review_id: Swift.Int? + public var pull_request_review_id: Swift.Int64? /// The ID of the pull request review comment. /// /// - Remark: Generated from `#/components/schemas/pull-request-review-comment/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// The node ID of the pull request review comment. /// /// - Remark: Generated from `#/components/schemas/pull-request-review-comment/node_id`. @@ -3971,8 +3971,8 @@ public enum Components { /// - body_text: public init( url: Swift.String, - pull_request_review_id: Swift.Int? = nil, - id: Swift.Int, + pull_request_review_id: Swift.Int64? = nil, + id: Swift.Int64, node_id: Swift.String, diff_hunk: Swift.String, path: Swift.String, @@ -4069,7 +4069,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/pull-request/url`. public var url: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/pull-request/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request/html_url`. @@ -4945,7 +4945,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/pull-request/head/user/html_url`. public var html_url: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request/head/user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/pull-request/head/user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request/head/user/login`. @@ -4995,7 +4995,7 @@ public enum Components { gists_url: Swift.String, gravatar_id: Swift.String? = nil, html_url: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, login: Swift.String, organizations_url: Swift.String, @@ -5790,7 +5790,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/pull-request/base/user/html_url`. public var html_url: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request/base/user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/pull-request/base/user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request/base/user/login`. @@ -5840,7 +5840,7 @@ public enum Components { gists_url: Swift.String, gravatar_id: Swift.String? = nil, html_url: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, login: Swift.String, organizations_url: Swift.String, @@ -6073,7 +6073,7 @@ public enum Components { /// - changed_files: public init( url: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, html_url: Swift.String, diff_url: Swift.String, @@ -6434,9 +6434,9 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/review-comment/url`. public var url: Swift.String /// - Remark: Generated from `#/components/schemas/review-comment/pull_request_review_id`. - public var pull_request_review_id: Swift.Int? + public var pull_request_review_id: Swift.Int64? /// - Remark: Generated from `#/components/schemas/review-comment/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/review-comment/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/review-comment/diff_hunk`. @@ -6575,8 +6575,8 @@ public enum Components { /// - original_start_line: The original first line of the range for a multi-line comment. public init( url: Swift.String, - pull_request_review_id: Swift.Int? = nil, - id: Swift.Int, + pull_request_review_id: Swift.Int64? = nil, + id: Swift.Int64, node_id: Swift.String, diff_hunk: Swift.String, path: Swift.String, From 632b41c471c26d7e748ea5792673c97bb027ad84 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 1 Jul 2024 22:11:02 +0000 Subject: [PATCH 033/152] Commit via running ake Sources/reactions --- Sources/reactions/Types.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/reactions/Types.swift b/Sources/reactions/Types.swift index f62657db493..442c25ef1e7 100644 --- a/Sources/reactions/Types.swift +++ b/Sources/reactions/Types.swift @@ -747,7 +747,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -810,7 +810,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, From c97c30ce6520ba6cf0ec4f54af8e843a12ad8568 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 1 Jul 2024 22:11:24 +0000 Subject: [PATCH 034/152] Commit via running ake Sources/repos --- Sources/repos/Types.swift | 49 +++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index 7a346ea909a..318587e4263 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -5818,7 +5818,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -5881,7 +5881,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -6025,7 +6025,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -6088,7 +6088,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -11078,21 +11078,36 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/repository-ruleset-conditions-repository-property-spec/property_values`. public var property_values: [Swift.String] + /// The source of the repository property. Defaults to 'custom' if not specified. + /// + /// - Remark: Generated from `#/components/schemas/repository-ruleset-conditions-repository-property-spec/source`. + @frozen public enum sourcePayload: String, Codable, Hashable, Sendable { + case custom = "custom" + case system = "system" + } + /// The source of the repository property. Defaults to 'custom' if not specified. + /// + /// - Remark: Generated from `#/components/schemas/repository-ruleset-conditions-repository-property-spec/source`. + public var source: Components.Schemas.repository_hyphen_ruleset_hyphen_conditions_hyphen_repository_hyphen_property_hyphen_spec.sourcePayload? /// Creates a new `repository_hyphen_ruleset_hyphen_conditions_hyphen_repository_hyphen_property_hyphen_spec`. /// /// - Parameters: /// - name: The name of the repository property to target /// - property_values: The values to match for the repository property + /// - source: The source of the repository property. Defaults to 'custom' if not specified. public init( name: Swift.String, - property_values: [Swift.String] + property_values: [Swift.String], + source: Components.Schemas.repository_hyphen_ruleset_hyphen_conditions_hyphen_repository_hyphen_property_hyphen_spec.sourcePayload? = nil ) { self.name = name self.property_values = property_values + self.source = source } public enum CodingKeys: String, CodingKey { case name case property_values + case source } } /// Parameters for a repository property condition @@ -13264,7 +13279,7 @@ public enum Components { /// Unique identifier of the deployment /// /// - Remark: Generated from `#/components/schemas/deployment/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/deployment/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/deployment/sha`. @@ -13383,7 +13398,7 @@ public enum Components { /// - performed_via_github_app: public init( url: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, sha: Swift.String, ref: Swift.String, @@ -13860,7 +13875,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/branch-restriction-policy/usersPayload/login`. public var login: Swift.String? /// - Remark: Generated from `#/components/schemas/branch-restriction-policy/usersPayload/id`. - public var id: Swift.Int? + public var id: Swift.Int64? /// - Remark: Generated from `#/components/schemas/branch-restriction-policy/usersPayload/node_id`. public var node_id: Swift.String? /// - Remark: Generated from `#/components/schemas/branch-restriction-policy/usersPayload/avatar_url`. @@ -13916,7 +13931,7 @@ public enum Components { /// - site_admin: public init( login: Swift.String? = nil, - id: Swift.Int? = nil, + id: Swift.Int64? = nil, node_id: Swift.String? = nil, avatar_url: Swift.String? = nil, gravatar_id: Swift.String? = nil, @@ -15771,7 +15786,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/collaborator/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/collaborator/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/collaborator/email`. public var email: Swift.String? /// - Remark: Generated from `#/components/schemas/collaborator/name`. @@ -15880,7 +15895,7 @@ public enum Components { /// - role_name: public init( login: Swift.String, - id: Swift.Int, + id: Swift.Int64, email: Swift.String? = nil, name: Swift.String? = nil, node_id: Swift.String, @@ -16048,7 +16063,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-collaborator/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-collaborator/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-collaborator/email`. public var email: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-collaborator/name`. @@ -16157,7 +16172,7 @@ public enum Components { /// - role_name: public init( login: Swift.String, - id: Swift.Int, + id: Swift.Int64, email: Swift.String? = nil, name: Swift.String? = nil, node_id: Swift.String, @@ -16484,7 +16499,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/pull-request-simple/url`. public var url: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request-simple/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/pull-request-simple/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request-simple/html_url`. @@ -16792,7 +16807,7 @@ public enum Components { /// - draft: Indicates whether or not the pull request is a draft. public init( url: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, html_url: Swift.String, diff_url: Swift.String, @@ -18551,7 +18566,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/deployment-status/url`. public var url: Swift.String /// - Remark: Generated from `#/components/schemas/deployment-status/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/deployment-status/node_id`. public var node_id: Swift.String /// The state of the status. @@ -18622,7 +18637,7 @@ public enum Components { /// - performed_via_github_app: public init( url: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, state: Components.Schemas.deployment_hyphen_status.statePayload, creator: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, From c69bbaf51e43d3c89b63fc364a81481ec9fa4c53 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 1 Jul 2024 22:11:45 +0000 Subject: [PATCH 035/152] Commit via running ake Sources/search --- Sources/search/Types.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/search/Types.swift b/Sources/search/Types.swift index fda7ba981b1..bc1a9f242c0 100644 --- a/Sources/search/Types.swift +++ b/Sources/search/Types.swift @@ -338,7 +338,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -401,7 +401,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -514,7 +514,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -577,7 +577,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, From 28dc0d34115221c88164a1826eccf0754e7513d1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 1 Jul 2024 22:12:06 +0000 Subject: [PATCH 036/152] Commit via running ake Sources/secret-scanning --- Sources/secret-scanning/Types.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/secret-scanning/Types.swift b/Sources/secret-scanning/Types.swift index 726d1f00c91..50ed04e2659 100644 --- a/Sources/secret-scanning/Types.swift +++ b/Sources/secret-scanning/Types.swift @@ -236,7 +236,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -299,7 +299,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -412,7 +412,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -475,7 +475,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, From 76ae34157d7e2bc21771bc72aa8432b18d184b9c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 1 Jul 2024 22:12:28 +0000 Subject: [PATCH 037/152] Commit via running ake Sources/teams --- Sources/teams/Types.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/teams/Types.swift b/Sources/teams/Types.swift index 24013631da4..8ac8d458564 100644 --- a/Sources/teams/Types.swift +++ b/Sources/teams/Types.swift @@ -1882,7 +1882,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -1945,7 +1945,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -2058,7 +2058,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -2121,7 +2121,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, From 668a0ee59ecbfca59b6caaff281386886bb720a4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 1 Jul 2024 22:12:48 +0000 Subject: [PATCH 038/152] Commit via running ake Sources/users --- Sources/users/Client.swift | 90 ++++++++++++++ Sources/users/Types.swift | 232 ++++++++++++++++++++++++++++++++++++- 2 files changed, 320 insertions(+), 2 deletions(-) diff --git a/Sources/users/Client.swift b/Sources/users/Client.swift index 3694247dba4..61359f3a9e4 100644 --- a/Sources/users/Client.swift +++ b/Sources/users/Client.swift @@ -4362,6 +4362,96 @@ public struct Client: APIProtocol { } ) } + /// Get a user using their ID + /// + /// Provides publicly available information about someone with a GitHub account. This method takes their durable user `ID` instead of their `login`, which can change over time. + /// + /// The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication). + /// + /// The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/users/emails)". + /// + /// - Remark: HTTP `GET /user/{account_id}`. + /// - Remark: Generated from `#/paths//user/{account_id}/get(users/get-by-id)`. + public func users_sol_get_hyphen_by_hyphen_id(_ input: Operations.users_sol_get_hyphen_by_hyphen_id.Input) async throws -> Operations.users_sol_get_hyphen_by_hyphen_id.Output { + try await client.send( + input: input, + forOperation: Operations.users_sol_get_hyphen_by_hyphen_id.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/user/{}", + parameters: [ + input.path.account_id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.users_sol_get_hyphen_by_hyphen_id.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Operations.users_sol_get_hyphen_by_hyphen_id.Output.Ok.Body.jsonPayload.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.not_found.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } /// List users /// /// Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. diff --git a/Sources/users/Types.swift b/Sources/users/Types.swift index 8bb347d335a..d3fc05e4e73 100644 --- a/Sources/users/Types.swift +++ b/Sources/users/Types.swift @@ -265,6 +265,17 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `DELETE /user/ssh_signing_keys/{ssh_signing_key_id}`. /// - Remark: Generated from `#/paths//user/ssh_signing_keys/{ssh_signing_key_id}/delete(users/delete-ssh-signing-key-for-authenticated-user)`. func users_sol_delete_hyphen_ssh_hyphen_signing_hyphen_key_hyphen_for_hyphen_authenticated_hyphen_user(_ input: Operations.users_sol_delete_hyphen_ssh_hyphen_signing_hyphen_key_hyphen_for_hyphen_authenticated_hyphen_user.Input) async throws -> Operations.users_sol_delete_hyphen_ssh_hyphen_signing_hyphen_key_hyphen_for_hyphen_authenticated_hyphen_user.Output + /// Get a user using their ID + /// + /// Provides publicly available information about someone with a GitHub account. This method takes their durable user `ID` instead of their `login`, which can change over time. + /// + /// The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication). + /// + /// The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/users/emails)". + /// + /// - Remark: HTTP `GET /user/{account_id}`. + /// - Remark: Generated from `#/paths//user/{account_id}/get(users/get-by-id)`. + func users_sol_get_hyphen_by_hyphen_id(_ input: Operations.users_sol_get_hyphen_by_hyphen_id.Input) async throws -> Operations.users_sol_get_hyphen_by_hyphen_id.Output /// List users /// /// Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. @@ -856,6 +867,25 @@ extension APIProtocol { headers: headers )) } + /// Get a user using their ID + /// + /// Provides publicly available information about someone with a GitHub account. This method takes their durable user `ID` instead of their `login`, which can change over time. + /// + /// The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication). + /// + /// The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/users/emails)". + /// + /// - Remark: HTTP `GET /user/{account_id}`. + /// - Remark: Generated from `#/paths//user/{account_id}/get(users/get-by-id)`. + public func users_sol_get_hyphen_by_hyphen_id( + path: Operations.users_sol_get_hyphen_by_hyphen_id.Input.Path, + headers: Operations.users_sol_get_hyphen_by_hyphen_id.Input.Headers = .init() + ) async throws -> Operations.users_sol_get_hyphen_by_hyphen_id.Output { + try await users_sol_get_hyphen_by_hyphen_id(Operations.users_sol_get_hyphen_by_hyphen_id.Input( + path: path, + headers: headers + )) + } /// List users /// /// Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. @@ -1072,7 +1102,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -1135,7 +1165,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -2915,6 +2945,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/page`. public typealias page = Swift.Int + /// account_id parameter + /// + /// - Remark: Generated from `#/components/parameters/account-id`. + public typealias account_hyphen_id = Swift.Int /// The handle for the GitHub user account. /// /// - Remark: Generated from `#/components/parameters/username`. @@ -10532,6 +10566,200 @@ public enum Operations { } } } + /// Get a user using their ID + /// + /// Provides publicly available information about someone with a GitHub account. This method takes their durable user `ID` instead of their `login`, which can change over time. + /// + /// The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication). + /// + /// The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/users/emails)". + /// + /// - Remark: HTTP `GET /user/{account_id}`. + /// - Remark: Generated from `#/paths//user/{account_id}/get(users/get-by-id)`. + public enum users_sol_get_hyphen_by_hyphen_id { + public static let id: Swift.String = "users/get-by-id" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/user/{account_id}/GET/path`. + public struct Path: Sendable, Hashable { + /// account_id parameter + /// + /// - Remark: Generated from `#/paths/user/{account_id}/GET/path/account_id`. + public var account_id: Components.Parameters.account_hyphen_id + /// Creates a new `Path`. + /// + /// - Parameters: + /// - account_id: account_id parameter + public init(account_id: Components.Parameters.account_hyphen_id) { + self.account_id = account_id + } + } + public var path: Operations.users_sol_get_hyphen_by_hyphen_id.Input.Path + /// - Remark: Generated from `#/paths/user/{account_id}/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.users_sol_get_hyphen_by_hyphen_id.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + public init( + path: Operations.users_sol_get_hyphen_by_hyphen_id.Input.Path, + headers: Operations.users_sol_get_hyphen_by_hyphen_id.Input.Headers = .init() + ) { + self.path = path + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/user/{account_id}/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/user/{account_id}/GET/responses/200/content/json`. + @frozen public enum jsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/user/{account_id}/GET/responses/200/content/json/case1`. + case private_hyphen_user(Components.Schemas.private_hyphen_user) + /// - Remark: Generated from `#/paths/user/{account_id}/GET/responses/200/content/json/case2`. + case public_hyphen_user(Components.Schemas.public_hyphen_user) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self = .private_hyphen_user(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + do { + self = .public_hyphen_user(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + throw Swift.DecodingError.failedToDecodeOneOfSchema( + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + switch self { + case let .private_hyphen_user(value): + try value.encode(to: encoder) + case let .public_hyphen_user(value): + try value.encode(to: encoder) + } + } + } + /// - Remark: Generated from `#/paths/user/{account_id}/GET/responses/200/content/application\/json`. + case json(Operations.users_sol_get_hyphen_by_hyphen_id.Output.Ok.Body.jsonPayload) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Operations.users_sol_get_hyphen_by_hyphen_id.Output.Ok.Body.jsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.users_sol_get_hyphen_by_hyphen_id.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.users_sol_get_hyphen_by_hyphen_id.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//user/{account_id}/get(users/get-by-id)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.users_sol_get_hyphen_by_hyphen_id.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.users_sol_get_hyphen_by_hyphen_id.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//user/{account_id}/get(users/get-by-id)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Components.Responses.not_found) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } /// List users /// /// Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. From dcd874063ca136d57dc7a9b49f1de3c470043d56 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 1 Jul 2024 22:13:10 +0000 Subject: [PATCH 039/152] Commit via running ake Sources/codespaces --- Sources/codespaces/Types.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/codespaces/Types.swift b/Sources/codespaces/Types.swift index 9e390e2322e..4125d00aaa0 100644 --- a/Sources/codespaces/Types.swift +++ b/Sources/codespaces/Types.swift @@ -1414,7 +1414,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -1477,7 +1477,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1590,7 +1590,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -1653,7 +1653,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, From 9364d1ac2adc5f5e840f2e35de4edff3e3b2c990 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 1 Jul 2024 22:13:31 +0000 Subject: [PATCH 040/152] Commit via running ake Sources/copilot --- Sources/copilot/Types.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/copilot/Types.swift b/Sources/copilot/Types.swift index 87eb665ed7c..d7fa045ffff 100644 --- a/Sources/copilot/Types.swift +++ b/Sources/copilot/Types.swift @@ -472,7 +472,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -535,7 +535,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, From caaba484ee5fb2eef1d59db6952724d5017d8ae9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 1 Jul 2024 22:13:51 +0000 Subject: [PATCH 041/152] Commit via running ake Sources/security-advisories --- Sources/security-advisories/Types.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/security-advisories/Types.swift b/Sources/security-advisories/Types.swift index 4c15332217f..26d89015530 100644 --- a/Sources/security-advisories/Types.swift +++ b/Sources/security-advisories/Types.swift @@ -432,7 +432,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -495,7 +495,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1075,7 +1075,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-simple-user/avatar_url`. @@ -1138,7 +1138,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, From 1e2701febaeb3c37da8372318a266802368620cd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 1 Jul 2024 22:15:36 +0000 Subject: [PATCH 042/152] Commit via running ake Sources/code-security --- Sources/code-security/Types.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/code-security/Types.swift b/Sources/code-security/Types.swift index 5653045534b..201de6dcb2c 100644 --- a/Sources/code-security/Types.swift +++ b/Sources/code-security/Types.swift @@ -336,7 +336,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/simple-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/simple-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`. @@ -399,7 +399,7 @@ public enum Components { name: Swift.String? = nil, email: Swift.String? = nil, login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, From 9c7c2f7f0a7998e96032c34a47051a1f8ba5d247 Mon Sep 17 00:00:00 2001 From: Wei <41205mw@gmail.com> Date: Tue, 2 Jul 2024 19:00:08 +0800 Subject: [PATCH 043/152] Update Mintfile --- Mintfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Mintfile b/Mintfile index 57f276d6da2..2f3aaf0b8b9 100644 --- a/Mintfile +++ b/Mintfile @@ -1 +1,2 @@ -apple/swift-openapi-generator@1.1.0 \ No newline at end of file +yonaskolb/Mint@0.17.5 +apple/swift-openapi-generator@1.2.1 From 0711d463832a30fa30de5d0dd598c803e1166dbc Mon Sep 17 00:00:00 2001 From: Wei <41205mw@gmail.com> Date: Tue, 9 Jul 2024 11:20:15 +0800 Subject: [PATCH 044/152] Update Makefile --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 02a70fc2c3e..0f537df0faf 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,8 @@ OPENAPI_PATH := Submodule/github/rest-api-description/descriptions/api.github. FILTERED_NAMES := $(shell yq -r '.tags[].name' $(OPENAPI_PATH)) SOURCE_DIRS := $(addprefix Sources/, $(FILTERED_NAMES)) PACKAGE_PATHS := Package.swift +# Fix: https://github.com/irgaly/setup-mint/pull/25 +MINT_BIN := $HOME/mint # Helper .SILENT: commit @@ -28,7 +30,7 @@ commit: %/Client.swift %/Types.swift: $(OPENAPI_PATH) @echo "\n\nFolder $(@D) running" @$(MAKE) "$(@D)/openapi-generator-config.yml" - mint run apple/swift-openapi-generator generate \ + $(MINT_BIN) run apple/swift-openapi-generator generate \ "$(OPENAPI_PATH)" \ --config "$(@D)/openapi-generator-config.yml" \ --output-directory "$(@D)"; From 972bd79be639161513290d83b479fa02bf6864a3 Mon Sep 17 00:00:00 2001 From: Wei <41205mw@gmail.com> Date: Tue, 9 Jul 2024 11:36:37 +0800 Subject: [PATCH 045/152] Update Makefile, fix typo. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0f537df0faf..1c7026b8052 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ FILTERED_NAMES := $(shell yq -r '.tags[].name' $(OPENAPI_PATH)) SOURCE_DIRS := $(addprefix Sources/, $(FILTERED_NAMES)) PACKAGE_PATHS := Package.swift # Fix: https://github.com/irgaly/setup-mint/pull/25 -MINT_BIN := $HOME/mint +MINT_BIN := $$HOME/mint # Helper .SILENT: commit From 160337a50be22a3aeb570b70ed76c2c164b4115e Mon Sep 17 00:00:00 2001 From: Wei <41205mw@gmail.com> Date: Tue, 9 Jul 2024 12:48:37 +0800 Subject: [PATCH 046/152] Update Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1c7026b8052..2938b2cdf1a 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ FILTERED_NAMES := $(shell yq -r '.tags[].name' $(OPENAPI_PATH)) SOURCE_DIRS := $(addprefix Sources/, $(FILTERED_NAMES)) PACKAGE_PATHS := Package.swift # Fix: https://github.com/irgaly/setup-mint/pull/25 -MINT_BIN := $$HOME/mint +MINT_BIN := $(HOME)/mint # Helper .SILENT: commit From 7b113ea61ef0915095a8de33ee8a192caa1e3d00 Mon Sep 17 00:00:00 2001 From: Wei <41205mw@gmail.com> Date: Tue, 9 Jul 2024 13:41:49 +0800 Subject: [PATCH 047/152] Update Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2938b2cdf1a..7a9e5b82800 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ FILTERED_NAMES := $(shell yq -r '.tags[].name' $(OPENAPI_PATH)) SOURCE_DIRS := $(addprefix Sources/, $(FILTERED_NAMES)) PACKAGE_PATHS := Package.swift # Fix: https://github.com/irgaly/setup-mint/pull/25 -MINT_BIN := $(HOME)/mint +MINT_BIN := $(HOME)/bin/mint # Helper .SILENT: commit From 71d7221e8fe8b3b6153058485cfda4be999b0319 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Jul 2024 05:50:00 +0000 Subject: [PATCH 048/152] Bump Submodule/github/rest-api-description from `5af586d` to `fd544c2` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `5af586d` to `fd544c2`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/5af586d1351db51ce7f285a897f508e7be0169d9...fd544c2b878458798c8af979affb0407da2ef34e) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index 5af586d1351..fd544c2b878 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit 5af586d1351db51ce7f285a897f508e7be0169d9 +Subproject commit fd544c2b878458798c8af979affb0407da2ef34e From 7f2987f4c082cc7ba7fab7e94578152e70f49209 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 9 Jul 2024 06:02:30 +0000 Subject: [PATCH 049/152] Commit via running ake Sources/actions --- Sources/actions/Types.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/actions/Types.swift b/Sources/actions/Types.swift index 4d3a759df6e..909635049d0 100644 --- a/Sources/actions/Types.swift +++ b/Sources/actions/Types.swift @@ -4180,7 +4180,7 @@ public enum Components { /// Unique identifier of the repository /// /// - Remark: Generated from `#/components/schemas/repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/repository/node_id`. public var node_id: Swift.String /// The name of the repository. @@ -4623,7 +4623,7 @@ public enum Components { /// - starred_at: /// - anonymous_access_enabled: Whether anonymous git access is enabled for this repository public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -5558,7 +5558,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/minimal-repository`. public struct minimal_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/minimal-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/minimal-repository/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/minimal-repository/name`. @@ -5906,7 +5906,7 @@ public enum Components { /// - web_commit_signoff_required: /// - security_and_analysis: public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, From 7e7c73798d2c4b6cebbd4a87dbe5418a2fd3cca9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 9 Jul 2024 06:02:51 +0000 Subject: [PATCH 050/152] Commit via running ake Sources/activity --- Sources/activity/Types.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/activity/Types.swift b/Sources/activity/Types.swift index 3e5255f0d1e..34219d0ef17 100644 --- a/Sources/activity/Types.swift +++ b/Sources/activity/Types.swift @@ -1307,7 +1307,7 @@ public enum Components { /// Unique identifier of the repository /// /// - Remark: Generated from `#/components/schemas/repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/repository/node_id`. public var node_id: Swift.String /// The name of the repository. @@ -1750,7 +1750,7 @@ public enum Components { /// - starred_at: /// - anonymous_access_enabled: Whether anonymous git access is enabled for this repository public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -3523,7 +3523,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/minimal-repository`. public struct minimal_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/minimal-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/minimal-repository/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/minimal-repository/name`. @@ -3871,7 +3871,7 @@ public enum Components { /// - web_commit_signoff_required: /// - security_and_analysis: public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, From faaf9d1a1c485ffa07fd830676e6054c1f84a69f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 9 Jul 2024 06:03:12 +0000 Subject: [PATCH 051/152] Commit via running ake Sources/apps --- Sources/apps/Types.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/apps/Types.swift b/Sources/apps/Types.swift index c9a3dab8d19..a64544bb888 100644 --- a/Sources/apps/Types.swift +++ b/Sources/apps/Types.swift @@ -3317,7 +3317,7 @@ public enum Components { /// Unique identifier of the repository /// /// - Remark: Generated from `#/components/schemas/repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/repository/node_id`. public var node_id: Swift.String /// The name of the repository. @@ -3760,7 +3760,7 @@ public enum Components { /// - starred_at: /// - anonymous_access_enabled: Whether anonymous git access is enabled for this repository public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, From a2fbb542102a031e6624c61efa7a16ac832b7ea6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 9 Jul 2024 06:03:53 +0000 Subject: [PATCH 052/152] Commit via running ake Sources/checks --- Sources/checks/Types.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/checks/Types.swift b/Sources/checks/Types.swift index 2956d736c03..1060b596e65 100644 --- a/Sources/checks/Types.swift +++ b/Sources/checks/Types.swift @@ -1116,7 +1116,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/minimal-repository`. public struct minimal_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/minimal-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/minimal-repository/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/minimal-repository/name`. @@ -1464,7 +1464,7 @@ public enum Components { /// - web_commit_signoff_required: /// - security_and_analysis: public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, From 9f5cc5bc55c1e1c26582e7f4077672c723c0e1d9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 9 Jul 2024 06:04:14 +0000 Subject: [PATCH 053/152] Commit via running ake Sources/code-scanning --- Sources/code-scanning/Types.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/code-scanning/Types.swift b/Sources/code-scanning/Types.swift index 00afa6db1fc..79c78d33f2a 100644 --- a/Sources/code-scanning/Types.swift +++ b/Sources/code-scanning/Types.swift @@ -1156,7 +1156,7 @@ public enum Components { /// A unique identifier of the repository. /// /// - Remark: Generated from `#/components/schemas/simple-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// The GraphQL identifier of the repository. /// /// - Remark: Generated from `#/components/schemas/simple-repository/node_id`. @@ -1385,7 +1385,7 @@ public enum Components { /// - trees_url: A template for the API URL to create or retrieve a raw Git tree of the repository. /// - hooks_url: The API URL to list the hooks on the repository. public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, From 9f5e616e645e73113d7def9b7b24cc2a137e874f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 9 Jul 2024 06:05:17 +0000 Subject: [PATCH 054/152] Commit via running ake Sources/dependabot --- Sources/dependabot/Types.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/dependabot/Types.swift b/Sources/dependabot/Types.swift index 498d649e404..0345e957af1 100644 --- a/Sources/dependabot/Types.swift +++ b/Sources/dependabot/Types.swift @@ -1554,7 +1554,7 @@ public enum Components { /// A unique identifier of the repository. /// /// - Remark: Generated from `#/components/schemas/simple-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// The GraphQL identifier of the repository. /// /// - Remark: Generated from `#/components/schemas/simple-repository/node_id`. @@ -1783,7 +1783,7 @@ public enum Components { /// - trees_url: A template for the API URL to create or retrieve a raw Git tree of the repository. /// - hooks_url: The API URL to list the hooks on the repository. public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -2317,7 +2317,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/minimal-repository`. public struct minimal_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/minimal-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/minimal-repository/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/minimal-repository/name`. @@ -2665,7 +2665,7 @@ public enum Components { /// - web_commit_signoff_required: /// - security_and_analysis: public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, From 7ffd56ecfdec8ac09338d83044c74df3bac3d8bd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 9 Jul 2024 06:05:58 +0000 Subject: [PATCH 055/152] Commit via running ake Sources/gists --- Sources/gists/Types.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/gists/Types.swift b/Sources/gists/Types.swift index 5a83c7f3781..b8015b40a01 100644 --- a/Sources/gists/Types.swift +++ b/Sources/gists/Types.swift @@ -1223,7 +1223,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/public-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/public-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/public-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/public-user/avatar_url`. @@ -1380,7 +1380,7 @@ public enum Components { /// - collaborators: public init( login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1510,7 +1510,7 @@ public enum Components { forKey: .login ) id = try container.decode( - Swift.Int.self, + Swift.Int64.self, forKey: .id ) node_id = try container.decode( From cbe5b49eb2ed656f7b2491eabaeadacb2e163700 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 9 Jul 2024 06:07:01 +0000 Subject: [PATCH 056/152] Commit via running ake Sources/issues --- Sources/issues/Types.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/issues/Types.swift b/Sources/issues/Types.swift index 9053cf95d88..07e0bd0ad91 100644 --- a/Sources/issues/Types.swift +++ b/Sources/issues/Types.swift @@ -1999,7 +1999,7 @@ public enum Components { /// Unique identifier of the repository /// /// - Remark: Generated from `#/components/schemas/repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/repository/node_id`. public var node_id: Swift.String /// The name of the repository. @@ -2442,7 +2442,7 @@ public enum Components { /// - starred_at: /// - anonymous_access_enabled: Whether anonymous git access is enabled for this repository public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, From 783e5a7b2a9a5a064cfad26d92e6f3c91622abfc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 9 Jul 2024 06:08:45 +0000 Subject: [PATCH 057/152] Commit via running ake Sources/migrations --- Sources/migrations/Types.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Sources/migrations/Types.swift b/Sources/migrations/Types.swift index 1c59a69b657..3b6c5a8c62d 100644 --- a/Sources/migrations/Types.swift +++ b/Sources/migrations/Types.swift @@ -1257,7 +1257,7 @@ public enum Components { /// Unique identifier of the repository /// /// - Remark: Generated from `#/components/schemas/repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/repository/node_id`. public var node_id: Swift.String /// The name of the repository. @@ -1700,7 +1700,7 @@ public enum Components { /// - starred_at: /// - anonymous_access_enabled: Whether anonymous git access is enabled for this repository public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -2161,7 +2161,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/minimal-repository`. public struct minimal_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/minimal-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/minimal-repository/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/minimal-repository/name`. @@ -2509,7 +2509,7 @@ public enum Components { /// - web_commit_signoff_required: /// - security_and_analysis: public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -2780,7 +2780,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/migration`. public struct migration: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/migration/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/migration/owner`. public var owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? /// - Remark: Generated from `#/components/schemas/migration/guid`. @@ -2841,7 +2841,7 @@ public enum Components { /// - archive_url: /// - exclude: Exclude related items from being returned in the response in order to improve performance of the request. The array can include any of: `"repositories"`. public init( - id: Swift.Int, + id: Swift.Int64, owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, guid: Swift.String, state: Swift.String, From 288baca64f7ca5752a0a3a6f6e006d3f24251f8f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 9 Jul 2024 06:09:27 +0000 Subject: [PATCH 058/152] Commit via running ake Sources/orgs --- Sources/orgs/Client.swift | 2 -- Sources/orgs/Types.swift | 35 ++++------------------------------- 2 files changed, 4 insertions(+), 33 deletions(-) diff --git a/Sources/orgs/Client.swift b/Sources/orgs/Client.swift index 1acbf63012e..d025132e07c 100644 --- a/Sources/orgs/Client.swift +++ b/Sources/orgs/Client.swift @@ -7145,8 +7145,6 @@ public struct Client: APIProtocol { switch response.status.code { case 204: return .noContent(.init()) - case 409: - return .conflict(.init()) default: return .undocumented( statusCode: response.status.code, diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index 0798809915a..7a3f4dc6f4c 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -4717,7 +4717,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/minimal-repository`. public struct minimal_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/minimal-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/minimal-repository/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/minimal-repository/name`. @@ -5065,7 +5065,7 @@ public enum Components { /// - web_commit_signoff_required: /// - security_and_analysis: public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -5765,7 +5765,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/organization-invitation`. public struct organization_hyphen_invitation: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/organization-invitation/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/organization-invitation/login`. public var login: Swift.String? /// - Remark: Generated from `#/components/schemas/organization-invitation/email`. @@ -5804,7 +5804,7 @@ public enum Components { /// - invitation_teams_url: /// - invitation_source: public init( - id: Swift.Int, + id: Swift.Int64, login: Swift.String? = nil, email: Swift.String? = nil, role: Swift.String, @@ -21224,33 +21224,6 @@ public enum Operations { } } } - public struct Conflict: Sendable, Hashable { - /// Creates a new `Conflict`. - public init() {} - } - /// The organization has reached the maximum number of security manager teams. - /// - /// - Remark: Generated from `#/paths//orgs/{org}/security-managers/teams/{team_slug}/put(orgs/add-security-manager-team)/responses/409`. - /// - /// HTTP response code: `409 conflict`. - case conflict(Operations.orgs_sol_add_hyphen_security_hyphen_manager_hyphen_team.Output.Conflict) - /// The associated value of the enum case if `self` is `.conflict`. - /// - /// - Throws: An error if `self` is not `.conflict`. - /// - SeeAlso: `.conflict`. - public var conflict: Operations.orgs_sol_add_hyphen_security_hyphen_manager_hyphen_team.Output.Conflict { - get throws { - switch self { - case let .conflict(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "conflict", - response: self - ) - } - } - } /// Undocumented response. /// /// A response with a code that is not documented in the OpenAPI document. From c3c36bcbd61ff3c50f29dc0ace64ae7000cc58e4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 9 Jul 2024 06:09:48 +0000 Subject: [PATCH 059/152] Commit via running ake Sources/packages --- Sources/packages/Types.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/packages/Types.swift b/Sources/packages/Types.swift index af59e0c73a7..155b7d5360f 100644 --- a/Sources/packages/Types.swift +++ b/Sources/packages/Types.swift @@ -1311,7 +1311,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-minimal-repository`. public struct nullable_hyphen_minimal_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/nullable-minimal-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-minimal-repository/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/nullable-minimal-repository/name`. @@ -1659,7 +1659,7 @@ public enum Components { /// - web_commit_signoff_required: /// - security_and_analysis: public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, From 7ed020d8fe603b7b30a2a43debee849886c29aa4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 9 Jul 2024 06:10:09 +0000 Subject: [PATCH 060/152] Commit via running ake Sources/projects --- Sources/projects/Types.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/projects/Types.swift b/Sources/projects/Types.swift index 6f3d4018056..1cb1cfdeb73 100644 --- a/Sources/projects/Types.swift +++ b/Sources/projects/Types.swift @@ -1215,7 +1215,7 @@ public enum Components { /// The project card's ID /// /// - Remark: Generated from `#/components/schemas/project-card/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/project-card/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/project-card/note`. @@ -1258,7 +1258,7 @@ public enum Components { /// - project_url: public init( url: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, note: Swift.String? = nil, creator: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, From f0134ff5a5cde6bcaaf990225268210f26b2da77 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 9 Jul 2024 06:10:30 +0000 Subject: [PATCH 061/152] Commit via running ake Sources/pulls --- Sources/pulls/Types.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/pulls/Types.swift b/Sources/pulls/Types.swift index 657603697ca..b5ed2955722 100644 --- a/Sources/pulls/Types.swift +++ b/Sources/pulls/Types.swift @@ -1582,7 +1582,7 @@ public enum Components { /// Unique identifier of the repository /// /// - Remark: Generated from `#/components/schemas/repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/repository/node_id`. public var node_id: Swift.String /// The name of the repository. @@ -2025,7 +2025,7 @@ public enum Components { /// - starred_at: /// - anonymous_access_enabled: Whether anonymous git access is enabled for this repository public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, From 43e029514d025da4d03aae6cc613991c38eed2b5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 9 Jul 2024 06:11:33 +0000 Subject: [PATCH 062/152] Commit via running ake Sources/repos --- Sources/repos/Types.swift | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index 318587e4263..0470ec86c92 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -7050,7 +7050,7 @@ public enum Components { /// Unique identifier of the repository /// /// - Remark: Generated from `#/components/schemas/repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/repository/node_id`. public var node_id: Swift.String /// The name of the repository. @@ -7493,7 +7493,7 @@ public enum Components { /// - starred_at: /// - anonymous_access_enabled: Whether anonymous git access is enabled for this repository public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -8634,7 +8634,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/minimal-repository`. public struct minimal_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/minimal-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/minimal-repository/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/minimal-repository/name`. @@ -8982,7 +8982,7 @@ public enum Components { /// - web_commit_signoff_required: /// - security_and_analysis: public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -9331,7 +9331,7 @@ public enum Components { /// Unique identifier of the repository /// /// - Remark: Generated from `#/components/schemas/nullable-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-repository/node_id`. public var node_id: Swift.String /// The name of the repository. @@ -9774,7 +9774,7 @@ public enum Components { /// - starred_at: /// - anonymous_access_enabled: Whether anonymous git access is enabled for this repository public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -10106,7 +10106,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/full-repository`. public struct full_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/full-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/full-repository/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/full-repository/name`. @@ -10555,7 +10555,7 @@ public enum Components { /// - security_and_analysis: /// - custom_properties: The custom properties that were defined for the repository. The keys are the custom property names, and the values are the corresponding custom property values. public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -15972,7 +15972,7 @@ public enum Components { /// Unique identifier of the repository invitation. /// /// - Remark: Generated from `#/components/schemas/repository-invitation/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/repository-invitation/repository`. public var repository: Components.Schemas.minimal_hyphen_repository /// - Remark: Generated from `#/components/schemas/repository-invitation/invitee`. @@ -16021,7 +16021,7 @@ public enum Components { /// - html_url: /// - node_id: public init( - id: Swift.Int, + id: Swift.Int64, repository: Components.Schemas.minimal_hyphen_repository, invitee: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, inviter: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, From 541126a70e7203104b6c8e003bd1cd954e01dc60 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 9 Jul 2024 06:11:54 +0000 Subject: [PATCH 063/152] Commit via running ake Sources/search --- Sources/search/Types.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Sources/search/Types.swift b/Sources/search/Types.swift index bc1a9f242c0..09ed2c2ba3b 100644 --- a/Sources/search/Types.swift +++ b/Sources/search/Types.swift @@ -823,7 +823,7 @@ public enum Components { /// Unique identifier of the repository /// /// - Remark: Generated from `#/components/schemas/repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/repository/node_id`. public var node_id: Swift.String /// The name of the repository. @@ -1266,7 +1266,7 @@ public enum Components { /// - starred_at: /// - anonymous_access_enabled: Whether anonymous git access is enabled for this repository public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -2162,7 +2162,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/minimal-repository`. public struct minimal_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/minimal-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/minimal-repository/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/minimal-repository/name`. @@ -2510,7 +2510,7 @@ public enum Components { /// - web_commit_signoff_required: /// - security_and_analysis: public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -4420,7 +4420,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/user-search-result-item/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/user-search-result-item/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/user-search-result-item/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/user-search-result-item/avatar_url`. @@ -4524,7 +4524,7 @@ public enum Components { /// - suspended_at: public init( login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, From 4434abcb7f967c43f0725fd060203ad592ea6135 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 9 Jul 2024 06:12:15 +0000 Subject: [PATCH 064/152] Commit via running ake Sources/secret-scanning --- Sources/secret-scanning/Types.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/secret-scanning/Types.swift b/Sources/secret-scanning/Types.swift index 50ed04e2659..785b23ccd5d 100644 --- a/Sources/secret-scanning/Types.swift +++ b/Sources/secret-scanning/Types.swift @@ -563,7 +563,7 @@ public enum Components { /// A unique identifier of the repository. /// /// - Remark: Generated from `#/components/schemas/simple-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// The GraphQL identifier of the repository. /// /// - Remark: Generated from `#/components/schemas/simple-repository/node_id`. @@ -792,7 +792,7 @@ public enum Components { /// - trees_url: A template for the API URL to create or retrieve a raw Git tree of the repository. /// - hooks_url: The API URL to list the hooks on the repository. public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, From 8bcf552dd30fb6db710bd3a6f2ec5bddd1721e11 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 9 Jul 2024 06:12:36 +0000 Subject: [PATCH 065/152] Commit via running ake Sources/teams --- Sources/teams/Types.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/teams/Types.swift b/Sources/teams/Types.swift index 8ac8d458564..3c20991e57a 100644 --- a/Sources/teams/Types.swift +++ b/Sources/teams/Types.swift @@ -2847,7 +2847,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/minimal-repository`. public struct minimal_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/minimal-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/minimal-repository/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/minimal-repository/name`. @@ -3195,7 +3195,7 @@ public enum Components { /// - web_commit_signoff_required: /// - security_and_analysis: public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -3466,7 +3466,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/organization-invitation`. public struct organization_hyphen_invitation: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/organization-invitation/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/organization-invitation/login`. public var login: Swift.String? /// - Remark: Generated from `#/components/schemas/organization-invitation/email`. @@ -3505,7 +3505,7 @@ public enum Components { /// - invitation_teams_url: /// - invitation_source: public init( - id: Swift.Int, + id: Swift.Int64, login: Swift.String? = nil, email: Swift.String? = nil, role: Swift.String, From 68827d2347f72ffae0dab609cab63c6126ea5f20 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 9 Jul 2024 06:12:57 +0000 Subject: [PATCH 066/152] Commit via running ake Sources/users --- Sources/users/Types.swift | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Sources/users/Types.swift b/Sources/users/Types.swift index d3fc05e4e73..2cb9a226f61 100644 --- a/Sources/users/Types.swift +++ b/Sources/users/Types.swift @@ -1399,7 +1399,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/public-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/public-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/public-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/public-user/avatar_url`. @@ -1556,7 +1556,7 @@ public enum Components { /// - collaborators: public init( login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -1686,7 +1686,7 @@ public enum Components { forKey: .login ) id = try container.decode( - Swift.Int.self, + Swift.Int64.self, forKey: .id ) node_id = try container.decode( @@ -1902,7 +1902,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/private-user/login`. public var login: Swift.String /// - Remark: Generated from `#/components/schemas/private-user/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/private-user/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/private-user/avatar_url`. @@ -2068,7 +2068,7 @@ public enum Components { /// - ldap_dn: public init( login: Swift.String, - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, avatar_url: Swift.String, gravatar_id: Swift.String? = nil, @@ -2243,7 +2243,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/gpg-key`. public struct gpg_hyphen_key: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/gpg-key/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/gpg-key/name`. public var name: Swift.String? /// - Remark: Generated from `#/components/schemas/gpg-key/primary_key_id`. @@ -2282,7 +2282,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/gpg-key/subkeysPayload`. public struct subkeysPayloadPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/gpg-key/subkeysPayload/id`. - public var id: Swift.Int? + public var id: Swift.Int64? /// - Remark: Generated from `#/components/schemas/gpg-key/subkeysPayload/primary_key_id`. public var primary_key_id: Swift.Int? /// - Remark: Generated from `#/components/schemas/gpg-key/subkeysPayload/key_id`. @@ -2352,7 +2352,7 @@ public enum Components { /// - raw_key: /// - revoked: public init( - id: Swift.Int? = nil, + id: Swift.Int64? = nil, primary_key_id: Swift.Int? = nil, key_id: Swift.String? = nil, public_key: Swift.String? = nil, @@ -2438,7 +2438,7 @@ public enum Components { /// - revoked: /// - raw_key: public init( - id: Swift.Int, + id: Swift.Int64, name: Swift.String? = nil, primary_key_id: Swift.Int? = nil, key_id: Swift.String, @@ -2495,7 +2495,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/key/key`. public var key: Swift.String /// - Remark: Generated from `#/components/schemas/key/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/key/url`. public var url: Swift.String /// - Remark: Generated from `#/components/schemas/key/title`. @@ -2518,7 +2518,7 @@ public enum Components { /// - read_only: public init( key: Swift.String, - id: Swift.Int, + id: Swift.Int64, url: Swift.String, title: Swift.String, created_at: Foundation.Date, From 77a1df942f63842e74214ccdd6b76f12230e5b87 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 9 Jul 2024 06:13:18 +0000 Subject: [PATCH 067/152] Commit via running ake Sources/codespaces --- Sources/codespaces/Types.swift | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Sources/codespaces/Types.swift b/Sources/codespaces/Types.swift index 4125d00aaa0..a8a344dfdbd 100644 --- a/Sources/codespaces/Types.swift +++ b/Sources/codespaces/Types.swift @@ -1948,7 +1948,7 @@ public enum Components { /// Unique identifier of the repository /// /// - Remark: Generated from `#/components/schemas/repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/repository/node_id`. public var node_id: Swift.String /// The name of the repository. @@ -2391,7 +2391,7 @@ public enum Components { /// - starred_at: /// - anonymous_access_enabled: Whether anonymous git access is enabled for this repository public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -2852,7 +2852,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/minimal-repository`. public struct minimal_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/minimal-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/minimal-repository/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/minimal-repository/name`. @@ -3200,7 +3200,7 @@ public enum Components { /// - web_commit_signoff_required: /// - security_and_analysis: public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -3558,7 +3558,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/codespace`. public struct codespace: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/codespace/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// Automatically generated name of this codespace. /// /// - Remark: Generated from `#/components/schemas/codespace/name`. @@ -3804,7 +3804,7 @@ public enum Components { /// - retention_expires_at: When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at" /// - last_known_stop_notice: The text to display to a user when a codespace has been stopped for a potentially actionable reason. public init( - id: Swift.Int, + id: Swift.Int64, name: Swift.String, display_name: Swift.String? = nil, environment_id: Swift.String? = nil, @@ -4026,7 +4026,7 @@ public enum Components { /// Unique identifier of the repository /// /// - Remark: Generated from `#/components/schemas/nullable-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-repository/node_id`. public var node_id: Swift.String /// The name of the repository. @@ -4469,7 +4469,7 @@ public enum Components { /// - starred_at: /// - anonymous_access_enabled: Whether anonymous git access is enabled for this repository public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -4801,7 +4801,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/full-repository`. public struct full_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/full-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/full-repository/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/full-repository/name`. @@ -5250,7 +5250,7 @@ public enum Components { /// - security_and_analysis: /// - custom_properties: The custom properties that were defined for the repository. The keys are the custom property names, and the values are the corresponding custom property values. public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -5857,7 +5857,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/codespace-with-full-repository`. public struct codespace_hyphen_with_hyphen_full_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/codespace-with-full-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// Automatically generated name of this codespace. /// /// - Remark: Generated from `#/components/schemas/codespace-with-full-repository/name`. @@ -6098,7 +6098,7 @@ public enum Components { /// - retention_period_minutes: Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). /// - retention_expires_at: When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at" public init( - id: Swift.Int, + id: Swift.Int64, name: Swift.String, display_name: Swift.String? = nil, environment_id: Swift.String? = nil, From 412b497dd1660a5be62431b978c7d9dbe53f5568 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 9 Jul 2024 06:13:39 +0000 Subject: [PATCH 068/152] Commit via running ake Sources/copilot --- Sources/copilot/Client.swift | 4 ++++ Sources/copilot/Types.swift | 16 ++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Sources/copilot/Client.swift b/Sources/copilot/Client.swift index 31653a9d1f6..8f654366a6f 100644 --- a/Sources/copilot/Client.swift +++ b/Sources/copilot/Client.swift @@ -768,6 +768,8 @@ public struct Client: APIProtocol { /// For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)". /// For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". /// + /// The response will contain the total number of new seats that were created and existing seats that were refreshed. + /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `POST /orgs/{org}/copilot/billing/selected_teams`. @@ -1116,6 +1118,8 @@ public struct Client: APIProtocol { /// For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)". /// For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". /// + /// The response will contain the total number of new seats that were created and existing seats that were refreshed. + /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `POST /orgs/{org}/copilot/billing/selected_users`. diff --git a/Sources/copilot/Types.swift b/Sources/copilot/Types.swift index d7fa045ffff..8bc31623a37 100644 --- a/Sources/copilot/Types.swift +++ b/Sources/copilot/Types.swift @@ -87,6 +87,8 @@ public protocol APIProtocol: Sendable { /// For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)". /// For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". /// + /// The response will contain the total number of new seats that were created and existing seats that were refreshed. + /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `POST /orgs/{org}/copilot/billing/selected_teams`. @@ -123,6 +125,8 @@ public protocol APIProtocol: Sendable { /// For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)". /// For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". /// + /// The response will contain the total number of new seats that were created and existing seats that were refreshed. + /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `POST /orgs/{org}/copilot/billing/selected_users`. @@ -296,6 +300,8 @@ extension APIProtocol { /// For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)". /// For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". /// + /// The response will contain the total number of new seats that were created and existing seats that were refreshed. + /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `POST /orgs/{org}/copilot/billing/selected_teams`. @@ -352,6 +358,8 @@ extension APIProtocol { /// For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)". /// For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". /// + /// The response will contain the total number of new seats that were created and existing seats that were refreshed. + /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `POST /orgs/{org}/copilot/billing/selected_users`. @@ -1218,7 +1226,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/enterprise-team`. public struct enterprise_hyphen_team: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/enterprise-team/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/enterprise-team/name`. public var name: Swift.String /// - Remark: Generated from `#/components/schemas/enterprise-team/slug`. @@ -1251,7 +1259,7 @@ public enum Components { /// - created_at: /// - updated_at: public init( - id: Swift.Int, + id: Swift.Int64, name: Swift.String, slug: Swift.String, url: Swift.String, @@ -3347,6 +3355,8 @@ public enum Operations { /// For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)". /// For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". /// + /// The response will contain the total number of new seats that were created and existing seats that were refreshed. + /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `POST /orgs/{org}/copilot/billing/selected_teams`. @@ -3957,6 +3967,8 @@ public enum Operations { /// For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)". /// For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". /// + /// The response will contain the total number of new seats that were created and existing seats that were refreshed. + /// /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// - Remark: HTTP `POST /orgs/{org}/copilot/billing/selected_users`. From 4a2a9d361b8af834f7d1ec1e9dd747791a6a620d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 9 Jul 2024 06:14:00 +0000 Subject: [PATCH 069/152] Commit via running ake Sources/security-advisories --- Sources/security-advisories/Types.swift | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Sources/security-advisories/Types.swift b/Sources/security-advisories/Types.swift index 26d89015530..343a885a89e 100644 --- a/Sources/security-advisories/Types.swift +++ b/Sources/security-advisories/Types.swift @@ -1433,7 +1433,7 @@ public enum Components { /// Unique identifier of the repository /// /// - Remark: Generated from `#/components/schemas/repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/repository/node_id`. public var node_id: Swift.String /// The name of the repository. @@ -1876,7 +1876,7 @@ public enum Components { /// - starred_at: /// - anonymous_access_enabled: Whether anonymous git access is enabled for this repository public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -2418,7 +2418,7 @@ public enum Components { /// A unique identifier of the repository. /// /// - Remark: Generated from `#/components/schemas/simple-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// The GraphQL identifier of the repository. /// /// - Remark: Generated from `#/components/schemas/simple-repository/node_id`. @@ -2647,7 +2647,7 @@ public enum Components { /// - trees_url: A template for the API URL to create or retrieve a raw Git tree of the repository. /// - hooks_url: The API URL to list the hooks on the repository. public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -2920,7 +2920,7 @@ public enum Components { /// Unique identifier of the repository /// /// - Remark: Generated from `#/components/schemas/nullable-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/nullable-repository/node_id`. public var node_id: Swift.String /// The name of the repository. @@ -3363,7 +3363,7 @@ public enum Components { /// - starred_at: /// - anonymous_access_enabled: Whether anonymous git access is enabled for this repository public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, @@ -3695,7 +3695,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/full-repository`. public struct full_hyphen_repository: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/full-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/full-repository/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/full-repository/name`. @@ -4144,7 +4144,7 @@ public enum Components { /// - security_and_analysis: /// - custom_properties: The custom properties that were defined for the repository. The keys are the custom property names, and the values are the corresponding custom property values. public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, From 8ad4b631b36a7cb642f08234688ce815921bf673 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 9 Jul 2024 06:15:45 +0000 Subject: [PATCH 070/152] Commit via running ake Sources/code-security --- Sources/code-security/Types.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/code-security/Types.swift b/Sources/code-security/Types.swift index 201de6dcb2c..4f3dec2e9da 100644 --- a/Sources/code-security/Types.swift +++ b/Sources/code-security/Types.swift @@ -557,7 +557,7 @@ public enum Components { /// A unique identifier of the repository. /// /// - Remark: Generated from `#/components/schemas/simple-repository/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// The GraphQL identifier of the repository. /// /// - Remark: Generated from `#/components/schemas/simple-repository/node_id`. @@ -786,7 +786,7 @@ public enum Components { /// - trees_url: A template for the API URL to create or retrieve a raw Git tree of the repository. /// - hooks_url: The API URL to list the hooks on the repository. public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, full_name: Swift.String, From 3d6979a92379033c453aa97b3856b5d496deb4fc Mon Sep 17 00:00:00 2001 From: Wei <41205mw@gmail.com> Date: Tue, 16 Jul 2024 09:52:35 +0800 Subject: [PATCH 071/152] Update Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7a9e5b82800..f608a353573 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ FILTERED_NAMES := $(shell yq -r '.tags[].name' $(OPENAPI_PATH)) SOURCE_DIRS := $(addprefix Sources/, $(FILTERED_NAMES)) PACKAGE_PATHS := Package.swift # Fix: https://github.com/irgaly/setup-mint/pull/25 -MINT_BIN := $(HOME)/bin/mint +MINT_BIN := $(HOME)/.mint/bin/mint # Helper .SILENT: commit From 673e733dca5242450ad391d4f34da99427d83a8b Mon Sep 17 00:00:00 2001 From: Wei <41205mw@gmail.com> Date: Tue, 16 Jul 2024 09:54:46 +0800 Subject: [PATCH 072/152] Update action.yml --- .github/workflows/actions/setup/action.yml | 78 +++++++++++----------- 1 file changed, 40 insertions(+), 38 deletions(-) diff --git a/.github/workflows/actions/setup/action.yml b/.github/workflows/actions/setup/action.yml index bddae8f8599..284e9c0df27 100644 --- a/.github/workflows/actions/setup/action.yml +++ b/.github/workflows/actions/setup/action.yml @@ -11,42 +11,44 @@ inputs: runs: using: 'composite' steps: - - uses: swift-actions/setup-swift@v2 - with: - swift-version: ${{ inputs.swift }} - - uses: irgaly/setup-mint@v1 - - uses: dcarbone/install-yq-action@v1.1.1 - - - name: "Xcode Cache" - if: contains(inputs.os, 'macos') - uses: irgaly/xcode-cache@v1 - with: - key: xcode-cache-deriveddata-${{ github.workflow }}-${{ github.sha }} - restore-keys: xcode-cache-deriveddata-${{ github.workflow }}- - - # - name: "Set IgnoreFileSystemDeviceInodeChanges flag" - # if: contains(inputs.os, 'macos') - # shell: bash - # run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES + - uses: swift-actions/setup-swift@v2 + with: + swift-version: ${{ inputs.swift }} + - uses: irgaly/setup-mint@v1 + with: + mint-executable-directory: $HOME/.mint/bin + - uses: dcarbone/install-yq-action@v1.1.1 - - name: "Swift Package Manager Cache" - uses: actions/cache@v4 - with: - path: .build - key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} - restore-keys: | - ${{ runner.os }}-spm- - - - name: "Compiling Cache" - uses: actions/cache@v4 - with: - path: ~/Library/Caches/org.swift.swiftpm/ - key: ${{ runner.os }}-swift-build-${{ github.ref_name }} - restore-keys: | - ${{ runner.os }}-swift-build- - -# Hint: Use Composite Actions -# - https://stackoverflow.com/a/75735736/9801139 -# - https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-a-public-action-in-a-subdirectory -# - https://docs.github.com/en/actions/creating-actions/creating-a-composite-action -# - https://dev.to/n3wt0n/composite-actions-vs-reusable-workflows-what-is-the-difference-github-actions-11kd + - name: "Xcode Cache" + if: contains(inputs.os, 'macos') + uses: irgaly/xcode-cache@v1 + with: + key: xcode-cache-deriveddata-${{ github.workflow }}-${{ github.sha }} + restore-keys: xcode-cache-deriveddata-${{ github.workflow }}- + + # - name: "Set IgnoreFileSystemDeviceInodeChanges flag" + # if: contains(inputs.os, 'macos') + # shell: bash + # run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES + + - name: "Swift Package Manager Cache" + uses: actions/cache@v4 + with: + path: .build + key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} + restore-keys: | + ${{ runner.os }}-spm- + + - name: "Compiling Cache" + uses: actions/cache@v4 + with: + path: ~/Library/Caches/org.swift.swiftpm/ + key: ${{ runner.os }}-swift-build-${{ github.ref_name }} + restore-keys: | + ${{ runner.os }}-swift-build- + + # Hint: Use Composite Actions + # - https://stackoverflow.com/a/75735736/9801139 + # - https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-a-public-action-in-a-subdirectory + # - https://docs.github.com/en/actions/creating-actions/creating-a-composite-action + # - https://dev.to/n3wt0n/composite-actions-vs-reusable-workflows-what-is-the-difference-github-actions-11kd From aa9a8b309aa4d515def6915e75958404983050c7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 01:57:20 +0000 Subject: [PATCH 073/152] Bump Submodule/github/rest-api-description from `fd544c2` to `3e3e138` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `fd544c2` to `3e3e138`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/fd544c2b878458798c8af979affb0407da2ef34e...3e3e13801b9b2cb62958385c2a70b15f2eae4b88) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index fd544c2b878..3e3e13801b9 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit fd544c2b878458798c8af979affb0407da2ef34e +Subproject commit 3e3e13801b9b2cb62958385c2a70b15f2eae4b88 From 7ec14b553a4c3bd67391e50e1870ea588fb74000 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Wed, 17 Jul 2024 12:41:12 +0000 Subject: [PATCH 074/152] Commit via running ake Sources/actions --- Sources/actions/Types.swift | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Sources/actions/Types.swift b/Sources/actions/Types.swift index 909635049d0..045abfb4562 100644 --- a/Sources/actions/Types.swift +++ b/Sources/actions/Types.swift @@ -5528,6 +5528,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -5535,22 +5557,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, - secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil + secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository From 84e62df2fa63e44a665230e9f8f8b82804553234 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Wed, 17 Jul 2024 12:41:33 +0000 Subject: [PATCH 075/152] Commit via running ake Sources/activity --- Sources/activity/Types.swift | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Sources/activity/Types.swift b/Sources/activity/Types.swift index 34219d0ef17..3ce59e162af 100644 --- a/Sources/activity/Types.swift +++ b/Sources/activity/Types.swift @@ -3493,6 +3493,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -3500,22 +3522,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, - secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil + secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository From 3d1b75fe7446acc6c742df098319db7c5a626281 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Wed, 17 Jul 2024 12:42:35 +0000 Subject: [PATCH 076/152] Commit via running ake Sources/checks --- Sources/checks/Types.swift | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Sources/checks/Types.swift b/Sources/checks/Types.swift index 1060b596e65..b19df27f944 100644 --- a/Sources/checks/Types.swift +++ b/Sources/checks/Types.swift @@ -1086,6 +1086,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -1093,22 +1115,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, - secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil + secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository From 4cd1020093734769792e3f9aab54ca1c5e6f4b66 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Wed, 17 Jul 2024 12:43:58 +0000 Subject: [PATCH 077/152] Commit via running ake Sources/dependabot --- Sources/dependabot/Types.swift | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Sources/dependabot/Types.swift b/Sources/dependabot/Types.swift index 0345e957af1..3e93aff0c8b 100644 --- a/Sources/dependabot/Types.swift +++ b/Sources/dependabot/Types.swift @@ -2287,6 +2287,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -2294,22 +2316,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, - secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil + secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository From a61db75b595fffefbd5aa0110144876a2ad25cab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Wed, 17 Jul 2024 12:47:26 +0000 Subject: [PATCH 078/152] Commit via running ake Sources/migrations --- Sources/migrations/Types.swift | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Sources/migrations/Types.swift b/Sources/migrations/Types.swift index 3b6c5a8c62d..46c861f1dec 100644 --- a/Sources/migrations/Types.swift +++ b/Sources/migrations/Types.swift @@ -2131,6 +2131,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -2138,22 +2160,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, - secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil + secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository From 97c91708e741957a818d5025f64cfdda8d627101 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Wed, 17 Jul 2024 12:48:08 +0000 Subject: [PATCH 079/152] Commit via running ake Sources/orgs --- Sources/orgs/Client.swift | 24 +---- Sources/orgs/Types.swift | 187 +++++++++++++++++++------------------- 2 files changed, 94 insertions(+), 117 deletions(-) diff --git a/Sources/orgs/Client.swift b/Sources/orgs/Client.swift index d025132e07c..e4804752110 100644 --- a/Sources/orgs/Client.swift +++ b/Sources/orgs/Client.swift @@ -134,17 +134,6 @@ public struct Client: APIProtocol { /// /// To see the full details about an organization, the authenticated user must be an organization owner. /// - /// The values returned by this endpoint are set by the "Update an organization" endpoint. If your organization set a default security configuration (beta), the following values retrieved from the "Update an organization" endpoint have been overwritten by that configuration: - /// - /// - advanced_security_enabled_for_new_repositories - /// - dependabot_alerts_enabled_for_new_repositories - /// - dependabot_security_updates_enabled_for_new_repositories - /// - dependency_graph_enabled_for_new_repositories - /// - secret_scanning_enabled_for_new_repositories - /// - secret_scanning_push_protection_enabled_for_new_repositories - /// - /// For more information on security configurations, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." - /// /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization. /// /// To see information about an organization's GitHub plan, GitHub Apps need the `Organization plan` permission. @@ -235,18 +224,9 @@ public struct Client: APIProtocol { /// /// **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). /// - /// Updates the organization's profile and member privileges. + /// **Parameter Deprecation Notice:** Code security product enablement for new repositories through the organization API is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/). /// - /// With security configurations (beta), your organization can choose a default security configuration which will automatically apply a set of security enablement settings to new repositories in your organization based on their visibility. For targeted repositories, the following attributes will be overridden by the default security configuration: - /// - /// - advanced_security_enabled_for_new_repositories - /// - dependabot_alerts_enabled_for_new_repositories - /// - dependabot_security_updates_enabled_for_new_repositories - /// - dependency_graph_enabled_for_new_repositories - /// - secret_scanning_enabled_for_new_repositories - /// - secret_scanning_push_protection_enabled_for_new_repositories - /// - /// For more information on setting a default security configuration, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." + /// Updates the organization's profile and member privileges. /// /// The authenticated user must be an organization owner to use this endpoint. /// diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index 7a3f4dc6f4c..ac9573b07f7 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -28,17 +28,6 @@ public protocol APIProtocol: Sendable { /// /// To see the full details about an organization, the authenticated user must be an organization owner. /// - /// The values returned by this endpoint are set by the "Update an organization" endpoint. If your organization set a default security configuration (beta), the following values retrieved from the "Update an organization" endpoint have been overwritten by that configuration: - /// - /// - advanced_security_enabled_for_new_repositories - /// - dependabot_alerts_enabled_for_new_repositories - /// - dependabot_security_updates_enabled_for_new_repositories - /// - dependency_graph_enabled_for_new_repositories - /// - secret_scanning_enabled_for_new_repositories - /// - secret_scanning_push_protection_enabled_for_new_repositories - /// - /// For more information on security configurations, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." - /// /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization. /// /// To see information about an organization's GitHub plan, GitHub Apps need the `Organization plan` permission. @@ -50,18 +39,9 @@ public protocol APIProtocol: Sendable { /// /// **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). /// - /// Updates the organization's profile and member privileges. - /// - /// With security configurations (beta), your organization can choose a default security configuration which will automatically apply a set of security enablement settings to new repositories in your organization based on their visibility. For targeted repositories, the following attributes will be overridden by the default security configuration: - /// - /// - advanced_security_enabled_for_new_repositories - /// - dependabot_alerts_enabled_for_new_repositories - /// - dependabot_security_updates_enabled_for_new_repositories - /// - dependency_graph_enabled_for_new_repositories - /// - secret_scanning_enabled_for_new_repositories - /// - secret_scanning_push_protection_enabled_for_new_repositories + /// **Parameter Deprecation Notice:** Code security product enablement for new repositories through the organization API is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/). /// - /// For more information on setting a default security configuration, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." + /// Updates the organization's profile and member privileges. /// /// The authenticated user must be an organization owner to use this endpoint. /// @@ -846,17 +826,6 @@ extension APIProtocol { /// /// To see the full details about an organization, the authenticated user must be an organization owner. /// - /// The values returned by this endpoint are set by the "Update an organization" endpoint. If your organization set a default security configuration (beta), the following values retrieved from the "Update an organization" endpoint have been overwritten by that configuration: - /// - /// - advanced_security_enabled_for_new_repositories - /// - dependabot_alerts_enabled_for_new_repositories - /// - dependabot_security_updates_enabled_for_new_repositories - /// - dependency_graph_enabled_for_new_repositories - /// - secret_scanning_enabled_for_new_repositories - /// - secret_scanning_push_protection_enabled_for_new_repositories - /// - /// For more information on security configurations, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." - /// /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization. /// /// To see information about an organization's GitHub plan, GitHub Apps need the `Organization plan` permission. @@ -876,18 +845,9 @@ extension APIProtocol { /// /// **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). /// - /// Updates the organization's profile and member privileges. - /// - /// With security configurations (beta), your organization can choose a default security configuration which will automatically apply a set of security enablement settings to new repositories in your organization based on their visibility. For targeted repositories, the following attributes will be overridden by the default security configuration: + /// **Parameter Deprecation Notice:** Code security product enablement for new repositories through the organization API is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/). /// - /// - advanced_security_enabled_for_new_repositories - /// - dependabot_alerts_enabled_for_new_repositories - /// - dependabot_security_updates_enabled_for_new_repositories - /// - dependency_graph_enabled_for_new_repositories - /// - secret_scanning_enabled_for_new_repositories - /// - secret_scanning_push_protection_enabled_for_new_repositories - /// - /// For more information on setting a default security configuration, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." + /// Updates the organization's profile and member privileges. /// /// The authenticated user must be an organization owner to use this endpoint. /// @@ -4687,6 +4647,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -4694,22 +4676,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, - secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil + secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository @@ -5468,46 +5454,59 @@ public enum Components { public var members_can_fork_private_repositories: Swift.Bool? /// - Remark: Generated from `#/components/schemas/organization-full/web_commit_signoff_required`. public var web_commit_signoff_required: Swift.Bool? + /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// /// Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization. /// /// This field is only visible to organization owners or members of a team with the security manager role. /// /// - Remark: Generated from `#/components/schemas/organization-full/advanced_security_enabled_for_new_repositories`. + @available(*, deprecated) public var advanced_security_enabled_for_new_repositories: Swift.Bool? - /// Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred to - /// this organization. + /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// + /// Whether Dependabot alerts are automatically enabled for new repositories and repositories transferred to this organization. /// /// This field is only visible to organization owners or members of a team with the security manager role. /// /// - Remark: Generated from `#/components/schemas/organization-full/dependabot_alerts_enabled_for_new_repositories`. + @available(*, deprecated) public var dependabot_alerts_enabled_for_new_repositories: Swift.Bool? - /// Whether dependabot security updates are automatically enabled for new repositories and repositories transferred - /// to this organization. + /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// + /// Whether Dependabot security updates are automatically enabled for new repositories and repositories transferred to this organization. /// /// This field is only visible to organization owners or members of a team with the security manager role. /// /// - Remark: Generated from `#/components/schemas/organization-full/dependabot_security_updates_enabled_for_new_repositories`. + @available(*, deprecated) public var dependabot_security_updates_enabled_for_new_repositories: Swift.Bool? - /// Whether dependency graph is automatically enabled for new repositories and repositories transferred to this - /// organization. + /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// + /// Whether dependency graph is automatically enabled for new repositories and repositories transferred to this organization. /// /// This field is only visible to organization owners or members of a team with the security manager role. /// /// - Remark: Generated from `#/components/schemas/organization-full/dependency_graph_enabled_for_new_repositories`. + @available(*, deprecated) public var dependency_graph_enabled_for_new_repositories: Swift.Bool? - /// Whether secret scanning is automatically enabled for new repositories and repositories transferred to this - /// organization. + /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// + /// Whether secret scanning is automatically enabled for new repositories and repositories transferred to this organization. /// /// This field is only visible to organization owners or members of a team with the security manager role. /// /// - Remark: Generated from `#/components/schemas/organization-full/secret_scanning_enabled_for_new_repositories`. + @available(*, deprecated) public var secret_scanning_enabled_for_new_repositories: Swift.Bool? - /// Whether secret scanning push protection is automatically enabled for new repositories and repositories - /// transferred to this organization. + /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// + /// Whether secret scanning push protection is automatically enabled for new repositories and repositories transferred to this organization. /// /// This field is only visible to organization owners or members of a team with the security manager role. /// /// - Remark: Generated from `#/components/schemas/organization-full/secret_scanning_push_protection_enabled_for_new_repositories`. + @available(*, deprecated) public var secret_scanning_push_protection_enabled_for_new_repositories: Swift.Bool? /// Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. /// @@ -5572,12 +5571,12 @@ public enum Components { /// - members_can_create_private_pages: /// - members_can_fork_private_repositories: /// - web_commit_signoff_required: - /// - advanced_security_enabled_for_new_repositories: Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization. - /// - dependabot_alerts_enabled_for_new_repositories: Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred to - /// - dependabot_security_updates_enabled_for_new_repositories: Whether dependabot security updates are automatically enabled for new repositories and repositories transferred - /// - dependency_graph_enabled_for_new_repositories: Whether dependency graph is automatically enabled for new repositories and repositories transferred to this - /// - secret_scanning_enabled_for_new_repositories: Whether secret scanning is automatically enabled for new repositories and repositories transferred to this - /// - secret_scanning_push_protection_enabled_for_new_repositories: Whether secret scanning push protection is automatically enabled for new repositories and repositories + /// - advanced_security_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - dependabot_alerts_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - dependabot_security_updates_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - dependency_graph_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - secret_scanning_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - secret_scanning_push_protection_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. /// - secret_scanning_push_protection_custom_link_enabled: Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. /// - secret_scanning_push_protection_custom_link: An optional URL string to display to contributors who are blocked from pushing a secret. /// - created_at: @@ -7692,17 +7691,6 @@ public enum Operations { /// /// To see the full details about an organization, the authenticated user must be an organization owner. /// - /// The values returned by this endpoint are set by the "Update an organization" endpoint. If your organization set a default security configuration (beta), the following values retrieved from the "Update an organization" endpoint have been overwritten by that configuration: - /// - /// - advanced_security_enabled_for_new_repositories - /// - dependabot_alerts_enabled_for_new_repositories - /// - dependabot_security_updates_enabled_for_new_repositories - /// - dependency_graph_enabled_for_new_repositories - /// - secret_scanning_enabled_for_new_repositories - /// - secret_scanning_push_protection_enabled_for_new_repositories - /// - /// For more information on security configurations, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." - /// /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization. /// /// To see information about an organization's GitHub plan, GitHub Apps need the `Organization plan` permission. @@ -7862,18 +7850,9 @@ public enum Operations { /// /// **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). /// - /// Updates the organization's profile and member privileges. - /// - /// With security configurations (beta), your organization can choose a default security configuration which will automatically apply a set of security enablement settings to new repositories in your organization based on their visibility. For targeted repositories, the following attributes will be overridden by the default security configuration: + /// **Parameter Deprecation Notice:** Code security product enablement for new repositories through the organization API is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/). /// - /// - advanced_security_enabled_for_new_repositories - /// - dependabot_alerts_enabled_for_new_repositories - /// - dependabot_security_updates_enabled_for_new_repositories - /// - dependency_graph_enabled_for_new_repositories - /// - secret_scanning_enabled_for_new_repositories - /// - secret_scanning_push_protection_enabled_for_new_repositories - /// - /// For more information on setting a default security configuration, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." + /// Updates the organization's profile and member privileges. /// /// The authenticated user must be an organization owner to use this endpoint. /// @@ -8016,53 +7995,71 @@ public enum Operations { public var web_commit_signoff_required: Swift.Bool? /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/blog`. public var blog: Swift.String? - /// Whether GitHub Advanced Security is automatically enabled for new repositories. + /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// + /// Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred to this organization. /// /// To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// /// You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. /// /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/advanced_security_enabled_for_new_repositories`. + @available(*, deprecated) public var advanced_security_enabled_for_new_repositories: Swift.Bool? - /// Whether Dependabot alerts is automatically enabled for new repositories. + /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// + /// Whether Dependabot alerts are automatically enabled for new repositories and repositories transferred to this organization. /// /// To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// /// You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. /// /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/dependabot_alerts_enabled_for_new_repositories`. + @available(*, deprecated) public var dependabot_alerts_enabled_for_new_repositories: Swift.Bool? - /// Whether Dependabot security updates is automatically enabled for new repositories. + /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// + /// Whether Dependabot security updates are automatically enabled for new repositories and repositories transferred to this organization. /// /// To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// /// You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. /// /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/dependabot_security_updates_enabled_for_new_repositories`. + @available(*, deprecated) public var dependabot_security_updates_enabled_for_new_repositories: Swift.Bool? - /// Whether dependency graph is automatically enabled for new repositories. + /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// + /// Whether dependency graph is automatically enabled for new repositories and repositories transferred to this organization. /// /// To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// /// You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. /// /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/dependency_graph_enabled_for_new_repositories`. + @available(*, deprecated) public var dependency_graph_enabled_for_new_repositories: Swift.Bool? - /// Whether secret scanning is automatically enabled for new repositories. + /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// + /// Whether secret scanning is automatically enabled for new repositories and repositories transferred to this organization. /// /// To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// /// You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. /// /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/secret_scanning_enabled_for_new_repositories`. + @available(*, deprecated) public var secret_scanning_enabled_for_new_repositories: Swift.Bool? - /// Whether secret scanning push protection is automatically enabled for new repositories. + /// **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// + /// Whether secret scanning push protection is automatically enabled for new repositories and repositories transferred to this organization. /// /// To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// /// You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. /// /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/secret_scanning_push_protection_enabled_for_new_repositories`. + @available(*, deprecated) public var secret_scanning_push_protection_enabled_for_new_repositories: Swift.Bool? /// Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. /// @@ -8096,12 +8093,12 @@ public enum Operations { /// - members_can_fork_private_repositories: Whether organization members can fork private organization repositories. /// - web_commit_signoff_required: Whether contributors to organization repositories are required to sign off on commits they make through GitHub's web interface. /// - blog: - /// - advanced_security_enabled_for_new_repositories: Whether GitHub Advanced Security is automatically enabled for new repositories. - /// - dependabot_alerts_enabled_for_new_repositories: Whether Dependabot alerts is automatically enabled for new repositories. - /// - dependabot_security_updates_enabled_for_new_repositories: Whether Dependabot security updates is automatically enabled for new repositories. - /// - dependency_graph_enabled_for_new_repositories: Whether dependency graph is automatically enabled for new repositories. - /// - secret_scanning_enabled_for_new_repositories: Whether secret scanning is automatically enabled for new repositories. - /// - secret_scanning_push_protection_enabled_for_new_repositories: Whether secret scanning push protection is automatically enabled for new repositories. + /// - advanced_security_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - dependabot_alerts_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - dependabot_security_updates_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - dependency_graph_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - secret_scanning_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. + /// - secret_scanning_push_protection_enabled_for_new_repositories: **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. /// - secret_scanning_push_protection_custom_link_enabled: Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. /// - secret_scanning_push_protection_custom_link: If `secret_scanning_push_protection_custom_link_enabled` is true, the URL that will be displayed to contributors who are blocked from pushing a secret. public init( From 6e83628e496402a7e41f8833c88594ee1c806419 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Wed, 17 Jul 2024 12:48:29 +0000 Subject: [PATCH 080/152] Commit via running ake Sources/packages --- Sources/packages/Types.swift | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Sources/packages/Types.swift b/Sources/packages/Types.swift index 155b7d5360f..097e4b06541 100644 --- a/Sources/packages/Types.swift +++ b/Sources/packages/Types.swift @@ -1281,6 +1281,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -1288,22 +1310,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, - secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil + secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository From daf93810645d9fa986c169fd22f1656d54011bb8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Wed, 17 Jul 2024 12:49:11 +0000 Subject: [PATCH 081/152] Commit via running ake Sources/pulls --- Sources/pulls/Types.swift | 88 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 84 insertions(+), 4 deletions(-) diff --git a/Sources/pulls/Types.swift b/Sources/pulls/Types.swift index b5ed2955722..719cf194fee 100644 --- a/Sources/pulls/Types.swift +++ b/Sources/pulls/Types.swift @@ -2766,6 +2766,16 @@ public enum Components { case rocket } } + /// An object without any properties. + /// + /// - Remark: Generated from `#/components/schemas/empty-object`. + public struct empty_hyphen_object: Codable, Hashable, Sendable { + /// Creates a new `empty_hyphen_object`. + public init() {} + public init(from decoder: any Decoder) throws { + try decoder.ensureNoAdditionalProperties(knownKeys: []) + } + } /// Groups of organization members that gives permissions on specified repositories. /// /// - Remark: Generated from `#/components/schemas/team-simple`. @@ -3121,9 +3131,79 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/commit/commit`. public var commit: Components.Schemas.commit.commitPayload /// - Remark: Generated from `#/components/schemas/commit/author`. - public var author: Components.Schemas.nullable_hyphen_simple_hyphen_user? + @frozen public enum authorPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/commit/author/case1`. + case simple_hyphen_user(Components.Schemas.simple_hyphen_user) + /// - Remark: Generated from `#/components/schemas/commit/author/case2`. + case empty_hyphen_object(Components.Schemas.empty_hyphen_object) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self = .simple_hyphen_user(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + do { + self = .empty_hyphen_object(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + throw Swift.DecodingError.failedToDecodeOneOfSchema( + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + switch self { + case let .simple_hyphen_user(value): + try value.encode(to: encoder) + case let .empty_hyphen_object(value): + try value.encode(to: encoder) + } + } + } + /// - Remark: Generated from `#/components/schemas/commit/author`. + public var author: Components.Schemas.commit.authorPayload? + /// - Remark: Generated from `#/components/schemas/commit/committer`. + @frozen public enum committerPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/commit/committer/case1`. + case simple_hyphen_user(Components.Schemas.simple_hyphen_user) + /// - Remark: Generated from `#/components/schemas/commit/committer/case2`. + case empty_hyphen_object(Components.Schemas.empty_hyphen_object) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self = .simple_hyphen_user(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + do { + self = .empty_hyphen_object(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + throw Swift.DecodingError.failedToDecodeOneOfSchema( + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + switch self { + case let .simple_hyphen_user(value): + try value.encode(to: encoder) + case let .empty_hyphen_object(value): + try value.encode(to: encoder) + } + } + } /// - Remark: Generated from `#/components/schemas/commit/committer`. - public var committer: Components.Schemas.nullable_hyphen_simple_hyphen_user? + public var committer: Components.Schemas.commit.committerPayload? /// - Remark: Generated from `#/components/schemas/commit/parentsPayload`. public struct parentsPayloadPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/commit/parentsPayload/sha`. @@ -3211,8 +3291,8 @@ public enum Components { html_url: Swift.String, comments_url: Swift.String, commit: Components.Schemas.commit.commitPayload, - author: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, - committer: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, + author: Components.Schemas.commit.authorPayload? = nil, + committer: Components.Schemas.commit.committerPayload? = nil, parents: Components.Schemas.commit.parentsPayload, stats: Components.Schemas.commit.statsPayload? = nil, files: [Components.Schemas.diff_hyphen_entry]? = nil From d7dd9cef0944d273978fe746791ec367f966225e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Wed, 17 Jul 2024 12:50:14 +0000 Subject: [PATCH 082/152] Commit via running ake Sources/repos --- Sources/repos/Types.swift | 139 +++++++++++++++++++++++++++++++++++--- 1 file changed, 131 insertions(+), 8 deletions(-) diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index 0470ec86c92..99a89ff539b 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -8604,6 +8604,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -8611,22 +8633,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, - secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil + secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository @@ -14953,9 +14979,79 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/commit/commit`. public var commit: Components.Schemas.commit.commitPayload /// - Remark: Generated from `#/components/schemas/commit/author`. - public var author: Components.Schemas.nullable_hyphen_simple_hyphen_user? + @frozen public enum authorPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/commit/author/case1`. + case simple_hyphen_user(Components.Schemas.simple_hyphen_user) + /// - Remark: Generated from `#/components/schemas/commit/author/case2`. + case empty_hyphen_object(Components.Schemas.empty_hyphen_object) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self = .simple_hyphen_user(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + do { + self = .empty_hyphen_object(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + throw Swift.DecodingError.failedToDecodeOneOfSchema( + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + switch self { + case let .simple_hyphen_user(value): + try value.encode(to: encoder) + case let .empty_hyphen_object(value): + try value.encode(to: encoder) + } + } + } + /// - Remark: Generated from `#/components/schemas/commit/author`. + public var author: Components.Schemas.commit.authorPayload? + /// - Remark: Generated from `#/components/schemas/commit/committer`. + @frozen public enum committerPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/commit/committer/case1`. + case simple_hyphen_user(Components.Schemas.simple_hyphen_user) + /// - Remark: Generated from `#/components/schemas/commit/committer/case2`. + case empty_hyphen_object(Components.Schemas.empty_hyphen_object) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self = .simple_hyphen_user(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + do { + self = .empty_hyphen_object(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + throw Swift.DecodingError.failedToDecodeOneOfSchema( + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + switch self { + case let .simple_hyphen_user(value): + try value.encode(to: encoder) + case let .empty_hyphen_object(value): + try value.encode(to: encoder) + } + } + } /// - Remark: Generated from `#/components/schemas/commit/committer`. - public var committer: Components.Schemas.nullable_hyphen_simple_hyphen_user? + public var committer: Components.Schemas.commit.committerPayload? /// - Remark: Generated from `#/components/schemas/commit/parentsPayload`. public struct parentsPayloadPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/commit/parentsPayload/sha`. @@ -15043,8 +15139,8 @@ public enum Components { html_url: Swift.String, comments_url: Swift.String, commit: Components.Schemas.commit.commitPayload, - author: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, - committer: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, + author: Components.Schemas.commit.authorPayload? = nil, + committer: Components.Schemas.commit.committerPayload? = nil, parents: Components.Schemas.commit.parentsPayload, stats: Components.Schemas.commit.statsPayload? = nil, files: [Components.Schemas.diff_hyphen_entry]? = nil @@ -24875,25 +24971,52 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/json/security_and_analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Operations.repos_sol_update.Input.Body.jsonPayload.security_and_analysisPayload.secret_scanning_push_protectionPayload? + /// Use the `status` property to enable or disable secret scanning non-provider patterns for this repository. For more information, see "[Secret scanning supported secrets](/code-security/secret-scanning/secret-scanning-patterns#supported-secrets)." + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/json/security_and_analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// Can be `enabled` or `disabled`. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/json/security_and_analysis/secret_scanning_non_provider_patterns/status`. + public var status: Swift.String? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: Can be `enabled` or `disabled`. + public init(status: Swift.String? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// Use the `status` property to enable or disable secret scanning non-provider patterns for this repository. For more information, see "[Secret scanning supported secrets](/code-security/secret-scanning/secret-scanning-patterns#supported-secrets)." + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/json/security_and_analysis/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Operations.repos_sol_update.Input.Body.jsonPayload.security_and_analysisPayload.secret_scanning_non_provider_patternsPayload? /// Creates a new `security_and_analysisPayload`. /// /// - Parameters: /// - advanced_security: Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." /// - secret_scanning: Use the `status` property to enable or disable secret scanning for this repository. For more information, see "[About secret scanning](/code-security/secret-security/about-secret-scanning)." /// - secret_scanning_push_protection: Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." + /// - secret_scanning_non_provider_patterns: Use the `status` property to enable or disable secret scanning non-provider patterns for this repository. For more information, see "[Secret scanning supported secrets](/code-security/secret-scanning/secret-scanning-patterns#supported-secrets)." public init( advanced_security: Operations.repos_sol_update.Input.Body.jsonPayload.security_and_analysisPayload.advanced_securityPayload? = nil, secret_scanning: Operations.repos_sol_update.Input.Body.jsonPayload.security_and_analysisPayload.secret_scanningPayload? = nil, - secret_scanning_push_protection: Operations.repos_sol_update.Input.Body.jsonPayload.security_and_analysisPayload.secret_scanning_push_protectionPayload? = nil + secret_scanning_push_protection: Operations.repos_sol_update.Input.Body.jsonPayload.security_and_analysisPayload.secret_scanning_push_protectionPayload? = nil, + secret_scanning_non_provider_patterns: Operations.repos_sol_update.Input.Body.jsonPayload.security_and_analysisPayload.secret_scanning_non_provider_patternsPayload? = nil ) { self.advanced_security = advanced_security self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns } public enum CodingKeys: String, CodingKey { case advanced_security case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Specify which security and analysis features to enable or disable for the repository. @@ -27250,7 +27373,7 @@ public enum Operations { self.body = body } } - /// Response if dependabot is enabled + /// Response if Dependabot is enabled /// /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/automated-security-fixes/get(repos/check-automated-security-fixes)/responses/200`. /// @@ -27277,7 +27400,7 @@ public enum Operations { /// Creates a new `NotFound`. public init() {} } - /// Not Found if dependabot is not enabled for the repository + /// Not Found if Dependabot is not enabled for the repository /// /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/automated-security-fixes/get(repos/check-automated-security-fixes)/responses/404`. /// From 6920a4119944ff8fc56e287ca3713c27628ffa4c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Wed, 17 Jul 2024 12:50:35 +0000 Subject: [PATCH 083/152] Commit via running ake Sources/search --- Sources/search/Types.swift | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Sources/search/Types.swift b/Sources/search/Types.swift index 09ed2c2ba3b..7fc0a2ed1d2 100644 --- a/Sources/search/Types.swift +++ b/Sources/search/Types.swift @@ -2132,6 +2132,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -2139,22 +2161,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, - secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil + secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository From 1038fc9bed7f51cbb31d173bece795f636d222a4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Wed, 17 Jul 2024 12:51:17 +0000 Subject: [PATCH 084/152] Commit via running ake Sources/teams --- Sources/teams/Types.swift | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Sources/teams/Types.swift b/Sources/teams/Types.swift index 3c20991e57a..81bdd6ed5e7 100644 --- a/Sources/teams/Types.swift +++ b/Sources/teams/Types.swift @@ -2817,6 +2817,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -2824,22 +2846,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, - secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil + secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository From 4274c4af871d10aa373f8e00fbb8187b7efa7cb0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Wed, 17 Jul 2024 12:51:59 +0000 Subject: [PATCH 085/152] Commit via running ake Sources/codespaces --- Sources/codespaces/Types.swift | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Sources/codespaces/Types.swift b/Sources/codespaces/Types.swift index a8a344dfdbd..1ecce119c17 100644 --- a/Sources/codespaces/Types.swift +++ b/Sources/codespaces/Types.swift @@ -2822,6 +2822,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -2829,22 +2851,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, - secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil + secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// Minimal Repository From 5eb74663d9b02c41a1949600b174e5206562ead6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Wed, 17 Jul 2024 12:52:41 +0000 Subject: [PATCH 086/152] Commit via running ake Sources/security-advisories --- Sources/security-advisories/Types.swift | 28 ++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Sources/security-advisories/Types.swift b/Sources/security-advisories/Types.swift index 343a885a89e..44c750f8be3 100644 --- a/Sources/security-advisories/Types.swift +++ b/Sources/security-advisories/Types.swift @@ -2888,6 +2888,28 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns/status`. + public var status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? + /// Creates a new `secret_scanning_non_provider_patternsPayload`. + /// + /// - Parameters: + /// - status: + public init(status: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload.statusPayload? = nil) { + self.status = status + } + public enum CodingKeys: String, CodingKey { + case status + } + } + /// - Remark: Generated from `#/components/schemas/security-and-analysis/secret_scanning_non_provider_patterns`. + public var secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? /// Creates a new `security_hyphen_and_hyphen_analysis`. /// /// - Parameters: @@ -2895,22 +2917,26 @@ public enum Components { /// - dependabot_security_updates: Enable or disable Dependabot security updates for the repository. /// - secret_scanning: /// - secret_scanning_push_protection: + /// - secret_scanning_non_provider_patterns: public init( advanced_security: Components.Schemas.security_hyphen_and_hyphen_analysis.advanced_securityPayload? = nil, dependabot_security_updates: Components.Schemas.security_hyphen_and_hyphen_analysis.dependabot_security_updatesPayload? = nil, secret_scanning: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanningPayload? = nil, - secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil + secret_scanning_push_protection: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_push_protectionPayload? = nil, + secret_scanning_non_provider_patterns: Components.Schemas.security_hyphen_and_hyphen_analysis.secret_scanning_non_provider_patternsPayload? = nil ) { self.advanced_security = advanced_security self.dependabot_security_updates = dependabot_security_updates self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_non_provider_patterns = secret_scanning_non_provider_patterns } public enum CodingKeys: String, CodingKey { case advanced_security case dependabot_security_updates case secret_scanning case secret_scanning_push_protection + case secret_scanning_non_provider_patterns } } /// A repository on GitHub. From 2098712b5dd4218c34b9750ca72f97cb23dca0c7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Wed, 17 Jul 2024 12:54:25 +0000 Subject: [PATCH 087/152] Commit via running ake Sources/code-security --- Sources/code-security/Client.swift | 155 +++++++++++ Sources/code-security/Types.swift | 398 ++++++++++++++++++++++++++++- 2 files changed, 549 insertions(+), 4 deletions(-) diff --git a/Sources/code-security/Client.swift b/Sources/code-security/Client.swift index 03d06cab2f8..c7c472015bd 100644 --- a/Sources/code-security/Client.swift +++ b/Sources/code-security/Client.swift @@ -369,6 +369,161 @@ public struct Client: APIProtocol { } ) } + /// Detach configurations from repositories + /// + /// Detach code security configuration(s) from a set of repositories. + /// Repositories will retain their settings but will no longer be associated with the configuration. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/code-security/configurations/detach`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/detach/delete(code-security/detach-configuration)`. + public func code_hyphen_security_sol_detach_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_detach_hyphen_configuration.Output { + try await client.send( + input: input, + forOperation: Operations.code_hyphen_security_sol_detach_hyphen_configuration.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/code-security/configurations/detach", + parameters: [ + input.path.org + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .delete + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 204: + return .noContent(.init()) + case 400: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.bad_request.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json", + "application/scim+json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + case "application/scim+json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.scim_hyphen_error.self, + from: responseBody, + transforming: { value in + .application_scim_plus_json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .badRequest(.init(body: body)) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.forbidden.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.not_found.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + case 409: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.conflict.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .conflict(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } /// Get a code security configuration /// /// Gets a code security configuration available in an organization. diff --git a/Sources/code-security/Types.swift b/Sources/code-security/Types.swift index 4f3dec2e9da..2243d502a7a 100644 --- a/Sources/code-security/Types.swift +++ b/Sources/code-security/Types.swift @@ -44,6 +44,18 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations/defaults`. /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/defaults/get(code-security/get-default-configurations)`. func code_hyphen_security_sol_get_hyphen_default_hyphen_configurations(_ input: Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Input) async throws -> Operations.code_hyphen_security_sol_get_hyphen_default_hyphen_configurations.Output + /// Detach configurations from repositories + /// + /// Detach code security configuration(s) from a set of repositories. + /// Repositories will retain their settings but will no longer be associated with the configuration. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/code-security/configurations/detach`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/detach/delete(code-security/detach-configuration)`. + func code_hyphen_security_sol_detach_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_detach_hyphen_configuration.Output /// Get a code security configuration /// /// Gets a code security configuration available in an organization. @@ -181,6 +193,28 @@ extension APIProtocol { headers: headers )) } + /// Detach configurations from repositories + /// + /// Detach code security configuration(s) from a set of repositories. + /// Repositories will retain their settings but will no longer be associated with the configuration. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/code-security/configurations/detach`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/detach/delete(code-security/detach-configuration)`. + public func code_hyphen_security_sol_detach_hyphen_configuration( + path: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input.Path, + headers: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input.Headers = .init(), + body: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input.Body + ) async throws -> Operations.code_hyphen_security_sol_detach_hyphen_configuration.Output { + try await code_hyphen_security_sol_detach_hyphen_configuration(Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input( + path: path, + headers: headers, + body: body + )) + } /// Get a code security configuration /// /// Gets a code security configuration available in an organization. @@ -1039,6 +1073,18 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_push_protection`. public var secret_scanning_push_protection: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_push_protectionPayload? + /// The enablement status of secret scanning validity checks + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_validity_checks`. + @frozen public enum secret_scanning_validity_checksPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning validity checks + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/secret_scanning_validity_checks`. + public var secret_scanning_validity_checks: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_validity_checksPayload? /// The enablement status of private vulnerability reporting /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/private_vulnerability_reporting`. @@ -1051,6 +1097,17 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/private_vulnerability_reporting`. public var private_vulnerability_reporting: Components.Schemas.code_hyphen_security_hyphen_configuration.private_vulnerability_reportingPayload? + /// The enforcement status for a security configuration + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/enforcement`. + @frozen public enum enforcementPayload: String, Codable, Hashable, Sendable { + case enforced = "enforced" + case unenforced = "unenforced" + } + /// The enforcement status for a security configuration + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/enforcement`. + public var enforcement: Components.Schemas.code_hyphen_security_hyphen_configuration.enforcementPayload? /// The URL of the configuration /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/url`. @@ -1077,7 +1134,9 @@ public enum Components { /// - code_scanning_default_setup: The enablement status of code scanning default setup /// - secret_scanning: The enablement status of secret scanning /// - secret_scanning_push_protection: The enablement status of secret scanning push protection + /// - secret_scanning_validity_checks: The enablement status of secret scanning validity checks /// - private_vulnerability_reporting: The enablement status of private vulnerability reporting + /// - enforcement: The enforcement status for a security configuration /// - url: The URL of the configuration /// - html_url: The URL of the configuration /// - created_at: @@ -1094,7 +1153,9 @@ public enum Components { code_scanning_default_setup: Components.Schemas.code_hyphen_security_hyphen_configuration.code_scanning_default_setupPayload? = nil, secret_scanning: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanningPayload? = nil, secret_scanning_push_protection: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_push_protectionPayload? = nil, + secret_scanning_validity_checks: Components.Schemas.code_hyphen_security_hyphen_configuration.secret_scanning_validity_checksPayload? = nil, private_vulnerability_reporting: Components.Schemas.code_hyphen_security_hyphen_configuration.private_vulnerability_reportingPayload? = nil, + enforcement: Components.Schemas.code_hyphen_security_hyphen_configuration.enforcementPayload? = nil, url: Swift.String? = nil, html_url: Swift.String? = nil, created_at: Foundation.Date? = nil, @@ -1111,7 +1172,9 @@ public enum Components { self.code_scanning_default_setup = code_scanning_default_setup self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_validity_checks = secret_scanning_validity_checks self.private_vulnerability_reporting = private_vulnerability_reporting + self.enforcement = enforcement self.url = url self.html_url = html_url self.created_at = created_at @@ -1129,7 +1192,9 @@ public enum Components { case code_scanning_default_setup case secret_scanning case secret_scanning_push_protection + case secret_scanning_validity_checks case private_vulnerability_reporting + case enforcement case url case html_url case created_at @@ -1770,6 +1835,18 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_push_protection`. public var secret_scanning_push_protection: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload? + /// The enablement status of secret scanning validity checks + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_validity_checks`. + @frozen public enum secret_scanning_validity_checksPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning validity checks + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/secret_scanning_validity_checks`. + public var secret_scanning_validity_checks: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload? /// The enablement status of private vulnerability reporting /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/private_vulnerability_reporting`. @@ -1782,6 +1859,17 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/private_vulnerability_reporting`. public var private_vulnerability_reporting: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload? + /// The status of enforcement + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/enforcement`. + @frozen public enum enforcementPayload: String, Codable, Hashable, Sendable { + case enforced = "enforced" + case unenforced = "unenforced" + } + /// The status of enforcement + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/enforcement`. + public var enforcement: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.enforcementPayload? /// Creates a new `jsonPayload`. /// /// - Parameters: @@ -1794,7 +1882,9 @@ public enum Operations { /// - code_scanning_default_setup: The enablement status of code scanning default setup /// - secret_scanning: The enablement status of secret scanning /// - secret_scanning_push_protection: The enablement status of secret scanning push protection + /// - secret_scanning_validity_checks: The enablement status of secret scanning validity checks /// - private_vulnerability_reporting: The enablement status of private vulnerability reporting + /// - enforcement: The status of enforcement public init( name: Swift.String, description: Swift.String, @@ -1805,7 +1895,9 @@ public enum Operations { code_scanning_default_setup: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.code_scanning_default_setupPayload? = nil, secret_scanning: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanningPayload? = nil, secret_scanning_push_protection: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload? = nil, - private_vulnerability_reporting: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload? = nil + secret_scanning_validity_checks: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload? = nil, + private_vulnerability_reporting: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload? = nil, + enforcement: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.enforcementPayload? = nil ) { self.name = name self.description = description @@ -1816,7 +1908,9 @@ public enum Operations { self.code_scanning_default_setup = code_scanning_default_setup self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_validity_checks = secret_scanning_validity_checks self.private_vulnerability_reporting = private_vulnerability_reporting + self.enforcement = enforcement } public enum CodingKeys: String, CodingKey { case name @@ -1828,7 +1922,9 @@ public enum Operations { case code_scanning_default_setup case secret_scanning case secret_scanning_push_protection + case secret_scanning_validity_checks case private_vulnerability_reporting + case enforcement } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) @@ -1868,10 +1964,18 @@ public enum Operations { Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload.self, forKey: .secret_scanning_push_protection ) + secret_scanning_validity_checks = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload.self, + forKey: .secret_scanning_validity_checks + ) private_vulnerability_reporting = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload.self, forKey: .private_vulnerability_reporting ) + enforcement = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.enforcementPayload.self, + forKey: .enforcement + ) try decoder.ensureNoAdditionalProperties(knownKeys: [ "name", "description", @@ -1882,7 +1986,9 @@ public enum Operations { "code_scanning_default_setup", "secret_scanning", "secret_scanning_push_protection", - "private_vulnerability_reporting" + "secret_scanning_validity_checks", + "private_vulnerability_reporting", + "enforcement" ]) } } @@ -2194,6 +2300,249 @@ public enum Operations { } } } + /// Detach configurations from repositories + /// + /// Detach code security configuration(s) from a set of repositories. + /// Repositories will retain their settings but will no longer be associated with the configuration. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/code-security/configurations/detach`. + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/detach/delete(code-security/detach-configuration)`. + public enum code_hyphen_security_sol_detach_hyphen_configuration { + public static let id: Swift.String = "code-security/detach-configuration" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/detach/DELETE/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/detach/DELETE/path/org`. + public var org: Components.Parameters.org + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + public init(org: Components.Parameters.org) { + self.org = org + } + } + public var path: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/detach/DELETE/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input.Headers + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/detach/DELETE/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/detach/DELETE/requestBody/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// An array of repository IDs to detach from configurations. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/detach/DELETE/requestBody/json/selected_repository_ids`. + public var selected_repository_ids: [Swift.Int]? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - selected_repository_ids: An array of repository IDs to detach from configurations. + public init(selected_repository_ids: [Swift.Int]? = nil) { + self.selected_repository_ids = selected_repository_ids + } + public enum CodingKeys: String, CodingKey { + case selected_repository_ids + } + public init(from decoder: any Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + selected_repository_ids = try container.decodeIfPresent( + [Swift.Int].self, + forKey: .selected_repository_ids + ) + try decoder.ensureNoAdditionalProperties(knownKeys: [ + "selected_repository_ids" + ]) + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/detach/DELETE/requestBody/content/application\/json`. + case json(Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input.Body.jsonPayload) + } + public var body: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input.Path, + headers: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input.Headers = .init(), + body: Operations.code_hyphen_security_sol_detach_hyphen_configuration.Input.Body + ) { + self.path = path + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + /// A header with no content is returned. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/detach/delete(code-security/detach-configuration)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Components.Responses.no_content) + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Components.Responses.no_content { + get throws { + switch self { + case let .noContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "noContent", + response: self + ) + } + } + } + /// Bad Request + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/detach/delete(code-security/detach-configuration)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + case badRequest(Components.Responses.bad_request) + /// The associated value of the enum case if `self` is `.badRequest`. + /// + /// - Throws: An error if `self` is not `.badRequest`. + /// - SeeAlso: `.badRequest`. + public var badRequest: Components.Responses.bad_request { + get throws { + switch self { + case let .badRequest(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "badRequest", + response: self + ) + } + } + } + /// Forbidden + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/detach/delete(code-security/detach-configuration)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Components.Responses.forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Components.Responses.forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/detach/delete(code-security/detach-configuration)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Components.Responses.not_found) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + /// Conflict + /// + /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/detach/delete(code-security/detach-configuration)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + case conflict(Components.Responses.conflict) + /// The associated value of the enum case if `self` is `.conflict`. + /// + /// - Throws: An error if `self` is not `.conflict`. + /// - SeeAlso: `.conflict`. + public var conflict: Components.Responses.conflict { + get throws { + switch self { + case let .conflict(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "conflict", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case application_scim_plus_json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + case "application/scim+json": + self = .application_scim_plus_json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + case .application_scim_plus_json: + return "application/scim+json" + } + } + public static var allCases: [Self] { + [ + .json, + .application_scim_plus_json + ] + } + } + } /// Get a code security configuration /// /// Gets a code security configuration available in an organization. @@ -2552,6 +2901,18 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_push_protection`. public var secret_scanning_push_protection: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload? + /// The enablement status of secret scanning validity checks + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_validity_checks`. + @frozen public enum secret_scanning_validity_checksPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of secret scanning validity checks + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/secret_scanning_validity_checks`. + public var secret_scanning_validity_checks: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload? /// The enablement status of private vulnerability reporting /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/private_vulnerability_reporting`. @@ -2564,6 +2925,17 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/private_vulnerability_reporting`. public var private_vulnerability_reporting: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload? + /// The status of enforcement + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/enforcement`. + @frozen public enum enforcementPayload: String, Codable, Hashable, Sendable { + case enforced = "enforced" + case unenforced = "unenforced" + } + /// The status of enforcement + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/enforcement`. + public var enforcement: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.enforcementPayload? /// Creates a new `jsonPayload`. /// /// - Parameters: @@ -2576,7 +2948,9 @@ public enum Operations { /// - code_scanning_default_setup: The enablement status of code scanning default setup /// - secret_scanning: The enablement status of secret scanning /// - secret_scanning_push_protection: The enablement status of secret scanning push protection + /// - secret_scanning_validity_checks: The enablement status of secret scanning validity checks /// - private_vulnerability_reporting: The enablement status of private vulnerability reporting + /// - enforcement: The status of enforcement public init( name: Swift.String? = nil, description: Swift.String? = nil, @@ -2587,7 +2961,9 @@ public enum Operations { code_scanning_default_setup: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.code_scanning_default_setupPayload? = nil, secret_scanning: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanningPayload? = nil, secret_scanning_push_protection: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload? = nil, - private_vulnerability_reporting: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload? = nil + secret_scanning_validity_checks: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload? = nil, + private_vulnerability_reporting: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload? = nil, + enforcement: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.enforcementPayload? = nil ) { self.name = name self.description = description @@ -2598,7 +2974,9 @@ public enum Operations { self.code_scanning_default_setup = code_scanning_default_setup self.secret_scanning = secret_scanning self.secret_scanning_push_protection = secret_scanning_push_protection + self.secret_scanning_validity_checks = secret_scanning_validity_checks self.private_vulnerability_reporting = private_vulnerability_reporting + self.enforcement = enforcement } public enum CodingKeys: String, CodingKey { case name @@ -2610,7 +2988,9 @@ public enum Operations { case code_scanning_default_setup case secret_scanning case secret_scanning_push_protection + case secret_scanning_validity_checks case private_vulnerability_reporting + case enforcement } public init(from decoder: any Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) @@ -2650,10 +3030,18 @@ public enum Operations { Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_push_protectionPayload.self, forKey: .secret_scanning_push_protection ) + secret_scanning_validity_checks = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.secret_scanning_validity_checksPayload.self, + forKey: .secret_scanning_validity_checks + ) private_vulnerability_reporting = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload.self, forKey: .private_vulnerability_reporting ) + enforcement = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.enforcementPayload.self, + forKey: .enforcement + ) try decoder.ensureNoAdditionalProperties(knownKeys: [ "name", "description", @@ -2664,7 +3052,9 @@ public enum Operations { "code_scanning_default_setup", "secret_scanning", "secret_scanning_push_protection", - "private_vulnerability_reporting" + "secret_scanning_validity_checks", + "private_vulnerability_reporting", + "enforcement" ]) } } From fd9dbe208ebb52cfdaaa39b086e6ac3645558cc9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 21:29:01 +0000 Subject: [PATCH 088/152] Bump Submodule/github/rest-api-description from `3e3e138` to `9272e44` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `3e3e138` to `9272e44`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/3e3e13801b9b2cb62958385c2a70b15f2eae4b88...9272e440b6a4964e58ddeab80d6011333af3a04f) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index 3e3e13801b9..9272e440b6a 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit 3e3e13801b9b2cb62958385c2a70b15f2eae4b88 +Subproject commit 9272e440b6a4964e58ddeab80d6011333af3a04f From ea520f7dc918d0385dec05fa759eba8639f13f8a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 22 Jul 2024 21:45:04 +0000 Subject: [PATCH 089/152] Commit via running ake Sources/actions --- Sources/actions/Client.swift | 4 ++-- Sources/actions/Types.swift | 15 ++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Sources/actions/Client.swift b/Sources/actions/Client.swift index 27f77f31e77..add941952b2 100644 --- a/Sources/actions/Client.swift +++ b/Sources/actions/Client.swift @@ -6809,8 +6809,8 @@ public struct Client: APIProtocol { /// /// Approve or reject custom deployment protection rules provided by a GitHub App for a workflow run. For more information, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)." /// - /// **Note:** GitHub Apps can only review their own custom deployment protection rules. - /// To approve or reject pending deployments that are waiting for review from a specific person or team, see [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run). + /// > [!NOTE] + /// > GitHub Apps can only review their own custom deployment protection rules. To approve or reject pending deployments that are waiting for review from a specific person or team, see [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run). /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. /// diff --git a/Sources/actions/Types.swift b/Sources/actions/Types.swift index 045abfb4562..47dc724f8b9 100644 --- a/Sources/actions/Types.swift +++ b/Sources/actions/Types.swift @@ -984,8 +984,8 @@ public protocol APIProtocol: Sendable { /// /// Approve or reject custom deployment protection rules provided by a GitHub App for a workflow run. For more information, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)." /// - /// **Note:** GitHub Apps can only review their own custom deployment protection rules. - /// To approve or reject pending deployments that are waiting for review from a specific person or team, see [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run). + /// > [!NOTE] + /// > GitHub Apps can only review their own custom deployment protection rules. To approve or reject pending deployments that are waiting for review from a specific person or team, see [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run). /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. /// @@ -3027,8 +3027,8 @@ extension APIProtocol { /// /// Approve or reject custom deployment protection rules provided by a GitHub App for a workflow run. For more information, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)." /// - /// **Note:** GitHub Apps can only review their own custom deployment protection rules. - /// To approve or reject pending deployments that are waiting for review from a specific person or team, see [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run). + /// > [!NOTE] + /// > GitHub Apps can only review their own custom deployment protection rules. To approve or reject pending deployments that are waiting for review from a specific person or team, see [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run). /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. /// @@ -6341,7 +6341,8 @@ public enum Components { public var verified_allowed: Swift.Bool? /// Specifies a list of string-matching patterns to allow specific action(s) and reusable workflow(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`. /// - /// **Note**: The `patterns_allowed` setting only applies to public repositories. + /// > [!NOTE] + /// > The `patterns_allowed` setting only applies to public repositories. /// /// - Remark: Generated from `#/components/schemas/selected-actions/patterns_allowed`. public var patterns_allowed: [Swift.String]? @@ -23019,8 +23020,8 @@ public enum Operations { /// /// Approve or reject custom deployment protection rules provided by a GitHub App for a workflow run. For more information, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)." /// - /// **Note:** GitHub Apps can only review their own custom deployment protection rules. - /// To approve or reject pending deployments that are waiting for review from a specific person or team, see [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run). + /// > [!NOTE] + /// > GitHub Apps can only review their own custom deployment protection rules. To approve or reject pending deployments that are waiting for review from a specific person or team, see [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run). /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. /// From c4739abba8c8d2a156c05e1968e9d5a2fc22ebca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 22 Jul 2024 21:45:25 +0000 Subject: [PATCH 090/152] Commit via running ake Sources/activity --- Sources/activity/Client.swift | 7 ++++--- Sources/activity/Types.swift | 21 ++++++++++++--------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/Sources/activity/Client.swift b/Sources/activity/Client.swift index 0210a5d032b..25f02c2cad6 100644 --- a/Sources/activity/Client.swift +++ b/Sources/activity/Client.swift @@ -174,7 +174,8 @@ public struct Client: APIProtocol { /// /// By default, timeline resources are returned in JSON. You can specify the `application/atom+xml` type in the `Accept` header to return timeline resources in Atom format. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// - /// **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) since current feed URIs use the older, non revocable auth tokens. + /// > [!NOTE] + /// > Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) since current feed URIs use the older, non revocable auth tokens. /// /// - Remark: HTTP `GET /feeds`. /// - Remark: Generated from `#/paths//feeds/get(activity/get-feeds)`. @@ -1307,8 +1308,8 @@ public struct Client: APIProtocol { } /// List repository events /// - /// **Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. - /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/events`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/events/get(activity/list-repo-events)`. diff --git a/Sources/activity/Types.swift b/Sources/activity/Types.swift index 3ce59e162af..454c501bff6 100644 --- a/Sources/activity/Types.swift +++ b/Sources/activity/Types.swift @@ -32,7 +32,8 @@ public protocol APIProtocol: Sendable { /// /// By default, timeline resources are returned in JSON. You can specify the `application/atom+xml` type in the `Accept` header to return timeline resources in Atom format. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// - /// **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) since current feed URIs use the older, non revocable auth tokens. + /// > [!NOTE] + /// > Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) since current feed URIs use the older, non revocable auth tokens. /// /// - Remark: HTTP `GET /feeds`. /// - Remark: Generated from `#/paths//feeds/get(activity/get-feeds)`. @@ -115,8 +116,8 @@ public protocol APIProtocol: Sendable { func activity_sol_list_hyphen_public_hyphen_org_hyphen_events(_ input: Operations.activity_sol_list_hyphen_public_hyphen_org_hyphen_events.Input) async throws -> Operations.activity_sol_list_hyphen_public_hyphen_org_hyphen_events.Output /// List repository events /// - /// **Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. - /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/events`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/events/get(activity/list-repo-events)`. @@ -299,7 +300,8 @@ extension APIProtocol { /// /// By default, timeline resources are returned in JSON. You can specify the `application/atom+xml` type in the `Accept` header to return timeline resources in Atom format. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// - /// **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) since current feed URIs use the older, non revocable auth tokens. + /// > [!NOTE] + /// > Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) since current feed URIs use the older, non revocable auth tokens. /// /// - Remark: HTTP `GET /feeds`. /// - Remark: Generated from `#/paths//feeds/get(activity/get-feeds)`. @@ -464,8 +466,8 @@ extension APIProtocol { } /// List repository events /// - /// **Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. - /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/events`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/events/get(activity/list-repo-events)`. @@ -4924,7 +4926,8 @@ public enum Operations { /// /// By default, timeline resources are returned in JSON. You can specify the `application/atom+xml` type in the `Accept` header to return timeline resources in Atom format. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// - /// **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) since current feed URIs use the older, non revocable auth tokens. + /// > [!NOTE] + /// > Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) since current feed URIs use the older, non revocable auth tokens. /// /// - Remark: HTTP `GET /feeds`. /// - Remark: Generated from `#/paths//feeds/get(activity/get-feeds)`. @@ -7028,8 +7031,8 @@ public enum Operations { } /// List repository events /// - /// **Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. - /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/events`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/events/get(activity/list-repo-events)`. From bd1d9da0986161dee97d6b862ad93295df8dc830 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 22 Jul 2024 21:45:46 +0000 Subject: [PATCH 091/152] Commit via running ake Sources/apps --- Sources/apps/Client.swift | 3 ++- Sources/apps/Types.swift | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Sources/apps/Client.swift b/Sources/apps/Client.swift index 104dcdb68f4..dfae4f8f131 100644 --- a/Sources/apps/Client.swift +++ b/Sources/apps/Client.swift @@ -1916,7 +1916,8 @@ public struct Client: APIProtocol { } /// Get an app /// - /// **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). + /// > [!NOTE] + /// > The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). /// /// - Remark: HTTP `GET /apps/{app_slug}`. /// - Remark: Generated from `#/paths//apps/{app_slug}/get(apps/get-by-slug)`. diff --git a/Sources/apps/Types.swift b/Sources/apps/Types.swift index a64544bb888..f94f2c69c9e 100644 --- a/Sources/apps/Types.swift +++ b/Sources/apps/Types.swift @@ -181,7 +181,8 @@ public protocol APIProtocol: Sendable { func apps_sol_scope_hyphen_token(_ input: Operations.apps_sol_scope_hyphen_token.Input) async throws -> Operations.apps_sol_scope_hyphen_token.Output /// Get an app /// - /// **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). + /// > [!NOTE] + /// > The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). /// /// - Remark: HTTP `GET /apps/{app_slug}`. /// - Remark: Generated from `#/paths//apps/{app_slug}/get(apps/get-by-slug)`. @@ -663,7 +664,8 @@ extension APIProtocol { } /// Get an app /// - /// **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). + /// > [!NOTE] + /// > The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). /// /// - Remark: HTTP `GET /apps/{app_slug}`. /// - Remark: Generated from `#/paths//apps/{app_slug}/get(apps/get-by-slug)`. @@ -8420,7 +8422,8 @@ public enum Operations { } /// Get an app /// - /// **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). + /// > [!NOTE] + /// > The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). /// /// - Remark: HTTP `GET /apps/{app_slug}`. /// - Remark: Generated from `#/paths//apps/{app_slug}/get(apps/get-by-slug)`. From 3d411a2f8327b00b5fb8b3e1565ae776f606a1d6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 22 Jul 2024 21:46:28 +0000 Subject: [PATCH 092/152] Commit via running ake Sources/checks --- Sources/checks/Client.swift | 24 ++++++++----- Sources/checks/Types.swift | 72 ++++++++++++++++++++++++------------- 2 files changed, 64 insertions(+), 32 deletions(-) diff --git a/Sources/checks/Client.swift b/Sources/checks/Client.swift index 74a2ce03de2..c5b2d196a42 100644 --- a/Sources/checks/Client.swift +++ b/Sources/checks/Client.swift @@ -46,7 +46,8 @@ public struct Client: APIProtocol { /// /// In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/check-runs`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/check-runs/post(checks/create)`. @@ -122,7 +123,8 @@ public struct Client: APIProtocol { /// /// Gets a single check run using its `id`. /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// @@ -192,7 +194,8 @@ public struct Client: APIProtocol { /// /// Updates a check run for a specific commit in a repository. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// OAuth apps and personal access tokens (classic) cannot use this endpoint. /// @@ -497,7 +500,8 @@ public struct Client: APIProtocol { /// /// Creates a check suite manually. By default, check suites are automatically created when you create a [check run](https://docs.github.com/rest/checks/runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/checks/suites#update-repository-preferences-for-check-suites)". /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. /// /// OAuth apps and personal access tokens (classic) cannot use this endpoint. /// @@ -672,7 +676,8 @@ public struct Client: APIProtocol { /// /// Gets a single check suite using its `id`. /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// @@ -742,7 +747,8 @@ public struct Client: APIProtocol { /// /// Lists check runs for a check suite using its `id`. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// @@ -923,7 +929,8 @@ public struct Client: APIProtocol { /// /// Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// If there are more than 1000 check suites on a single git reference, this endpoint will limit check runs to the 1000 most recent check suites. To iterate over all possible check runs, use the [List check suites for a Git reference](https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference) endpoint and provide the `check_suite_id` parameter to the [List check runs in a check suite](https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite) endpoint. /// @@ -1045,7 +1052,8 @@ public struct Client: APIProtocol { /// /// Lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// diff --git a/Sources/checks/Types.swift b/Sources/checks/Types.swift index b19df27f944..d4aa2f859c7 100644 --- a/Sources/checks/Types.swift +++ b/Sources/checks/Types.swift @@ -19,7 +19,8 @@ public protocol APIProtocol: Sendable { /// /// In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/check-runs`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/check-runs/post(checks/create)`. @@ -28,7 +29,8 @@ public protocol APIProtocol: Sendable { /// /// Gets a single check run using its `id`. /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// @@ -39,7 +41,8 @@ public protocol APIProtocol: Sendable { /// /// Updates a check run for a specific commit in a repository. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// OAuth apps and personal access tokens (classic) cannot use this endpoint. /// @@ -70,7 +73,8 @@ public protocol APIProtocol: Sendable { /// /// Creates a check suite manually. By default, check suites are automatically created when you create a [check run](https://docs.github.com/rest/checks/runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/checks/suites#update-repository-preferences-for-check-suites)". /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. /// /// OAuth apps and personal access tokens (classic) cannot use this endpoint. /// @@ -89,7 +93,8 @@ public protocol APIProtocol: Sendable { /// /// Gets a single check suite using its `id`. /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// @@ -100,7 +105,8 @@ public protocol APIProtocol: Sendable { /// /// Lists check runs for a check suite using its `id`. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// @@ -120,7 +126,8 @@ public protocol APIProtocol: Sendable { /// /// Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// If there are more than 1000 check suites on a single git reference, this endpoint will limit check runs to the 1000 most recent check suites. To iterate over all possible check runs, use the [List check suites for a Git reference](https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference) endpoint and provide the `check_suite_id` parameter to the [List check runs in a check suite](https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite) endpoint. /// @@ -133,7 +140,8 @@ public protocol APIProtocol: Sendable { /// /// Lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// @@ -152,7 +160,8 @@ extension APIProtocol { /// /// In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/check-runs`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/check-runs/post(checks/create)`. @@ -171,7 +180,8 @@ extension APIProtocol { /// /// Gets a single check run using its `id`. /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// @@ -190,7 +200,8 @@ extension APIProtocol { /// /// Updates a check run for a specific commit in a repository. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// OAuth apps and personal access tokens (classic) cannot use this endpoint. /// @@ -249,7 +260,8 @@ extension APIProtocol { /// /// Creates a check suite manually. By default, check suites are automatically created when you create a [check run](https://docs.github.com/rest/checks/runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/checks/suites#update-repository-preferences-for-check-suites)". /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. /// /// OAuth apps and personal access tokens (classic) cannot use this endpoint. /// @@ -288,7 +300,8 @@ extension APIProtocol { /// /// Gets a single check suite using its `id`. /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// @@ -307,7 +320,8 @@ extension APIProtocol { /// /// Lists check runs for a check suite using its `id`. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// @@ -345,7 +359,8 @@ extension APIProtocol { /// /// Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// If there are more than 1000 check suites on a single git reference, this endpoint will limit check runs to the 1000 most recent check suites. To iterate over all possible check runs, use the [List check suites for a Git reference](https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference) endpoint and provide the `check_suite_id` parameter to the [List check runs in a check suite](https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite) endpoint. /// @@ -368,7 +383,8 @@ extension APIProtocol { /// /// Lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// @@ -2738,7 +2754,8 @@ public enum Operations { /// /// In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/check-runs`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/check-runs/post(checks/create)`. @@ -3005,7 +3022,8 @@ public enum Operations { /// /// Gets a single check run using its `id`. /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// @@ -3157,7 +3175,8 @@ public enum Operations { /// /// Updates a check run for a specific commit in a repository. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// OAuth apps and personal access tokens (classic) cannot use this endpoint. /// @@ -3916,7 +3935,8 @@ public enum Operations { /// /// Creates a check suite manually. By default, check suites are automatically created when you create a [check run](https://docs.github.com/rest/checks/runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/checks/suites#update-repository-preferences-for-check-suites)". /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. /// /// OAuth apps and personal access tokens (classic) cannot use this endpoint. /// @@ -4337,7 +4357,8 @@ public enum Operations { /// /// Gets a single check suite using its `id`. /// - /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + /// > [!NOTE] + /// > The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// @@ -4489,7 +4510,8 @@ public enum Operations { /// /// Lists check runs for a check suite using its `id`. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// @@ -4892,7 +4914,8 @@ public enum Operations { /// /// Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. /// /// If there are more than 1000 check suites on a single git reference, this endpoint will limit check runs to the 1000 most recent check suites. To iterate over all possible check runs, use the [List check suites for a Git reference](https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference) endpoint and provide the `check_suite_id` parameter to the [List check runs in a check suite](https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite) endpoint. /// @@ -5152,7 +5175,8 @@ public enum Operations { /// /// Lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name. /// - /// **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + /// > [!NOTE] + /// > The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. /// From 01ddb496131410ec42d3995ce9d89839a082c80f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 22 Jul 2024 21:46:49 +0000 Subject: [PATCH 093/152] Commit via running ake Sources/code-scanning --- Sources/code-scanning/Client.swift | 4 ++-- Sources/code-scanning/Types.swift | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Sources/code-scanning/Client.swift b/Sources/code-scanning/Client.swift index d4e6d8808e2..4f1ba064bfe 100644 --- a/Sources/code-scanning/Client.swift +++ b/Sources/code-scanning/Client.swift @@ -876,8 +876,8 @@ public struct Client: APIProtocol { /// For very old analyses this data is not available, /// and `0` is returned in this field. /// - /// **Deprecation notice**: - /// The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + /// > [!WARNING] + /// > **Deprecation notice:** The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. /// /// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. /// diff --git a/Sources/code-scanning/Types.swift b/Sources/code-scanning/Types.swift index 79c78d33f2a..b7c4d19fd57 100644 --- a/Sources/code-scanning/Types.swift +++ b/Sources/code-scanning/Types.swift @@ -74,8 +74,8 @@ public protocol APIProtocol: Sendable { /// For very old analyses this data is not available, /// and `0` is returned in this field. /// - /// **Deprecation notice**: - /// The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + /// > [!WARNING] + /// > **Deprecation notice:** The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. /// /// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. /// @@ -412,8 +412,8 @@ extension APIProtocol { /// For very old analyses this data is not available, /// and `0` is returned in this field. /// - /// **Deprecation notice**: - /// The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + /// > [!WARNING] + /// > **Deprecation notice:** The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. /// /// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. /// @@ -4903,8 +4903,8 @@ public enum Operations { /// For very old analyses this data is not available, /// and `0` is returned in this field. /// - /// **Deprecation notice**: - /// The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + /// > [!WARNING] + /// > **Deprecation notice:** The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. /// /// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. /// From faf856161ce0776282f8108c5320025f151ddd40 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 22 Jul 2024 21:48:33 +0000 Subject: [PATCH 094/152] Commit via running ake Sources/gists --- Sources/gists/Client.swift | 3 ++- Sources/gists/Types.swift | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Sources/gists/Client.swift b/Sources/gists/Client.swift index 65a456f88e6..334f4dbd58d 100644 --- a/Sources/gists/Client.swift +++ b/Sources/gists/Client.swift @@ -157,7 +157,8 @@ public struct Client: APIProtocol { /// /// Allows you to add a new gist with one or more files. /// - /// **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. + /// > [!NOTE] + /// > Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. /// /// - Remark: HTTP `POST /gists`. /// - Remark: Generated from `#/paths//gists/post(gists/create)`. diff --git a/Sources/gists/Types.swift b/Sources/gists/Types.swift index b8015b40a01..1b538eb8d6d 100644 --- a/Sources/gists/Types.swift +++ b/Sources/gists/Types.swift @@ -22,7 +22,8 @@ public protocol APIProtocol: Sendable { /// /// Allows you to add a new gist with one or more files. /// - /// **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. + /// > [!NOTE] + /// > Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. /// /// - Remark: HTTP `POST /gists`. /// - Remark: Generated from `#/paths//gists/post(gists/create)`. @@ -217,7 +218,8 @@ extension APIProtocol { /// /// Allows you to add a new gist with one or more files. /// - /// **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. + /// > [!NOTE] + /// > Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. /// /// - Remark: HTTP `POST /gists`. /// - Remark: Generated from `#/paths//gists/post(gists/create)`. @@ -2826,7 +2828,8 @@ public enum Operations { /// /// Allows you to add a new gist with one or more files. /// - /// **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. + /// > [!NOTE] + /// > Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. /// /// - Remark: HTTP `POST /gists`. /// - Remark: Generated from `#/paths//gists/post(gists/create)`. From e8e4ea00463d341674379b5c57576268553f5d9d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 22 Jul 2024 21:48:54 +0000 Subject: [PATCH 095/152] Commit via running ake Sources/git --- Sources/git/Client.swift | 10 ++++++---- Sources/git/Types.swift | 35 ++++++++++++++++++++--------------- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/Sources/git/Client.swift b/Sources/git/Client.swift index 6a2eaeabbcc..8de5f0ee12c 100644 --- a/Sources/git/Client.swift +++ b/Sources/git/Client.swift @@ -693,7 +693,8 @@ public struct Client: APIProtocol { /// /// When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. /// - /// **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + /// > [!NOTE] + /// > You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". /// /// If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. /// @@ -793,7 +794,8 @@ public struct Client: APIProtocol { /// /// Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. /// - /// **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + /// > [!NOTE] + /// > You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/git/ref/{ref}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/git/ref/{ref}/get(git/get-ref)`. @@ -1708,8 +1710,8 @@ public struct Client: APIProtocol { /// /// If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. /// - /// - /// **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + /// > [!NOTE] + /// > The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/git/trees/{tree_sha}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/git/trees/{tree_sha}/get(git/get-tree)`. diff --git a/Sources/git/Types.swift b/Sources/git/Types.swift index ce0602433b8..64050038238 100644 --- a/Sources/git/Types.swift +++ b/Sources/git/Types.swift @@ -112,7 +112,8 @@ public protocol APIProtocol: Sendable { /// /// When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. /// - /// **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + /// > [!NOTE] + /// > You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". /// /// If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. /// @@ -123,7 +124,8 @@ public protocol APIProtocol: Sendable { /// /// Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. /// - /// **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + /// > [!NOTE] + /// > You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/git/ref/{ref}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/git/ref/{ref}/get(git/get-ref)`. @@ -236,8 +238,8 @@ public protocol APIProtocol: Sendable { /// /// If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. /// - /// - /// **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + /// > [!NOTE] + /// > The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/git/trees/{tree_sha}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/git/trees/{tree_sha}/get(git/get-tree)`. @@ -383,7 +385,8 @@ extension APIProtocol { /// /// When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. /// - /// **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + /// > [!NOTE] + /// > You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". /// /// If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. /// @@ -402,7 +405,8 @@ extension APIProtocol { /// /// Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. /// - /// **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + /// > [!NOTE] + /// > You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/git/ref/{ref}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/git/ref/{ref}/get(git/get-ref)`. @@ -579,8 +583,8 @@ extension APIProtocol { /// /// If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. /// - /// - /// **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + /// > [!NOTE] + /// > The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/git/trees/{tree_sha}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/git/trees/{tree_sha}/get(git/get-tree)`. @@ -2184,7 +2188,7 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/git/commits/POST/requestBody/json/tree`. public var tree: Swift.String - /// The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. + /// The full SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/git/commits/POST/requestBody/json/parents`. public var parents: [Swift.String]? @@ -2279,7 +2283,7 @@ public enum Operations { /// - Parameters: /// - message: The commit message /// - tree: The SHA of the tree object this commit points to - /// - parents: The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. + /// - parents: The full SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. /// - author: Information about the author of the commit. By default, the `author` will be the authenticated user and the current date. See the `author` and `committer` object below for details. /// - committer: Information about the person who is making the commit. By default, `committer` will use the information set in `author`. See the `author` and `committer` object below for details. /// - signature: The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits. @@ -2729,7 +2733,8 @@ public enum Operations { /// /// When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. /// - /// **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + /// > [!NOTE] + /// > You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". /// /// If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. /// @@ -2923,7 +2928,8 @@ public enum Operations { /// /// Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. /// - /// **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + /// > [!NOTE] + /// > You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/git/ref/{ref}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/git/ref/{ref}/get(git/get-ref)`. @@ -4453,7 +4459,6 @@ public enum Operations { /// The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by `base_tree` and entries defined in the `tree` parameter. Entries defined in the `tree` parameter will overwrite items from `base_tree` with the same `path`. If you're creating new changes on a branch, then normally you'd set `base_tree` to the SHA1 of the Git tree object of the current latest commit on the branch you're working on. /// If not provided, GitHub will create a new Git tree object from only the entries defined in the `tree` parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the `tree` parameter will be listed as deleted by the new commit. /// - /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/git/trees/POST/requestBody/json/base_tree`. public var base_tree: Swift.String? /// Creates a new `jsonPayload`. @@ -4693,8 +4698,8 @@ public enum Operations { /// /// If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. /// - /// - /// **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + /// > [!NOTE] + /// > The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/git/trees/{tree_sha}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/git/trees/{tree_sha}/get(git/get-tree)`. From 700fa7cb56f78a2e6d3089235d10f1b658865594 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 22 Jul 2024 21:49:36 +0000 Subject: [PATCH 096/152] Commit via running ake Sources/issues --- Sources/issues/Client.swift | 30 +++++-------- Sources/issues/Types.swift | 90 +++++++++++++------------------------ 2 files changed, 40 insertions(+), 80 deletions(-) diff --git a/Sources/issues/Client.swift b/Sources/issues/Client.swift index f5f8f543f24..8511215829f 100644 --- a/Sources/issues/Client.swift +++ b/Sources/issues/Client.swift @@ -44,10 +44,8 @@ public struct Client: APIProtocol { /// repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not /// necessarily assigned to you. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// @@ -256,10 +254,8 @@ public struct Client: APIProtocol { /// /// List issues in an organization assigned to the authenticated user. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// @@ -599,10 +595,8 @@ public struct Client: APIProtocol { /// /// List issues in a repository. Only open issues will be listed. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// @@ -1708,10 +1702,8 @@ public struct Client: APIProtocol { /// access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe /// to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// @@ -4855,10 +4847,8 @@ public struct Client: APIProtocol { /// /// List issues across owned and member repositories assigned to the authenticated user. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// diff --git a/Sources/issues/Types.swift b/Sources/issues/Types.swift index 07e0bd0ad91..79ba5083877 100644 --- a/Sources/issues/Types.swift +++ b/Sources/issues/Types.swift @@ -17,10 +17,8 @@ public protocol APIProtocol: Sendable { /// repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not /// necessarily assigned to you. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// @@ -36,10 +34,8 @@ public protocol APIProtocol: Sendable { /// /// List issues in an organization assigned to the authenticated user. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// @@ -73,10 +69,8 @@ public protocol APIProtocol: Sendable { /// /// List issues in a repository. Only open issues will be listed. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// @@ -179,10 +173,8 @@ public protocol APIProtocol: Sendable { /// access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe /// to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// @@ -414,10 +406,8 @@ public protocol APIProtocol: Sendable { /// /// List issues across owned and member repositories assigned to the authenticated user. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// @@ -439,10 +429,8 @@ extension APIProtocol { /// repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not /// necessarily assigned to you. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// @@ -466,10 +454,8 @@ extension APIProtocol { /// /// List issues in an organization assigned to the authenticated user. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// @@ -531,10 +517,8 @@ extension APIProtocol { /// /// List issues in a repository. Only open issues will be listed. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// @@ -705,10 +689,8 @@ extension APIProtocol { /// access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe /// to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// @@ -1186,10 +1168,8 @@ extension APIProtocol { /// /// List issues across owned and member repositories assigned to the authenticated user. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// @@ -8311,10 +8291,8 @@ public enum Operations { /// repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not /// necessarily assigned to you. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// @@ -8640,10 +8618,8 @@ public enum Operations { /// /// List issues in an organization assigned to the authenticated user. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// @@ -9308,10 +9284,8 @@ public enum Operations { /// /// List issues in a repository. Only open issues will be listed. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// @@ -11351,10 +11325,8 @@ public enum Operations { /// access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe /// to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// @@ -17682,10 +17654,8 @@ public enum Operations { /// /// List issues across owned and member repositories assigned to the authenticated user. /// - /// **Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this - /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - /// request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. + /// > [!NOTE] + /// > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// From 3bf67d965b0a89eca5bc56441bfff20e91e78790 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 22 Jul 2024 21:50:59 +0000 Subject: [PATCH 097/152] Commit via running ake Sources/meta --- Sources/meta/Client.swift | 3 ++- Sources/meta/Types.swift | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Sources/meta/Client.swift b/Sources/meta/Client.swift index a514f63de60..e09e79607db 100644 --- a/Sources/meta/Client.swift +++ b/Sources/meta/Client.swift @@ -108,7 +108,8 @@ public struct Client: APIProtocol { /// /// The values shown in the documentation's response are example values. You must always query the API directly to get the latest values. /// - /// **Note:** This endpoint returns both IPv4 and IPv6 addresses. However, not all features support IPv6. You should refer to the specific documentation for each feature to determine if IPv6 is supported. + /// > [!NOTE] + /// > This endpoint returns both IPv4 and IPv6 addresses. However, not all features support IPv6. You should refer to the specific documentation for each feature to determine if IPv6 is supported. /// /// - Remark: HTTP `GET /meta`. /// - Remark: Generated from `#/paths//meta/get(meta/get)`. diff --git a/Sources/meta/Types.swift b/Sources/meta/Types.swift index 874d39c913a..21d62dc36d8 100644 --- a/Sources/meta/Types.swift +++ b/Sources/meta/Types.swift @@ -26,7 +26,8 @@ public protocol APIProtocol: Sendable { /// /// The values shown in the documentation's response are example values. You must always query the API directly to get the latest values. /// - /// **Note:** This endpoint returns both IPv4 and IPv6 addresses. However, not all features support IPv6. You should refer to the specific documentation for each feature to determine if IPv6 is supported. + /// > [!NOTE] + /// > This endpoint returns both IPv4 and IPv6 addresses. However, not all features support IPv6. You should refer to the specific documentation for each feature to determine if IPv6 is supported. /// /// - Remark: HTTP `GET /meta`. /// - Remark: Generated from `#/paths//meta/get(meta/get)`. @@ -73,7 +74,8 @@ extension APIProtocol { /// /// The values shown in the documentation's response are example values. You must always query the API directly to get the latest values. /// - /// **Note:** This endpoint returns both IPv4 and IPv6 addresses. However, not all features support IPv6. You should refer to the specific documentation for each feature to determine if IPv6 is supported. + /// > [!NOTE] + /// > This endpoint returns both IPv4 and IPv6 addresses. However, not all features support IPv6. You should refer to the specific documentation for each feature to determine if IPv6 is supported. /// /// - Remark: HTTP `GET /meta`. /// - Remark: Generated from `#/paths//meta/get(meta/get)`. @@ -721,7 +723,8 @@ public enum Operations { /// /// The values shown in the documentation's response are example values. You must always query the API directly to get the latest values. /// - /// **Note:** This endpoint returns both IPv4 and IPv6 addresses. However, not all features support IPv6. You should refer to the specific documentation for each feature to determine if IPv6 is supported. + /// > [!NOTE] + /// > This endpoint returns both IPv4 and IPv6 addresses. However, not all features support IPv6. You should refer to the specific documentation for each feature to determine if IPv6 is supported. /// /// - Remark: HTTP `GET /meta`. /// - Remark: Generated from `#/paths//meta/get(meta/get)`. From bb9bf13a048c32054ecbe9299172efb6c15acfb9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 22 Jul 2024 21:51:20 +0000 Subject: [PATCH 098/152] Commit via running ake Sources/migrations --- Sources/migrations/Client.swift | 29 ++++++----- Sources/migrations/Types.swift | 87 ++++++++++++++++++--------------- 2 files changed, 64 insertions(+), 52 deletions(-) diff --git a/Sources/migrations/Client.swift b/Sources/migrations/Client.swift index dce7deab2e8..f0366d78270 100644 --- a/Sources/migrations/Client.swift +++ b/Sources/migrations/Client.swift @@ -666,7 +666,8 @@ public struct Client: APIProtocol { /// /// View the progress of an import. /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// **Import status** /// @@ -816,7 +817,8 @@ public struct Client: APIProtocol { /// have the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array. /// You can select the project to import by providing one of the objects in the `project_choices` array in the update request. /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/patch(migrations/update-import)`. @@ -919,8 +921,8 @@ public struct Client: APIProtocol { /// Importing into a GitHub repository with GitHub Actions enabled is not supported and will /// return a status `422 Unprocessable Entity` response. /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - /// + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PUT /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/put(migrations/start-import)`. @@ -1071,8 +1073,8 @@ public struct Client: APIProtocol { /// /// Stop an import for a repository. /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - /// + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/delete(migrations/cancel-import)`. @@ -1144,7 +1146,8 @@ public struct Client: APIProtocol { /// /// This endpoint and the [Map a commit author](https://docs.github.com/rest/migrations/source-imports#map-a-commit-author) endpoint allow you to provide correct Git author information. /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/import/authors`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/authors/get(migrations/get-commit-authors)`. @@ -1264,8 +1267,8 @@ public struct Client: APIProtocol { /// Update an author's identity for the import. Your application can continue updating authors any time before you push /// new commits to the repository. /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - /// + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import/authors/{author_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/authors/{author_id}/patch(migrations/map-commit-author)`. @@ -1411,8 +1414,8 @@ public struct Client: APIProtocol { /// /// List files larger than 100MB found during the import /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - /// + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/import/large_files`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/large_files/get(migrations/get-large-files)`. @@ -1506,8 +1509,8 @@ public struct Client: APIProtocol { /// You can learn more about our LFS feature and working with large files [on our help /// site](https://docs.github.com/repositories/working-with-files/managing-large-files). /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - /// + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import/lfs`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/lfs/patch(migrations/set-lfs-preference)`. diff --git a/Sources/migrations/Types.swift b/Sources/migrations/Types.swift index 46c861f1dec..186e2d975f7 100644 --- a/Sources/migrations/Types.swift +++ b/Sources/migrations/Types.swift @@ -73,7 +73,8 @@ public protocol APIProtocol: Sendable { /// /// View the progress of an import. /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// **Import status** /// @@ -121,7 +122,8 @@ public protocol APIProtocol: Sendable { /// have the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array. /// You can select the project to import by providing one of the objects in the `project_choices` array in the update request. /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/patch(migrations/update-import)`. @@ -133,8 +135,8 @@ public protocol APIProtocol: Sendable { /// Importing into a GitHub repository with GitHub Actions enabled is not supported and will /// return a status `422 Unprocessable Entity` response. /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - /// + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PUT /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/put(migrations/start-import)`. @@ -144,8 +146,8 @@ public protocol APIProtocol: Sendable { /// /// Stop an import for a repository. /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - /// + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/delete(migrations/cancel-import)`. @@ -157,7 +159,8 @@ public protocol APIProtocol: Sendable { /// /// This endpoint and the [Map a commit author](https://docs.github.com/rest/migrations/source-imports#map-a-commit-author) endpoint allow you to provide correct Git author information. /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/import/authors`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/authors/get(migrations/get-commit-authors)`. @@ -168,8 +171,8 @@ public protocol APIProtocol: Sendable { /// Update an author's identity for the import. Your application can continue updating authors any time before you push /// new commits to the repository. /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - /// + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import/authors/{author_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/authors/{author_id}/patch(migrations/map-commit-author)`. @@ -179,8 +182,8 @@ public protocol APIProtocol: Sendable { /// /// List files larger than 100MB found during the import /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - /// + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/import/large_files`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/large_files/get(migrations/get-large-files)`. @@ -194,8 +197,8 @@ public protocol APIProtocol: Sendable { /// You can learn more about our LFS feature and working with large files [on our help /// site](https://docs.github.com/repositories/working-with-files/managing-large-files). /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - /// + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import/lfs`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/lfs/patch(migrations/set-lfs-preference)`. @@ -407,7 +410,8 @@ extension APIProtocol { /// /// View the progress of an import. /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// **Import status** /// @@ -463,7 +467,8 @@ extension APIProtocol { /// have the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array. /// You can select the project to import by providing one of the objects in the `project_choices` array in the update request. /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/patch(migrations/update-import)`. @@ -485,8 +490,8 @@ extension APIProtocol { /// Importing into a GitHub repository with GitHub Actions enabled is not supported and will /// return a status `422 Unprocessable Entity` response. /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - /// + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PUT /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/put(migrations/start-import)`. @@ -506,8 +511,8 @@ extension APIProtocol { /// /// Stop an import for a repository. /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - /// + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/delete(migrations/cancel-import)`. @@ -527,7 +532,8 @@ extension APIProtocol { /// /// This endpoint and the [Map a commit author](https://docs.github.com/rest/migrations/source-imports#map-a-commit-author) endpoint allow you to provide correct Git author information. /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/import/authors`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/authors/get(migrations/get-commit-authors)`. @@ -548,8 +554,8 @@ extension APIProtocol { /// Update an author's identity for the import. Your application can continue updating authors any time before you push /// new commits to the repository. /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - /// + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import/authors/{author_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/authors/{author_id}/patch(migrations/map-commit-author)`. @@ -569,8 +575,8 @@ extension APIProtocol { /// /// List files larger than 100MB found during the import /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - /// + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/import/large_files`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/large_files/get(migrations/get-large-files)`. @@ -592,8 +598,8 @@ extension APIProtocol { /// You can learn more about our LFS feature and working with large files [on our help /// site](https://docs.github.com/repositories/working-with-files/managing-large-files). /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - /// + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import/lfs`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/lfs/patch(migrations/set-lfs-preference)`. @@ -4729,7 +4735,8 @@ public enum Operations { /// /// View the progress of an import. /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// **Import status** /// @@ -4956,7 +4963,8 @@ public enum Operations { /// have the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array. /// You can select the project to import by providing one of the objects in the `project_choices` array in the update request. /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/patch(migrations/update-import)`. @@ -5185,8 +5193,8 @@ public enum Operations { /// Importing into a GitHub repository with GitHub Actions enabled is not supported and will /// return a status `422 Unprocessable Entity` response. /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - /// + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PUT /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/put(migrations/start-import)`. @@ -5486,8 +5494,8 @@ public enum Operations { /// /// Stop an import for a repository. /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - /// + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/import`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/delete(migrations/cancel-import)`. @@ -5631,7 +5639,8 @@ public enum Operations { /// /// This endpoint and the [Map a commit author](https://docs.github.com/rest/migrations/source-imports#map-a-commit-author) endpoint allow you to provide correct Git author information. /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/import/authors`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/authors/get(migrations/get-commit-authors)`. @@ -5839,8 +5848,8 @@ public enum Operations { /// Update an author's identity for the import. Your application can continue updating authors any time before you push /// new commits to the repository. /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - /// + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import/authors/{author_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/authors/{author_id}/patch(migrations/map-commit-author)`. @@ -6108,8 +6117,8 @@ public enum Operations { /// /// List files larger than 100MB found during the import /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - /// + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/import/large_files`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/large_files/get(migrations/get-large-files)`. @@ -6279,8 +6288,8 @@ public enum Operations { /// You can learn more about our LFS feature and working with large files [on our help /// site](https://docs.github.com/repositories/working-with-files/managing-large-files). /// - /// **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). - /// + /// > [!WARNING] + /// > **Deprecation notice:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/import/lfs`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/import/lfs/patch(migrations/set-lfs-preference)`. From 9df62b2d09199c0eb965de776ffa5160527cd97b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 22 Jul 2024 21:52:02 +0000 Subject: [PATCH 099/152] Commit via running ake Sources/orgs --- Sources/orgs/Client.swift | 492 +------------- Sources/orgs/Types.swift | 1332 ++++++------------------------------- 2 files changed, 218 insertions(+), 1606 deletions(-) diff --git a/Sources/orgs/Client.swift b/Sources/orgs/Client.swift index e4804752110..51f3dd1da5d 100644 --- a/Sources/orgs/Client.swift +++ b/Sources/orgs/Client.swift @@ -42,7 +42,8 @@ public struct Client: APIProtocol { /// /// Lists all organizations, in the order that they were created. /// - /// **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. + /// > [!NOTE] + /// > Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. /// /// - Remark: HTTP `GET /organizations`. /// - Remark: Generated from `#/paths//organizations/get(orgs/list)`. @@ -222,9 +223,11 @@ public struct Client: APIProtocol { } /// Update an organization /// - /// **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + /// > [!WARNING] + /// > **Parameter deprecation notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). /// - /// **Parameter Deprecation Notice:** Code security product enablement for new repositories through the organization API is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/). + /// > [!WARNING] + /// > **Parameter deprecation notice:** Code security product enablement for new repositories through the organization API is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/). /// /// Updates the organization's profile and member privileges. /// @@ -3166,126 +3169,9 @@ public struct Client: APIProtocol { } ) } - /// List organization fine-grained permissions for an organization - /// - /// Lists the fine-grained permissions that can be used in custom organization roles for an organization. For more information, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// To list the fine-grained permissions that can be used in custom repository roles for an organization, see "[List repository fine-grained permissions for an organization](https://docs.github.com/rest/orgs/organization-roles#list-repository-fine-grained-permissions-for-an-organization)." - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `GET /orgs/{org}/organization-fine-grained-permissions`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-fine-grained-permissions/get(orgs/list-organization-fine-grained-permissions)`. - public func orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions(_ input: Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Input) async throws -> Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Output { - try await client.send( - input: input, - forOperation: Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.id, - serializer: { input in - let path = try converter.renderedPath( - template: "/orgs/{}/organization-fine-grained-permissions", - parameters: [ - input.path.org - ] - ) - var request: HTTPTypes.HTTPRequest = .init( - soar_path: path, - method: .get - ) - suppressMutabilityWarning(&request) - converter.setAcceptHeader( - in: &request.headerFields, - contentTypes: input.headers.accept - ) - return (request, nil) - }, - deserializer: { response, responseBody in - switch response.status.code { - case 200: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Output.Ok.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - [Components.Schemas.organization_hyphen_fine_hyphen_grained_hyphen_permission].self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .ok(.init(body: body)) - case 404: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.not_found.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.basic_hyphen_error.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .notFound(.init(body: body)) - case 422: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.validation_failed.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.validation_hyphen_error.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .unprocessableContent(.init(body: body)) - default: - return .undocumented( - statusCode: response.status.code, - .init( - headerFields: response.headerFields, - body: responseBody - ) - ) - } - } - ) - } /// Get all organization roles for an organization /// - /// Lists the organization roles available in this organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Lists the organization roles available in this organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, the authenticated user must be one of: /// @@ -3398,155 +3284,9 @@ public struct Client: APIProtocol { } ) } - /// Create a custom organization role - /// - /// Creates a custom organization role that can be assigned to users and teams, granting them specific permissions over the organization. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `POST /orgs/{org}/organization-roles`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/post(orgs/create-custom-organization-role)`. - public func orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role(_ input: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Input) async throws -> Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Output { - try await client.send( - input: input, - forOperation: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.id, - serializer: { input in - let path = try converter.renderedPath( - template: "/orgs/{}/organization-roles", - parameters: [ - input.path.org - ] - ) - var request: HTTPTypes.HTTPRequest = .init( - soar_path: path, - method: .post - ) - suppressMutabilityWarning(&request) - converter.setAcceptHeader( - in: &request.headerFields, - contentTypes: input.headers.accept - ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) - }, - deserializer: { response, responseBody in - switch response.status.code { - case 201: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Output.Created.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.organization_hyphen_role.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .created(.init(body: body)) - case 422: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.validation_failed.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.validation_hyphen_error.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .unprocessableContent(.init(body: body)) - case 404: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.not_found.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.basic_hyphen_error.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .notFound(.init(body: body)) - case 409: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.conflict.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.basic_hyphen_error.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .conflict(.init(body: body)) - default: - return .undocumented( - statusCode: response.status.code, - .init( - headerFields: response.headerFields, - body: responseBody - ) - ) - } - } - ) - } /// Remove all organization roles for a team /// - /// Removes all assigned organization roles from a team. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Removes all assigned organization roles from a team. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -3591,7 +3331,7 @@ public struct Client: APIProtocol { } /// Assign an organization role to a team /// - /// Assigns an organization role to a team in an organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Assigns an organization role to a team in an organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -3641,7 +3381,7 @@ public struct Client: APIProtocol { } /// Remove an organization role from a team /// - /// Removes an organization role from a team. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Removes an organization role from a team. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -3687,7 +3427,7 @@ public struct Client: APIProtocol { } /// Remove all organization roles for a user /// - /// Revokes all assigned organization roles from a user. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Revokes all assigned organization roles from a user. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -3732,7 +3472,7 @@ public struct Client: APIProtocol { } /// Assign an organization role to a user /// - /// Assigns an organization role to a member of an organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Assigns an organization role to a member of an organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -3782,7 +3522,7 @@ public struct Client: APIProtocol { } /// Remove an organization role from a user /// - /// Remove an organization role from a user. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Remove an organization role from a user. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -3828,7 +3568,7 @@ public struct Client: APIProtocol { } /// Get an organization role /// - /// Gets an organization role that is available to this organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Gets an organization role that is available to this organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, the authenticated user must be one of: /// @@ -3942,205 +3682,9 @@ public struct Client: APIProtocol { } ) } - /// Update a custom organization role - /// - /// Updates an existing custom organization role. Permission changes will apply to all assignees. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `PATCH /orgs/{org}/organization-roles/{role_id}`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/patch(orgs/patch-custom-organization-role)`. - public func orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role(_ input: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Input) async throws -> Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Output { - try await client.send( - input: input, - forOperation: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.id, - serializer: { input in - let path = try converter.renderedPath( - template: "/orgs/{}/organization-roles/{}", - parameters: [ - input.path.org, - input.path.role_id - ] - ) - var request: HTTPTypes.HTTPRequest = .init( - soar_path: path, - method: .patch - ) - suppressMutabilityWarning(&request) - converter.setAcceptHeader( - in: &request.headerFields, - contentTypes: input.headers.accept - ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) - }, - deserializer: { response, responseBody in - switch response.status.code { - case 200: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Output.Ok.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.organization_hyphen_role.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .ok(.init(body: body)) - case 422: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.validation_failed.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.validation_hyphen_error.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .unprocessableContent(.init(body: body)) - case 409: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.conflict.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.basic_hyphen_error.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .conflict(.init(body: body)) - case 404: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.not_found.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.basic_hyphen_error.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .notFound(.init(body: body)) - default: - return .undocumented( - statusCode: response.status.code, - .init( - headerFields: response.headerFields, - body: responseBody - ) - ) - } - } - ) - } - /// Delete a custom organization role. - /// - /// Deletes a custom organization role. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `DELETE /orgs/{org}/organization-roles/{role_id}`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/delete(orgs/delete-custom-organization-role)`. - public func orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role(_ input: Operations.orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role.Input) async throws -> Operations.orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role.Output { - try await client.send( - input: input, - forOperation: Operations.orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role.id, - serializer: { input in - let path = try converter.renderedPath( - template: "/orgs/{}/organization-roles/{}", - parameters: [ - input.path.org, - input.path.role_id - ] - ) - var request: HTTPTypes.HTTPRequest = .init( - soar_path: path, - method: .delete - ) - suppressMutabilityWarning(&request) - return (request, nil) - }, - deserializer: { response, responseBody in - switch response.status.code { - case 204: - return .noContent(.init()) - default: - return .undocumented( - statusCode: response.status.code, - .init( - headerFields: response.headerFields, - body: responseBody - ) - ) - } - } - ) - } /// List teams that are assigned to an organization role /// - /// Lists the teams that are assigned to an organization role. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Lists the teams that are assigned to an organization role. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, you must be an administrator for the organization. /// @@ -4235,7 +3779,7 @@ public struct Client: APIProtocol { } /// List users that are assigned to an organization role /// - /// Lists organization members that are assigned to an organization role. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Lists organization members that are assigned to an organization role. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, you must be an administrator for the organization. /// @@ -7184,6 +6728,9 @@ public struct Client: APIProtocol { } /// Enable or disable a security feature for an organization /// + /// > [!WARNING] + /// > **Deprecation notice:** The ability to enable or disable a security feature for all eligible repositories in an organization is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. For more information, see the [changelog](https://github.blog/changelog/2024-07-22-deprecation-api-endpoint-to-enable-or-disable-a-security-feature-for-an-organization/). + /// /// Enables or disables the specified security feature for all eligible repositories in an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// /// The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint. @@ -7192,6 +6739,7 @@ public struct Client: APIProtocol { /// /// - Remark: HTTP `POST /orgs/{org}/{security_product}/{enablement}`. /// - Remark: Generated from `#/paths//orgs/{org}/{security_product}/{enablement}/post(orgs/enable-or-disable-security-product-on-all-org-repos)`. + @available(*, deprecated) public func orgs_sol_enable_hyphen_or_hyphen_disable_hyphen_security_hyphen_product_hyphen_on_hyphen_all_hyphen_org_hyphen_repos(_ input: Operations.orgs_sol_enable_hyphen_or_hyphen_disable_hyphen_security_hyphen_product_hyphen_on_hyphen_all_hyphen_org_hyphen_repos.Input) async throws -> Operations.orgs_sol_enable_hyphen_or_hyphen_disable_hyphen_security_hyphen_product_hyphen_on_hyphen_all_hyphen_org_hyphen_repos.Output { try await client.send( input: input, diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index ac9573b07f7..03b208720a2 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -15,7 +15,8 @@ public protocol APIProtocol: Sendable { /// /// Lists all organizations, in the order that they were created. /// - /// **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. + /// > [!NOTE] + /// > Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. /// /// - Remark: HTTP `GET /organizations`. /// - Remark: Generated from `#/paths//organizations/get(orgs/list)`. @@ -37,9 +38,11 @@ public protocol APIProtocol: Sendable { func orgs_sol_get(_ input: Operations.orgs_sol_get.Input) async throws -> Operations.orgs_sol_get.Output /// Update an organization /// - /// **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + /// > [!WARNING] + /// > **Parameter deprecation notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). /// - /// **Parameter Deprecation Notice:** Code security product enablement for new repositories through the organization API is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/). + /// > [!WARNING] + /// > **Parameter deprecation notice:** Code security product enablement for new repositories through the organization API is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/). /// /// Updates the organization's profile and member privileges. /// @@ -343,25 +346,9 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `DELETE /orgs/{org}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/delete(orgs/remove-membership-for-user)`. func orgs_sol_remove_hyphen_membership_hyphen_for_hyphen_user(_ input: Operations.orgs_sol_remove_hyphen_membership_hyphen_for_hyphen_user.Input) async throws -> Operations.orgs_sol_remove_hyphen_membership_hyphen_for_hyphen_user.Output - /// List organization fine-grained permissions for an organization - /// - /// Lists the fine-grained permissions that can be used in custom organization roles for an organization. For more information, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// To list the fine-grained permissions that can be used in custom repository roles for an organization, see "[List repository fine-grained permissions for an organization](https://docs.github.com/rest/orgs/organization-roles#list-repository-fine-grained-permissions-for-an-organization)." - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `GET /orgs/{org}/organization-fine-grained-permissions`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-fine-grained-permissions/get(orgs/list-organization-fine-grained-permissions)`. - func orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions(_ input: Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Input) async throws -> Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Output /// Get all organization roles for an organization /// - /// Lists the organization roles available in this organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Lists the organization roles available in this organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, the authenticated user must be one of: /// @@ -373,23 +360,9 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `GET /orgs/{org}/organization-roles`. /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/get(orgs/list-org-roles)`. func orgs_sol_list_hyphen_org_hyphen_roles(_ input: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Input) async throws -> Operations.orgs_sol_list_hyphen_org_hyphen_roles.Output - /// Create a custom organization role - /// - /// Creates a custom organization role that can be assigned to users and teams, granting them specific permissions over the organization. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `POST /orgs/{org}/organization-roles`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/post(orgs/create-custom-organization-role)`. - func orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role(_ input: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Input) async throws -> Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Output /// Remove all organization roles for a team /// - /// Removes all assigned organization roles from a team. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Removes all assigned organization roles from a team. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -400,7 +373,7 @@ public protocol APIProtocol: Sendable { func orgs_sol_revoke_hyphen_all_hyphen_org_hyphen_roles_hyphen_team(_ input: Operations.orgs_sol_revoke_hyphen_all_hyphen_org_hyphen_roles_hyphen_team.Input) async throws -> Operations.orgs_sol_revoke_hyphen_all_hyphen_org_hyphen_roles_hyphen_team.Output /// Assign an organization role to a team /// - /// Assigns an organization role to a team in an organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Assigns an organization role to a team in an organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -411,7 +384,7 @@ public protocol APIProtocol: Sendable { func orgs_sol_assign_hyphen_team_hyphen_to_hyphen_org_hyphen_role(_ input: Operations.orgs_sol_assign_hyphen_team_hyphen_to_hyphen_org_hyphen_role.Input) async throws -> Operations.orgs_sol_assign_hyphen_team_hyphen_to_hyphen_org_hyphen_role.Output /// Remove an organization role from a team /// - /// Removes an organization role from a team. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Removes an organization role from a team. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -422,7 +395,7 @@ public protocol APIProtocol: Sendable { func orgs_sol_revoke_hyphen_org_hyphen_role_hyphen_team(_ input: Operations.orgs_sol_revoke_hyphen_org_hyphen_role_hyphen_team.Input) async throws -> Operations.orgs_sol_revoke_hyphen_org_hyphen_role_hyphen_team.Output /// Remove all organization roles for a user /// - /// Revokes all assigned organization roles from a user. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Revokes all assigned organization roles from a user. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -433,7 +406,7 @@ public protocol APIProtocol: Sendable { func orgs_sol_revoke_hyphen_all_hyphen_org_hyphen_roles_hyphen_user(_ input: Operations.orgs_sol_revoke_hyphen_all_hyphen_org_hyphen_roles_hyphen_user.Input) async throws -> Operations.orgs_sol_revoke_hyphen_all_hyphen_org_hyphen_roles_hyphen_user.Output /// Assign an organization role to a user /// - /// Assigns an organization role to a member of an organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Assigns an organization role to a member of an organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -444,7 +417,7 @@ public protocol APIProtocol: Sendable { func orgs_sol_assign_hyphen_user_hyphen_to_hyphen_org_hyphen_role(_ input: Operations.orgs_sol_assign_hyphen_user_hyphen_to_hyphen_org_hyphen_role.Input) async throws -> Operations.orgs_sol_assign_hyphen_user_hyphen_to_hyphen_org_hyphen_role.Output /// Remove an organization role from a user /// - /// Remove an organization role from a user. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Remove an organization role from a user. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -455,7 +428,7 @@ public protocol APIProtocol: Sendable { func orgs_sol_revoke_hyphen_org_hyphen_role_hyphen_user(_ input: Operations.orgs_sol_revoke_hyphen_org_hyphen_role_hyphen_user.Input) async throws -> Operations.orgs_sol_revoke_hyphen_org_hyphen_role_hyphen_user.Output /// Get an organization role /// - /// Gets an organization role that is available to this organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Gets an organization role that is available to this organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, the authenticated user must be one of: /// @@ -467,38 +440,9 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `GET /orgs/{org}/organization-roles/{role_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/get(orgs/get-org-role)`. func orgs_sol_get_hyphen_org_hyphen_role(_ input: Operations.orgs_sol_get_hyphen_org_hyphen_role.Input) async throws -> Operations.orgs_sol_get_hyphen_org_hyphen_role.Output - /// Update a custom organization role - /// - /// Updates an existing custom organization role. Permission changes will apply to all assignees. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `PATCH /orgs/{org}/organization-roles/{role_id}`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/patch(orgs/patch-custom-organization-role)`. - func orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role(_ input: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Input) async throws -> Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Output - /// Delete a custom organization role. - /// - /// Deletes a custom organization role. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `DELETE /orgs/{org}/organization-roles/{role_id}`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/delete(orgs/delete-custom-organization-role)`. - func orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role(_ input: Operations.orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role.Input) async throws -> Operations.orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role.Output /// List teams that are assigned to an organization role /// - /// Lists the teams that are assigned to an organization role. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Lists the teams that are assigned to an organization role. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, you must be an administrator for the organization. /// @@ -509,7 +453,7 @@ public protocol APIProtocol: Sendable { func orgs_sol_list_hyphen_org_hyphen_role_hyphen_teams(_ input: Operations.orgs_sol_list_hyphen_org_hyphen_role_hyphen_teams.Input) async throws -> Operations.orgs_sol_list_hyphen_org_hyphen_role_hyphen_teams.Output /// List users that are assigned to an organization role /// - /// Lists organization members that are assigned to an organization role. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Lists organization members that are assigned to an organization role. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, you must be an administrator for the organization. /// @@ -749,6 +693,9 @@ public protocol APIProtocol: Sendable { func orgs_sol_remove_hyphen_security_hyphen_manager_hyphen_team(_ input: Operations.orgs_sol_remove_hyphen_security_hyphen_manager_hyphen_team.Input) async throws -> Operations.orgs_sol_remove_hyphen_security_hyphen_manager_hyphen_team.Output /// Enable or disable a security feature for an organization /// + /// > [!WARNING] + /// > **Deprecation notice:** The ability to enable or disable a security feature for all eligible repositories in an organization is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. For more information, see the [changelog](https://github.blog/changelog/2024-07-22-deprecation-api-endpoint-to-enable-or-disable-a-security-feature-for-an-organization/). + /// /// Enables or disables the specified security feature for all eligible repositories in an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// /// The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint. @@ -757,6 +704,7 @@ public protocol APIProtocol: Sendable { /// /// - Remark: HTTP `POST /orgs/{org}/{security_product}/{enablement}`. /// - Remark: Generated from `#/paths//orgs/{org}/{security_product}/{enablement}/post(orgs/enable-or-disable-security-product-on-all-org-repos)`. + @available(*, deprecated) func orgs_sol_enable_hyphen_or_hyphen_disable_hyphen_security_hyphen_product_hyphen_on_hyphen_all_hyphen_org_hyphen_repos(_ input: Operations.orgs_sol_enable_hyphen_or_hyphen_disable_hyphen_security_hyphen_product_hyphen_on_hyphen_all_hyphen_org_hyphen_repos.Input) async throws -> Operations.orgs_sol_enable_hyphen_or_hyphen_disable_hyphen_security_hyphen_product_hyphen_on_hyphen_all_hyphen_org_hyphen_repos.Output /// List organization memberships for the authenticated user /// @@ -805,7 +753,8 @@ extension APIProtocol { /// /// Lists all organizations, in the order that they were created. /// - /// **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. + /// > [!NOTE] + /// > Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. /// /// - Remark: HTTP `GET /organizations`. /// - Remark: Generated from `#/paths//organizations/get(orgs/list)`. @@ -843,9 +792,11 @@ extension APIProtocol { } /// Update an organization /// - /// **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + /// > [!WARNING] + /// > **Parameter deprecation notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). /// - /// **Parameter Deprecation Notice:** Code security product enablement for new repositories through the organization API is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/). + /// > [!WARNING] + /// > **Parameter deprecation notice:** Code security product enablement for new repositories through the organization API is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/). /// /// Updates the organization's profile and member privileges. /// @@ -1407,33 +1358,9 @@ extension APIProtocol { headers: headers )) } - /// List organization fine-grained permissions for an organization - /// - /// Lists the fine-grained permissions that can be used in custom organization roles for an organization. For more information, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// To list the fine-grained permissions that can be used in custom repository roles for an organization, see "[List repository fine-grained permissions for an organization](https://docs.github.com/rest/orgs/organization-roles#list-repository-fine-grained-permissions-for-an-organization)." - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `GET /orgs/{org}/organization-fine-grained-permissions`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-fine-grained-permissions/get(orgs/list-organization-fine-grained-permissions)`. - public func orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions( - path: Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Input.Path, - headers: Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Input.Headers = .init() - ) async throws -> Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Output { - try await orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions(Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Input( - path: path, - headers: headers - )) - } /// Get all organization roles for an organization /// - /// Lists the organization roles available in this organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Lists the organization roles available in this organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, the authenticated user must be one of: /// @@ -1453,33 +1380,9 @@ extension APIProtocol { headers: headers )) } - /// Create a custom organization role - /// - /// Creates a custom organization role that can be assigned to users and teams, granting them specific permissions over the organization. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `POST /orgs/{org}/organization-roles`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/post(orgs/create-custom-organization-role)`. - public func orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role( - path: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Input.Path, - headers: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Input.Headers = .init(), - body: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Input.Body - ) async throws -> Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Output { - try await orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role(Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Input( - path: path, - headers: headers, - body: body - )) - } /// Remove all organization roles for a team /// - /// Removes all assigned organization roles from a team. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Removes all assigned organization roles from a team. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -1492,7 +1395,7 @@ extension APIProtocol { } /// Assign an organization role to a team /// - /// Assigns an organization role to a team in an organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Assigns an organization role to a team in an organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -1505,7 +1408,7 @@ extension APIProtocol { } /// Remove an organization role from a team /// - /// Removes an organization role from a team. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Removes an organization role from a team. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -1518,7 +1421,7 @@ extension APIProtocol { } /// Remove all organization roles for a user /// - /// Revokes all assigned organization roles from a user. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Revokes all assigned organization roles from a user. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -1531,7 +1434,7 @@ extension APIProtocol { } /// Assign an organization role to a user /// - /// Assigns an organization role to a member of an organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Assigns an organization role to a member of an organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -1544,7 +1447,7 @@ extension APIProtocol { } /// Remove an organization role from a user /// - /// Remove an organization role from a user. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Remove an organization role from a user. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -1557,7 +1460,7 @@ extension APIProtocol { } /// Get an organization role /// - /// Gets an organization role that is available to this organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Gets an organization role that is available to this organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, the authenticated user must be one of: /// @@ -1577,50 +1480,9 @@ extension APIProtocol { headers: headers )) } - /// Update a custom organization role - /// - /// Updates an existing custom organization role. Permission changes will apply to all assignees. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `PATCH /orgs/{org}/organization-roles/{role_id}`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/patch(orgs/patch-custom-organization-role)`. - public func orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role( - path: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Input.Path, - headers: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Input.Headers = .init(), - body: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Input.Body - ) async throws -> Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Output { - try await orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role(Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Input( - path: path, - headers: headers, - body: body - )) - } - /// Delete a custom organization role. - /// - /// Deletes a custom organization role. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `DELETE /orgs/{org}/organization-roles/{role_id}`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/delete(orgs/delete-custom-organization-role)`. - public func orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role(path: Operations.orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role.Input.Path) async throws -> Operations.orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role.Output { - try await orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role(Operations.orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role.Input(path: path)) - } /// List teams that are assigned to an organization role /// - /// Lists the teams that are assigned to an organization role. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Lists the teams that are assigned to an organization role. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, you must be an administrator for the organization. /// @@ -1641,7 +1503,7 @@ extension APIProtocol { } /// List users that are assigned to an organization role /// - /// Lists organization members that are assigned to an organization role. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Lists organization members that are assigned to an organization role. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, you must be an administrator for the organization. /// @@ -2097,6 +1959,9 @@ extension APIProtocol { } /// Enable or disable a security feature for an organization /// + /// > [!WARNING] + /// > **Deprecation notice:** The ability to enable or disable a security feature for all eligible repositories in an organization is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. For more information, see the [changelog](https://github.blog/changelog/2024-07-22-deprecation-api-endpoint-to-enable-or-disable-a-security-feature-for-an-organization/). + /// /// Enables or disables the specified security feature for all eligible repositories in an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// /// The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint. @@ -2105,6 +1970,7 @@ extension APIProtocol { /// /// - Remark: HTTP `POST /orgs/{org}/{security_product}/{enablement}`. /// - Remark: Generated from `#/paths//orgs/{org}/{security_product}/{enablement}/post(orgs/enable-or-disable-security-product-on-all-org-repos)`. + @available(*, deprecated) public func orgs_sol_enable_hyphen_or_hyphen_disable_hyphen_security_hyphen_product_hyphen_on_hyphen_all_hyphen_org_hyphen_repos( path: Operations.orgs_sol_enable_hyphen_or_hyphen_disable_hyphen_security_hyphen_product_hyphen_on_hyphen_all_hyphen_org_hyphen_repos.Input.Path, body: Operations.orgs_sol_enable_hyphen_or_hyphen_disable_hyphen_security_hyphen_product_hyphen_on_hyphen_all_hyphen_org_hyphen_repos.Input.Body? = nil @@ -6047,31 +5913,6 @@ public enum Components { case permissions } } - /// A fine-grained permission that protects organization resources. - /// - /// - Remark: Generated from `#/components/schemas/organization-fine-grained-permission`. - public struct organization_hyphen_fine_hyphen_grained_hyphen_permission: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/organization-fine-grained-permission/name`. - public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-fine-grained-permission/description`. - public var description: Swift.String - /// Creates a new `organization_hyphen_fine_hyphen_grained_hyphen_permission`. - /// - /// - Parameters: - /// - name: - /// - description: - public init( - name: Swift.String, - description: Swift.String - ) { - self.name = name - self.description = description - } - public enum CodingKeys: String, CodingKey { - case name - case description - } - } /// Organization roles /// /// - Remark: Generated from `#/components/schemas/organization-role`. @@ -7502,7 +7343,8 @@ public enum Operations { /// /// Lists all organizations, in the order that they were created. /// - /// **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. + /// > [!NOTE] + /// > Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. /// /// - Remark: HTTP `GET /organizations`. /// - Remark: Generated from `#/paths//organizations/get(orgs/list)`. @@ -7848,9 +7690,11 @@ public enum Operations { } /// Update an organization /// - /// **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + /// > [!WARNING] + /// > **Parameter deprecation notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). /// - /// **Parameter Deprecation Notice:** Code security product enablement for new repositories through the organization API is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/). + /// > [!WARNING] + /// > **Parameter deprecation notice:** Code security product enablement for new repositories through the organization API is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/). /// /// Updates the organization's profile and member privileges. /// @@ -13949,11 +13793,9 @@ public enum Operations { } } } - /// List organization fine-grained permissions for an organization - /// - /// Lists the fine-grained permissions that can be used in custom organization roles for an organization. For more information, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Get all organization roles for an organization /// - /// To list the fine-grained permissions that can be used in custom repository roles for an organization, see "[List repository fine-grained permissions for an organization](https://docs.github.com/rest/orgs/organization-roles#list-repository-fine-grained-permissions-for-an-organization)." + /// Lists the organization roles available in this organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, the authenticated user must be one of: /// @@ -13962,16 +13804,16 @@ public enum Operations { /// /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. /// - /// - Remark: HTTP `GET /orgs/{org}/organization-fine-grained-permissions`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-fine-grained-permissions/get(orgs/list-organization-fine-grained-permissions)`. - public enum orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions { - public static let id: Swift.String = "orgs/list-organization-fine-grained-permissions" + /// - Remark: HTTP `GET /orgs/{org}/organization-roles`. + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/get(orgs/list-org-roles)`. + public enum orgs_sol_list_hyphen_org_hyphen_roles { + public static let id: Swift.String = "orgs/list-org-roles" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-fine-grained-permissions/GET/path`. + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/path`. public struct Path: Sendable, Hashable { /// The organization name. The name is not case sensitive. /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-fine-grained-permissions/GET/path/org`. + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/path/org`. public var org: Components.Parameters.org /// Creates a new `Path`. /// @@ -13981,27 +13823,27 @@ public enum Operations { self.org = org } } - public var path: Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Input.Path - /// - Remark: Generated from `#/paths/orgs/{org}/organization-fine-grained-permissions/GET/header`. + public var path: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Input.Headers + public var headers: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: public init( - path: Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Input.Path, - headers: Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Input.Headers = .init() + path: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Input.Path, + headers: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Input.Headers = .init() ) { self.path = path self.headers = headers @@ -14009,15 +13851,42 @@ public enum Operations { } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-fine-grained-permissions/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-fine-grained-permissions/GET/responses/200/content/application\/json`. - case json([Components.Schemas.organization_hyphen_fine_hyphen_grained_hyphen_permission]) + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/responses/200/content/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// The total number of organization roles available to the organization. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/responses/200/content/json/total_count`. + public var total_count: Swift.Int? + /// The list of organization roles available to the organization. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/responses/200/content/json/roles`. + public var roles: [Components.Schemas.organization_hyphen_role]? + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - total_count: The total number of organization roles available to the organization. + /// - roles: The list of organization roles available to the organization. + public init( + total_count: Swift.Int? = nil, + roles: [Components.Schemas.organization_hyphen_role]? = nil + ) { + self.total_count = total_count + self.roles = roles + } + public enum CodingKeys: String, CodingKey { + case total_count + case roles + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/responses/200/content/application\/json`. + case json(Operations.orgs_sol_list_hyphen_org_hyphen_roles.Output.Ok.Body.jsonPayload) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: [Components.Schemas.organization_hyphen_fine_hyphen_grained_hyphen_permission] { + public var json: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Output.Ok.Body.jsonPayload { get throws { switch self { case let .json(body): @@ -14027,26 +13896,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Output.Ok.Body + public var body: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Output.Ok.Body) { + public init(body: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Output.Ok.Body) { self.body = body } } - /// Response + /// Response - list of organization roles /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-fine-grained-permissions/get(orgs/list-organization-fine-grained-permissions)/responses/200`. + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/get(orgs/list-org-roles)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Output.Ok) + case ok(Operations.orgs_sol_list_hyphen_org_hyphen_roles.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.orgs_sol_list_hyphen_organization_hyphen_fine_hyphen_grained_hyphen_permissions.Output.Ok { + public var ok: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Output.Ok { get throws { switch self { case let .ok(response): @@ -14061,7 +13930,7 @@ public enum Operations { } /// Resource not found /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-fine-grained-permissions/get(orgs/list-organization-fine-grained-permissions)/responses/404`. + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/get(orgs/list-org-roles)/responses/404`. /// /// HTTP response code: `404 notFound`. case notFound(Components.Responses.not_found) @@ -14084,7 +13953,7 @@ public enum Operations { } /// Validation failed, or the endpoint has been spammed. /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-fine-grained-permissions/get(orgs/list-organization-fine-grained-permissions)/responses/422`. + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/get(orgs/list-org-roles)/responses/422`. /// /// HTTP response code: `422 unprocessableContent`. case unprocessableContent(Components.Responses.validation_failed) @@ -14136,512 +14005,48 @@ public enum Operations { } } } - /// Get all organization roles for an organization - /// - /// Lists the organization roles available in this organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Remove all organization roles for a team /// - /// To use this endpoint, the authenticated user must be one of: + /// Removes all assigned organization roles from a team. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization. + /// The authenticated user must be an administrator for the organization to use this endpoint. /// /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. /// - /// - Remark: HTTP `GET /orgs/{org}/organization-roles`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/get(orgs/list-org-roles)`. - public enum orgs_sol_list_hyphen_org_hyphen_roles { - public static let id: Swift.String = "orgs/list-org-roles" + /// - Remark: HTTP `DELETE /orgs/{org}/organization-roles/teams/{team_slug}`. + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/teams/{team_slug}/delete(orgs/revoke-all-org-roles-team)`. + public enum orgs_sol_revoke_hyphen_all_hyphen_org_hyphen_roles_hyphen_team { + public static let id: Swift.String = "orgs/revoke-all-org-roles-team" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/path`. + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/teams/{team_slug}/DELETE/path`. public struct Path: Sendable, Hashable { /// The organization name. The name is not case sensitive. /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/path/org`. + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/teams/{team_slug}/DELETE/path/org`. public var org: Components.Parameters.org + /// The slug of the team name. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/teams/{team_slug}/DELETE/path/team_slug`. + public var team_slug: Components.Parameters.team_hyphen_slug /// Creates a new `Path`. /// /// - Parameters: /// - org: The organization name. The name is not case sensitive. - public init(org: Components.Parameters.org) { + /// - team_slug: The slug of the team name. + public init( + org: Components.Parameters.org, + team_slug: Components.Parameters.team_hyphen_slug + ) { self.org = org + self.team_slug = team_slug } } - public var path: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Input.Path - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/header`. - public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] - /// Creates a new `Headers`. - /// - /// - Parameters: - /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { - self.accept = accept - } - } - public var headers: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Input.Headers + public var path: Operations.orgs_sol_revoke_hyphen_all_hyphen_org_hyphen_roles_hyphen_team.Input.Path /// Creates a new `Input`. /// /// - Parameters: /// - path: - /// - headers: - public init( - path: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Input.Path, - headers: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Input.Headers = .init() - ) { - self.path = path - self.headers = headers - } - } - @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/responses/200/content/json`. - public struct jsonPayload: Codable, Hashable, Sendable { - /// The total number of organization roles available to the organization. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/responses/200/content/json/total_count`. - public var total_count: Swift.Int? - /// The list of organization roles available to the organization. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/responses/200/content/json/roles`. - public var roles: [Components.Schemas.organization_hyphen_role]? - /// Creates a new `jsonPayload`. - /// - /// - Parameters: - /// - total_count: The total number of organization roles available to the organization. - /// - roles: The list of organization roles available to the organization. - public init( - total_count: Swift.Int? = nil, - roles: [Components.Schemas.organization_hyphen_role]? = nil - ) { - self.total_count = total_count - self.roles = roles - } - public enum CodingKeys: String, CodingKey { - case total_count - case roles - } - } - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/GET/responses/200/content/application\/json`. - case json(Operations.orgs_sol_list_hyphen_org_hyphen_roles.Output.Ok.Body.jsonPayload) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Output.Ok.Body.jsonPayload { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Output.Ok.Body) { - self.body = body - } - } - /// Response - list of organization roles - /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/get(orgs/list-org-roles)/responses/200`. - /// - /// HTTP response code: `200 ok`. - case ok(Operations.orgs_sol_list_hyphen_org_hyphen_roles.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. - /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.orgs_sol_list_hyphen_org_hyphen_roles.Output.Ok { - get throws { - switch self { - case let .ok(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "ok", - response: self - ) - } - } - } - /// Resource not found - /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/get(orgs/list-org-roles)/responses/404`. - /// - /// HTTP response code: `404 notFound`. - case notFound(Components.Responses.not_found) - /// The associated value of the enum case if `self` is `.notFound`. - /// - /// - Throws: An error if `self` is not `.notFound`. - /// - SeeAlso: `.notFound`. - public var notFound: Components.Responses.not_found { - get throws { - switch self { - case let .notFound(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "notFound", - response: self - ) - } - } - } - /// Validation failed, or the endpoint has been spammed. - /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/get(orgs/list-org-roles)/responses/422`. - /// - /// HTTP response code: `422 unprocessableContent`. - case unprocessableContent(Components.Responses.validation_failed) - /// The associated value of the enum case if `self` is `.unprocessableContent`. - /// - /// - Throws: An error if `self` is not `.unprocessableContent`. - /// - SeeAlso: `.unprocessableContent`. - public var unprocessableContent: Components.Responses.validation_failed { - get throws { - switch self { - case let .unprocessableContent(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "unprocessableContent", - response: self - ) - } - } - } - /// Undocumented response. - /// - /// A response with a code that is not documented in the OpenAPI document. - case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) - } - @frozen public enum AcceptableContentType: AcceptableProtocol { - case json - case other(Swift.String) - public init?(rawValue: Swift.String) { - switch rawValue.lowercased() { - case "application/json": - self = .json - default: - self = .other(rawValue) - } - } - public var rawValue: Swift.String { - switch self { - case let .other(string): - return string - case .json: - return "application/json" - } - } - public static var allCases: [Self] { - [ - .json - ] - } - } - } - /// Create a custom organization role - /// - /// Creates a custom organization role that can be assigned to users and teams, granting them specific permissions over the organization. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `POST /orgs/{org}/organization-roles`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/post(orgs/create-custom-organization-role)`. - public enum orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role { - public static let id: Swift.String = "orgs/create-custom-organization-role" - public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/POST/path`. - public struct Path: Sendable, Hashable { - /// The organization name. The name is not case sensitive. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/POST/path/org`. - public var org: Components.Parameters.org - /// Creates a new `Path`. - /// - /// - Parameters: - /// - org: The organization name. The name is not case sensitive. - public init(org: Components.Parameters.org) { - self.org = org - } - } - public var path: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Input.Path - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/POST/header`. - public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] - /// Creates a new `Headers`. - /// - /// - Parameters: - /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { - self.accept = accept - } - } - public var headers: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Input.Headers - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/POST/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/POST/requestBody/json`. - public struct jsonPayload: Codable, Hashable, Sendable { - /// The name of the custom role. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/POST/requestBody/json/name`. - public var name: Swift.String - /// A short description about the intended usage of this role or what permissions it grants. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/POST/requestBody/json/description`. - public var description: Swift.String? - /// A list of additional permissions included in this role. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/POST/requestBody/json/permissions`. - public var permissions: [Swift.String] - /// Creates a new `jsonPayload`. - /// - /// - Parameters: - /// - name: The name of the custom role. - /// - description: A short description about the intended usage of this role or what permissions it grants. - /// - permissions: A list of additional permissions included in this role. - public init( - name: Swift.String, - description: Swift.String? = nil, - permissions: [Swift.String] - ) { - self.name = name - self.description = description - self.permissions = permissions - } - public enum CodingKeys: String, CodingKey { - case name - case description - case permissions - } - } - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/POST/requestBody/content/application\/json`. - case json(Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Input.Body.jsonPayload) - } - public var body: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Input.Body - /// Creates a new `Input`. - /// - /// - Parameters: - /// - path: - /// - headers: - /// - body: - public init( - path: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Input.Path, - headers: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Input.Headers = .init(), - body: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Input.Body - ) { - self.path = path - self.headers = headers - self.body = body - } - } - @frozen public enum Output: Sendable, Hashable { - public struct Created: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/POST/responses/201/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/POST/responses/201/content/application\/json`. - case json(Components.Schemas.organization_hyphen_role) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.organization_hyphen_role { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Output.Created.Body - /// Creates a new `Created`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Output.Created.Body) { - self.body = body - } - } - /// Response - /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/post(orgs/create-custom-organization-role)/responses/201`. - /// - /// HTTP response code: `201 created`. - case created(Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Output.Created) - /// The associated value of the enum case if `self` is `.created`. - /// - /// - Throws: An error if `self` is not `.created`. - /// - SeeAlso: `.created`. - public var created: Operations.orgs_sol_create_hyphen_custom_hyphen_organization_hyphen_role.Output.Created { - get throws { - switch self { - case let .created(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "created", - response: self - ) - } - } - } - /// Validation failed, or the endpoint has been spammed. - /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/post(orgs/create-custom-organization-role)/responses/422`. - /// - /// HTTP response code: `422 unprocessableContent`. - case unprocessableContent(Components.Responses.validation_failed) - /// The associated value of the enum case if `self` is `.unprocessableContent`. - /// - /// - Throws: An error if `self` is not `.unprocessableContent`. - /// - SeeAlso: `.unprocessableContent`. - public var unprocessableContent: Components.Responses.validation_failed { - get throws { - switch self { - case let .unprocessableContent(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "unprocessableContent", - response: self - ) - } - } - } - /// Resource not found - /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/post(orgs/create-custom-organization-role)/responses/404`. - /// - /// HTTP response code: `404 notFound`. - case notFound(Components.Responses.not_found) - /// The associated value of the enum case if `self` is `.notFound`. - /// - /// - Throws: An error if `self` is not `.notFound`. - /// - SeeAlso: `.notFound`. - public var notFound: Components.Responses.not_found { - get throws { - switch self { - case let .notFound(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "notFound", - response: self - ) - } - } - } - /// Conflict - /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/post(orgs/create-custom-organization-role)/responses/409`. - /// - /// HTTP response code: `409 conflict`. - case conflict(Components.Responses.conflict) - /// The associated value of the enum case if `self` is `.conflict`. - /// - /// - Throws: An error if `self` is not `.conflict`. - /// - SeeAlso: `.conflict`. - public var conflict: Components.Responses.conflict { - get throws { - switch self { - case let .conflict(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "conflict", - response: self - ) - } - } - } - /// Undocumented response. - /// - /// A response with a code that is not documented in the OpenAPI document. - case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) - } - @frozen public enum AcceptableContentType: AcceptableProtocol { - case json - case other(Swift.String) - public init?(rawValue: Swift.String) { - switch rawValue.lowercased() { - case "application/json": - self = .json - default: - self = .other(rawValue) - } - } - public var rawValue: Swift.String { - switch self { - case let .other(string): - return string - case .json: - return "application/json" - } - } - public static var allCases: [Self] { - [ - .json - ] - } - } - } - /// Remove all organization roles for a team - /// - /// Removes all assigned organization roles from a team. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// The authenticated user must be an administrator for the organization to use this endpoint. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `DELETE /orgs/{org}/organization-roles/teams/{team_slug}`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/teams/{team_slug}/delete(orgs/revoke-all-org-roles-team)`. - public enum orgs_sol_revoke_hyphen_all_hyphen_org_hyphen_roles_hyphen_team { - public static let id: Swift.String = "orgs/revoke-all-org-roles-team" - public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/teams/{team_slug}/DELETE/path`. - public struct Path: Sendable, Hashable { - /// The organization name. The name is not case sensitive. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/teams/{team_slug}/DELETE/path/org`. - public var org: Components.Parameters.org - /// The slug of the team name. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/teams/{team_slug}/DELETE/path/team_slug`. - public var team_slug: Components.Parameters.team_hyphen_slug - /// Creates a new `Path`. - /// - /// - Parameters: - /// - org: The organization name. The name is not case sensitive. - /// - team_slug: The slug of the team name. - public init( - org: Components.Parameters.org, - team_slug: Components.Parameters.team_hyphen_slug - ) { - self.org = org - self.team_slug = team_slug - } - } - public var path: Operations.orgs_sol_revoke_hyphen_all_hyphen_org_hyphen_roles_hyphen_team.Input.Path - /// Creates a new `Input`. - /// - /// - Parameters: - /// - path: - public init(path: Operations.orgs_sol_revoke_hyphen_all_hyphen_org_hyphen_roles_hyphen_team.Input.Path) { + public init(path: Operations.orgs_sol_revoke_hyphen_all_hyphen_org_hyphen_roles_hyphen_team.Input.Path) { self.path = path } } @@ -14681,7 +14086,7 @@ public enum Operations { } /// Assign an organization role to a team /// - /// Assigns an organization role to a team in an organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Assigns an organization role to a team in an organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -14821,7 +14226,7 @@ public enum Operations { } /// Remove an organization role from a team /// - /// Removes an organization role from a team. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Removes an organization role from a team. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -14907,7 +14312,7 @@ public enum Operations { } /// Remove all organization roles for a user /// - /// Revokes all assigned organization roles from a user. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Revokes all assigned organization roles from a user. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -14986,7 +14391,7 @@ public enum Operations { } /// Assign an organization role to a user /// - /// Assigns an organization role to a member of an organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Assigns an organization role to a member of an organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -15126,7 +14531,7 @@ public enum Operations { } /// Remove an organization role from a user /// - /// Remove an organization role from a user. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Remove an organization role from a user. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// The authenticated user must be an administrator for the organization to use this endpoint. /// @@ -15164,210 +14569,41 @@ public enum Operations { ) { self.org = org self.username = username - self.role_id = role_id - } - } - public var path: Operations.orgs_sol_revoke_hyphen_org_hyphen_role_hyphen_user.Input.Path - /// Creates a new `Input`. - /// - /// - Parameters: - /// - path: - public init(path: Operations.orgs_sol_revoke_hyphen_org_hyphen_role_hyphen_user.Input.Path) { - self.path = path - } - } - @frozen public enum Output: Sendable, Hashable { - public struct NoContent: Sendable, Hashable { - /// Creates a new `NoContent`. - public init() {} - } - /// Response - /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/users/{username}/{role_id}/delete(orgs/revoke-org-role-user)/responses/204`. - /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.orgs_sol_revoke_hyphen_org_hyphen_role_hyphen_user.Output.NoContent) - /// The associated value of the enum case if `self` is `.noContent`. - /// - /// - Throws: An error if `self` is not `.noContent`. - /// - SeeAlso: `.noContent`. - public var noContent: Operations.orgs_sol_revoke_hyphen_org_hyphen_role_hyphen_user.Output.NoContent { - get throws { - switch self { - case let .noContent(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "noContent", - response: self - ) - } - } - } - /// Undocumented response. - /// - /// A response with a code that is not documented in the OpenAPI document. - case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) - } - } - /// Get an organization role - /// - /// Gets an organization role that is available to this organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `GET /orgs/{org}/organization-roles/{role_id}`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/get(orgs/get-org-role)`. - public enum orgs_sol_get_hyphen_org_hyphen_role { - public static let id: Swift.String = "orgs/get-org-role" - public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/GET/path`. - public struct Path: Sendable, Hashable { - /// The organization name. The name is not case sensitive. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/GET/path/org`. - public var org: Components.Parameters.org - /// The unique identifier of the role. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/GET/path/role_id`. - public var role_id: Components.Parameters.role_hyphen_id - /// Creates a new `Path`. - /// - /// - Parameters: - /// - org: The organization name. The name is not case sensitive. - /// - role_id: The unique identifier of the role. - public init( - org: Components.Parameters.org, - role_id: Components.Parameters.role_hyphen_id - ) { - self.org = org - self.role_id = role_id - } - } - public var path: Operations.orgs_sol_get_hyphen_org_hyphen_role.Input.Path - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/GET/header`. - public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] - /// Creates a new `Headers`. - /// - /// - Parameters: - /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { - self.accept = accept - } - } - public var headers: Operations.orgs_sol_get_hyphen_org_hyphen_role.Input.Headers - /// Creates a new `Input`. - /// - /// - Parameters: - /// - path: - /// - headers: - public init( - path: Operations.orgs_sol_get_hyphen_org_hyphen_role.Input.Path, - headers: Operations.orgs_sol_get_hyphen_org_hyphen_role.Input.Headers = .init() - ) { - self.path = path - self.headers = headers - } - } - @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/GET/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/GET/responses/200/content/application\/json`. - case json(Components.Schemas.organization_hyphen_role) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Components.Schemas.organization_hyphen_role { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.orgs_sol_get_hyphen_org_hyphen_role.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.orgs_sol_get_hyphen_org_hyphen_role.Output.Ok.Body) { - self.body = body - } - } - /// Response - /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/get(orgs/get-org-role)/responses/200`. - /// - /// HTTP response code: `200 ok`. - case ok(Operations.orgs_sol_get_hyphen_org_hyphen_role.Output.Ok) - /// The associated value of the enum case if `self` is `.ok`. - /// - /// - Throws: An error if `self` is not `.ok`. - /// - SeeAlso: `.ok`. - public var ok: Operations.orgs_sol_get_hyphen_org_hyphen_role.Output.Ok { - get throws { - switch self { - case let .ok(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "ok", - response: self - ) - } + self.role_id = role_id } } - /// Resource not found - /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/get(orgs/get-org-role)/responses/404`. - /// - /// HTTP response code: `404 notFound`. - case notFound(Components.Responses.not_found) - /// The associated value of the enum case if `self` is `.notFound`. + public var path: Operations.orgs_sol_revoke_hyphen_org_hyphen_role_hyphen_user.Input.Path + /// Creates a new `Input`. /// - /// - Throws: An error if `self` is not `.notFound`. - /// - SeeAlso: `.notFound`. - public var notFound: Components.Responses.not_found { - get throws { - switch self { - case let .notFound(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "notFound", - response: self - ) - } - } + /// - Parameters: + /// - path: + public init(path: Operations.orgs_sol_revoke_hyphen_org_hyphen_role_hyphen_user.Input.Path) { + self.path = path } - /// Validation failed, or the endpoint has been spammed. + } + @frozen public enum Output: Sendable, Hashable { + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} + } + /// Response /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/get(orgs/get-org-role)/responses/422`. + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/users/{username}/{role_id}/delete(orgs/revoke-org-role-user)/responses/204`. /// - /// HTTP response code: `422 unprocessableContent`. - case unprocessableContent(Components.Responses.validation_failed) - /// The associated value of the enum case if `self` is `.unprocessableContent`. + /// HTTP response code: `204 noContent`. + case noContent(Operations.orgs_sol_revoke_hyphen_org_hyphen_role_hyphen_user.Output.NoContent) + /// The associated value of the enum case if `self` is `.noContent`. /// - /// - Throws: An error if `self` is not `.unprocessableContent`. - /// - SeeAlso: `.unprocessableContent`. - public var unprocessableContent: Components.Responses.validation_failed { + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.orgs_sol_revoke_hyphen_org_hyphen_role_hyphen_user.Output.NoContent { get throws { switch self { - case let .unprocessableContent(response): + case let .noContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "unprocessableContent", + expectedStatus: "noContent", response: self ) } @@ -15378,58 +14614,32 @@ public enum Operations { /// A response with a code that is not documented in the OpenAPI document. case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) } - @frozen public enum AcceptableContentType: AcceptableProtocol { - case json - case other(Swift.String) - public init?(rawValue: Swift.String) { - switch rawValue.lowercased() { - case "application/json": - self = .json - default: - self = .other(rawValue) - } - } - public var rawValue: Swift.String { - switch self { - case let .other(string): - return string - case .json: - return "application/json" - } - } - public static var allCases: [Self] { - [ - .json - ] - } - } } - /// Update a custom organization role - /// - /// Updates an existing custom organization role. Permission changes will apply to all assignees. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Get an organization role /// + /// Gets an organization role that is available to this organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, the authenticated user must be one of: /// /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. + /// - A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization. /// /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. /// - /// - Remark: HTTP `PATCH /orgs/{org}/organization-roles/{role_id}`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/patch(orgs/patch-custom-organization-role)`. - public enum orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role { - public static let id: Swift.String = "orgs/patch-custom-organization-role" + /// - Remark: HTTP `GET /orgs/{org}/organization-roles/{role_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/get(orgs/get-org-role)`. + public enum orgs_sol_get_hyphen_org_hyphen_role { + public static let id: Swift.String = "orgs/get-org-role" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/PATCH/path`. + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/GET/path`. public struct Path: Sendable, Hashable { /// The organization name. The name is not case sensitive. /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/PATCH/path/org`. + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/GET/path/org`. public var org: Components.Parameters.org /// The unique identifier of the role. /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/PATCH/path/role_id`. + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/GET/path/role_id`. public var role_id: Components.Parameters.role_hyphen_id /// Creates a new `Path`. /// @@ -15444,81 +14654,37 @@ public enum Operations { self.role_id = role_id } } - public var path: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Input.Path - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/PATCH/header`. + public var path: Operations.orgs_sol_get_hyphen_org_hyphen_role.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Input.Headers - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/PATCH/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/PATCH/requestBody/json`. - public struct jsonPayload: Codable, Hashable, Sendable { - /// The name of the custom role. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/PATCH/requestBody/json/name`. - public var name: Swift.String? - /// A short description about the intended usage of this role or what permissions it grants. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/PATCH/requestBody/json/description`. - public var description: Swift.String? - /// A list of additional permissions included in this role. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/PATCH/requestBody/json/permissions`. - public var permissions: [Swift.String]? - /// Creates a new `jsonPayload`. - /// - /// - Parameters: - /// - name: The name of the custom role. - /// - description: A short description about the intended usage of this role or what permissions it grants. - /// - permissions: A list of additional permissions included in this role. - public init( - name: Swift.String? = nil, - description: Swift.String? = nil, - permissions: [Swift.String]? = nil - ) { - self.name = name - self.description = description - self.permissions = permissions - } - public enum CodingKeys: String, CodingKey { - case name - case description - case permissions - } - } - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/PATCH/requestBody/content/application\/json`. - case json(Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Input.Body.jsonPayload) - } - public var body: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Input.Body + public var headers: Operations.orgs_sol_get_hyphen_org_hyphen_role.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: - /// - body: public init( - path: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Input.Path, - headers: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Input.Headers = .init(), - body: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Input.Body + path: Operations.orgs_sol_get_hyphen_org_hyphen_role.Input.Path, + headers: Operations.orgs_sol_get_hyphen_org_hyphen_role.Input.Headers = .init() ) { self.path = path self.headers = headers - self.body = body } } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/PATCH/responses/200/content`. + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/PATCH/responses/200/content/application\/json`. + /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/GET/responses/200/content/application\/json`. case json(Components.Schemas.organization_hyphen_role) /// The associated value of the enum case if `self` is `.json`. /// @@ -15534,26 +14700,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Output.Ok.Body + public var body: Operations.orgs_sol_get_hyphen_org_hyphen_role.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Output.Ok.Body) { + public init(body: Operations.orgs_sol_get_hyphen_org_hyphen_role.Output.Ok.Body) { self.body = body } } /// Response /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/patch(orgs/patch-custom-organization-role)/responses/200`. + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/get(orgs/get-org-role)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Output.Ok) + case ok(Operations.orgs_sol_get_hyphen_org_hyphen_role.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. - public var ok: Operations.orgs_sol_patch_hyphen_custom_hyphen_organization_hyphen_role.Output.Ok { + public var ok: Operations.orgs_sol_get_hyphen_org_hyphen_role.Output.Ok { get throws { switch self { case let .ok(response): @@ -15566,70 +14732,47 @@ public enum Operations { } } } - /// Validation failed, or the endpoint has been spammed. - /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/patch(orgs/patch-custom-organization-role)/responses/422`. - /// - /// HTTP response code: `422 unprocessableContent`. - case unprocessableContent(Components.Responses.validation_failed) - /// The associated value of the enum case if `self` is `.unprocessableContent`. - /// - /// - Throws: An error if `self` is not `.unprocessableContent`. - /// - SeeAlso: `.unprocessableContent`. - public var unprocessableContent: Components.Responses.validation_failed { - get throws { - switch self { - case let .unprocessableContent(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "unprocessableContent", - response: self - ) - } - } - } - /// Conflict + /// Resource not found /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/patch(orgs/patch-custom-organization-role)/responses/409`. + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/get(orgs/get-org-role)/responses/404`. /// - /// HTTP response code: `409 conflict`. - case conflict(Components.Responses.conflict) - /// The associated value of the enum case if `self` is `.conflict`. + /// HTTP response code: `404 notFound`. + case notFound(Components.Responses.not_found) + /// The associated value of the enum case if `self` is `.notFound`. /// - /// - Throws: An error if `self` is not `.conflict`. - /// - SeeAlso: `.conflict`. - public var conflict: Components.Responses.conflict { + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { get throws { switch self { - case let .conflict(response): + case let .notFound(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "conflict", + expectedStatus: "notFound", response: self ) } } } - /// Resource not found + /// Validation failed, or the endpoint has been spammed. /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/patch(orgs/patch-custom-organization-role)/responses/404`. + /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/get(orgs/get-org-role)/responses/422`. /// - /// HTTP response code: `404 notFound`. - case notFound(Components.Responses.not_found) - /// The associated value of the enum case if `self` is `.notFound`. + /// HTTP response code: `422 unprocessableContent`. + case unprocessableContent(Components.Responses.validation_failed) + /// The associated value of the enum case if `self` is `.unprocessableContent`. /// - /// - Throws: An error if `self` is not `.notFound`. - /// - SeeAlso: `.notFound`. - public var notFound: Components.Responses.not_found { + /// - Throws: An error if `self` is not `.unprocessableContent`. + /// - SeeAlso: `.unprocessableContent`. + public var unprocessableContent: Components.Responses.validation_failed { get throws { switch self { - case let .notFound(response): + case let .unprocessableContent(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "notFound", + expectedStatus: "unprocessableContent", response: self ) } @@ -15666,91 +14809,9 @@ public enum Operations { } } } - /// Delete a custom organization role. - /// - /// Deletes a custom organization role. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - /// - /// To use this endpoint, the authenticated user must be one of: - /// - /// - An administrator for the organization. - /// - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. - /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - /// - /// - Remark: HTTP `DELETE /orgs/{org}/organization-roles/{role_id}`. - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/delete(orgs/delete-custom-organization-role)`. - public enum orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role { - public static let id: Swift.String = "orgs/delete-custom-organization-role" - public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/DELETE/path`. - public struct Path: Sendable, Hashable { - /// The organization name. The name is not case sensitive. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/DELETE/path/org`. - public var org: Components.Parameters.org - /// The unique identifier of the role. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/organization-roles/{role_id}/DELETE/path/role_id`. - public var role_id: Components.Parameters.role_hyphen_id - /// Creates a new `Path`. - /// - /// - Parameters: - /// - org: The organization name. The name is not case sensitive. - /// - role_id: The unique identifier of the role. - public init( - org: Components.Parameters.org, - role_id: Components.Parameters.role_hyphen_id - ) { - self.org = org - self.role_id = role_id - } - } - public var path: Operations.orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role.Input.Path - /// Creates a new `Input`. - /// - /// - Parameters: - /// - path: - public init(path: Operations.orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role.Input.Path) { - self.path = path - } - } - @frozen public enum Output: Sendable, Hashable { - public struct NoContent: Sendable, Hashable { - /// Creates a new `NoContent`. - public init() {} - } - /// Response - /// - /// - Remark: Generated from `#/paths//orgs/{org}/organization-roles/{role_id}/delete(orgs/delete-custom-organization-role)/responses/204`. - /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role.Output.NoContent) - /// The associated value of the enum case if `self` is `.noContent`. - /// - /// - Throws: An error if `self` is not `.noContent`. - /// - SeeAlso: `.noContent`. - public var noContent: Operations.orgs_sol_delete_hyphen_custom_hyphen_organization_hyphen_role.Output.NoContent { - get throws { - switch self { - case let .noContent(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "noContent", - response: self - ) - } - } - } - /// Undocumented response. - /// - /// A response with a code that is not documented in the OpenAPI document. - case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) - } - } /// List teams that are assigned to an organization role /// - /// Lists the teams that are assigned to an organization role. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Lists the teams that are assigned to an organization role. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, you must be an administrator for the organization. /// @@ -15995,7 +15056,7 @@ public enum Operations { } /// List users that are assigned to an organization role /// - /// Lists organization members that are assigned to an organization role. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + /// Lists organization members that are assigned to an organization role. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." /// /// To use this endpoint, you must be an administrator for the organization. /// @@ -21308,6 +20369,9 @@ public enum Operations { } /// Enable or disable a security feature for an organization /// + /// > [!WARNING] + /// > **Deprecation notice:** The ability to enable or disable a security feature for all eligible repositories in an organization is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. For more information, see the [changelog](https://github.blog/changelog/2024-07-22-deprecation-api-endpoint-to-enable-or-disable-a-security-feature-for-an-organization/). + /// /// Enables or disables the specified security feature for all eligible repositories in an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// /// The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint. From 7467f92283b3bb9da9481b204cd5ef2855ab459b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 22 Jul 2024 21:53:05 +0000 Subject: [PATCH 100/152] Commit via running ake Sources/pulls --- Sources/pulls/Client.swift | 12 ++++++------ Sources/pulls/Types.swift | 36 ++++++++++++++++++------------------ 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Sources/pulls/Client.swift b/Sources/pulls/Client.swift index 421e5b6991e..0d806b85bb7 100644 --- a/Sources/pulls/Client.swift +++ b/Sources/pulls/Client.swift @@ -1478,8 +1478,8 @@ public struct Client: APIProtocol { /// /// Lists the files in a specified pull request. /// - /// **Note:** Responses include a maximum of 3000 files. The paginated response - /// returns 30 files per page by default. + /// > [!NOTE] + /// > Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// @@ -2246,7 +2246,8 @@ public struct Client: APIProtocol { /// /// Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls/reviews#submit-a-review-for-a-pull-request)." /// - /// **Note:** To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the `application/vnd.github.v3.diff` media type to the `Accept` header of a call to the [Get a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) endpoint. + /// > [!NOTE] + /// > To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the `application/vnd.github.v3.diff` media type to the `Accept` header of a call to the [Get a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) endpoint. /// /// The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. /// @@ -2815,9 +2816,8 @@ public struct Client: APIProtocol { /// /// Dismisses a specified review on a pull request. /// - /// **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/branches/branch-protection), - /// you must be a repository administrator or be included in the list of people or teams - /// who can dismiss pull request reviews. + /// > [!NOTE] + /// > To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/branches/branch-protection), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// diff --git a/Sources/pulls/Types.swift b/Sources/pulls/Types.swift index 719cf194fee..666917176c8 100644 --- a/Sources/pulls/Types.swift +++ b/Sources/pulls/Types.swift @@ -217,8 +217,8 @@ public protocol APIProtocol: Sendable { /// /// Lists the files in a specified pull request. /// - /// **Note:** Responses include a maximum of 3000 files. The paginated response - /// returns 30 files per page by default. + /// > [!NOTE] + /// > Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// @@ -289,7 +289,8 @@ public protocol APIProtocol: Sendable { /// /// Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls/reviews#submit-a-review-for-a-pull-request)." /// - /// **Note:** To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the `application/vnd.github.v3.diff` media type to the `Accept` header of a call to the [Get a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) endpoint. + /// > [!NOTE] + /// > To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the `application/vnd.github.v3.diff` media type to the `Accept` header of a call to the [Get a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) endpoint. /// /// The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. /// @@ -363,9 +364,8 @@ public protocol APIProtocol: Sendable { /// /// Dismisses a specified review on a pull request. /// - /// **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/branches/branch-protection), - /// you must be a repository administrator or be included in the list of people or teams - /// who can dismiss pull request reviews. + /// > [!NOTE] + /// > To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/branches/branch-protection), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// @@ -722,8 +722,8 @@ extension APIProtocol { /// /// Lists the files in a specified pull request. /// - /// **Note:** Responses include a maximum of 3000 files. The paginated response - /// returns 30 files per page by default. + /// > [!NOTE] + /// > Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// @@ -854,7 +854,8 @@ extension APIProtocol { /// /// Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls/reviews#submit-a-review-for-a-pull-request)." /// - /// **Note:** To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the `application/vnd.github.v3.diff` media type to the `Accept` header of a call to the [Get a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) endpoint. + /// > [!NOTE] + /// > To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the `application/vnd.github.v3.diff` media type to the `Accept` header of a call to the [Get a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) endpoint. /// /// The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. /// @@ -974,9 +975,8 @@ extension APIProtocol { /// /// Dismisses a specified review on a pull request. /// - /// **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/branches/branch-protection), - /// you must be a repository administrator or be included in the list of people or teams - /// who can dismiss pull request reviews. + /// > [!NOTE] + /// > To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/branches/branch-protection), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// @@ -9938,8 +9938,8 @@ public enum Operations { /// /// Lists the files in a specified pull request. /// - /// **Note:** Responses include a maximum of 3000 files. The paginated response - /// returns 30 files per page by default. + /// > [!NOTE] + /// > Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// @@ -11588,7 +11588,8 @@ public enum Operations { /// /// Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls/reviews#submit-a-review-for-a-pull-request)." /// - /// **Note:** To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the `application/vnd.github.v3.diff` media type to the `Accept` header of a call to the [Get a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) endpoint. + /// > [!NOTE] + /// > To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the `application/vnd.github.v3.diff` media type to the `Accept` header of a call to the [Get a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) endpoint. /// /// The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. /// @@ -12751,9 +12752,8 @@ public enum Operations { /// /// Dismisses a specified review on a pull request. /// - /// **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/branches/branch-protection), - /// you must be a repository administrator or be included in the list of people or teams - /// who can dismiss pull request reviews. + /// > [!NOTE] + /// > To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/branches/branch-protection), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." /// From 33e5602c18d4555b60e760f1e92f4762ac001fb4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 22 Jul 2024 21:53:26 +0000 Subject: [PATCH 101/152] Commit via running ake Sources/rate-limit --- Sources/rate-limit/Client.swift | 6 ++++-- Sources/rate-limit/Types.swift | 18 ++++++++++++------ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Sources/rate-limit/Client.swift b/Sources/rate-limit/Client.swift index 343a675a408..5cfda7888c1 100644 --- a/Sources/rate-limit/Client.swift +++ b/Sources/rate-limit/Client.swift @@ -40,7 +40,8 @@ public struct Client: APIProtocol { } /// Get rate limit status for the authenticated user /// - /// **Note:** Accessing this endpoint does not count against your REST API rate limit. + /// > [!NOTE] + /// > Accessing this endpoint does not count against your REST API rate limit. /// /// Some categories of endpoints have custom rate limits that are separate from the rate limit governing the other REST API endpoints. For this reason, the API response categorizes your rate limit. Under `resources`, you'll see objects relating to different categories: /// * The `core` object provides your rate limit status for all non-search-related resources in the REST API. @@ -53,7 +54,8 @@ public struct Client: APIProtocol { /// * The `actions_runner_registration` object provides your rate limit status for registering self-hosted runners in GitHub Actions. For more information, see "[Self-hosted runners](https://docs.github.com/rest/actions/self-hosted-runners)." /// * The `source_import` object is no longer in use for any API endpoints, and it will be removed in the next API version. For more information about API versions, see "[API Versions](https://docs.github.com/rest/about-the-rest-api/api-versions)." /// - /// **Note:** The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. + /// > [!NOTE] + /// > The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. /// /// - Remark: HTTP `GET /rate_limit`. /// - Remark: Generated from `#/paths//rate_limit/get(rate-limit/get)`. diff --git a/Sources/rate-limit/Types.swift b/Sources/rate-limit/Types.swift index cedd3ad37c7..dc38c7028d0 100644 --- a/Sources/rate-limit/Types.swift +++ b/Sources/rate-limit/Types.swift @@ -13,7 +13,8 @@ import struct Foundation.Date public protocol APIProtocol: Sendable { /// Get rate limit status for the authenticated user /// - /// **Note:** Accessing this endpoint does not count against your REST API rate limit. + /// > [!NOTE] + /// > Accessing this endpoint does not count against your REST API rate limit. /// /// Some categories of endpoints have custom rate limits that are separate from the rate limit governing the other REST API endpoints. For this reason, the API response categorizes your rate limit. Under `resources`, you'll see objects relating to different categories: /// * The `core` object provides your rate limit status for all non-search-related resources in the REST API. @@ -26,7 +27,8 @@ public protocol APIProtocol: Sendable { /// * The `actions_runner_registration` object provides your rate limit status for registering self-hosted runners in GitHub Actions. For more information, see "[Self-hosted runners](https://docs.github.com/rest/actions/self-hosted-runners)." /// * The `source_import` object is no longer in use for any API endpoints, and it will be removed in the next API version. For more information about API versions, see "[API Versions](https://docs.github.com/rest/about-the-rest-api/api-versions)." /// - /// **Note:** The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. + /// > [!NOTE] + /// > The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. /// /// - Remark: HTTP `GET /rate_limit`. /// - Remark: Generated from `#/paths//rate_limit/get(rate-limit/get)`. @@ -37,7 +39,8 @@ public protocol APIProtocol: Sendable { extension APIProtocol { /// Get rate limit status for the authenticated user /// - /// **Note:** Accessing this endpoint does not count against your REST API rate limit. + /// > [!NOTE] + /// > Accessing this endpoint does not count against your REST API rate limit. /// /// Some categories of endpoints have custom rate limits that are separate from the rate limit governing the other REST API endpoints. For this reason, the API response categorizes your rate limit. Under `resources`, you'll see objects relating to different categories: /// * The `core` object provides your rate limit status for all non-search-related resources in the REST API. @@ -50,7 +53,8 @@ extension APIProtocol { /// * The `actions_runner_registration` object provides your rate limit status for registering self-hosted runners in GitHub Actions. For more information, see "[Self-hosted runners](https://docs.github.com/rest/actions/self-hosted-runners)." /// * The `source_import` object is no longer in use for any API endpoints, and it will be removed in the next API version. For more information about API versions, see "[API Versions](https://docs.github.com/rest/about-the-rest-api/api-versions)." /// - /// **Note:** The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. + /// > [!NOTE] + /// > The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. /// /// - Remark: HTTP `GET /rate_limit`. /// - Remark: Generated from `#/paths//rate_limit/get(rate-limit/get)`. @@ -296,7 +300,8 @@ public enum Components { public enum Operations { /// Get rate limit status for the authenticated user /// - /// **Note:** Accessing this endpoint does not count against your REST API rate limit. + /// > [!NOTE] + /// > Accessing this endpoint does not count against your REST API rate limit. /// /// Some categories of endpoints have custom rate limits that are separate from the rate limit governing the other REST API endpoints. For this reason, the API response categorizes your rate limit. Under `resources`, you'll see objects relating to different categories: /// * The `core` object provides your rate limit status for all non-search-related resources in the REST API. @@ -309,7 +314,8 @@ public enum Operations { /// * The `actions_runner_registration` object provides your rate limit status for registering self-hosted runners in GitHub Actions. For more information, see "[Self-hosted runners](https://docs.github.com/rest/actions/self-hosted-runners)." /// * The `source_import` object is no longer in use for any API endpoints, and it will be removed in the next API version. For more information about API versions, see "[API Versions](https://docs.github.com/rest/about-the-rest-api/api-versions)." /// - /// **Note:** The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. + /// > [!NOTE] + /// > The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. /// /// - Remark: HTTP `GET /rate_limit`. /// - Remark: Generated from `#/paths//rate_limit/get(rate-limit/get)`. From 6c995338dbd75af3ce97037766d680796b61805b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 22 Jul 2024 21:53:47 +0000 Subject: [PATCH 102/152] Commit via running ake Sources/reactions --- Sources/reactions/Client.swift | 45 +++++++---- Sources/reactions/Types.swift | 135 ++++++++++++++++++++++----------- 2 files changed, 120 insertions(+), 60 deletions(-) diff --git a/Sources/reactions/Client.swift b/Sources/reactions/Client.swift index b8abadb7cb1..21656304d0d 100644 --- a/Sources/reactions/Client.swift +++ b/Sources/reactions/Client.swift @@ -42,7 +42,8 @@ public struct Client: APIProtocol { /// /// List the reactions to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -144,7 +145,8 @@ public struct Client: APIProtocol { /// /// A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -244,7 +246,8 @@ public struct Client: APIProtocol { } /// Delete team discussion comment reaction /// - /// **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. /// /// Delete a reaction to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -294,7 +297,8 @@ public struct Client: APIProtocol { /// /// List the reactions to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -395,7 +399,8 @@ public struct Client: APIProtocol { /// /// A response with an HTTP `200` status means that you already added the reaction type to this team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -494,7 +499,8 @@ public struct Client: APIProtocol { } /// Delete team discussion reaction /// - /// **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. /// /// Delete a reaction to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// @@ -777,7 +783,8 @@ public struct Client: APIProtocol { } /// Delete a commit comment reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. /// /// Delete a reaction to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment). /// @@ -1058,7 +1065,8 @@ public struct Client: APIProtocol { } /// Delete an issue comment reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. /// /// Delete a reaction to an [issue comment](https://docs.github.com/rest/issues/comments#get-an-issue-comment). /// @@ -1361,7 +1369,8 @@ public struct Client: APIProtocol { } /// Delete an issue reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. /// /// Delete a reaction to an [issue](https://docs.github.com/rest/issues/issues#get-an-issue). /// @@ -1642,7 +1651,8 @@ public struct Client: APIProtocol { } /// Delete a pull request comment reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` /// /// Delete a reaction to a [pull request review comment](https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request). /// @@ -1923,7 +1933,8 @@ public struct Client: APIProtocol { } /// Delete a release reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. /// /// Delete a reaction to a [release](https://docs.github.com/rest/releases/releases#get-a-release). /// @@ -1968,7 +1979,8 @@ public struct Client: APIProtocol { } /// List reactions for a team discussion comment (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion-comment) endpoint. /// /// List the reactions to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -2068,7 +2080,8 @@ public struct Client: APIProtocol { } /// Create reaction for a team discussion comment (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. /// /// Create a reaction to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -2150,7 +2163,8 @@ public struct Client: APIProtocol { } /// List reactions for a team discussion (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion) endpoint. /// /// List the reactions to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// @@ -2249,7 +2263,8 @@ public struct Client: APIProtocol { } /// Create reaction for a team discussion (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion) endpoint. /// /// Create a reaction to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// diff --git a/Sources/reactions/Types.swift b/Sources/reactions/Types.swift index 442c25ef1e7..e4eb68d7d2a 100644 --- a/Sources/reactions/Types.swift +++ b/Sources/reactions/Types.swift @@ -15,7 +15,8 @@ public protocol APIProtocol: Sendable { /// /// List the reactions to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -28,7 +29,8 @@ public protocol APIProtocol: Sendable { /// /// A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -37,7 +39,8 @@ public protocol APIProtocol: Sendable { func reactions_sol_create_hyphen_for_hyphen_team_hyphen_discussion_hyphen_comment_hyphen_in_hyphen_org(_ input: Operations.reactions_sol_create_hyphen_for_hyphen_team_hyphen_discussion_hyphen_comment_hyphen_in_hyphen_org.Input) async throws -> Operations.reactions_sol_create_hyphen_for_hyphen_team_hyphen_discussion_hyphen_comment_hyphen_in_hyphen_org.Output /// Delete team discussion comment reaction /// - /// **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. /// /// Delete a reaction to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -50,7 +53,8 @@ public protocol APIProtocol: Sendable { /// /// List the reactions to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -63,7 +67,8 @@ public protocol APIProtocol: Sendable { /// /// A response with an HTTP `200` status means that you already added the reaction type to this team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -72,7 +77,8 @@ public protocol APIProtocol: Sendable { func reactions_sol_create_hyphen_for_hyphen_team_hyphen_discussion_hyphen_in_hyphen_org(_ input: Operations.reactions_sol_create_hyphen_for_hyphen_team_hyphen_discussion_hyphen_in_hyphen_org.Input) async throws -> Operations.reactions_sol_create_hyphen_for_hyphen_team_hyphen_discussion_hyphen_in_hyphen_org.Output /// Delete team discussion reaction /// - /// **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. /// /// Delete a reaction to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// @@ -97,7 +103,8 @@ public protocol APIProtocol: Sendable { func reactions_sol_create_hyphen_for_hyphen_commit_hyphen_comment(_ input: Operations.reactions_sol_create_hyphen_for_hyphen_commit_hyphen_comment.Input) async throws -> Operations.reactions_sol_create_hyphen_for_hyphen_commit_hyphen_comment.Output /// Delete a commit comment reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. /// /// Delete a reaction to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment). /// @@ -120,7 +127,8 @@ public protocol APIProtocol: Sendable { func reactions_sol_create_hyphen_for_hyphen_issue_hyphen_comment(_ input: Operations.reactions_sol_create_hyphen_for_hyphen_issue_hyphen_comment.Input) async throws -> Operations.reactions_sol_create_hyphen_for_hyphen_issue_hyphen_comment.Output /// Delete an issue comment reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. /// /// Delete a reaction to an [issue comment](https://docs.github.com/rest/issues/comments#get-an-issue-comment). /// @@ -143,7 +151,8 @@ public protocol APIProtocol: Sendable { func reactions_sol_create_hyphen_for_hyphen_issue(_ input: Operations.reactions_sol_create_hyphen_for_hyphen_issue.Input) async throws -> Operations.reactions_sol_create_hyphen_for_hyphen_issue.Output /// Delete an issue reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. /// /// Delete a reaction to an [issue](https://docs.github.com/rest/issues/issues#get-an-issue). /// @@ -166,7 +175,8 @@ public protocol APIProtocol: Sendable { func reactions_sol_create_hyphen_for_hyphen_pull_hyphen_request_hyphen_review_hyphen_comment(_ input: Operations.reactions_sol_create_hyphen_for_hyphen_pull_hyphen_request_hyphen_review_hyphen_comment.Input) async throws -> Operations.reactions_sol_create_hyphen_for_hyphen_pull_hyphen_request_hyphen_review_hyphen_comment.Output /// Delete a pull request comment reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` /// /// Delete a reaction to a [pull request review comment](https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request). /// @@ -189,7 +199,8 @@ public protocol APIProtocol: Sendable { func reactions_sol_create_hyphen_for_hyphen_release(_ input: Operations.reactions_sol_create_hyphen_for_hyphen_release.Input) async throws -> Operations.reactions_sol_create_hyphen_for_hyphen_release.Output /// Delete a release reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. /// /// Delete a reaction to a [release](https://docs.github.com/rest/releases/releases#get-a-release). /// @@ -198,7 +209,8 @@ public protocol APIProtocol: Sendable { func reactions_sol_delete_hyphen_for_hyphen_release(_ input: Operations.reactions_sol_delete_hyphen_for_hyphen_release.Input) async throws -> Operations.reactions_sol_delete_hyphen_for_hyphen_release.Output /// List reactions for a team discussion comment (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion-comment) endpoint. /// /// List the reactions to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -210,7 +222,8 @@ public protocol APIProtocol: Sendable { func reactions_sol_list_hyphen_for_hyphen_team_hyphen_discussion_hyphen_comment_hyphen_legacy(_ input: Operations.reactions_sol_list_hyphen_for_hyphen_team_hyphen_discussion_hyphen_comment_hyphen_legacy.Input) async throws -> Operations.reactions_sol_list_hyphen_for_hyphen_team_hyphen_discussion_hyphen_comment_hyphen_legacy.Output /// Create reaction for a team discussion comment (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. /// /// Create a reaction to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -224,7 +237,8 @@ public protocol APIProtocol: Sendable { func reactions_sol_create_hyphen_for_hyphen_team_hyphen_discussion_hyphen_comment_hyphen_legacy(_ input: Operations.reactions_sol_create_hyphen_for_hyphen_team_hyphen_discussion_hyphen_comment_hyphen_legacy.Input) async throws -> Operations.reactions_sol_create_hyphen_for_hyphen_team_hyphen_discussion_hyphen_comment_hyphen_legacy.Output /// List reactions for a team discussion (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion) endpoint. /// /// List the reactions to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// @@ -236,7 +250,8 @@ public protocol APIProtocol: Sendable { func reactions_sol_list_hyphen_for_hyphen_team_hyphen_discussion_hyphen_legacy(_ input: Operations.reactions_sol_list_hyphen_for_hyphen_team_hyphen_discussion_hyphen_legacy.Input) async throws -> Operations.reactions_sol_list_hyphen_for_hyphen_team_hyphen_discussion_hyphen_legacy.Output /// Create reaction for a team discussion (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion) endpoint. /// /// Create a reaction to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// @@ -256,7 +271,8 @@ extension APIProtocol { /// /// List the reactions to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -279,7 +295,8 @@ extension APIProtocol { /// /// A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -298,7 +315,8 @@ extension APIProtocol { } /// Delete team discussion comment reaction /// - /// **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. /// /// Delete a reaction to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -313,7 +331,8 @@ extension APIProtocol { /// /// List the reactions to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -336,7 +355,8 @@ extension APIProtocol { /// /// A response with an HTTP `200` status means that you already added the reaction type to this team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -355,7 +375,8 @@ extension APIProtocol { } /// Delete team discussion reaction /// - /// **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. /// /// Delete a reaction to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// @@ -402,7 +423,8 @@ extension APIProtocol { } /// Delete a commit comment reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. /// /// Delete a reaction to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment). /// @@ -447,7 +469,8 @@ extension APIProtocol { } /// Delete an issue comment reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. /// /// Delete a reaction to an [issue comment](https://docs.github.com/rest/issues/comments#get-an-issue-comment). /// @@ -492,7 +515,8 @@ extension APIProtocol { } /// Delete an issue reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. /// /// Delete a reaction to an [issue](https://docs.github.com/rest/issues/issues#get-an-issue). /// @@ -537,7 +561,8 @@ extension APIProtocol { } /// Delete a pull request comment reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` /// /// Delete a reaction to a [pull request review comment](https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request). /// @@ -582,7 +607,8 @@ extension APIProtocol { } /// Delete a release reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. /// /// Delete a reaction to a [release](https://docs.github.com/rest/releases/releases#get-a-release). /// @@ -593,7 +619,8 @@ extension APIProtocol { } /// List reactions for a team discussion comment (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion-comment) endpoint. /// /// List the reactions to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -615,7 +642,8 @@ extension APIProtocol { } /// Create reaction for a team discussion comment (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. /// /// Create a reaction to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -639,7 +667,8 @@ extension APIProtocol { } /// List reactions for a team discussion (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion) endpoint. /// /// List the reactions to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// @@ -661,7 +690,8 @@ extension APIProtocol { } /// Create reaction for a team discussion (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion) endpoint. /// /// Create a reaction to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// @@ -1216,7 +1246,8 @@ public enum Operations { /// /// List the reactions to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -1441,7 +1472,8 @@ public enum Operations { /// /// A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -1688,7 +1720,8 @@ public enum Operations { } /// Delete team discussion comment reaction /// - /// **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. /// /// Delete a reaction to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -1790,7 +1823,8 @@ public enum Operations { /// /// List the reactions to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -2008,7 +2042,8 @@ public enum Operations { /// /// A response with an HTTP `200` status means that you already added the reaction type to this team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -2248,7 +2283,8 @@ public enum Operations { } /// Delete team discussion reaction /// - /// **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. /// /// Delete a reaction to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// @@ -2837,7 +2873,8 @@ public enum Operations { } /// Delete a commit comment reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. /// /// Delete a reaction to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment). /// @@ -3424,7 +3461,8 @@ public enum Operations { } /// Delete an issue comment reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. /// /// Delete a reaction to an [issue comment](https://docs.github.com/rest/issues/comments#get-an-issue-comment). /// @@ -4034,7 +4072,8 @@ public enum Operations { } /// Delete an issue reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. /// /// Delete a reaction to an [issue](https://docs.github.com/rest/issues/issues#get-an-issue). /// @@ -4621,7 +4660,8 @@ public enum Operations { } /// Delete a pull request comment reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` /// /// Delete a reaction to a [pull request review comment](https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request). /// @@ -5204,7 +5244,8 @@ public enum Operations { } /// Delete a release reaction /// - /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + /// > [!NOTE] + /// > You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. /// /// Delete a reaction to a [release](https://docs.github.com/rest/releases/releases#get-a-release). /// @@ -5295,7 +5336,8 @@ public enum Operations { } /// List reactions for a team discussion comment (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion-comment) endpoint. /// /// List the reactions to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -5511,7 +5553,8 @@ public enum Operations { } /// Create reaction for a team discussion comment (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. /// /// Create a reaction to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). /// @@ -5704,7 +5747,8 @@ public enum Operations { } /// List reactions for a team discussion (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion) endpoint. /// /// List the reactions to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// @@ -5913,7 +5957,8 @@ public enum Operations { } /// Create reaction for a team discussion (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion) endpoint. /// /// Create a reaction to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). /// From 9d59d9b5a2524bb8c26e3ca8bdfdcc70afe77265 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 22 Jul 2024 21:54:09 +0000 Subject: [PATCH 103/152] Commit via running ake Sources/repos --- Sources/repos/Client.swift | 98 +++++++---- Sources/repos/Types.swift | 336 +++++++++++++++++++++++-------------- 2 files changed, 274 insertions(+), 160 deletions(-) diff --git a/Sources/repos/Client.swift b/Sources/repos/Client.swift index bb0b59efa4e..f1f53cd307f 100644 --- a/Sources/repos/Client.swift +++ b/Sources/repos/Client.swift @@ -42,7 +42,8 @@ public struct Client: APIProtocol { /// /// Lists repositories for the specified organization. /// - /// **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + /// > [!NOTE] + /// > In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// /// - Remark: HTTP `GET /orgs/{org}/repos`. /// - Remark: Generated from `#/paths//orgs/{org}/repos/get(repos/list-for-org)`. @@ -536,6 +537,13 @@ public struct Client: APIProtocol { method: .get ) suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "ref", + value: input.query.ref + ) try converter.setQueryItemAsURI( in: &request, style: .form, @@ -1096,7 +1104,8 @@ public struct Client: APIProtocol { /// /// The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. /// - /// **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + /// > [!NOTE] + /// > In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// /// - Remark: HTTP `GET /repos/{owner}/{repo}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/get(repos/get)`. @@ -2672,9 +2681,11 @@ public struct Client: APIProtocol { /// /// Protecting a branch requires admin or owner permissions to the repository. /// - /// **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + /// > [!NOTE] + /// > Passing new arrays of `users` and `teams` replaces their previous values. /// - /// **Note**: The list of users, apps, and teams in total is limited to 100 items. + /// > [!NOTE] + /// > The list of users, apps, and teams in total is limited to 100 items. /// /// - Remark: HTTP `PUT /repos/{owner}/{repo}/branches/{branch}/protection`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/put(repos/update-branch-protection)`. @@ -3157,7 +3168,8 @@ public struct Client: APIProtocol { /// /// Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled. /// - /// **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + /// > [!NOTE] + /// > Passing new arrays of `users` and `teams` replaces their previous values. /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews/patch(repos/update-pull-request-review-protection)`. @@ -3328,7 +3340,8 @@ public struct Client: APIProtocol { /// /// When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. /// - /// **Note**: You must enable branch protection to require signed commits. + /// > [!NOTE] + /// > You must enable branch protection to require signed commits. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/required_signatures/get(repos/get-commit-signature-protection)`. @@ -4306,7 +4319,8 @@ public struct Client: APIProtocol { /// /// Lists who has access to this protected branch. /// - /// **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + /// > [!NOTE] + /// > Users, apps, and teams `restrictions` are only available for organization-owned repositories. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/restrictions/get(repos/get-access-restrictions)`. @@ -5631,7 +5645,8 @@ public struct Client: APIProtocol { /// /// Renames a branch in a repository. /// - /// **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + /// > [!NOTE] + /// > Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". /// /// The authenticated user must have push access to the branch. If the branch is the default branch, the authenticated user must also have admin or owner permissions. /// @@ -6193,7 +6208,8 @@ public struct Client: APIProtocol { /// - If the user had their own fork of the repository, the fork will be deleted. /// - If the user still has read access to the repository, open pull requests by this user from a fork will be denied. /// - /// **Note**: A user can still have access to the repository through organization permissions like base repository permissions. + /// > [!NOTE] + /// > A user can still have access to the repository through organization permissions like base repository permissions. /// /// Although the API responds immediately, the additional permission updates might take some extra time to complete in the background. /// @@ -7452,7 +7468,8 @@ public struct Client: APIProtocol { /// /// Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. /// - /// **Note:** If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + /// > [!NOTE] + /// > If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types. /// @@ -8324,7 +8341,8 @@ public struct Client: APIProtocol { /// /// Creates a new file or replaces an existing file in a repository. /// - /// **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/repos/contents/#delete-a-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + /// > [!NOTE] + /// > If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/repos/contents/#delete-a-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. The `workflow` scope is also required in order to modify files in the `.github/workflows` directory. /// @@ -8497,7 +8515,8 @@ public struct Client: APIProtocol { /// /// You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code. /// - /// **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/repos/contents/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + /// > [!NOTE] + /// > If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/repos/contents/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/contents/{path}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/contents/{path}/delete(repos/delete-file)`. @@ -9764,7 +9783,8 @@ public struct Client: APIProtocol { } /// Get an environment /// - /// **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + /// > [!NOTE] + /// > To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." /// /// Anyone with read access to the repository can use this endpoint. /// @@ -9836,9 +9856,11 @@ public struct Client: APIProtocol { /// /// Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." /// - /// **Note:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + /// > [!NOTE] + /// > To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." /// - /// **Note:** To create or update secrets for an environment, see "[GitHub Actions secrets](/rest/actions/secrets)." + /// > [!NOTE] + /// > To create or update secrets for an environment, see "[GitHub Actions secrets](/rest/actions/secrets)." /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. /// @@ -10491,7 +10513,9 @@ public struct Client: APIProtocol { } /// List custom deployment rule integrations available for an environment /// - /// Gets all custom deployment protection rule integrations that are available for an environment. Anyone with read access to the repository can use this endpoint. + /// Gets all custom deployment protection rule integrations that are available for an environment. + /// + /// The authenticated user must have admin or owner permissions to the repository to use this endpoint. /// /// For more information about environments, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)." /// @@ -10822,9 +10846,11 @@ public struct Client: APIProtocol { /// /// Create a fork for the authenticated user. /// - /// **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + /// > [!NOTE] + /// > Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). /// - /// **Note**: Although this endpoint works with GitHub Apps, the GitHub App must be installed on the destination account with access to all repositories and on the source account with access to the source repository. + /// > [!NOTE] + /// > Although this endpoint works with GitHub Apps, the GitHub App must be installed on the destination account with access to all repositories and on the source account with access to the source repository. /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/forks`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/forks/post(repos/create-fork)`. @@ -12129,7 +12155,8 @@ public struct Client: APIProtocol { /// /// This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated. /// - /// **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` + /// > [!NOTE] + /// > Previously `/repos/:owner/:repo/hooks/:hook_id/test` /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/hooks/{hook_id}/tests`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/hooks/{hook_id}/tests/post(repos/test-push-webhook)`. @@ -15596,9 +15623,8 @@ public struct Client: APIProtocol { /// /// Gets a public release with the specified release ID. /// - /// **Note:** This returns an `upload_url` key corresponding to the endpoint - /// for uploading release assets. This key is a hypermedia resource. For more information, see - /// "[Getting started with the REST API](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)." + /// > [!NOTE] + /// > This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a hypermedia resource. For more information, see "[Getting started with the REST API](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)." /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/releases/{release_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/releases/{release_id}/get(repos/get-release)`. @@ -16928,12 +16954,10 @@ public struct Client: APIProtocol { } /// Get the weekly commit activity /// - /// /// Returns a weekly aggregate of the number of additions and deletions pushed to a repository. /// - /// **Note:** This endpoint can only be used for repositories with fewer than 10,000 commits. If the repository contains - /// 10,000 or more commits, a 422 status code will be returned. - /// + /// > [!NOTE] + /// > This endpoint can only be used for repositories with fewer than 10,000 commits. If the repository contains 10,000 or more commits, a 422 status code will be returned. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/stats/code_frequency`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/stats/code_frequency/get(repos/get-code-frequency-stats)`. @@ -17121,7 +17145,8 @@ public struct Client: APIProtocol { /// * `d` - Number of deletions /// * `c` - Number of commits /// - /// **Note:** This endpoint will return `0` values for all addition and deletion counts in repositories with 10,000 or more commits. + /// > [!NOTE] + /// > This endpoint will return `0` values for all addition and deletion counts in repositories with 10,000 or more commits. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/stats/contributors`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/stats/contributors/get(repos/get-contributors-stats)`. @@ -17546,8 +17571,8 @@ public struct Client: APIProtocol { } /// Deprecated - List tag protection states for a repository /// - /// **Note**: This operation is deprecated and will be removed after August 30th 2024 - /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#get-all-repository-rulesets)" endpoint instead. + /// > [!WARNING] + /// > **Deprecation notice:** This operation is deprecated and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#get-all-repository-rulesets)" endpoint instead. /// /// This returns the tag protection states of a repository. /// @@ -17661,8 +17686,8 @@ public struct Client: APIProtocol { } /// Deprecated - Create a tag protection state for a repository /// - /// **Note**: This operation is deprecated and will be removed after August 30th 2024 - /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#create-a-repository-ruleset)" endpoint instead. + /// > [!WARNING] + /// > **Deprecation notice:** This operation is deprecated and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#create-a-repository-ruleset)" endpoint instead. /// /// This creates a tag protection state for a repository. /// This endpoint is only available to repository administrators. @@ -17784,8 +17809,8 @@ public struct Client: APIProtocol { } /// Deprecated - Delete a tag protection state for a repository /// - /// **Note**: This operation is deprecated and will be removed after August 30th 2024 - /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#delete-a-repository-ruleset)" endpoint instead. + /// > [!WARNING] + /// > **Deprecation notice:** This operation is deprecated and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#delete-a-repository-ruleset)" endpoint instead. /// /// This deletes a tag protection state for a repository. /// This endpoint is only available to repository administrators. @@ -17882,7 +17907,9 @@ public struct Client: APIProtocol { /// Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually /// `main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use /// the `Location` header to make a second `GET` request. - /// **Note**: For private repositories, these links are temporary and expire after five minutes. + /// + /// > [!NOTE] + /// > For private repositories, these links are temporary and expire after five minutes. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/tarball/{ref}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/tarball/{ref}/get(repos/download-tarball-archive)`. @@ -18828,7 +18855,8 @@ public struct Client: APIProtocol { /// `main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use /// the `Location` header to make a second `GET` request. /// - /// **Note**: For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. + /// > [!NOTE] + /// > For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/zipball/{ref}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/zipball/{ref}/get(repos/download-zipball-archive)`. diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index 99a89ff539b..c4b29648c8d 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -15,7 +15,8 @@ public protocol APIProtocol: Sendable { /// /// Lists repositories for the specified organization. /// - /// **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + /// > [!NOTE] + /// > In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// /// - Remark: HTTP `GET /orgs/{org}/repos`. /// - Remark: Generated from `#/paths//orgs/{org}/repos/get(repos/list-for-org)`. @@ -84,7 +85,8 @@ public protocol APIProtocol: Sendable { /// /// The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. /// - /// **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + /// > [!NOTE] + /// > In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// /// - Remark: HTTP `GET /repos/{owner}/{repo}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/get(repos/get)`. @@ -222,9 +224,11 @@ public protocol APIProtocol: Sendable { /// /// Protecting a branch requires admin or owner permissions to the repository. /// - /// **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + /// > [!NOTE] + /// > Passing new arrays of `users` and `teams` replaces their previous values. /// - /// **Note**: The list of users, apps, and teams in total is limited to 100 items. + /// > [!NOTE] + /// > The list of users, apps, and teams in total is limited to 100 items. /// /// - Remark: HTTP `PUT /repos/{owner}/{repo}/branches/{branch}/protection`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/put(repos/update-branch-protection)`. @@ -274,7 +278,8 @@ public protocol APIProtocol: Sendable { /// /// Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled. /// - /// **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + /// > [!NOTE] + /// > Passing new arrays of `users` and `teams` replaces their previous values. /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews/patch(repos/update-pull-request-review-protection)`. @@ -292,7 +297,8 @@ public protocol APIProtocol: Sendable { /// /// When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. /// - /// **Note**: You must enable branch protection to require signed commits. + /// > [!NOTE] + /// > You must enable branch protection to require signed commits. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/required_signatures/get(repos/get-commit-signature-protection)`. @@ -372,7 +378,8 @@ public protocol APIProtocol: Sendable { /// /// Lists who has access to this protected branch. /// - /// **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + /// > [!NOTE] + /// > Users, apps, and teams `restrictions` are only available for organization-owned repositories. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/restrictions/get(repos/get-access-restrictions)`. @@ -510,7 +517,8 @@ public protocol APIProtocol: Sendable { /// /// Renames a branch in a repository. /// - /// **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + /// > [!NOTE] + /// > Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". /// /// The authenticated user must have push access to the branch. If the branch is the default branch, the authenticated user must also have admin or owner permissions. /// @@ -602,7 +610,8 @@ public protocol APIProtocol: Sendable { /// - If the user had their own fork of the repository, the fork will be deleted. /// - If the user still has read access to the repository, open pull requests by this user from a fork will be denied. /// - /// **Note**: A user can still have access to the repository through organization permissions like base repository permissions. + /// > [!NOTE] + /// > A user can still have access to the repository through organization permissions like base repository permissions. /// /// Although the API responds immediately, the additional permission updates might take some extra time to complete in the background. /// @@ -759,7 +768,8 @@ public protocol APIProtocol: Sendable { /// /// Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. /// - /// **Note:** If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + /// > [!NOTE] + /// > If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types. /// @@ -930,7 +940,8 @@ public protocol APIProtocol: Sendable { /// /// Creates a new file or replaces an existing file in a repository. /// - /// **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/repos/contents/#delete-a-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + /// > [!NOTE] + /// > If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/repos/contents/#delete-a-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. The `workflow` scope is also required in order to modify files in the `.github/workflows` directory. /// @@ -947,7 +958,8 @@ public protocol APIProtocol: Sendable { /// /// You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code. /// - /// **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/repos/contents/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + /// > [!NOTE] + /// > If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/repos/contents/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/contents/{path}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/contents/{path}/delete(repos/delete-file)`. @@ -1094,7 +1106,8 @@ public protocol APIProtocol: Sendable { func repos_sol_get_hyphen_all_hyphen_environments(_ input: Operations.repos_sol_get_hyphen_all_hyphen_environments.Input) async throws -> Operations.repos_sol_get_hyphen_all_hyphen_environments.Output /// Get an environment /// - /// **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + /// > [!NOTE] + /// > To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." /// /// Anyone with read access to the repository can use this endpoint. /// @@ -1107,9 +1120,11 @@ public protocol APIProtocol: Sendable { /// /// Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." /// - /// **Note:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + /// > [!NOTE] + /// > To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." /// - /// **Note:** To create or update secrets for an environment, see "[GitHub Actions secrets](/rest/actions/secrets)." + /// > [!NOTE] + /// > To create or update secrets for an environment, see "[GitHub Actions secrets](/rest/actions/secrets)." /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. /// @@ -1198,7 +1213,9 @@ public protocol APIProtocol: Sendable { func repos_sol_create_hyphen_deployment_hyphen_protection_hyphen_rule(_ input: Operations.repos_sol_create_hyphen_deployment_hyphen_protection_hyphen_rule.Input) async throws -> Operations.repos_sol_create_hyphen_deployment_hyphen_protection_hyphen_rule.Output /// List custom deployment rule integrations available for an environment /// - /// Gets all custom deployment protection rule integrations that are available for an environment. Anyone with read access to the repository can use this endpoint. + /// Gets all custom deployment protection rule integrations that are available for an environment. + /// + /// The authenticated user must have admin or owner permissions to the repository to use this endpoint. /// /// For more information about environments, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)." /// @@ -1242,9 +1259,11 @@ public protocol APIProtocol: Sendable { /// /// Create a fork for the authenticated user. /// - /// **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + /// > [!NOTE] + /// > Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). /// - /// **Note**: Although this endpoint works with GitHub Apps, the GitHub App must be installed on the destination account with access to all repositories and on the source account with access to the source repository. + /// > [!NOTE] + /// > Although this endpoint works with GitHub Apps, the GitHub App must be installed on the destination account with access to all repositories and on the source account with access to the source repository. /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/forks`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/forks/post(repos/create-fork)`. @@ -1335,7 +1354,8 @@ public protocol APIProtocol: Sendable { /// /// This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated. /// - /// **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` + /// > [!NOTE] + /// > Previously `/repos/:owner/:repo/hooks/:hook_id/test` /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/hooks/{hook_id}/tests`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/hooks/{hook_id}/tests/post(repos/test-push-webhook)`. @@ -1657,9 +1677,8 @@ public protocol APIProtocol: Sendable { /// /// Gets a public release with the specified release ID. /// - /// **Note:** This returns an `upload_url` key corresponding to the endpoint - /// for uploading release assets. This key is a hypermedia resource. For more information, see - /// "[Getting started with the REST API](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)." + /// > [!NOTE] + /// > This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a hypermedia resource. For more information, see "[Getting started with the REST API](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)." /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/releases/{release_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/releases/{release_id}/get(repos/get-release)`. @@ -1773,12 +1792,10 @@ public protocol APIProtocol: Sendable { func repos_sol_delete_hyphen_repo_hyphen_ruleset(_ input: Operations.repos_sol_delete_hyphen_repo_hyphen_ruleset.Input) async throws -> Operations.repos_sol_delete_hyphen_repo_hyphen_ruleset.Output /// Get the weekly commit activity /// - /// /// Returns a weekly aggregate of the number of additions and deletions pushed to a repository. /// - /// **Note:** This endpoint can only be used for repositories with fewer than 10,000 commits. If the repository contains - /// 10,000 or more commits, a 422 status code will be returned. - /// + /// > [!NOTE] + /// > This endpoint can only be used for repositories with fewer than 10,000 commits. If the repository contains 10,000 or more commits, a 422 status code will be returned. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/stats/code_frequency`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/stats/code_frequency/get(repos/get-code-frequency-stats)`. @@ -1800,7 +1817,8 @@ public protocol APIProtocol: Sendable { /// * `d` - Number of deletions /// * `c` - Number of commits /// - /// **Note:** This endpoint will return `0` values for all addition and deletion counts in repositories with 10,000 or more commits. + /// > [!NOTE] + /// > This endpoint will return `0` values for all addition and deletion counts in repositories with 10,000 or more commits. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/stats/contributors`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/stats/contributors/get(repos/get-contributors-stats)`. @@ -1847,8 +1865,8 @@ public protocol APIProtocol: Sendable { func repos_sol_list_hyphen_tags(_ input: Operations.repos_sol_list_hyphen_tags.Input) async throws -> Operations.repos_sol_list_hyphen_tags.Output /// Deprecated - List tag protection states for a repository /// - /// **Note**: This operation is deprecated and will be removed after August 30th 2024 - /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#get-all-repository-rulesets)" endpoint instead. + /// > [!WARNING] + /// > **Deprecation notice:** This operation is deprecated and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#get-all-repository-rulesets)" endpoint instead. /// /// This returns the tag protection states of a repository. /// @@ -1860,8 +1878,8 @@ public protocol APIProtocol: Sendable { func repos_sol_list_hyphen_tag_hyphen_protection(_ input: Operations.repos_sol_list_hyphen_tag_hyphen_protection.Input) async throws -> Operations.repos_sol_list_hyphen_tag_hyphen_protection.Output /// Deprecated - Create a tag protection state for a repository /// - /// **Note**: This operation is deprecated and will be removed after August 30th 2024 - /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#create-a-repository-ruleset)" endpoint instead. + /// > [!WARNING] + /// > **Deprecation notice:** This operation is deprecated and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#create-a-repository-ruleset)" endpoint instead. /// /// This creates a tag protection state for a repository. /// This endpoint is only available to repository administrators. @@ -1872,8 +1890,8 @@ public protocol APIProtocol: Sendable { func repos_sol_create_hyphen_tag_hyphen_protection(_ input: Operations.repos_sol_create_hyphen_tag_hyphen_protection.Input) async throws -> Operations.repos_sol_create_hyphen_tag_hyphen_protection.Output /// Deprecated - Delete a tag protection state for a repository /// - /// **Note**: This operation is deprecated and will be removed after August 30th 2024 - /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#delete-a-repository-ruleset)" endpoint instead. + /// > [!WARNING] + /// > **Deprecation notice:** This operation is deprecated and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#delete-a-repository-ruleset)" endpoint instead. /// /// This deletes a tag protection state for a repository. /// This endpoint is only available to repository administrators. @@ -1887,7 +1905,9 @@ public protocol APIProtocol: Sendable { /// Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually /// `main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use /// the `Location` header to make a second `GET` request. - /// **Note**: For private repositories, these links are temporary and expire after five minutes. + /// + /// > [!NOTE] + /// > For private repositories, these links are temporary and expire after five minutes. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/tarball/{ref}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/tarball/{ref}/get(repos/download-tarball-archive)`. @@ -1981,7 +2001,8 @@ public protocol APIProtocol: Sendable { /// `main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use /// the `Location` header to make a second `GET` request. /// - /// **Note**: For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. + /// > [!NOTE] + /// > For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/zipball/{ref}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/zipball/{ref}/get(repos/download-zipball-archive)`. @@ -2060,7 +2081,8 @@ extension APIProtocol { /// /// Lists repositories for the specified organization. /// - /// **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + /// > [!NOTE] + /// > In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// /// - Remark: HTTP `GET /orgs/{org}/repos`. /// - Remark: Generated from `#/paths//orgs/{org}/repos/get(repos/list-for-org)`. @@ -2213,7 +2235,8 @@ extension APIProtocol { /// /// The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. /// - /// **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + /// > [!NOTE] + /// > In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// /// - Remark: HTTP `GET /repos/{owner}/{repo}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/get(repos/get)`. @@ -2479,9 +2502,11 @@ extension APIProtocol { /// /// Protecting a branch requires admin or owner permissions to the repository. /// - /// **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + /// > [!NOTE] + /// > Passing new arrays of `users` and `teams` replaces their previous values. /// - /// **Note**: The list of users, apps, and teams in total is limited to 100 items. + /// > [!NOTE] + /// > The list of users, apps, and teams in total is limited to 100 items. /// /// - Remark: HTTP `PUT /repos/{owner}/{repo}/branches/{branch}/protection`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/put(repos/update-branch-protection)`. @@ -2581,7 +2606,8 @@ extension APIProtocol { /// /// Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled. /// - /// **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + /// > [!NOTE] + /// > Passing new arrays of `users` and `teams` replaces their previous values. /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews/patch(repos/update-pull-request-review-protection)`. @@ -2617,7 +2643,8 @@ extension APIProtocol { /// /// When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. /// - /// **Note**: You must enable branch protection to require signed commits. + /// > [!NOTE] + /// > You must enable branch protection to require signed commits. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/required_signatures/get(repos/get-commit-signature-protection)`. @@ -2779,7 +2806,8 @@ extension APIProtocol { /// /// Lists who has access to this protected branch. /// - /// **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + /// > [!NOTE] + /// > Users, apps, and teams `restrictions` are only available for organization-owned repositories. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/restrictions/get(repos/get-access-restrictions)`. @@ -3041,7 +3069,8 @@ extension APIProtocol { /// /// Renames a branch in a repository. /// - /// **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + /// > [!NOTE] + /// > Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". /// /// The authenticated user must have push access to the branch. If the branch is the default branch, the authenticated user must also have admin or owner permissions. /// @@ -3175,7 +3204,8 @@ extension APIProtocol { /// - If the user had their own fork of the repository, the fork will be deleted. /// - If the user still has read access to the repository, open pull requests by this user from a fork will be denied. /// - /// **Note**: A user can still have access to the repository through organization permissions like base repository permissions. + /// > [!NOTE] + /// > A user can still have access to the repository through organization permissions like base repository permissions. /// /// Although the API responds immediately, the additional permission updates might take some extra time to complete in the background. /// @@ -3432,7 +3462,8 @@ extension APIProtocol { /// /// Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. /// - /// **Note:** If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + /// > [!NOTE] + /// > If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types. /// @@ -3661,7 +3692,8 @@ extension APIProtocol { /// /// Creates a new file or replaces an existing file in a repository. /// - /// **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/repos/contents/#delete-a-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + /// > [!NOTE] + /// > If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/repos/contents/#delete-a-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. The `workflow` scope is also required in order to modify files in the `.github/workflows` directory. /// @@ -3688,7 +3720,8 @@ extension APIProtocol { /// /// You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code. /// - /// **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/repos/contents/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + /// > [!NOTE] + /// > If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/repos/contents/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/contents/{path}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/contents/{path}/delete(repos/delete-file)`. @@ -3939,7 +3972,8 @@ extension APIProtocol { } /// Get an environment /// - /// **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + /// > [!NOTE] + /// > To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." /// /// Anyone with read access to the repository can use this endpoint. /// @@ -3960,9 +3994,11 @@ extension APIProtocol { /// /// Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." /// - /// **Note:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + /// > [!NOTE] + /// > To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." /// - /// **Note:** To create or update secrets for an environment, see "[GitHub Actions secrets](/rest/actions/secrets)." + /// > [!NOTE] + /// > To create or update secrets for an environment, see "[GitHub Actions secrets](/rest/actions/secrets)." /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. /// @@ -4121,7 +4157,9 @@ extension APIProtocol { } /// List custom deployment rule integrations available for an environment /// - /// Gets all custom deployment protection rule integrations that are available for an environment. Anyone with read access to the repository can use this endpoint. + /// Gets all custom deployment protection rule integrations that are available for an environment. + /// + /// The authenticated user must have admin or owner permissions to the repository to use this endpoint. /// /// For more information about environments, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)." /// @@ -4195,9 +4233,11 @@ extension APIProtocol { /// /// Create a fork for the authenticated user. /// - /// **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + /// > [!NOTE] + /// > Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). /// - /// **Note**: Although this endpoint works with GitHub Apps, the GitHub App must be installed on the destination account with access to all repositories and on the source account with access to the source repository. + /// > [!NOTE] + /// > Although this endpoint works with GitHub Apps, the GitHub App must be installed on the destination account with access to all repositories and on the source account with access to the source repository. /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/forks`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/forks/post(repos/create-fork)`. @@ -4396,7 +4436,8 @@ extension APIProtocol { /// /// This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated. /// - /// **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` + /// > [!NOTE] + /// > Previously `/repos/:owner/:repo/hooks/:hook_id/test` /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/hooks/{hook_id}/tests`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/hooks/{hook_id}/tests/post(repos/test-push-webhook)`. @@ -5038,9 +5079,8 @@ extension APIProtocol { /// /// Gets a public release with the specified release ID. /// - /// **Note:** This returns an `upload_url` key corresponding to the endpoint - /// for uploading release assets. This key is a hypermedia resource. For more information, see - /// "[Getting started with the REST API](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)." + /// > [!NOTE] + /// > This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a hypermedia resource. For more information, see "[Getting started with the REST API](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)." /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/releases/{release_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/releases/{release_id}/get(repos/get-release)`. @@ -5272,12 +5312,10 @@ extension APIProtocol { } /// Get the weekly commit activity /// - /// /// Returns a weekly aggregate of the number of additions and deletions pushed to a repository. /// - /// **Note:** This endpoint can only be used for repositories with fewer than 10,000 commits. If the repository contains - /// 10,000 or more commits, a 422 status code will be returned. - /// + /// > [!NOTE] + /// > This endpoint can only be used for repositories with fewer than 10,000 commits. If the repository contains 10,000 or more commits, a 422 status code will be returned. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/stats/code_frequency`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/stats/code_frequency/get(repos/get-code-frequency-stats)`. @@ -5315,7 +5353,8 @@ extension APIProtocol { /// * `d` - Number of deletions /// * `c` - Number of commits /// - /// **Note:** This endpoint will return `0` values for all addition and deletion counts in repositories with 10,000 or more commits. + /// > [!NOTE] + /// > This endpoint will return `0` values for all addition and deletion counts in repositories with 10,000 or more commits. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/stats/contributors`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/stats/contributors/get(repos/get-contributors-stats)`. @@ -5406,8 +5445,8 @@ extension APIProtocol { } /// Deprecated - List tag protection states for a repository /// - /// **Note**: This operation is deprecated and will be removed after August 30th 2024 - /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#get-all-repository-rulesets)" endpoint instead. + /// > [!WARNING] + /// > **Deprecation notice:** This operation is deprecated and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#get-all-repository-rulesets)" endpoint instead. /// /// This returns the tag protection states of a repository. /// @@ -5427,8 +5466,8 @@ extension APIProtocol { } /// Deprecated - Create a tag protection state for a repository /// - /// **Note**: This operation is deprecated and will be removed after August 30th 2024 - /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#create-a-repository-ruleset)" endpoint instead. + /// > [!WARNING] + /// > **Deprecation notice:** This operation is deprecated and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#create-a-repository-ruleset)" endpoint instead. /// /// This creates a tag protection state for a repository. /// This endpoint is only available to repository administrators. @@ -5449,8 +5488,8 @@ extension APIProtocol { } /// Deprecated - Delete a tag protection state for a repository /// - /// **Note**: This operation is deprecated and will be removed after August 30th 2024 - /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#delete-a-repository-ruleset)" endpoint instead. + /// > [!WARNING] + /// > **Deprecation notice:** This operation is deprecated and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#delete-a-repository-ruleset)" endpoint instead. /// /// This deletes a tag protection state for a repository. /// This endpoint is only available to repository administrators. @@ -5472,7 +5511,9 @@ extension APIProtocol { /// Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually /// `main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use /// the `Location` header to make a second `GET` request. - /// **Note**: For private repositories, these links are temporary and expire after five minutes. + /// + /// > [!NOTE] + /// > For private repositories, these links are temporary and expire after five minutes. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/tarball/{ref}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/tarball/{ref}/get(repos/download-tarball-archive)`. @@ -5650,7 +5691,8 @@ extension APIProtocol { /// `main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use /// the `Location` header to make a second `GET` request. /// - /// **Note**: For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. + /// > [!NOTE] + /// > For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/zipball/{ref}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/zipball/{ref}/get(repos/download-zipball-archive)`. @@ -12720,7 +12762,8 @@ public enum Components { public var name: Swift.String /// The target of the ruleset /// - /// **Note**: The `push` target is in beta and is subject to change. + /// > [!NOTE] + /// > The `push` target is in beta and is subject to change. /// /// - Remark: Generated from `#/components/schemas/repository-ruleset/target`. @frozen public enum targetPayload: String, Codable, Hashable, Sendable { @@ -12730,7 +12773,8 @@ public enum Components { } /// The target of the ruleset /// - /// **Note**: The `push` target is in beta and is subject to change. + /// > [!NOTE] + /// > The `push` target is in beta and is subject to change. /// /// - Remark: Generated from `#/components/schemas/repository-ruleset/target`. public var target: Components.Schemas.repository_hyphen_ruleset.targetPayload? @@ -18822,7 +18866,7 @@ public enum Components { /// The id of the environment. /// /// - Remark: Generated from `#/components/schemas/environment/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/environment/node_id`. public var node_id: Swift.String /// The name of the environment. @@ -19102,7 +19146,7 @@ public enum Components { /// - protection_rules: Built-in deployment protection rules for the environment. /// - deployment_branch_policy: public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, name: Swift.String, url: Swift.String, @@ -21803,6 +21847,11 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/invitation-id`. public typealias invitation_hyphen_id = Swift.Int + /// The name of the ref. Cannot contain wildcard characters. Optionally prefix with `refs/heads/` to limit to branches or `refs/tags/` to limit to tags. Omit the prefix to search across all refs. When specified, only rule evaluations triggered for this ref will be returned. + /// + /// + /// - Remark: Generated from `#/components/parameters/ref-in-query`. + public typealias ref_hyphen_in_hyphen_query = Swift.String /// The name of the repository to filter on. When specified, only rule evaluations from this repository will be returned. /// /// - Remark: Generated from `#/components/parameters/repository-name-in-query`. @@ -21919,10 +21968,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/release-id`. public typealias release_hyphen_id = Swift.Int - /// The name of the ref. Cannot contain wildcard characters. When specified, only rule evaluations triggered for this ref will be returned. - /// - /// - Remark: Generated from `#/components/parameters/ref-in-query`. - public typealias ref_hyphen_in_hyphen_query = Swift.String /// The unique identifier of the tag protection. /// /// - Remark: Generated from `#/components/parameters/tag-protection-id`. @@ -22366,7 +22411,8 @@ public enum Operations { /// /// Lists repositories for the specified organization. /// - /// **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + /// > [!NOTE] + /// > In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// /// - Remark: HTTP `GET /orgs/{org}/repos`. /// - Remark: Generated from `#/paths//orgs/{org}/repos/get(repos/list-for-org)`. @@ -23340,7 +23386,8 @@ public enum Operations { public var name: Swift.String /// The target of the ruleset /// - /// **Note**: The `push` target is in beta and is subject to change. + /// > [!NOTE] + /// > The `push` target is in beta and is subject to change. /// /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/POST/requestBody/json/target`. @frozen public enum targetPayload: String, Codable, Hashable, Sendable { @@ -23350,7 +23397,8 @@ public enum Operations { } /// The target of the ruleset /// - /// **Note**: The `push` target is in beta and is subject to change. + /// > [!NOTE] + /// > The `push` target is in beta and is subject to change. /// /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/POST/requestBody/json/target`. public var target: Operations.repos_sol_create_hyphen_org_hyphen_ruleset.Input.Body.jsonPayload.targetPayload? @@ -23575,6 +23623,11 @@ public enum Operations { public var path: Operations.repos_sol_get_hyphen_org_hyphen_rule_hyphen_suites.Input.Path /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/rule-suites/GET/query`. public struct Query: Sendable, Hashable { + /// The name of the ref. Cannot contain wildcard characters. Optionally prefix with `refs/heads/` to limit to branches or `refs/tags/` to limit to tags. Omit the prefix to search across all refs. When specified, only rule evaluations triggered for this ref will be returned. + /// + /// + /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/rule-suites/GET/query/ref`. + public var ref: Components.Parameters.ref_hyphen_in_hyphen_query? /// The name of the repository to filter on. When specified, only rule evaluations from this repository will be returned. /// /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/rule-suites/GET/query/repository_name`. @@ -23618,6 +23671,7 @@ public enum Operations { /// Creates a new `Query`. /// /// - Parameters: + /// - ref: The name of the ref. Cannot contain wildcard characters. Optionally prefix with `refs/heads/` to limit to branches or `refs/tags/` to limit to tags. Omit the prefix to search across all refs. When specified, only rule evaluations triggered for this ref will be returned. /// - repository_name: The name of the repository to filter on. When specified, only rule evaluations from this repository will be returned. /// - time_period: The time period to filter by. /// - actor_name: The handle for the GitHub user account to filter on. When specified, only rule evaluations triggered by this actor will be returned. @@ -23625,6 +23679,7 @@ public enum Operations { /// - per_page: The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." /// - page: The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." public init( + ref: Components.Parameters.ref_hyphen_in_hyphen_query? = nil, repository_name: Components.Parameters.repository_hyphen_name_hyphen_in_hyphen_query? = nil, time_period: Components.Parameters.time_hyphen_period? = nil, actor_name: Components.Parameters.actor_hyphen_name_hyphen_in_hyphen_query? = nil, @@ -23632,6 +23687,7 @@ public enum Operations { per_page: Components.Parameters.per_hyphen_page? = nil, page: Components.Parameters.page? = nil ) { + self.ref = ref self.repository_name = repository_name self.time_period = time_period self.actor_name = actor_name @@ -24231,7 +24287,8 @@ public enum Operations { public var name: Swift.String? /// The target of the ruleset /// - /// **Note**: The `push` target is in beta and is subject to change. + /// > [!NOTE] + /// > The `push` target is in beta and is subject to change. /// /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/{ruleset_id}/PUT/requestBody/json/target`. @frozen public enum targetPayload: String, Codable, Hashable, Sendable { @@ -24241,7 +24298,8 @@ public enum Operations { } /// The target of the ruleset /// - /// **Note**: The `push` target is in beta and is subject to change. + /// > [!NOTE] + /// > The `push` target is in beta and is subject to change. /// /// - Remark: Generated from `#/paths/orgs/{org}/rulesets/{ruleset_id}/PUT/requestBody/json/target`. public var target: Operations.repos_sol_update_hyphen_org_hyphen_ruleset.Input.Body.jsonPayload.targetPayload? @@ -24606,7 +24664,8 @@ public enum Operations { /// /// The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. /// - /// **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + /// > [!NOTE] + /// > In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// /// - Remark: HTTP `GET /repos/{owner}/{repo}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/get(repos/get)`. @@ -28192,9 +28251,11 @@ public enum Operations { /// /// Protecting a branch requires admin or owner permissions to the repository. /// - /// **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + /// > [!NOTE] + /// > Passing new arrays of `users` and `teams` replaces their previous values. /// - /// **Note**: The list of users, apps, and teams in total is limited to 100 items. + /// > [!NOTE] + /// > The list of users, apps, and teams in total is limited to 100 items. /// /// - Remark: HTTP `PUT /repos/{owner}/{repo}/branches/{branch}/protection`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/put(repos/update-branch-protection)`. @@ -29507,7 +29568,8 @@ public enum Operations { /// /// Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled. /// - /// **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + /// > [!NOTE] + /// > Passing new arrays of `users` and `teams` replaces their previous values. /// /// - Remark: HTTP `PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews/patch(repos/update-pull-request-review-protection)`. @@ -29971,7 +30033,8 @@ public enum Operations { /// /// When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. /// - /// **Note**: You must enable branch protection to require signed commits. + /// > [!NOTE] + /// > You must enable branch protection to require signed commits. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/required_signatures/get(repos/get-commit-signature-protection)`. @@ -31959,7 +32022,8 @@ public enum Operations { /// /// Lists who has access to this protected branch. /// - /// **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + /// > [!NOTE] + /// > Users, apps, and teams `restrictions` are only available for organization-owned repositories. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/branches/{branch}/protection/restrictions/get(repos/get-access-restrictions)`. @@ -34859,7 +34923,8 @@ public enum Operations { /// /// Renames a branch in a repository. /// - /// **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + /// > [!NOTE] + /// > Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". /// /// The authenticated user must have push access to the branch. If the branch is the default branch, the authenticated user must also have admin or owner permissions. /// @@ -35942,7 +36007,8 @@ public enum Operations { /// - If the user had their own fork of the repository, the fork will be deleted. /// - If the user still has read access to the repository, open pull requests by this user from a fork will be denied. /// - /// **Note**: A user can still have access to the repository through organization permissions like base repository permissions. + /// > [!NOTE] + /// > A user can still have access to the repository through organization permissions like base repository permissions. /// /// Although the API responds immediately, the additional permission updates might take some extra time to complete in the background. /// @@ -38262,7 +38328,8 @@ public enum Operations { /// /// Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. /// - /// **Note:** If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + /// > [!NOTE] + /// > If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. /// /// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types. /// @@ -39824,7 +39891,8 @@ public enum Operations { /// /// Creates a new file or replaces an existing file in a repository. /// - /// **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/repos/contents/#delete-a-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + /// > [!NOTE] + /// > If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/repos/contents/#delete-a-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. The `workflow` scope is also required in order to modify files in the `.github/workflows` directory. /// @@ -40240,7 +40308,8 @@ public enum Operations { /// /// You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code. /// - /// **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/repos/contents/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + /// > [!NOTE] + /// > If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/repos/contents/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/contents/{path}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/contents/{path}/delete(repos/delete-file)`. @@ -42170,7 +42239,10 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/POST/requestBody/json/state`. public var state: Operations.repos_sol_create_hyphen_deployment_hyphen_status.Input.Body.jsonPayload.statePayload - /// The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`. + /// The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. + /// + /// > [!NOTE] + /// > It's recommended to use the `log_url` parameter, which replaces `target_url`. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/POST/requestBody/json/target_url`. public var target_url: Swift.String? @@ -42198,7 +42270,7 @@ public enum Operations { /// /// - Parameters: /// - state: The state of the status. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. - /// - target_url: The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`. + /// - target_url: The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. /// - log_url: The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""` /// - description: A short description of the status. The maximum description length is 140 characters. /// - environment: Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. If not defined, the environment of the previous status on the deployment will be used, if it exists. Otherwise, the environment of the deployment will be used. @@ -42976,7 +43048,8 @@ public enum Operations { } /// Get an environment /// - /// **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + /// > [!NOTE] + /// > To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." /// /// Anyone with read access to the repository can use this endpoint. /// @@ -43130,9 +43203,11 @@ public enum Operations { /// /// Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." /// - /// **Note:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + /// > [!NOTE] + /// > To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." /// - /// **Note:** To create or update secrets for an environment, see "[GitHub Actions secrets](/rest/actions/secrets)." + /// > [!NOTE] + /// > To create or update secrets for an environment, see "[GitHub Actions secrets](/rest/actions/secrets)." /// /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. /// @@ -44705,7 +44780,9 @@ public enum Operations { } /// List custom deployment rule integrations available for an environment /// - /// Gets all custom deployment protection rule integrations that are available for an environment. Anyone with read access to the repository can use this endpoint. + /// Gets all custom deployment protection rule integrations that are available for an environment. + /// + /// The authenticated user must have admin or owner permissions to the repository to use this endpoint. /// /// For more information about environments, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)." /// @@ -45395,9 +45472,11 @@ public enum Operations { /// /// Create a fork for the authenticated user. /// - /// **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + /// > [!NOTE] + /// > Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). /// - /// **Note**: Although this endpoint works with GitHub Apps, the GitHub App must be installed on the destination account with access to all repositories and on the source account with access to the source repository. + /// > [!NOTE] + /// > Although this endpoint works with GitHub Apps, the GitHub App must be installed on the destination account with access to all repositories and on the source account with access to the source repository. /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/forks`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/forks/post(repos/create-fork)`. @@ -47936,7 +48015,8 @@ public enum Operations { /// /// This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated. /// - /// **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` + /// > [!NOTE] + /// > Previously `/repos/:owner/:repo/hooks/:hook_id/test` /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/hooks/{hook_id}/tests`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/hooks/{hook_id}/tests/post(repos/test-push-webhook)`. @@ -55216,9 +55296,8 @@ public enum Operations { /// /// Gets a public release with the specified release ID. /// - /// **Note:** This returns an `upload_url` key corresponding to the endpoint - /// for uploading release assets. This key is a hypermedia resource. For more information, see - /// "[Getting started with the REST API](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)." + /// > [!NOTE] + /// > This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a hypermedia resource. For more information, see "[Getting started with the REST API](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)." /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/releases/{release_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/releases/{release_id}/get(repos/get-release)`. @@ -56637,7 +56716,8 @@ public enum Operations { public var name: Swift.String /// The target of the ruleset /// - /// **Note**: The `push` target is in beta and is subject to change. + /// > [!NOTE] + /// > The `push` target is in beta and is subject to change. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/rulesets/POST/requestBody/json/target`. @frozen public enum targetPayload: String, Codable, Hashable, Sendable { @@ -56647,7 +56727,8 @@ public enum Operations { } /// The target of the ruleset /// - /// **Note**: The `push` target is in beta and is subject to change. + /// > [!NOTE] + /// > The `push` target is in beta and is subject to change. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/rulesets/POST/requestBody/json/target`. public var target: Operations.repos_sol_create_hyphen_repo_hyphen_ruleset.Input.Body.jsonPayload.targetPayload? @@ -56881,7 +56962,8 @@ public enum Operations { public var path: Operations.repos_sol_get_hyphen_repo_hyphen_rule_hyphen_suites.Input.Path /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/rulesets/rule-suites/GET/query`. public struct Query: Sendable, Hashable { - /// The name of the ref. Cannot contain wildcard characters. When specified, only rule evaluations triggered for this ref will be returned. + /// The name of the ref. Cannot contain wildcard characters. Optionally prefix with `refs/heads/` to limit to branches or `refs/tags/` to limit to tags. Omit the prefix to search across all refs. When specified, only rule evaluations triggered for this ref will be returned. + /// /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/rulesets/rule-suites/GET/query/ref`. public var ref: Components.Parameters.ref_hyphen_in_hyphen_query? @@ -56924,7 +57006,7 @@ public enum Operations { /// Creates a new `Query`. /// /// - Parameters: - /// - ref: The name of the ref. Cannot contain wildcard characters. When specified, only rule evaluations triggered for this ref will be returned. + /// - ref: The name of the ref. Cannot contain wildcard characters. Optionally prefix with `refs/heads/` to limit to branches or `refs/tags/` to limit to tags. Omit the prefix to search across all refs. When specified, only rule evaluations triggered for this ref will be returned. /// - time_period: The time period to filter by. /// - actor_name: The handle for the GitHub user account to filter on. When specified, only rule evaluations triggered by this actor will be returned. /// - rule_suite_result: The rule results to filter on. When specified, only suites with this result will be returned. @@ -57576,7 +57658,8 @@ public enum Operations { public var name: Swift.String? /// The target of the ruleset /// - /// **Note**: The `push` target is in beta and is subject to change. + /// > [!NOTE] + /// > The `push` target is in beta and is subject to change. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/rulesets/{ruleset_id}/PUT/requestBody/json/target`. @frozen public enum targetPayload: String, Codable, Hashable, Sendable { @@ -57586,7 +57669,8 @@ public enum Operations { } /// The target of the ruleset /// - /// **Note**: The `push` target is in beta and is subject to change. + /// > [!NOTE] + /// > The `push` target is in beta and is subject to change. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/rulesets/{ruleset_id}/PUT/requestBody/json/target`. public var target: Operations.repos_sol_update_hyphen_repo_hyphen_ruleset.Input.Body.jsonPayload.targetPayload? @@ -57956,12 +58040,10 @@ public enum Operations { } /// Get the weekly commit activity /// - /// /// Returns a weekly aggregate of the number of additions and deletions pushed to a repository. /// - /// **Note:** This endpoint can only be used for repositories with fewer than 10,000 commits. If the repository contains - /// 10,000 or more commits, a 422 status code will be returned. - /// + /// > [!NOTE] + /// > This endpoint can only be used for repositories with fewer than 10,000 commits. If the repository contains 10,000 or more commits, a 422 status code will be returned. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/stats/code_frequency`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/stats/code_frequency/get(repos/get-code-frequency-stats)`. @@ -58370,7 +58452,8 @@ public enum Operations { /// * `d` - Number of deletions /// * `c` - Number of commits /// - /// **Note:** This endpoint will return `0` values for all addition and deletion counts in repositories with 10,000 or more commits. + /// > [!NOTE] + /// > This endpoint will return `0` values for all addition and deletion counts in repositories with 10,000 or more commits. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/stats/contributors`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/stats/contributors/get(repos/get-contributors-stats)`. @@ -59312,8 +59395,8 @@ public enum Operations { } /// Deprecated - List tag protection states for a repository /// - /// **Note**: This operation is deprecated and will be removed after August 30th 2024 - /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#get-all-repository-rulesets)" endpoint instead. + /// > [!WARNING] + /// > **Deprecation notice:** This operation is deprecated and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#get-all-repository-rulesets)" endpoint instead. /// /// This returns the tag protection states of a repository. /// @@ -59504,8 +59587,8 @@ public enum Operations { } /// Deprecated - Create a tag protection state for a repository /// - /// **Note**: This operation is deprecated and will be removed after August 30th 2024 - /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#create-a-repository-ruleset)" endpoint instead. + /// > [!WARNING] + /// > **Deprecation notice:** This operation is deprecated and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#create-a-repository-ruleset)" endpoint instead. /// /// This creates a tag protection state for a repository. /// This endpoint is only available to repository administrators. @@ -59721,8 +59804,8 @@ public enum Operations { } /// Deprecated - Delete a tag protection state for a repository /// - /// **Note**: This operation is deprecated and will be removed after August 30th 2024 - /// Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#delete-a-repository-ruleset)" endpoint instead. + /// > [!WARNING] + /// > **Deprecation notice:** This operation is deprecated and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/rest/repos/rules#delete-a-repository-ruleset)" endpoint instead. /// /// This deletes a tag protection state for a repository. /// This endpoint is only available to repository administrators. @@ -59898,7 +59981,9 @@ public enum Operations { /// Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually /// `main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use /// the `Location` header to make a second `GET` request. - /// **Note**: For private repositories, these links are temporary and expire after five minutes. + /// + /// > [!NOTE] + /// > For private repositories, these links are temporary and expire after five minutes. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/tarball/{ref}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/tarball/{ref}/get(repos/download-tarball-archive)`. @@ -61760,7 +61845,8 @@ public enum Operations { /// `main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use /// the `Location` header to make a second `GET` request. /// - /// **Note**: For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. + /// > [!NOTE] + /// > For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/zipball/{ref}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/zipball/{ref}/get(repos/download-zipball-archive)`. From d841509c6364e5f8efc384a59b8001318b0d46fa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 22 Jul 2024 21:54:30 +0000 Subject: [PATCH 104/152] Commit via running ake Sources/search --- Sources/search/Client.swift | 3 ++- Sources/search/Types.swift | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Sources/search/Client.swift b/Sources/search/Client.swift index 374c7890677..bf94bccf9ef 100644 --- a/Sources/search/Client.swift +++ b/Sources/search/Client.swift @@ -341,7 +341,8 @@ public struct Client: APIProtocol { /// /// This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. /// - /// **Note:** For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + /// > [!NOTE] + /// > For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." /// /// - Remark: HTTP `GET /search/issues`. /// - Remark: Generated from `#/paths//search/issues/get(search/issues-and-pull-requests)`. diff --git a/Sources/search/Types.swift b/Sources/search/Types.swift index 7fc0a2ed1d2..a250ef7acf4 100644 --- a/Sources/search/Types.swift +++ b/Sources/search/Types.swift @@ -64,7 +64,8 @@ public protocol APIProtocol: Sendable { /// /// This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. /// - /// **Note:** For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + /// > [!NOTE] + /// > For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." /// /// - Remark: HTTP `GET /search/issues`. /// - Remark: Generated from `#/paths//search/issues/get(search/issues-and-pull-requests)`. @@ -204,7 +205,8 @@ extension APIProtocol { /// /// This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. /// - /// **Note:** For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + /// > [!NOTE] + /// > For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." /// /// - Remark: HTTP `GET /search/issues`. /// - Remark: Generated from `#/paths//search/issues/get(search/issues-and-pull-requests)`. @@ -5388,7 +5390,8 @@ public enum Operations { /// /// This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. /// - /// **Note:** For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + /// > [!NOTE] + /// > For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." /// /// - Remark: HTTP `GET /search/issues`. /// - Remark: Generated from `#/paths//search/issues/get(search/issues-and-pull-requests)`. From b246f828214e59cca076d426b88c26266a27e8e3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 22 Jul 2024 21:55:12 +0000 Subject: [PATCH 105/152] Commit via running ake Sources/teams --- Sources/teams/Client.swift | 187 ++++++++----- Sources/teams/Types.swift | 561 ++++++++++++++++++++++++------------- 2 files changed, 496 insertions(+), 252 deletions(-) diff --git a/Sources/teams/Client.swift b/Sources/teams/Client.swift index d0ede64edf4..50c05979d3d 100644 --- a/Sources/teams/Client.swift +++ b/Sources/teams/Client.swift @@ -269,7 +269,8 @@ public struct Client: APIProtocol { /// /// Gets a team using the team's `slug`. To create the `slug`, GitHub replaces special characters in the `name` string, changes all words to lowercase, and replaces spaces with a `-` separator. For example, `"My TEam Näme"` would become `my-team-name`. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/get(teams/get-by-name)`. @@ -358,7 +359,8 @@ public struct Client: APIProtocol { /// /// To edit a team, the authenticated user must either be an organization owner or a team maintainer. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. /// /// - Remark: HTTP `PATCH /orgs/{org}/teams/{team_slug}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/patch(teams/update-in-org)`. @@ -526,7 +528,8 @@ public struct Client: APIProtocol { /// /// If you are an organization owner, deleting a parent team will delete all of its child teams as well. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/delete(teams/delete-in-org)`. @@ -569,7 +572,8 @@ public struct Client: APIProtocol { /// /// List all discussions on a team's page. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -676,7 +680,8 @@ public struct Client: APIProtocol { /// /// This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -754,7 +759,8 @@ public struct Client: APIProtocol { /// /// Get a specific discussion on a team's page. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -824,7 +830,8 @@ public struct Client: APIProtocol { /// /// Edits the title and body text of a discussion post. Only the parameters you provide are updated. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -905,7 +912,8 @@ public struct Client: APIProtocol { /// /// Delete a discussion from a team's page. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -951,7 +959,8 @@ public struct Client: APIProtocol { /// /// List all comments on a team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -1052,7 +1061,8 @@ public struct Client: APIProtocol { /// /// This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -1131,7 +1141,8 @@ public struct Client: APIProtocol { /// /// Get a specific comment on a team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -1202,7 +1213,8 @@ public struct Client: APIProtocol { /// /// Edits the body text of a discussion comment. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -1282,7 +1294,8 @@ public struct Client: APIProtocol { /// /// Deletes a comment on a team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -1329,7 +1342,8 @@ public struct Client: APIProtocol { /// /// The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/invitations`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/invitations/get(teams/list-pending-invitations-in-org)`. @@ -1516,10 +1530,11 @@ public struct Client: APIProtocol { /// /// To get a user's membership with a team, the team must be visible to the authenticated user. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. /// - /// **Note:** - /// The response contains the `state` of the membership and the member's `role`. + /// > [!NOTE] + /// > The response contains the `state` of the membership and the member's `role`. /// /// The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/teams/teams#create-a-team). /// @@ -1593,13 +1608,15 @@ public struct Client: APIProtocol { /// /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. /// /// If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. /// /// - Remark: HTTP `PUT /orgs/{org}/teams/{team_slug}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/memberships/{username}/put(teams/add-or-update-membership-for-user-in-org)`. @@ -1684,9 +1701,11 @@ public struct Client: APIProtocol { /// /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/memberships/{username}/delete(teams/remove-membership-for-user-in-org)`. @@ -1732,7 +1751,8 @@ public struct Client: APIProtocol { /// /// Lists the organization projects for a team. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/projects`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/get(teams/list-projects-in-org)`. @@ -1821,7 +1841,8 @@ public struct Client: APIProtocol { /// /// Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/projects/{project_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/{project_id}/get(teams/check-permissions-for-project-in-org)`. @@ -1891,7 +1912,8 @@ public struct Client: APIProtocol { /// /// Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. /// /// - Remark: HTTP `PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/{project_id}/put(teams/add-or-update-project-permissions-in-org)`. @@ -1972,7 +1994,8 @@ public struct Client: APIProtocol { /// /// Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. This endpoint removes the project from the team, but does not delete the project. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/{project_id}/delete(teams/remove-project-in-org)`. @@ -2016,7 +2039,8 @@ public struct Client: APIProtocol { /// /// Lists a team's repositories visible to the authenticated user. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/repos`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/repos/get(teams/list-repos-in-org)`. @@ -2111,7 +2135,8 @@ public struct Client: APIProtocol { /// /// If the repository is private, you must have at least `read` permission for that repository, and your token must have the `repo` or `admin:org` scope. Otherwise, you will receive a `404 Not Found` response status. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}/get(teams/check-permissions-for-repo-in-org)`. @@ -2184,7 +2209,8 @@ public struct Client: APIProtocol { /// /// To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. /// /// For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". /// @@ -2242,7 +2268,8 @@ public struct Client: APIProtocol { /// /// If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}/delete(teams/remove-repo-in-org)`. @@ -2287,7 +2314,8 @@ public struct Client: APIProtocol { /// /// Lists the child teams of the team specified by `{team_slug}`. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/teams`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/teams/get(teams/list-child-in-org)`. @@ -2374,7 +2402,8 @@ public struct Client: APIProtocol { } /// Get a team (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/teams/teams#get-a-team-by-name) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/teams/teams#get-a-team-by-name) endpoint. /// /// - Remark: HTTP `GET /teams/{team_id}`. /// - Remark: Generated from `#/paths//teams/{team_id}/get(teams/get-legacy)`. @@ -2461,11 +2490,13 @@ public struct Client: APIProtocol { } /// Update a team (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/teams/teams#update-a-team) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/teams/teams#update-a-team) endpoint. /// /// To edit a team, the authenticated user must either be an organization owner or a team maintainer. /// - /// **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + /// > [!NOTE] + /// > With nested teams, the `privacy` for parent teams cannot be `secret`. /// /// - Remark: HTTP `PATCH /teams/{team_id}`. /// - Remark: Generated from `#/paths//teams/{team_id}/patch(teams/update-legacy)`. @@ -2627,7 +2658,8 @@ public struct Client: APIProtocol { } /// Delete a team (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/teams/teams#delete-a-team) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/teams/teams#delete-a-team) endpoint. /// /// To delete a team, the authenticated user must be an organization owner or team maintainer. /// @@ -2720,7 +2752,8 @@ public struct Client: APIProtocol { } /// List discussions (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/teams/discussions#list-discussions) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/teams/discussions#list-discussions) endpoint. /// /// List all discussions on a team's page. /// @@ -2818,7 +2851,8 @@ public struct Client: APIProtocol { } /// Create a discussion (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/teams/discussions#create-a-discussion) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/teams/discussions#create-a-discussion) endpoint. /// /// Creates a new discussion post on a team's page. /// @@ -2898,7 +2932,8 @@ public struct Client: APIProtocol { } /// Get a discussion (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion) endpoint. /// /// Get a specific discussion on a team's page. /// @@ -2968,7 +3003,8 @@ public struct Client: APIProtocol { } /// Update a discussion (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/teams/discussions#update-a-discussion) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/teams/discussions#update-a-discussion) endpoint. /// /// Edits the title and body text of a discussion post. Only the parameters you provide are updated. /// @@ -3049,7 +3085,8 @@ public struct Client: APIProtocol { } /// Delete a discussion (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/teams/discussions#delete-a-discussion) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/teams/discussions#delete-a-discussion) endpoint. /// /// Delete a discussion from a team's page. /// @@ -3095,7 +3132,8 @@ public struct Client: APIProtocol { } /// List discussion comments (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/teams/discussion-comments#list-discussion-comments) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/teams/discussion-comments#list-discussion-comments) endpoint. /// /// List all comments on a team discussion. /// @@ -3194,7 +3232,8 @@ public struct Client: APIProtocol { } /// Create a discussion comment (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment) endpoint. /// /// Creates a new comment on a team discussion. /// @@ -3275,7 +3314,8 @@ public struct Client: APIProtocol { } /// Get a discussion comment (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment) endpoint. /// /// Get a specific comment on a team discussion. /// @@ -3346,7 +3386,8 @@ public struct Client: APIProtocol { } /// Update a discussion comment (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/teams/discussion-comments#update-a-discussion-comment) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/teams/discussion-comments#update-a-discussion-comment) endpoint. /// /// Edits the body text of a discussion comment. /// @@ -3426,7 +3467,8 @@ public struct Client: APIProtocol { } /// Delete a discussion comment (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/teams/discussion-comments#delete-a-discussion-comment) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/teams/discussion-comments#delete-a-discussion-comment) endpoint. /// /// Deletes a comment on a team discussion. /// @@ -3473,7 +3515,8 @@ public struct Client: APIProtocol { } /// List pending team invitations (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/teams/members#list-pending-team-invitations) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/teams/members#list-pending-team-invitations) endpoint. /// /// The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. /// @@ -3562,7 +3605,8 @@ public struct Client: APIProtocol { } /// List team members (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/teams/members#list-team-members) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/teams/members#list-team-members) endpoint. /// /// Team members will include the members of child teams. /// @@ -3736,7 +3780,8 @@ public struct Client: APIProtocol { /// /// To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." /// @@ -3818,7 +3863,8 @@ public struct Client: APIProtocol { /// /// To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// - Remark: HTTP `DELETE /teams/{team_id}/members/{username}`. /// - Remark: Generated from `#/paths//teams/{team_id}/members/{username}/delete(teams/remove-member-legacy)`. @@ -3862,7 +3908,8 @@ public struct Client: APIProtocol { } /// Get team membership for a user (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/teams/members#get-team-membership-for-a-user) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/teams/members#get-team-membership-for-a-user) endpoint. /// /// Team members will include the members of child teams. /// @@ -3959,13 +4006,15 @@ public struct Client: APIProtocol { } /// Add or update team membership for a user (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user) endpoint. /// /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. /// /// If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. /// @@ -4072,13 +4121,15 @@ public struct Client: APIProtocol { } /// Remove team membership for a user (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user) endpoint. /// /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. /// /// To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// - Remark: HTTP `DELETE /teams/{team_id}/memberships/{username}`. /// - Remark: Generated from `#/paths//teams/{team_id}/memberships/{username}/delete(teams/remove-membership-for-user-legacy)`. @@ -4122,7 +4173,8 @@ public struct Client: APIProtocol { } /// List team projects (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/teams/teams#list-team-projects) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/teams/teams#list-team-projects) endpoint. /// /// Lists the organization projects for a team. /// @@ -4233,7 +4285,8 @@ public struct Client: APIProtocol { } /// Check team permissions for a project (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-project) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-project) endpoint. /// /// Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. /// @@ -4303,7 +4356,8 @@ public struct Client: APIProtocol { } /// Add or update team project permissions (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-project-permissions) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-project-permissions) endpoint. /// /// Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. /// @@ -4428,7 +4482,8 @@ public struct Client: APIProtocol { } /// Remove a project from a team (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/teams/teams#remove-a-project-from-a-team) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/teams/teams#remove-a-project-from-a-team) endpoint. /// /// Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. /// @@ -4520,7 +4575,8 @@ public struct Client: APIProtocol { } /// List team repositories (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/teams/teams#list-team-repositories) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/teams/teams#list-team-repositories) endpoint. /// /// - Remark: HTTP `GET /teams/{team_id}/repos`. /// - Remark: Generated from `#/paths//teams/{team_id}/repos/get(teams/list-repos-legacy)`. @@ -4629,9 +4685,11 @@ public struct Client: APIProtocol { } /// Check team permissions for a repository (Legacy) /// - /// **Note**: Repositories inherited through a parent team will also be checked. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository) endpoint. /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository) endpoint. + /// > [!NOTE] + /// > Repositories inherited through a parent team will also be checked. /// /// You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types/) via the `Accept` header: /// @@ -4704,7 +4762,8 @@ public struct Client: APIProtocol { } /// Add or update team repository permissions (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-repository-permissions)" endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-repository-permissions)" endpoint. /// /// To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. /// @@ -4810,7 +4869,8 @@ public struct Client: APIProtocol { } /// Remove a repository from a team (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/teams/teams#remove-a-repository-from-a-team) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/teams/teams#remove-a-repository-from-a-team) endpoint. /// /// If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. /// @@ -4855,7 +4915,8 @@ public struct Client: APIProtocol { } /// List child teams (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/teams/teams#list-child-teams) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/teams/teams#list-child-teams) endpoint. /// /// - Remark: HTTP `GET /teams/{team_id}/teams`. /// - Remark: Generated from `#/paths//teams/{team_id}/teams/get(teams/list-child-legacy)`. diff --git a/Sources/teams/Types.swift b/Sources/teams/Types.swift index 81bdd6ed5e7..af6a649d5cc 100644 --- a/Sources/teams/Types.swift +++ b/Sources/teams/Types.swift @@ -31,7 +31,8 @@ public protocol APIProtocol: Sendable { /// /// Gets a team using the team's `slug`. To create the `slug`, GitHub replaces special characters in the `name` string, changes all words to lowercase, and replaces spaces with a `-` separator. For example, `"My TEam Näme"` would become `my-team-name`. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/get(teams/get-by-name)`. @@ -40,7 +41,8 @@ public protocol APIProtocol: Sendable { /// /// To edit a team, the authenticated user must either be an organization owner or a team maintainer. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. /// /// - Remark: HTTP `PATCH /orgs/{org}/teams/{team_slug}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/patch(teams/update-in-org)`. @@ -51,7 +53,8 @@ public protocol APIProtocol: Sendable { /// /// If you are an organization owner, deleting a parent team will delete all of its child teams as well. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/delete(teams/delete-in-org)`. @@ -60,7 +63,8 @@ public protocol APIProtocol: Sendable { /// /// List all discussions on a team's page. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -73,7 +77,8 @@ public protocol APIProtocol: Sendable { /// /// This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -84,7 +89,8 @@ public protocol APIProtocol: Sendable { /// /// Get a specific discussion on a team's page. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -95,7 +101,8 @@ public protocol APIProtocol: Sendable { /// /// Edits the title and body text of a discussion post. Only the parameters you provide are updated. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -106,7 +113,8 @@ public protocol APIProtocol: Sendable { /// /// Delete a discussion from a team's page. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -117,7 +125,8 @@ public protocol APIProtocol: Sendable { /// /// List all comments on a team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -130,7 +139,8 @@ public protocol APIProtocol: Sendable { /// /// This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -141,7 +151,8 @@ public protocol APIProtocol: Sendable { /// /// Get a specific comment on a team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -152,7 +163,8 @@ public protocol APIProtocol: Sendable { /// /// Edits the body text of a discussion comment. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -163,7 +175,8 @@ public protocol APIProtocol: Sendable { /// /// Deletes a comment on a team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -174,7 +187,8 @@ public protocol APIProtocol: Sendable { /// /// The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/invitations`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/invitations/get(teams/list-pending-invitations-in-org)`. @@ -194,10 +208,11 @@ public protocol APIProtocol: Sendable { /// /// To get a user's membership with a team, the team must be visible to the authenticated user. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. /// - /// **Note:** - /// The response contains the `state` of the membership and the member's `role`. + /// > [!NOTE] + /// > The response contains the `state` of the membership and the member's `role`. /// /// The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/teams/teams#create-a-team). /// @@ -210,13 +225,15 @@ public protocol APIProtocol: Sendable { /// /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. /// /// If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. /// /// - Remark: HTTP `PUT /orgs/{org}/teams/{team_slug}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/memberships/{username}/put(teams/add-or-update-membership-for-user-in-org)`. @@ -227,9 +244,11 @@ public protocol APIProtocol: Sendable { /// /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/memberships/{username}/delete(teams/remove-membership-for-user-in-org)`. @@ -238,7 +257,8 @@ public protocol APIProtocol: Sendable { /// /// Lists the organization projects for a team. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/projects`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/get(teams/list-projects-in-org)`. @@ -247,7 +267,8 @@ public protocol APIProtocol: Sendable { /// /// Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/projects/{project_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/{project_id}/get(teams/check-permissions-for-project-in-org)`. @@ -256,7 +277,8 @@ public protocol APIProtocol: Sendable { /// /// Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. /// /// - Remark: HTTP `PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/{project_id}/put(teams/add-or-update-project-permissions-in-org)`. @@ -265,7 +287,8 @@ public protocol APIProtocol: Sendable { /// /// Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. This endpoint removes the project from the team, but does not delete the project. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/{project_id}/delete(teams/remove-project-in-org)`. @@ -274,7 +297,8 @@ public protocol APIProtocol: Sendable { /// /// Lists a team's repositories visible to the authenticated user. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/repos`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/repos/get(teams/list-repos-in-org)`. @@ -289,7 +313,8 @@ public protocol APIProtocol: Sendable { /// /// If the repository is private, you must have at least `read` permission for that repository, and your token must have the `repo` or `admin:org` scope. Otherwise, you will receive a `404 Not Found` response status. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}/get(teams/check-permissions-for-repo-in-org)`. @@ -298,7 +323,8 @@ public protocol APIProtocol: Sendable { /// /// To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. /// /// For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". /// @@ -309,7 +335,8 @@ public protocol APIProtocol: Sendable { /// /// If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}/delete(teams/remove-repo-in-org)`. @@ -318,14 +345,16 @@ public protocol APIProtocol: Sendable { /// /// Lists the child teams of the team specified by `{team_slug}`. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/teams`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/teams/get(teams/list-child-in-org)`. func teams_sol_list_hyphen_child_hyphen_in_hyphen_org(_ input: Operations.teams_sol_list_hyphen_child_hyphen_in_hyphen_org.Input) async throws -> Operations.teams_sol_list_hyphen_child_hyphen_in_hyphen_org.Output /// Get a team (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/teams/teams#get-a-team-by-name) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/teams/teams#get-a-team-by-name) endpoint. /// /// - Remark: HTTP `GET /teams/{team_id}`. /// - Remark: Generated from `#/paths//teams/{team_id}/get(teams/get-legacy)`. @@ -333,11 +362,13 @@ public protocol APIProtocol: Sendable { func teams_sol_get_hyphen_legacy(_ input: Operations.teams_sol_get_hyphen_legacy.Input) async throws -> Operations.teams_sol_get_hyphen_legacy.Output /// Update a team (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/teams/teams#update-a-team) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/teams/teams#update-a-team) endpoint. /// /// To edit a team, the authenticated user must either be an organization owner or a team maintainer. /// - /// **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + /// > [!NOTE] + /// > With nested teams, the `privacy` for parent teams cannot be `secret`. /// /// - Remark: HTTP `PATCH /teams/{team_id}`. /// - Remark: Generated from `#/paths//teams/{team_id}/patch(teams/update-legacy)`. @@ -345,7 +376,8 @@ public protocol APIProtocol: Sendable { func teams_sol_update_hyphen_legacy(_ input: Operations.teams_sol_update_hyphen_legacy.Input) async throws -> Operations.teams_sol_update_hyphen_legacy.Output /// Delete a team (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/teams/teams#delete-a-team) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/teams/teams#delete-a-team) endpoint. /// /// To delete a team, the authenticated user must be an organization owner or team maintainer. /// @@ -357,7 +389,8 @@ public protocol APIProtocol: Sendable { func teams_sol_delete_hyphen_legacy(_ input: Operations.teams_sol_delete_hyphen_legacy.Input) async throws -> Operations.teams_sol_delete_hyphen_legacy.Output /// List discussions (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/teams/discussions#list-discussions) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/teams/discussions#list-discussions) endpoint. /// /// List all discussions on a team's page. /// @@ -369,7 +402,8 @@ public protocol APIProtocol: Sendable { func teams_sol_list_hyphen_discussions_hyphen_legacy(_ input: Operations.teams_sol_list_hyphen_discussions_hyphen_legacy.Input) async throws -> Operations.teams_sol_list_hyphen_discussions_hyphen_legacy.Output /// Create a discussion (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/teams/discussions#create-a-discussion) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/teams/discussions#create-a-discussion) endpoint. /// /// Creates a new discussion post on a team's page. /// @@ -383,7 +417,8 @@ public protocol APIProtocol: Sendable { func teams_sol_create_hyphen_discussion_hyphen_legacy(_ input: Operations.teams_sol_create_hyphen_discussion_hyphen_legacy.Input) async throws -> Operations.teams_sol_create_hyphen_discussion_hyphen_legacy.Output /// Get a discussion (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion) endpoint. /// /// Get a specific discussion on a team's page. /// @@ -395,7 +430,8 @@ public protocol APIProtocol: Sendable { func teams_sol_get_hyphen_discussion_hyphen_legacy(_ input: Operations.teams_sol_get_hyphen_discussion_hyphen_legacy.Input) async throws -> Operations.teams_sol_get_hyphen_discussion_hyphen_legacy.Output /// Update a discussion (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/teams/discussions#update-a-discussion) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/teams/discussions#update-a-discussion) endpoint. /// /// Edits the title and body text of a discussion post. Only the parameters you provide are updated. /// @@ -407,7 +443,8 @@ public protocol APIProtocol: Sendable { func teams_sol_update_hyphen_discussion_hyphen_legacy(_ input: Operations.teams_sol_update_hyphen_discussion_hyphen_legacy.Input) async throws -> Operations.teams_sol_update_hyphen_discussion_hyphen_legacy.Output /// Delete a discussion (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/teams/discussions#delete-a-discussion) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/teams/discussions#delete-a-discussion) endpoint. /// /// Delete a discussion from a team's page. /// @@ -419,7 +456,8 @@ public protocol APIProtocol: Sendable { func teams_sol_delete_hyphen_discussion_hyphen_legacy(_ input: Operations.teams_sol_delete_hyphen_discussion_hyphen_legacy.Input) async throws -> Operations.teams_sol_delete_hyphen_discussion_hyphen_legacy.Output /// List discussion comments (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/teams/discussion-comments#list-discussion-comments) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/teams/discussion-comments#list-discussion-comments) endpoint. /// /// List all comments on a team discussion. /// @@ -431,7 +469,8 @@ public protocol APIProtocol: Sendable { func teams_sol_list_hyphen_discussion_hyphen_comments_hyphen_legacy(_ input: Operations.teams_sol_list_hyphen_discussion_hyphen_comments_hyphen_legacy.Input) async throws -> Operations.teams_sol_list_hyphen_discussion_hyphen_comments_hyphen_legacy.Output /// Create a discussion comment (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment) endpoint. /// /// Creates a new comment on a team discussion. /// @@ -445,7 +484,8 @@ public protocol APIProtocol: Sendable { func teams_sol_create_hyphen_discussion_hyphen_comment_hyphen_legacy(_ input: Operations.teams_sol_create_hyphen_discussion_hyphen_comment_hyphen_legacy.Input) async throws -> Operations.teams_sol_create_hyphen_discussion_hyphen_comment_hyphen_legacy.Output /// Get a discussion comment (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment) endpoint. /// /// Get a specific comment on a team discussion. /// @@ -457,7 +497,8 @@ public protocol APIProtocol: Sendable { func teams_sol_get_hyphen_discussion_hyphen_comment_hyphen_legacy(_ input: Operations.teams_sol_get_hyphen_discussion_hyphen_comment_hyphen_legacy.Input) async throws -> Operations.teams_sol_get_hyphen_discussion_hyphen_comment_hyphen_legacy.Output /// Update a discussion comment (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/teams/discussion-comments#update-a-discussion-comment) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/teams/discussion-comments#update-a-discussion-comment) endpoint. /// /// Edits the body text of a discussion comment. /// @@ -469,7 +510,8 @@ public protocol APIProtocol: Sendable { func teams_sol_update_hyphen_discussion_hyphen_comment_hyphen_legacy(_ input: Operations.teams_sol_update_hyphen_discussion_hyphen_comment_hyphen_legacy.Input) async throws -> Operations.teams_sol_update_hyphen_discussion_hyphen_comment_hyphen_legacy.Output /// Delete a discussion comment (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/teams/discussion-comments#delete-a-discussion-comment) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/teams/discussion-comments#delete-a-discussion-comment) endpoint. /// /// Deletes a comment on a team discussion. /// @@ -481,7 +523,8 @@ public protocol APIProtocol: Sendable { func teams_sol_delete_hyphen_discussion_hyphen_comment_hyphen_legacy(_ input: Operations.teams_sol_delete_hyphen_discussion_hyphen_comment_hyphen_legacy.Input) async throws -> Operations.teams_sol_delete_hyphen_discussion_hyphen_comment_hyphen_legacy.Output /// List pending team invitations (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/teams/members#list-pending-team-invitations) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/teams/members#list-pending-team-invitations) endpoint. /// /// The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. /// @@ -491,7 +534,8 @@ public protocol APIProtocol: Sendable { func teams_sol_list_hyphen_pending_hyphen_invitations_hyphen_legacy(_ input: Operations.teams_sol_list_hyphen_pending_hyphen_invitations_hyphen_legacy.Input) async throws -> Operations.teams_sol_list_hyphen_pending_hyphen_invitations_hyphen_legacy.Output /// List team members (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/teams/members#list-team-members) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/teams/members#list-team-members) endpoint. /// /// Team members will include the members of child teams. /// @@ -521,7 +565,8 @@ public protocol APIProtocol: Sendable { /// /// To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." /// @@ -539,7 +584,8 @@ public protocol APIProtocol: Sendable { /// /// To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// - Remark: HTTP `DELETE /teams/{team_id}/members/{username}`. /// - Remark: Generated from `#/paths//teams/{team_id}/members/{username}/delete(teams/remove-member-legacy)`. @@ -547,7 +593,8 @@ public protocol APIProtocol: Sendable { func teams_sol_remove_hyphen_member_hyphen_legacy(_ input: Operations.teams_sol_remove_hyphen_member_hyphen_legacy.Input) async throws -> Operations.teams_sol_remove_hyphen_member_hyphen_legacy.Output /// Get team membership for a user (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/teams/members#get-team-membership-for-a-user) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/teams/members#get-team-membership-for-a-user) endpoint. /// /// Team members will include the members of child teams. /// @@ -564,13 +611,15 @@ public protocol APIProtocol: Sendable { func teams_sol_get_hyphen_membership_hyphen_for_hyphen_user_hyphen_legacy(_ input: Operations.teams_sol_get_hyphen_membership_hyphen_for_hyphen_user_hyphen_legacy.Input) async throws -> Operations.teams_sol_get_hyphen_membership_hyphen_for_hyphen_user_hyphen_legacy.Output /// Add or update team membership for a user (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user) endpoint. /// /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. /// /// If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. /// @@ -582,13 +631,15 @@ public protocol APIProtocol: Sendable { func teams_sol_add_hyphen_or_hyphen_update_hyphen_membership_hyphen_for_hyphen_user_hyphen_legacy(_ input: Operations.teams_sol_add_hyphen_or_hyphen_update_hyphen_membership_hyphen_for_hyphen_user_hyphen_legacy.Input) async throws -> Operations.teams_sol_add_hyphen_or_hyphen_update_hyphen_membership_hyphen_for_hyphen_user_hyphen_legacy.Output /// Remove team membership for a user (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user) endpoint. /// /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. /// /// To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// - Remark: HTTP `DELETE /teams/{team_id}/memberships/{username}`. /// - Remark: Generated from `#/paths//teams/{team_id}/memberships/{username}/delete(teams/remove-membership-for-user-legacy)`. @@ -596,7 +647,8 @@ public protocol APIProtocol: Sendable { func teams_sol_remove_hyphen_membership_hyphen_for_hyphen_user_hyphen_legacy(_ input: Operations.teams_sol_remove_hyphen_membership_hyphen_for_hyphen_user_hyphen_legacy.Input) async throws -> Operations.teams_sol_remove_hyphen_membership_hyphen_for_hyphen_user_hyphen_legacy.Output /// List team projects (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/teams/teams#list-team-projects) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/teams/teams#list-team-projects) endpoint. /// /// Lists the organization projects for a team. /// @@ -606,7 +658,8 @@ public protocol APIProtocol: Sendable { func teams_sol_list_hyphen_projects_hyphen_legacy(_ input: Operations.teams_sol_list_hyphen_projects_hyphen_legacy.Input) async throws -> Operations.teams_sol_list_hyphen_projects_hyphen_legacy.Output /// Check team permissions for a project (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-project) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-project) endpoint. /// /// Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. /// @@ -616,7 +669,8 @@ public protocol APIProtocol: Sendable { func teams_sol_check_hyphen_permissions_hyphen_for_hyphen_project_hyphen_legacy(_ input: Operations.teams_sol_check_hyphen_permissions_hyphen_for_hyphen_project_hyphen_legacy.Input) async throws -> Operations.teams_sol_check_hyphen_permissions_hyphen_for_hyphen_project_hyphen_legacy.Output /// Add or update team project permissions (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-project-permissions) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-project-permissions) endpoint. /// /// Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. /// @@ -626,7 +680,8 @@ public protocol APIProtocol: Sendable { func teams_sol_add_hyphen_or_hyphen_update_hyphen_project_hyphen_permissions_hyphen_legacy(_ input: Operations.teams_sol_add_hyphen_or_hyphen_update_hyphen_project_hyphen_permissions_hyphen_legacy.Input) async throws -> Operations.teams_sol_add_hyphen_or_hyphen_update_hyphen_project_hyphen_permissions_hyphen_legacy.Output /// Remove a project from a team (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/teams/teams#remove-a-project-from-a-team) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/teams/teams#remove-a-project-from-a-team) endpoint. /// /// Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. /// @@ -636,7 +691,8 @@ public protocol APIProtocol: Sendable { func teams_sol_remove_hyphen_project_hyphen_legacy(_ input: Operations.teams_sol_remove_hyphen_project_hyphen_legacy.Input) async throws -> Operations.teams_sol_remove_hyphen_project_hyphen_legacy.Output /// List team repositories (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/teams/teams#list-team-repositories) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/teams/teams#list-team-repositories) endpoint. /// /// - Remark: HTTP `GET /teams/{team_id}/repos`. /// - Remark: Generated from `#/paths//teams/{team_id}/repos/get(teams/list-repos-legacy)`. @@ -644,9 +700,11 @@ public protocol APIProtocol: Sendable { func teams_sol_list_hyphen_repos_hyphen_legacy(_ input: Operations.teams_sol_list_hyphen_repos_hyphen_legacy.Input) async throws -> Operations.teams_sol_list_hyphen_repos_hyphen_legacy.Output /// Check team permissions for a repository (Legacy) /// - /// **Note**: Repositories inherited through a parent team will also be checked. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository) endpoint. /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository) endpoint. + /// > [!NOTE] + /// > Repositories inherited through a parent team will also be checked. /// /// You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types/) via the `Accept` header: /// @@ -656,7 +714,8 @@ public protocol APIProtocol: Sendable { func teams_sol_check_hyphen_permissions_hyphen_for_hyphen_repo_hyphen_legacy(_ input: Operations.teams_sol_check_hyphen_permissions_hyphen_for_hyphen_repo_hyphen_legacy.Input) async throws -> Operations.teams_sol_check_hyphen_permissions_hyphen_for_hyphen_repo_hyphen_legacy.Output /// Add or update team repository permissions (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-repository-permissions)" endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-repository-permissions)" endpoint. /// /// To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. /// @@ -668,7 +727,8 @@ public protocol APIProtocol: Sendable { func teams_sol_add_hyphen_or_hyphen_update_hyphen_repo_hyphen_permissions_hyphen_legacy(_ input: Operations.teams_sol_add_hyphen_or_hyphen_update_hyphen_repo_hyphen_permissions_hyphen_legacy.Input) async throws -> Operations.teams_sol_add_hyphen_or_hyphen_update_hyphen_repo_hyphen_permissions_hyphen_legacy.Output /// Remove a repository from a team (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/teams/teams#remove-a-repository-from-a-team) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/teams/teams#remove-a-repository-from-a-team) endpoint. /// /// If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. /// @@ -678,7 +738,8 @@ public protocol APIProtocol: Sendable { func teams_sol_remove_hyphen_repo_hyphen_legacy(_ input: Operations.teams_sol_remove_hyphen_repo_hyphen_legacy.Input) async throws -> Operations.teams_sol_remove_hyphen_repo_hyphen_legacy.Output /// List child teams (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/teams/teams#list-child-teams) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/teams/teams#list-child-teams) endpoint. /// /// - Remark: HTTP `GET /teams/{team_id}/teams`. /// - Remark: Generated from `#/paths//teams/{team_id}/teams/get(teams/list-child-legacy)`. @@ -740,7 +801,8 @@ extension APIProtocol { /// /// Gets a team using the team's `slug`. To create the `slug`, GitHub replaces special characters in the `name` string, changes all words to lowercase, and replaces spaces with a `-` separator. For example, `"My TEam Näme"` would become `my-team-name`. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/get(teams/get-by-name)`. @@ -757,7 +819,8 @@ extension APIProtocol { /// /// To edit a team, the authenticated user must either be an organization owner or a team maintainer. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. /// /// - Remark: HTTP `PATCH /orgs/{org}/teams/{team_slug}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/patch(teams/update-in-org)`. @@ -778,7 +841,8 @@ extension APIProtocol { /// /// If you are an organization owner, deleting a parent team will delete all of its child teams as well. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/delete(teams/delete-in-org)`. @@ -789,7 +853,8 @@ extension APIProtocol { /// /// List all discussions on a team's page. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -812,7 +877,8 @@ extension APIProtocol { /// /// This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -833,7 +899,8 @@ extension APIProtocol { /// /// Get a specific discussion on a team's page. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -852,7 +919,8 @@ extension APIProtocol { /// /// Edits the title and body text of a discussion post. Only the parameters you provide are updated. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -873,7 +941,8 @@ extension APIProtocol { /// /// Delete a discussion from a team's page. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -886,7 +955,8 @@ extension APIProtocol { /// /// List all comments on a team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -909,7 +979,8 @@ extension APIProtocol { /// /// This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -930,7 +1001,8 @@ extension APIProtocol { /// /// Get a specific comment on a team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -949,7 +1021,8 @@ extension APIProtocol { /// /// Edits the body text of a discussion comment. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -970,7 +1043,8 @@ extension APIProtocol { /// /// Deletes a comment on a team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -983,7 +1057,8 @@ extension APIProtocol { /// /// The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/invitations`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/invitations/get(teams/list-pending-invitations-in-org)`. @@ -1023,10 +1098,11 @@ extension APIProtocol { /// /// To get a user's membership with a team, the team must be visible to the authenticated user. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. /// - /// **Note:** - /// The response contains the `state` of the membership and the member's `role`. + /// > [!NOTE] + /// > The response contains the `state` of the membership and the member's `role`. /// /// The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/teams/teams#create-a-team). /// @@ -1047,13 +1123,15 @@ extension APIProtocol { /// /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. /// /// If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. /// /// - Remark: HTTP `PUT /orgs/{org}/teams/{team_slug}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/memberships/{username}/put(teams/add-or-update-membership-for-user-in-org)`. @@ -1074,9 +1152,11 @@ extension APIProtocol { /// /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/memberships/{username}/delete(teams/remove-membership-for-user-in-org)`. @@ -1087,7 +1167,8 @@ extension APIProtocol { /// /// Lists the organization projects for a team. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/projects`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/get(teams/list-projects-in-org)`. @@ -1106,7 +1187,8 @@ extension APIProtocol { /// /// Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/projects/{project_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/{project_id}/get(teams/check-permissions-for-project-in-org)`. @@ -1123,7 +1205,8 @@ extension APIProtocol { /// /// Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. /// /// - Remark: HTTP `PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/{project_id}/put(teams/add-or-update-project-permissions-in-org)`. @@ -1142,7 +1225,8 @@ extension APIProtocol { /// /// Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. This endpoint removes the project from the team, but does not delete the project. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/{project_id}/delete(teams/remove-project-in-org)`. @@ -1153,7 +1237,8 @@ extension APIProtocol { /// /// Lists a team's repositories visible to the authenticated user. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/repos`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/repos/get(teams/list-repos-in-org)`. @@ -1178,7 +1263,8 @@ extension APIProtocol { /// /// If the repository is private, you must have at least `read` permission for that repository, and your token must have the `repo` or `admin:org` scope. Otherwise, you will receive a `404 Not Found` response status. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}/get(teams/check-permissions-for-repo-in-org)`. @@ -1195,7 +1281,8 @@ extension APIProtocol { /// /// To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. /// /// For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". /// @@ -1214,7 +1301,8 @@ extension APIProtocol { /// /// If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}/delete(teams/remove-repo-in-org)`. @@ -1225,7 +1313,8 @@ extension APIProtocol { /// /// Lists the child teams of the team specified by `{team_slug}`. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/teams`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/teams/get(teams/list-child-in-org)`. @@ -1242,7 +1331,8 @@ extension APIProtocol { } /// Get a team (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/teams/teams#get-a-team-by-name) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/teams/teams#get-a-team-by-name) endpoint. /// /// - Remark: HTTP `GET /teams/{team_id}`. /// - Remark: Generated from `#/paths//teams/{team_id}/get(teams/get-legacy)`. @@ -1258,11 +1348,13 @@ extension APIProtocol { } /// Update a team (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/teams/teams#update-a-team) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/teams/teams#update-a-team) endpoint. /// /// To edit a team, the authenticated user must either be an organization owner or a team maintainer. /// - /// **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + /// > [!NOTE] + /// > With nested teams, the `privacy` for parent teams cannot be `secret`. /// /// - Remark: HTTP `PATCH /teams/{team_id}`. /// - Remark: Generated from `#/paths//teams/{team_id}/patch(teams/update-legacy)`. @@ -1280,7 +1372,8 @@ extension APIProtocol { } /// Delete a team (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/teams/teams#delete-a-team) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/teams/teams#delete-a-team) endpoint. /// /// To delete a team, the authenticated user must be an organization owner or team maintainer. /// @@ -1300,7 +1393,8 @@ extension APIProtocol { } /// List discussions (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/teams/discussions#list-discussions) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/teams/discussions#list-discussions) endpoint. /// /// List all discussions on a team's page. /// @@ -1322,7 +1416,8 @@ extension APIProtocol { } /// Create a discussion (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/teams/discussions#create-a-discussion) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/teams/discussions#create-a-discussion) endpoint. /// /// Creates a new discussion post on a team's page. /// @@ -1346,7 +1441,8 @@ extension APIProtocol { } /// Get a discussion (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion) endpoint. /// /// Get a specific discussion on a team's page. /// @@ -1366,7 +1462,8 @@ extension APIProtocol { } /// Update a discussion (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/teams/discussions#update-a-discussion) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/teams/discussions#update-a-discussion) endpoint. /// /// Edits the title and body text of a discussion post. Only the parameters you provide are updated. /// @@ -1388,7 +1485,8 @@ extension APIProtocol { } /// Delete a discussion (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/teams/discussions#delete-a-discussion) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/teams/discussions#delete-a-discussion) endpoint. /// /// Delete a discussion from a team's page. /// @@ -1402,7 +1500,8 @@ extension APIProtocol { } /// List discussion comments (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/teams/discussion-comments#list-discussion-comments) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/teams/discussion-comments#list-discussion-comments) endpoint. /// /// List all comments on a team discussion. /// @@ -1424,7 +1523,8 @@ extension APIProtocol { } /// Create a discussion comment (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment) endpoint. /// /// Creates a new comment on a team discussion. /// @@ -1448,7 +1548,8 @@ extension APIProtocol { } /// Get a discussion comment (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment) endpoint. /// /// Get a specific comment on a team discussion. /// @@ -1468,7 +1569,8 @@ extension APIProtocol { } /// Update a discussion comment (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/teams/discussion-comments#update-a-discussion-comment) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/teams/discussion-comments#update-a-discussion-comment) endpoint. /// /// Edits the body text of a discussion comment. /// @@ -1490,7 +1592,8 @@ extension APIProtocol { } /// Delete a discussion comment (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/teams/discussion-comments#delete-a-discussion-comment) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/teams/discussion-comments#delete-a-discussion-comment) endpoint. /// /// Deletes a comment on a team discussion. /// @@ -1504,7 +1607,8 @@ extension APIProtocol { } /// List pending team invitations (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/teams/members#list-pending-team-invitations) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/teams/members#list-pending-team-invitations) endpoint. /// /// The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. /// @@ -1524,7 +1628,8 @@ extension APIProtocol { } /// List team members (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/teams/members#list-team-members) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/teams/members#list-team-members) endpoint. /// /// Team members will include the members of child teams. /// @@ -1566,7 +1671,8 @@ extension APIProtocol { /// /// To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." /// @@ -1592,7 +1698,8 @@ extension APIProtocol { /// /// To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// - Remark: HTTP `DELETE /teams/{team_id}/members/{username}`. /// - Remark: Generated from `#/paths//teams/{team_id}/members/{username}/delete(teams/remove-member-legacy)`. @@ -1602,7 +1709,8 @@ extension APIProtocol { } /// Get team membership for a user (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/teams/members#get-team-membership-for-a-user) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/teams/members#get-team-membership-for-a-user) endpoint. /// /// Team members will include the members of child teams. /// @@ -1627,13 +1735,15 @@ extension APIProtocol { } /// Add or update team membership for a user (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user) endpoint. /// /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. /// /// If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. /// @@ -1655,13 +1765,15 @@ extension APIProtocol { } /// Remove team membership for a user (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user) endpoint. /// /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. /// /// To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// - Remark: HTTP `DELETE /teams/{team_id}/memberships/{username}`. /// - Remark: Generated from `#/paths//teams/{team_id}/memberships/{username}/delete(teams/remove-membership-for-user-legacy)`. @@ -1671,7 +1783,8 @@ extension APIProtocol { } /// List team projects (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/teams/teams#list-team-projects) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/teams/teams#list-team-projects) endpoint. /// /// Lists the organization projects for a team. /// @@ -1691,7 +1804,8 @@ extension APIProtocol { } /// Check team permissions for a project (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-project) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-project) endpoint. /// /// Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. /// @@ -1709,7 +1823,8 @@ extension APIProtocol { } /// Add or update team project permissions (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-project-permissions) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-project-permissions) endpoint. /// /// Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. /// @@ -1729,7 +1844,8 @@ extension APIProtocol { } /// Remove a project from a team (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/teams/teams#remove-a-project-from-a-team) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/teams/teams#remove-a-project-from-a-team) endpoint. /// /// Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. /// @@ -1747,7 +1863,8 @@ extension APIProtocol { } /// List team repositories (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/teams/teams#list-team-repositories) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/teams/teams#list-team-repositories) endpoint. /// /// - Remark: HTTP `GET /teams/{team_id}/repos`. /// - Remark: Generated from `#/paths//teams/{team_id}/repos/get(teams/list-repos-legacy)`. @@ -1765,9 +1882,11 @@ extension APIProtocol { } /// Check team permissions for a repository (Legacy) /// - /// **Note**: Repositories inherited through a parent team will also be checked. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository) endpoint. /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository) endpoint. + /// > [!NOTE] + /// > Repositories inherited through a parent team will also be checked. /// /// You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types/) via the `Accept` header: /// @@ -1785,7 +1904,8 @@ extension APIProtocol { } /// Add or update team repository permissions (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-repository-permissions)" endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-repository-permissions)" endpoint. /// /// To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. /// @@ -1807,7 +1927,8 @@ extension APIProtocol { } /// Remove a repository from a team (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/teams/teams#remove-a-repository-from-a-team) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/teams/teams#remove-a-repository-from-a-team) endpoint. /// /// If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. /// @@ -1819,7 +1940,8 @@ extension APIProtocol { } /// List child teams (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/teams/teams#list-child-teams) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/teams/teams#list-child-teams) endpoint. /// /// - Remark: HTTP `GET /teams/{team_id}/teams`. /// - Remark: Generated from `#/paths//teams/{team_id}/teams/get(teams/list-child-legacy)`. @@ -5789,7 +5911,8 @@ public enum Operations { /// /// Gets a team using the team's `slug`. To create the `slug`, GitHub replaces special characters in the `name` string, changes all words to lowercase, and replaces spaces with a `-` separator. For example, `"My TEam Näme"` would become `my-team-name`. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/get(teams/get-by-name)`. @@ -5955,7 +6078,8 @@ public enum Operations { /// /// To edit a team, the authenticated user must either be an organization owner or a team maintainer. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. /// /// - Remark: HTTP `PATCH /orgs/{org}/teams/{team_slug}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/patch(teams/update-in-org)`. @@ -6324,7 +6448,8 @@ public enum Operations { /// /// If you are an organization owner, deleting a parent team will delete all of its child teams as well. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/delete(teams/delete-in-org)`. @@ -6401,7 +6526,8 @@ public enum Operations { /// /// List all discussions on a team's page. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -6613,7 +6739,8 @@ public enum Operations { /// /// This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -6802,7 +6929,8 @@ public enum Operations { /// /// Get a specific discussion on a team's page. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -6954,7 +7082,8 @@ public enum Operations { /// /// Edits the title and body text of a discussion post. Only the parameters you provide are updated. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -7142,7 +7271,8 @@ public enum Operations { /// /// Delete a discussion from a team's page. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -7228,7 +7358,8 @@ public enum Operations { /// /// List all comments on a team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -7440,7 +7571,8 @@ public enum Operations { /// /// This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -7618,7 +7750,8 @@ public enum Operations { /// /// Get a specific comment on a team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. /// @@ -7777,7 +7910,8 @@ public enum Operations { /// /// Edits the body text of a discussion comment. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -7962,7 +8096,8 @@ public enum Operations { /// /// Deletes a comment on a team discussion. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. /// /// OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. /// @@ -8055,7 +8190,8 @@ public enum Operations { /// /// The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/invitations`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/invitations/get(teams/list-pending-invitations-in-org)`. @@ -8448,10 +8584,11 @@ public enum Operations { /// /// To get a user's membership with a team, the team must be visible to the authenticated user. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. /// - /// **Note:** - /// The response contains the `state` of the membership and the member's `role`. + /// > [!NOTE] + /// > The response contains the `state` of the membership and the member's `role`. /// /// The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/teams/teams#create-a-team). /// @@ -8632,13 +8769,15 @@ public enum Operations { /// /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. /// /// If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. /// /// - Remark: HTTP `PUT /orgs/{org}/teams/{team_slug}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/memberships/{username}/put(teams/add-or-update-membership-for-user-in-org)`. @@ -8877,9 +9016,11 @@ public enum Operations { /// /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/memberships/{username}/delete(teams/remove-membership-for-user-in-org)`. @@ -8990,7 +9131,8 @@ public enum Operations { /// /// Lists the organization projects for a team. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/projects`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/get(teams/list-projects-in-org)`. @@ -9179,7 +9321,8 @@ public enum Operations { /// /// Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/projects/{project_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/{project_id}/get(teams/check-permissions-for-project-in-org)`. @@ -9356,7 +9499,8 @@ public enum Operations { /// /// Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. /// /// - Remark: HTTP `PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/{project_id}/put(teams/add-or-update-project-permissions-in-org)`. @@ -9590,7 +9734,8 @@ public enum Operations { /// /// Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. This endpoint removes the project from the team, but does not delete the project. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/projects/{project_id}/delete(teams/remove-project-in-org)`. @@ -9674,7 +9819,8 @@ public enum Operations { /// /// Lists a team's repositories visible to the authenticated user. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/repos`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/repos/get(teams/list-repos-in-org)`. @@ -9869,7 +10015,8 @@ public enum Operations { /// /// If the repository is private, you must have at least `read` permission for that repository, and your token must have the `repo` or `admin:org` scope. Otherwise, you will receive a `404 Not Found` response status. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}/get(teams/check-permissions-for-repo-in-org)`. @@ -10080,7 +10227,8 @@ public enum Operations { /// /// To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. /// /// For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". /// @@ -10201,7 +10349,8 @@ public enum Operations { /// /// If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. /// /// - Remark: HTTP `DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}/delete(teams/remove-repo-in-org)`. @@ -10292,7 +10441,8 @@ public enum Operations { /// /// Lists the child teams of the team specified by `{team_slug}`. /// - /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + /// > [!NOTE] + /// > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. /// /// - Remark: HTTP `GET /orgs/{org}/teams/{team_slug}/teams`. /// - Remark: Generated from `#/paths//orgs/{org}/teams/{team_slug}/teams/get(teams/list-child-in-org)`. @@ -10479,7 +10629,8 @@ public enum Operations { } /// Get a team (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/teams/teams#get-a-team-by-name) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/teams/teams#get-a-team-by-name) endpoint. /// /// - Remark: HTTP `GET /teams/{team_id}`. /// - Remark: Generated from `#/paths//teams/{team_id}/get(teams/get-legacy)`. @@ -10634,11 +10785,13 @@ public enum Operations { } /// Update a team (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/teams/teams#update-a-team) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/teams/teams#update-a-team) endpoint. /// /// To edit a team, the authenticated user must either be an organization owner or a team maintainer. /// - /// **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + /// > [!NOTE] + /// > With nested teams, the `privacy` for parent teams cannot be `secret`. /// /// - Remark: HTTP `PATCH /teams/{team_id}`. /// - Remark: Generated from `#/paths//teams/{team_id}/patch(teams/update-legacy)`. @@ -10994,7 +11147,8 @@ public enum Operations { } /// Delete a team (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/teams/teams#delete-a-team) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/teams/teams#delete-a-team) endpoint. /// /// To delete a team, the authenticated user must be an organization owner or team maintainer. /// @@ -11152,7 +11306,8 @@ public enum Operations { } /// List discussions (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/teams/discussions#list-discussions) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/teams/discussions#list-discussions) endpoint. /// /// List all discussions on a team's page. /// @@ -11346,7 +11501,8 @@ public enum Operations { } /// Create a discussion (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/teams/discussions#create-a-discussion) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/teams/discussions#create-a-discussion) endpoint. /// /// Creates a new discussion post on a team's page. /// @@ -11528,7 +11684,8 @@ public enum Operations { } /// Get a discussion (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion) endpoint. /// /// Get a specific discussion on a team's page. /// @@ -11673,7 +11830,8 @@ public enum Operations { } /// Update a discussion (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/teams/discussions#update-a-discussion) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/teams/discussions#update-a-discussion) endpoint. /// /// Edits the title and body text of a discussion post. Only the parameters you provide are updated. /// @@ -11854,7 +12012,8 @@ public enum Operations { } /// Delete a discussion (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/teams/discussions#delete-a-discussion) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/teams/discussions#delete-a-discussion) endpoint. /// /// Delete a discussion from a team's page. /// @@ -11933,7 +12092,8 @@ public enum Operations { } /// List discussion comments (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/teams/discussion-comments#list-discussion-comments) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/teams/discussion-comments#list-discussion-comments) endpoint. /// /// List all comments on a team discussion. /// @@ -12136,7 +12296,8 @@ public enum Operations { } /// Create a discussion comment (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment) endpoint. /// /// Creates a new comment on a team discussion. /// @@ -12309,7 +12470,8 @@ public enum Operations { } /// Get a discussion comment (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment) endpoint. /// /// Get a specific comment on a team discussion. /// @@ -12461,7 +12623,8 @@ public enum Operations { } /// Update a discussion comment (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/teams/discussion-comments#update-a-discussion-comment) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/teams/discussion-comments#update-a-discussion-comment) endpoint. /// /// Edits the body text of a discussion comment. /// @@ -12639,7 +12802,8 @@ public enum Operations { } /// Delete a discussion comment (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/teams/discussion-comments#delete-a-discussion-comment) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/teams/discussion-comments#delete-a-discussion-comment) endpoint. /// /// Deletes a comment on a team discussion. /// @@ -12725,7 +12889,8 @@ public enum Operations { } /// List pending team invitations (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/teams/members#list-pending-team-invitations) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/teams/members#list-pending-team-invitations) endpoint. /// /// The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. /// @@ -12905,7 +13070,8 @@ public enum Operations { } /// List team members (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/teams/members#list-team-members) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/teams/members#list-team-members) endpoint. /// /// Team members will include the members of child teams. /// @@ -13235,7 +13401,8 @@ public enum Operations { /// /// To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." /// @@ -13439,7 +13606,8 @@ public enum Operations { /// /// To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// - Remark: HTTP `DELETE /teams/{team_id}/members/{username}`. /// - Remark: Generated from `#/paths//teams/{team_id}/members/{username}/delete(teams/remove-member-legacy)`. @@ -13541,7 +13709,8 @@ public enum Operations { } /// Get team membership for a user (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/teams/members#get-team-membership-for-a-user) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/teams/members#get-team-membership-for-a-user) endpoint. /// /// Team members will include the members of child teams. /// @@ -13714,13 +13883,15 @@ public enum Operations { } /// Add or update team membership for a user (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user) endpoint. /// /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. /// /// If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. /// @@ -13975,13 +14146,15 @@ public enum Operations { } /// Remove team membership for a user (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user) endpoint. /// /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. /// /// To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. /// - /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// > [!NOTE] + /// > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." /// /// - Remark: HTTP `DELETE /teams/{team_id}/memberships/{username}`. /// - Remark: Generated from `#/paths//teams/{team_id}/memberships/{username}/delete(teams/remove-membership-for-user-legacy)`. @@ -14083,7 +14256,8 @@ public enum Operations { } /// List team projects (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/teams/teams#list-team-projects) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/teams/teams#list-team-projects) endpoint. /// /// Lists the organization projects for a team. /// @@ -14286,7 +14460,8 @@ public enum Operations { } /// Check team permissions for a project (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-project) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-project) endpoint. /// /// Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. /// @@ -14456,7 +14631,8 @@ public enum Operations { } /// Add or update team project permissions (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-project-permissions) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-project-permissions) endpoint. /// /// Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. /// @@ -14729,7 +14905,8 @@ public enum Operations { } /// Remove a project from a team (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/teams/teams#remove-a-project-from-a-team) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/teams/teams#remove-a-project-from-a-team) endpoint. /// /// Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. /// @@ -14894,7 +15071,8 @@ public enum Operations { } /// List team repositories (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/teams/teams#list-team-repositories) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/teams/teams#list-team-repositories) endpoint. /// /// - Remark: HTTP `GET /teams/{team_id}/repos`. /// - Remark: Generated from `#/paths//teams/{team_id}/repos/get(teams/list-repos-legacy)`. @@ -15095,9 +15273,11 @@ public enum Operations { } /// Check team permissions for a repository (Legacy) /// - /// **Note**: Repositories inherited through a parent team will also be checked. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository) endpoint. /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository) endpoint. + /// > [!NOTE] + /// > Repositories inherited through a parent team will also be checked. /// /// You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types/) via the `Accept` header: /// @@ -15301,7 +15481,8 @@ public enum Operations { } /// Add or update team repository permissions (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-repository-permissions)" endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-repository-permissions)" endpoint. /// /// To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. /// @@ -15509,7 +15690,8 @@ public enum Operations { } /// Remove a repository from a team (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/teams/teams#remove-a-repository-from-a-team) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/teams/teams#remove-a-repository-from-a-team) endpoint. /// /// If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. /// @@ -15593,7 +15775,8 @@ public enum Operations { } /// List child teams (Legacy) /// - /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/teams/teams#list-child-teams) endpoint. + /// > [!WARNING] + /// > **Deprecation notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/teams/teams#list-child-teams) endpoint. /// /// - Remark: HTTP `GET /teams/{team_id}/teams`. /// - Remark: Generated from `#/paths//teams/{team_id}/teams/get(teams/list-child-legacy)`. From c8f11dda11b53740e3392dd1f99187a19bad81a6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 22 Jul 2024 21:56:14 +0000 Subject: [PATCH 106/152] Commit via running ake Sources/copilot --- Sources/copilot/Client.swift | 30 ++++++++---- Sources/copilot/Types.swift | 90 ++++++++++++++++++++++++------------ 2 files changed, 80 insertions(+), 40 deletions(-) diff --git a/Sources/copilot/Client.swift b/Sources/copilot/Client.swift index 8f654366a6f..67d2e428196 100644 --- a/Sources/copilot/Client.swift +++ b/Sources/copilot/Client.swift @@ -40,7 +40,8 @@ public struct Client: APIProtocol { } /// List all Copilot seat assignments for an enterprise /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription. /// @@ -224,7 +225,8 @@ public struct Client: APIProtocol { } /// Get a summary of Copilot usage for enterprise members /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE /// for all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances, @@ -416,7 +418,8 @@ public struct Client: APIProtocol { } /// Get Copilot seat information and settings for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Gets information about an organization's Copilot subscription, including seat breakdown /// and feature policies. To configure these settings, go to your organization's settings on GitHub.com. @@ -578,7 +581,8 @@ public struct Client: APIProtocol { } /// List all Copilot seat assignments for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription. /// Only organization owners can view assigned seats. @@ -757,7 +761,8 @@ public struct Client: APIProtocol { } /// Add teams to the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Purchases a GitHub Copilot seat for all users within each specified team. /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". @@ -933,7 +938,8 @@ public struct Client: APIProtocol { } /// Remove teams from the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Cancels the Copilot seat assignment for all members of each team specified. /// This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. @@ -1107,7 +1113,8 @@ public struct Client: APIProtocol { } /// Add users to the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Purchases a GitHub Copilot seat for each user specified. /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". @@ -1283,7 +1290,8 @@ public struct Client: APIProtocol { } /// Remove users from the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Cancels the Copilot seat assignment for each user specified. /// This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. @@ -1457,7 +1465,8 @@ public struct Client: APIProtocol { } /// Get a summary of Copilot usage for organization members /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE /// across an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. @@ -1649,7 +1658,8 @@ public struct Client: APIProtocol { } /// Get Copilot seat assignment details for a user /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Gets the GitHub Copilot seat assignment details for a member of an organization who currently has access to GitHub Copilot. /// diff --git a/Sources/copilot/Types.swift b/Sources/copilot/Types.swift index 8bc31623a37..3757e956641 100644 --- a/Sources/copilot/Types.swift +++ b/Sources/copilot/Types.swift @@ -13,7 +13,8 @@ import struct Foundation.Date public protocol APIProtocol: Sendable { /// List all Copilot seat assignments for an enterprise /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription. /// @@ -30,7 +31,8 @@ public protocol APIProtocol: Sendable { func copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise(_ input: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Input) async throws -> Operations.copilot_sol_list_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_enterprise.Output /// Get a summary of Copilot usage for enterprise members /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE /// for all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances, @@ -49,7 +51,8 @@ public protocol APIProtocol: Sendable { func copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise(_ input: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Input) async throws -> Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Output /// Get Copilot seat information and settings for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Gets information about an organization's Copilot subscription, including seat breakdown /// and feature policies. To configure these settings, go to your organization's settings on GitHub.com. @@ -64,7 +67,8 @@ public protocol APIProtocol: Sendable { func copilot_sol_get_hyphen_copilot_hyphen_organization_hyphen_details(_ input: Operations.copilot_sol_get_hyphen_copilot_hyphen_organization_hyphen_details.Input) async throws -> Operations.copilot_sol_get_hyphen_copilot_hyphen_organization_hyphen_details.Output /// List all Copilot seat assignments for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription. /// Only organization owners can view assigned seats. @@ -76,7 +80,8 @@ public protocol APIProtocol: Sendable { func copilot_sol_list_hyphen_copilot_hyphen_seats(_ input: Operations.copilot_sol_list_hyphen_copilot_hyphen_seats.Input) async throws -> Operations.copilot_sol_list_hyphen_copilot_hyphen_seats.Output /// Add teams to the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Purchases a GitHub Copilot seat for all users within each specified team. /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". @@ -96,7 +101,8 @@ public protocol APIProtocol: Sendable { func copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_teams(_ input: Operations.copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_teams.Input) async throws -> Operations.copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_teams.Output /// Remove teams from the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Cancels the Copilot seat assignment for all members of each team specified. /// This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. @@ -114,7 +120,8 @@ public protocol APIProtocol: Sendable { func copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_teams(_ input: Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_teams.Input) async throws -> Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_teams.Output /// Add users to the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Purchases a GitHub Copilot seat for each user specified. /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". @@ -134,7 +141,8 @@ public protocol APIProtocol: Sendable { func copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_users(_ input: Operations.copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_users.Input) async throws -> Operations.copilot_sol_add_hyphen_copilot_hyphen_seats_hyphen_for_hyphen_users.Output /// Remove users from the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Cancels the Copilot seat assignment for each user specified. /// This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. @@ -152,7 +160,8 @@ public protocol APIProtocol: Sendable { func copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_users(_ input: Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_users.Input) async throws -> Operations.copilot_sol_cancel_hyphen_copilot_hyphen_seat_hyphen_assignment_hyphen_for_hyphen_users.Output /// Get a summary of Copilot usage for organization members /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE /// across an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. @@ -171,7 +180,8 @@ public protocol APIProtocol: Sendable { func copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_org(_ input: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_org.Input) async throws -> Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_org.Output /// Get Copilot seat assignment details for a user /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Gets the GitHub Copilot seat assignment details for a member of an organization who currently has access to GitHub Copilot. /// @@ -188,7 +198,8 @@ public protocol APIProtocol: Sendable { extension APIProtocol { /// List all Copilot seat assignments for an enterprise /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription. /// @@ -215,7 +226,8 @@ extension APIProtocol { } /// Get a summary of Copilot usage for enterprise members /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE /// for all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances, @@ -244,7 +256,8 @@ extension APIProtocol { } /// Get Copilot seat information and settings for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Gets information about an organization's Copilot subscription, including seat breakdown /// and feature policies. To configure these settings, go to your organization's settings on GitHub.com. @@ -267,7 +280,8 @@ extension APIProtocol { } /// List all Copilot seat assignments for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription. /// Only organization owners can view assigned seats. @@ -289,7 +303,8 @@ extension APIProtocol { } /// Add teams to the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Purchases a GitHub Copilot seat for all users within each specified team. /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". @@ -319,7 +334,8 @@ extension APIProtocol { } /// Remove teams from the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Cancels the Copilot seat assignment for all members of each team specified. /// This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. @@ -347,7 +363,8 @@ extension APIProtocol { } /// Add users to the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Purchases a GitHub Copilot seat for each user specified. /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". @@ -377,7 +394,8 @@ extension APIProtocol { } /// Remove users from the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Cancels the Copilot seat assignment for each user specified. /// This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. @@ -405,7 +423,8 @@ extension APIProtocol { } /// Get a summary of Copilot usage for organization members /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE /// across an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. @@ -434,7 +453,8 @@ extension APIProtocol { } /// Get Copilot seat assignment details for a user /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Gets the GitHub Copilot seat assignment details for a member of an organization who currently has access to GitHub Copilot. /// @@ -2203,7 +2223,8 @@ public enum Components { public enum Operations { /// List all Copilot seat assignments for an enterprise /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription. /// @@ -2508,7 +2529,8 @@ public enum Operations { } /// Get a summary of Copilot usage for enterprise members /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE /// for all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances, @@ -2785,7 +2807,8 @@ public enum Operations { } /// Get Copilot seat information and settings for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Gets information about an organization's Copilot subscription, including seat breakdown /// and feature policies. To configure these settings, go to your organization's settings on GitHub.com. @@ -3044,7 +3067,8 @@ public enum Operations { } /// List all Copilot seat assignments for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription. /// Only organization owners can view assigned seats. @@ -3344,7 +3368,8 @@ public enum Operations { } /// Add teams to the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Purchases a GitHub Copilot seat for all users within each specified team. /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". @@ -3651,7 +3676,8 @@ public enum Operations { } /// Remove teams from the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Cancels the Copilot seat assignment for all members of each team specified. /// This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. @@ -3956,7 +3982,8 @@ public enum Operations { } /// Add users to the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Purchases a GitHub Copilot seat for each user specified. /// The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". @@ -4263,7 +4290,8 @@ public enum Operations { } /// Remove users from the Copilot subscription for an organization /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Cancels the Copilot seat assignment for each user specified. /// This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. @@ -4568,7 +4596,8 @@ public enum Operations { } /// Get a summary of Copilot usage for organization members /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE /// across an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. @@ -4845,7 +4874,8 @@ public enum Operations { } /// Get Copilot seat assignment details for a user /// - /// **Note**: This endpoint is in beta and is subject to change. + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. /// /// Gets the GitHub Copilot seat assignment details for a member of an organization who currently has access to GitHub Copilot. /// From c9dc190104c3cc1f3d4d54329eff10b545b96a84 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 22 Jul 2024 21:56:35 +0000 Subject: [PATCH 107/152] Commit via running ake Sources/security-advisories --- Sources/security-advisories/Client.swift | 3 ++- Sources/security-advisories/Types.swift | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Sources/security-advisories/Client.swift b/Sources/security-advisories/Client.swift index d6956a89148..ce8962c0ec1 100644 --- a/Sources/security-advisories/Client.swift +++ b/Sources/security-advisories/Client.swift @@ -1392,7 +1392,8 @@ public struct Client: APIProtocol { /// /// Create a temporary private fork to collaborate on fixing a security vulnerability in your repository. /// - /// **Note**: Forking a repository happens asynchronously. You may have to wait up to 5 minutes before you can access the fork. + /// > [!NOTE] + /// > Forking a repository happens asynchronously. You may have to wait up to 5 minutes before you can access the fork. /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks/post(security-advisories/create-fork)`. diff --git a/Sources/security-advisories/Types.swift b/Sources/security-advisories/Types.swift index 44c750f8be3..592af5e8309 100644 --- a/Sources/security-advisories/Types.swift +++ b/Sources/security-advisories/Types.swift @@ -111,7 +111,8 @@ public protocol APIProtocol: Sendable { /// /// Create a temporary private fork to collaborate on fixing a security vulnerability in your repository. /// - /// **Note**: Forking a repository happens asynchronously. You may have to wait up to 5 minutes before you can access the fork. + /// > [!NOTE] + /// > Forking a repository happens asynchronously. You may have to wait up to 5 minutes before you can access the fork. /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks/post(security-advisories/create-fork)`. @@ -302,7 +303,8 @@ extension APIProtocol { /// /// Create a temporary private fork to collaborate on fixing a security vulnerability in your repository. /// - /// **Note**: Forking a repository happens asynchronously. You may have to wait up to 5 minutes before you can access the fork. + /// > [!NOTE] + /// > Forking a repository happens asynchronously. You may have to wait up to 5 minutes before you can access the fork. /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks/post(security-advisories/create-fork)`. @@ -8493,7 +8495,8 @@ public enum Operations { /// /// Create a temporary private fork to collaborate on fixing a security vulnerability in your repository. /// - /// **Note**: Forking a repository happens asynchronously. You may have to wait up to 5 minutes before you can access the fork. + /// > [!NOTE] + /// > Forking a repository happens asynchronously. You may have to wait up to 5 minutes before you can access the fork. /// /// - Remark: HTTP `POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks/post(security-advisories/create-fork)`. From ffd7365b3067a963f84403cfb2cbacb564959661 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 22 Jul 2024 21:58:19 +0000 Subject: [PATCH 108/152] Commit via running ake Sources/code-security --- Sources/code-security/Types.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Sources/code-security/Types.swift b/Sources/code-security/Types.swift index 2243d502a7a..0884b269c6e 100644 --- a/Sources/code-security/Types.swift +++ b/Sources/code-security/Types.swift @@ -1510,8 +1510,7 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/GET/query/target_type`. public var target_type: Operations.code_hyphen_security_sol_get_hyphen_configurations_hyphen_for_hyphen_org.Input.Query.target_typePayload? - /// 'The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."' - /// + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/GET/query/per_page`. public var per_page: Swift.Int? @@ -1527,7 +1526,7 @@ public enum Operations { /// /// - Parameters: /// - target_type: The target type of the code security configuration - /// - per_page: 'The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."' + /// - per_page: The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." /// - before: A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." /// - after: A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." public init( From 6d7d071355d4fdbae1e53faa8d6bc49901868f1f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 21:50:03 +0000 Subject: [PATCH 109/152] Bump Submodule/github/rest-api-description from `9272e44` to `2a8a2c6` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `9272e44` to `2a8a2c6`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/9272e440b6a4964e58ddeab80d6011333af3a04f...2a8a2c6f064a6d0c2bff8cb96b43791beb470f07) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index 9272e440b6a..2a8a2c6f064 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit 9272e440b6a4964e58ddeab80d6011333af3a04f +Subproject commit 2a8a2c6f064a6d0c2bff8cb96b43791beb470f07 From 679825db854de5c9ad7dec60defde36e7378176f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 29 Jul 2024 22:10:59 +0000 Subject: [PATCH 110/152] Commit via running ake Sources/issues --- Sources/issues/Types.swift | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Sources/issues/Types.swift b/Sources/issues/Types.swift index 79ba5083877..63fa1666ebf 100644 --- a/Sources/issues/Types.swift +++ b/Sources/issues/Types.swift @@ -6292,6 +6292,8 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/label`. public struct label: Codable, Hashable, Sendable { + /// Unique identifier for the label. + /// /// - Remark: Generated from `#/components/schemas/label/id`. public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/label/node_id`. @@ -6304,24 +6306,28 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/label/name`. public var name: Swift.String + /// Optional description of the label, such as its purpose. + /// /// - Remark: Generated from `#/components/schemas/label/description`. public var description: Swift.String? /// 6-character hex code, without the leading #, identifying the color /// /// - Remark: Generated from `#/components/schemas/label/color`. public var color: Swift.String + /// Whether this label comes by default in a new repository. + /// /// - Remark: Generated from `#/components/schemas/label/default`. public var _default: Swift.Bool /// Creates a new `label`. /// /// - Parameters: - /// - id: + /// - id: Unique identifier for the label. /// - node_id: /// - url: URL for the label /// - name: The name of the label. - /// - description: + /// - description: Optional description of the label, such as its purpose. /// - color: 6-character hex code, without the leading #, identifying the color - /// - _default: + /// - _default: Whether this label comes by default in a new repository. public init( id: Swift.Int64, node_id: Swift.String, From e6cc31dbd6818fb91a5158a9175a0a94af221513 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 29 Jul 2024 22:13:24 +0000 Subject: [PATCH 111/152] Commit via running ake Sources/orgs --- Sources/orgs/Client.swift | 2 +- Sources/orgs/Types.swift | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/orgs/Client.swift b/Sources/orgs/Client.swift index 51f3dd1da5d..aa1172aad99 100644 --- a/Sources/orgs/Client.swift +++ b/Sources/orgs/Client.swift @@ -6729,7 +6729,7 @@ public struct Client: APIProtocol { /// Enable or disable a security feature for an organization /// /// > [!WARNING] - /// > **Deprecation notice:** The ability to enable or disable a security feature for all eligible repositories in an organization is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. For more information, see the [changelog](https://github.blog/changelog/2024-07-22-deprecation-api-endpoint-to-enable-or-disable-a-security-feature-for-an-organization/). + /// > **Deprecation notice:** The ability to enable or disable a security feature for all eligible repositories in an organization is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. For more information, see the [changelog](https://github.blog/changelog/2024-07-22-deprecation-of-api-endpoint-to-enable-or-disable-a-security-feature-for-an-organization/). /// /// Enables or disables the specified security feature for all eligible repositories in an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index 03b208720a2..6a8233b3e39 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -694,7 +694,7 @@ public protocol APIProtocol: Sendable { /// Enable or disable a security feature for an organization /// /// > [!WARNING] - /// > **Deprecation notice:** The ability to enable or disable a security feature for all eligible repositories in an organization is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. For more information, see the [changelog](https://github.blog/changelog/2024-07-22-deprecation-api-endpoint-to-enable-or-disable-a-security-feature-for-an-organization/). + /// > **Deprecation notice:** The ability to enable or disable a security feature for all eligible repositories in an organization is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. For more information, see the [changelog](https://github.blog/changelog/2024-07-22-deprecation-of-api-endpoint-to-enable-or-disable-a-security-feature-for-an-organization/). /// /// Enables or disables the specified security feature for all eligible repositories in an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// @@ -1960,7 +1960,7 @@ extension APIProtocol { /// Enable or disable a security feature for an organization /// /// > [!WARNING] - /// > **Deprecation notice:** The ability to enable or disable a security feature for all eligible repositories in an organization is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. For more information, see the [changelog](https://github.blog/changelog/2024-07-22-deprecation-api-endpoint-to-enable-or-disable-a-security-feature-for-an-organization/). + /// > **Deprecation notice:** The ability to enable or disable a security feature for all eligible repositories in an organization is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. For more information, see the [changelog](https://github.blog/changelog/2024-07-22-deprecation-of-api-endpoint-to-enable-or-disable-a-security-feature-for-an-organization/). /// /// Enables or disables the specified security feature for all eligible repositories in an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// @@ -20370,7 +20370,7 @@ public enum Operations { /// Enable or disable a security feature for an organization /// /// > [!WARNING] - /// > **Deprecation notice:** The ability to enable or disable a security feature for all eligible repositories in an organization is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. For more information, see the [changelog](https://github.blog/changelog/2024-07-22-deprecation-api-endpoint-to-enable-or-disable-a-security-feature-for-an-organization/). + /// > **Deprecation notice:** The ability to enable or disable a security feature for all eligible repositories in an organization is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. For more information, see the [changelog](https://github.blog/changelog/2024-07-22-deprecation-of-api-endpoint-to-enable-or-disable-a-security-feature-for-an-organization/). /// /// Enables or disables the specified security feature for all eligible repositories in an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." /// From 68a6182ec773575510c1b4ac47173b44c04aa118 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 29 Jul 2024 22:15:30 +0000 Subject: [PATCH 112/152] Commit via running ake Sources/repos --- Sources/repos/Types.swift | 394 ++++++++++++++++++++++++++++---------- 1 file changed, 289 insertions(+), 105 deletions(-) diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index c4b29648c8d..0679efe879c 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -11472,6 +11472,117 @@ public enum Components { case _type = "type" } } + /// Merges must be performed via a merge queue. + /// + /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue`. + public struct repository_hyphen_rule_hyphen_merge_hyphen_queue: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/type`. + @frozen public enum _typePayload: String, Codable, Hashable, Sendable { + case merge_queue = "merge_queue" + } + /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/type`. + public var _type: Components.Schemas.repository_hyphen_rule_hyphen_merge_hyphen_queue._typePayload + /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/parameters`. + public struct parametersPayload: Codable, Hashable, Sendable { + /// Maximum time for a required status check to report a conclusion. After this much time has elapsed, checks that have not reported a conclusion will be assumed to have failed + /// + /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/parameters/check_response_timeout_minutes`. + public var check_response_timeout_minutes: Swift.Int + /// When set to ALLGREEN, the merge commit created by merge queue for each PR in the group must pass all required checks to merge. When set to HEADGREEN, only the commit at the head of the merge group, i.e. the commit containing changes from all of the PRs in the group, must pass its required checks to merge. + /// + /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/parameters/grouping_strategy`. + @frozen public enum grouping_strategyPayload: String, Codable, Hashable, Sendable { + case ALLGREEN = "ALLGREEN" + case HEADGREEN = "HEADGREEN" + } + /// When set to ALLGREEN, the merge commit created by merge queue for each PR in the group must pass all required checks to merge. When set to HEADGREEN, only the commit at the head of the merge group, i.e. the commit containing changes from all of the PRs in the group, must pass its required checks to merge. + /// + /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/parameters/grouping_strategy`. + public var grouping_strategy: Components.Schemas.repository_hyphen_rule_hyphen_merge_hyphen_queue.parametersPayload.grouping_strategyPayload + /// Limit the number of queued pull requests requesting checks and workflow runs at the same time. + /// + /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/parameters/max_entries_to_build`. + public var max_entries_to_build: Swift.Int + /// The maximum number of PRs that will be merged together in a group. + /// + /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/parameters/max_entries_to_merge`. + public var max_entries_to_merge: Swift.Int + /// Method to use when merging changes from queued pull requests. + /// + /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/parameters/merge_method`. + @frozen public enum merge_methodPayload: String, Codable, Hashable, Sendable { + case MERGE = "MERGE" + case SQUASH = "SQUASH" + case REBASE = "REBASE" + } + /// Method to use when merging changes from queued pull requests. + /// + /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/parameters/merge_method`. + public var merge_method: Components.Schemas.repository_hyphen_rule_hyphen_merge_hyphen_queue.parametersPayload.merge_methodPayload + /// The minimum number of PRs that will be merged together in a group. + /// + /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/parameters/min_entries_to_merge`. + public var min_entries_to_merge: Swift.Int + /// The time merge queue should wait after the first PR is added to the queue for the minimum group size to be met. After this time has elapsed, the minimum group size will be ignored and a smaller group will be merged. + /// + /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/parameters/min_entries_to_merge_wait_minutes`. + public var min_entries_to_merge_wait_minutes: Swift.Int + /// Creates a new `parametersPayload`. + /// + /// - Parameters: + /// - check_response_timeout_minutes: Maximum time for a required status check to report a conclusion. After this much time has elapsed, checks that have not reported a conclusion will be assumed to have failed + /// - grouping_strategy: When set to ALLGREEN, the merge commit created by merge queue for each PR in the group must pass all required checks to merge. When set to HEADGREEN, only the commit at the head of the merge group, i.e. the commit containing changes from all of the PRs in the group, must pass its required checks to merge. + /// - max_entries_to_build: Limit the number of queued pull requests requesting checks and workflow runs at the same time. + /// - max_entries_to_merge: The maximum number of PRs that will be merged together in a group. + /// - merge_method: Method to use when merging changes from queued pull requests. + /// - min_entries_to_merge: The minimum number of PRs that will be merged together in a group. + /// - min_entries_to_merge_wait_minutes: The time merge queue should wait after the first PR is added to the queue for the minimum group size to be met. After this time has elapsed, the minimum group size will be ignored and a smaller group will be merged. + public init( + check_response_timeout_minutes: Swift.Int, + grouping_strategy: Components.Schemas.repository_hyphen_rule_hyphen_merge_hyphen_queue.parametersPayload.grouping_strategyPayload, + max_entries_to_build: Swift.Int, + max_entries_to_merge: Swift.Int, + merge_method: Components.Schemas.repository_hyphen_rule_hyphen_merge_hyphen_queue.parametersPayload.merge_methodPayload, + min_entries_to_merge: Swift.Int, + min_entries_to_merge_wait_minutes: Swift.Int + ) { + self.check_response_timeout_minutes = check_response_timeout_minutes + self.grouping_strategy = grouping_strategy + self.max_entries_to_build = max_entries_to_build + self.max_entries_to_merge = max_entries_to_merge + self.merge_method = merge_method + self.min_entries_to_merge = min_entries_to_merge + self.min_entries_to_merge_wait_minutes = min_entries_to_merge_wait_minutes + } + public enum CodingKeys: String, CodingKey { + case check_response_timeout_minutes + case grouping_strategy + case max_entries_to_build + case max_entries_to_merge + case merge_method + case min_entries_to_merge + case min_entries_to_merge_wait_minutes + } + } + /// - Remark: Generated from `#/components/schemas/repository-rule-merge-queue/parameters`. + public var parameters: Components.Schemas.repository_hyphen_rule_hyphen_merge_hyphen_queue.parametersPayload? + /// Creates a new `repository_hyphen_rule_hyphen_merge_hyphen_queue`. + /// + /// - Parameters: + /// - _type: + /// - parameters: + public init( + _type: Components.Schemas.repository_hyphen_rule_hyphen_merge_hyphen_queue._typePayload, + parameters: Components.Schemas.repository_hyphen_rule_hyphen_merge_hyphen_queue.parametersPayload? = nil + ) { + self._type = _type + self.parameters = parameters + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case parameters + } + } /// Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule. /// /// - Remark: Generated from `#/components/schemas/repository-rule-required-deployments`. @@ -11660,6 +11771,10 @@ public enum Components { public var _type: Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_status_hyphen_checks._typePayload /// - Remark: Generated from `#/components/schemas/repository-rule-required-status-checks/parameters`. public struct parametersPayload: Codable, Hashable, Sendable { + /// Allow repositories and branches to be created if a check would otherwise prohibit it. + /// + /// - Remark: Generated from `#/components/schemas/repository-rule-required-status-checks/parameters/do_not_enforce_on_create`. + public var do_not_enforce_on_create: Swift.Bool? /// Status checks that are required. /// /// - Remark: Generated from `#/components/schemas/repository-rule-required-status-checks/parameters/required_status_checks`. @@ -11671,16 +11786,20 @@ public enum Components { /// Creates a new `parametersPayload`. /// /// - Parameters: + /// - do_not_enforce_on_create: Allow repositories and branches to be created if a check would otherwise prohibit it. /// - required_status_checks: Status checks that are required. /// - strict_required_status_checks_policy: Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. public init( + do_not_enforce_on_create: Swift.Bool? = nil, required_status_checks: [Components.Schemas.repository_hyphen_rule_hyphen_params_hyphen_status_hyphen_check_hyphen_configuration], strict_required_status_checks_policy: Swift.Bool ) { + self.do_not_enforce_on_create = do_not_enforce_on_create self.required_status_checks = required_status_checks self.strict_required_status_checks_policy = strict_required_status_checks_policy } public enum CodingKeys: String, CodingKey { + case do_not_enforce_on_create case required_status_checks case strict_required_status_checks_policy } @@ -12187,6 +12306,10 @@ public enum Components { public var _type: Components.Schemas.repository_hyphen_rule_hyphen_workflows._typePayload /// - Remark: Generated from `#/components/schemas/repository-rule-workflows/parameters`. public struct parametersPayload: Codable, Hashable, Sendable { + /// Allow repositories and branches to be created if a check would otherwise prohibit it. + /// + /// - Remark: Generated from `#/components/schemas/repository-rule-workflows/parameters/do_not_enforce_on_create`. + public var do_not_enforce_on_create: Swift.Bool? /// Workflows that must pass for this rule to pass. /// /// - Remark: Generated from `#/components/schemas/repository-rule-workflows/parameters/workflows`. @@ -12194,11 +12317,17 @@ public enum Components { /// Creates a new `parametersPayload`. /// /// - Parameters: + /// - do_not_enforce_on_create: Allow repositories and branches to be created if a check would otherwise prohibit it. /// - workflows: Workflows that must pass for this rule to pass. - public init(workflows: [Components.Schemas.repository_hyphen_rule_hyphen_params_hyphen_workflow_hyphen_file_hyphen_reference]) { + public init( + do_not_enforce_on_create: Swift.Bool? = nil, + workflows: [Components.Schemas.repository_hyphen_rule_hyphen_params_hyphen_workflow_hyphen_file_hyphen_reference] + ) { + self.do_not_enforce_on_create = do_not_enforce_on_create self.workflows = workflows } public enum CodingKeys: String, CodingKey { + case do_not_enforce_on_create case workflows } } @@ -12336,42 +12465,45 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule/case4`. case repository_hyphen_rule_hyphen_required_hyphen_linear_hyphen_history(Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_linear_hyphen_history) /// - Remark: Generated from `#/components/schemas/repository-rule/case5`. - case repository_hyphen_rule_hyphen_required_hyphen_deployments(Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_deployments) + case repository_hyphen_rule_hyphen_merge_hyphen_queue(Components.Schemas.repository_hyphen_rule_hyphen_merge_hyphen_queue) /// - Remark: Generated from `#/components/schemas/repository-rule/case6`. - case repository_hyphen_rule_hyphen_required_hyphen_signatures(Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_signatures) + case repository_hyphen_rule_hyphen_required_hyphen_deployments(Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_deployments) /// - Remark: Generated from `#/components/schemas/repository-rule/case7`. - case repository_hyphen_rule_hyphen_pull_hyphen_request(Components.Schemas.repository_hyphen_rule_hyphen_pull_hyphen_request) + case repository_hyphen_rule_hyphen_required_hyphen_signatures(Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_signatures) /// - Remark: Generated from `#/components/schemas/repository-rule/case8`. - case repository_hyphen_rule_hyphen_required_hyphen_status_hyphen_checks(Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_status_hyphen_checks) + case repository_hyphen_rule_hyphen_pull_hyphen_request(Components.Schemas.repository_hyphen_rule_hyphen_pull_hyphen_request) /// - Remark: Generated from `#/components/schemas/repository-rule/case9`. - case repository_hyphen_rule_hyphen_non_hyphen_fast_hyphen_forward(Components.Schemas.repository_hyphen_rule_hyphen_non_hyphen_fast_hyphen_forward) + case repository_hyphen_rule_hyphen_required_hyphen_status_hyphen_checks(Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_status_hyphen_checks) /// - Remark: Generated from `#/components/schemas/repository-rule/case10`. - case repository_hyphen_rule_hyphen_commit_hyphen_message_hyphen_pattern(Components.Schemas.repository_hyphen_rule_hyphen_commit_hyphen_message_hyphen_pattern) + case repository_hyphen_rule_hyphen_non_hyphen_fast_hyphen_forward(Components.Schemas.repository_hyphen_rule_hyphen_non_hyphen_fast_hyphen_forward) /// - Remark: Generated from `#/components/schemas/repository-rule/case11`. - case repository_hyphen_rule_hyphen_commit_hyphen_author_hyphen_email_hyphen_pattern(Components.Schemas.repository_hyphen_rule_hyphen_commit_hyphen_author_hyphen_email_hyphen_pattern) + case repository_hyphen_rule_hyphen_commit_hyphen_message_hyphen_pattern(Components.Schemas.repository_hyphen_rule_hyphen_commit_hyphen_message_hyphen_pattern) /// - Remark: Generated from `#/components/schemas/repository-rule/case12`. - case repository_hyphen_rule_hyphen_committer_hyphen_email_hyphen_pattern(Components.Schemas.repository_hyphen_rule_hyphen_committer_hyphen_email_hyphen_pattern) + case repository_hyphen_rule_hyphen_commit_hyphen_author_hyphen_email_hyphen_pattern(Components.Schemas.repository_hyphen_rule_hyphen_commit_hyphen_author_hyphen_email_hyphen_pattern) /// - Remark: Generated from `#/components/schemas/repository-rule/case13`. - case repository_hyphen_rule_hyphen_branch_hyphen_name_hyphen_pattern(Components.Schemas.repository_hyphen_rule_hyphen_branch_hyphen_name_hyphen_pattern) + case repository_hyphen_rule_hyphen_committer_hyphen_email_hyphen_pattern(Components.Schemas.repository_hyphen_rule_hyphen_committer_hyphen_email_hyphen_pattern) /// - Remark: Generated from `#/components/schemas/repository-rule/case14`. + case repository_hyphen_rule_hyphen_branch_hyphen_name_hyphen_pattern(Components.Schemas.repository_hyphen_rule_hyphen_branch_hyphen_name_hyphen_pattern) + /// - Remark: Generated from `#/components/schemas/repository-rule/case15`. case repository_hyphen_rule_hyphen_tag_hyphen_name_hyphen_pattern(Components.Schemas.repository_hyphen_rule_hyphen_tag_hyphen_name_hyphen_pattern) - /// Note: file_path_restriction is in beta and subject to change. + /// > [!NOTE] + /// > `file_path_restriction` is in beta and subject to change. /// /// Prevent commits that include changes in specified file paths from being pushed to the commit graph. /// - /// - Remark: Generated from `#/components/schemas/repository-rule/case15`. - public struct Case15Payload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/repository-rule/case15/type`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case16`. + public struct Case16Payload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/repository-rule/case16/type`. @frozen public enum _typePayload: String, Codable, Hashable, Sendable { case file_path_restriction = "file_path_restriction" } - /// - Remark: Generated from `#/components/schemas/repository-rule/case15/type`. - public var _type: Components.Schemas.repository_hyphen_rule.Case15Payload._typePayload - /// - Remark: Generated from `#/components/schemas/repository-rule/case15/parameters`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case16/type`. + public var _type: Components.Schemas.repository_hyphen_rule.Case16Payload._typePayload + /// - Remark: Generated from `#/components/schemas/repository-rule/case16/parameters`. public struct parametersPayload: Codable, Hashable, Sendable { /// The file paths that are restricted from being pushed to the commit graph. /// - /// - Remark: Generated from `#/components/schemas/repository-rule/case15/parameters/restricted_file_paths`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case16/parameters/restricted_file_paths`. public var restricted_file_paths: [Swift.String] /// Creates a new `parametersPayload`. /// @@ -12384,16 +12516,16 @@ public enum Components { case restricted_file_paths } } - /// - Remark: Generated from `#/components/schemas/repository-rule/case15/parameters`. - public var parameters: Components.Schemas.repository_hyphen_rule.Case15Payload.parametersPayload? - /// Creates a new `Case15Payload`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case16/parameters`. + public var parameters: Components.Schemas.repository_hyphen_rule.Case16Payload.parametersPayload? + /// Creates a new `Case16Payload`. /// /// - Parameters: /// - _type: /// - parameters: public init( - _type: Components.Schemas.repository_hyphen_rule.Case15Payload._typePayload, - parameters: Components.Schemas.repository_hyphen_rule.Case15Payload.parametersPayload? = nil + _type: Components.Schemas.repository_hyphen_rule.Case16Payload._typePayload, + parameters: Components.Schemas.repository_hyphen_rule.Case16Payload.parametersPayload? = nil ) { self._type = _type self.parameters = parameters @@ -12403,29 +12535,31 @@ public enum Components { case parameters } } - /// Note: file_path_restriction is in beta and subject to change. + /// > [!NOTE] + /// > `file_path_restriction` is in beta and subject to change. /// /// Prevent commits that include changes in specified file paths from being pushed to the commit graph. /// - /// - Remark: Generated from `#/components/schemas/repository-rule/case15`. - case case15(Components.Schemas.repository_hyphen_rule.Case15Payload) - /// Note: max_file_path_length is in beta and subject to change. + /// - Remark: Generated from `#/components/schemas/repository-rule/case16`. + case case16(Components.Schemas.repository_hyphen_rule.Case16Payload) + /// > [!NOTE] + /// > `max_file_path_length` is in beta and subject to change. /// /// Prevent commits that include file paths that exceed a specified character limit from being pushed to the commit graph. /// - /// - Remark: Generated from `#/components/schemas/repository-rule/case16`. - public struct Case16Payload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/repository-rule/case16/type`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case17`. + public struct Case17Payload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/repository-rule/case17/type`. @frozen public enum _typePayload: String, Codable, Hashable, Sendable { case max_file_path_length = "max_file_path_length" } - /// - Remark: Generated from `#/components/schemas/repository-rule/case16/type`. - public var _type: Components.Schemas.repository_hyphen_rule.Case16Payload._typePayload - /// - Remark: Generated from `#/components/schemas/repository-rule/case16/parameters`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case17/type`. + public var _type: Components.Schemas.repository_hyphen_rule.Case17Payload._typePayload + /// - Remark: Generated from `#/components/schemas/repository-rule/case17/parameters`. public struct parametersPayload: Codable, Hashable, Sendable { /// The maximum amount of characters allowed in file paths /// - /// - Remark: Generated from `#/components/schemas/repository-rule/case16/parameters/max_file_path_length`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case17/parameters/max_file_path_length`. public var max_file_path_length: Swift.Int /// Creates a new `parametersPayload`. /// @@ -12438,16 +12572,16 @@ public enum Components { case max_file_path_length } } - /// - Remark: Generated from `#/components/schemas/repository-rule/case16/parameters`. - public var parameters: Components.Schemas.repository_hyphen_rule.Case16Payload.parametersPayload? - /// Creates a new `Case16Payload`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case17/parameters`. + public var parameters: Components.Schemas.repository_hyphen_rule.Case17Payload.parametersPayload? + /// Creates a new `Case17Payload`. /// /// - Parameters: /// - _type: /// - parameters: public init( - _type: Components.Schemas.repository_hyphen_rule.Case16Payload._typePayload, - parameters: Components.Schemas.repository_hyphen_rule.Case16Payload.parametersPayload? = nil + _type: Components.Schemas.repository_hyphen_rule.Case17Payload._typePayload, + parameters: Components.Schemas.repository_hyphen_rule.Case17Payload.parametersPayload? = nil ) { self._type = _type self.parameters = parameters @@ -12457,29 +12591,31 @@ public enum Components { case parameters } } - /// Note: max_file_path_length is in beta and subject to change. + /// > [!NOTE] + /// > `max_file_path_length` is in beta and subject to change. /// /// Prevent commits that include file paths that exceed a specified character limit from being pushed to the commit graph. /// - /// - Remark: Generated from `#/components/schemas/repository-rule/case16`. - case case16(Components.Schemas.repository_hyphen_rule.Case16Payload) - /// Note: file_extension_restriction is in beta and subject to change. + /// - Remark: Generated from `#/components/schemas/repository-rule/case17`. + case case17(Components.Schemas.repository_hyphen_rule.Case17Payload) + /// > [!NOTE] + /// > `file_extension_restriction` is in beta and subject to change. /// /// Prevent commits that include files with specified file extensions from being pushed to the commit graph. /// - /// - Remark: Generated from `#/components/schemas/repository-rule/case17`. - public struct Case17Payload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/repository-rule/case17/type`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case18`. + public struct Case18Payload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/repository-rule/case18/type`. @frozen public enum _typePayload: String, Codable, Hashable, Sendable { case file_extension_restriction = "file_extension_restriction" } - /// - Remark: Generated from `#/components/schemas/repository-rule/case17/type`. - public var _type: Components.Schemas.repository_hyphen_rule.Case17Payload._typePayload - /// - Remark: Generated from `#/components/schemas/repository-rule/case17/parameters`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case18/type`. + public var _type: Components.Schemas.repository_hyphen_rule.Case18Payload._typePayload + /// - Remark: Generated from `#/components/schemas/repository-rule/case18/parameters`. public struct parametersPayload: Codable, Hashable, Sendable { /// The file extensions that are restricted from being pushed to the commit graph. /// - /// - Remark: Generated from `#/components/schemas/repository-rule/case17/parameters/restricted_file_extensions`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case18/parameters/restricted_file_extensions`. public var restricted_file_extensions: [Swift.String] /// Creates a new `parametersPayload`. /// @@ -12492,16 +12628,16 @@ public enum Components { case restricted_file_extensions } } - /// - Remark: Generated from `#/components/schemas/repository-rule/case17/parameters`. - public var parameters: Components.Schemas.repository_hyphen_rule.Case17Payload.parametersPayload? - /// Creates a new `Case17Payload`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case18/parameters`. + public var parameters: Components.Schemas.repository_hyphen_rule.Case18Payload.parametersPayload? + /// Creates a new `Case18Payload`. /// /// - Parameters: /// - _type: /// - parameters: public init( - _type: Components.Schemas.repository_hyphen_rule.Case17Payload._typePayload, - parameters: Components.Schemas.repository_hyphen_rule.Case17Payload.parametersPayload? = nil + _type: Components.Schemas.repository_hyphen_rule.Case18Payload._typePayload, + parameters: Components.Schemas.repository_hyphen_rule.Case18Payload.parametersPayload? = nil ) { self._type = _type self.parameters = parameters @@ -12511,29 +12647,31 @@ public enum Components { case parameters } } - /// Note: file_extension_restriction is in beta and subject to change. + /// > [!NOTE] + /// > `file_extension_restriction` is in beta and subject to change. /// /// Prevent commits that include files with specified file extensions from being pushed to the commit graph. /// - /// - Remark: Generated from `#/components/schemas/repository-rule/case17`. - case case17(Components.Schemas.repository_hyphen_rule.Case17Payload) - /// Note: max_file_size is in beta and subject to change. + /// - Remark: Generated from `#/components/schemas/repository-rule/case18`. + case case18(Components.Schemas.repository_hyphen_rule.Case18Payload) + /// > [!NOTE] + /// > `max_file_size` is in beta and subject to change. /// /// Prevent commits that exceed a specified file size limit from being pushed to the commit. /// - /// - Remark: Generated from `#/components/schemas/repository-rule/case18`. - public struct Case18Payload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/repository-rule/case18/type`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case19`. + public struct Case19Payload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/repository-rule/case19/type`. @frozen public enum _typePayload: String, Codable, Hashable, Sendable { case max_file_size = "max_file_size" } - /// - Remark: Generated from `#/components/schemas/repository-rule/case18/type`. - public var _type: Components.Schemas.repository_hyphen_rule.Case18Payload._typePayload - /// - Remark: Generated from `#/components/schemas/repository-rule/case18/parameters`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case19/type`. + public var _type: Components.Schemas.repository_hyphen_rule.Case19Payload._typePayload + /// - Remark: Generated from `#/components/schemas/repository-rule/case19/parameters`. public struct parametersPayload: Codable, Hashable, Sendable { /// The maximum file size allowed in megabytes. This limit does not apply to Git Large File Storage (Git LFS). /// - /// - Remark: Generated from `#/components/schemas/repository-rule/case18/parameters/max_file_size`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case19/parameters/max_file_size`. public var max_file_size: Swift.Int /// Creates a new `parametersPayload`. /// @@ -12546,16 +12684,16 @@ public enum Components { case max_file_size } } - /// - Remark: Generated from `#/components/schemas/repository-rule/case18/parameters`. - public var parameters: Components.Schemas.repository_hyphen_rule.Case18Payload.parametersPayload? - /// Creates a new `Case18Payload`. + /// - Remark: Generated from `#/components/schemas/repository-rule/case19/parameters`. + public var parameters: Components.Schemas.repository_hyphen_rule.Case19Payload.parametersPayload? + /// Creates a new `Case19Payload`. /// /// - Parameters: /// - _type: /// - parameters: public init( - _type: Components.Schemas.repository_hyphen_rule.Case18Payload._typePayload, - parameters: Components.Schemas.repository_hyphen_rule.Case18Payload.parametersPayload? = nil + _type: Components.Schemas.repository_hyphen_rule.Case19Payload._typePayload, + parameters: Components.Schemas.repository_hyphen_rule.Case19Payload.parametersPayload? = nil ) { self._type = _type self.parameters = parameters @@ -12565,15 +12703,16 @@ public enum Components { case parameters } } - /// Note: max_file_size is in beta and subject to change. + /// > [!NOTE] + /// > `max_file_size` is in beta and subject to change. /// /// Prevent commits that exceed a specified file size limit from being pushed to the commit. /// - /// - Remark: Generated from `#/components/schemas/repository-rule/case18`. - case case18(Components.Schemas.repository_hyphen_rule.Case18Payload) /// - Remark: Generated from `#/components/schemas/repository-rule/case19`. - case repository_hyphen_rule_hyphen_workflows(Components.Schemas.repository_hyphen_rule_hyphen_workflows) + case case19(Components.Schemas.repository_hyphen_rule.Case19Payload) /// - Remark: Generated from `#/components/schemas/repository-rule/case20`. + case repository_hyphen_rule_hyphen_workflows(Components.Schemas.repository_hyphen_rule_hyphen_workflows) + /// - Remark: Generated from `#/components/schemas/repository-rule/case21`. case repository_hyphen_rule_hyphen_code_hyphen_scanning(Components.Schemas.repository_hyphen_rule_hyphen_code_hyphen_scanning) public init(from decoder: any Decoder) throws { var errors: [any Error] = [] @@ -12601,6 +12740,12 @@ public enum Components { } catch { errors.append(error) } + do { + self = .repository_hyphen_rule_hyphen_merge_hyphen_queue(try .init(from: decoder)) + return + } catch { + errors.append(error) + } do { self = .repository_hyphen_rule_hyphen_required_hyphen_deployments(try .init(from: decoder)) return @@ -12662,25 +12807,25 @@ public enum Components { errors.append(error) } do { - self = .case15(try .init(from: decoder)) + self = .case16(try .init(from: decoder)) return } catch { errors.append(error) } do { - self = .case16(try .init(from: decoder)) + self = .case17(try .init(from: decoder)) return } catch { errors.append(error) } do { - self = .case17(try .init(from: decoder)) + self = .case18(try .init(from: decoder)) return } catch { errors.append(error) } do { - self = .case18(try .init(from: decoder)) + self = .case19(try .init(from: decoder)) return } catch { errors.append(error) @@ -12713,6 +12858,8 @@ public enum Components { try value.encode(to: encoder) case let .repository_hyphen_rule_hyphen_required_hyphen_linear_hyphen_history(value): try value.encode(to: encoder) + case let .repository_hyphen_rule_hyphen_merge_hyphen_queue(value): + try value.encode(to: encoder) case let .repository_hyphen_rule_hyphen_required_hyphen_deployments(value): try value.encode(to: encoder) case let .repository_hyphen_rule_hyphen_required_hyphen_signatures(value): @@ -12733,14 +12880,14 @@ public enum Components { try value.encode(to: encoder) case let .repository_hyphen_rule_hyphen_tag_hyphen_name_hyphen_pattern(value): try value.encode(to: encoder) - case let .case15(value): - try value.encode(to: encoder) case let .case16(value): try value.encode(to: encoder) case let .case17(value): try value.encode(to: encoder) case let .case18(value): try value.encode(to: encoder) + case let .case19(value): + try value.encode(to: encoder) case let .repository_hyphen_rule_hyphen_workflows(value): try value.encode(to: encoder) case let .repository_hyphen_rule_hyphen_code_hyphen_scanning(value): @@ -20890,7 +21037,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case5`. public struct Case5Payload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case5/value1`. - public var value1: Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_deployments + public var value1: Components.Schemas.repository_hyphen_rule_hyphen_merge_hyphen_queue /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case5/value2`. public var value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info /// Creates a new `Case5Payload`. @@ -20899,7 +21046,7 @@ public enum Components { /// - value1: /// - value2: public init( - value1: Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_deployments, + value1: Components.Schemas.repository_hyphen_rule_hyphen_merge_hyphen_queue, value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info ) { self.value1 = value1 @@ -20919,7 +21066,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case6`. public struct Case6Payload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case6/value1`. - public var value1: Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_signatures + public var value1: Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_deployments /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case6/value2`. public var value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info /// Creates a new `Case6Payload`. @@ -20928,7 +21075,7 @@ public enum Components { /// - value1: /// - value2: public init( - value1: Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_signatures, + value1: Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_deployments, value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info ) { self.value1 = value1 @@ -20948,7 +21095,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case7`. public struct Case7Payload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case7/value1`. - public var value1: Components.Schemas.repository_hyphen_rule_hyphen_pull_hyphen_request + public var value1: Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_signatures /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case7/value2`. public var value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info /// Creates a new `Case7Payload`. @@ -20957,7 +21104,7 @@ public enum Components { /// - value1: /// - value2: public init( - value1: Components.Schemas.repository_hyphen_rule_hyphen_pull_hyphen_request, + value1: Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_signatures, value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info ) { self.value1 = value1 @@ -20977,7 +21124,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case8`. public struct Case8Payload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case8/value1`. - public var value1: Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_status_hyphen_checks + public var value1: Components.Schemas.repository_hyphen_rule_hyphen_pull_hyphen_request /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case8/value2`. public var value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info /// Creates a new `Case8Payload`. @@ -20986,7 +21133,7 @@ public enum Components { /// - value1: /// - value2: public init( - value1: Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_status_hyphen_checks, + value1: Components.Schemas.repository_hyphen_rule_hyphen_pull_hyphen_request, value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info ) { self.value1 = value1 @@ -21006,7 +21153,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case9`. public struct Case9Payload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case9/value1`. - public var value1: Components.Schemas.repository_hyphen_rule_hyphen_non_hyphen_fast_hyphen_forward + public var value1: Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_status_hyphen_checks /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case9/value2`. public var value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info /// Creates a new `Case9Payload`. @@ -21015,7 +21162,7 @@ public enum Components { /// - value1: /// - value2: public init( - value1: Components.Schemas.repository_hyphen_rule_hyphen_non_hyphen_fast_hyphen_forward, + value1: Components.Schemas.repository_hyphen_rule_hyphen_required_hyphen_status_hyphen_checks, value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info ) { self.value1 = value1 @@ -21035,7 +21182,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case10`. public struct Case10Payload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case10/value1`. - public var value1: Components.Schemas.repository_hyphen_rule_hyphen_commit_hyphen_message_hyphen_pattern + public var value1: Components.Schemas.repository_hyphen_rule_hyphen_non_hyphen_fast_hyphen_forward /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case10/value2`. public var value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info /// Creates a new `Case10Payload`. @@ -21044,7 +21191,7 @@ public enum Components { /// - value1: /// - value2: public init( - value1: Components.Schemas.repository_hyphen_rule_hyphen_commit_hyphen_message_hyphen_pattern, + value1: Components.Schemas.repository_hyphen_rule_hyphen_non_hyphen_fast_hyphen_forward, value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info ) { self.value1 = value1 @@ -21064,7 +21211,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case11`. public struct Case11Payload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case11/value1`. - public var value1: Components.Schemas.repository_hyphen_rule_hyphen_commit_hyphen_author_hyphen_email_hyphen_pattern + public var value1: Components.Schemas.repository_hyphen_rule_hyphen_commit_hyphen_message_hyphen_pattern /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case11/value2`. public var value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info /// Creates a new `Case11Payload`. @@ -21073,7 +21220,7 @@ public enum Components { /// - value1: /// - value2: public init( - value1: Components.Schemas.repository_hyphen_rule_hyphen_commit_hyphen_author_hyphen_email_hyphen_pattern, + value1: Components.Schemas.repository_hyphen_rule_hyphen_commit_hyphen_message_hyphen_pattern, value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info ) { self.value1 = value1 @@ -21093,7 +21240,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case12`. public struct Case12Payload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case12/value1`. - public var value1: Components.Schemas.repository_hyphen_rule_hyphen_committer_hyphen_email_hyphen_pattern + public var value1: Components.Schemas.repository_hyphen_rule_hyphen_commit_hyphen_author_hyphen_email_hyphen_pattern /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case12/value2`. public var value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info /// Creates a new `Case12Payload`. @@ -21102,7 +21249,7 @@ public enum Components { /// - value1: /// - value2: public init( - value1: Components.Schemas.repository_hyphen_rule_hyphen_committer_hyphen_email_hyphen_pattern, + value1: Components.Schemas.repository_hyphen_rule_hyphen_commit_hyphen_author_hyphen_email_hyphen_pattern, value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info ) { self.value1 = value1 @@ -21122,7 +21269,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case13`. public struct Case13Payload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case13/value1`. - public var value1: Components.Schemas.repository_hyphen_rule_hyphen_branch_hyphen_name_hyphen_pattern + public var value1: Components.Schemas.repository_hyphen_rule_hyphen_committer_hyphen_email_hyphen_pattern /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case13/value2`. public var value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info /// Creates a new `Case13Payload`. @@ -21131,7 +21278,7 @@ public enum Components { /// - value1: /// - value2: public init( - value1: Components.Schemas.repository_hyphen_rule_hyphen_branch_hyphen_name_hyphen_pattern, + value1: Components.Schemas.repository_hyphen_rule_hyphen_committer_hyphen_email_hyphen_pattern, value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info ) { self.value1 = value1 @@ -21151,7 +21298,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case14`. public struct Case14Payload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case14/value1`. - public var value1: Components.Schemas.repository_hyphen_rule_hyphen_tag_hyphen_name_hyphen_pattern + public var value1: Components.Schemas.repository_hyphen_rule_hyphen_branch_hyphen_name_hyphen_pattern /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case14/value2`. public var value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info /// Creates a new `Case14Payload`. @@ -21160,7 +21307,7 @@ public enum Components { /// - value1: /// - value2: public init( - value1: Components.Schemas.repository_hyphen_rule_hyphen_tag_hyphen_name_hyphen_pattern, + value1: Components.Schemas.repository_hyphen_rule_hyphen_branch_hyphen_name_hyphen_pattern, value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info ) { self.value1 = value1 @@ -21180,7 +21327,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case15`. public struct Case15Payload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case15/value1`. - public var value1: Components.Schemas.repository_hyphen_rule_hyphen_workflows + public var value1: Components.Schemas.repository_hyphen_rule_hyphen_tag_hyphen_name_hyphen_pattern /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case15/value2`. public var value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info /// Creates a new `Case15Payload`. @@ -21189,7 +21336,7 @@ public enum Components { /// - value1: /// - value2: public init( - value1: Components.Schemas.repository_hyphen_rule_hyphen_workflows, + value1: Components.Schemas.repository_hyphen_rule_hyphen_tag_hyphen_name_hyphen_pattern, value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info ) { self.value1 = value1 @@ -21209,7 +21356,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case16`. public struct Case16Payload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case16/value1`. - public var value1: Components.Schemas.repository_hyphen_rule_hyphen_code_hyphen_scanning + public var value1: Components.Schemas.repository_hyphen_rule_hyphen_workflows /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case16/value2`. public var value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info /// Creates a new `Case16Payload`. @@ -21218,7 +21365,7 @@ public enum Components { /// - value1: /// - value2: public init( - value1: Components.Schemas.repository_hyphen_rule_hyphen_code_hyphen_scanning, + value1: Components.Schemas.repository_hyphen_rule_hyphen_workflows, value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info ) { self.value1 = value1 @@ -21235,6 +21382,35 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case16`. case case16(Components.Schemas.repository_hyphen_rule_hyphen_detailed.Case16Payload) + /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case17`. + public struct Case17Payload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case17/value1`. + public var value1: Components.Schemas.repository_hyphen_rule_hyphen_code_hyphen_scanning + /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case17/value2`. + public var value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info + /// Creates a new `Case17Payload`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.repository_hyphen_rule_hyphen_code_hyphen_scanning, + value2: Components.Schemas.repository_hyphen_rule_hyphen_ruleset_hyphen_info + ) { + self.value1 = value1 + self.value2 = value2 + } + public init(from decoder: any Decoder) throws { + value1 = try .init(from: decoder) + value2 = try .init(from: decoder) + } + public func encode(to encoder: any Encoder) throws { + try value1.encode(to: encoder) + try value2.encode(to: encoder) + } + } + /// - Remark: Generated from `#/components/schemas/repository-rule-detailed/case17`. + case case17(Components.Schemas.repository_hyphen_rule_hyphen_detailed.Case17Payload) public init(from decoder: any Decoder) throws { var errors: [any Error] = [] do { @@ -21333,6 +21509,12 @@ public enum Components { } catch { errors.append(error) } + do { + self = .case17(try .init(from: decoder)) + return + } catch { + errors.append(error) + } throw Swift.DecodingError.failedToDecodeOneOfSchema( type: Self.self, codingPath: decoder.codingPath, @@ -21373,6 +21555,8 @@ public enum Components { try value.encode(to: encoder) case let .case16(value): try value.encode(to: encoder) + case let .case17(value): + try value.encode(to: encoder) } } } From 6067a6e229b7d38d82a6eb29df2df8e8339d10f7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 29 Jul 2024 22:19:40 +0000 Subject: [PATCH 113/152] Commit via running ake Sources/code-security --- Sources/code-security/Types.swift | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Sources/code-security/Types.swift b/Sources/code-security/Types.swift index 0884b269c6e..d013b4aa624 100644 --- a/Sources/code-security/Types.swift +++ b/Sources/code-security/Types.swift @@ -1241,9 +1241,11 @@ public enum Components { case attached = "attached" case attaching = "attaching" case detached = "detached" + case removed = "removed" case enforced = "enforced" case failed = "failed" case updating = "updating" + case removed_by_enterprise = "removed_by_enterprise" } /// The attachment status of the code security configuration on the repository. /// @@ -1858,14 +1860,14 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/private_vulnerability_reporting`. public var private_vulnerability_reporting: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload? - /// The status of enforcement + /// The enforcement status for a security configuration /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/enforcement`. @frozen public enum enforcementPayload: String, Codable, Hashable, Sendable { case enforced = "enforced" case unenforced = "unenforced" } - /// The status of enforcement + /// The enforcement status for a security configuration /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/enforcement`. public var enforcement: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.enforcementPayload? @@ -1883,7 +1885,7 @@ public enum Operations { /// - secret_scanning_push_protection: The enablement status of secret scanning push protection /// - secret_scanning_validity_checks: The enablement status of secret scanning validity checks /// - private_vulnerability_reporting: The enablement status of private vulnerability reporting - /// - enforcement: The status of enforcement + /// - enforcement: The enforcement status for a security configuration public init( name: Swift.String, description: Swift.String, @@ -2924,14 +2926,14 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/private_vulnerability_reporting`. public var private_vulnerability_reporting: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.private_vulnerability_reportingPayload? - /// The status of enforcement + /// The enforcement status for a security configuration /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/enforcement`. @frozen public enum enforcementPayload: String, Codable, Hashable, Sendable { case enforced = "enforced" case unenforced = "unenforced" } - /// The status of enforcement + /// The enforcement status for a security configuration /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/enforcement`. public var enforcement: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.enforcementPayload? @@ -2949,7 +2951,7 @@ public enum Operations { /// - secret_scanning_push_protection: The enablement status of secret scanning push protection /// - secret_scanning_validity_checks: The enablement status of secret scanning validity checks /// - private_vulnerability_reporting: The enablement status of private vulnerability reporting - /// - enforcement: The status of enforcement + /// - enforcement: The enforcement status for a security configuration public init( name: Swift.String? = nil, description: Swift.String? = nil, @@ -3898,7 +3900,7 @@ public enum Operations { public var after: Components.Parameters.pagination_hyphen_after? /// A comma-separated list of statuses. If specified, only repositories with these attachment statuses will be returned. /// - /// Can be: `all`, `attached`, `attaching`, `detached`, `enforced`, `failed`, `updating` + /// Can be: `all`, `attached`, `attaching`, `detached`, `removed`, `enforced`, `failed`, `updating`, `removed_by_enterprise` /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/repositories/GET/query/status`. public var status: Swift.String? From 119d9a55402235423d40ee2d9a8efae462da179c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 21:35:39 +0000 Subject: [PATCH 114/152] Bump github.com/apple/swift-openapi-urlsession from 1.0.1 to 1.0.2 Bumps [github.com/apple/swift-openapi-urlsession](https://github.com/apple/swift-openapi-urlsession) from 1.0.1 to 1.0.2. - [Release notes](https://github.com/apple/swift-openapi-urlsession/releases) - [Commits](https://github.com/apple/swift-openapi-urlsession/compare/1.0.1...1.0.2) --- updated-dependencies: - dependency-name: github.com/apple/swift-openapi-urlsession dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Package.resolved | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Package.resolved b/Package.resolved index 4b2c225a81f..15f36360af8 100644 --- a/Package.resolved +++ b/Package.resolved @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-openapi-urlsession", "state" : { - "revision" : "6efbfda5276bbbc8b4fec5d744f0ecd8c784eb47", - "version" : "1.0.1" + "revision" : "9bf4c712ad7989d6a91dbe68748b8829a50837e4", + "version" : "1.0.2" } } ], From 40c17a3a51f7db01ea34445d352a9cea39c1f5fc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 21:35:43 +0000 Subject: [PATCH 115/152] Bump github.com/apple/swift-openapi-runtime from 1.4.0 to 1.5.0 Bumps [github.com/apple/swift-openapi-runtime](https://github.com/apple/swift-openapi-runtime) from 1.4.0 to 1.5.0. - [Release notes](https://github.com/apple/swift-openapi-runtime/releases) - [Commits](https://github.com/apple/swift-openapi-runtime/compare/1.4.0...1.5.0) --- updated-dependencies: - dependency-name: github.com/apple/swift-openapi-runtime dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Package.resolved | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Package.resolved b/Package.resolved index 4b2c225a81f..de6349714a8 100644 --- a/Package.resolved +++ b/Package.resolved @@ -23,8 +23,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-openapi-runtime", "state" : { - "revision" : "9a8291fa2f90cc7296f2393a99bb4824ee34f869", - "version" : "1.4.0" + "revision" : "26e8ae3515d1ff3607e924ac96fc0094775f55e8", + "version" : "1.5.0" } }, { From ef12423f67633e2f9e7c5eaf9aecb3c637e16848 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 21:52:27 +0000 Subject: [PATCH 116/152] Bump Submodule/github/rest-api-description from `2a8a2c6` to `7bd3d57` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `2a8a2c6` to `7bd3d57`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/2a8a2c6f064a6d0c2bff8cb96b43791beb470f07...7bd3d57638a0363a2d4ebf03dfcf50aacdb0d8da) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index 2a8a2c6f064..7bd3d57638a 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit 2a8a2c6f064a6d0c2bff8cb96b43791beb470f07 +Subproject commit 7bd3d57638a0363a2d4ebf03dfcf50aacdb0d8da From b106958db39bb04e024b200b4b7ab0a59be97d9c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 5 Aug 2024 22:08:33 +0000 Subject: [PATCH 117/152] Commit via running ake Sources/activity --- Sources/activity/Client.swift | 27 +++++++++--- Sources/activity/Types.swift | 81 +++++++++++++++++++++++++++-------- 2 files changed, 84 insertions(+), 24 deletions(-) diff --git a/Sources/activity/Client.swift b/Sources/activity/Client.swift index 25f02c2cad6..b052b53df12 100644 --- a/Sources/activity/Client.swift +++ b/Sources/activity/Client.swift @@ -40,7 +40,8 @@ public struct Client: APIProtocol { } /// List public events /// - /// We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// - Remark: HTTP `GET /events`. /// - Remark: Generated from `#/paths//events/get(activity/list-public-events)`. @@ -237,7 +238,8 @@ public struct Client: APIProtocol { } /// List public events for a network of repositories /// - /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// - Remark: HTTP `GET /networks/{owner}/{repo}/events`. /// - Remark: Generated from `#/paths//networks/{owner}/{repo}/events/get(activity/list-public-events-for-repo-network)`. @@ -1230,7 +1232,8 @@ public struct Client: APIProtocol { } /// List public organization events /// - /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// - Remark: HTTP `GET /orgs/{org}/events`. /// - Remark: Generated from `#/paths//orgs/{org}/events/get(activity/list-public-org-events)`. @@ -2615,6 +2618,9 @@ public struct Client: APIProtocol { /// /// If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + /// /// - Remark: HTTP `GET /users/{username}/events`. /// - Remark: Generated from `#/paths//users/{username}/events/get(activity/list-events-for-authenticated-user)`. public func activity_sol_list_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user(_ input: Operations.activity_sol_list_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user.Input) async throws -> Operations.activity_sol_list_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user.Output { @@ -2693,6 +2699,9 @@ public struct Client: APIProtocol { /// /// This is the user's organization dashboard. You must be authenticated as the user to view this. /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + /// /// - Remark: HTTP `GET /users/{username}/events/orgs/{org}`. /// - Remark: Generated from `#/paths//users/{username}/events/orgs/{org}/get(activity/list-org-events-for-authenticated-user)`. public func activity_sol_list_hyphen_org_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user(_ input: Operations.activity_sol_list_hyphen_org_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user.Input) async throws -> Operations.activity_sol_list_hyphen_org_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user.Output { @@ -2770,7 +2779,8 @@ public struct Client: APIProtocol { } /// List public events for a user /// - /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// - Remark: HTTP `GET /users/{username}/events/public`. /// - Remark: Generated from `#/paths//users/{username}/events/public/get(activity/list-public-events-for-user)`. @@ -2848,7 +2858,11 @@ public struct Client: APIProtocol { } /// List events received by the authenticated user /// - /// These are events that you've received by watching repositories and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. + /// These are events that you've received by watching repositories and following users. If you are authenticated as the + /// given user, you will see private events. Otherwise, you'll only see public events. + /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// - Remark: HTTP `GET /users/{username}/received_events`. /// - Remark: Generated from `#/paths//users/{username}/received_events/get(activity/list-received-events-for-user)`. @@ -2926,7 +2940,8 @@ public struct Client: APIProtocol { } /// List public events received by a user /// - /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// - Remark: HTTP `GET /users/{username}/received_events/public`. /// - Remark: Generated from `#/paths//users/{username}/received_events/public/get(activity/list-received-public-events-for-user)`. diff --git a/Sources/activity/Types.swift b/Sources/activity/Types.swift index 454c501bff6..09231940490 100644 --- a/Sources/activity/Types.swift +++ b/Sources/activity/Types.swift @@ -13,7 +13,8 @@ import struct Foundation.Date public protocol APIProtocol: Sendable { /// List public events /// - /// We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// - Remark: HTTP `GET /events`. /// - Remark: Generated from `#/paths//events/get(activity/list-public-events)`. @@ -40,7 +41,8 @@ public protocol APIProtocol: Sendable { func activity_sol_get_hyphen_feeds(_ input: Operations.activity_sol_get_hyphen_feeds.Input) async throws -> Operations.activity_sol_get_hyphen_feeds.Output /// List public events for a network of repositories /// - /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// - Remark: HTTP `GET /networks/{owner}/{repo}/events`. /// - Remark: Generated from `#/paths//networks/{owner}/{repo}/events/get(activity/list-public-events-for-repo-network)`. @@ -109,7 +111,8 @@ public protocol APIProtocol: Sendable { func activity_sol_delete_hyphen_thread_hyphen_subscription(_ input: Operations.activity_sol_delete_hyphen_thread_hyphen_subscription.Input) async throws -> Operations.activity_sol_delete_hyphen_thread_hyphen_subscription.Output /// List public organization events /// - /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// - Remark: HTTP `GET /orgs/{org}/events`. /// - Remark: Generated from `#/paths//orgs/{org}/events/get(activity/list-public-org-events)`. @@ -218,6 +221,9 @@ public protocol APIProtocol: Sendable { /// /// If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + /// /// - Remark: HTTP `GET /users/{username}/events`. /// - Remark: Generated from `#/paths//users/{username}/events/get(activity/list-events-for-authenticated-user)`. func activity_sol_list_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user(_ input: Operations.activity_sol_list_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user.Input) async throws -> Operations.activity_sol_list_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user.Output @@ -225,26 +231,35 @@ public protocol APIProtocol: Sendable { /// /// This is the user's organization dashboard. You must be authenticated as the user to view this. /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + /// /// - Remark: HTTP `GET /users/{username}/events/orgs/{org}`. /// - Remark: Generated from `#/paths//users/{username}/events/orgs/{org}/get(activity/list-org-events-for-authenticated-user)`. func activity_sol_list_hyphen_org_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user(_ input: Operations.activity_sol_list_hyphen_org_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user.Input) async throws -> Operations.activity_sol_list_hyphen_org_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user.Output /// List public events for a user /// - /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// - Remark: HTTP `GET /users/{username}/events/public`. /// - Remark: Generated from `#/paths//users/{username}/events/public/get(activity/list-public-events-for-user)`. func activity_sol_list_hyphen_public_hyphen_events_hyphen_for_hyphen_user(_ input: Operations.activity_sol_list_hyphen_public_hyphen_events_hyphen_for_hyphen_user.Input) async throws -> Operations.activity_sol_list_hyphen_public_hyphen_events_hyphen_for_hyphen_user.Output /// List events received by the authenticated user /// - /// These are events that you've received by watching repositories and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. + /// These are events that you've received by watching repositories and following users. If you are authenticated as the + /// given user, you will see private events. Otherwise, you'll only see public events. + /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// - Remark: HTTP `GET /users/{username}/received_events`. /// - Remark: Generated from `#/paths//users/{username}/received_events/get(activity/list-received-events-for-user)`. func activity_sol_list_hyphen_received_hyphen_events_hyphen_for_hyphen_user(_ input: Operations.activity_sol_list_hyphen_received_hyphen_events_hyphen_for_hyphen_user.Input) async throws -> Operations.activity_sol_list_hyphen_received_hyphen_events_hyphen_for_hyphen_user.Output /// List public events received by a user /// - /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// - Remark: HTTP `GET /users/{username}/received_events/public`. /// - Remark: Generated from `#/paths//users/{username}/received_events/public/get(activity/list-received-public-events-for-user)`. @@ -273,7 +288,8 @@ public protocol APIProtocol: Sendable { extension APIProtocol { /// List public events /// - /// We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// - Remark: HTTP `GET /events`. /// - Remark: Generated from `#/paths//events/get(activity/list-public-events)`. @@ -310,7 +326,8 @@ extension APIProtocol { } /// List public events for a network of repositories /// - /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// - Remark: HTTP `GET /networks/{owner}/{repo}/events`. /// - Remark: Generated from `#/paths//networks/{owner}/{repo}/events/get(activity/list-public-events-for-repo-network)`. @@ -449,7 +466,8 @@ extension APIProtocol { } /// List public organization events /// - /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// - Remark: HTTP `GET /orgs/{org}/events`. /// - Remark: Generated from `#/paths//orgs/{org}/events/get(activity/list-public-org-events)`. @@ -678,6 +696,9 @@ extension APIProtocol { /// /// If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + /// /// - Remark: HTTP `GET /users/{username}/events`. /// - Remark: Generated from `#/paths//users/{username}/events/get(activity/list-events-for-authenticated-user)`. public func activity_sol_list_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user( @@ -695,6 +716,9 @@ extension APIProtocol { /// /// This is the user's organization dashboard. You must be authenticated as the user to view this. /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + /// /// - Remark: HTTP `GET /users/{username}/events/orgs/{org}`. /// - Remark: Generated from `#/paths//users/{username}/events/orgs/{org}/get(activity/list-org-events-for-authenticated-user)`. public func activity_sol_list_hyphen_org_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user( @@ -710,7 +734,8 @@ extension APIProtocol { } /// List public events for a user /// - /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// - Remark: HTTP `GET /users/{username}/events/public`. /// - Remark: Generated from `#/paths//users/{username}/events/public/get(activity/list-public-events-for-user)`. @@ -727,7 +752,11 @@ extension APIProtocol { } /// List events received by the authenticated user /// - /// These are events that you've received by watching repositories and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. + /// These are events that you've received by watching repositories and following users. If you are authenticated as the + /// given user, you will see private events. Otherwise, you'll only see public events. + /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// - Remark: HTTP `GET /users/{username}/received_events`. /// - Remark: Generated from `#/paths//users/{username}/received_events/get(activity/list-received-events-for-user)`. @@ -744,7 +773,8 @@ extension APIProtocol { } /// List public events received by a user /// - /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// - Remark: HTTP `GET /users/{username}/received_events/public`. /// - Remark: Generated from `#/paths//users/{username}/received_events/public/get(activity/list-received-public-events-for-user)`. @@ -4704,7 +4734,8 @@ public enum Components { public enum Operations { /// List public events /// - /// We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// - Remark: HTTP `GET /events`. /// - Remark: Generated from `#/paths//events/get(activity/list-public-events)`. @@ -5039,7 +5070,8 @@ public enum Operations { } /// List public events for a network of repositories /// - /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// - Remark: HTTP `GET /networks/{owner}/{repo}/events`. /// - Remark: Generated from `#/paths//networks/{owner}/{repo}/events/get(activity/list-public-events-for-repo-network)`. @@ -6872,7 +6904,8 @@ public enum Operations { } /// List public organization events /// - /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// - Remark: HTTP `GET /orgs/{org}/events`. /// - Remark: Generated from `#/paths//orgs/{org}/events/get(activity/list-public-org-events)`. @@ -9696,6 +9729,9 @@ public enum Operations { /// /// If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + /// /// - Remark: HTTP `GET /users/{username}/events`. /// - Remark: Generated from `#/paths//users/{username}/events/get(activity/list-events-for-authenticated-user)`. public enum activity_sol_list_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user { @@ -9855,6 +9891,9 @@ public enum Operations { /// /// This is the user's organization dashboard. You must be authenticated as the user to view this. /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + /// /// - Remark: HTTP `GET /users/{username}/events/orgs/{org}`. /// - Remark: Generated from `#/paths//users/{username}/events/orgs/{org}/get(activity/list-org-events-for-authenticated-user)`. public enum activity_sol_list_hyphen_org_hyphen_events_hyphen_for_hyphen_authenticated_hyphen_user { @@ -10021,7 +10060,8 @@ public enum Operations { } /// List public events for a user /// - /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// - Remark: HTTP `GET /users/{username}/events/public`. /// - Remark: Generated from `#/paths//users/{username}/events/public/get(activity/list-public-events-for-user)`. @@ -10180,7 +10220,11 @@ public enum Operations { } /// List events received by the authenticated user /// - /// These are events that you've received by watching repositories and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. + /// These are events that you've received by watching repositories and following users. If you are authenticated as the + /// given user, you will see private events. Otherwise, you'll only see public events. + /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// - Remark: HTTP `GET /users/{username}/received_events`. /// - Remark: Generated from `#/paths//users/{username}/received_events/get(activity/list-received-events-for-user)`. @@ -10339,7 +10383,8 @@ public enum Operations { } /// List public events received by a user /// - /// + /// > [!NOTE] + /// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// - Remark: HTTP `GET /users/{username}/received_events/public`. /// - Remark: Generated from `#/paths//users/{username}/received_events/public/get(activity/list-received-public-events-for-user)`. From 296cacff1764d9af82de0fe5e407aab2740348ee Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 5 Aug 2024 22:09:57 +0000 Subject: [PATCH 118/152] Commit via running ake Sources/code-scanning --- Sources/code-scanning/Types.swift | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Sources/code-scanning/Types.swift b/Sources/code-scanning/Types.swift index b7c4d19fd57..098effdac07 100644 --- a/Sources/code-scanning/Types.swift +++ b/Sources/code-scanning/Types.swift @@ -1601,10 +1601,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/code-scanning-alert-rule-summary/name`. public var name: Swift.String? - /// A set of tags applicable for the rule. - /// - /// - Remark: Generated from `#/components/schemas/code-scanning-alert-rule-summary/tags`. - public var tags: [Swift.String]? /// The severity of the alert. /// /// - Remark: Generated from `#/components/schemas/code-scanning-alert-rule-summary/severity`. @@ -1635,37 +1631,41 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/code-scanning-alert-rule-summary/description`. public var description: Swift.String? + /// A set of tags applicable for the rule. + /// + /// - Remark: Generated from `#/components/schemas/code-scanning-alert-rule-summary/tags`. + public var tags: [Swift.String]? /// Creates a new `code_hyphen_scanning_hyphen_alert_hyphen_rule_hyphen_summary`. /// /// - Parameters: /// - id: A unique identifier for the rule used to detect the alert. /// - name: The name of the rule used to detect the alert. - /// - tags: A set of tags applicable for the rule. /// - severity: The severity of the alert. /// - security_severity_level: The security severity of the alert. /// - description: A short description of the rule used to detect the alert. + /// - tags: A set of tags applicable for the rule. public init( id: Swift.String? = nil, name: Swift.String? = nil, - tags: [Swift.String]? = nil, severity: Components.Schemas.code_hyphen_scanning_hyphen_alert_hyphen_rule_hyphen_summary.severityPayload? = nil, security_severity_level: Components.Schemas.code_hyphen_scanning_hyphen_alert_hyphen_rule_hyphen_summary.security_severity_levelPayload? = nil, - description: Swift.String? = nil + description: Swift.String? = nil, + tags: [Swift.String]? = nil ) { self.id = id self.name = name - self.tags = tags self.severity = severity self.security_severity_level = security_severity_level self.description = description + self.tags = tags } public enum CodingKeys: String, CodingKey { case id case name - case tags case severity case security_severity_level case description + case tags } } /// The version of the tool used to generate the code scanning analysis. From 22b189846752892f699c28d21cbd97d99b5bf4a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 5 Aug 2024 22:16:13 +0000 Subject: [PATCH 119/152] Commit via running ake Sources/pulls --- Sources/pulls/Types.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/pulls/Types.swift b/Sources/pulls/Types.swift index 666917176c8..981a93264fc 100644 --- a/Sources/pulls/Types.swift +++ b/Sources/pulls/Types.swift @@ -6364,7 +6364,7 @@ public enum Components { /// Unique identifier of the review /// /// - Remark: Generated from `#/components/schemas/pull-request-review/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// - Remark: Generated from `#/components/schemas/pull-request-review/node_id`. public var node_id: Swift.String /// - Remark: Generated from `#/components/schemas/pull-request-review/user`. @@ -6463,7 +6463,7 @@ public enum Components { /// - body_text: /// - author_association: public init( - id: Swift.Int, + id: Swift.Int64, node_id: Swift.String, user: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, body: Swift.String, From 15780c3e43d0aa1b806217afc8c53c8edac59c76 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Aug 2024 21:31:02 +0000 Subject: [PATCH 120/152] Bump Submodule/github/rest-api-description from `7bd3d57` to `0e84946` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `7bd3d57` to `0e84946`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/7bd3d57638a0363a2d4ebf03dfcf50aacdb0d8da...0e84946a411c87c1cb48ba453dea88409fc295c7) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index 7bd3d57638a..0e84946a411 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit 7bd3d57638a0363a2d4ebf03dfcf50aacdb0d8da +Subproject commit 0e84946a411c87c1cb48ba453dea88409fc295c7 From b338a778c965d9933b0470c85c4967be72ada32a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 12 Aug 2024 21:53:01 +0000 Subject: [PATCH 121/152] Commit via running ake Sources/meta --- Sources/meta/Types.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sources/meta/Types.swift b/Sources/meta/Types.swift index 21d62dc36d8..10adcf14d37 100644 --- a/Sources/meta/Types.swift +++ b/Sources/meta/Types.swift @@ -445,6 +445,8 @@ public enum Components { public var actions_macos: [Swift.String]? /// - Remark: Generated from `#/components/schemas/api-overview/dependabot`. public var dependabot: [Swift.String]? + /// - Remark: Generated from `#/components/schemas/api-overview/copilot`. + public var copilot: [Swift.String]? /// - Remark: Generated from `#/components/schemas/api-overview/domains`. public struct domainsPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/api-overview/domains/website`. @@ -505,6 +507,7 @@ public enum Components { /// - actions: /// - actions_macos: /// - dependabot: + /// - copilot: /// - domains: public init( verifiable_password_authentication: Swift.Bool, @@ -521,6 +524,7 @@ public enum Components { actions: [Swift.String]? = nil, actions_macos: [Swift.String]? = nil, dependabot: [Swift.String]? = nil, + copilot: [Swift.String]? = nil, domains: Components.Schemas.api_hyphen_overview.domainsPayload? = nil ) { self.verifiable_password_authentication = verifiable_password_authentication @@ -537,6 +541,7 @@ public enum Components { self.actions = actions self.actions_macos = actions_macos self.dependabot = dependabot + self.copilot = copilot self.domains = domains } public enum CodingKeys: String, CodingKey { @@ -554,6 +559,7 @@ public enum Components { case actions case actions_macos case dependabot + case copilot case domains } } From 3c0f4d59f8983c49ca0cc571f3f667e29db8604e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 12 Aug 2024 21:54:04 +0000 Subject: [PATCH 122/152] Commit via running ake Sources/orgs --- Sources/orgs/Types.swift | 178 +++++++++++++++++++-------------------- 1 file changed, 89 insertions(+), 89 deletions(-) diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index 6a8233b3e39..f07907611ea 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -4085,6 +4085,91 @@ public enum Components { case html_url } } + /// A GitHub organization. + /// + /// - Remark: Generated from `#/components/schemas/organization-simple`. + public struct organization_hyphen_simple: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/organization-simple/login`. + public var login: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/organization-simple/node_id`. + public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/repos_url`. + public var repos_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/events_url`. + public var events_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/hooks_url`. + public var hooks_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/issues_url`. + public var issues_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/members_url`. + public var members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/public_members_url`. + public var public_members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/avatar_url`. + public var avatar_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/description`. + public var description: Swift.String? + /// Creates a new `organization_hyphen_simple`. + /// + /// - Parameters: + /// - login: + /// - id: + /// - node_id: + /// - url: + /// - repos_url: + /// - events_url: + /// - hooks_url: + /// - issues_url: + /// - members_url: + /// - public_members_url: + /// - avatar_url: + /// - description: + public init( + login: Swift.String, + id: Swift.Int, + node_id: Swift.String, + url: Swift.String, + repos_url: Swift.String, + events_url: Swift.String, + hooks_url: Swift.String, + issues_url: Swift.String, + members_url: Swift.String, + public_members_url: Swift.String, + avatar_url: Swift.String, + description: Swift.String? = nil + ) { + self.login = login + self.id = id + self.node_id = node_id + self.url = url + self.repos_url = repos_url + self.events_url = events_url + self.hooks_url = hooks_url + self.issues_url = issues_url + self.members_url = members_url + self.public_members_url = public_members_url + self.avatar_url = avatar_url + self.description = description + } + public enum CodingKeys: String, CodingKey { + case login + case id + case node_id + case url + case repos_url + case events_url + case hooks_url + case issues_url + case members_url + case public_members_url + case avatar_url + case description + } + } /// Groups of organization members that gives permissions on specified repositories. /// /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. @@ -4330,91 +4415,6 @@ public enum Components { case parent } } - /// A GitHub organization. - /// - /// - Remark: Generated from `#/components/schemas/organization-simple`. - public struct organization_hyphen_simple: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/organization-simple/login`. - public var login: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization-simple/node_id`. - public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/repos_url`. - public var repos_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/events_url`. - public var events_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/hooks_url`. - public var hooks_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/issues_url`. - public var issues_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/members_url`. - public var members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/public_members_url`. - public var public_members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/avatar_url`. - public var avatar_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/description`. - public var description: Swift.String? - /// Creates a new `organization_hyphen_simple`. - /// - /// - Parameters: - /// - login: - /// - id: - /// - node_id: - /// - url: - /// - repos_url: - /// - events_url: - /// - hooks_url: - /// - issues_url: - /// - members_url: - /// - public_members_url: - /// - avatar_url: - /// - description: - public init( - login: Swift.String, - id: Swift.Int, - node_id: Swift.String, - url: Swift.String, - repos_url: Swift.String, - events_url: Swift.String, - hooks_url: Swift.String, - issues_url: Swift.String, - members_url: Swift.String, - public_members_url: Swift.String, - avatar_url: Swift.String, - description: Swift.String? = nil - ) { - self.login = login - self.id = id - self.node_id = node_id - self.url = url - self.repos_url = repos_url - self.events_url = events_url - self.hooks_url = hooks_url - self.issues_url = issues_url - self.members_url = members_url - self.public_members_url = public_members_url - self.avatar_url = avatar_url - self.description = description - } - public enum CodingKeys: String, CodingKey { - case login - case id - case node_id - case url - case repos_url - case events_url - case hooks_url - case issues_url - case members_url - case public_members_url - case avatar_url - case description - } - } /// - Remark: Generated from `#/components/schemas/security-and-analysis`. public struct security_hyphen_and_hyphen_analysis: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/security-and-analysis/advanced_security`. @@ -6984,6 +6984,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/page`. public typealias page = Swift.Int + /// The slug of the team name. + /// + /// - Remark: Generated from `#/components/parameters/team-slug`. + public typealias team_hyphen_slug = Swift.String /// An organization ID. Only return organizations with an ID greater than this ID. /// /// - Remark: Generated from `#/components/parameters/since-org`. @@ -7004,10 +7008,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/invitation-id`. public typealias invitation_hyphen_id = Swift.Int - /// The slug of the team name. - /// - /// - Remark: Generated from `#/components/parameters/team-slug`. - public typealias team_hyphen_slug = Swift.String /// The unique identifier of the role. /// /// - Remark: Generated from `#/components/parameters/role-id`. From f04b5fa3ef2f140f81ff27250f5a300da38b89a5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 12 Aug 2024 21:55:51 +0000 Subject: [PATCH 123/152] Commit via running ake Sources/reactions --- Sources/reactions/Types.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/reactions/Types.swift b/Sources/reactions/Types.swift index e4eb68d7d2a..4d42b545b3a 100644 --- a/Sources/reactions/Types.swift +++ b/Sources/reactions/Types.swift @@ -1099,6 +1099,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/page`. public typealias page = Swift.Int + /// The slug of the team name. + /// + /// - Remark: Generated from `#/components/parameters/team-slug`. + public typealias team_hyphen_slug = Swift.String /// The unique identifier of the comment. /// /// - Remark: Generated from `#/components/parameters/comment-id`. @@ -1115,10 +1119,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/org`. public typealias org = Swift.String - /// The slug of the team name. - /// - /// - Remark: Generated from `#/components/parameters/team-slug`. - public typealias team_hyphen_slug = Swift.String /// The number that identifies the discussion. /// /// - Remark: Generated from `#/components/parameters/discussion-number`. From e03a4cd83b250437fb89a44c474bb8c62165826c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 12 Aug 2024 21:56:13 +0000 Subject: [PATCH 124/152] Commit via running ake Sources/repos --- Sources/repos/Client.swift | 6 +++++ Sources/repos/Types.swift | 55 +++++++++++++++++++++++++++++++++----- 2 files changed, 55 insertions(+), 6 deletions(-) diff --git a/Sources/repos/Client.swift b/Sources/repos/Client.swift index f1f53cd307f..f8165e9c202 100644 --- a/Sources/repos/Client.swift +++ b/Sources/repos/Client.swift @@ -786,6 +786,9 @@ public struct Client: APIProtocol { /// /// Get a repository ruleset for an organization. /// + /// **Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the user + /// making the API request has write access to the ruleset. + /// /// - Remark: HTTP `GET /orgs/{org}/rulesets/{ruleset_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/rulesets/{ruleset_id}/get(repos/get-org-ruleset)`. public func repos_sol_get_hyphen_org_hyphen_ruleset(_ input: Operations.repos_sol_get_hyphen_org_hyphen_ruleset.Input) async throws -> Operations.repos_sol_get_hyphen_org_hyphen_ruleset.Output { @@ -16628,6 +16631,9 @@ public struct Client: APIProtocol { /// /// Get a ruleset for a repository. /// + /// **Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the user + /// making the API request has write access to the ruleset. + /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/rulesets/{ruleset_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/rulesets/{ruleset_id}/get(repos/get-repo-ruleset)`. public func repos_sol_get_hyphen_repo_hyphen_ruleset(_ input: Operations.repos_sol_get_hyphen_repo_hyphen_ruleset.Input) async throws -> Operations.repos_sol_get_hyphen_repo_hyphen_ruleset.Output { diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index 0679efe879c..7d227a6211f 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -64,6 +64,9 @@ public protocol APIProtocol: Sendable { /// /// Get a repository ruleset for an organization. /// + /// **Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the user + /// making the API request has write access to the ruleset. + /// /// - Remark: HTTP `GET /orgs/{org}/rulesets/{ruleset_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/rulesets/{ruleset_id}/get(repos/get-org-ruleset)`. func repos_sol_get_hyphen_org_hyphen_ruleset(_ input: Operations.repos_sol_get_hyphen_org_hyphen_ruleset.Input) async throws -> Operations.repos_sol_get_hyphen_org_hyphen_ruleset.Output @@ -1773,6 +1776,9 @@ public protocol APIProtocol: Sendable { /// /// Get a ruleset for a repository. /// + /// **Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the user + /// making the API request has write access to the ruleset. + /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/rulesets/{ruleset_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/rulesets/{ruleset_id}/get(repos/get-repo-ruleset)`. func repos_sol_get_hyphen_repo_hyphen_ruleset(_ input: Operations.repos_sol_get_hyphen_repo_hyphen_ruleset.Input) async throws -> Operations.repos_sol_get_hyphen_repo_hyphen_ruleset.Output @@ -2188,6 +2194,9 @@ extension APIProtocol { /// /// Get a repository ruleset for an organization. /// + /// **Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the user + /// making the API request has write access to the ruleset. + /// /// - Remark: HTTP `GET /orgs/{org}/rulesets/{ruleset_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/rulesets/{ruleset_id}/get(repos/get-org-ruleset)`. public func repos_sol_get_hyphen_org_hyphen_ruleset( @@ -5265,6 +5274,9 @@ extension APIProtocol { /// /// Get a ruleset for a repository. /// + /// **Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the user + /// making the API request has write access to the ruleset. + /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/rulesets/{ruleset_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/rulesets/{ruleset_id}/get(repos/get-repo-ruleset)`. public func repos_sol_get_hyphen_repo_hyphen_ruleset( @@ -10964,6 +10976,7 @@ public enum Components { case RepositoryRole = "RepositoryRole" case Team = "Team" case DeployKey = "DeployKey" + case EnterpriseTeam = "EnterpriseTeam" } /// The type of actor that can bypass a ruleset. /// @@ -22944,6 +22957,8 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/repos/POST/requestBody/json/use_squash_pr_title_as_default`. @available(*, deprecated) public var use_squash_pr_title_as_default: Swift.Bool? + /// Required when using `squash_merge_commit_message`. + /// /// The default value for a squash merge commit title: /// /// - `PR_TITLE` - default to the pull request's title. @@ -22954,6 +22969,8 @@ public enum Operations { case PR_TITLE = "PR_TITLE" case COMMIT_OR_PR_TITLE = "COMMIT_OR_PR_TITLE" } + /// Required when using `squash_merge_commit_message`. + /// /// The default value for a squash merge commit title: /// /// - `PR_TITLE` - default to the pull request's title. @@ -22981,6 +22998,8 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/repos/POST/requestBody/json/squash_merge_commit_message`. public var squash_merge_commit_message: Operations.repos_sol_create_hyphen_in_hyphen_org.Input.Body.jsonPayload.squash_merge_commit_messagePayload? + /// Required when using `merge_commit_message`. + /// /// The default value for a merge commit title. /// /// - `PR_TITLE` - default to the pull request's title. @@ -22991,6 +23010,8 @@ public enum Operations { case PR_TITLE = "PR_TITLE" case MERGE_MESSAGE = "MERGE_MESSAGE" } + /// Required when using `merge_commit_message`. + /// /// The default value for a merge commit title. /// /// - `PR_TITLE` - default to the pull request's title. @@ -23065,9 +23086,9 @@ public enum Operations { /// - allow_auto_merge: Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. /// - delete_branch_on_merge: Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. **The authenticated user must be an organization owner to set this property to `true`.** /// - use_squash_pr_title_as_default: Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. - /// - squash_merge_commit_title: The default value for a squash merge commit title: + /// - squash_merge_commit_title: Required when using `squash_merge_commit_message`. /// - squash_merge_commit_message: The default value for a squash merge commit message: - /// - merge_commit_title: The default value for a merge commit title. + /// - merge_commit_title: Required when using `merge_commit_message`. /// - merge_commit_message: The default value for a merge commit message. /// - custom_properties: The custom properties for the new repository. The keys are the custom property names, and the values are the corresponding custom property values. public init( @@ -24233,6 +24254,9 @@ public enum Operations { /// /// Get a repository ruleset for an organization. /// + /// **Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the user + /// making the API request has write access to the ruleset. + /// /// - Remark: HTTP `GET /orgs/{org}/rulesets/{ruleset_id}`. /// - Remark: Generated from `#/paths//orgs/{org}/rulesets/{ruleset_id}/get(repos/get-org-ruleset)`. public enum repos_sol_get_hyphen_org_hyphen_ruleset { @@ -25322,6 +25346,8 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/json/use_squash_pr_title_as_default`. @available(*, deprecated) public var use_squash_pr_title_as_default: Swift.Bool? + /// Required when using `squash_merge_commit_message`. + /// /// The default value for a squash merge commit title: /// /// - `PR_TITLE` - default to the pull request's title. @@ -25332,6 +25358,8 @@ public enum Operations { case PR_TITLE = "PR_TITLE" case COMMIT_OR_PR_TITLE = "COMMIT_OR_PR_TITLE" } + /// Required when using `squash_merge_commit_message`. + /// /// The default value for a squash merge commit title: /// /// - `PR_TITLE` - default to the pull request's title. @@ -25359,6 +25387,8 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/json/squash_merge_commit_message`. public var squash_merge_commit_message: Operations.repos_sol_update.Input.Body.jsonPayload.squash_merge_commit_messagePayload? + /// Required when using `merge_commit_message`. + /// /// The default value for a merge commit title. /// /// - `PR_TITLE` - default to the pull request's title. @@ -25369,6 +25399,8 @@ public enum Operations { case PR_TITLE = "PR_TITLE" case MERGE_MESSAGE = "MERGE_MESSAGE" } + /// Required when using `merge_commit_message`. + /// /// The default value for a merge commit title. /// /// - `PR_TITLE` - default to the pull request's title. @@ -25429,9 +25461,9 @@ public enum Operations { /// - delete_branch_on_merge: Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. /// - allow_update_branch: Either `true` to always allow a pull request head branch that is behind its base branch to be updated even if it is not required to be up to date before merging, or false otherwise. /// - use_squash_pr_title_as_default: Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. - /// - squash_merge_commit_title: The default value for a squash merge commit title: + /// - squash_merge_commit_title: Required when using `squash_merge_commit_message`. /// - squash_merge_commit_message: The default value for a squash merge commit message: - /// - merge_commit_title: The default value for a merge commit title. + /// - merge_commit_title: Required when using `merge_commit_message`. /// - merge_commit_message: The default value for a merge commit message. /// - archived: Whether to archive this repository. `false` will unarchive a previously archived repository. /// - allow_forking: Either `true` to allow private forks, or `false` to prevent private forks. @@ -57572,6 +57604,9 @@ public enum Operations { /// /// Get a ruleset for a repository. /// + /// **Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the user + /// making the API request has write access to the ruleset. + /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/rulesets/{ruleset_id}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/rulesets/{ruleset_id}/get(repos/get-repo-ruleset)`. public enum repos_sol_get_hyphen_repo_hyphen_ruleset { @@ -62958,6 +62993,8 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/user/repos/POST/requestBody/json/delete_branch_on_merge`. public var delete_branch_on_merge: Swift.Bool? + /// Required when using `squash_merge_commit_message`. + /// /// The default value for a squash merge commit title: /// /// - `PR_TITLE` - default to the pull request's title. @@ -62968,6 +63005,8 @@ public enum Operations { case PR_TITLE = "PR_TITLE" case COMMIT_OR_PR_TITLE = "COMMIT_OR_PR_TITLE" } + /// Required when using `squash_merge_commit_message`. + /// /// The default value for a squash merge commit title: /// /// - `PR_TITLE` - default to the pull request's title. @@ -62995,6 +63034,8 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/user/repos/POST/requestBody/json/squash_merge_commit_message`. public var squash_merge_commit_message: Operations.repos_sol_create_hyphen_for_hyphen_authenticated_hyphen_user.Input.Body.jsonPayload.squash_merge_commit_messagePayload? + /// Required when using `merge_commit_message`. + /// /// The default value for a merge commit title. /// /// - `PR_TITLE` - default to the pull request's title. @@ -63005,6 +63046,8 @@ public enum Operations { case PR_TITLE = "PR_TITLE" case MERGE_MESSAGE = "MERGE_MESSAGE" } + /// Required when using `merge_commit_message`. + /// /// The default value for a merge commit title. /// /// - `PR_TITLE` - default to the pull request's title. @@ -63060,9 +63103,9 @@ public enum Operations { /// - allow_rebase_merge: Whether to allow rebase merges for pull requests. /// - allow_auto_merge: Whether to allow Auto-merge to be used on pull requests. /// - delete_branch_on_merge: Whether to delete head branches when pull requests are merged - /// - squash_merge_commit_title: The default value for a squash merge commit title: + /// - squash_merge_commit_title: Required when using `squash_merge_commit_message`. /// - squash_merge_commit_message: The default value for a squash merge commit message: - /// - merge_commit_title: The default value for a merge commit title. + /// - merge_commit_title: Required when using `merge_commit_message`. /// - merge_commit_message: The default value for a merge commit message. /// - has_downloads: Whether downloads are enabled. /// - is_template: Whether this repository acts as a template that can be used to generate new repositories. From 57141d3741368e87e4a17e3f8c269f81b0ccf112 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 12 Aug 2024 21:57:16 +0000 Subject: [PATCH 125/152] Commit via running ake Sources/teams --- Sources/teams/Types.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/teams/Types.swift b/Sources/teams/Types.swift index af6a649d5cc..9b55f8ce3fb 100644 --- a/Sources/teams/Types.swift +++ b/Sources/teams/Types.swift @@ -5262,6 +5262,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/page`. public typealias page = Swift.Int + /// The slug of the team name. + /// + /// - Remark: Generated from `#/components/parameters/team-slug`. + public typealias team_hyphen_slug = Swift.String /// The account owner of the repository. The name is not case sensitive. /// /// - Remark: Generated from `#/components/parameters/owner`. @@ -5278,10 +5282,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/username`. public typealias username = Swift.String - /// The slug of the team name. - /// - /// - Remark: Generated from `#/components/parameters/team-slug`. - public typealias team_hyphen_slug = Swift.String /// The number that identifies the discussion. /// /// - Remark: Generated from `#/components/parameters/discussion-number`. From 1470e64d162b89106e5438ace0946b1817772800 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 12 Aug 2024 21:58:20 +0000 Subject: [PATCH 126/152] Commit via running ake Sources/copilot --- Sources/copilot/Client.swift | 201 ++++++++- Sources/copilot/Types.swift | 808 +++++++++++++++++++---------------- 2 files changed, 645 insertions(+), 364 deletions(-) diff --git a/Sources/copilot/Client.swift b/Sources/copilot/Client.swift index 67d2e428196..6b39c8a604a 100644 --- a/Sources/copilot/Client.swift +++ b/Sources/copilot/Client.swift @@ -232,7 +232,7 @@ public struct Client: APIProtocol { /// for all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances, /// and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions. /// - /// The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day, + /// The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day, /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, /// they must have telemetry enabled in their IDE. /// @@ -416,6 +416,203 @@ public struct Client: APIProtocol { } ) } + /// Get a summary of Copilot usage for an enterprise team + /// + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. + /// + /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE + /// for users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. + /// See the response schema tab for detailed metrics definitions. + /// + /// The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day, + /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + /// they must have telemetry enabled in their IDE. + /// + /// > [!NOTE] + /// > This endpoint will only return results for a given day if the enterprise team had five or more members with active Copilot licenses, as evaluated at the end of that day. + /// + /// Owners and billing managers for the enterprise that contains the enterprise team can view Copilot usage metrics for the enterprise team. + /// + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /enterprises/{enterprise}/team/{team_slug}/copilot/usage`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/team/{team_slug}/copilot/usage/get(copilot/usage-metrics-for-enterprise-team)`. + public func copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team(_ input: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input) async throws -> Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Output { + try await client.send( + input: input, + forOperation: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/enterprises/{}/team/{}/copilot/usage", + parameters: [ + input.path.enterprise, + input.path.team_slug + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "since", + value: input.query.since + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "until", + value: input.query.until + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "page", + value: input.query.page + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "per_page", + value: input.query.per_page + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + [Components.Schemas.copilot_hyphen_usage_hyphen_metrics].self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 500: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.internal_error.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .internalServerError(.init(body: body)) + case 401: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.requires_authentication.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unauthorized(.init(body: body)) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.forbidden.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.not_found.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } /// Get Copilot seat information and settings for an organization /// /// > [!NOTE] @@ -1472,7 +1669,7 @@ public struct Client: APIProtocol { /// across an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. /// See the response schema tab for detailed metrics definitions. /// - /// The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day, + /// The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day, /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, /// they must have telemetry enabled in their IDE. /// diff --git a/Sources/copilot/Types.swift b/Sources/copilot/Types.swift index 3757e956641..5700c10b2b9 100644 --- a/Sources/copilot/Types.swift +++ b/Sources/copilot/Types.swift @@ -38,7 +38,7 @@ public protocol APIProtocol: Sendable { /// for all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances, /// and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions. /// - /// The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day, + /// The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day, /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, /// they must have telemetry enabled in their IDE. /// @@ -49,6 +49,29 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `GET /enterprises/{enterprise}/copilot/usage`. /// - Remark: Generated from `#/paths//enterprises/{enterprise}/copilot/usage/get(copilot/usage-metrics-for-enterprise)`. func copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise(_ input: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Input) async throws -> Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise.Output + /// Get a summary of Copilot usage for an enterprise team + /// + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. + /// + /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE + /// for users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. + /// See the response schema tab for detailed metrics definitions. + /// + /// The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day, + /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + /// they must have telemetry enabled in their IDE. + /// + /// > [!NOTE] + /// > This endpoint will only return results for a given day if the enterprise team had five or more members with active Copilot licenses, as evaluated at the end of that day. + /// + /// Owners and billing managers for the enterprise that contains the enterprise team can view Copilot usage metrics for the enterprise team. + /// + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /enterprises/{enterprise}/team/{team_slug}/copilot/usage`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/team/{team_slug}/copilot/usage/get(copilot/usage-metrics-for-enterprise-team)`. + func copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team(_ input: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input) async throws -> Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Output /// Get Copilot seat information and settings for an organization /// /// > [!NOTE] @@ -167,7 +190,7 @@ public protocol APIProtocol: Sendable { /// across an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. /// See the response schema tab for detailed metrics definitions. /// - /// The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day, + /// The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day, /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, /// they must have telemetry enabled in their IDE. /// @@ -233,7 +256,7 @@ extension APIProtocol { /// for all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances, /// and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions. /// - /// The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day, + /// The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day, /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, /// they must have telemetry enabled in their IDE. /// @@ -254,6 +277,39 @@ extension APIProtocol { headers: headers )) } + /// Get a summary of Copilot usage for an enterprise team + /// + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. + /// + /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE + /// for users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. + /// See the response schema tab for detailed metrics definitions. + /// + /// The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day, + /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + /// they must have telemetry enabled in their IDE. + /// + /// > [!NOTE] + /// > This endpoint will only return results for a given day if the enterprise team had five or more members with active Copilot licenses, as evaluated at the end of that day. + /// + /// Owners and billing managers for the enterprise that contains the enterprise team can view Copilot usage metrics for the enterprise team. + /// + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /enterprises/{enterprise}/team/{team_slug}/copilot/usage`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/team/{team_slug}/copilot/usage/get(copilot/usage-metrics-for-enterprise-team)`. + public func copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team( + path: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input.Path, + query: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input.Query = .init(), + headers: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input.Headers = .init() + ) async throws -> Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Output { + try await copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team(Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input( + path: path, + query: query, + headers: headers + )) + } /// Get Copilot seat information and settings for an organization /// /// > [!NOTE] @@ -430,7 +486,7 @@ extension APIProtocol { /// across an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. /// See the response schema tab for detailed metrics definitions. /// - /// The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day, + /// The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day, /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, /// they must have telemetry enabled in their IDE. /// @@ -665,6 +721,91 @@ public enum Components { case status } } + /// A GitHub organization. + /// + /// - Remark: Generated from `#/components/schemas/organization-simple`. + public struct organization_hyphen_simple: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/organization-simple/login`. + public var login: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/organization-simple/node_id`. + public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/repos_url`. + public var repos_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/events_url`. + public var events_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/hooks_url`. + public var hooks_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/issues_url`. + public var issues_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/members_url`. + public var members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/public_members_url`. + public var public_members_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/avatar_url`. + public var avatar_url: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/description`. + public var description: Swift.String? + /// Creates a new `organization_hyphen_simple`. + /// + /// - Parameters: + /// - login: + /// - id: + /// - node_id: + /// - url: + /// - repos_url: + /// - events_url: + /// - hooks_url: + /// - issues_url: + /// - members_url: + /// - public_members_url: + /// - avatar_url: + /// - description: + public init( + login: Swift.String, + id: Swift.Int, + node_id: Swift.String, + url: Swift.String, + repos_url: Swift.String, + events_url: Swift.String, + hooks_url: Swift.String, + issues_url: Swift.String, + members_url: Swift.String, + public_members_url: Swift.String, + avatar_url: Swift.String, + description: Swift.String? = nil + ) { + self.login = login + self.id = id + self.node_id = node_id + self.url = url + self.repos_url = repos_url + self.events_url = events_url + self.hooks_url = hooks_url + self.issues_url = issues_url + self.members_url = members_url + self.public_members_url = public_members_url + self.avatar_url = avatar_url + self.description = description + } + public enum CodingKeys: String, CodingKey { + case login + case id + case node_id + case url + case repos_url + case events_url + case hooks_url + case issues_url + case members_url + case public_members_url + case avatar_url + case description + } + } /// Groups of organization members that gives permissions on specified repositories. /// /// - Remark: Generated from `#/components/schemas/nullable-team-simple`. @@ -910,337 +1051,6 @@ public enum Components { case parent } } - /// GitHub account for managing multiple users, teams, and repositories - /// - /// - Remark: Generated from `#/components/schemas/organization`. - public struct organization: Codable, Hashable, Sendable { - /// Unique login name of the organization - /// - /// - Remark: Generated from `#/components/schemas/organization/login`. - public var login: Swift.String - /// URL for the organization - /// - /// - Remark: Generated from `#/components/schemas/organization/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization/node_id`. - public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/repos_url`. - public var repos_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/events_url`. - public var events_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/hooks_url`. - public var hooks_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/issues_url`. - public var issues_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/members_url`. - public var members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/public_members_url`. - public var public_members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/avatar_url`. - public var avatar_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/description`. - public var description: Swift.String? - /// Display blog url for the organization - /// - /// - Remark: Generated from `#/components/schemas/organization/blog`. - public var blog: Swift.String? - /// - Remark: Generated from `#/components/schemas/organization/html_url`. - public var html_url: Swift.String - /// Display name for the organization - /// - /// - Remark: Generated from `#/components/schemas/organization/name`. - public var name: Swift.String? - /// Display company name for the organization - /// - /// - Remark: Generated from `#/components/schemas/organization/company`. - public var company: Swift.String? - /// Display location for the organization - /// - /// - Remark: Generated from `#/components/schemas/organization/location`. - public var location: Swift.String? - /// Display email for the organization - /// - /// - Remark: Generated from `#/components/schemas/organization/email`. - public var email: Swift.String? - /// Specifies if organization projects are enabled for this org - /// - /// - Remark: Generated from `#/components/schemas/organization/has_organization_projects`. - public var has_organization_projects: Swift.Bool - /// Specifies if repository projects are enabled for repositories that belong to this org - /// - /// - Remark: Generated from `#/components/schemas/organization/has_repository_projects`. - public var has_repository_projects: Swift.Bool - /// - Remark: Generated from `#/components/schemas/organization/is_verified`. - public var is_verified: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/organization/public_repos`. - public var public_repos: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization/public_gists`. - public var public_gists: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization/followers`. - public var followers: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization/following`. - public var following: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization/type`. - public var _type: Swift.String - /// - Remark: Generated from `#/components/schemas/organization/created_at`. - public var created_at: Foundation.Date - /// - Remark: Generated from `#/components/schemas/organization/updated_at`. - public var updated_at: Foundation.Date - /// - Remark: Generated from `#/components/schemas/organization/plan`. - public struct planPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/organization/plan/name`. - public var name: Swift.String? - /// - Remark: Generated from `#/components/schemas/organization/plan/space`. - public var space: Swift.Int? - /// - Remark: Generated from `#/components/schemas/organization/plan/private_repos`. - public var private_repos: Swift.Int? - /// - Remark: Generated from `#/components/schemas/organization/plan/filled_seats`. - public var filled_seats: Swift.Int? - /// - Remark: Generated from `#/components/schemas/organization/plan/seats`. - public var seats: Swift.Int? - /// Creates a new `planPayload`. - /// - /// - Parameters: - /// - name: - /// - space: - /// - private_repos: - /// - filled_seats: - /// - seats: - public init( - name: Swift.String? = nil, - space: Swift.Int? = nil, - private_repos: Swift.Int? = nil, - filled_seats: Swift.Int? = nil, - seats: Swift.Int? = nil - ) { - self.name = name - self.space = space - self.private_repos = private_repos - self.filled_seats = filled_seats - self.seats = seats - } - public enum CodingKeys: String, CodingKey { - case name - case space - case private_repos - case filled_seats - case seats - } - } - /// - Remark: Generated from `#/components/schemas/organization/plan`. - public var plan: Components.Schemas.organization.planPayload? - /// Creates a new `organization`. - /// - /// - Parameters: - /// - login: Unique login name of the organization - /// - url: URL for the organization - /// - id: - /// - node_id: - /// - repos_url: - /// - events_url: - /// - hooks_url: - /// - issues_url: - /// - members_url: - /// - public_members_url: - /// - avatar_url: - /// - description: - /// - blog: Display blog url for the organization - /// - html_url: - /// - name: Display name for the organization - /// - company: Display company name for the organization - /// - location: Display location for the organization - /// - email: Display email for the organization - /// - has_organization_projects: Specifies if organization projects are enabled for this org - /// - has_repository_projects: Specifies if repository projects are enabled for repositories that belong to this org - /// - is_verified: - /// - public_repos: - /// - public_gists: - /// - followers: - /// - following: - /// - _type: - /// - created_at: - /// - updated_at: - /// - plan: - public init( - login: Swift.String, - url: Swift.String, - id: Swift.Int, - node_id: Swift.String, - repos_url: Swift.String, - events_url: Swift.String, - hooks_url: Swift.String, - issues_url: Swift.String, - members_url: Swift.String, - public_members_url: Swift.String, - avatar_url: Swift.String, - description: Swift.String? = nil, - blog: Swift.String? = nil, - html_url: Swift.String, - name: Swift.String? = nil, - company: Swift.String? = nil, - location: Swift.String? = nil, - email: Swift.String? = nil, - has_organization_projects: Swift.Bool, - has_repository_projects: Swift.Bool, - is_verified: Swift.Bool? = nil, - public_repos: Swift.Int, - public_gists: Swift.Int, - followers: Swift.Int, - following: Swift.Int, - _type: Swift.String, - created_at: Foundation.Date, - updated_at: Foundation.Date, - plan: Components.Schemas.organization.planPayload? = nil - ) { - self.login = login - self.url = url - self.id = id - self.node_id = node_id - self.repos_url = repos_url - self.events_url = events_url - self.hooks_url = hooks_url - self.issues_url = issues_url - self.members_url = members_url - self.public_members_url = public_members_url - self.avatar_url = avatar_url - self.description = description - self.blog = blog - self.html_url = html_url - self.name = name - self.company = company - self.location = location - self.email = email - self.has_organization_projects = has_organization_projects - self.has_repository_projects = has_repository_projects - self.is_verified = is_verified - self.public_repos = public_repos - self.public_gists = public_gists - self.followers = followers - self.following = following - self._type = _type - self.created_at = created_at - self.updated_at = updated_at - self.plan = plan - } - public enum CodingKeys: String, CodingKey { - case login - case url - case id - case node_id - case repos_url - case events_url - case hooks_url - case issues_url - case members_url - case public_members_url - case avatar_url - case description - case blog - case html_url - case name - case company - case location - case email - case has_organization_projects - case has_repository_projects - case is_verified - case public_repos - case public_gists - case followers - case following - case _type = "type" - case created_at - case updated_at - case plan - } - } - /// A GitHub organization. - /// - /// - Remark: Generated from `#/components/schemas/organization-simple`. - public struct organization_hyphen_simple: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/organization-simple/login`. - public var login: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization-simple/node_id`. - public var node_id: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/repos_url`. - public var repos_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/events_url`. - public var events_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/hooks_url`. - public var hooks_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/issues_url`. - public var issues_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/members_url`. - public var members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/public_members_url`. - public var public_members_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/avatar_url`. - public var avatar_url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/description`. - public var description: Swift.String? - /// Creates a new `organization_hyphen_simple`. - /// - /// - Parameters: - /// - login: - /// - id: - /// - node_id: - /// - url: - /// - repos_url: - /// - events_url: - /// - hooks_url: - /// - issues_url: - /// - members_url: - /// - public_members_url: - /// - avatar_url: - /// - description: - public init( - login: Swift.String, - id: Swift.Int, - node_id: Swift.String, - url: Swift.String, - repos_url: Swift.String, - events_url: Swift.String, - hooks_url: Swift.String, - issues_url: Swift.String, - members_url: Swift.String, - public_members_url: Swift.String, - avatar_url: Swift.String, - description: Swift.String? = nil - ) { - self.login = login - self.id = id - self.node_id = node_id - self.url = url - self.repos_url = repos_url - self.events_url = events_url - self.hooks_url = hooks_url - self.issues_url = issues_url - self.members_url = members_url - self.public_members_url = public_members_url - self.avatar_url = avatar_url - self.description = description - } - public enum CodingKeys: String, CodingKey { - case login - case id - case node_id - case url - case repos_url - case events_url - case hooks_url - case issues_url - case members_url - case public_members_url - case avatar_url - case description - } - } /// Group of enterprise owners and/or members /// /// - Remark: Generated from `#/components/schemas/enterprise-team`. @@ -1322,28 +1132,12 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assignee`. @frozen public enum assigneePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assignee/case1`. - case simple_hyphen_user(Components.Schemas.simple_hyphen_user) - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assignee/case2`. - case team(Components.Schemas.team) - /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assignee/case3`. - case organization(Components.Schemas.organization) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .simple_hyphen_user(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .team(try .init(from: decoder)) - return - } catch { - errors.append(error) - } + /// - Remark: Generated from `#/components/schemas/copilot-seat-details/assignee/case1`. + case simple_hyphen_user(Components.Schemas.simple_hyphen_user) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] do { - self = .organization(try .init(from: decoder)) + self = .simple_hyphen_user(try .init(from: decoder)) return } catch { errors.append(error) @@ -1358,10 +1152,6 @@ public enum Components { switch self { case let .simple_hyphen_user(value): try value.encode(to: encoder) - case let .team(value): - try value.encode(to: encoder) - case let .organization(value): - try value.encode(to: encoder) } } } @@ -2086,6 +1876,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/enterprise`. public typealias enterprise = Swift.String + /// The slug of the team name. + /// + /// - Remark: Generated from `#/components/parameters/team-slug`. + public typealias team_hyphen_slug = Swift.String /// The organization name. The name is not case sensitive. /// /// - Remark: Generated from `#/components/parameters/org`. @@ -2536,7 +2330,7 @@ public enum Operations { /// for all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances, /// and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions. /// - /// The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day, + /// The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day, /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, /// they must have telemetry enabled in their IDE. /// @@ -2805,6 +2599,296 @@ public enum Operations { } } } + /// Get a summary of Copilot usage for an enterprise team + /// + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. + /// + /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE + /// for users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. + /// See the response schema tab for detailed metrics definitions. + /// + /// The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day, + /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + /// they must have telemetry enabled in their IDE. + /// + /// > [!NOTE] + /// > This endpoint will only return results for a given day if the enterprise team had five or more members with active Copilot licenses, as evaluated at the end of that day. + /// + /// Owners and billing managers for the enterprise that contains the enterprise team can view Copilot usage metrics for the enterprise team. + /// + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /enterprises/{enterprise}/team/{team_slug}/copilot/usage`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/team/{team_slug}/copilot/usage/get(copilot/usage-metrics-for-enterprise-team)`. + public enum copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team { + public static let id: Swift.String = "copilot/usage-metrics-for-enterprise-team" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/team/{team_slug}/copilot/usage/GET/path`. + public struct Path: Sendable, Hashable { + /// The slug version of the enterprise name. You can also substitute this value with the enterprise id. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/team/{team_slug}/copilot/usage/GET/path/enterprise`. + public var enterprise: Components.Parameters.enterprise + /// The slug of the team name. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/team/{team_slug}/copilot/usage/GET/path/team_slug`. + public var team_slug: Components.Parameters.team_hyphen_slug + /// Creates a new `Path`. + /// + /// - Parameters: + /// - enterprise: The slug version of the enterprise name. You can also substitute this value with the enterprise id. + /// - team_slug: The slug of the team name. + public init( + enterprise: Components.Parameters.enterprise, + team_slug: Components.Parameters.team_hyphen_slug + ) { + self.enterprise = enterprise + self.team_slug = team_slug + } + } + public var path: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input.Path + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/team/{team_slug}/copilot/usage/GET/query`. + public struct Query: Sendable, Hashable { + /// Show usage metrics since this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`). Maximum value is 28 days ago. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/team/{team_slug}/copilot/usage/GET/query/since`. + public var since: Swift.String? + /// Show usage metrics until this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`) and should not preceed the `since` date if it is passed. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/team/{team_slug}/copilot/usage/GET/query/until`. + public var until: Swift.String? + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/team/{team_slug}/copilot/usage/GET/query/page`. + public var page: Components.Parameters.page? + /// The number of days of metrics to display per page (max 28). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/team/{team_slug}/copilot/usage/GET/query/per_page`. + public var per_page: Swift.Int? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - since: Show usage metrics since this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`). Maximum value is 28 days ago. + /// - until: Show usage metrics until this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`) and should not preceed the `since` date if it is passed. + /// - page: The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// - per_page: The number of days of metrics to display per page (max 28). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + public init( + since: Swift.String? = nil, + until: Swift.String? = nil, + page: Components.Parameters.page? = nil, + per_page: Swift.Int? = nil + ) { + self.since = since + self.until = until + self.page = page + self.per_page = per_page + } + } + public var query: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input.Query + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/team/{team_slug}/copilot/usage/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input.Path, + query: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input.Query = .init(), + headers: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Input.Headers = .init() + ) { + self.path = path + self.query = query + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/team/{team_slug}/copilot/usage/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/team/{team_slug}/copilot/usage/GET/responses/200/content/application\/json`. + case json([Components.Schemas.copilot_hyphen_usage_hyphen_metrics]) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: [Components.Schemas.copilot_hyphen_usage_hyphen_metrics] { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/team/{team_slug}/copilot/usage/get(copilot/usage-metrics-for-enterprise-team)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_enterprise_hyphen_team.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Internal Error + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/team/{team_slug}/copilot/usage/get(copilot/usage-metrics-for-enterprise-team)/responses/500`. + /// + /// HTTP response code: `500 internalServerError`. + case internalServerError(Components.Responses.internal_error) + /// The associated value of the enum case if `self` is `.internalServerError`. + /// + /// - Throws: An error if `self` is not `.internalServerError`. + /// - SeeAlso: `.internalServerError`. + public var internalServerError: Components.Responses.internal_error { + get throws { + switch self { + case let .internalServerError(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "internalServerError", + response: self + ) + } + } + } + /// Requires authentication + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/team/{team_slug}/copilot/usage/get(copilot/usage-metrics-for-enterprise-team)/responses/401`. + /// + /// HTTP response code: `401 unauthorized`. + case unauthorized(Components.Responses.requires_authentication) + /// The associated value of the enum case if `self` is `.unauthorized`. + /// + /// - Throws: An error if `self` is not `.unauthorized`. + /// - SeeAlso: `.unauthorized`. + public var unauthorized: Components.Responses.requires_authentication { + get throws { + switch self { + case let .unauthorized(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unauthorized", + response: self + ) + } + } + } + /// Forbidden + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/team/{team_slug}/copilot/usage/get(copilot/usage-metrics-for-enterprise-team)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Components.Responses.forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Components.Responses.forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/team/{team_slug}/copilot/usage/get(copilot/usage-metrics-for-enterprise-team)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Components.Responses.not_found) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } /// Get Copilot seat information and settings for an organization /// /// > [!NOTE] @@ -4603,7 +4687,7 @@ public enum Operations { /// across an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. /// See the response schema tab for detailed metrics definitions. /// - /// The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day, + /// The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day, /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, /// they must have telemetry enabled in their IDE. /// From c3e6cf13b37799bdeb61509da5e070026a5b3d1d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 21:11:41 +0000 Subject: [PATCH 127/152] Bump Submodule/github/rest-api-description from `0e84946` to `9eeb21a` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `0e84946` to `9eeb21a`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/0e84946a411c87c1cb48ba453dea88409fc295c7...9eeb21a45b4c3d00de498624445a196062c7dfde) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index 0e84946a411..9eeb21a45b4 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit 0e84946a411c87c1cb48ba453dea88409fc295c7 +Subproject commit 9eeb21a45b4c3d00de498624445a196062c7dfde From f50f1c2653d4cbd674e5df355fac2c7c9c4516d1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 19 Aug 2024 21:27:31 +0000 Subject: [PATCH 128/152] Commit via running ake Sources/actions --- Sources/actions/Types.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Sources/actions/Types.swift b/Sources/actions/Types.swift index 47dc724f8b9..b81f0496849 100644 --- a/Sources/actions/Types.swift +++ b/Sources/actions/Types.swift @@ -5215,6 +5215,8 @@ public enum Components { public var slug: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/node_id`. public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-integration/client_id`. + public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/owner`. public var owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? /// The name of the GitHub app @@ -5345,8 +5347,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/nullable-integration/installations_count`. public var installations_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/nullable-integration/client_id`. - public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/client_secret`. public var client_secret: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/webhook_secret`. @@ -5359,6 +5359,7 @@ public enum Components { /// - id: Unique identifier of the GitHub app /// - slug: The slug name of the GitHub app /// - node_id: + /// - client_id: /// - owner: /// - name: The name of the GitHub app /// - description: @@ -5369,7 +5370,6 @@ public enum Components { /// - permissions: The set of permissions for the GitHub app /// - events: The list of events for the GitHub app /// - installations_count: The number of installations associated with the GitHub app - /// - client_id: /// - client_secret: /// - webhook_secret: /// - pem: @@ -5377,6 +5377,7 @@ public enum Components { id: Swift.Int, slug: Swift.String? = nil, node_id: Swift.String, + client_id: Swift.String? = nil, owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, name: Swift.String, description: Swift.String? = nil, @@ -5387,7 +5388,6 @@ public enum Components { permissions: Components.Schemas.nullable_hyphen_integration.permissionsPayload, events: [Swift.String], installations_count: Swift.Int? = nil, - client_id: Swift.String? = nil, client_secret: Swift.String? = nil, webhook_secret: Swift.String? = nil, pem: Swift.String? = nil @@ -5395,6 +5395,7 @@ public enum Components { self.id = id self.slug = slug self.node_id = node_id + self.client_id = client_id self.owner = owner self.name = name self.description = description @@ -5405,7 +5406,6 @@ public enum Components { self.permissions = permissions self.events = events self.installations_count = installations_count - self.client_id = client_id self.client_secret = client_secret self.webhook_secret = webhook_secret self.pem = pem @@ -5414,6 +5414,7 @@ public enum Components { case id case slug case node_id + case client_id case owner case name case description @@ -5424,7 +5425,6 @@ public enum Components { case permissions case events case installations_count - case client_id case client_secret case webhook_secret case pem From e7722215e3e13ac614de0013a59ae4ba0782f73a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 19 Aug 2024 21:27:53 +0000 Subject: [PATCH 129/152] Commit via running ake Sources/activity --- Sources/activity/Types.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Sources/activity/Types.swift b/Sources/activity/Types.swift index 09231940490..e764875c002 100644 --- a/Sources/activity/Types.swift +++ b/Sources/activity/Types.swift @@ -2300,6 +2300,8 @@ public enum Components { public var slug: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/node_id`. public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-integration/client_id`. + public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/owner`. public var owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? /// The name of the GitHub app @@ -2430,8 +2432,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/nullable-integration/installations_count`. public var installations_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/nullable-integration/client_id`. - public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/client_secret`. public var client_secret: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/webhook_secret`. @@ -2444,6 +2444,7 @@ public enum Components { /// - id: Unique identifier of the GitHub app /// - slug: The slug name of the GitHub app /// - node_id: + /// - client_id: /// - owner: /// - name: The name of the GitHub app /// - description: @@ -2454,7 +2455,6 @@ public enum Components { /// - permissions: The set of permissions for the GitHub app /// - events: The list of events for the GitHub app /// - installations_count: The number of installations associated with the GitHub app - /// - client_id: /// - client_secret: /// - webhook_secret: /// - pem: @@ -2462,6 +2462,7 @@ public enum Components { id: Swift.Int, slug: Swift.String? = nil, node_id: Swift.String, + client_id: Swift.String? = nil, owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, name: Swift.String, description: Swift.String? = nil, @@ -2472,7 +2473,6 @@ public enum Components { permissions: Components.Schemas.nullable_hyphen_integration.permissionsPayload, events: [Swift.String], installations_count: Swift.Int? = nil, - client_id: Swift.String? = nil, client_secret: Swift.String? = nil, webhook_secret: Swift.String? = nil, pem: Swift.String? = nil @@ -2480,6 +2480,7 @@ public enum Components { self.id = id self.slug = slug self.node_id = node_id + self.client_id = client_id self.owner = owner self.name = name self.description = description @@ -2490,7 +2491,6 @@ public enum Components { self.permissions = permissions self.events = events self.installations_count = installations_count - self.client_id = client_id self.client_secret = client_secret self.webhook_secret = webhook_secret self.pem = pem @@ -2499,6 +2499,7 @@ public enum Components { case id case slug case node_id + case client_id case owner case name case description @@ -2509,7 +2510,6 @@ public enum Components { case permissions case events case installations_count - case client_id case client_secret case webhook_secret case pem From 345a3be453c2c9661a2ef1c96dd704fd8dfffba6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 19 Aug 2024 21:28:13 +0000 Subject: [PATCH 130/152] Commit via running ake Sources/apps --- Sources/apps/Types.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Sources/apps/Types.swift b/Sources/apps/Types.swift index f94f2c69c9e..cf1b9cc4451 100644 --- a/Sources/apps/Types.swift +++ b/Sources/apps/Types.swift @@ -1341,6 +1341,8 @@ public enum Components { public var slug: Swift.String? /// - Remark: Generated from `#/components/schemas/integration/node_id`. public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/integration/client_id`. + public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/integration/owner`. public var owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? /// The name of the GitHub app @@ -1471,8 +1473,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/integration/installations_count`. public var installations_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/integration/client_id`. - public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/integration/client_secret`. public var client_secret: Swift.String? /// - Remark: Generated from `#/components/schemas/integration/webhook_secret`. @@ -1485,6 +1485,7 @@ public enum Components { /// - id: Unique identifier of the GitHub app /// - slug: The slug name of the GitHub app /// - node_id: + /// - client_id: /// - owner: /// - name: The name of the GitHub app /// - description: @@ -1495,7 +1496,6 @@ public enum Components { /// - permissions: The set of permissions for the GitHub app /// - events: The list of events for the GitHub app /// - installations_count: The number of installations associated with the GitHub app - /// - client_id: /// - client_secret: /// - webhook_secret: /// - pem: @@ -1503,6 +1503,7 @@ public enum Components { id: Swift.Int, slug: Swift.String? = nil, node_id: Swift.String, + client_id: Swift.String? = nil, owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, name: Swift.String, description: Swift.String? = nil, @@ -1513,7 +1514,6 @@ public enum Components { permissions: Components.Schemas.integration.permissionsPayload, events: [Swift.String], installations_count: Swift.Int? = nil, - client_id: Swift.String? = nil, client_secret: Swift.String? = nil, webhook_secret: Swift.String? = nil, pem: Swift.String? = nil @@ -1521,6 +1521,7 @@ public enum Components { self.id = id self.slug = slug self.node_id = node_id + self.client_id = client_id self.owner = owner self.name = name self.description = description @@ -1531,7 +1532,6 @@ public enum Components { self.permissions = permissions self.events = events self.installations_count = installations_count - self.client_id = client_id self.client_secret = client_secret self.webhook_secret = webhook_secret self.pem = pem @@ -1540,6 +1540,7 @@ public enum Components { case id case slug case node_id + case client_id case owner case name case description @@ -1550,7 +1551,6 @@ public enum Components { case permissions case events case installations_count - case client_id case client_secret case webhook_secret case pem From 239a7780095551960742e61828c9e085b5987a48 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 19 Aug 2024 21:28:55 +0000 Subject: [PATCH 131/152] Commit via running ake Sources/checks --- Sources/checks/Types.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Sources/checks/Types.swift b/Sources/checks/Types.swift index d4aa2f859c7..fcc84f1dfe9 100644 --- a/Sources/checks/Types.swift +++ b/Sources/checks/Types.swift @@ -789,6 +789,8 @@ public enum Components { public var slug: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/node_id`. public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-integration/client_id`. + public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/owner`. public var owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? /// The name of the GitHub app @@ -919,8 +921,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/nullable-integration/installations_count`. public var installations_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/nullable-integration/client_id`. - public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/client_secret`. public var client_secret: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/webhook_secret`. @@ -933,6 +933,7 @@ public enum Components { /// - id: Unique identifier of the GitHub app /// - slug: The slug name of the GitHub app /// - node_id: + /// - client_id: /// - owner: /// - name: The name of the GitHub app /// - description: @@ -943,7 +944,6 @@ public enum Components { /// - permissions: The set of permissions for the GitHub app /// - events: The list of events for the GitHub app /// - installations_count: The number of installations associated with the GitHub app - /// - client_id: /// - client_secret: /// - webhook_secret: /// - pem: @@ -951,6 +951,7 @@ public enum Components { id: Swift.Int, slug: Swift.String? = nil, node_id: Swift.String, + client_id: Swift.String? = nil, owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, name: Swift.String, description: Swift.String? = nil, @@ -961,7 +962,6 @@ public enum Components { permissions: Components.Schemas.nullable_hyphen_integration.permissionsPayload, events: [Swift.String], installations_count: Swift.Int? = nil, - client_id: Swift.String? = nil, client_secret: Swift.String? = nil, webhook_secret: Swift.String? = nil, pem: Swift.String? = nil @@ -969,6 +969,7 @@ public enum Components { self.id = id self.slug = slug self.node_id = node_id + self.client_id = client_id self.owner = owner self.name = name self.description = description @@ -979,7 +980,6 @@ public enum Components { self.permissions = permissions self.events = events self.installations_count = installations_count - self.client_id = client_id self.client_secret = client_secret self.webhook_secret = webhook_secret self.pem = pem @@ -988,6 +988,7 @@ public enum Components { case id case slug case node_id + case client_id case owner case name case description @@ -998,7 +999,6 @@ public enum Components { case permissions case events case installations_count - case client_id case client_secret case webhook_secret case pem From b47be22b0c9174c571bb98423d5429352be56952 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 19 Aug 2024 21:32:03 +0000 Subject: [PATCH 132/152] Commit via running ake Sources/issues --- Sources/issues/Types.swift | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Sources/issues/Types.swift b/Sources/issues/Types.swift index 63fa1666ebf..094041126fb 100644 --- a/Sources/issues/Types.swift +++ b/Sources/issues/Types.swift @@ -1534,6 +1534,8 @@ public enum Components { public var slug: Swift.String? /// - Remark: Generated from `#/components/schemas/integration/node_id`. public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/integration/client_id`. + public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/integration/owner`. public var owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? /// The name of the GitHub app @@ -1664,8 +1666,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/integration/installations_count`. public var installations_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/integration/client_id`. - public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/integration/client_secret`. public var client_secret: Swift.String? /// - Remark: Generated from `#/components/schemas/integration/webhook_secret`. @@ -1678,6 +1678,7 @@ public enum Components { /// - id: Unique identifier of the GitHub app /// - slug: The slug name of the GitHub app /// - node_id: + /// - client_id: /// - owner: /// - name: The name of the GitHub app /// - description: @@ -1688,7 +1689,6 @@ public enum Components { /// - permissions: The set of permissions for the GitHub app /// - events: The list of events for the GitHub app /// - installations_count: The number of installations associated with the GitHub app - /// - client_id: /// - client_secret: /// - webhook_secret: /// - pem: @@ -1696,6 +1696,7 @@ public enum Components { id: Swift.Int, slug: Swift.String? = nil, node_id: Swift.String, + client_id: Swift.String? = nil, owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, name: Swift.String, description: Swift.String? = nil, @@ -1706,7 +1707,6 @@ public enum Components { permissions: Components.Schemas.integration.permissionsPayload, events: [Swift.String], installations_count: Swift.Int? = nil, - client_id: Swift.String? = nil, client_secret: Swift.String? = nil, webhook_secret: Swift.String? = nil, pem: Swift.String? = nil @@ -1714,6 +1714,7 @@ public enum Components { self.id = id self.slug = slug self.node_id = node_id + self.client_id = client_id self.owner = owner self.name = name self.description = description @@ -1724,7 +1725,6 @@ public enum Components { self.permissions = permissions self.events = events self.installations_count = installations_count - self.client_id = client_id self.client_secret = client_secret self.webhook_secret = webhook_secret self.pem = pem @@ -1733,6 +1733,7 @@ public enum Components { case id case slug case node_id + case client_id case owner case name case description @@ -1743,7 +1744,6 @@ public enum Components { case permissions case events case installations_count - case client_id case client_secret case webhook_secret case pem @@ -3093,6 +3093,8 @@ public enum Components { public var slug: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/node_id`. public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-integration/client_id`. + public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/owner`. public var owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? /// The name of the GitHub app @@ -3223,8 +3225,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/nullable-integration/installations_count`. public var installations_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/nullable-integration/client_id`. - public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/client_secret`. public var client_secret: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/webhook_secret`. @@ -3237,6 +3237,7 @@ public enum Components { /// - id: Unique identifier of the GitHub app /// - slug: The slug name of the GitHub app /// - node_id: + /// - client_id: /// - owner: /// - name: The name of the GitHub app /// - description: @@ -3247,7 +3248,6 @@ public enum Components { /// - permissions: The set of permissions for the GitHub app /// - events: The list of events for the GitHub app /// - installations_count: The number of installations associated with the GitHub app - /// - client_id: /// - client_secret: /// - webhook_secret: /// - pem: @@ -3255,6 +3255,7 @@ public enum Components { id: Swift.Int, slug: Swift.String? = nil, node_id: Swift.String, + client_id: Swift.String? = nil, owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, name: Swift.String, description: Swift.String? = nil, @@ -3265,7 +3266,6 @@ public enum Components { permissions: Components.Schemas.nullable_hyphen_integration.permissionsPayload, events: [Swift.String], installations_count: Swift.Int? = nil, - client_id: Swift.String? = nil, client_secret: Swift.String? = nil, webhook_secret: Swift.String? = nil, pem: Swift.String? = nil @@ -3273,6 +3273,7 @@ public enum Components { self.id = id self.slug = slug self.node_id = node_id + self.client_id = client_id self.owner = owner self.name = name self.description = description @@ -3283,7 +3284,6 @@ public enum Components { self.permissions = permissions self.events = events self.installations_count = installations_count - self.client_id = client_id self.client_secret = client_secret self.webhook_secret = webhook_secret self.pem = pem @@ -3292,6 +3292,7 @@ public enum Components { case id case slug case node_id + case client_id case owner case name case description @@ -3302,7 +3303,6 @@ public enum Components { case permissions case events case installations_count - case client_id case client_secret case webhook_secret case pem From 143f47598f3303ceceda877877e6d2f7c9347e72 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 19 Aug 2024 21:34:30 +0000 Subject: [PATCH 133/152] Commit via running ake Sources/orgs --- Sources/orgs/Client.swift | 8 ++--- Sources/orgs/Types.swift | 70 ++++++++++++++++++++++----------------- 2 files changed, 43 insertions(+), 35 deletions(-) diff --git a/Sources/orgs/Client.swift b/Sources/orgs/Client.swift index aa1172aad99..3ab8bd3028e 100644 --- a/Sources/orgs/Client.swift +++ b/Sources/orgs/Client.swift @@ -5551,7 +5551,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - [Components.Schemas.org_hyphen_custom_hyphen_property].self, + [Components.Schemas.custom_hyphen_property].self, from: responseBody, transforming: { value in .json(value) @@ -5672,7 +5672,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - [Components.Schemas.org_hyphen_custom_hyphen_property].self, + [Components.Schemas.custom_hyphen_property].self, from: responseBody, transforming: { value in .json(value) @@ -5782,7 +5782,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.org_hyphen_custom_hyphen_property.self, + Components.Schemas.custom_hyphen_property.self, from: responseBody, transforming: { value in .json(value) @@ -5904,7 +5904,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.org_hyphen_custom_hyphen_property.self, + Components.Schemas.custom_hyphen_property.self, from: responseBody, transforming: { value in .json(value) diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index f07907611ea..4c8aef3c32c 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -6726,15 +6726,19 @@ public enum Components { } /// Custom property defined on an organization /// - /// - Remark: Generated from `#/components/schemas/org-custom-property`. - public struct org_hyphen_custom_hyphen_property: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/custom-property`. + public struct custom_hyphen_property: Codable, Hashable, Sendable { /// The name of the property /// - /// - Remark: Generated from `#/components/schemas/org-custom-property/property_name`. + /// - Remark: Generated from `#/components/schemas/custom-property/property_name`. public var property_name: Swift.String + /// The URL that can be used to fetch, update, or delete info about this property via the API. + /// + /// - Remark: Generated from `#/components/schemas/custom-property/url`. + public var url: Swift.String? /// The type of the value for the property /// - /// - Remark: Generated from `#/components/schemas/org-custom-property/value_type`. + /// - Remark: Generated from `#/components/schemas/custom-property/value_type`. @frozen public enum value_typePayload: String, Codable, Hashable, Sendable { case string = "string" case single_select = "single_select" @@ -6743,19 +6747,19 @@ public enum Components { } /// The type of the value for the property /// - /// - Remark: Generated from `#/components/schemas/org-custom-property/value_type`. - public var value_type: Components.Schemas.org_hyphen_custom_hyphen_property.value_typePayload + /// - Remark: Generated from `#/components/schemas/custom-property/value_type`. + public var value_type: Components.Schemas.custom_hyphen_property.value_typePayload /// Whether the property is required. /// - /// - Remark: Generated from `#/components/schemas/org-custom-property/required`. + /// - Remark: Generated from `#/components/schemas/custom-property/required`. public var required: Swift.Bool? /// Default value of the property /// - /// - Remark: Generated from `#/components/schemas/org-custom-property/default_value`. + /// - Remark: Generated from `#/components/schemas/custom-property/default_value`. @frozen public enum default_valuePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/org-custom-property/default_value/case1`. + /// - Remark: Generated from `#/components/schemas/custom-property/default_value/case1`. case case1(Swift.String) - /// - Remark: Generated from `#/components/schemas/org-custom-property/default_value/case2`. + /// - Remark: Generated from `#/components/schemas/custom-property/default_value/case2`. case case2([Swift.String]) public init(from decoder: any Decoder) throws { var errors: [any Error] = [] @@ -6788,32 +6792,33 @@ public enum Components { } /// Default value of the property /// - /// - Remark: Generated from `#/components/schemas/org-custom-property/default_value`. - public var default_value: Components.Schemas.org_hyphen_custom_hyphen_property.default_valuePayload? + /// - Remark: Generated from `#/components/schemas/custom-property/default_value`. + public var default_value: Components.Schemas.custom_hyphen_property.default_valuePayload? /// Short description of the property /// - /// - Remark: Generated from `#/components/schemas/org-custom-property/description`. + /// - Remark: Generated from `#/components/schemas/custom-property/description`. public var description: Swift.String? /// An ordered list of the allowed values of the property. /// The property can have up to 200 allowed values. /// - /// - Remark: Generated from `#/components/schemas/org-custom-property/allowed_values`. + /// - Remark: Generated from `#/components/schemas/custom-property/allowed_values`. public var allowed_values: [Swift.String]? /// Who can edit the values of the property /// - /// - Remark: Generated from `#/components/schemas/org-custom-property/values_editable_by`. + /// - Remark: Generated from `#/components/schemas/custom-property/values_editable_by`. @frozen public enum values_editable_byPayload: String, Codable, Hashable, Sendable { case org_actors = "org_actors" case org_and_repo_actors = "org_and_repo_actors" } /// Who can edit the values of the property /// - /// - Remark: Generated from `#/components/schemas/org-custom-property/values_editable_by`. - public var values_editable_by: Components.Schemas.org_hyphen_custom_hyphen_property.values_editable_byPayload? - /// Creates a new `org_hyphen_custom_hyphen_property`. + /// - Remark: Generated from `#/components/schemas/custom-property/values_editable_by`. + public var values_editable_by: Components.Schemas.custom_hyphen_property.values_editable_byPayload? + /// Creates a new `custom_hyphen_property`. /// /// - Parameters: /// - property_name: The name of the property + /// - url: The URL that can be used to fetch, update, or delete info about this property via the API. /// - value_type: The type of the value for the property /// - required: Whether the property is required. /// - default_value: Default value of the property @@ -6822,14 +6827,16 @@ public enum Components { /// - values_editable_by: Who can edit the values of the property public init( property_name: Swift.String, - value_type: Components.Schemas.org_hyphen_custom_hyphen_property.value_typePayload, + url: Swift.String? = nil, + value_type: Components.Schemas.custom_hyphen_property.value_typePayload, required: Swift.Bool? = nil, - default_value: Components.Schemas.org_hyphen_custom_hyphen_property.default_valuePayload? = nil, + default_value: Components.Schemas.custom_hyphen_property.default_valuePayload? = nil, description: Swift.String? = nil, allowed_values: [Swift.String]? = nil, - values_editable_by: Components.Schemas.org_hyphen_custom_hyphen_property.values_editable_byPayload? = nil + values_editable_by: Components.Schemas.custom_hyphen_property.values_editable_byPayload? = nil ) { self.property_name = property_name + self.url = url self.value_type = value_type self.required = required self.default_value = default_value @@ -6839,6 +6846,7 @@ public enum Components { } public enum CodingKeys: String, CodingKey { case property_name + case url case value_type case required case default_value @@ -18141,12 +18149,12 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/properties/schema/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/orgs/{org}/properties/schema/GET/responses/200/content/application\/json`. - case json([Components.Schemas.org_hyphen_custom_hyphen_property]) + case json([Components.Schemas.custom_hyphen_property]) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: [Components.Schemas.org_hyphen_custom_hyphen_property] { + public var json: [Components.Schemas.custom_hyphen_property] { get throws { switch self { case let .json(body): @@ -18312,12 +18320,12 @@ public enum Operations { /// The array of custom properties to create or update. /// /// - Remark: Generated from `#/paths/orgs/{org}/properties/schema/PATCH/requestBody/json/properties`. - public var properties: [Components.Schemas.org_hyphen_custom_hyphen_property] + public var properties: [Components.Schemas.custom_hyphen_property] /// Creates a new `jsonPayload`. /// /// - Parameters: /// - properties: The array of custom properties to create or update. - public init(properties: [Components.Schemas.org_hyphen_custom_hyphen_property]) { + public init(properties: [Components.Schemas.custom_hyphen_property]) { self.properties = properties } public enum CodingKeys: String, CodingKey { @@ -18349,12 +18357,12 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/properties/schema/PATCH/responses/200/content`. @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/orgs/{org}/properties/schema/PATCH/responses/200/content/application\/json`. - case json([Components.Schemas.org_hyphen_custom_hyphen_property]) + case json([Components.Schemas.custom_hyphen_property]) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: [Components.Schemas.org_hyphen_custom_hyphen_property] { + public var json: [Components.Schemas.custom_hyphen_property] { get throws { switch self { case let .json(body): @@ -18537,12 +18545,12 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/properties/schema/{custom_property_name}/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/orgs/{org}/properties/schema/{custom_property_name}/GET/responses/200/content/application\/json`. - case json(Components.Schemas.org_hyphen_custom_hyphen_property) + case json(Components.Schemas.custom_hyphen_property) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.org_hyphen_custom_hyphen_property { + public var json: Components.Schemas.custom_hyphen_property { get throws { switch self { case let .json(body): @@ -18835,12 +18843,12 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/properties/schema/{custom_property_name}/PUT/responses/200/content`. @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/orgs/{org}/properties/schema/{custom_property_name}/PUT/responses/200/content/application\/json`. - case json(Components.Schemas.org_hyphen_custom_hyphen_property) + case json(Components.Schemas.custom_hyphen_property) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.org_hyphen_custom_hyphen_property { + public var json: Components.Schemas.custom_hyphen_property { get throws { switch self { case let .json(body): From 8040453599475450fb558a0e76fcc52a896e4ea9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 19 Aug 2024 21:36:36 +0000 Subject: [PATCH 134/152] Commit via running ake Sources/repos --- Sources/repos/Client.swift | 2 ++ Sources/repos/Types.swift | 59 ++++++++++++++++++++++++++++---------- 2 files changed, 46 insertions(+), 15 deletions(-) diff --git a/Sources/repos/Client.swift b/Sources/repos/Client.swift index f8165e9c202..4cb921c6b93 100644 --- a/Sources/repos/Client.swift +++ b/Sources/repos/Client.swift @@ -14745,6 +14745,8 @@ public struct Client: APIProtocol { preconditionFailure("bestContentType chose an invalid content type.") } return .ok(.init(body: body)) + case 304: + return .notModified(.init()) case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) let body: Components.Responses.not_found.Body diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index 7d227a6211f..d03a2681163 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -6221,6 +6221,8 @@ public enum Components { public var slug: Swift.String? /// - Remark: Generated from `#/components/schemas/integration/node_id`. public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/integration/client_id`. + public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/integration/owner`. public var owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? /// The name of the GitHub app @@ -6351,8 +6353,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/integration/installations_count`. public var installations_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/integration/client_id`. - public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/integration/client_secret`. public var client_secret: Swift.String? /// - Remark: Generated from `#/components/schemas/integration/webhook_secret`. @@ -6365,6 +6365,7 @@ public enum Components { /// - id: Unique identifier of the GitHub app /// - slug: The slug name of the GitHub app /// - node_id: + /// - client_id: /// - owner: /// - name: The name of the GitHub app /// - description: @@ -6375,7 +6376,6 @@ public enum Components { /// - permissions: The set of permissions for the GitHub app /// - events: The list of events for the GitHub app /// - installations_count: The number of installations associated with the GitHub app - /// - client_id: /// - client_secret: /// - webhook_secret: /// - pem: @@ -6383,6 +6383,7 @@ public enum Components { id: Swift.Int, slug: Swift.String? = nil, node_id: Swift.String, + client_id: Swift.String? = nil, owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, name: Swift.String, description: Swift.String? = nil, @@ -6393,7 +6394,6 @@ public enum Components { permissions: Components.Schemas.integration.permissionsPayload, events: [Swift.String], installations_count: Swift.Int? = nil, - client_id: Swift.String? = nil, client_secret: Swift.String? = nil, webhook_secret: Swift.String? = nil, pem: Swift.String? = nil @@ -6401,6 +6401,7 @@ public enum Components { self.id = id self.slug = slug self.node_id = node_id + self.client_id = client_id self.owner = owner self.name = name self.description = description @@ -6411,7 +6412,6 @@ public enum Components { self.permissions = permissions self.events = events self.installations_count = installations_count - self.client_id = client_id self.client_secret = client_secret self.webhook_secret = webhook_secret self.pem = pem @@ -6420,6 +6420,7 @@ public enum Components { case id case slug case node_id + case client_id case owner case name case description @@ -6430,7 +6431,6 @@ public enum Components { case permissions case events case installations_count - case client_id case client_secret case webhook_secret case pem @@ -8261,6 +8261,8 @@ public enum Components { public var slug: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/node_id`. public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-integration/client_id`. + public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/owner`. public var owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? /// The name of the GitHub app @@ -8391,8 +8393,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/nullable-integration/installations_count`. public var installations_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/nullable-integration/client_id`. - public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/client_secret`. public var client_secret: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/webhook_secret`. @@ -8405,6 +8405,7 @@ public enum Components { /// - id: Unique identifier of the GitHub app /// - slug: The slug name of the GitHub app /// - node_id: + /// - client_id: /// - owner: /// - name: The name of the GitHub app /// - description: @@ -8415,7 +8416,6 @@ public enum Components { /// - permissions: The set of permissions for the GitHub app /// - events: The list of events for the GitHub app /// - installations_count: The number of installations associated with the GitHub app - /// - client_id: /// - client_secret: /// - webhook_secret: /// - pem: @@ -8423,6 +8423,7 @@ public enum Components { id: Swift.Int, slug: Swift.String? = nil, node_id: Swift.String, + client_id: Swift.String? = nil, owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, name: Swift.String, description: Swift.String? = nil, @@ -8433,7 +8434,6 @@ public enum Components { permissions: Components.Schemas.nullable_hyphen_integration.permissionsPayload, events: [Swift.String], installations_count: Swift.Int? = nil, - client_id: Swift.String? = nil, client_secret: Swift.String? = nil, webhook_secret: Swift.String? = nil, pem: Swift.String? = nil @@ -8441,6 +8441,7 @@ public enum Components { self.id = id self.slug = slug self.node_id = node_id + self.client_id = client_id self.owner = owner self.name = name self.description = description @@ -8451,7 +8452,6 @@ public enum Components { self.permissions = permissions self.events = events self.installations_count = installations_count - self.client_id = client_id self.client_secret = client_secret self.webhook_secret = webhook_secret self.pem = pem @@ -8460,6 +8460,7 @@ public enum Components { case id case slug case node_id + case client_id case owner case name case description @@ -8470,7 +8471,6 @@ public enum Components { case permissions case events case installations_count - case client_id case client_secret case webhook_secret case pem @@ -14477,6 +14477,8 @@ public enum Components { public var owner: Components.Schemas.branch_hyphen_restriction_hyphen_policy.appsPayloadPayload.ownerPayload? /// - Remark: Generated from `#/components/schemas/branch-restriction-policy/appsPayload/name`. public var name: Swift.String? + /// - Remark: Generated from `#/components/schemas/branch-restriction-policy/appsPayload/client_id`. + public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/branch-restriction-policy/appsPayload/description`. public var description: Swift.String? /// - Remark: Generated from `#/components/schemas/branch-restriction-policy/appsPayload/external_url`. @@ -14534,6 +14536,7 @@ public enum Components { /// - node_id: /// - owner: /// - name: + /// - client_id: /// - description: /// - external_url: /// - html_url: @@ -14547,6 +14550,7 @@ public enum Components { node_id: Swift.String? = nil, owner: Components.Schemas.branch_hyphen_restriction_hyphen_policy.appsPayloadPayload.ownerPayload? = nil, name: Swift.String? = nil, + client_id: Swift.String? = nil, description: Swift.String? = nil, external_url: Swift.String? = nil, html_url: Swift.String? = nil, @@ -14560,6 +14564,7 @@ public enum Components { self.node_id = node_id self.owner = owner self.name = name + self.client_id = client_id self.description = description self.external_url = external_url self.html_url = html_url @@ -14574,6 +14579,7 @@ public enum Components { case node_id case owner case name + case client_id case description case external_url case html_url @@ -25238,7 +25244,7 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/json/security_and_analysis/secret_scanning_push_protection`. public var secret_scanning_push_protection: Operations.repos_sol_update.Input.Body.jsonPayload.security_and_analysisPayload.secret_scanning_push_protectionPayload? - /// Use the `status` property to enable or disable secret scanning non-provider patterns for this repository. For more information, see "[Secret scanning supported secrets](/code-security/secret-scanning/secret-scanning-patterns#supported-secrets)." + /// Use the `status` property to enable or disable secret scanning non-provider patterns for this repository. For more information, see "[Supported secret scanning patterns](/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)." /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/json/security_and_analysis/secret_scanning_non_provider_patterns`. public struct secret_scanning_non_provider_patternsPayload: Codable, Hashable, Sendable { @@ -25257,7 +25263,7 @@ public enum Operations { case status } } - /// Use the `status` property to enable or disable secret scanning non-provider patterns for this repository. For more information, see "[Secret scanning supported secrets](/code-security/secret-scanning/secret-scanning-patterns#supported-secrets)." + /// Use the `status` property to enable or disable secret scanning non-provider patterns for this repository. For more information, see "[Supported secret scanning patterns](/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)." /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/PATCH/requestBody/json/security_and_analysis/secret_scanning_non_provider_patterns`. public var secret_scanning_non_provider_patterns: Operations.repos_sol_update.Input.Body.jsonPayload.security_and_analysisPayload.secret_scanning_non_provider_patternsPayload? @@ -25267,7 +25273,7 @@ public enum Operations { /// - advanced_security: Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." /// - secret_scanning: Use the `status` property to enable or disable secret scanning for this repository. For more information, see "[About secret scanning](/code-security/secret-security/about-secret-scanning)." /// - secret_scanning_push_protection: Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." - /// - secret_scanning_non_provider_patterns: Use the `status` property to enable or disable secret scanning non-provider patterns for this repository. For more information, see "[Secret scanning supported secrets](/code-security/secret-scanning/secret-scanning-patterns#supported-secrets)." + /// - secret_scanning_non_provider_patterns: Use the `status` property to enable or disable secret scanning non-provider patterns for this repository. For more information, see "[Supported secret scanning patterns](/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)." public init( advanced_security: Operations.repos_sol_update.Input.Body.jsonPayload.security_and_analysisPayload.advanced_securityPayload? = nil, secret_scanning: Operations.repos_sol_update.Input.Body.jsonPayload.security_and_analysisPayload.secret_scanningPayload? = nil, @@ -53670,6 +53676,29 @@ public enum Operations { } } } + /// Not modified + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/readme/get(repos/get-readme)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + case notModified(Components.Responses.not_modified) + /// The associated value of the enum case if `self` is `.notModified`. + /// + /// - Throws: An error if `self` is not `.notModified`. + /// - SeeAlso: `.notModified`. + public var notModified: Components.Responses.not_modified { + get throws { + switch self { + case let .notModified(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notModified", + response: self + ) + } + } + } /// Resource not found /// /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/readme/get(repos/get-readme)/responses/404`. From 426ebc75b5696b1634c99b1795b1692f5d44865b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 19 Aug 2024 21:36:57 +0000 Subject: [PATCH 135/152] Commit via running ake Sources/search --- Sources/search/Types.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Sources/search/Types.swift b/Sources/search/Types.swift index a250ef7acf4..2fb5e9d41fa 100644 --- a/Sources/search/Types.swift +++ b/Sources/search/Types.swift @@ -1737,6 +1737,8 @@ public enum Components { public var slug: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/node_id`. public var node_id: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-integration/client_id`. + public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/owner`. public var owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? /// The name of the GitHub app @@ -1867,8 +1869,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/nullable-integration/installations_count`. public var installations_count: Swift.Int? - /// - Remark: Generated from `#/components/schemas/nullable-integration/client_id`. - public var client_id: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/client_secret`. public var client_secret: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-integration/webhook_secret`. @@ -1881,6 +1881,7 @@ public enum Components { /// - id: Unique identifier of the GitHub app /// - slug: The slug name of the GitHub app /// - node_id: + /// - client_id: /// - owner: /// - name: The name of the GitHub app /// - description: @@ -1891,7 +1892,6 @@ public enum Components { /// - permissions: The set of permissions for the GitHub app /// - events: The list of events for the GitHub app /// - installations_count: The number of installations associated with the GitHub app - /// - client_id: /// - client_secret: /// - webhook_secret: /// - pem: @@ -1899,6 +1899,7 @@ public enum Components { id: Swift.Int, slug: Swift.String? = nil, node_id: Swift.String, + client_id: Swift.String? = nil, owner: Components.Schemas.nullable_hyphen_simple_hyphen_user? = nil, name: Swift.String, description: Swift.String? = nil, @@ -1909,7 +1910,6 @@ public enum Components { permissions: Components.Schemas.nullable_hyphen_integration.permissionsPayload, events: [Swift.String], installations_count: Swift.Int? = nil, - client_id: Swift.String? = nil, client_secret: Swift.String? = nil, webhook_secret: Swift.String? = nil, pem: Swift.String? = nil @@ -1917,6 +1917,7 @@ public enum Components { self.id = id self.slug = slug self.node_id = node_id + self.client_id = client_id self.owner = owner self.name = name self.description = description @@ -1927,7 +1928,6 @@ public enum Components { self.permissions = permissions self.events = events self.installations_count = installations_count - self.client_id = client_id self.client_secret = client_secret self.webhook_secret = webhook_secret self.pem = pem @@ -1936,6 +1936,7 @@ public enum Components { case id case slug case node_id + case client_id case owner case name case description @@ -1946,7 +1947,6 @@ public enum Components { case permissions case events case installations_count - case client_id case client_secret case webhook_secret case pem From 45d558bd7ccb8dfb259b15da1f078d3197168d53 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 19 Aug 2024 21:37:18 +0000 Subject: [PATCH 136/152] Commit via running ake Sources/secret-scanning --- Sources/secret-scanning/Client.swift | 106 ++++++++ Sources/secret-scanning/Types.swift | 370 ++++++++++++++++++++++++++- 2 files changed, 470 insertions(+), 6 deletions(-) diff --git a/Sources/secret-scanning/Client.swift b/Sources/secret-scanning/Client.swift index 82e6c56bbc2..c66162b2ebb 100644 --- a/Sources/secret-scanning/Client.swift +++ b/Sources/secret-scanning/Client.swift @@ -895,4 +895,110 @@ public struct Client: APIProtocol { } ) } + /// Create a push protection bypass + /// + /// Creates a bypass for a previously push protected secret. + /// + /// The authenticated user must be the original author of the committed secret. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// - Remark: HTTP `POST /repos/{owner}/{repo}/secret-scanning/push-protection-bypasses`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/post(secret-scanning/create-push-protection-bypass)`. + public func secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass(_ input: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Input) async throws -> Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Output { + try await client.send( + input: input, + forOperation: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/repos/{}/{}/secret-scanning/push-protection-bypasses", + parameters: [ + input.path.owner, + input.path.repo + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .post + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 403: + return .forbidden(.init()) + case 404: + return .notFound(.init()) + case 422: + return .unprocessableContent(.init()) + case 503: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.service_unavailable.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Responses.service_unavailable.Body.jsonPayload.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .serviceUnavailable(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } } diff --git a/Sources/secret-scanning/Types.swift b/Sources/secret-scanning/Types.swift index 785b23ccd5d..5c51a462605 100644 --- a/Sources/secret-scanning/Types.swift +++ b/Sources/secret-scanning/Types.swift @@ -79,6 +79,17 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations/get(secret-scanning/list-locations-for-alert)`. func secret_hyphen_scanning_sol_list_hyphen_locations_hyphen_for_hyphen_alert(_ input: Operations.secret_hyphen_scanning_sol_list_hyphen_locations_hyphen_for_hyphen_alert.Input) async throws -> Operations.secret_hyphen_scanning_sol_list_hyphen_locations_hyphen_for_hyphen_alert.Output + /// Create a push protection bypass + /// + /// Creates a bypass for a previously push protected secret. + /// + /// The authenticated user must be the original author of the committed secret. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// - Remark: HTTP `POST /repos/{owner}/{repo}/secret-scanning/push-protection-bypasses`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/post(secret-scanning/create-push-protection-bypass)`. + func secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass(_ input: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Input) async throws -> Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Output } /// Convenience overloads for operation inputs. @@ -209,6 +220,27 @@ extension APIProtocol { headers: headers )) } + /// Create a push protection bypass + /// + /// Creates a bypass for a previously push protected secret. + /// + /// The authenticated user must be the original author of the committed secret. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// - Remark: HTTP `POST /repos/{owner}/{repo}/secret-scanning/push-protection-bypasses`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/post(secret-scanning/create-push-protection-bypass)`. + public func secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass( + path: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Input.Path, + headers: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Input.Headers = .init(), + body: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Input.Body + ) async throws -> Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Output { + try await secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass(Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Input( + path: path, + headers: headers, + body: body + )) + } } /// Server URLs defined in the OpenAPI document. @@ -986,7 +1018,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/organization-secret-scanning-alert/secret_type`. public var secret_type: Swift.String? /// User-friendly name for the detected secret, matching the `secret_type`. - /// For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + /// For a list of built-in patterns, see "[Supported secret scanning patterns](https://docs.github.com/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)." /// /// - Remark: Generated from `#/components/schemas/organization-secret-scanning-alert/secret_type_display_name`. public var secret_type_display_name: Swift.String? @@ -1142,7 +1174,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/secret-scanning-alert/secret_type`. public var secret_type: Swift.String? /// User-friendly name for the detected secret, matching the `secret_type`. - /// For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + /// For a list of built-in patterns, see "[Supported secret scanning patterns](https://docs.github.com/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)." /// /// - Remark: Generated from `#/components/schemas/secret-scanning-alert/secret_type_display_name`. public var secret_type_display_name: Swift.String? @@ -1824,6 +1856,51 @@ public enum Components { case details } } + /// The reason for bypassing push protection. + /// + /// - Remark: Generated from `#/components/schemas/secret-scanning-push-protection-bypass-reason`. + @frozen public enum secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_reason: String, Codable, Hashable, Sendable { + case false_positive = "false_positive" + case used_in_tests = "used_in_tests" + case will_fix_later = "will_fix_later" + } + /// The ID of the push protection bypass placeholder. This value is returned on any push protected routes. + /// + /// - Remark: Generated from `#/components/schemas/secret-scanning-push-protection-bypass-placeholder-id`. + public typealias secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_placeholder_hyphen_id = Swift.String + /// - Remark: Generated from `#/components/schemas/secret-scanning-push-protection-bypass`. + public struct secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/secret-scanning-push-protection-bypass/reason`. + public var reason: Components.Schemas.secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_reason? + /// The time that the bypass will expire in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + /// + /// - Remark: Generated from `#/components/schemas/secret-scanning-push-protection-bypass/expire_at`. + public var expire_at: Foundation.Date? + /// The token type this bypass is for. + /// + /// - Remark: Generated from `#/components/schemas/secret-scanning-push-protection-bypass/token_type`. + public var token_type: Swift.String? + /// Creates a new `secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass`. + /// + /// - Parameters: + /// - reason: + /// - expire_at: The time that the bypass will expire in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + /// - token_type: The token type this bypass is for. + public init( + reason: Components.Schemas.secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_reason? = nil, + expire_at: Foundation.Date? = nil, + token_type: Swift.String? = nil + ) { + self.reason = reason + self.expire_at = expire_at + self.token_type = token_type + } + public enum CodingKeys: String, CodingKey { + case reason + case expire_at + case token_type + } + } } /// Types generated from the `#/components/parameters` section of the OpenAPI document. public enum Parameters { @@ -1862,7 +1939,7 @@ public enum Components { case resolved = "resolved" } /// A comma-separated list of secret types to return. By default all secret types are returned. - /// See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + /// See "[Supported secret scanning patterns](https://docs.github.com/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" /// for a complete list of secret types. /// /// - Remark: Generated from `#/components/parameters/secret-scanning-alert-secret-type`. @@ -2052,7 +2129,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/enterprises/{enterprise}/secret-scanning/alerts/GET/query/state`. public var state: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_state? /// A comma-separated list of secret types to return. By default all secret types are returned. - /// See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + /// See "[Supported secret scanning patterns](https://docs.github.com/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" /// for a complete list of secret types. /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/secret-scanning/alerts/GET/query/secret_type`. @@ -2346,7 +2423,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/secret-scanning/alerts/GET/query/state`. public var state: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_state? /// A comma-separated list of secret types to return. By default all secret types are returned. - /// See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + /// See "[Supported secret scanning patterns](https://docs.github.com/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" /// for a complete list of secret types. /// /// - Remark: Generated from `#/paths/orgs/{org}/secret-scanning/alerts/GET/query/secret_type`. @@ -2656,7 +2733,7 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/alerts/GET/query/state`. public var state: Components.Parameters.secret_hyphen_scanning_hyphen_alert_hyphen_state? /// A comma-separated list of secret types to return. By default all secret types are returned. - /// See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + /// See "[Supported secret scanning patterns](https://docs.github.com/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" /// for a complete list of secret types. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/alerts/GET/query/secret_type`. @@ -3669,4 +3746,285 @@ public enum Operations { } } } + /// Create a push protection bypass + /// + /// Creates a bypass for a previously push protected secret. + /// + /// The authenticated user must be the original author of the committed secret. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// - Remark: HTTP `POST /repos/{owner}/{repo}/secret-scanning/push-protection-bypasses`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/post(secret-scanning/create-push-protection-bypass)`. + public enum secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass { + public static let id: Swift.String = "secret-scanning/create-push-protection-bypass" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/POST/path`. + public struct Path: Sendable, Hashable { + /// The account owner of the repository. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/POST/path/owner`. + public var owner: Components.Parameters.owner + /// The name of the repository without the `.git` extension. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/POST/path/repo`. + public var repo: Components.Parameters.repo + /// Creates a new `Path`. + /// + /// - Parameters: + /// - owner: The account owner of the repository. The name is not case sensitive. + /// - repo: The name of the repository without the `.git` extension. The name is not case sensitive. + public init( + owner: Components.Parameters.owner, + repo: Components.Parameters.repo + ) { + self.owner = owner + self.repo = repo + } + } + public var path: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Input.Path + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/POST/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Input.Headers + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/POST/requestBody/json`. + public struct jsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/POST/requestBody/json/reason`. + public var reason: Components.Schemas.secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_reason + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/POST/requestBody/json/placeholder_id`. + public var placeholder_id: Components.Schemas.secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_placeholder_hyphen_id + /// Creates a new `jsonPayload`. + /// + /// - Parameters: + /// - reason: + /// - placeholder_id: + public init( + reason: Components.Schemas.secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_reason, + placeholder_id: Components.Schemas.secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_placeholder_hyphen_id + ) { + self.reason = reason + self.placeholder_id = placeholder_id + } + public enum CodingKeys: String, CodingKey { + case reason + case placeholder_id + } + } + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/POST/requestBody/content/application\/json`. + case json(Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Input.Body.jsonPayload) + } + public var body: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Input.Path, + headers: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Input.Headers = .init(), + body: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Input.Body + ) { + self.path = path + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/POST/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/POST/responses/200/content/application\/json`. + case json(Components.Schemas.secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/post(secret-scanning/create-push-protection-bypass)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + public struct Forbidden: Sendable, Hashable { + /// Creates a new `Forbidden`. + public init() {} + } + /// User does not have enough permissions to perform this action. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/post(secret-scanning/create-push-protection-bypass)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Output.Forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Output.Forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } + } + public struct NotFound: Sendable, Hashable { + /// Creates a new `NotFound`. + public init() {} + } + /// Placeholder ID not found, or push protection is disabled on this repository. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/post(secret-scanning/create-push-protection-bypass)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Output.NotFound) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Output.NotFound { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + public struct UnprocessableContent: Sendable, Hashable { + /// Creates a new `UnprocessableContent`. + public init() {} + } + /// Bad request, input data missing or incorrect. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/post(secret-scanning/create-push-protection-bypass)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + case unprocessableContent(Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Output.UnprocessableContent) + /// The associated value of the enum case if `self` is `.unprocessableContent`. + /// + /// - Throws: An error if `self` is not `.unprocessableContent`. + /// - SeeAlso: `.unprocessableContent`. + public var unprocessableContent: Operations.secret_hyphen_scanning_sol_create_hyphen_push_hyphen_protection_hyphen_bypass.Output.UnprocessableContent { + get throws { + switch self { + case let .unprocessableContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unprocessableContent", + response: self + ) + } + } + } + /// Service unavailable + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/secret-scanning/push-protection-bypasses/post(secret-scanning/create-push-protection-bypass)/responses/503`. + /// + /// HTTP response code: `503 serviceUnavailable`. + case serviceUnavailable(Components.Responses.service_unavailable) + /// The associated value of the enum case if `self` is `.serviceUnavailable`. + /// + /// - Throws: An error if `self` is not `.serviceUnavailable`. + /// - SeeAlso: `.serviceUnavailable`. + public var serviceUnavailable: Components.Responses.service_unavailable { + get throws { + switch self { + case let .serviceUnavailable(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "serviceUnavailable", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } } From a8af028aff9682204a66049f04e0b86c62ba1553 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 19 Aug 2024 21:38:42 +0000 Subject: [PATCH 137/152] Commit via running ake Sources/copilot --- Sources/copilot/Client.swift | 197 ++++++++++++++++++++ Sources/copilot/Types.swift | 346 +++++++++++++++++++++++++++++++++++ 2 files changed, 543 insertions(+) diff --git a/Sources/copilot/Client.swift b/Sources/copilot/Client.swift index 6b39c8a604a..601629eab90 100644 --- a/Sources/copilot/Client.swift +++ b/Sources/copilot/Client.swift @@ -2015,4 +2015,201 @@ public struct Client: APIProtocol { } ) } + /// Get a summary of Copilot usage for a team + /// + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. + /// + /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE + /// for users within a team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. + /// See the response schema tab for detailed metrics definitions. + /// + /// The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day, + /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + /// they must have telemetry enabled in their IDE. + /// + /// > [!NOTE] + /// > This endpoint will only return results for a given day if the team had five or more members with active Copilot licenses, as evaluated at the end of that day. + /// + /// Organization owners for the organization that contains this team, and owners and billing managers of the parent enterprise can view Copilot usage metrics for a team. + /// + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/team/{team_slug}/copilot/usage`. + /// - Remark: Generated from `#/paths//orgs/{org}/team/{team_slug}/copilot/usage/get(copilot/usage-metrics-for-team)`. + public func copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team(_ input: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Input) async throws -> Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Output { + try await client.send( + input: input, + forOperation: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/team/{}/copilot/usage", + parameters: [ + input.path.org, + input.path.team_slug + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "since", + value: input.query.since + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "until", + value: input.query.until + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "page", + value: input.query.page + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "per_page", + value: input.query.per_page + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + [Components.Schemas.copilot_hyphen_usage_hyphen_metrics].self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 500: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.internal_error.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .internalServerError(.init(body: body)) + case 401: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.requires_authentication.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unauthorized(.init(body: body)) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.forbidden.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.not_found.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } } diff --git a/Sources/copilot/Types.swift b/Sources/copilot/Types.swift index 5700c10b2b9..1b9fd1199b9 100644 --- a/Sources/copilot/Types.swift +++ b/Sources/copilot/Types.swift @@ -215,6 +215,29 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `GET /orgs/{org}/members/{username}/copilot`. /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/copilot/get(copilot/get-copilot-seat-details-for-user)`. func copilot_sol_get_hyphen_copilot_hyphen_seat_hyphen_details_hyphen_for_hyphen_user(_ input: Operations.copilot_sol_get_hyphen_copilot_hyphen_seat_hyphen_details_hyphen_for_hyphen_user.Input) async throws -> Operations.copilot_sol_get_hyphen_copilot_hyphen_seat_hyphen_details_hyphen_for_hyphen_user.Output + /// Get a summary of Copilot usage for a team + /// + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. + /// + /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE + /// for users within a team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. + /// See the response schema tab for detailed metrics definitions. + /// + /// The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day, + /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + /// they must have telemetry enabled in their IDE. + /// + /// > [!NOTE] + /// > This endpoint will only return results for a given day if the team had five or more members with active Copilot licenses, as evaluated at the end of that day. + /// + /// Organization owners for the organization that contains this team, and owners and billing managers of the parent enterprise can view Copilot usage metrics for a team. + /// + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/team/{team_slug}/copilot/usage`. + /// - Remark: Generated from `#/paths//orgs/{org}/team/{team_slug}/copilot/usage/get(copilot/usage-metrics-for-team)`. + func copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team(_ input: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Input) async throws -> Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Output } /// Convenience overloads for operation inputs. @@ -529,6 +552,39 @@ extension APIProtocol { headers: headers )) } + /// Get a summary of Copilot usage for a team + /// + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. + /// + /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE + /// for users within a team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. + /// See the response schema tab for detailed metrics definitions. + /// + /// The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day, + /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + /// they must have telemetry enabled in their IDE. + /// + /// > [!NOTE] + /// > This endpoint will only return results for a given day if the team had five or more members with active Copilot licenses, as evaluated at the end of that day. + /// + /// Organization owners for the organization that contains this team, and owners and billing managers of the parent enterprise can view Copilot usage metrics for a team. + /// + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/team/{team_slug}/copilot/usage`. + /// - Remark: Generated from `#/paths//orgs/{org}/team/{team_slug}/copilot/usage/get(copilot/usage-metrics-for-team)`. + public func copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team( + path: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Input.Path, + query: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Input.Query = .init(), + headers: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Input.Headers = .init() + ) async throws -> Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Output { + try await copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team(Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Input( + path: path, + query: query, + headers: headers + )) + } } /// Server URLs defined in the OpenAPI document. @@ -5223,4 +5279,294 @@ public enum Operations { } } } + /// Get a summary of Copilot usage for a team + /// + /// > [!NOTE] + /// > This endpoint is in beta and is subject to change. + /// + /// You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE + /// for users within a team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. + /// See the response schema tab for detailed metrics definitions. + /// + /// The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day, + /// and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + /// they must have telemetry enabled in their IDE. + /// + /// > [!NOTE] + /// > This endpoint will only return results for a given day if the team had five or more members with active Copilot licenses, as evaluated at the end of that day. + /// + /// Organization owners for the organization that contains this team, and owners and billing managers of the parent enterprise can view Copilot usage metrics for a team. + /// + /// OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/team/{team_slug}/copilot/usage`. + /// - Remark: Generated from `#/paths//orgs/{org}/team/{team_slug}/copilot/usage/get(copilot/usage-metrics-for-team)`. + public enum copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team { + public static let id: Swift.String = "copilot/usage-metrics-for-team" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/team/{team_slug}/copilot/usage/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/team/{team_slug}/copilot/usage/GET/path/org`. + public var org: Components.Parameters.org + /// The slug of the team name. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/team/{team_slug}/copilot/usage/GET/path/team_slug`. + public var team_slug: Components.Parameters.team_hyphen_slug + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - team_slug: The slug of the team name. + public init( + org: Components.Parameters.org, + team_slug: Components.Parameters.team_hyphen_slug + ) { + self.org = org + self.team_slug = team_slug + } + } + public var path: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/team/{team_slug}/copilot/usage/GET/query`. + public struct Query: Sendable, Hashable { + /// Show usage metrics since this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`). Maximum value is 28 days ago. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/team/{team_slug}/copilot/usage/GET/query/since`. + public var since: Swift.String? + /// Show usage metrics until this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`) and should not preceed the `since` date if it is passed. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/team/{team_slug}/copilot/usage/GET/query/until`. + public var until: Swift.String? + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// + /// - Remark: Generated from `#/paths/orgs/{org}/team/{team_slug}/copilot/usage/GET/query/page`. + public var page: Components.Parameters.page? + /// The number of days of metrics to display per page (max 28). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// + /// - Remark: Generated from `#/paths/orgs/{org}/team/{team_slug}/copilot/usage/GET/query/per_page`. + public var per_page: Swift.Int? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - since: Show usage metrics since this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`). Maximum value is 28 days ago. + /// - until: Show usage metrics until this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`) and should not preceed the `since` date if it is passed. + /// - page: The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// - per_page: The number of days of metrics to display per page (max 28). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + public init( + since: Swift.String? = nil, + until: Swift.String? = nil, + page: Components.Parameters.page? = nil, + per_page: Swift.Int? = nil + ) { + self.since = since + self.until = until + self.page = page + self.per_page = per_page + } + } + public var query: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Input.Query + /// - Remark: Generated from `#/paths/orgs/{org}/team/{team_slug}/copilot/usage/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Input.Path, + query: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Input.Query = .init(), + headers: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Input.Headers = .init() + ) { + self.path = path + self.query = query + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/team/{team_slug}/copilot/usage/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/team/{team_slug}/copilot/usage/GET/responses/200/content/application\/json`. + case json([Components.Schemas.copilot_hyphen_usage_hyphen_metrics]) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: [Components.Schemas.copilot_hyphen_usage_hyphen_metrics] { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/team/{team_slug}/copilot/usage/get(copilot/usage-metrics-for-team)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.copilot_sol_usage_hyphen_metrics_hyphen_for_hyphen_team.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Internal Error + /// + /// - Remark: Generated from `#/paths//orgs/{org}/team/{team_slug}/copilot/usage/get(copilot/usage-metrics-for-team)/responses/500`. + /// + /// HTTP response code: `500 internalServerError`. + case internalServerError(Components.Responses.internal_error) + /// The associated value of the enum case if `self` is `.internalServerError`. + /// + /// - Throws: An error if `self` is not `.internalServerError`. + /// - SeeAlso: `.internalServerError`. + public var internalServerError: Components.Responses.internal_error { + get throws { + switch self { + case let .internalServerError(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "internalServerError", + response: self + ) + } + } + } + /// Requires authentication + /// + /// - Remark: Generated from `#/paths//orgs/{org}/team/{team_slug}/copilot/usage/get(copilot/usage-metrics-for-team)/responses/401`. + /// + /// HTTP response code: `401 unauthorized`. + case unauthorized(Components.Responses.requires_authentication) + /// The associated value of the enum case if `self` is `.unauthorized`. + /// + /// - Throws: An error if `self` is not `.unauthorized`. + /// - SeeAlso: `.unauthorized`. + public var unauthorized: Components.Responses.requires_authentication { + get throws { + switch self { + case let .unauthorized(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unauthorized", + response: self + ) + } + } + } + /// Forbidden + /// + /// - Remark: Generated from `#/paths//orgs/{org}/team/{team_slug}/copilot/usage/get(copilot/usage-metrics-for-team)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Components.Responses.forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Components.Responses.forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//orgs/{org}/team/{team_slug}/copilot/usage/get(copilot/usage-metrics-for-team)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Components.Responses.not_found) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } } From b8336f8f41457f7dce837db4e431db6f6bb7e4e4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 19 Aug 2024 21:40:47 +0000 Subject: [PATCH 138/152] Commit via running ake Sources/code-security --- Sources/code-security/Client.swift | 117 ++++++++ Sources/code-security/Types.swift | 464 +++++++++++++++++++++++++++++ 2 files changed, 581 insertions(+) diff --git a/Sources/code-security/Client.swift b/Sources/code-security/Client.swift index c7c472015bd..a6275de7d16 100644 --- a/Sources/code-security/Client.swift +++ b/Sources/code-security/Client.swift @@ -1212,4 +1212,121 @@ public struct Client: APIProtocol { } ) } + /// Get the code security configuration associated with a repository + /// + /// Get the code security configuration that manages a repository's code security settings. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/code-security-configuration`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-security-configuration/get(code-security/get-configuration-for-repository)`. + public func code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository(_ input: Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Input) async throws -> Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Output { + try await client.send( + input: input, + forOperation: Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/repos/{}/{}/code-security-configuration", + parameters: [ + input.path.owner, + input.path.repo + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.code_hyphen_security_hyphen_configuration_hyphen_for_hyphen_repository.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 204: + return .noContent(.init()) + case 304: + return .notModified(.init()) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.forbidden.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.not_found.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.basic_hyphen_error.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } } diff --git a/Sources/code-security/Types.swift b/Sources/code-security/Types.swift index d013b4aa624..76d78c0936f 100644 --- a/Sources/code-security/Types.swift +++ b/Sources/code-security/Types.swift @@ -128,6 +128,17 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `GET /orgs/{org}/code-security/configurations/{configuration_id}/repositories`. /// - Remark: Generated from `#/paths//orgs/{org}/code-security/configurations/{configuration_id}/repositories/get(code-security/get-repositories-for-configuration)`. func code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration(_ input: Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Input) async throws -> Operations.code_hyphen_security_sol_get_hyphen_repositories_hyphen_for_hyphen_configuration.Output + /// Get the code security configuration associated with a repository + /// + /// Get the code security configuration that manages a repository's code security settings. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/code-security-configuration`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-security-configuration/get(code-security/get-configuration-for-repository)`. + func code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository(_ input: Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Input) async throws -> Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Output } /// Convenience overloads for operation inputs. @@ -343,6 +354,25 @@ extension APIProtocol { headers: headers )) } + /// Get the code security configuration associated with a repository + /// + /// Get the code security configuration that manages a repository's code security settings. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/code-security-configuration`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-security-configuration/get(code-security/get-configuration-for-repository)`. + public func code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository( + path: Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Input.Path, + headers: Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Input.Headers = .init() + ) async throws -> Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Output { + try await code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository(Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Input( + path: path, + headers: headers + )) + } } /// Server URLs defined in the OpenAPI document. @@ -1013,6 +1043,41 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/dependency_graph`. public var dependency_graph: Components.Schemas.code_hyphen_security_hyphen_configuration.dependency_graphPayload? + /// The enablement status of Automatic dependency submission + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/dependency_graph_autosubmit_action`. + @frozen public enum dependency_graph_autosubmit_actionPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of Automatic dependency submission + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/dependency_graph_autosubmit_action`. + public var dependency_graph_autosubmit_action: Components.Schemas.code_hyphen_security_hyphen_configuration.dependency_graph_autosubmit_actionPayload? + /// Feature options for Automatic dependency submission + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/dependency_graph_autosubmit_action_options`. + public struct dependency_graph_autosubmit_action_optionsPayload: Codable, Hashable, Sendable { + /// Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/dependency_graph_autosubmit_action_options/labeled_runners`. + public var labeled_runners: Swift.Bool? + /// Creates a new `dependency_graph_autosubmit_action_optionsPayload`. + /// + /// - Parameters: + /// - labeled_runners: Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. + public init(labeled_runners: Swift.Bool? = nil) { + self.labeled_runners = labeled_runners + } + public enum CodingKeys: String, CodingKey { + case labeled_runners + } + } + /// Feature options for Automatic dependency submission + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration/dependency_graph_autosubmit_action_options`. + public var dependency_graph_autosubmit_action_options: Components.Schemas.code_hyphen_security_hyphen_configuration.dependency_graph_autosubmit_action_optionsPayload? /// The enablement status of Dependabot alerts /// /// - Remark: Generated from `#/components/schemas/code-security-configuration/dependabot_alerts`. @@ -1129,6 +1194,8 @@ public enum Components { /// - description: A description of the code security configuration /// - advanced_security: The enablement status of GitHub Advanced Security /// - dependency_graph: The enablement status of Dependency Graph + /// - dependency_graph_autosubmit_action: The enablement status of Automatic dependency submission + /// - dependency_graph_autosubmit_action_options: Feature options for Automatic dependency submission /// - dependabot_alerts: The enablement status of Dependabot alerts /// - dependabot_security_updates: The enablement status of Dependabot security updates /// - code_scanning_default_setup: The enablement status of code scanning default setup @@ -1148,6 +1215,8 @@ public enum Components { description: Swift.String? = nil, advanced_security: Components.Schemas.code_hyphen_security_hyphen_configuration.advanced_securityPayload? = nil, dependency_graph: Components.Schemas.code_hyphen_security_hyphen_configuration.dependency_graphPayload? = nil, + dependency_graph_autosubmit_action: Components.Schemas.code_hyphen_security_hyphen_configuration.dependency_graph_autosubmit_actionPayload? = nil, + dependency_graph_autosubmit_action_options: Components.Schemas.code_hyphen_security_hyphen_configuration.dependency_graph_autosubmit_action_optionsPayload? = nil, dependabot_alerts: Components.Schemas.code_hyphen_security_hyphen_configuration.dependabot_alertsPayload? = nil, dependabot_security_updates: Components.Schemas.code_hyphen_security_hyphen_configuration.dependabot_security_updatesPayload? = nil, code_scanning_default_setup: Components.Schemas.code_hyphen_security_hyphen_configuration.code_scanning_default_setupPayload? = nil, @@ -1167,6 +1236,8 @@ public enum Components { self.description = description self.advanced_security = advanced_security self.dependency_graph = dependency_graph + self.dependency_graph_autosubmit_action = dependency_graph_autosubmit_action + self.dependency_graph_autosubmit_action_options = dependency_graph_autosubmit_action_options self.dependabot_alerts = dependabot_alerts self.dependabot_security_updates = dependabot_security_updates self.code_scanning_default_setup = code_scanning_default_setup @@ -1187,6 +1258,8 @@ public enum Components { case description case advanced_security case dependency_graph + case dependency_graph_autosubmit_action + case dependency_graph_autosubmit_action_options case dependabot_alerts case dependabot_security_updates case code_scanning_default_setup @@ -1270,6 +1343,46 @@ public enum Components { case repository } } + /// Code security configuration associated with a repository and attachment status + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration-for-repository`. + public struct code_hyphen_security_hyphen_configuration_hyphen_for_hyphen_repository: Codable, Hashable, Sendable { + /// The attachment status of the code security configuration on the repository. + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration-for-repository/status`. + @frozen public enum statusPayload: String, Codable, Hashable, Sendable { + case attached = "attached" + case attaching = "attaching" + case detached = "detached" + case removed = "removed" + case enforced = "enforced" + case failed = "failed" + case updating = "updating" + case removed_by_enterprise = "removed_by_enterprise" + } + /// The attachment status of the code security configuration on the repository. + /// + /// - Remark: Generated from `#/components/schemas/code-security-configuration-for-repository/status`. + public var status: Components.Schemas.code_hyphen_security_hyphen_configuration_hyphen_for_hyphen_repository.statusPayload? + /// - Remark: Generated from `#/components/schemas/code-security-configuration-for-repository/configuration`. + public var configuration: Components.Schemas.code_hyphen_security_hyphen_configuration? + /// Creates a new `code_hyphen_security_hyphen_configuration_hyphen_for_hyphen_repository`. + /// + /// - Parameters: + /// - status: The attachment status of the code security configuration on the repository. + /// - configuration: + public init( + status: Components.Schemas.code_hyphen_security_hyphen_configuration_hyphen_for_hyphen_repository.statusPayload? = nil, + configuration: Components.Schemas.code_hyphen_security_hyphen_configuration? = nil + ) { + self.status = status + self.configuration = configuration + } + public enum CodingKeys: String, CodingKey { + case status + case configuration + } + } } /// Types generated from the `#/components/parameters` section of the OpenAPI document. public enum Parameters { @@ -1281,6 +1394,14 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/pagination-after`. public typealias pagination_hyphen_after = Swift.String + /// The account owner of the repository. The name is not case sensitive. + /// + /// - Remark: Generated from `#/components/parameters/owner`. + public typealias owner = Swift.String + /// The name of the repository without the `.git` extension. The name is not case sensitive. + /// + /// - Remark: Generated from `#/components/parameters/repo`. + public typealias repo = Swift.String /// The organization name. The name is not case sensitive. /// /// - Remark: Generated from `#/components/parameters/org`. @@ -1776,6 +1897,41 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/dependency_graph`. public var dependency_graph: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependency_graphPayload? + /// The enablement status of Automatic dependency submission + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/dependency_graph_autosubmit_action`. + @frozen public enum dependency_graph_autosubmit_actionPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of Automatic dependency submission + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/dependency_graph_autosubmit_action`. + public var dependency_graph_autosubmit_action: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_actionPayload? + /// Feature options for Automatic dependency submission + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/dependency_graph_autosubmit_action_options`. + public struct dependency_graph_autosubmit_action_optionsPayload: Codable, Hashable, Sendable { + /// Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/dependency_graph_autosubmit_action_options/labeled_runners`. + public var labeled_runners: Swift.Bool? + /// Creates a new `dependency_graph_autosubmit_action_optionsPayload`. + /// + /// - Parameters: + /// - labeled_runners: Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. + public init(labeled_runners: Swift.Bool? = nil) { + self.labeled_runners = labeled_runners + } + public enum CodingKeys: String, CodingKey { + case labeled_runners + } + } + /// Feature options for Automatic dependency submission + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/dependency_graph_autosubmit_action_options`. + public var dependency_graph_autosubmit_action_options: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_action_optionsPayload? /// The enablement status of Dependabot alerts /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/POST/requestBody/json/dependabot_alerts`. @@ -1878,6 +2034,8 @@ public enum Operations { /// - description: A description of the code security configuration /// - advanced_security: The enablement status of GitHub Advanced Security /// - dependency_graph: The enablement status of Dependency Graph + /// - dependency_graph_autosubmit_action: The enablement status of Automatic dependency submission + /// - dependency_graph_autosubmit_action_options: Feature options for Automatic dependency submission /// - dependabot_alerts: The enablement status of Dependabot alerts /// - dependabot_security_updates: The enablement status of Dependabot security updates /// - code_scanning_default_setup: The enablement status of code scanning default setup @@ -1891,6 +2049,8 @@ public enum Operations { description: Swift.String, advanced_security: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.advanced_securityPayload? = nil, dependency_graph: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependency_graphPayload? = nil, + dependency_graph_autosubmit_action: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_actionPayload? = nil, + dependency_graph_autosubmit_action_options: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_action_optionsPayload? = nil, dependabot_alerts: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependabot_alertsPayload? = nil, dependabot_security_updates: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependabot_security_updatesPayload? = nil, code_scanning_default_setup: Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.code_scanning_default_setupPayload? = nil, @@ -1904,6 +2064,8 @@ public enum Operations { self.description = description self.advanced_security = advanced_security self.dependency_graph = dependency_graph + self.dependency_graph_autosubmit_action = dependency_graph_autosubmit_action + self.dependency_graph_autosubmit_action_options = dependency_graph_autosubmit_action_options self.dependabot_alerts = dependabot_alerts self.dependabot_security_updates = dependabot_security_updates self.code_scanning_default_setup = code_scanning_default_setup @@ -1918,6 +2080,8 @@ public enum Operations { case description case advanced_security case dependency_graph + case dependency_graph_autosubmit_action + case dependency_graph_autosubmit_action_options case dependabot_alerts case dependabot_security_updates case code_scanning_default_setup @@ -1945,6 +2109,14 @@ public enum Operations { Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependency_graphPayload.self, forKey: .dependency_graph ) + dependency_graph_autosubmit_action = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_actionPayload.self, + forKey: .dependency_graph_autosubmit_action + ) + dependency_graph_autosubmit_action_options = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_action_optionsPayload.self, + forKey: .dependency_graph_autosubmit_action_options + ) dependabot_alerts = try container.decodeIfPresent( Operations.code_hyphen_security_sol_create_hyphen_configuration.Input.Body.jsonPayload.dependabot_alertsPayload.self, forKey: .dependabot_alerts @@ -1982,6 +2154,8 @@ public enum Operations { "description", "advanced_security", "dependency_graph", + "dependency_graph_autosubmit_action", + "dependency_graph_autosubmit_action_options", "dependabot_alerts", "dependabot_security_updates", "code_scanning_default_setup", @@ -2842,6 +3016,41 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependency_graph`. public var dependency_graph: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependency_graphPayload? + /// The enablement status of Automatic dependency submission + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependency_graph_autosubmit_action`. + @frozen public enum dependency_graph_autosubmit_actionPayload: String, Codable, Hashable, Sendable { + case enabled = "enabled" + case disabled = "disabled" + case not_set = "not_set" + } + /// The enablement status of Automatic dependency submission + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependency_graph_autosubmit_action`. + public var dependency_graph_autosubmit_action: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_actionPayload? + /// Feature options for Automatic dependency submission + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependency_graph_autosubmit_action_options`. + public struct dependency_graph_autosubmit_action_optionsPayload: Codable, Hashable, Sendable { + /// Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependency_graph_autosubmit_action_options/labeled_runners`. + public var labeled_runners: Swift.Bool? + /// Creates a new `dependency_graph_autosubmit_action_optionsPayload`. + /// + /// - Parameters: + /// - labeled_runners: Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. + public init(labeled_runners: Swift.Bool? = nil) { + self.labeled_runners = labeled_runners + } + public enum CodingKeys: String, CodingKey { + case labeled_runners + } + } + /// Feature options for Automatic dependency submission + /// + /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependency_graph_autosubmit_action_options`. + public var dependency_graph_autosubmit_action_options: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_action_optionsPayload? /// The enablement status of Dependabot alerts /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/{configuration_id}/PATCH/requestBody/json/dependabot_alerts`. @@ -2944,6 +3153,8 @@ public enum Operations { /// - description: A description of the code security configuration /// - advanced_security: The enablement status of GitHub Advanced Security /// - dependency_graph: The enablement status of Dependency Graph + /// - dependency_graph_autosubmit_action: The enablement status of Automatic dependency submission + /// - dependency_graph_autosubmit_action_options: Feature options for Automatic dependency submission /// - dependabot_alerts: The enablement status of Dependabot alerts /// - dependabot_security_updates: The enablement status of Dependabot security updates /// - code_scanning_default_setup: The enablement status of code scanning default setup @@ -2957,6 +3168,8 @@ public enum Operations { description: Swift.String? = nil, advanced_security: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.advanced_securityPayload? = nil, dependency_graph: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependency_graphPayload? = nil, + dependency_graph_autosubmit_action: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_actionPayload? = nil, + dependency_graph_autosubmit_action_options: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_action_optionsPayload? = nil, dependabot_alerts: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependabot_alertsPayload? = nil, dependabot_security_updates: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependabot_security_updatesPayload? = nil, code_scanning_default_setup: Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.code_scanning_default_setupPayload? = nil, @@ -2970,6 +3183,8 @@ public enum Operations { self.description = description self.advanced_security = advanced_security self.dependency_graph = dependency_graph + self.dependency_graph_autosubmit_action = dependency_graph_autosubmit_action + self.dependency_graph_autosubmit_action_options = dependency_graph_autosubmit_action_options self.dependabot_alerts = dependabot_alerts self.dependabot_security_updates = dependabot_security_updates self.code_scanning_default_setup = code_scanning_default_setup @@ -2984,6 +3199,8 @@ public enum Operations { case description case advanced_security case dependency_graph + case dependency_graph_autosubmit_action + case dependency_graph_autosubmit_action_options case dependabot_alerts case dependabot_security_updates case code_scanning_default_setup @@ -3011,6 +3228,14 @@ public enum Operations { Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependency_graphPayload.self, forKey: .dependency_graph ) + dependency_graph_autosubmit_action = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_actionPayload.self, + forKey: .dependency_graph_autosubmit_action + ) + dependency_graph_autosubmit_action_options = try container.decodeIfPresent( + Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependency_graph_autosubmit_action_optionsPayload.self, + forKey: .dependency_graph_autosubmit_action_options + ) dependabot_alerts = try container.decodeIfPresent( Operations.code_hyphen_security_sol_update_hyphen_configuration.Input.Body.jsonPayload.dependabot_alertsPayload.self, forKey: .dependabot_alerts @@ -3048,6 +3273,8 @@ public enum Operations { "description", "advanced_security", "dependency_graph", + "dependency_graph_autosubmit_action", + "dependency_graph_autosubmit_action_options", "dependabot_alerts", "dependabot_security_updates", "code_scanning_default_setup", @@ -4081,4 +4308,241 @@ public enum Operations { } } } + /// Get the code security configuration associated with a repository + /// + /// Get the code security configuration that manages a repository's code security settings. + /// + /// The authenticated user must be an administrator or security manager for the organization to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/code-security-configuration`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-security-configuration/get(code-security/get-configuration-for-repository)`. + public enum code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository { + public static let id: Swift.String = "code-security/get-configuration-for-repository" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-security-configuration/GET/path`. + public struct Path: Sendable, Hashable { + /// The account owner of the repository. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-security-configuration/GET/path/owner`. + public var owner: Components.Parameters.owner + /// The name of the repository without the `.git` extension. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-security-configuration/GET/path/repo`. + public var repo: Components.Parameters.repo + /// Creates a new `Path`. + /// + /// - Parameters: + /// - owner: The account owner of the repository. The name is not case sensitive. + /// - repo: The name of the repository without the `.git` extension. The name is not case sensitive. + public init( + owner: Components.Parameters.owner, + repo: Components.Parameters.repo + ) { + self.owner = owner + self.repo = repo + } + } + public var path: Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Input.Path + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-security-configuration/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + public init( + path: Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Input.Path, + headers: Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Input.Headers = .init() + ) { + self.path = path + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-security-configuration/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-security-configuration/GET/responses/200/content/application\/json`. + case json(Components.Schemas.code_hyphen_security_hyphen_configuration_hyphen_for_hyphen_repository) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.code_hyphen_security_hyphen_configuration_hyphen_for_hyphen_repository { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-security-configuration/get(code-security/get-configuration-for-repository)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.code_hyphen_security_sol_get_hyphen_configuration_hyphen_for_hyphen_repository.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// A header with no content is returned. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-security-configuration/get(code-security/get-configuration-for-repository)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Components.Responses.no_content) + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Components.Responses.no_content { + get throws { + switch self { + case let .noContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "noContent", + response: self + ) + } + } + } + /// Not modified + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-security-configuration/get(code-security/get-configuration-for-repository)/responses/304`. + /// + /// HTTP response code: `304 notModified`. + case notModified(Components.Responses.not_modified) + /// The associated value of the enum case if `self` is `.notModified`. + /// + /// - Throws: An error if `self` is not `.notModified`. + /// - SeeAlso: `.notModified`. + public var notModified: Components.Responses.not_modified { + get throws { + switch self { + case let .notModified(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notModified", + response: self + ) + } + } + } + /// Forbidden + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-security-configuration/get(code-security/get-configuration-for-repository)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Components.Responses.forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Components.Responses.forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-security-configuration/get(code-security/get-configuration-for-repository)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Components.Responses.not_found) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.not_found { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } } From 512a670e8079460484dcc169a97331a362002ac1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 21:22:23 +0000 Subject: [PATCH 139/152] Bump Submodule/github/rest-api-description from `9eeb21a` to `5b01aaf` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `9eeb21a` to `5b01aaf`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/9eeb21a45b4c3d00de498624445a196062c7dfde...5b01aaf4c881bb75d6ef744ff8b26fa229f4deca) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index 9eeb21a45b4..5b01aaf4c88 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit 9eeb21a45b4c3d00de498624445a196062c7dfde +Subproject commit 5b01aaf4c881bb75d6ef744ff8b26fa229f4deca From 4951c725a1a73023a73ea880a0ef6b740a1f4955 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 26 Aug 2024 21:40:40 +0000 Subject: [PATCH 140/152] Commit via running ake Sources/checks --- Sources/checks/Types.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/checks/Types.swift b/Sources/checks/Types.swift index fcc84f1dfe9..ab0d2c93dc3 100644 --- a/Sources/checks/Types.swift +++ b/Sources/checks/Types.swift @@ -2053,7 +2053,7 @@ public enum Components { /// The id of the check. /// /// - Remark: Generated from `#/components/schemas/check-run/id`. - public var id: Swift.Int + public var id: Swift.Int64 /// The SHA of the commit that is being checked. /// /// - Remark: Generated from `#/components/schemas/check-run/head_sha`. @@ -2192,7 +2192,7 @@ public enum Components { /// - pull_requests: Pull requests that are open with a `head_sha` or `head_branch` that matches the check. The returned pull requests do not necessarily indicate pull requests that triggered the check. /// - deployment: public init( - id: Swift.Int, + id: Swift.Int64, head_sha: Swift.String, node_id: Swift.String, external_id: Swift.String? = nil, From e32cd621c8cb8b5640e175dbfbc4030a49ca92a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 26 Aug 2024 21:43:07 +0000 Subject: [PATCH 141/152] Commit via running ake Sources/git --- Sources/git/Client.swift | 4 +- Sources/git/Types.swift | 165 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 164 insertions(+), 5 deletions(-) diff --git a/Sources/git/Client.swift b/Sources/git/Client.swift index 8de5f0ee12c..b2452d34134 100644 --- a/Sources/git/Client.swift +++ b/Sources/git/Client.swift @@ -176,7 +176,7 @@ public struct Client: APIProtocol { return .forbidden(.init(body: body)) case 422: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.validation_failed.Body + let body: Operations.git_sol_create_hyphen_blob.Output.UnprocessableContent.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -186,7 +186,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.validation_hyphen_error.self, + Operations.git_sol_create_hyphen_blob.Output.UnprocessableContent.Body.jsonPayload.self, from: responseBody, transforming: { value in .json(value) diff --git a/Sources/git/Types.swift b/Sources/git/Types.swift index 64050038238..384a2f3264b 100644 --- a/Sources/git/Types.swift +++ b/Sources/git/Types.swift @@ -812,6 +812,102 @@ public enum Components { case signature } } + /// The ID of the push protection bypass placeholder. This value is returned on any push protected routes. + /// + /// - Remark: Generated from `#/components/schemas/secret-scanning-push-protection-bypass-placeholder-id`. + public typealias secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_placeholder_hyphen_id = Swift.String + /// Repository rule violation was detected + /// + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error`. + public struct repository_hyphen_rule_hyphen_violation_hyphen_error: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/message`. + public var message: Swift.String? + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/documentation_url`. + public var documentation_url: Swift.String? + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/status`. + public var status: Swift.String? + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata`. + public struct metadataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning`. + public struct secret_scanningPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning/bypass_placeholdersPayload`. + public struct bypass_placeholdersPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning/bypass_placeholdersPayload/placeholder_id`. + public var placeholder_id: Components.Schemas.secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_placeholder_hyphen_id? + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning/bypass_placeholdersPayload/token_type`. + public var token_type: Swift.String? + /// Creates a new `bypass_placeholdersPayloadPayload`. + /// + /// - Parameters: + /// - placeholder_id: + /// - token_type: + public init( + placeholder_id: Components.Schemas.secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_placeholder_hyphen_id? = nil, + token_type: Swift.String? = nil + ) { + self.placeholder_id = placeholder_id + self.token_type = token_type + } + public enum CodingKeys: String, CodingKey { + case placeholder_id + case token_type + } + } + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning/bypass_placeholders`. + public typealias bypass_placeholdersPayload = [Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload.secret_scanningPayload.bypass_placeholdersPayloadPayload] + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning/bypass_placeholders`. + public var bypass_placeholders: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload.secret_scanningPayload.bypass_placeholdersPayload? + /// Creates a new `secret_scanningPayload`. + /// + /// - Parameters: + /// - bypass_placeholders: + public init(bypass_placeholders: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload.secret_scanningPayload.bypass_placeholdersPayload? = nil) { + self.bypass_placeholders = bypass_placeholders + } + public enum CodingKeys: String, CodingKey { + case bypass_placeholders + } + } + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning`. + public var secret_scanning: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload.secret_scanningPayload? + /// Creates a new `metadataPayload`. + /// + /// - Parameters: + /// - secret_scanning: + public init(secret_scanning: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload.secret_scanningPayload? = nil) { + self.secret_scanning = secret_scanning + } + public enum CodingKeys: String, CodingKey { + case secret_scanning + } + } + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata`. + public var metadata: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload? + /// Creates a new `repository_hyphen_rule_hyphen_violation_hyphen_error`. + /// + /// - Parameters: + /// - message: + /// - documentation_url: + /// - status: + /// - metadata: + public init( + message: Swift.String? = nil, + documentation_url: Swift.String? = nil, + status: Swift.String? = nil, + metadata: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload? = nil + ) { + self.message = message + self.documentation_url = documentation_url + self.status = status + self.metadata = metadata + } + public enum CodingKeys: String, CodingKey { + case message + case documentation_url + case status + case metadata + } + } /// Short Blob /// /// - Remark: Generated from `#/components/schemas/short-blob`. @@ -1803,17 +1899,80 @@ public enum Operations { } } } - /// Validation failed, or the endpoint has been spammed. + public struct UnprocessableContent: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/git/blobs/POST/responses/422/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/git/blobs/POST/responses/422/content/json`. + @frozen public enum jsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/git/blobs/POST/responses/422/content/json/case1`. + case validation_hyphen_error(Components.Schemas.validation_hyphen_error) + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/git/blobs/POST/responses/422/content/json/case2`. + case repository_hyphen_rule_hyphen_violation_hyphen_error(Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self = .validation_hyphen_error(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + do { + self = .repository_hyphen_rule_hyphen_violation_hyphen_error(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + throw Swift.DecodingError.failedToDecodeOneOfSchema( + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + switch self { + case let .validation_hyphen_error(value): + try value.encode(to: encoder) + case let .repository_hyphen_rule_hyphen_violation_hyphen_error(value): + try value.encode(to: encoder) + } + } + } + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/git/blobs/POST/responses/422/content/application\/json`. + case json(Operations.git_sol_create_hyphen_blob.Output.UnprocessableContent.Body.jsonPayload) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Operations.git_sol_create_hyphen_blob.Output.UnprocessableContent.Body.jsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.git_sol_create_hyphen_blob.Output.UnprocessableContent.Body + /// Creates a new `UnprocessableContent`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.git_sol_create_hyphen_blob.Output.UnprocessableContent.Body) { + self.body = body + } + } + /// Validation failed /// /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/git/blobs/post(git/create-blob)/responses/422`. /// /// HTTP response code: `422 unprocessableContent`. - case unprocessableContent(Components.Responses.validation_failed) + case unprocessableContent(Operations.git_sol_create_hyphen_blob.Output.UnprocessableContent) /// The associated value of the enum case if `self` is `.unprocessableContent`. /// /// - Throws: An error if `self` is not `.unprocessableContent`. /// - SeeAlso: `.unprocessableContent`. - public var unprocessableContent: Components.Responses.validation_failed { + public var unprocessableContent: Operations.git_sol_create_hyphen_blob.Output.UnprocessableContent { get throws { switch self { case let .unprocessableContent(response): From 965683542744aa3827de0ef232a41c4aaabbca29 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 26 Aug 2024 21:48:25 +0000 Subject: [PATCH 142/152] Commit via running ake Sources/repos --- Sources/repos/Client.swift | 4 +- Sources/repos/Types.swift | 163 ++++++++++++++++++++++++++++++++++++- 2 files changed, 163 insertions(+), 4 deletions(-) diff --git a/Sources/repos/Client.swift b/Sources/repos/Client.swift index 4cb921c6b93..de935b61842 100644 --- a/Sources/repos/Client.swift +++ b/Sources/repos/Client.swift @@ -8476,7 +8476,7 @@ public struct Client: APIProtocol { return .unprocessableContent(.init(body: body)) case 409: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.conflict.Body + let body: Operations.repos_sol_create_hyphen_or_hyphen_update_hyphen_file_hyphen_contents.Output.Conflict.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -8486,7 +8486,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.basic_hyphen_error.self, + Operations.repos_sol_create_hyphen_or_hyphen_update_hyphen_file_hyphen_contents.Output.Conflict.Body.jsonPayload.self, from: responseBody, transforming: { value in .json(value) diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index d03a2681163..96007dea6eb 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -18726,6 +18726,102 @@ public enum Components { case commit } } + /// The ID of the push protection bypass placeholder. This value is returned on any push protected routes. + /// + /// - Remark: Generated from `#/components/schemas/secret-scanning-push-protection-bypass-placeholder-id`. + public typealias secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_placeholder_hyphen_id = Swift.String + /// Repository rule violation was detected + /// + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error`. + public struct repository_hyphen_rule_hyphen_violation_hyphen_error: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/message`. + public var message: Swift.String? + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/documentation_url`. + public var documentation_url: Swift.String? + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/status`. + public var status: Swift.String? + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata`. + public struct metadataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning`. + public struct secret_scanningPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning/bypass_placeholdersPayload`. + public struct bypass_placeholdersPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning/bypass_placeholdersPayload/placeholder_id`. + public var placeholder_id: Components.Schemas.secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_placeholder_hyphen_id? + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning/bypass_placeholdersPayload/token_type`. + public var token_type: Swift.String? + /// Creates a new `bypass_placeholdersPayloadPayload`. + /// + /// - Parameters: + /// - placeholder_id: + /// - token_type: + public init( + placeholder_id: Components.Schemas.secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_placeholder_hyphen_id? = nil, + token_type: Swift.String? = nil + ) { + self.placeholder_id = placeholder_id + self.token_type = token_type + } + public enum CodingKeys: String, CodingKey { + case placeholder_id + case token_type + } + } + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning/bypass_placeholders`. + public typealias bypass_placeholdersPayload = [Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload.secret_scanningPayload.bypass_placeholdersPayloadPayload] + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning/bypass_placeholders`. + public var bypass_placeholders: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload.secret_scanningPayload.bypass_placeholdersPayload? + /// Creates a new `secret_scanningPayload`. + /// + /// - Parameters: + /// - bypass_placeholders: + public init(bypass_placeholders: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload.secret_scanningPayload.bypass_placeholdersPayload? = nil) { + self.bypass_placeholders = bypass_placeholders + } + public enum CodingKeys: String, CodingKey { + case bypass_placeholders + } + } + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata/secret_scanning`. + public var secret_scanning: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload.secret_scanningPayload? + /// Creates a new `metadataPayload`. + /// + /// - Parameters: + /// - secret_scanning: + public init(secret_scanning: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload.secret_scanningPayload? = nil) { + self.secret_scanning = secret_scanning + } + public enum CodingKeys: String, CodingKey { + case secret_scanning + } + } + /// - Remark: Generated from `#/components/schemas/repository-rule-violation-error/metadata`. + public var metadata: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload? + /// Creates a new `repository_hyphen_rule_hyphen_violation_hyphen_error`. + /// + /// - Parameters: + /// - message: + /// - documentation_url: + /// - status: + /// - metadata: + public init( + message: Swift.String? = nil, + documentation_url: Swift.String? = nil, + status: Swift.String? = nil, + metadata: Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error.metadataPayload? = nil + ) { + self.message = message + self.documentation_url = documentation_url + self.status = status + self.metadata = metadata + } + public enum CodingKeys: String, CodingKey { + case message + case documentation_url + case status + case metadata + } + } /// Contributor /// /// - Remark: Generated from `#/components/schemas/contributor`. @@ -40466,17 +40562,80 @@ public enum Operations { } } } + public struct Conflict: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/contents/{path}/PUT/responses/409/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/contents/{path}/PUT/responses/409/content/json`. + @frozen public enum jsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/contents/{path}/PUT/responses/409/content/json/case1`. + case basic_hyphen_error(Components.Schemas.basic_hyphen_error) + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/contents/{path}/PUT/responses/409/content/json/case2`. + case repository_hyphen_rule_hyphen_violation_hyphen_error(Components.Schemas.repository_hyphen_rule_hyphen_violation_hyphen_error) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self = .basic_hyphen_error(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + do { + self = .repository_hyphen_rule_hyphen_violation_hyphen_error(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + throw Swift.DecodingError.failedToDecodeOneOfSchema( + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + switch self { + case let .basic_hyphen_error(value): + try value.encode(to: encoder) + case let .repository_hyphen_rule_hyphen_violation_hyphen_error(value): + try value.encode(to: encoder) + } + } + } + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/contents/{path}/PUT/responses/409/content/application\/json`. + case json(Operations.repos_sol_create_hyphen_or_hyphen_update_hyphen_file_hyphen_contents.Output.Conflict.Body.jsonPayload) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Operations.repos_sol_create_hyphen_or_hyphen_update_hyphen_file_hyphen_contents.Output.Conflict.Body.jsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.repos_sol_create_hyphen_or_hyphen_update_hyphen_file_hyphen_contents.Output.Conflict.Body + /// Creates a new `Conflict`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.repos_sol_create_hyphen_or_hyphen_update_hyphen_file_hyphen_contents.Output.Conflict.Body) { + self.body = body + } + } /// Conflict /// /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/contents/{path}/put(repos/create-or-update-file-contents)/responses/409`. /// /// HTTP response code: `409 conflict`. - case conflict(Components.Responses.conflict) + case conflict(Operations.repos_sol_create_hyphen_or_hyphen_update_hyphen_file_hyphen_contents.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. - public var conflict: Components.Responses.conflict { + public var conflict: Operations.repos_sol_create_hyphen_or_hyphen_update_hyphen_file_hyphen_contents.Output.Conflict { get throws { switch self { case let .conflict(response): From db6114f0649fbe03b39496f05869ca8074bd3d3e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 26 Aug 2024 21:49:07 +0000 Subject: [PATCH 143/152] Commit via running ake Sources/secret-scanning --- Sources/secret-scanning/Types.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/secret-scanning/Types.swift b/Sources/secret-scanning/Types.swift index 5c51a462605..7e1c7b29706 100644 --- a/Sources/secret-scanning/Types.swift +++ b/Sources/secret-scanning/Types.swift @@ -1139,6 +1139,10 @@ public enum Components { case validity } } + /// The ID of the push protection bypass placeholder. This value is returned on any push protected routes. + /// + /// - Remark: Generated from `#/components/schemas/secret-scanning-push-protection-bypass-placeholder-id`. + public typealias secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_placeholder_hyphen_id = Swift.String /// - Remark: Generated from `#/components/schemas/secret-scanning-alert`. public struct secret_hyphen_scanning_hyphen_alert: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/secret-scanning-alert/number`. @@ -1864,10 +1868,6 @@ public enum Components { case used_in_tests = "used_in_tests" case will_fix_later = "will_fix_later" } - /// The ID of the push protection bypass placeholder. This value is returned on any push protected routes. - /// - /// - Remark: Generated from `#/components/schemas/secret-scanning-push-protection-bypass-placeholder-id`. - public typealias secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass_hyphen_placeholder_hyphen_id = Swift.String /// - Remark: Generated from `#/components/schemas/secret-scanning-push-protection-bypass`. public struct secret_hyphen_scanning_hyphen_push_hyphen_protection_hyphen_bypass: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/secret-scanning-push-protection-bypass/reason`. From f8c2483bb4f250e540796aaf20cae327565ae421 Mon Sep 17 00:00:00 2001 From: Wei <41205mw@gmail.com> Date: Mon, 2 Sep 2024 21:43:30 +0800 Subject: [PATCH 144/152] Update dependabot.yml --- .github/dependabot.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 795912164e1..d92c5ad8035 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,12 +1,8 @@ version: 2 updates: - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "weekly" - - - package-ecosystem: "github-actions" - directory: "/.github/workflows/actions/setup" + directories: + - "/.github/*" schedule: interval: "weekly" From 70ee95ed379bd65c1a908e753cc74e8afdab27bd Mon Sep 17 00:00:00 2001 From: Wei <41205mw@gmail.com> Date: Mon, 2 Sep 2024 22:04:36 +0800 Subject: [PATCH 145/152] Update .gitmodules --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 447dc5dcab2..cfdc733eb75 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "Submodule/github/rest-api-description"] path = Submodule/github/rest-api-description - url = ../../github/rest-api-description.git + url = https://github.com/github/rest-api-description.git shallow = true From becd66fa90d6344f1e2a8480b28885db40669515 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 14:07:39 +0000 Subject: [PATCH 146/152] Bump Submodule/github/rest-api-description from `5b01aaf` to `38baa7a` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `5b01aaf` to `38baa7a`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/5b01aaf4c881bb75d6ef744ff8b26fa229f4deca...38baa7aebf29fe927aac6aa0ae769b7a8d3204ca) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Submodule/github/rest-api-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index 5b01aaf4c88..38baa7aebf2 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit 5b01aaf4c881bb75d6ef744ff8b26fa229f4deca +Subproject commit 38baa7aebf29fe927aac6aa0ae769b7a8d3204ca From fbbc938aaa293b47cdb12b6a9e172f008d8180c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 2 Sep 2024 14:27:55 +0000 Subject: [PATCH 147/152] Commit via running ake Sources/meta --- Sources/meta/Types.swift | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/Sources/meta/Types.swift b/Sources/meta/Types.swift index 10adcf14d37..3ada4926c35 100644 --- a/Sources/meta/Types.swift +++ b/Sources/meta/Types.swift @@ -459,6 +459,31 @@ public enum Components { public var packages: [Swift.String]? /// - Remark: Generated from `#/components/schemas/api-overview/domains/actions`. public var actions: [Swift.String]? + /// - Remark: Generated from `#/components/schemas/api-overview/domains/artifact_attestations`. + public struct artifact_attestationsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/api-overview/domains/artifact_attestations/trust_domain`. + public var trust_domain: Swift.String? + /// - Remark: Generated from `#/components/schemas/api-overview/domains/artifact_attestations/services`. + public var services: [Swift.String]? + /// Creates a new `artifact_attestationsPayload`. + /// + /// - Parameters: + /// - trust_domain: + /// - services: + public init( + trust_domain: Swift.String? = nil, + services: [Swift.String]? = nil + ) { + self.trust_domain = trust_domain + self.services = services + } + public enum CodingKeys: String, CodingKey { + case trust_domain + case services + } + } + /// - Remark: Generated from `#/components/schemas/api-overview/domains/artifact_attestations`. + public var artifact_attestations: Components.Schemas.api_hyphen_overview.domainsPayload.artifact_attestationsPayload? /// Creates a new `domainsPayload`. /// /// - Parameters: @@ -467,18 +492,21 @@ public enum Components { /// - copilot: /// - packages: /// - actions: + /// - artifact_attestations: public init( website: [Swift.String]? = nil, codespaces: [Swift.String]? = nil, copilot: [Swift.String]? = nil, packages: [Swift.String]? = nil, - actions: [Swift.String]? = nil + actions: [Swift.String]? = nil, + artifact_attestations: Components.Schemas.api_hyphen_overview.domainsPayload.artifact_attestationsPayload? = nil ) { self.website = website self.codespaces = codespaces self.copilot = copilot self.packages = packages self.actions = actions + self.artifact_attestations = artifact_attestations } public enum CodingKeys: String, CodingKey { case website @@ -486,6 +514,7 @@ public enum Components { case copilot case packages case actions + case artifact_attestations } } /// - Remark: Generated from `#/components/schemas/api-overview/domains`. From b1fd7079f41ec7234fb8d7874060d4810579f48d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 2 Sep 2024 14:31:05 +0000 Subject: [PATCH 148/152] Commit via running ake Sources/repos --- Sources/repos/Types.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index 96007dea6eb..f498e59a45c 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -10976,7 +10976,6 @@ public enum Components { case RepositoryRole = "RepositoryRole" case Team = "Team" case DeployKey = "DeployKey" - case EnterpriseTeam = "EnterpriseTeam" } /// The type of actor that can bypass a ruleset. /// From c4790b8f78bbcd2efc430df2f76141c31cb168f6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 2 Sep 2024 14:33:32 +0000 Subject: [PATCH 149/152] Commit via running ake Sources/security-advisories --- Sources/security-advisories/Client.swift | 14 +++++++ Sources/security-advisories/Types.swift | 52 ++++++++++++++++++++++++ 2 files changed, 66 insertions(+) diff --git a/Sources/security-advisories/Client.swift b/Sources/security-advisories/Client.swift index ce8962c0ec1..dbe8c7827c9 100644 --- a/Sources/security-advisories/Client.swift +++ b/Sources/security-advisories/Client.swift @@ -137,6 +137,20 @@ public struct Client: APIProtocol { name: "modified", value: input.query.modified ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "epss_percentage", + value: input.query.epss_percentage + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "epss_percentile", + value: input.query.epss_percentile + ) try converter.setQueryItemAsURI( in: &request, style: .form, diff --git a/Sources/security-advisories/Types.swift b/Sources/security-advisories/Types.swift index 592af5e8309..4f7aa8f66c4 100644 --- a/Sources/security-advisories/Types.swift +++ b/Sources/security-advisories/Types.swift @@ -764,6 +764,31 @@ public enum Components { public typealias cwesPayload = [Components.Schemas.global_hyphen_advisory.cwesPayloadPayload] /// - Remark: Generated from `#/components/schemas/global-advisory/cwes`. public var cwes: Components.Schemas.global_hyphen_advisory.cwesPayload? + /// - Remark: Generated from `#/components/schemas/global-advisory/epss`. + public struct epssPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/global-advisory/epss/percentage`. + public var percentage: Swift.Double? + /// - Remark: Generated from `#/components/schemas/global-advisory/epss/percentile`. + public var percentile: Swift.Double? + /// Creates a new `epssPayload`. + /// + /// - Parameters: + /// - percentage: + /// - percentile: + public init( + percentage: Swift.Double? = nil, + percentile: Swift.Double? = nil + ) { + self.percentage = percentage + self.percentile = percentile + } + public enum CodingKeys: String, CodingKey { + case percentage + case percentile + } + } + /// - Remark: Generated from `#/components/schemas/global-advisory/epss`. + public var epss: Components.Schemas.global_hyphen_advisory.epssPayload? /// - Remark: Generated from `#/components/schemas/global-advisory/creditsPayload`. public struct creditsPayloadPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/global-advisory/creditsPayload/user`. @@ -818,6 +843,7 @@ public enum Components { /// - vulnerabilities: The products and respective version ranges affected by the advisory. /// - cvss: /// - cwes: + /// - epss: /// - credits: The users who contributed to the advisory. public init( ghsa_id: Swift.String, @@ -840,6 +866,7 @@ public enum Components { vulnerabilities: [Components.Schemas.vulnerability]? = nil, cvss: Components.Schemas.global_hyphen_advisory.cvssPayload? = nil, cwes: Components.Schemas.global_hyphen_advisory.cwesPayload? = nil, + epss: Components.Schemas.global_hyphen_advisory.epssPayload? = nil, credits: Components.Schemas.global_hyphen_advisory.creditsPayload? = nil ) { self.ghsa_id = ghsa_id @@ -862,6 +889,7 @@ public enum Components { self.vulnerabilities = vulnerabilities self.cvss = cvss self.cwes = cwes + self.epss = epss self.credits = credits } public enum CodingKeys: String, CodingKey { @@ -885,6 +913,7 @@ public enum Components { case vulnerabilities case cvss case cwes + case epss case credits } public init(from decoder: any Decoder) throws { @@ -969,6 +998,10 @@ public enum Components { Components.Schemas.global_hyphen_advisory.cwesPayload.self, forKey: .cwes ) + epss = try container.decodeIfPresent( + Components.Schemas.global_hyphen_advisory.epssPayload.self, + forKey: .epss + ) credits = try container.decodeIfPresent( Components.Schemas.global_hyphen_advisory.creditsPayload.self, forKey: .credits @@ -994,6 +1027,7 @@ public enum Components { "vulnerabilities", "cvss", "cwes", + "epss", "credits" ]) } @@ -6410,6 +6444,16 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/advisories/GET/query/modified`. public var modified: Swift.String? + /// If specified, only return advisories that have an EPSS percentage score that matches the provided value. + /// The EPSS percentage represents the likelihood of a CVE being exploited. + /// + /// - Remark: Generated from `#/paths/advisories/GET/query/epss_percentage`. + public var epss_percentage: Swift.String? + /// If specified, only return advisories that have an EPSS percentile score that matches the provided value. + /// The EPSS percentile represents the relative rank of the CVE's likelihood of being exploited compared to other CVEs. + /// + /// - Remark: Generated from `#/paths/advisories/GET/query/epss_percentile`. + public var epss_percentile: Swift.String? /// A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." /// /// - Remark: Generated from `#/paths/advisories/GET/query/before`. @@ -6435,6 +6479,8 @@ public enum Operations { @frozen public enum sortPayload: String, Codable, Hashable, Sendable { case updated = "updated" case published = "published" + case epss_percentage = "epss_percentage" + case epss_percentile = "epss_percentile" } /// The property to sort the results by. /// @@ -6454,6 +6500,8 @@ public enum Operations { /// - published: If specified, only return advisories that were published on a date or date range. /// - updated: If specified, only return advisories that were updated on a date or date range. /// - modified: If specified, only show advisories that were updated or published on a date or date range. + /// - epss_percentage: If specified, only return advisories that have an EPSS percentage score that matches the provided value. + /// - epss_percentile: If specified, only return advisories that have an EPSS percentile score that matches the provided value. /// - before: A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." /// - after: A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." /// - direction: The direction to sort the results by. @@ -6471,6 +6519,8 @@ public enum Operations { published: Swift.String? = nil, updated: Swift.String? = nil, modified: Swift.String? = nil, + epss_percentage: Swift.String? = nil, + epss_percentile: Swift.String? = nil, before: Components.Parameters.pagination_hyphen_before? = nil, after: Components.Parameters.pagination_hyphen_after? = nil, direction: Components.Parameters.direction? = nil, @@ -6488,6 +6538,8 @@ public enum Operations { self.published = published self.updated = updated self.modified = modified + self.epss_percentage = epss_percentage + self.epss_percentile = epss_percentile self.before = before self.after = after self.direction = direction From d35bf91ea4af9464922ca3fe94ea0c0867efe4c5 Mon Sep 17 00:00:00 2001 From: Wei <41205mw@gmail.com> Date: Fri, 6 Sep 2024 17:46:23 +0800 Subject: [PATCH 150/152] Delete .gitmodules --- .gitmodules | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index cfdc733eb75..00000000000 --- a/.gitmodules +++ /dev/null @@ -1,4 +0,0 @@ -[submodule "Submodule/github/rest-api-description"] - path = Submodule/github/rest-api-description - url = https://github.com/github/rest-api-description.git - shallow = true From 9804099c73467f5e3133c819c40c2a5f07ef2d87 Mon Sep 17 00:00:00 2001 From: Wei <41205mw@gmail.com> Date: Fri, 6 Sep 2024 17:47:01 +0800 Subject: [PATCH 151/152] Delete Submodule/github directory --- Submodule/github/rest-api-description | 1 - 1 file changed, 1 deletion(-) delete mode 160000 Submodule/github/rest-api-description diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description deleted file mode 160000 index 38baa7aebf2..00000000000 --- a/Submodule/github/rest-api-description +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 38baa7aebf29fe927aac6aa0ae769b7a8d3204ca From b6b060a8a1a6544e39a5b6bd64a700d3cbb09fc2 Mon Sep 17 00:00:00 2001 From: Wei <41205mw@gmail.com> Date: Fri, 6 Sep 2024 17:47:34 +0800 Subject: [PATCH 152/152] Update dependabot.yml --- .github/dependabot.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d92c5ad8035..26a285de274 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,7 +11,8 @@ updates: schedule: interval: "weekly" - - package-ecosystem: "gitsubmodule" - directory: "/" - schedule: - interval: "weekly" +# FIXME: Need other way to update OAS. + # - package-ecosystem: "gitsubmodule" + # directory: "/" + # schedule: + # interval: "weekly"