Skip to content

Commit 4ca794b

Browse files
Merge pull request #130 from wei18/dependabot/submodules/Submodule/github/rest-api-description-664cf25
Bump Submodule/github/rest-api-description from `c52348c` to `664cf25`
2 parents 02c4ee1 + f03ba9f commit 4ca794b

File tree

8 files changed

+120
-11
lines changed

8 files changed

+120
-11
lines changed

Sources/apps/Client.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,7 @@ public struct Client: APIProtocol {
10061006
}
10071007
/// Delete an installation for the authenticated app
10081008
///
1009-
/// 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.
1009+
/// 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.
10101010
///
10111011
/// 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.
10121012
///
@@ -1243,7 +1243,7 @@ public struct Client: APIProtocol {
12431243
}
12441244
/// Suspend an app installation
12451245
///
1246-
/// 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.
1246+
/// 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.
12471247
///
12481248
/// 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.
12491249
///

Sources/apps/Types.swift

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public protocol APIProtocol: Sendable {
9999
func appsGetInstallation(_ input: Operations.AppsGetInstallation.Input) async throws -> Operations.AppsGetInstallation.Output
100100
/// Delete an installation for the authenticated app
101101
///
102-
/// 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.
102+
/// 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.
103103
///
104104
/// 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.
105105
///
@@ -121,7 +121,7 @@ public protocol APIProtocol: Sendable {
121121
func appsCreateInstallationAccessToken(_ input: Operations.AppsCreateInstallationAccessToken.Input) async throws -> Operations.AppsCreateInstallationAccessToken.Output
122122
/// Suspend an app installation
123123
///
124-
/// 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.
124+
/// 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.
125125
///
126126
/// 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.
127127
///
@@ -496,7 +496,7 @@ extension APIProtocol {
496496
}
497497
/// Delete an installation for the authenticated app
498498
///
499-
/// 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.
499+
/// 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.
500500
///
501501
/// 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.
502502
///
@@ -536,7 +536,7 @@ extension APIProtocol {
536536
}
537537
/// Suspend an app installation
538538
///
539-
/// 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.
539+
/// 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.
540540
///
541541
/// 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.
542542
///
@@ -3180,6 +3180,8 @@ public enum Components {
31803180
public var htmlUrl: Swift.String
31813181
/// - Remark: Generated from `#/components/schemas/installation/app_id`.
31823182
public var appId: Swift.Int
3183+
/// - Remark: Generated from `#/components/schemas/installation/client_id`.
3184+
public var clientId: Swift.String?
31833185
/// The ID of the user or organization this token is being scoped to.
31843186
///
31853187
/// - Remark: Generated from `#/components/schemas/installation/target_id`.
@@ -3218,6 +3220,7 @@ public enum Components {
32183220
/// - repositoriesUrl:
32193221
/// - htmlUrl:
32203222
/// - appId:
3223+
/// - clientId:
32213224
/// - targetId: The ID of the user or organization this token is being scoped to.
32223225
/// - targetType:
32233226
/// - permissions:
@@ -3239,6 +3242,7 @@ public enum Components {
32393242
repositoriesUrl: Swift.String,
32403243
htmlUrl: Swift.String,
32413244
appId: Swift.Int,
3245+
clientId: Swift.String? = nil,
32423246
targetId: Swift.Int,
32433247
targetType: Swift.String,
32443248
permissions: Components.Schemas.AppPermissions,
@@ -3260,6 +3264,7 @@ public enum Components {
32603264
self.repositoriesUrl = repositoriesUrl
32613265
self.htmlUrl = htmlUrl
32623266
self.appId = appId
3267+
self.clientId = clientId
32633268
self.targetId = targetId
32643269
self.targetType = targetType
32653270
self.permissions = permissions
@@ -3282,6 +3287,7 @@ public enum Components {
32823287
case repositoriesUrl = "repositories_url"
32833288
case htmlUrl = "html_url"
32843289
case appId = "app_id"
3290+
case clientId = "client_id"
32853291
case targetId = "target_id"
32863292
case targetType = "target_type"
32873293
case permissions
@@ -6825,7 +6831,7 @@ public enum Operations {
68256831
}
68266832
/// Delete an installation for the authenticated app
68276833
///
6828-
/// 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.
6834+
/// 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.
68296835
///
68306836
/// 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.
68316837
///
@@ -7238,7 +7244,7 @@ public enum Operations {
72387244
}
72397245
/// Suspend an app installation
72407246
///
7241-
/// 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.
7247+
/// 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.
72427248
///
72437249
/// 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.
72447250
///

Sources/code-scanning/Client.swift

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3100,6 +3100,28 @@ public struct Client: APIProtocol {
31003100
preconditionFailure("bestContentType chose an invalid content type.")
31013101
}
31023102
return .conflict(.init(body: body))
3103+
case 422:
3104+
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
3105+
let body: Components.Responses.CodeScanningInvalidState.Body
3106+
let chosenContentType = try converter.bestContentType(
3107+
received: contentType,
3108+
options: [
3109+
"application/json"
3110+
]
3111+
)
3112+
switch chosenContentType {
3113+
case "application/json":
3114+
body = try await converter.getResponseBodyAsJSON(
3115+
Components.Schemas.BasicError.self,
3116+
from: responseBody,
3117+
transforming: { value in
3118+
.json(value)
3119+
}
3120+
)
3121+
default:
3122+
preconditionFailure("bestContentType chose an invalid content type.")
3123+
}
3124+
return .unprocessableContent(.init(body: body))
31033125
case 503:
31043126
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
31053127
let body: Components.Responses.ServiceUnavailable.Body

Sources/code-scanning/Types.swift

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3979,6 +3979,34 @@ public enum Components {
39793979
self.body = body
39803980
}
39813981
}
3982+
public struct CodeScanningInvalidState: Sendable, Hashable {
3983+
/// - Remark: Generated from `#/components/responses/code_scanning_invalid_state/content`.
3984+
@frozen public enum Body: Sendable, Hashable {
3985+
/// - Remark: Generated from `#/components/responses/code_scanning_invalid_state/content/application\/json`.
3986+
case json(Components.Schemas.BasicError)
3987+
/// The associated value of the enum case if `self` is `.json`.
3988+
///
3989+
/// - Throws: An error if `self` is not `.json`.
3990+
/// - SeeAlso: `.json`.
3991+
public var json: Components.Schemas.BasicError {
3992+
get throws {
3993+
switch self {
3994+
case let .json(body):
3995+
return body
3996+
}
3997+
}
3998+
}
3999+
}
4000+
/// Received HTTP response body
4001+
public var body: Components.Responses.CodeScanningInvalidState.Body
4002+
/// Creates a new `CodeScanningInvalidState`.
4003+
///
4004+
/// - Parameters:
4005+
/// - body: Received HTTP response body
4006+
public init(body: Components.Responses.CodeScanningInvalidState.Body) {
4007+
self.body = body
4008+
}
4009+
}
39824010
}
39834011
/// Types generated from the `#/components/headers` section of the OpenAPI document.
39844012
public enum Headers {
@@ -9066,6 +9094,29 @@ public enum Operations {
90669094
}
90679095
}
90689096
}
9097+
/// Response if the configuration change cannot be made because the repository is not in the required state
9098+
///
9099+
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/default-setup/patch(code-scanning/update-default-setup)/responses/422`.
9100+
///
9101+
/// HTTP response code: `422 unprocessableContent`.
9102+
case unprocessableContent(Components.Responses.CodeScanningInvalidState)
9103+
/// The associated value of the enum case if `self` is `.unprocessableContent`.
9104+
///
9105+
/// - Throws: An error if `self` is not `.unprocessableContent`.
9106+
/// - SeeAlso: `.unprocessableContent`.
9107+
public var unprocessableContent: Components.Responses.CodeScanningInvalidState {
9108+
get throws {
9109+
switch self {
9110+
case let .unprocessableContent(response):
9111+
return response
9112+
default:
9113+
try throwUnexpectedResponseStatus(
9114+
expectedStatus: "unprocessableContent",
9115+
response: self
9116+
)
9117+
}
9118+
}
9119+
}
90699120
/// Service unavailable
90709121
///
90719122
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/default-setup/patch(code-scanning/update-default-setup)/responses/503`.

Sources/code-security/Types.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6067,14 +6067,14 @@ public enum Operations {
60676067
@frozen public enum Body: Sendable, Hashable {
60686068
/// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/detach/DELETE/requestBody/json`.
60696069
public struct JsonPayload: Codable, Hashable, Sendable {
6070-
/// An array of repository IDs to detach from configurations.
6070+
/// An array of repository IDs to detach from configurations. Up to 1000 IDs can be provided.
60716071
///
60726072
/// - Remark: Generated from `#/paths/orgs/{org}/code-security/configurations/detach/DELETE/requestBody/json/selected_repository_ids`.
60736073
public var selectedRepositoryIds: [Swift.Int]?
60746074
/// Creates a new `JsonPayload`.
60756075
///
60766076
/// - Parameters:
6077-
/// - selectedRepositoryIds: An array of repository IDs to detach from configurations.
6077+
/// - selectedRepositoryIds: An array of repository IDs to detach from configurations. Up to 1000 IDs can be provided.
60786078
public init(selectedRepositoryIds: [Swift.Int]? = nil) {
60796079
self.selectedRepositoryIds = selectedRepositoryIds
60806080
}

Sources/orgs/Client.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4377,6 +4377,9 @@ public struct Client: APIProtocol {
43774377
///
43784378
/// 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.
43794379
///
4380+
/// > [!NOTE]
4381+
/// > 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.
4382+
///
43804383
/// - Remark: HTTP `DELETE /orgs/{org}/members/{username}`.
43814384
/// - Remark: Generated from `#/paths//orgs/{org}/members/{username}/delete(orgs/remove-member)`.
43824385
public func orgsRemoveMember(_ input: Operations.OrgsRemoveMember.Input) async throws -> Operations.OrgsRemoveMember.Output {
@@ -4683,6 +4686,9 @@ public struct Client: APIProtocol {
46834686
///
46844687
/// 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.
46854688
///
4689+
/// > [!NOTE]
4690+
/// > 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.
4691+
///
46864692
/// - Remark: HTTP `DELETE /orgs/{org}/memberships/{username}`.
46874693
/// - Remark: Generated from `#/paths//orgs/{org}/memberships/{username}/delete(orgs/remove-membership-for-user)`.
46884694
public func orgsRemoveMembershipForUser(_ input: Operations.OrgsRemoveMembershipForUser.Input) async throws -> Operations.OrgsRemoveMembershipForUser.Output {

0 commit comments

Comments
 (0)