diff --git a/Sources/apps/Client.swift b/Sources/apps/Client.swift index 5b84b15447..16f3ae909a 100644 --- a/Sources/apps/Client.swift +++ b/Sources/apps/Client.swift @@ -1006,7 +1006,7 @@ public struct Client: APIProtocol { } /// Delete an installation for the authenticated app /// - /// Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/apps/apps#suspend-an-app-installation)" endpoint. + /// Uninstalls a GitHub App on a user, organization, or enterprise account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/apps/apps#suspend-an-app-installation)" endpoint. /// /// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. /// @@ -1243,7 +1243,7 @@ public struct Client: APIProtocol { } /// Suspend an app installation /// - /// Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + /// Suspends a GitHub App on a user, organization, or enterprise account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. /// /// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. /// diff --git a/Sources/apps/Types.swift b/Sources/apps/Types.swift index c0d1cd609b..95508faeaa 100644 --- a/Sources/apps/Types.swift +++ b/Sources/apps/Types.swift @@ -99,7 +99,7 @@ public protocol APIProtocol: Sendable { func appsGetInstallation(_ input: Operations.AppsGetInstallation.Input) async throws -> Operations.AppsGetInstallation.Output /// Delete an installation for the authenticated app /// - /// Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/apps/apps#suspend-an-app-installation)" endpoint. + /// Uninstalls a GitHub App on a user, organization, or enterprise account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/apps/apps#suspend-an-app-installation)" endpoint. /// /// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. /// @@ -121,7 +121,7 @@ public protocol APIProtocol: Sendable { func appsCreateInstallationAccessToken(_ input: Operations.AppsCreateInstallationAccessToken.Input) async throws -> Operations.AppsCreateInstallationAccessToken.Output /// Suspend an app installation /// - /// Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + /// Suspends a GitHub App on a user, organization, or enterprise account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. /// /// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. /// @@ -496,7 +496,7 @@ extension APIProtocol { } /// Delete an installation for the authenticated app /// - /// Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/apps/apps#suspend-an-app-installation)" endpoint. + /// Uninstalls a GitHub App on a user, organization, or enterprise account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/apps/apps#suspend-an-app-installation)" endpoint. /// /// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. /// @@ -536,7 +536,7 @@ extension APIProtocol { } /// Suspend an app installation /// - /// Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + /// Suspends a GitHub App on a user, organization, or enterprise account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. /// /// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. /// @@ -3180,6 +3180,8 @@ public enum Components { public var htmlUrl: Swift.String /// - Remark: Generated from `#/components/schemas/installation/app_id`. public var appId: Swift.Int + /// - Remark: Generated from `#/components/schemas/installation/client_id`. + public var clientId: Swift.String? /// The ID of the user or organization this token is being scoped to. /// /// - Remark: Generated from `#/components/schemas/installation/target_id`. @@ -3218,6 +3220,7 @@ public enum Components { /// - repositoriesUrl: /// - htmlUrl: /// - appId: + /// - clientId: /// - targetId: The ID of the user or organization this token is being scoped to. /// - targetType: /// - permissions: @@ -3239,6 +3242,7 @@ public enum Components { repositoriesUrl: Swift.String, htmlUrl: Swift.String, appId: Swift.Int, + clientId: Swift.String? = nil, targetId: Swift.Int, targetType: Swift.String, permissions: Components.Schemas.AppPermissions, @@ -3260,6 +3264,7 @@ public enum Components { self.repositoriesUrl = repositoriesUrl self.htmlUrl = htmlUrl self.appId = appId + self.clientId = clientId self.targetId = targetId self.targetType = targetType self.permissions = permissions @@ -3282,6 +3287,7 @@ public enum Components { case repositoriesUrl = "repositories_url" case htmlUrl = "html_url" case appId = "app_id" + case clientId = "client_id" case targetId = "target_id" case targetType = "target_type" case permissions @@ -6825,7 +6831,7 @@ public enum Operations { } /// Delete an installation for the authenticated app /// - /// Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/apps/apps#suspend-an-app-installation)" endpoint. + /// Uninstalls a GitHub App on a user, organization, or enterprise account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/apps/apps#suspend-an-app-installation)" endpoint. /// /// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. /// @@ -7238,7 +7244,7 @@ public enum Operations { } /// Suspend an app installation /// - /// Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + /// Suspends a GitHub App on a user, organization, or enterprise account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. /// /// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. /// diff --git a/Sources/code-scanning/Client.swift b/Sources/code-scanning/Client.swift index 039a6617ab..9ff3b2c90f 100644 --- a/Sources/code-scanning/Client.swift +++ b/Sources/code-scanning/Client.swift @@ -3100,6 +3100,28 @@ public struct Client: APIProtocol { preconditionFailure("bestContentType chose an invalid content type.") } return .conflict(.init(body: body)) + case 422: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.CodeScanningInvalidState.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.BasicError.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unprocessableContent(.init(body: body)) case 503: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) let body: Components.Responses.ServiceUnavailable.Body diff --git a/Sources/code-scanning/Types.swift b/Sources/code-scanning/Types.swift index 866b30a79e..e6c4fcf698 100644 --- a/Sources/code-scanning/Types.swift +++ b/Sources/code-scanning/Types.swift @@ -3979,6 +3979,34 @@ public enum Components { self.body = body } } + public struct CodeScanningInvalidState: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/code_scanning_invalid_state/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/components/responses/code_scanning_invalid_state/content/application\/json`. + case json(Components.Schemas.BasicError) + /// 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.BasicError { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Components.Responses.CodeScanningInvalidState.Body + /// Creates a new `CodeScanningInvalidState`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Components.Responses.CodeScanningInvalidState.Body) { + self.body = body + } + } } /// Types generated from the `#/components/headers` section of the OpenAPI document. public enum Headers { @@ -9066,6 +9094,29 @@ public enum Operations { } } } + /// Response if the configuration change cannot be made because the repository is not in the required state + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/default-setup/patch(code-scanning/update-default-setup)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + case unprocessableContent(Components.Responses.CodeScanningInvalidState) + /// 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.CodeScanningInvalidState { + 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}/code-scanning/default-setup/patch(code-scanning/update-default-setup)/responses/503`. diff --git a/Sources/code-security/Types.swift b/Sources/code-security/Types.swift index baaac91aca..1742eaa5b4 100644 --- a/Sources/code-security/Types.swift +++ b/Sources/code-security/Types.swift @@ -6067,14 +6067,14 @@ public enum Operations { @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. + /// An array of repository IDs to detach from configurations. Up to 1000 IDs can be provided. /// /// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/detach/DELETE/requestBody/json/selected_repository_ids`. public var selectedRepositoryIds: [Swift.Int]? /// Creates a new `JsonPayload`. /// /// - Parameters: - /// - selectedRepositoryIds: An array of repository IDs to detach from configurations. + /// - selectedRepositoryIds: An array of repository IDs to detach from configurations. Up to 1000 IDs can be provided. public init(selectedRepositoryIds: [Swift.Int]? = nil) { self.selectedRepositoryIds = selectedRepositoryIds } diff --git a/Sources/orgs/Client.swift b/Sources/orgs/Client.swift index e3ebadc300..dee0f32146 100644 --- a/Sources/orgs/Client.swift +++ b/Sources/orgs/Client.swift @@ -4377,6 +4377,9 @@ public struct Client: APIProtocol { /// /// Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. /// + /// > [!NOTE] + /// > If a user has both direct membership in the organization as well as indirect membership via an enterprise team, only their direct membership will be removed. Their indirect membership via an enterprise team remains until the user is removed from the enterprise team. + /// /// - Remark: HTTP `DELETE /orgs/{org}/members/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/delete(orgs/remove-member)`. public func orgsRemoveMember(_ input: Operations.OrgsRemoveMember.Input) async throws -> Operations.OrgsRemoveMember.Output { @@ -4683,6 +4686,9 @@ public struct Client: APIProtocol { /// /// If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases. /// + /// > [!NOTE] + /// > If a user has both direct membership in the organization as well as indirect membership via an enterprise team, only their direct membership will be removed. Their indirect membership via an enterprise team remains until the user is removed from the enterprise team. + /// /// - Remark: HTTP `DELETE /orgs/{org}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/delete(orgs/remove-membership-for-user)`. public func orgsRemoveMembershipForUser(_ input: Operations.OrgsRemoveMembershipForUser.Input) async throws -> Operations.OrgsRemoveMembershipForUser.Output { diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index 0fcc943f1a..783f1ff29a 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -454,6 +454,9 @@ public protocol APIProtocol: Sendable { /// /// Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. /// + /// > [!NOTE] + /// > If a user has both direct membership in the organization as well as indirect membership via an enterprise team, only their direct membership will be removed. Their indirect membership via an enterprise team remains until the user is removed from the enterprise team. + /// /// - Remark: HTTP `DELETE /orgs/{org}/members/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/delete(orgs/remove-member)`. func orgsRemoveMember(_ input: Operations.OrgsRemoveMember.Input) async throws -> Operations.OrgsRemoveMember.Output @@ -485,6 +488,9 @@ public protocol APIProtocol: Sendable { /// /// If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases. /// + /// > [!NOTE] + /// > If a user has both direct membership in the organization as well as indirect membership via an enterprise team, only their direct membership will be removed. Their indirect membership via an enterprise team remains until the user is removed from the enterprise team. + /// /// - Remark: HTTP `DELETE /orgs/{org}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/delete(orgs/remove-membership-for-user)`. func orgsRemoveMembershipForUser(_ input: Operations.OrgsRemoveMembershipForUser.Input) async throws -> Operations.OrgsRemoveMembershipForUser.Output @@ -1753,6 +1759,9 @@ extension APIProtocol { /// /// Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. /// + /// > [!NOTE] + /// > If a user has both direct membership in the organization as well as indirect membership via an enterprise team, only their direct membership will be removed. Their indirect membership via an enterprise team remains until the user is removed from the enterprise team. + /// /// - Remark: HTTP `DELETE /orgs/{org}/members/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/delete(orgs/remove-member)`. public func orgsRemoveMember( @@ -1810,6 +1819,9 @@ extension APIProtocol { /// /// If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases. /// + /// > [!NOTE] + /// > If a user has both direct membership in the organization as well as indirect membership via an enterprise team, only their direct membership will be removed. Their indirect membership via an enterprise team remains until the user is removed from the enterprise team. + /// /// - Remark: HTTP `DELETE /orgs/{org}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/delete(orgs/remove-membership-for-user)`. public func orgsRemoveMembershipForUser( @@ -4442,6 +4454,8 @@ public enum Components { public var htmlUrl: Swift.String /// - Remark: Generated from `#/components/schemas/installation/app_id`. public var appId: Swift.Int + /// - Remark: Generated from `#/components/schemas/installation/client_id`. + public var clientId: Swift.String? /// The ID of the user or organization this token is being scoped to. /// /// - Remark: Generated from `#/components/schemas/installation/target_id`. @@ -4480,6 +4494,7 @@ public enum Components { /// - repositoriesUrl: /// - htmlUrl: /// - appId: + /// - clientId: /// - targetId: The ID of the user or organization this token is being scoped to. /// - targetType: /// - permissions: @@ -4501,6 +4516,7 @@ public enum Components { repositoriesUrl: Swift.String, htmlUrl: Swift.String, appId: Swift.Int, + clientId: Swift.String? = nil, targetId: Swift.Int, targetType: Swift.String, permissions: Components.Schemas.AppPermissions, @@ -4522,6 +4538,7 @@ public enum Components { self.repositoriesUrl = repositoriesUrl self.htmlUrl = htmlUrl self.appId = appId + self.clientId = clientId self.targetId = targetId self.targetType = targetType self.permissions = permissions @@ -4544,6 +4561,7 @@ public enum Components { case repositoriesUrl = "repositories_url" case htmlUrl = "html_url" case appId = "app_id" + case clientId = "client_id" case targetId = "target_id" case targetType = "target_type" case permissions @@ -18171,6 +18189,9 @@ public enum Operations { /// /// Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. /// + /// > [!NOTE] + /// > If a user has both direct membership in the organization as well as indirect membership via an enterprise team, only their direct membership will be removed. Their indirect membership via an enterprise team remains until the user is removed from the enterprise team. + /// /// - Remark: HTTP `DELETE /orgs/{org}/members/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/delete(orgs/remove-member)`. public enum OrgsRemoveMember { @@ -18740,6 +18761,9 @@ public enum Operations { /// /// If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases. /// + /// > [!NOTE] + /// > If a user has both direct membership in the organization as well as indirect membership via an enterprise team, only their direct membership will be removed. Their indirect membership via an enterprise team remains until the user is removed from the enterprise team. + /// /// - Remark: HTTP `DELETE /orgs/{org}/memberships/{username}`. /// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/delete(orgs/remove-membership-for-user)`. public enum OrgsRemoveMembershipForUser { diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index c52348cd88..664cf25da3 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit c52348cd88be16e613e49c26b39d2653e20b817d +Subproject commit 664cf25da36ebb8f97693e51663addaed26bbae5 pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy